diff --git a/Development.md b/Development.md index 2843d52..56ae58f 100644 --- a/Development.md +++ b/Development.md @@ -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 [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 # 1357 editor checks, screenshots in /tmp/gm-e2e-*.png +node tools/seed-e2e.mjs && node tools/e2e.mjs # 1363 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 diff --git a/Scene-editing.md b/Scene-editing.md index a0e7116..5bd2f1f 100644 --- a/Scene-editing.md +++ b/Scene-editing.md @@ -59,6 +59,23 @@ the corners; dragging an object moves it in its parent's frame, so a child under by a quarter walks down the screen when dragged along its own x. `Move` and `Set position` work in the object's own axes as well. +**Size gizmo.** A selected sprite or collider gets handles on its outline (#223), turned with it: +- **Edges and corners** set Width and Height (a corner both). The opposite side stays where it was, + so the object's position moves by half the change. Sizes land on whole units, at least 1. + A handle reaches 7 pixels outwards but only half that into the object, so a small sprite can + still be grabbed and moved close to its edge. +- A **circle collider** has edge handles only: any edge sets the radius, and the circle stays round. + A polygon or frame collider has no size handles, its corners are edited on the outline itself. +- The **knob** on a stem above the top edge turns *or* scales the object. The first few pixels of + the drag decide which: pulled away from or towards the centre it scales, pulled sideways it + turns. That choice holds until the release, so one drag never does both. Shift snaps a turn to + 15°. The turn is the angle swept round the object's centre, so it can go on past a half circle. +- The values go into **this object's overrides**, like "Fit to sprite": a value equal to the + asset's own clears the override. One drag is one undo step. + +The rules are in `src/editor/sizeGizmo.ts`, the handles in +`src/editor/viewport/sizeGizmoEditor.ts`. + **Hierarchy (parenting).** Every scene object may have a parent in the same scene (`SceneObject.parentId`). Positions — including `z` — are **local to the parent**; the world position is the parent's transform applied to the local one, all the way up (`z` simply adds).