Skip to content

Immersive sequences

An immersive sequence is a keyframe timeline for presentation-level animation.

Snapshot channels

Every keyframe stores:

  • Camera position, target, and FOV
  • Model position, rotation, and scale
  • Exposure and environment intensity
  • Ambient, key, and fill light intensity

Sequence shape

ts
interface SequenceConfig {
  name: string
  duration: number
  currentTime: number
  playing: boolean
  loop: boolean
  speed: number
  keyframes: SequenceKeyframe[]
}

Easing

The easing stored on the destination keyframe controls interpolation into it:

ts
'linear' | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic'

Playback

tsx
<ModelLabViewer
  src="/models/galaxy.glb"
  sequence={sequence}
  playSequence
  sequenceLoop
  sequenceSpeed={1}
/>

Scrubbing

tsx
<ModelLabViewer
  src="/models/galaxy.glb"
  sequence={sequence}
  playSequence={false}
  sequenceProgress={progress}
/>

Sampling without rendering

ts
const snapshot = sampleSequence(sequence, 1.75)

This is useful for tests, thumbnails, or server-side validation of numeric data.

Released under the MIT License.