The scene view drew its symbols from its own SVGs, each in a type
colour and some on a plate. They looked heavier than the panel icons
and were hard to read on busy ground. Symbols of different objects
also sat on top of each other whenever their positions met.
- Every symbol is now the panel icon of its kind, one file for both
places. The scene-only SVGs in src/viewport/icons are gone.
- Symbols are white in a thin dark outline with no plate behind them.
haloSvg widens each shape of the file by its own stroke and draws
that silhouette dark under the icon, so no second file is needed.
- A butt stroke end would leave its end without outline. The halo caps
such strokes square, and the rigidbody arrow shaft is now a filled
rect so its top edge is outlined exactly.
- Symbols are 18 world units across, stay upright and are clickable.
A click selects the object, a drag moves it.
- symbolLayout places every symbol on its object's position. Symbols
that overlap stand on a ring round the middle of their positions,
evenly spaced one icon apart. A ring that reaches into another
symbol takes it in until nothing overlaps. Ownership plays no part.
- Names sit beside their symbol, on the outside of a ring. Selection
frames and parent links follow the symbol.
- A collider icon no longer shows trigger or invalid state. The
outline colour of the shape still does.
- A lone collider sits on its sprite's middle again. A press there on
an unselected sprite drags the collider, so e2e 02 and 16 now grab
the sprite beside its middle. Hook __gm.container.objectRect helps
16 find that spot.
Tests:
- check.sh: 2245 tests, CHECK EXIT 0 (+8 for layout and halo)
- e2e 1-16,31,39-43: 670 PASS, 2 FAIL. Both were sampling too
strictly for the thinner, smaller icons. 5c looked for the exact
outline colour, which the thin outline only reaches blended at this
zoom. 31n started the ring scan one pixel past the smaller ring.
Both are fixed, and e2e 5,31 then passed with 48 checks.
- 5c checks white with an outline and none of the old colours, 41b
checks the ring positions and that a click on a symbol selects its
object, 31n checks the now white particle ring.
- Counter-checks: without the halo only 5c fails, also with the looser
outline match. Without the layout the ring and click checks in 41b
fail. Originals restored by cmp.
- The e2e check total stays 1351.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A middle-mouse pan used to run the full redraw on every frame. It
collected every object from the project, cleared and redrew every
shape, re-sorted all children and made Pixi re-upload every buffer,
although only the camera had moved. The user saw the frame rate drop
while panning.
- WorldViewport gets moveCamera(). When zoom and view size are
unchanged it only moves the world and redraws the overlays drawn in
screen pixels. collectFrame, the shape redraw and the re-sort drop
out of a pan frame.
- Every full redraw remembers the box each object is culled by. A pan
that moves an object across the edge of the view still takes the
full redraw, so objects appear and vanish as before.
- Grid, selection outlines, rays and the container origin mark move
into a shared drawOnScreen hook. It runs after every full redraw and
after every pan. The parent links stay in afterItems because they
are drawn in world units.
- Wheel zoom keeps the full redraw, because line widths follow the
zoom. A cache for collectFrame was left out: it would save about
1 ms and risk stale data.
- debugInfo() reports redraws and cameraMoves, and __gm gets a hook
that forces a full redraw, so a check can compare against it.
Findings:
- Chrome already coalesces mouse moves to one per frame (500 moves
gave 183 redraws in 189 frames). A throttle was tried and removed
again, because its counter-check did not fail.
- A check in module 03 compared the whole gameInfo() object and broke
on the new counters. It now compares camera, objects and rendering.
- The stall without ?vsync most likely comes from the desynchronized
context in src/main.ts. It cannot be reproduced headless.
Tests:
- Measured on Jump and Run, main-thread time per frame, 3 runs of 240
moves: pan 5.7-7.4 ms before, 3.8-4.8 ms after. Plain mouse moves
stay at 2.1-2.4 ms. 208 of 240 moves took the fast path.
- ./check.sh: 141 files, 2080 tests, exit 0.
- GM_STEPS=1-16,29,42,43: 535 checks, 1 failed (the module 03 test
above). After the fix GM_STEPS=1-5: all passed, 130 checks.
- 3 new e2e checks in 5d: 12 pan steps give 12 camera moves and 0
full redraws, pixel rows after the pan match a fresh redraw, a box
panned out of view and back is drawn again.
- Counter-checks: overlays not redrawn on pan gives "3 of 3 rows
differ". Edge test disabled keeps the box visible with 0 redraws.
- Check total 1285 (1282 confirmed by CI task 229, plus 3).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The suite spent 88% of its step time asleep: 564 s of steps, 496 s of
them in sleep(n) - fixed spans estimated by hand and then copied from
step to step. That is why it was slow, and why it flickered.
The signal is afterFrames(count, timeout) in ui/render.ts, exposed as
__gm.afterFrames(). It wakes the loop itself, because an editor that
draws nothing would never redeem a promise of a frame, and it gives up
after a timeout instead of hanging the run. settle() in the harness
waits two drawn frames (~32 ms) instead of 150-300 ms and falls back to
sleep(150) when the hook is missing (an old build): silently not
waiting would make every later check a coin toss.
Every action goes through it now - click, doubleClick, wheel, drag,
dragAsset, press, typeText, select, mutate, undo, redo - and with that
about 550 sleep() calls behind those actions became redundant, helpers
that are nothing but a mutate in a coat included. What a frame cannot
answer got its own condition instead: waitUntil(expr), play()/stop()
waiting on __gm.state.mode rather than on 300 ms, saved() for the
autosave (the two hand-written polling loops sampled at 300 ms for
something that arrives after a second), and showTab() as a real tool -
47 places called evaluate("__gm.showTab(...)") raw, and 24 of them
waited for nothing at all and read the old panel.
564 s -> 243 s of step time, the waiting share 88% -> 76%. Three kinds
of wait were kept, and each one bit when it was taken away: loading
bytes (textures, fonts), game time that a repaint cannot stand in for
(time scale, shader and particle clocks, the live values a running
graph carries), and the inertia the scroll step measures on purpose.
Two things the new speed uncovered, both real: 25-animation read the
frame menu unfiltered and had frozen an incomplete list (the CI failure
on c990dbc), and 33-render-on-change measured idleness while the
autosave of the step before was still painting - it waits for
saveStatus to leave dirty/saving now, so it measures that nothing
happens any more instead of that it waited long enough.
- `.gitignore` said `index.html` unanchored, which also caught the Vite source page;
a fresh clone could neither `dev` nor `build`. Anchored to `/index.html`, page added.
- Removed GM_REMOTE (tools/remote/gm-browser.ps1 and the ssh/scp branch in browser.mjs):
the Windows test machine is gone and the only flaky check that lived on it is closed (#37).
- Removed `npm run preview`, undocumented and unused.
- Comments: wrong number in collider.test.ts (250 → 200), the "declarations used to…"
history in listItems.ts and friends, the 24 px/28 contradiction, section banners in
nodes/index.ts, node-catalog.test.ts and api/index.php, name paraphrases, and the stale
step numbers in tools/e2e/11-…23- from the old global count.
- README: asset types include `animation`, kind order Number/Text/Boolean, tagged colour
and texture items, 6/5 kinds, the `Texture` node, `./build.sh`, PROJECT_FORMAT_VERSION,
and the file tree (kinds.ts, listItems.ts, propertyPorts.ts, Breadcrumb.ts, beads.ts,
tools/assets/).
- tests/helpers.ts takes the duplicated `findObject` and `sceneWithCamera`.
Proof: ./check.sh 797 tests, full e2e ALL PASSED 633 checks against this bundle.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Container tab reuses SceneViewport against any object holder, so a
container template is edited exactly like a scene. Right-click no longer
changes the selection, which previously made nesting impossible: opening
the menu on a container loaded it, and "Place in container" then targeted
itself.
Template edits (move, rename, override) now reach already-placed instances
per slot, through a shared templateSync used by both the apply path and the
plain object commands. Copies the user has touched keep their own value.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Tooling:
- Prettier as the single formatting authority (110 columns, single quotes,
measured against the existing style); Markdown excluded because table-cell
padding turns the README glossary into 1000-character lines.
- Type-aware ESLint ending in eslint-config-prettier, so a rule always means
"this is a bug", never "this looks different".
- .editorconfig and an `npm run check` that runs typecheck, lint, format and
tests in one go.
Findings fixed on the first run: three more duplicate imports, four
String(unknown) calls (parameter types narrowed instead of casts), two dead
initialisers, two redundant casts, a console.log for a real error. Two
warnings were false here and are disabled with a reason in place.
Tests 132 -> 269:
- node-catalog.test.ts covers every node with a run(), with a guard that fails
when a new node has no row.
- behavior-events.test.ts covers the ten event nodes through a running World,
checking timing rather than existence.
- Input's state machine (press/release/releaseAll) is reachable without DOM
events now; the DOM handlers are thin adapters.
Compare fell back to == without a configured operator although the schema
default is <; aligned.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>