Animates changing the viewport bounds and the zoom factor for a CanvasComponent.
Implements
- I
Members
Show:
Constructors
Creates a new instance of ViewportAnimation.
Creates a new instance of ViewportAnimation.
Parameters
- canvasComponent: CanvasComponent
- The canvas control.
- target: Rect
- The target world bounds for the animation.
- preferredDuration: TimeSpan
- The preferred duration. One second if omitted.
Properties
Gets or sets whether to respect the viewportLimiter of the CanvasComponent whose viewport is animated.
Gets or sets whether to respect the viewportLimiter of the CanvasComponent whose viewport is animated.
Default is
false.final
Property Value
Gets or sets the preferred duration of the animation.
Gets or sets the preferred duration of the animation.
conversionfinal
Implements
IAnimation.preferredDurationGets or sets the scroll bar visibility that will be used during the animation.
Gets or sets the scroll bar visibility that will be used during the animation.
conversionfinal
Property Value
The scroll bar visibility to use during animation. The default is
hidden.Gets or sets the target world bounds.
Gets or sets the target world bounds.
conversionfinal
Gets or sets the margins in view coordinate dimensions to use at the target zoom level.
Gets or sets the margins in view coordinate dimensions to use at the target zoom level.
The default is
(0,0,0,0)conversionfinal
Property Value
The target margins in view coordinates.
Gets or sets the mode of the viewport limiting if considerViewportLimiter is true.
Gets or sets the mode of the viewport limiting if considerViewportLimiter is
true.Default is PROGRAMMATIC_NAVIGATION
conversionfinal
Methods
The animation starts with the time 0 and ends with time 1.
Parameters
- time: number
- The animation time in [0,1].
Implements
IAnimation.animateEffectively applies the center point value.
Effectively applies the center point value.
Effectively applies the viewpoint value.
Effectively applies the viewpoint value.
protected
Parameters
- value: number
- The zoom value to apply.
Implements
IAnimation.cleanUpCreates a delayed animation instance from this instance.
Creates a delayed animation instance from this instance.
The resulting animation will have a preferred duration that is
delay longer than the existing one.Parameters
- delay: TimeSpan
- The delay to wait before the provided animation starts.
Return Value
- IAnimation
- A new animation that will first wait before the animation starts.
Defined in
IAnimation.createDelayedAnimationCreates an eased animation for the given base animation.
Creates an eased animation for the given base animation.
The animation speed linearly increases up to a easeIn and linearly decreases from easeOut. Between those two points, the animation speed is constant.
The duration of the ease in and ease out is determined by a mapping [0,1] → [0,1]. The mapping has to be increasing to preserve the order of the frames in the decorated animation. In general, we consider continuously differentiable functions f where integral of f′ equals 1 a suitable choice for the mapping.
Parameters
- easeIn?: number
- The ratio for the ease-in time [0,1] where 0 is the start of the animation and 1 the end.
0.5is the default value. - easeOut?: number
- The ratio for the ease-out time [0,1] where 0 is the start of the animation and 1 the end.
0.5is the default value.
Return Value
- IAnimation
- The newly created IAnimation.
See Also
Developer's Guide
Defined in
IAnimation.createEasedAnimationThis has to be called once before any calls to animate. An instance of ViewportAnimation can be reused after an animation by setting new target or a new preferredDuration and calling Initialize() again.