@modoki/engine / index / ControlClipBlock
Interface: ControlClipBlock
One clip on a control track — one of three kinds, discriminated by which field is set:
- prefab spawn (
prefab= a GUID): instantiate atstart, destroy the instance atstart + duration(or leave it ifdurationis omitted). Spawned UNDER the track target (the Director root when target is ""). - particle restart (
particle: true): RESTART the track target'sParticleEmitteratstart(re-emit from t=0), and pause it atstart + durationif a duration is set. Acts ON the track target (needs an entity carrying aParticleEmitter). - sub-director (
subdirector: true): drive the track target's ownDirector(a nested.timeline.json) SYNCED to this clip — its local time = parentTime −start, playing across[start, start + (duration ?? childDuration)]. Composes reusable sub-cutscenes; runtime-Play only (seetimelineSystem). Acts ON the track target (needs an entity carrying aDirector). The three are mutually exclusive;normalizeTrackdrops a clip that is none.
Timeline
duration?
optionalduration?:number
particle?
optionalparticle?:boolean
prefab?
optionalprefab?:string
start
start:
number
subdirector?
optionalsubdirector?:boolean
transform?
optionaltransform?:Partial<Record<"x"|"y"|"z"|"rx"|"ry"|"rz"|"sx"|"sy"|"sz",number>>
PREFAB kind only — a per-field LOCAL Transform override for the spawned instance root (under the track target). Only the fields present override the prefab's authored root; omit for the prefab's own pose. Lets one prefab spawn at different places/rotations/scales per clip.