Class: Animation Abstract
Overview
The Animation interface is implemented to create animations inside SketchUp. At any given time, a single animation can be active on a View. To make your own, build a Ruby class that contains the methods described below.
Animation objects are activated by using the animation= method on a View object. To stop an animation set the view's animation object to nil, like so: Sketchup.active_model.active_view.animation = nil
Instance Method Summary collapse
-
#nextFrame(view) ⇒ Boolean
Invoked by SketchUp to tell the animation to display its next frame.
-
#pause ⇒ void
Invoked by SketchUp when the animation is paused.
-
#resume ⇒ void
Invoked by SketchUp when the animation is resumed after being paused.
-
#stop ⇒ void
Invoked by SketchUp when the animation is stopped.
Instance Method Details
#nextFrame(view) ⇒ Boolean
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 object.
52 53 |
# File 'lib/animation.rb', line 52 def nextFrame(view) end |
#pause ⇒ void
The user interface for pausing and resuming animations isn't integrated with the Ruby API in the current version, so this method is probably not useful to you.
This method returns an undefined value.
Invoked by SketchUp when the animation is paused.
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 pause, only certain SketchUp events cause the method to be called.
72 73 |
# File 'lib/animation.rb', line 72 def pause end |
#resume ⇒ void
The user interface for pausing and resuming animations isn't integrated with the Ruby API in the current version, so this method is probably not useful to you.
This method returns an undefined value.
Invoked by SketchUp when the animation is resumed after being paused.
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.
92 93 |
# File 'lib/animation.rb', line 92 def resume end |
#stop ⇒ void
This method returns an undefined value.
Invoked by SketchUp when the animation is stopped.
This method is optional (you do not need to implement this method unless you want to perform some specialized function when the animation is stopped). 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.
Perhaps the most common way for this method to be called is when your Ruby code sets the view.animation to nil.
111 112 |
# File 'lib/animation.rb', line 111 def stop end |