Andee lives on your phone or Mac and uses any app like you do—no integrations, no root, any model; memory and passwords never leave your device | Andee 住进你的手机或 Mac,像你一样操作任何 App——无需集成、无需 Root、支持任意模型,记忆和密码绝不离开设备。
feat(ball): give every look the props, the idle life and the finishing touches
booboosui44393d6338bc
diff --git a/CLAUDE.md b/CLAUDE.mdindex 2335b02..81de7c1 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -187,7 +187,7 @@ A `Face` row is a set of continuous dials every look interprets; a wink, a fist- **Hands sit at least `HAND_MIN_Z` deep.** A hand set out past the silhouette used to sit at z 0.12 and its inner half was hidden by the body it reached across — which hid the pointing finger on the wink.- **`lidCut` is signed.** Positive slices the top of each eye (a second mesh, swapped at 0.5) and rolls it inward; negative slices nothing and rolls the *other* way, the worried slant. The sad moods need it because their `Face.brow` rolls the eyes the angry way.- **A look whose face sits low needs `clingLift`.** The ledge cuts the ball at its equator, and Andee's eyes were below it, so it used to hang there as a faceless blue dome. The lift is per-look; the default 0.055 is what everyone else has always had. Andee's is 0.09 since its eyes moved up (below).-- **Andee's eyes sit above the middle of the sphere (`eyeY` +0.09, `mouthY` −0.185), which is *not* where the reference picture puts them (−0.03).** The picture's head is oblate and the ball is round, so copying its offsets left 1.7 eye-diameters of blank forehead against the picture's 1.4, and once the horns were raised it read as a face stuck on the bottom of a dome. Eyes, mouth, cheeks and the sleep bubble moved together; if you move one, move them all.+- **Andee's eyes sit above the middle of the sphere (`eyeY` +0.09, `mouthY` −0.285), which is *not* where the reference picture puts them (−0.03).** The picture's head is oblate and the ball is round, so copying its offsets left 1.7 eye-diameters of blank forehead against the picture's 1.4, and once the horns were raised it read as a face stuck on the bottom of a dome. Eyes, mouth, cheeks and the sleep bubble moved together; if you move one, move them all. (The mouth was then lowered a further 0.10 on its own, from −0.185 in two 0.05 steps, because it sat tight under the eyes; the cheeks and bubble stayed where they were.)- **An idle Andee has a life, and the list of faces it may wear is defined by what is left out.** In `resolveMood`, only for a look with `gestures`, only while `holdingBase == CALM` and the ball has been quiet for 8 s: every 7–16 s it wears one of `IDLE_FACES` for a few seconds (HAPPY, CURIOUS, WINK, WAVE), never the same one twice running. **SPEAKING, LISTENING, THINKING, SEARCHING and HOLDING are excluded because each says what the device is *doing* — an idle ball with its listening face is a lie the user acts on, by talking into a mic that is off — and ANXIOUS/CONCERNED/TENSE/FAILED/PROTECT read as an alarm, SUCCESS/CELEBRATE as a finished task. REST is excluded too: it is SLEEPING without the bubble, and it turned up fifteen seconds after a wake-up and read as the ball going back to sleep.** Any real activity ends the face at once. (This replaced the `WAVE`/`WINK` body *actions*, which were the same idea done twice; the fidget pool is body-only again.) The face is applied to `effective`, **not** to `holdingBase`, because `idleFor` is derived from `holdingBase == CALM` and swapping it earlier would make the ball think it had stopped being idle.- **Andee naps, it does not stay asleep.** Past `SLEEP_AFTER_SECONDS` it sleeps `NAP_MIN..MAX` (25–50 s), then wakes — done by moving `idleFor` back below the sleep line by `AWAKE_MIN..MAX` (40–90 s), which keeps every gate that already reads `idleFor` (the fidgets, the stroll, `dozing`) right with no second flag, and the existing wake-up HOP fires for free. Other looks keep the old sleep-until-touched rule. **The lab activity's CALM runs this same logic**, so a screenshot taken more than ~12 s after launch may be an idle face rather than a calm one; restart the app (`am force-stop`) for a clean clock.- **There is no open mouth, and that is a removal, not an omission.** A flat half-disc with a tongue was built for the laughing moods and cross-faded with the thin smile; for the ~0.15 s of the fade both were drawn, and the smile is a tube with depth while the disc is flat, so one poked through the other on every change into or out of a happy face. Fixing it means sequencing the two so they never overlap, which on a fade that short is a blink. The mouth is one mesh, a line, and speech opens it by taller and rounder (`mouthScaleY`), as it always did. Do not bring the disc back without a transition that cannot show both.diff --git a/app/src/main/java/net/kuafuai/andee/ui/ball/BallLook.kt b/app/src/main/java/net/kuafuai/andee/ui/ball/BallLook.ktindex 5788369..f14ecd3 100644--- a/app/src/main/java/net/kuafuai/andee/ui/ball/BallLook.kt+++ b/app/src/main/java/net/kuafuai/andee/ui/ball/BallLook.kt@@ -1057,7 +1057,9 @@ val BAJIE = BallLook(* head, [eyeY] −0.03, the picture's own baby proportion — but the picture's head* is oblate and ours is a sphere, so that left a dome of blank forehead, and once* the horns were raised it read as a face stuck on the bottom of a ball. They are- * now at +0.09 (and [mouthY] at −0.185, same gap), which gives the picture's 1.4+ * now at +0.09 (and [mouthY] at −0.285: first −0.185 with the same gap, then+ * twice lower by 0.05 on request because the mouth sat tight under the eyes),+ * which gives the picture's 1.4* eye-diameters of forehead instead of 1.7. The eye is round, so* [eyeCyl] is almost nothing.* * **Two catchlights.** A big one up and left ([glintR] 0.038, at the offset@@ -1124,7 +1126,7 @@ val ANDEE = BallLook(eyeCyl = 0.012f,mouthR = 0.136f,mouthTube = 0.024f,- mouthY = -0.185f,+ mouthY = -0.285f,mouthThick = 0.140f,eyeColor = floatArrayOf(0.030f, 0.065f, 0.230f),pupilR = 0f,diff --git a/app/src/main/java/net/kuafuai/andee/ui/ball/Pose.kt b/app/src/main/java/net/kuafuai/andee/ui/ball/Pose.ktindex 1688166..3612216 100644--- a/app/src/main/java/net/kuafuai/andee/ui/ball/Pose.kt+++ b/app/src/main/java/net/kuafuai/andee/ui/ball/Pose.kt@@ -114,8 +114,10 @@ val POSES: Map<Mood, Pose> = mapOf(// celebrate.webp — stars, a grin; the horns spring.Mood.CELEBRATE to Pose(stars = 1f, sparkTop = 1f, hornLean = -16f),- // rest.webp — squashed down, eyes shut, horns slack.- Mood.REST to Pose(sqx = 0.08f, sqy = -0.13f, arcFlip = true, hornLean = 24f),+ // rest.webp — eyes shut, horns slack. The body used to squash (sqx 0.08,+ // sqy −0.13) and the ball flattened into a puddle; a round sleeping ball with+ // the lid-arc eyes and the floppy horns reads as napping on its own.+ Mood.REST to Pose(arcFlip = true, hornLean = 24f),// The mic is open. What says "listening" is the horns standing up and the head// cocking, both of which are the Face row's — plus its open mouth [Face.gape],@@ -148,5 +150,5 @@ val POSES: Map<Mood, Pose> = mapOf(// Eyes down, a bead of sweat, slumped, horns flopped.Mood.FAILED to Pose(lookY = -0.5f, lidCut = -1.2f, drop = 1f, sqy = -0.05f, hornLean = 24f),- Mood.SLEEPING to Pose(sqx = 0.08f, sqy = -0.13f, arcFlip = true, hornLean = 24f),+ Mood.SLEEPING to Pose(arcFlip = true, hornLean = 24f),)