SketchUp  Ruby API Reference 

Class Index

Method Index

Developers Guide

Examples

Animation interface

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

Parent: Object

Methods: nextFrame, pause, resume , stop

Example Code: animationtests.rb

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

Comments

The nextFrame method is the only required method of the Animation interface that you must implement.

 


pause

The pause method is invoked by SketchUp to pause the animation.

Syntax

animation.pause

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.
 

 


resume

The pause method is invoked by SketchUp to pause the animation.

Syntax

animation.resume

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.

 


stop

The stop method is invoked when SketchUp wants an animation to stop.

Syntax

animation.stop

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.

 

SketchUp  Ruby API Reference: Animation

© Google Inc. 2006 sketchup.google.com