Commit Graph
15 Commits
Author SHA1 Message Date
Claude 7bd5313422 Mochi: smaller closed eyes, well apart
The closed (asleep, blink, yawn) eyes were arcs nearly twice an open eye's width: on a small
Mochi they met in the middle. They are now two small arcs about as wide as an open eye,
the same on the Mac and iPhone, Windows and Linux, Android and the prototype.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 20:54:27 +00:00
Claude 4a7f9da058 Memory › Graph: open on the whole galaxy, with room around it
The page (and Recenter) now starts at the framing of one press on −.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 18:29:57 +00:00
Claude 7b24a0418e Memory › Graph: a more majestic black hole
- Disk wider (fading out to 16) with dust lanes: slightly darker rings that give it depth.
- Light: a wide glow around the photon ring, a second, wider halo, a warm haze along the disk
  plane; brighter exposure (1.5).
- The shadow stays pure black: the band, flare and haze no longer leak into it.
- Same in the prototype (checked with screenshots).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 18:10:03 +00:00
Claude 9713f99d7d Memory › Graph: a more impressive black hole, fewer stars around it, speed streaks
- Disk: fine filaments along the orbit, wider (to 12.5), faster inner gas, a white-hot inner
  edge, a temperature gradient (white, gold, orange, deep red), stronger Doppler (the side coming
  toward us brighter and blue-white, the other darker and redder).
- Light: double photon ring (thin bright + thinner outer), wider warm halo, stronger band glow,
  a thin horizontal lens-flare streak along the disk; ACES filmic tone mapping.
- Fewer stars: the lensed sky keeps one cell in five (was one in two), the field around the lens
  has 320 extra stars instead of 900.
- Speed: the camera's motion of the last ~80 ms is passed to the shader (`trail`); each lensed
  star is drawn along that path (up to 24 samples, ~30 px), so it streaks and curves with the
  distortion. Field stars get a short streak too when the camera moves (or zooms) fast.
- Same shader in the prototype (checked there with screenshots, static and moving).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 18:01:19 +00:00
Claude c1961c648c Memory › Graph: the stars near the black hole stop twinkling
- In the lens (shader), each star is a soft gaussian dot (sigma 0.7–0.9 px) instead of a hard
  1-px disc: sliding with the spin it keeps the same brightness. Close to the ring, where the
  lens squeezes the sky into arcs and stars race across pixels, they fade out over 2.7–3.9
  units instead of 2.65–3.05.
- The field stars are never smaller than 1.2 pt (smaller ones are dimmer instead), and their
  opacity has 32 steps instead of 10, so a star fading near the lens no longer jumps.
- Same shader change in the prototype.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 17:08:18 +00:00
Claude c811cb5063 Memory galaxy: field stars carry on around the lens circle
900 extra non-clickable stars start at the edge of the black hole's lens
circle and get rarer further out, so the density of the lensed sky
continues outside it: no visible border any more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 14:38:21 +00:00
Claude 45aca99298 Memory galaxy: calmer space, links sucked into the black hole
- OLED black background, no nebula, faint far stars
- sky inside the lens about as dense as the rest of space, softened
  deflection, no stars packed against the ring (no more flicker there),
  no dark backdrop
- links, signals and memories near the black hole are pulled in and
  spiral toward it, fading at the shadow; sucked-in links drawn over it
- fewer lights: no halos except a faint one on galaxies of 50+ memories,
  calmer points and comets
- names only for galaxies of 50+ memories, each keeps its place from one
  frame to the next (no jumping labels)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 14:34:49 +00:00
Claude 5cacaee0a1 Memory galaxy: real lensing of the sky around the black hole
Like the reference video: a dark circle (3.3 × the shadow) around the black
hole shows the sky seen through it. The shader now uses a perspective
camera and draws tiny stars from each ray's final, gravity-bent direction,
turned with the camera and the galaxy's spin, so when you move they slide,
stretch and wind around the ring. The CPU-side lens and the streaks are
gone; field stars are plain dots again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 14:22:38 +00:00
Claude 4034322a1f Memory galaxy: stars inside the black hole's gravity, bent into arcs
- 35 % of the field stars form a thick cloud right around the black hole
  (with depth), so turning the camera sends them behind it and the lens
  bends them into arcs and a ring
