Graphics Reference
In-Depth Information
This works because Tween.js offers a fluent API. So for each function call, this library
returns the original TWEEN.Tween object. This means that you can easily chain calls
together like we did in the previous code fragment.
See also
• You can use the Tween.js library in pretty much every case where we
used an animation in this topic. For instance, in Chapter 2 , Geometries and
Meshes , we showed you the Rotating an object around its own axis re-
cipe. The rotation could be easily managed using a TWEEN.Tween object. In
Chapter 3 , Working with the Camera , we showed you how to zoom in on an
object in the Zooming the camera to an object recipe. With the Tween.js lib-
rary, we can easily animate this zoom functionality.
Search WWH ::




Custom Search