interface Animation

Parent: Object | Class Index
Methods: nextFrame, pause, resume, stop |
Sample Code:animation.rb |

The Animation interface is implemented to create animation objects. Animation objects are activated by using the animation= method on a View object.

Instance Methods

nextFrame
The nextFrame method is invoked by SketchUp to tell the animation to display its next frame. This method should set up the camera and then call the show_frame method on the View.
Syntax:
animation.nextFrame view
Arguments:
view - the view for the animation
Return Value:
Comments:
The nextFrame method is the only required method of the Animation interface that you must implement.
Example:

pause
The pause method is invoked by SketchUp to pause the animation.
Syntax:
animation.pause
Arguments:
Return Value:
Comments:
This method is optional (you do not need to implement this method unless you want to perform some specialized function when the animation is paused). You cannot call this method in your code explicitly and expect an animation to stop, only certain SketchUp events cause the method to be called.
Example:

resume
The pause method is invoked by SketchUp to pause the animation.
Syntax:
animation.resume
Arguments:
Return Value:
Comments:
This method is optional (you do not need to implement this method unless you want to perform some specialized function when the animation is resumed). You cannot call this method in your code explicitly and expect an animation to stop, only certain SketchUp events cause the method to be called.
Example:

stop
The stop method is invoked when SketchUp wants an animation to stop.
Syntax:
animation.stop
Arguments:
Return Value:
Comments:
This method is optional (you do not need to implement this method unless you want to clean up some previously created items such as clearing the status bar). You cannot call this method in your code explicitly and expect an animation to stop, only certain SketchUp events cause the method to be called. For example, setting the current animation to point to nothing (nil) will stop the animation.
Example: