OpenGL VRML Shockwave 3D
Home Tutorials Books Applications Tools Docs Models Textures

Send me bugs and suggestions, please
VRML Interactive Tutorial
Full list

Script Tutorial

Introduction and Sintax
Defining Fields and Events
Accessing Fields and Events
When are scripts executed
Script Example: Highlight
Browser Script Interface
Appendix: Data types

VRML Data Types

VRML javascript Description
SFBool boolean Single Boolean Field
SFColor float array with 3 components [Red,Green, Blue] Single Color Field
MFColor Array of float array with 3 components Multiple Color Field
SFFloat float Single Float Field
MFFloat float array Multiple Float Field
SFImage int array with at least 3 components. The first two specify the width and height of the image, the third specifies the image type (see PixelTexture). The remaining components specify the pixel colors as defined in the PixelTexture node. Image Field
SFInt32 int value Single Integer Field
MFInt32 int array Multiple Integer Field
SFNode Node is treated like an object, to access a node's field use the same notation as when accessing an object property Single Node Field
MFNode Object array Multiple Node Field
SFRotation float array with four components: the first three indicate the axis of rotation, the last component specifies the angle Single Rotation Field
MFRotation Array of SFRotation Multiple Rotation Field
SFString String Single String Field
MFString String Array Multiple String Field
SFTime double Single Time Field
MFTime double array Multiple Time Field
SFVec2f float array with two components Single 2D Field
MFVec2f array of SFVec2f Multiple 2D Field
SFVec3f float array with 3 components Single 3D Field
MFVec3f array of SFVec3f Multiple 3D Field

Site designed and maintained by António Ramires Fernandes
Your comments, suggestions and references to further material are welcome!

Lighthouse 3D privacy statement