- lens images are drawn as small strokes along the ring, longer the more
  they are stretched; Einstein radius 1.6 × the shadow (was 2.4)
- project() takes a height, used by those stars

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 14:15:48 +00:00
Claude ec5eabfa9c Memory galaxy: lens around the black hole, field stars, memories spread out
- brain: one big round disc filled evenly; each project gets an organic
  territory around a random seed (size ∝ memories), no ring of cores;
  elements sit next to their conversation, loose ones link to neighbours
- gravitational lens on screen: memories, links, field stars and comets
  bend around the black hole and follow it when the camera moves
- 1 800 white field stars (not memories), dense near the black hole,
  turning slowly with everything; the yellow dust is gone
- tiny galaxy names, no 'You' pill, smaller cores, thinner signals,
  no lines from the black hole to the cores; the disc fills the view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 14:09:21 +00:00
Claude 7271c84a82 Memory galaxy: real black hole, round galaxy, soft stars, comets inside
- GalaxyBlackHole.metal: the black hole is computed per pixel on the GPU
  (light bent by gravity, turning gas disk with differential rotation,
  Doppler, lensed arcs, photon ring), like the reference video
- brain: the galaxy is a round disc (slice per project ∝ memories, same
  radius for all, soft edges)
- galaxy cores and busy stars: soft glow instead of a cross
- comets cross the galaxy instead of orbiting far outside
- long links are only drawn for the chosen or hovered star

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 13:50:50 +00:00
Claude 0a9c06d951 Memory: galaxy graph page, ported from the prototype
- brain: flat galaxy layout (one galaxy per project, size by memories,
  empty ring around the black hole, 3 nearest links, no hub starburst)
- Mac: new MemoryGalaxy.swift replaces the old 3D sphere graph
  (black hole, rotating disk, comets, signals, orbit camera, panels)
