See: Description
Class | Description |
---|---|
Figure30_1ScriptSlidingBall |
A sliding red sphere and a custom interpolation script.
|
Figure30_2ScriptBackgroundSelect |
Click on a geometric Shape to change the scene Background.
|
Figure30_3ScriptSoundActivate |
A pair of filter scripts used to create a toggle on-off switch.
|
Figure30_4ScriptSpiralingBallTrace |
A spiraling red sphere and a custom interpolation script.
|
Figure30_5ScriptTorusBuilder |
A torus shape built with a donut-maker program script.
|
Scripts allow authors to define their own event-handling code to improve animation sophistication.
Sometimes animation actions are too complex for interpolator nodes, such as computed animation paths (e.g. gravity), algorithmic shapes (e.g. fractals), or collaborative environments (e.g. games). You can create new sensors, interpolators, etc., using program scripts written in Java (a powerful general-purpose language) or ECMAscript (JavaScript, an easy-to-learn language). The Script node selects a program script, specified by a url or contained source code. Program scripts have field and event interface declarations, each with a data type, a name, and an initial value (for fields only). These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes. |
Copyright ©2005-2019 Web3D Consortium under an open-source license, free for any use. Feedback is welcome.