VRML Scripting:

Supported scripting languanges: Java, JavaScript, VRMLScript

ECMAScript is a version of JavaScript.

 

Each Script has a Field member eventIn and eventOut

Scripts are started with initialize just like java and ended w/shutdown

The event in function must be defined for each eventIn

 

The Advantage of Java is access to the network, more complex math, etc... Java will need to import from vrml package and extend the Script classIn Java eventIn is replaced by a processEvent() method called when an event arrives

Use fields to grab the field and eventOut pointers

 

Data Structures, classes, and socket stuff is provided in Java not JavaScript

Use scripting langs for simple stuff

 

Accessing the Browser itself from the script:

 

Add and delete routes

replace world, etc...

Access through the browser object

 

Modify the VRML spec by adding new nodes... i.e. subclassing or new classing

PROTO

EXTERNPROTO - protos from other url's

 

Where to go for more:

www.vrml.org

vrml.sdsc.edu - VRML Repository

 

Books - The VRML2.0 Sourcebook

 

What about Java3D (Nadeau)

if you want algorithm-cs based graphics Java3D, OpenGL, etc...

if you want content develpment VRML

 

Java3D can load VRML files... and use Java3D for better control

Go See the Java3D course