- 35 new hub.memory.galaxy.* strings in the 16 languages
- design/prototype/memory-galaxy.html: the reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LJm3SRL9k3gBPaVtfPhwcT
2026-11-28 13:32:50 +00:00
LouisandClaude Sonnet 4.6 b5d2242126 Mochi wardrobe: outfits, seasons and physics (#195)
* feat: Mochi wardrobe — right-click for outfits, auto seasonal dressing

Outfit model (MochiWardrobe.swift):
- 17 outfits with stable UserDefaults rawValues (mochiOutfit key)
- seasonal() with Meeus/Jones/Butcher Easter algorithm
- Windows: witch hat Oct1-Nov1, santa Dec1-26, party hat Dec31-Jan2,
  hearts Feb13-15, bunny ears Easter±2/+1, sunglasses Jun21-Aug31
- resolved() respects manual selection or falls back to seasonal

Drawing (MochiOutfitDrawing.swift):
- All accessories drawn in code: hats follow head yaw (sin/cos foreshortening),
  glasses at eye level, scarf on lower body, bunny ears behind body
- Fade during mailbox morph (>0.3), heavy roll, and R≤14 (compact)
- Pumpkin: orange body gradient overlay + ribs + stem/leaf
- isMini bots never wear outfits

Wardrobe view:
- Right-click bot head → expands to .wardrobe; right-click again closes
- 30pt pill grid with static Canvas accessory icons, scroll + bottom fade
- Hover previews outfit on live Mochi; click selects + saves + pop sound
- Escape or house tab closes; header shows current/seasonal selection

Tests: 52 cases (seasonal boundaries, Easter 2026/2027/2028, rawValue
stability, unknown UserDefaults value → .auto)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* redesign: complete wardrobe visual overhaul

Visual iteration loop via new render script (scripts/render-outfits.sh +
scripts/RenderOutfits.swift): produces /tmp/coucou-outfits.png showing
all outfits at 5 angles (yaw ±0.45, front, pitch −0.45, compact).

Catalog: remove topHat, cap, strawHat, heartsHeadband (4 outfits dropped,
13 remain). Feb 13–15 seasonal now returns .none.

MochiOutfitDrawing.swift — full rewrite:
- mochiEyePositions() shared helper: glasses anchored to exact eye positions
- Hat mount system: hatBrimY/hatXS/hatBrimW helpers + split-brim technique
  (back brim drawn behind body, front brim + crown drawn in front)
- Party hat: pink bezier cone, white dots, round pompom (not star)
- Beanie: blue gradient, ribbed cuff, white pompom springing with sy
- Crown: gold base band, 3 rounded arch points (taller ptH=R*0.56), 3 pearls
- Witch hat: purple droopy bezier cone, orange ribbon, gold buckle, wide brim
- Santa hat: red droopy cone, puffy white ellipse band, white pompom
- Sunglasses: 2.3× eye width dark lenses on actual eye positions, bridge
- Round glasses: brown #92400E circular frames on actual eye positions
- Scarf: thinner (ry*0.22), lower (ry*0.55), red + two white stripes + fringe
- Pumpkin: 4 soft ribs + curved green stem + leaf; guard changed to !isMini
- Bow: bezier wings with highlights

BotEngine.swift:
- Pumpkin guard: bodyColor == nil → !isMini (works with integration pills)
- lerp: private → internal (shared with MochiOutfitDrawing)
- triggerEmote(.proud): add squash() for pop effect on wardrobe tap

BotCanvasView.swift:
- Remove .onChange(of: resolvedOutfit) block (was firing on hover/scroll
  not just explicit clicks)

AppState.swift:
- resolvedOutfit: per-day seasonal cache avoids recomputing Easter math
  on every frame

IslandViewContent.swift:
- .none icon: horizontal dash → circle with diagonal slash (⊘)
- Remove drawTopHatIcon, drawCapIcon, drawHeartsHeadbandIcon, drawStrawHatIcon
- Remove their cases from drawOutfitIcon()
- Remove outfitIconHeart (only used by removed functions)

tests/MochiWardrobeTests.swift:
- Feb 13–15 seasonal: heartsHeadband → none
- Remove topHat/cap/heartsHeadband/strawHat rawValue tests
- Add: removed rawValues ("topHat", "cap", "heartsHeadband", "strawHat")
  stored in UserDefaults → .auto (backwards compat)
- 57/57 tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: port outfit drawing to 3D reference implementation

Replace the hand-crafted outfit drawers with a faithful Swift port of
design/outfits/mochi-outfits.js — a Canvas 2D reference that reproduces
the exact same body geometry as BotEngine (same R/rx/ry, superellipse,
drawEyes formula).

Key concepts ported from the JS:
- MochiH struct: head geometry + physDx/physDy spring offsets
- EyeFrame / mEyeFrames(): shared eye-position helper (replaces
  mochiEyePositions), used by both BotEngine.drawEyes and glasses drawers
- 3D projection: mRingR, mRot3, mProj, mSurf — accessories follow the
  head with VIEW_TILT = -0.30 and ACC_PITCH = 0.4 (hats don't flip over)
- Arc helpers: mFrontArc, mCapClip, mFrontRun — front-visible arcs of
  spherical rings for realistic 3D wrapping
- mInvert + FillStyle(eoFill:true) — even-odd clip for beanie cuff etc.
- drawPompom: 11 overlapping radial-gradient bumps
- drawFuzzyBand: layered stroke with bump highlights (santa trim)

Outfit improvements:
- Beanie: knit meridian ribs, folded cuff via invert clip, physDx pompom
- Santa hat: bezier bag shape, fuzzy trim arc, physDx/physDy tip spring
- Party hat: 3D ring base, apex with physDx lean, polka dots, gold rim
- Crown: back half behind body, front half with coloured gems + gold tips
- Witch hat: witchBrimPts wobble + droop, physDx/physDy bent cone tip
- Sunglasses: temples to head edge, body-clipped lenses, glare stroke
- Round glasses: curved bridge, per-eye foreshortening, inner arc shine
- Scarf: frontArc-wrapped band, meridional stripes, physDx hanging knot
- Pumpkin: bodyColors ['#FFA94D','#E8590C'] replace the body gradient
  (not an overlay), 5 meridional ribs following proj
- Bow: 3D anchor at surf(0.86, 0.55, 1.02), rotates + scales with yaw

BotEngine.swift:
- physDx/physDy/physVx/physVy: damped spring (stiffness 60, damp 9)
  driven by yaw velocity and oy velocity; updated each frame
- drawBody: pumpkinColors param replaces the orange overlay approach
- drawEyes: refactored to call mEyeFrames(), keeping roll in eyePitch
- drawOutfitBehind/Front: build MochiH with physDx/physDy, call new sigs

IslandViewContent.swift:
- Wardrobe pill icons: each outfit shows a tiny Mochi wearing it
  (yaw=0, pitch=0, same render pipeline as live app, R=W*0.62*0.3)
- .auto: sparkles, .none: circle-slash — unchanged
- All individual draw*Icon functions removed (~200 lines deleted)

scripts/RenderOutfits.swift:
- Columns match sheet.html exactly: L(-0.5), front, R(0.5), up(p0.4),
  down(p-0.5), tilt(y0.3/p-0.25/t0.12) + small pill preview
- Outfit order matches reference: none, beanie, santaHat, partyHat,
  crown, witchHat, sunglasses, roundGlasses, scarf, pumpkin, bow
- Scale 0.62, W=190 (same as sheet.html), small=64

design/outfits/:
- mochi-outfits.js: JS Canvas 2D reference implementation
- mochi-outfits-reference.png: target planche (7 columns × 11 outfits)
- sheet.html: page that generates the reference planche

Both schemes build clean. All 9 test scripts pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: outfit integration bugs, physics spring, presence transitions, roll

§1a — pumpkin body color: skip integration pill bodyColor when pumpkinColors=true
§1b — remove R>14 size guards; add simplified mode (no ribs/dots/gems) for R<16
§1c — rewrite mFrontArc/mFrontRun: silhouette tangent split (min-x / max-x),
       pick the higher-z arc — eliminates left-edge jump on yaw
§1d — wardrobe pill icons: R=10, cy+0.62×R shift gives hat headroom
§2  — outfit only on main pill, compact/peek, or wardrobe view; hidden otherwise
§3  — physics impulses: slap (physVy−=1.2, dx±=0.7), squash (physVy+=0.6),
       greet (physVx+=0.2)
§4  — outfitPresence (0→1 Ease.back 350ms / 1→0 180ms) via BotEngine.setOutfit();
       outfit change: exit old then enter new; wardrobe preview: instant
§5  — add roll to MochiH; mProjRoll for roll-following accessories (scarf, glasses,
       bow, pumpkin); z-based rollFade replaces fixed threshold for those accessories;
       hats keep fixed 1.2rad threshold
§6  — auto pill icon: seasonal Mochi + AUTO badge (capsule, 60% black, 7pt semibold)
renderer: add roll planche (6 angles 0..5π/3) and transition planche (p=0..1)

Visually verified via rendered planches: outfits, roll, transition all look correct.
Both schemes build (NotchBuddy + CoucouAppStore). All tests pass (57/57).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: outfit transitions with movement, hat fly-off, roll front/behind switching, wardrobe hover header

§1 Transitions — movement, not just opacity
- outfitPresence tween uses Ease.inOut; Ease.back applied to position offsets in drawing code
- Hats / crown / bunnyEars: enter from (1-posP)×0.6ry above with (1-posP)×0.3rad rotation
- Glasses: slide down (1-p)×0.15ry on entry/exit
- Scarf: slide down (1-p)×0.2ry
- Bow: scale by p; pumpkin opacity only (body color driven by drawBody)
- squash() fired in entry tween completion for landing bounce

§2 Hat fly-off during doRoll
- rollTurns stored in BotEngine; squash() called at roll end
- Progress = roll / (2π × rollTurns); hat rises 0.9ry × sin(progress×π), self-rotates by H.roll, drifts physDx×0.4rx × sin(progress×π)
- Removed abs(roll)>1.2 threshold; crown and witch hat back parts fly in sync

§3 Roll-following accessories switch front/behind (no z-fade)
- Front pass: roll-following outfits (sunglasses, roundGlasses, bow, scarf, pumpkin, bunnyEars) skip when mProjRoll(H,(0,0,1)).z < 0
- Behind pass: draws them when anchorZ < 0 using same drawing functions
- bunnyEars: now uses mProjRoll for ear positions (ear width foreshortened from projected spread); included in roll-following set

§5 Wardrobe hover header
- hoveredOutfit takes priority over selection in headerRight
- Auto hover → "Auto · follows the seasons (now: <name>)"
- Any outfit hover → outfit displayName

Transition planche (p=0,0.3,0.6,1): hats enter from above with overshoot
bounce; scarf slides up into position; bunnyEars rise in; all invisible at p=0.
Roll planche (6 angles): hats spin above head and land; glasses/bow/scarf/pumpkin/bunnyEars
follow roll and flip between front/behind at anchor-z zero-crossing, no fade artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: hat roll is a flat 2D spin, bunnyEars flatten; drawLayer removes ghost overlap

Roll corrections:
- Hat fly-off (beanie, santaHat, partyHat, crown, witchHat): drawn with mProj at
  roll=0 (no 3D twist), then ctx-translated up (0.9ry × sin(πu)), rotated 2πu
  around the hat's own pivot (-1.4ry in body space), drifted physDx×0.3rx×sin(πu).
  Crown and witchHat back parts fly in sync with the same transform.
- bunnyEars: removed from roll-following set; always drawn behind body via
  drawBunnyEarsBack with mProj (not mProjRoll). During roll: height × (1 - 0.8×sin(πu)),
  outward tilt ±0.6×sin(πu) rad per ear; snap-back squash comes from doRoll completion.

Transition corrections:
- All accessories rendered inside ctx.drawLayer { } to prevent internal alpha
  bleed (overlapping shapes no longer show through each other or through the head).
- Opacity = min(1, p × 2.5): fully opaque by p = 0.4; movement carries the entry.
- Movement scaled up: hats/crown/ears → (1-posP)×1.0ry up + scale 0.85+0.15×posP;
  glasses → (1-p)×0.25ry down; scarf → (1-p)×0.3ry down.
- morphFade (mailbox morph) applied to layer so no ghost during that fade either.

Roll planche: hats above head, upright → spin flat → land; bunnyEars squash at roll=π.
Transition planche: no head visible through witchHat/santaHat at p=0.3; scarf slides up.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: hat roll — gentle swing instead of full spin, reduced rise to 0.45ry

- Rise: sin(πu) × 0.45ry (was 0.9ry) — hat stays within the Mochi canvas bounds
- Rotation: sin(2πu) × 0.35 rad flat swing — hat never goes upside-down
- Drift: physDx × 0.2rx (was 0.3rx)
- Same values applied to crown and witchHat back parts in behind dispatcher

Roll planche: all hats visible and upright across all 6 angles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: rigid-plane roll for outfit-wearing Mochi

When resolvedOutfit != .none and outfitPresence > 0.05, the entire
character (hands, outfit-behind, body, eyes, outfit-front) is drawn
inside a context rotated by `roll` around the body centre. The body
genuinely turns in screen space rather than producing an eye illusion.

- BotCanvasView: branch on rigid vs illusion roll; badge+particles
  (drawHandsAndExtras) remain outside the rotated context.
- BotEngine.drawOutfitBehind/Front: pass roll=0 to MochiH and the
  static dispatchers when outfit is present, so accessories sit fixed
  on the head and co-rotate with the body transform. Hat fly-off and
  bunnyEar flatten code auto-disables (triggered by H.roll, now 0).
- BotEngine.drawEyes: suppress roll addition to eyePitch when outfit
  is shown (no roll-through illusion needed; body rotates for real).
- BotEngine.bodyCenter(size:): new helper exposing cx/cy to callers.
- BotEngine.update: centrifugal physDx impulse proportional to roll
  angular velocity when Mochi wears an outfit (coefficient 0.18).
- Outfit .none kept on illusion path exactly as before.
- Roll planche: added .none row to verify illusion unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(SPEC): update wardrobe section and activity grid

Wardrobe:
- Add outfit visibility rule (only shown when focusId == mainPillId,
  island not expanded, or view == .wardrobe).
- Document transitions (presence, drawLayer, Ease.back, per-accessory
  offsets) and physics (physDx/physDy spring, squash impulse,
  centrifugal force during roll).
- Document rigid-roll mechanic (outfit present) vs illusion roll (none).
- Auto pill: badge "AUTO" + season name on hover.
- Stable IDs updated to current set; removed values migrate to auto.
- Remove Valentine's Day from season calendar.
- Add design/outfits/ and scripts/render-outfits.sh as visual reference.

Activity grid: correct cell size to 7 pt, spacing 1.5 pt, ~23 weeks
(calculated from available width).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-04 00:25:43 +02:00
Jean-Pierre b11a90d0b7 Adapt resting island to displays without a notch 2026-10-01 08:36:32 +02:00
Louis Raille af080da806 Coucou — first public release 2026-09-27 23:54:00 +02:00