Curve tab: number fields, snap, default cursor, scrubbable preview #248

Closed
opened 2026-09-27 16:45:38 +02:00 by meleki · 1 comment
Owner

Follow-up to #247, from using the curve tab.

  • Number fields for the selected point: t and v in the tab header, type a value or drag sideways on the field. Same rules as dragging: a point never overtakes its neighbours, handles stay clamped. One undo step per change. t is greyed out on the two end points.
  • Snap toggle in the header (the same magnet button as in Vector art): points and handles snap to a 0.05 grid in t and v.
  • Cursor: hovering a point or handle shows the normal arrow, not pointer. Applies to every vector tool (curve tab, Vector art, collider editing).
  • Preview off by default. Make the preview scrubbable:
    • a vertical time line through the curve point, with a knob under the t axis. Dragging it sideways sets t.
    • dragging the dot on the rail at the right up or down jumps to the first t where the curve has that value.
Follow-up to #247, from using the curve tab. - **Number fields for the selected point:** `t` and `v` in the tab header, type a value or drag sideways on the field. Same rules as dragging: a point never overtakes its neighbours, handles stay clamped. One undo step per change. `t` is greyed out on the two end points. - **Snap toggle** in the header (the same magnet button as in Vector art): points and handles snap to a 0.05 grid in `t` and `v`. - **Cursor:** hovering a point or handle shows the normal arrow, not `pointer`. Applies to every vector tool (curve tab, Vector art, collider editing). - **Preview off by default.** Make the preview scrubbable: - a vertical time line through the curve point, with a knob under the t axis. Dragging it sideways sets `t`. - dragging the dot on the rail at the right up or down jumps to the first `t` where the curve has that value.
Author
Owner

Done in a5ae214.

Behaviour

  • Number fields t and v in the curve tab header show the selected point. Typing or dragging on them follows the same rules as a mouse drag (no overtaking, clamped handles), one undo step each. t is greyed out on the end points.
  • Magnet button (same as Vector art): points and handles snap to a 0.05 grid in t and v, when placing on free space and when dragging.
  • Cursor: points and handles show the default arrow in the curve tab and in Vector art. The pixel art palette dropped pointer too. Collider corners never used it.
  • Preview starts off. A vertical time line with a knob under the t axis sets t when dragged sideways. Dragging the dot on the rail jumps to the first t where the curve reaches that value (or the closest one if it never does). The preview does not advance while dragging.

Tests

  • ./check.sh: 180 files, 2616 tests, CHECK EXIT 0
  • GM_STEPS=1,47,53: ALL PASSED, 87 checks
  • 4 new unit tests in curve-view.test.ts, 4 new e2e checks in module 53 (53h to 53k) and 1 in module 47, all with real mouse and keyboard.
  • Counter-probes bite: without "first t" 1 unit test fails. With pointer, no snap, no field commit, no scrub handles or preview on by default, 5 browser checks fail. pointer in Vector art fails the new 47 check.
  • Not covered by a check: the cursor change on the pixel art palette.

Wiki: Curves describes the fields, the magnet and the preview. Check total in README and Development is 1477 (calculated, not counted).

Done in a5ae214. **Behaviour** - Number fields `t` and `v` in the curve tab header show the selected point. Typing or dragging on them follows the same rules as a mouse drag (no overtaking, clamped handles), one undo step each. `t` is greyed out on the end points. - Magnet button (same as Vector art): points and handles snap to a 0.05 grid in `t` and `v`, when placing on free space and when dragging. - Cursor: points and handles show the default arrow in the curve tab and in Vector art. The pixel art palette dropped `pointer` too. Collider corners never used it. - Preview starts off. A vertical time line with a knob under the t axis sets `t` when dragged sideways. Dragging the dot on the rail jumps to the first `t` where the curve reaches that value (or the closest one if it never does). The preview does not advance while dragging. **Tests** - `./check.sh`: 180 files, 2616 tests, `CHECK EXIT 0` - `GM_STEPS=1,47,53`: ALL PASSED, 87 checks - 4 new unit tests in `curve-view.test.ts`, 4 new e2e checks in module 53 (53h to 53k) and 1 in module 47, all with real mouse and keyboard. - Counter-probes bite: without "first t" 1 unit test fails. With `pointer`, no snap, no field commit, no scrub handles or preview on by default, 5 browser checks fail. `pointer` in Vector art fails the new 47 check. - Not covered by a check: the cursor change on the pixel art palette. **Wiki:** [Curves](https://git.nockal.com/meleki/game-maker/wiki/Curves) describes the fields, the magnet and the preview. Check total in README and *Development* is 1477 (calculated, not counted).
admin added this to the Development project 2026-09-27 22:17:06 +02:00
admin moved this to Done in Development on 2026-09-27 22:17:35 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: meleki/feuerwerk#248