animations.nodeExplosion
nodeExplosion(nodeIds: string | string[], config?: NodeExplosionConfig): stringStart 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.
nodeIds | string | string[] | One or more node IDs to animate. |
config | NodeExplosionConfig | Optional NodeExplosionConfig (duration, easing, center). |
Returns: string
Example
const ids = await api.nodes.add(nodes);
api.animations.nodeExplosion(ids, { duration: 800 });