|
5 X3D Scenes | Scene Descriptions | |
---|---|---|
Figure 30.1 Script Sliding Ball | A sliding red sphere and a custom interpolation script. Three ways to include ECMAScript (JavaScript) programming are compared: external file, url script code, and embedded script code. Recommendation: use embedded script code inside a CDATA block. | |
Figure 30.2 Script Background Select | Click on a geometric Shape to change the scene Background. A Script node controls the state changes. | |
Figure 30.3 Script Sound Activate | A pair of filter scripts used to create a toggle on-off switch. | |
Figure 30.4 Script Spiraling Ball Trace | A spiraling red sphere and a custom interpolation script. | |
Figure 30.5 Script Torus Builder | A torus shape built with a donut-maker program script. Also see Figures 31.6 and 31.7 for comparison. |
Online at http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter30-Scripts
Master source code archive is under subversion control at
http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter30-Scripts
Also available: current and archived nightly builds and distributions of these examples, all published under an Open-Source License.
The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.