Scene view symbols as SVG files: icons paragraph in Scene editing, symbolIcons in Architecture, check sum 1093 (#175)
1 parent
c436bfc7b8
commit
ff4b219bd3
3 files changed
+13
-1
No files matched your search
@@ -92,6 +92,7 @@ src/runtime/physics/ engine (loads Rapier once, reports its state, converts be
|
||||
what the physics nodes reach through `NodeContext.physics`)
|
||||
src/ui/ widget toolkit (generic, knows nothing about assets)
|
||||
src/viewport/ view (transforms), items (what to draw), symbols (how to draw it),
|
||||
symbolIcons (the SVG files in icons/, parsed once, in the theme's colours, #175),
|
||||
FileLibrary (load once, never retry a failure, tell the listeners) ← TextureLibrary, FontLibrary;
|
||||
SoundLibrary, ShaderLibrary, ParticleLibrary,
|
||||
particles (one ParticleContainer per source), tilemap (one container per layer),
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ npm run check # typecheck + lint + format:check + tests, the gate CI runs
|
||||
# code is lost (tail's is reported), so a red run reads as green
|
||||
npm run build # writes dist/ and regenerates index.html
|
||||
./build.sh # the same under `set -o pipefail`, for callers that pipe the output
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1092 editor checks, screenshots in /tmp/gm-e2e-*.png
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 1093 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
|
||||
|
||||
+11
@@ -16,6 +16,17 @@ constant size on screen however far you zoom, and both kinds of them — the obj
|
||||
Scene tab and the frame names of the Texture tab — read that size from one token
|
||||
(`Theme.viewportLabelSize`); the two `viewportLabel` styles differ in colour only.
|
||||
|
||||
**The symbol icons are SVG files** (#175): behavior, container, rigidbody, camera and particle
|
||||
source each have one in `src/viewport/icons/`, bundled with the editor and parsed once. A file
|
||||
draws in the symbol's own units with the origin at its centre (the `viewBox` is centred on it, so
|
||||
the file looks the same in any SVG viewer), and `currentColor` stands for the colour the theme
|
||||
gives that symbol. To change an icon, edit its file and build. Pixi's SVG parser is not a browser,
|
||||
so the files keep to what both draw alike, and `tests/viewport/symbol-icons.test.ts` holds them to
|
||||
it: only `path`, `circle`, `rect`, `ellipse` and `line` (Pixi reads `polygon` points as whole
|
||||
numbers), no `transform` (ignored), every shape states its `fill` (a browser fills a shape without
|
||||
one black, Pixi does not), colours as `#rrggbb`, `none` or `currentColor`. What stays code is what
|
||||
depends on the object: the camera's frame and a collider's outline.
|
||||
|
||||
**Z-order is part of the position.** `position.z` is the draw order of a scene object: higher
|
||||
`z` is drawn on top; objects with equal `z` keep their hierarchy (tree) order. It is edited in the
|
||||
inspector next to X/Y, undoable like any move, and applies in edit and play mode alike. The layers
|
||||
|
||||
Reference in new issue
Block a user