Skip to Content
Coming soon!
V2 (beta)Vanilla JSScrollsequenceManager API

ScrollsequenceManager API

The ScrollsequenceManager is the singleton coordinator responsible for scanning the DOM, instantiating blocks, orchestrating scroll triggers, and caching decoded image sequences.


Lifecycle Methods

ScrollsequenceManager.initialize()

Scans the document for .scrollsequence-scene and .scrollsequence-canvas2d elements and mounts instances.

import ScrollsequenceManager from 'scrollsequence'; ScrollsequenceManager.initialize();

ScrollsequenceManager.preloadAll()

Initiates network streaming and browser cache decoding for all registered scenes and canvases on the page.

ScrollsequenceManager.initialize().preloadAll();

ScrollsequenceManager.destroy()

Cleans up scroll listeners, cancels active requestAnimationFrame render loops, and releases WebGL textures and image cache.


Programmatic Block Control

You can retrieve individual block instances to scrub frames programmatically:

const sceneElement = document.getElementById('my-scene'); const sceneBlock = ScrollsequenceManager.getBlock(sceneElement); // Scrub scene to 50% (0.0 to 1.0) sceneBlock.progress(0.5); // Release programmatic control and re-engage scroll-driven playback sceneBlock.progress(null);
Last updated on
Feedback