Class InterpolatingBehavior<C>
Type Parameters
Implements
Properties
easing Function
The easing function to use for interpolation
easing Mode
The easing mode (default is EASINGMODE_EASEINOUT)
transition Duration
Duration of the animation in milliseconds
Accessors
attached Node
is Interpolating
-
get isInterpolating(): boolean
Returns boolean
name
-
get name(): string
Gets the name of the behavior.
Returns string
remaining Duration Ms
-
get remainingDurationMs(): number
Gets the longest remaining duration (in milliseconds) across all in-flight property animations. Returns 0 when nothing is currently animating.
Returns number
Methods
animate Properties Async
-
animatePropertiesAsync<K extends string | number | symbol>(
properties: Map<K, AllowedAnimValue>,
transitionDuration?: number,
easingFn?: EasingFunction,
updateAnimation?: (key: string, animation: Animation) => void,
): Promise<void>Animates camera properties to new values.
Type Parameters
- K extends string | number | symbol
Parameters
- properties: Map<K, AllowedAnimValue>
defines the property values to animate to
- transitionDuration: number = ...
defines the transition duration in milliseconds
- easingFn: EasingFunction = ...
defines the easing function to use
OptionalupdateAnimation: (key: string, animation: Animation) => voiddefines an optional callback used to update each generated animation
Returns Promise<void>
a promise that resolves when the animation completes
attach
detach
-
Detaches the behavior from the camera
Returns void
init
-
Initializes the behavior
Returns void
stop All Animations
-
Stops and removes all animations
Returns void
update Properties
-
Redirects any in-flight transition toward the given property values, reusing the time remaining in the current transition. No-op when nothing is currently animating.
Type Parameters
- K extends string | number | symbol
Parameters
- properties: Map<K, AllowedAnimValue>
defines the property values to redirect toward
Returns void
Animate camera property changes with an interpolation effect
See
https://doc.babylonjs.com/features/featuresDeepDive/behaviors/cameraBehaviors