Examples

Try a setting, move the timeline and see the code behind it. Each preview uses the actual ScrollDirector engine.

Open the full scroll demo

Drag the timeline to compare how the background, mountains and foreground move at different depths.

Parallax layers

A small depth value keeps the background nearly still. Larger values bring the foreground through the frame faster.

Scene settings
{
  id: "landscape", duration: 1200,
  element: '[data-scene="landscape"]',
  layers: [
    { id: "far", element: ".far", depth: 0.1 },
    { id: "mid", element: ".mid", depth: 0.4 },
    { id: "near", element: ".near", depth: 0.9 }
  ]
}

These are the scene settings used by the preview. The getting-started guide shows how to mount a complete story.

Start with a working example

The browser download includes a full HTML story, the library, stylesheet and local SVG assets. It runs through any existing static HTTP server.

Download HTML example

What’s in this release?

DOM scenes, camera transforms, parallax, numeric keyframes and six scene transitions. Automatic text splitting, WebGL rendering, audio/video synchronization and a visual editor are not part of this preview.