TimeStepBasedAnimationHandler
Introduction
Drives a scene through a discrete list of time steps: each time step carries camera, background and per-scene-item settings that are applied when that step becomes current.
Methods
addRenderer
Registers a renderer, if not already registered.
| Argument | Type | Required | Description |
|---|---|---|---|
renderer | Yes | the renderer |
getOriginalMetada
Gets the metadata passed at construction.
setBackground
Sets the background of every registered renderer.
| Argument | Type | Required | Description |
|---|---|---|---|
color | Yes | the background color |
setCameraParameters
Applies camera parameters to every registered renderer's active camera.
| Argument | Type | Required | Description |
|---|---|---|---|
params | Yes | the camera parameters |
setCurrentTimeStep
Snaps to the last time step lower than or equal to time and applies it. Does nothing when no time step is known.
| Argument | Type | Required | Description |
|---|---|---|---|
time | Yes | the requested time |
setData
Sets the animation data and refreshes the time steps, time range and current time step from it.
| Argument | Type | Required | Description |
|---|---|---|---|
data | Yes | the animation data |
setScene
Sets what the handler animates.
| Argument | Type | Required | Description |
|---|---|---|---|
scene | Yes | the scene items | |
originalMetadata | Yes | metadata holding the base camera parameters | |
applySettings | Yes | callback applying settings to a scene item | |
renderer | Yes | the renderer |
update
Applies the scene settings of the current time step.