Cloners & belts
A clone repeats one source many times and draws all the copies in one fast step. Use it for ribbons, logo belts and cascades.
Repeat a source
A clone repeats an asset or a comp (a named group of layers) in a row, a column, a grid or a ring.
- clone: { of: assets/logo.svg, count: 16, gap: 160, direction: x, drift: -120px/s } # seamless belt
- clone: { of: td-chip, count: 7, gap: 250, stagger: 80ms } # cascade of a comp
clock: { period: 2s, tracks: { scale: [0.9, 1.2, 0.9] } }
- The clone's settings go inside the
clone:map. - Its
clock,effectsand other common props go beside it, as on any layer. - A clone has no position of its own. To place it, put it inside a transform.
- Each copy is centred on its point. The first copy sits at the clone's origin.
| Prop | Meaning |
|---|---|
of | Required. A comp name, or an asset path (it has a file ending). A name that is neither is an error. |
count | The number of copies: a whole number, 0 or more (default 0). A grid ignores it. |
gap | The distance between copies, in px (default 0) |
direction | x (default) · y · grid · radial |
rows / cols / gapY | A grid (with direction: grid) makes rows × cols copies and ignores count. rows and cols are whole numbers. gap is the distance across, gapY the distance down (default: gap). |
radius | The ring radius in px (radial), 0 or more. Copies spread evenly, clockwise. The first one is at the top. |
drift | The belt speed (px/s): a scroll that never jumps, along the row or column. Write it as -120px/s or as a plain number. On a ring, it turns the ring in degrees per second (drift: 45 is 45° each second). A grid does not drift. |
stagger | A duration, for example 80ms. It starts each copy's clock a little later than the one before: a wave or cascade. Without a clock on the clone, it does nothing. |
Animate the copies. A clock on the clone animates every copy.
- It can move
x,y,scale,scaleX,scaleY,rotateandopacity. Skew does not work per copy. - Copy number i runs i × stagger behind the first copy.
- A comp source is drawn once per frame. Every copy shows that same frame of the comp. So put the cascade on the clone's clock, not on the comp's.
- To bring the letters of a text in one after another, use
letters:on the text, not a clone (Letters one after another).
Make a seamless belt
A belt is a row of copies that scrolls without a visible jump at the loop.
- Set
countandgapso thatcount × gapis at least as wide as the surface. The belt wraps around inside that width. - Set
driftso thatdrift × loopis a whole number of gaps.
- Example:
-120px/s × 4s = 480 = 3 × 160. With a gap of 160, this loops cleanly. - If it is off by one pixel, you see a slowly moving seam (a visible join) at the loop point.
- On a ring,
drift × loopmust be a multiple of360 / count. - A belt with both
staggerand a clock gives each copy its own timing. Then makedrift × loopa whole number of belt widths (count × gap). If not, the animation jumps at the loop point.
Make a clone in the app
Make a clone with the command palette, then set it in Properties.
- Open the command palette (/, or ⌘/ / Ctrl+/) and choose clone.
- Starlight adds a clone of the first image in your assets: 8 copies, a gap of 160, along
x. It selects the new clone. - Edit it in the clone section of Properties.
- of shows the source. You cannot change it there: change
ofin YAML, or ask Claude. - count and gap share one row. direction offers
x,y,gridandradial(a ring). - For a grid, rows × cols and gapY appear.
- drift px/s and stagger ms wait behind the section's N more until they are set.
- For a ring (
radial), a radius field appears, in px. When you pickradial, the radius is not set, so all the copies sit on top of each other. Type a radius to spread them round the ring. - On a ring, drift reads drift °/s: it turns the ring that many degrees each second.
Clocks & animation
All motion in Starlight runs on clocks. This is the YAML reference for clocks, keyframes, eases, cues, triggers, gates and audio drives. To animate with the mouse, see In the app .
Particles
A particles layer is a particle system: sparks, dust, snow, embers, confetti or stars. It makes many small sprites, each with its own path, and draws them all in one fast step.