Launchable Motion

Components / Visual

Token swarm

Use it to say "we found these": N tokens carrying any image pop out at an origin, burst to seeded targets around it while spinning on their vertical axis, then float and drift outward.

Install

With this registry set in hyperframes.json (see the docs):

npx hyperframes add token-swarm

Use it in a composition

It fills whatever box you give it, so set the host element's size and position. Set values withdata-variable-values.

<div data-composition-id="token-swarm" data-composition-src="compositions/token-swarm.html"
     data-start="0" data-duration="5" data-track-index="1"
     style="position:absolute;left:0;top:0;width:1920px;height:1080px"></div>

Variables

VariableTypeDefaultWhat it changes
imageimageassets/coin-mark.svgSquare image on both faces.
countnumber5Tokens.
sizenumber8Token diameter as percent of host height.
originstring50,50x,y in percent of the host where tokens pop.
radiusstring20,30rx,ry in percent of the host for the target ellipse.
edgecolor#c94fb0Rim seen when a token turns edge on.
atnumber0.2Seconds before the first token pops.
burstAfternumber0.12Seconds after the pop before tokens burst to their targets.
respinAtstring(empty)Pipe separated seconds at which tokens spin half a turn.
driftnumber1.3Multiplier the targets grow to over the hold.
exitnone, fadenonenone or fade.
groundcolortransparentBackground; transparent to overlay.
seednumber7Deterministic scatter.