Class GEarthExtensions#fx.Animation
Base class for all GEarthExtensions#fx animations. Animations of this
base class are not bounded by a given time duration and must manually be
stopped when they are 'complete'.
Defined in: extensions.js.
Constructor Attributes | Constructor Name and Description |
---|---|
GEarthExtensions#fx.Animation(renderCallback, completionCallback)
|
Method Attributes | Method Name and Description |
---|---|
renderFrame(time)
Render the frame at the given time after the animation was started.
|
|
rewind()
Stop and rewind the animation to the frame at time t=0.
|
|
start()
Start this animation.
|
|
stop(completed)
Stop this animation.
|
Class Detail
GEarthExtensions#fx.Animation(renderCallback, completionCallback)
- Parameters:
- {Function} renderCallback
- A method that will be called to render a frame of the animation. Its sole parameter will be the time, in seconds, of the frame to render.
- {Function} completionCallback Optional
- A callback method to fire when the animation is completed/stopped. The callback will receive an object literal argument that will contain a 'cancelled' boolean value that will be true if the effect was cancelled.
Method Detail
renderFrame(time)
Render the frame at the given time after the animation was started.
- Parameters:
- {Number} time
- The time in seconds of the frame to render.
rewind()
Stop and rewind the animation to the frame at time t=0.
start()
Start this animation.
stop(completed)
Stop this animation.
- Parameters:
- {Boolean} completed Optional, Default: true
- Whether or not the animation is being stopped due to a successful completion. If not, the stop call is treated as a cancellation of the animation.