Skip to Content
Starlight

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, effects and 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.
PropMeaning
ofRequired. A comp name, or an asset path (it has a file ending). A name that is neither is an error.
countThe number of copies: a whole number, 0 or more (default 0). A grid ignores it.
gapThe distance between copies, in px (default 0)
directionx (default) · y · grid · radial
rows / cols / gapYA 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).
radiusThe ring radius in px (radial), 0 or more. Copies spread evenly, clockwise. The first one is at the top.
driftThe 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.
staggerA 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, rotate and opacity. 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.

  1. Set count and gap so that count × gap is at least as wide as the surface. The belt wraps around inside that width.
  2. Set drift so that drift × loop is 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 × loop must be a multiple of 360 / count.
  • A belt with both stagger and a clock gives each copy its own timing. Then make drift × loop a 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.

  1. Open the command palette (/, or ⌘/ / Ctrl+/) and choose clone.
  2. Starlight adds a clone of the first image in your assets: 8 copies, a gap of 160, along x. It selects the new clone.
  3. Edit it in the clone section of Properties.
  • of shows the source. You cannot change it there: change of in YAML, or ask Claude.
  • count and gap share one row. direction offers x, y, grid and radial (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 pick radial, 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.

On this page