Both settings lived in the browser's localStorage, so they did not
travel with the project and differed per machine. They now belong to
the project like the symbol scale. There is no migration, old projects
load with the defaults.
- New module src/core/model/playSettings.ts reads playFrom and
gameScale on load. Unknown or missing values fall back to the start
scene and 100%.
- src/editor/settings.ts is gone.
- Play starts in the project settings dialog is an undo step
(SetPlayFromCommand). It is only recorded on a real change.
- The game view scale is saved with the project but is no undo step,
so Ctrl+Z never undoes a zoom. A scale picked during play is written
to the stored project and survives Stop.
- Save states of persistent Variables assets (saves.ts) stay in the
browser on purpose. They are runtime data of the game, not settings.
Tests:
- 6 new unit tests in tests/editor/play-settings.test.ts: defaults,
save and load, broken JSON, undo of Play starts, scale without undo
step, scale picked during play survives Stop.
- e2e 03g checks the value in the project, nothing in localStorage and
no new undo step. 35f also checks project.playFrom. No new checks,
the sum stays at 1375.
- Counter checks: no write to the stored project in play, no read on
load, and an undo step for the scale each fail exactly their test.
- ./check.sh: 158 files, 2332 tests, CHECK EXIT 0
- e2e 1-17,28,30,35,38-40,46: ALL PASSED, 752 checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pixel art projects draw at very different sizes, so the fixed 18 px
icons of behaviors, containers and rigidbodies were too big in some
projects and too small in others. The size now lives in the project
settings and travels with the project.
- New field Symbol scale in the project settings dialog, below Play
starts. It takes 0.1 to 4 with two decimals and defaults to 1.
- The value is stored as project.symbolScale. Older projects load
with 1, and values out of range are clamped on load.
- Every change is its own undo step through a project command.
- The factor scales the icon size, the spacing of icons that share a
spot, the label offset and the selection frame of icon-only symbols.
- The footprints in bounds.ts that Fit uses stay as they were. The
hit area follows the icon, so clicks match what is drawn.
- uiHooks reports the icon size so e2e can measure it.
The e2e sum in the README is 1375. That is 1374 plus one new check,
and 1374 itself has not been confirmed by CI yet.
Tests:
- ./check.sh: 157 files, 2326 tests, CHECK EXIT 0 (before 2320).
- New tests/core/symbol-scale.test.ts with 5 tests (default, save
and load, clamping, undo, icon frame), one more in
project-settings.test.ts.
- e2e 46f: dialog opens with 1, 0.5 plus Apply gives a 9 px icon,
undo gives 18 again. Module 46: ALL PASSED, 13 checks.
- Counter checks: without loading the value the save and load test
fails. With the icon ignoring the factor exactly 46f fails. Both
originals restored per cmp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>