Compositions: sprites of its own for dropped pictures (#419)
- New section "Sprites of its own": what a drop onto a track makes, sharing, deleting, duplicating, pasting and "Make project asset". - Development: 2048 checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent
7c6c53f13e
commit
906087882c
2 files changed
+29
-3
No files matched your search
+28
-2
@@ -22,6 +22,27 @@ What is stored (`CompositionAsset` in `src/core/model/Asset.ts`): `tracks` (id,
|
||||
`fitMedia`) and `clips` (id, track, animation, start in frames). An item whose object is gone stays
|
||||
in the list, so an undo finds it again, and plays as nothing.
|
||||
|
||||
### Sprites of its own
|
||||
|
||||
A picture or a video dragged straight onto a track (#419) needs a sprite to wear it, and a
|
||||
composition keeps that sprite to itself, the way a song keeps its takes (see
|
||||
[Songs](Songs)): a real sprite asset whose `owner` is the composition. Everything that finds an
|
||||
asset by its id finds it, but the asset panel and the pickers leave it out. The inspector names
|
||||
it with a dot in front, as the Song tab does with a song's own sounds.
|
||||
|
||||
- **One sprite per picture.** A second drop of the same video wears the same sprite. What one item
|
||||
should have differently goes on its object as an override.
|
||||
- **It goes with the last item wearing it**, in the same undo step. Deleting the composition takes
|
||||
its sprites along, duplicating it gives the copy sprites of its own.
|
||||
- **Pasted into a scene or a container**, the sprite turns into a project asset (named apart from
|
||||
the others), so deleting the composition cannot take the pasted object along. **Pasted into
|
||||
another composition**, that one gets a copy of its own. A cut keeps the sprite in the copy, so a
|
||||
paste after it wears it again.
|
||||
- ***Make project asset*** on the item turns the sprite into an ordinary sprite in the asset list.
|
||||
|
||||
This is held after every edit (`KeepCompositionSpritesCommand` in
|
||||
`src/core/commands/compositionSprites.ts`), so it is taken back and done again with it.
|
||||
|
||||
## The rules
|
||||
|
||||
What lives at a frame is one plain function, `compositionAt` (`src/core/model/composition.ts`),
|
||||
@@ -50,6 +71,10 @@ the clips as narrower bars above them. The header bar has **+ Track**, **Play**
|
||||
be placed in a scene can go, a composition excepted: one inside another is refused while it
|
||||
hovers. It lands at the frame under the pointer, over an item there too, and is 3 s long, or as
|
||||
long as the video the sprite wears.
|
||||
- **Dragging a texture, vector art, pixel art or a video onto a track** (#419) makes an item the
|
||||
same way, wearing a sprite the composition keeps for that picture (see *Sprites of its own*
|
||||
below). A video's item is as long as the video. A clip of a video is chosen afterwards, on the
|
||||
Texture row of the item's inspector.
|
||||
- **Dragging an animation onto a track** makes a clip at that frame, if it fits between the clips
|
||||
there.
|
||||
- **Dragging an item** moves it in time and from track to track, past and over other items; it
|
||||
@@ -66,7 +91,8 @@ the clips as narrower bars above them. The header bar has **+ Track**, **Play**
|
||||
video, one line per round. An overlap is darkened, and a line marks the end of the item below.
|
||||
- **Click** picks an item or a clip, `Ctrl`-click adds or removes one. A click on a track head picks
|
||||
the track, a click in the ruler moves the playhead there, and dragging in it scrubs.
|
||||
- **The right-click menu** on an item: *Fit to media*, *Remove item*. On a clip: *Open animation*,
|
||||
- **The right-click menu** on an item: *Fit to media*, *Make project asset* (only for an item
|
||||
wearing a sprite of the composition's own), *Remove item*. On a clip: *Open animation*,
|
||||
*Remove clip*. On a track head or an empty stretch of a track, as in the Song tab: *Add track
|
||||
above*, *Add track below*, *Move up*, *Move down*, *Delete track*.
|
||||
- **Copy and paste.** `Ctrl+C` on picked items keeps their objects and their timing, `Ctrl+V` in
|
||||
@@ -136,5 +162,5 @@ with the same row binding the `AnimationSystem` uses.
|
||||
## Not yet
|
||||
|
||||
- Sounds and songs as items on a track (#418).
|
||||
- Dropping a texture or a video asset straight onto a track (#419); for now a sprite wearing it.
|
||||
- Dragging a clip of a video straight out of the Video tab onto a track.
|
||||
- Copying clips, a composition inside a composition, and *Sort with parent* for a placement.
|
||||
+1
-1
@@ -21,7 +21,7 @@ php tests/php/releases.test.php # the release stor
|
||||
php tests/php/files.test.php # uploaded files in a folder per account (#344), the same way
|
||||
php tests/php/videos.test.php # the video store, its queue and the worker (#402), with the
|
||||
# real ffmpeg: the CI image and game-maker-video have it
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 2047 editor checks, screenshots in /tmp/gm-e2e-*.png
|
||||
node tools/seed-e2e.mjs && node tools/e2e.mjs # 2048 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
|
||||
|
||||
Reference in new issue
Block a user