Script node


Implements scripting facility with some limitations (see FAQ).

Script node enable to define complex interactions. Modifying script field call/launch function of the same name in the script. You can access to each VRML node of the scene from the script, based on a DOM system.



Example :


SFString url "" :
The content of the script.


A function is written in javascript. You can use global or local variables. You can use internal functions (not linked to a field). initialize() is a special function launched at Script creation.
DOM access possible by positioning keyword USE after field. The node is accessible by pointed syntax.

The script is compiled => everything should be known before execution.
Our implementation doesn't include the "object" part of javascript BUT you can use protos and DOM.