Trying the tab turned up six things to fix. Items of a track could
not overlap, so a drag stalled as soon as the pointer reached another
item. An item's ends gave no hint they could be dragged, a trimmed
video showed nowhere, clip names were hard to read and vanished when
picked, and the track menu did not match the song tab.
- Items of a track may overlap and nothing is cut or pushed aside.
The later one lies in front, in the picture and on the timeline.
The overlap is shaded and a line marks the covered end.
- Edges win over bodies when hit, so the covered end of the lower
item can still be dragged. Hovering an edge lights it up and shows
the ew-resize cursor, as in the song tab.
- A clip in the overlap plays on both items. Clips themselves still
do not overlap; a moved clip now runs up to its neighbour instead
of stopping short.
- Fit to media and a new video no longer cap the length at the next
item, which only made sense while overlaps were forbidden.
- The left edge can be trimmed past the start of the video. The
offset goes negative and the sprite shows the first picture until
the video begins.
- Video marks: a corner triangle where the item cuts into its video,
a line with a triangle like the song loop where the video starts or
ends inside the item. Edges snap to the video's ends within 6 px.
- Clip names sit in their own layer above the bars, in text colour.
- The track menu matches the song tab: add above or below, move up or
down, delete. It opens on the head and on an empty spot of the
track. The Remove track button left the inspector.
Tests:
- Unit composition and composition-edit: 67 green, several new or
rewritten. Bending three spots in the rules turned their tests red.
- e2e 69: ALL PASSED, 12 checks. 69b and 69c now drop the second item
over the first and drag the covered end past it. Without edges
winning the hit, 69c fails with hover: null.
- Gate on melektaus-atx: CHECK EXIT 0, 302 files, 4672 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two sprites with videos back to back left a blank frame at the cut.
The video player only came into being once the item began, and a
sprite is not drawn until its video has a first frame. So the second
item was missing until its video had loaded.
- compositionAhead lists the items that begin within the next second.
Near the end of a looping composition it also lists the items at
its start.
- An item that is alive already is not loaded ahead. Two times would
otherwise pull at the same player.
- The frame carries these videos hidden and paused on their first
picture at the item's offset. Their players get the id the item
will have, so the cut reuses them instead of opening a second one.
- This works the same in the tab's preview and in the game.
- One second of lead (AHEAD_SECONDS) is an assumption. It can go up
if large videos still flash.
Tests:
- Unit composition: 27 green, 2 new. Unit composition-play: 14
green, 1 new for the path in the game.
- e2e 69: ALL PASSED, 12 checks. The new 69h puts two video items
back to back and checks the second player is open and paused at
its offset before the cut, and drawn in the same redraw as the
cut.
- Without loading ahead in the preview 69h fails with cut: null.
Bending two spots in the model turned their unit tests red.
- Gate on melektaus-atx: CHECK EXIT 0, 302 files, 4665 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A composition is a timeline of scene objects for cuts and cutscenes.
This first step brings the model and the pure evaluation behind it.
The tab and placing it in a scene follow in the next steps.
- CompositionAsset holds objects, tracks, items and clips. Each item
owns exactly one object with overrides and container edits.
- The composition is a third object holder next to scene and
container. Delete cascade, undo, usages and references work with it.
- Duplicating gives the copy new object ids and moves the item ids
along with them.
- compositionAt() tells which items live at a frame. The top track is
drawn in front.
- A clip acts on the item of its own track that it overlaps. After its
end it holds the last value until the item ends. The animation's
play mode is ignored, a clip is one pass.
- Clip targets are found by template path, else by name path, like
the runtime's animation system.
- The root sprite of an item plays its video driven at offset plus
time. Children follow unless they are already driven by hand.
- fittedLength() gives the video or clip length minus the offset, or
3 s without media.
- fps (60) and loop live in their own properties file. Keeping them in
PropertySchema would close an import cycle.
- The type is listed under Visuals with its own icon. It is not
placeable yet.
Tests: the gate passed with 300 files and 4625 tests. That is 25 new
tests in tests/core/composition.test.ts and 2 icon checks that run
for every icon. Four counter-checks (track order, overlap rule, child
videos, ids on duplicate) each turned exactly their test red. e2e 04
passed with 67 checks and now counts 33 asset types.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>