Skip navigation links
Vrml2Sourcebook Examples Archive Javadoc

Package Vrml2Sourcebook.Chapter30Scripts

Scripts allow authors to define their own event-handling code to improve animation sophistication.

See: Description

Package Vrml2Sourcebook.Chapter30Scripts Description

Scripts allow authors to define their own event-handling code to improve animation sophistication.

Figure 30.4 Script Spiraling Ball Trace

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.

Skip navigation links
Vrml2Sourcebook Examples Archive Javadoc

Copyright 2005-2019 Web3D Consortium under an open-source license, free for any use. Feedback is welcome.