The composition tab only took single clicks and Ctrl-clicks, and
animation clips could not be copied at all. A band selection and
Copy/Paste for clips make longer compositions quicker to arrange.
- Dragging from an empty spot draws a band. It selects every item it
touches, across tracks. Ctrl adds to the selection, because Shift
plus drag already pans the view.
- With Alt held the band selects clips instead and may start on an
item, since items fill most of a track.
- Ctrl+C copies the selected clips as their own clipboard kind.
Ctrl+V places them like items: under the pointer over the tracks,
otherwise at the playhead on the selected track.
- Clips of a track never overlap. A paste onto taken frames moves the
whole copy on frame by frame until every clip fits (`pastedClips`).
- The paste is one undo step and selects the new clips.
Tests:
- Gate on melektaus-atx: tsc, eslint, Prettier clean,
305 files, 4724 tests (2 new).
- e2e 69: ALL PASSED, 17 checks (69m new). Band over three items on
two tracks, Alt band from an item picks both clips, first paste at
frames 50 and 60, second paste moves on to 56 and 66.
- Counter-check: without moving on, the paste unit test is red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A track item has always carried an object, and an object needs an
asset. Instead of objects without one, a dropped picture or video gets
a sprite the composition owns, the way a song owns its sounds (#355).
To the rest of the code it is a sprite like any other.
- The asset list starts a drag for textures, vector art, pixel art and
videos. Dropped on a track, they make the sprite and the item in one
undo step. A video item is as long as the video and follows it.
- One sprite per picture and composition. A second drop of the same
video shares it. Once no item wears it, it goes in the same step.
- Deleting a composition takes its sprites along. A duplicate gets
sprites of its own.
- Pasting into a scene or container turns the sprite into a project
asset. Pasting into another composition gives that one a copy. The
clipboard carries the sprite, so cut and paste loses nothing.
- Owned sprites stay out of the asset list and the pickers. The
inspector shows them with a dot in front.
- "Make project asset" in the item's menu, on the timeline and in the
hierarchy, turns the sprite into an ordinary one.
- The first track of the Composition tab gets its top line, as the
Song tab's has.
Found on the way: loading kept an owner only for the asset types a
song can hold. A composition's sprite would have lost its owner and
turned up in the list after a reload.
Tests:
- Unit composition-sprites: 11 new. Without the rule 5 of them are
red, without the loading fix the loading test is.
- e2e 69 on melektaus-atx: ALL PASSED, 15 checks, 69k new
- Gate on melektaus-atx: 305 files, 4714 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A composition lost the first frames of a video item. Its clock ran
while the player was still loading, in the tab and in the game. The
game only waited for videos once, when it started. A composition that
a behavior starts later spawned its items after that wait.
- The view now records which video sprites it left out for lack of a
first picture, one entry per object.
- The composition tab holds its playhead while the preview misses a
video, for at most VIDEO_WAIT_MS (3 s) like the game.
- CompositionSystem holds a composition's clock while one of its live
items misses its video. The rest of the game keeps running.
- The editor play and the published game pass their view to the run
as RunServices.pictures.
- VIDEO_WAIT_MS moves to core/model/video.ts, because the runtime
does not import from viewport/.
- Videos loaded ahead for coming items do not hold the clock.
Items can now be copied and pasted inside the composition tab.
- Ctrl+C keeps the timing of the copied items next to the objects.
- Ctrl+V pastes objects and items in one undo step. The earliest item
lands at the frame under the pointer, on the track there.
- Without the pointer over the tracks it lands at the playhead, on the
selected track or on the top track of the selected items.
- Several items keep their distances and tracks to each other.
- The same copy pastes into a scene as plain objects. Objects copied
from a scene do not paste into a composition, they have no timing.
Tests:
- Unit composition-edit, clipboard, composition-play: 3 new for
pasting, 1 new for the clock waiting in the game
- e2e 69i (play from the end waits for the video), 69j (paste under
the pointer and at the playhead), 68d (a composition started from
On start waits for its video)
- each new check is red without its fix
- README: 2036 editor checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paste mixed two frames. The pointer comes from the Scene View, which
draws every object moved by the editor offsets of it and its parents.
Paste turned that point into a local position through the parents'
plain world transform, so the copy landed beside the pointer by the
offset of the parent it went into. Without a pointer, an original with
an offset of its own had its copy placed beside its game position,
which the view does not show.
- A copied root now remembers where the view showed it
(`ClipRoot.shown`, from `editorTransform`) instead of its world
position.
- New `editorLocalPositionFor` in `properties/transform.ts` turns a
shown point into a local position through the parent chain with the
editor offsets, as the view draws it. Paste uses it.
- The copy itself still gets no editor offset of its own, as since
#240. In the game it stands where it was drawn, minus the offsets of
its parents.
- Re-parenting under a parent with an offset still keeps the game
position, so the object jumps in the view by that offset. That is a
different rule from paste and is left as it is.
Tests:
- Unit (clipboard, groups, references, transform): 50 passed, 2 new.
- e2e 51 on melektaus-atx: ALL PASSED, 12 checks, 1 new (51f).
- Gate on melektaus-atx: 195 files, 2829 tests, CHECK EXIT 0.
- Counter-checks: without the paste fix both new unit tests fail
(copy at 540/470 instead of 500/500) and 51f fails by exactly the
60/-40 offset. With the root remembering its world position again,
the own-offset unit test fails.
- No full run. The e2e total of 1591 is 1590 plus 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy and paste only existed for animation keys. Building a scene or a
graph meant placing every object and node again by hand, even when the
same arrangement was needed twice.
- Ctrl+C copies the selected objects with their whole subtree, or the
selected nodes with their links, groups and comments. Ctrl+V pastes
into the scene, container or graph of the visible tab.
- The copy is a snapshot in the editor's own clipboard, in memory. It
holds asset ids, so the system clipboard is not used. It is cleared
when another project opens.
- A paste lands under the mouse pointer when it is over the view, and
keeps its arrangement. Otherwise it lands one grid step beside the
original. Each further copy that still exists moves one step on, so
an undone copy does not count.
- Objects get new ids for the whole subtree. They paste into the one
selected object and keep their look under the new parent. If that
object is the original or an earlier copy, the paste lands beside it
instead of nesting deeper with every Ctrl+V.
- A placed container stays a container. Content copied out of a
container pastes as plain objects. Pasting a container into its own
template is refused.
- Nodes paste only where the palette would offer them. A second Start
or End, a State in a behavior or a behavior calling itself is left
out, and a notice names what was dropped.
- Menus: Copy and Paste in the object menu, a new Paste menu on empty
scene space, Copy in the node and box menus, Paste in the palette.
- Ctrl+V still imports a picture from the system clipboard when the
copy does not fit the tab. While objects are copied, the scene and
container tabs use Ctrl+V for them, as the timeline does for keys.
Not checked in the browser: paste in the container tab, in state
machine, shader and particle graphs, and from the hierarchy menu. The
shared code path covers them.
Tests:
- ./check.sh: 175 files, 2531 tests, CHECK EXIT 0
- e2e 51 (new): ALL PASSED, 11 checks with real keys and clicks
- 13 unit tests in tests/editor/clipboard.test.ts, one of them pins
the grid step after undo found during e2e
- 7 counter-checks all fail as expected (6 unit, 1 in the browser)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>