Node Syntax


The basic format, or syntax, of a node uses the following form:

DEF objectname objecttype { fields children }

Only the objecttype and curly braces are really required so the following node syntax from Fworld1.wrl is acceptable.

Sphere {}

Nodes can, but don't have to have names, fields, or children. The following example code syntax from Bldgf.wrl is also acceptable.

DEF bldgf Separator { # Object: bldgf Created by LightWave3D

... }

We should make a comment about node names at this point. The node name must begin with a letter. It can not begin with a digit and it must not contain a space, a control character, single or double quotation marks, backslashes, curly braces, or the plus character.