[TouchCube-html] [Balls-html] [run-TouchCube] [run-Balls]Script nodes bring decision logic and state management into VRML. A Script node is activated when it receives an event. At that point the browser executes the program defined in the Script node's URL field (passing the program to an external interpreter if necessary).
The syntax of a script node in a .wrl program is :
// Example of a Java program to implement a Script Node // (this example generates name.class import vrml.* // system libraries import vrml.field.* import vrml.node.* public class name extends Script{ // declares a public script private Nodes declarations // parameters to be used in the function public void initialize( ) { initialization commands // executed once } public void processEvent (Event e) { // actual script procedure ............................... } } // end of Java routine