Skip to content

The shape browser: the ring read from one vantage - #139

Merged
reportbase merged 1 commit into
mainfrom
claude/keen-pasteur-irpfwz-browser
Nov 27, 2026
Merged

reportbase merged 1 commit into
mainfrom
claude/keen-pasteur-irpfwz-browser

Conversation

@reportbase

Copy link
Copy Markdown
Owner

Tom (27 Nov 2026): "update the shape browser to the new ring to."

What changed

The shape browser's carousel (layoutCarousel) now follows the same law as the button rings from #138:

  • State: currentAngle keeps its name (the hook reads it) but is now the focus in entries.
  • Position: entry e stands d = e − f from the focus, the nearer way round. It is laid at x = s/(1 + |s|) of the half-width, with s = d/H.
  • Size: each tile is scaled by the room it has, and stops being drawn below 0.15. Only those tiles get a pooled tile.
  • Gestures:
    • A drag keeps the tile under the finger (browseDrag).
    • The wheel moves the focus by its pixels over the pitch.
    • The throw's velocity is in entries a frame.
  • Row or ring: stripFits now tests the tiles' own widths side by side with 4 px gaps. While they fit they stand as a centred row and nothing turns.
  • Code removed: boma lays out nothing in the browser now. pixelsToAngle and carouselVirtualWidth are gone.

Tests

  • tests/editor.mjs, "the strip holds still while put away": now runs at 1200 px wide. Its 18 tiles fit across 1400 px, so at that width they lay as a row with nothing to pan.
  • node tests/editor.mjs (QUICK) passes, no uncaught errors.
  • Probed with 27 shapes:
    • At 1600 px, a ring with the tiles shrinking toward the ends.
    • A 96 px drag moves the focus by about one shape and wraps past the end, and the throw glides on.
    • 6 shapes are a centred row.
    • On a 390 px phone, 5 tiles show.
  • Other parts not run locally.

Generated by Claude Code

layoutCarousel keeps its pooled tiles, but its focus is in entries and the
tiles stand on the line chart x = s/(1 + |s|), smaller as their room
shrinks; a row whenever the tiles fit side by side. The editor check that
pans the strip runs at 1200 wide, where its 18 tiles are a ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014hCELqa1Wq59Y67k57PZCD
@reportbase
reportbase marked this pull request as ready for review November 27, 2026 02:59
@reportbase
reportbase merged commit 4177b8d into main Nov 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants