Describe the two drawing layers of the texture tab (#220)
Architecture explains the sheet and overlay layers, the pan without rebuild and the measured times. Development has the new check total 1336.
1 parent
3af598d40e
commit
87573181f0
2 files changed
+13
-1
No files matched your search
+12
@@ -287,6 +287,18 @@ last pointer move a few milliseconds later to update hover, with the same native
|
||||
each one ran a full preview. Inspector scrubbing and the gradient bar's colour stops still preview
|
||||
on every move.
|
||||
|
||||
The Texture tab draws its frames in two layers (#220). `sheet` holds every frame but the selected
|
||||
one with its outlines, `overlay` the selected frame, its handles and a frame being spanned. Both
|
||||
are drawn without the pan, in a container that sits at the pan. A pan only moves that container,
|
||||
and only the names (which stay on frames in view) are placed anew. `sheet` is rebuilt only when
|
||||
the zoom, the selection or one of its frames changes. A frame's outline list stands for its
|
||||
corners, because the model replaces the list instead of editing it. Whether an outline is a
|
||||
polygon is remembered per list too; it used to be worked out on every redraw by cutting the
|
||||
outline into convex pieces. With 1728 frames of one outline each (768 x 576 px, 16 px grid), per
|
||||
pointer move on the main thread: pan 77 → 5 ms, dragging a frame 52 → 10 ms, a wheel step
|
||||
52 → 31 ms, selecting another frame 68 → 41 ms. The last two rebuild `sheet` on purpose, once
|
||||
per step or click. `__gm.texture.drawInfo()` counts the rebuilds for the checks.
|
||||
|
||||
The toolbar's right edge shows the frame rate in edit and play mode alike; `__gm.fps()` exposes
|
||||
the same number to tests. It counts **drawn** frames over the time the renderer was **awake**:
|
||||
idle seconds are not slow seconds, so the readout answers "how smooth is it while it moves" and
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ npm run build # writes dist/ and regenerates index.html
|
||||
./build.sh # the same under `set -o pipefail`, for callers that pipe the output
|
||||
php tools/make-user.php <name> <password> [admin|user] # an account; every tool signs in (see Accounts)
|
||||
php tests/php/accounts.test.php # the API's account rules, no server needed (CI's gate job)
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1333 editor checks, screenshots in /tmp/gm-e2e-*.png
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1336 editor checks, screenshots in /tmp/gm-e2e-*.png
|
||||
GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step
|
||||
./e2e.sh start [GM_STEPS] # the same run detached, see below
|
||||
./e2e.sh status # live progress, or the last run's result
|
||||
|
||||
Reference in new issue
Block a user