DreamLake
Browse docs

3D scenes

Inspect geometry and recorded motion with EpisodeRecon3d. This specimen loads a ruler, toy, and hand meshes in their rest pose. Drag to orbit; no external motion tracks are attached here.

Loading scene…
Code BasicSpec.tsx

Load geometry and motion

Load glTF or GLB geometry, then join motion tracks by mesh node name. A ruler track drives the ruler node; recognized suffixes such as ruler_pose also match.

tsx
import { EpisodeRecon3d, loadGltf, type Scene3dInput } from '@dreamlake/viz/episode-recon-3d'

const meshes = await loadGltf(url, 'glb')
const scene: Scene3dInput = {
  meshes,
  transforms: [],
  vertexTracks: [],
  pointTracks: [],
  upVector: null,
}

<div style={{ height: 400 }}>
  <EpisodeRecon3d scene={scene} time={time} duration={clipSeconds} />
</div>

Give the parent a height. transforms supply translations and quaternions; vertexTracks deform meshes. Embedded glTF animation runs when an external transform track does not override it.

Convert timestamped point sets with pointTrackFromPose3d(name, payload). A 21-point set gets the hand skeleton by default; provide edges for another topology or [] for points alone. Set upVector to orient gravity upright.

Props

PropTypeDefaultPurpose
sceneScene3dInputrequiredGeometry and tracks joined by node name.
timenumber | null0Playback time in seconds; null shows the first frame.
durationnumber0Clip length, used to time vertex tracks that do not supply fps.
trail{ ahead?: number; behind?: number } | false{ ahead: 1, behind: 0 }Seconds of future and past motion to draw. False hides trails.
interactivebooleantrueEnable orbit controls; false is useful for thumbnails.
originMarker'camera' | 'axes''camera'Mark a camera-frame origin or show orientation axes for world-frame data.
dataVersionnumber—Increment after refilling track arrays in place so derived trails rebuild.
classNamestring—Root CSS classes.

When filling existing track arrays, retain scene identity and increment dataVersion to refresh trails without resetting the camera. A .dreamrc recon3d view receives time from the dataset's shared cursor.