animations

animations.nodeExplosion

nodeExplosion(nodeIds: string | string[], config?: NodeExplosionConfig): string

Start an explosion animation — nodes fly from a center point to their current positions. Creates a "big bang" entrance effect.

On construction, each node's current position is saved as the target. All nodes are snapped to the center, then animated outward over duration.

Not undoable. Not recorded in history.

nodeIdsstring | string[]One or more node IDs to animate.
configNodeExplosionConfigOptional NodeExplosionConfig (duration, easing, center).

Returns: string

Example

const ids = await api.nodes.add(nodes);
api.animations.nodeExplosion(ids, { duration: 800 });