An inventory grid could not scroll, because nothing could cut a child
off at an edge. A game also had no way to hear the mouse wheel. Both
are needed for a scrolling list, a dialog text or a window with more
content than room.
- A new object type Clip area has width and height and turns, scales
and mirrors with its parent. The size gizmo drags width and height.
- Everything below a clip area, on every level, is drawn only inside
its rectangle, in the Scene view as in the game. Nested areas cut to
their intersection. The rule works on a convex polygon, so a turned
area cuts right as well.
- On click, Is hovered and On mouse wheel do not hit a cut-off part.
The Scene view does not pick it either.
- In the Scene view the area is a dashed frame that is grabbed only at
its edge, so a click inside lands on the content. The eye under
Shape hides the frame. In the game the area is invisible.
- While an object below an area or one of its parents is selected, the
Scene view shows the cut-off part at 30 % opacity and it can be
grabbed there. The rule lives in core/properties/clip.ts.
- The Properties node knows the type Clip area.
- The new event node On mouse wheel fires by the rule of On click. Its
delta counts in notches, positive is down, and a frame's turns
arrive as one value. It also gives x and y.
Limits:
- Only sprites and texts show the faded rest. Tilemaps and particles
are cut and can be grabbed when open, but are not shown faded.
- Masks by texture shape are out, as noted in the issue.
Tests:
- ./check.sh: 2773 tests, CHECK EXIT 0.
- Full e2e run (local): ALL PASSED, 1549 checks, measured.
- tests/core/clip-areas.test.ts: 12 tests for the cut rule, scene and
game, save and load, hits, the wheel with and without owner, the
notch conversion and the open rule.
- e2e 58, 5 checks with real mouse and wheel: the scene cuts (74 of 74
red inside, 0 outside), a click on the cut part picks nothing, the
selected rest is faded and grabbable, the game cuts, one notch
logs 1.
- e2e 04 and 46 count the object types and the eye rows. They now
include Clip area.
- Counter-checks: 6 in unit tests and 3 in the browser, all fail as
expected. The originals were restored and checked with cmp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scene view gets crowded once a scene holds many behaviors,
colliders and tilemaps. A new eye button in the topbar opens a list of
all placeable asset kinds, and each row has toggles for what the scene
view draws for that kind.
- The popup lists all 9 placeable kinds from Behavior to Tilemap, with
the columns Symbol, Name and Shape. It stays open while switching.
- Sprite, Text and Tilemap draw no symbol, so their symbol toggle is
greyed out. Their name toggle shows a new centred name tag, which is
off by default.
- Shape exists for Collider and Tilemap. A hidden collider outline is
neither drawn nor clickable. A hidden tilemap shape removes the
collision outlines and the paint tint, the tiles stay visible.
- A hidden symbol takes no slot in the ring and draws no dashed link to
its parent. A name that stays on moves to the centre of the object.
- The setting lives in the project as `sceneVisibility`, not in
localStorage. Older projects load with the defaults, which match the
view as it was.
- Switching has no undo step, like the game scale. It only changes the
view. A change made during Play survives Stop.
- The rules sit in `src/core/model/sceneVisibility.ts`, the popup in
`src/editor/panels/SceneVisibilityPopup.ts`. Four new SVG icons.
Not covered by a check: symbol off with name on for a kind with a
symbol, Text and Tilemap with names, and the paint tint with shape off.
Tests:
- ./check.sh: 173 files, 2515 tests, CHECK EXIT 0
- e2e 46: ALL PASSED, 17 checks. 46g clicks the popup, lays a small
tilemap over the crate and removes it again.
- e2e 8 alone on a fresh seed: ALL PASSED, 23 checks. A red check in
the partial run 2,8,46 came from the module selection.
- 8 new unit tests in tests/editor/scene-visibility.test.ts.
- 4 counter-probes, each fails its test: load ignores the saved value,
Play skips the saved model, scene view ignores collider shape, scene
view ignores tilemap shape.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>