Nodes have for basic types: infomational, grouping, shape, and transformational. An informational node just carries comments by the author. A grouping node makes many other nodes into one node for easy processing. A shape node is basic shape, like box, sphere, etc. A transformational nodes gives all child nodes a common property, for example scale or color.
| Degrees | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | 360 |
| Radians | 0 | 0.78 | 1.57 | 2.36 | 3.14 | 3.93 | 4.71 | 5.5 | 6.28 |
| Name | Description | Arguments |
| diffuseColor | The normal colour of the object. | A Color Triple |
| specularColor | The colour of highlights on shiny objects. | A Color Triple |
| emissiveColor | The object 'glows' with a light of it's own of this colour. It doesn't cast light on any other objects though. | A Color Triple |
| ambientIntensity | The amount of ambient light that the object reflects. | Scale 0 ... 1 |
| shininess | How reflective the object is. | Scale 0 ... 1 |
| transparency | How transparent the object is. Note, some browsers will not support partly-transparent objects. | Scale 0 ... 1 |
| Appearance {
texture ImageTexture { url "brick.jpg" repeatS TRUE repeatT TRUE } } |
Appearance {
texture MovieTexture { url "random.mpg" repeatS TRUE repeatT TRUE speed 2 loop true } } |
| geometry Box {
size 5.5 3.75 1.0 } |
geometry Sphere {
radius 10,000,000 } |
| geometry Cone {
bottomRadius 5 height 10 side TRUE #this isn't actually needed bottom FALSE } |
geometry Cylinder {
radius 0.5 height 10 top FALSE bottom TRUE side TRUE } |
| geometry Text {
string ["Hello", "World"] fontStyle USE HELLOFONT maxExtent 5 length [3, 3] } |
ElevationGrid {
xDimension 6 zDimension 6 height [1.5, 1, 0.5, 0.5, 1, 1.5, 1, 0.5, 0.25, 0.25, 0.5, 1, 0.5, 0.25, 0, 0, 0.25, 0.5, 0.5, 0.25, 0, 0, 0.25, 0.5, 1, 0.5, 0.25, 0.25, 0.5, 1, 1.5, 1, 0.5, 0.5, 1, 1.5] xSpacing 5.0 zSpacing 5.0 } |
#VRML V2.0 utf8
Shape {
appearance Appearance {
material Material {
}
}
geometry Box {
}
}
|
A Simple Box |
DEF FBOX Shape {
appearance Appearance {
material Material {
}
}
geometry Box {
}
}
USE FBOX
|
Reuse Demo
Can you find the bug in this file? |
| #VRML V2.0 utf8
DEF FBOX Shape { appearance Appearance { material Material { } } geometry Box { } } Transform {
|
Transform Example |
| #VRML V2.0 utf8
Shape { appearance Appearance { material Material { diffuseColor 0 0.5 0 emissiveColor 0 0.8 0 transparency 0.5 } } geometry Box { } } |
Semi-transparent Green Box |
| #VRML V2.0 utf8
Shape { appearance Appearance { texture ImageTexture { url "balloons.jpg" repeatS TRUE repeatT TRUE } } geometry Box { } } |
Texture Demo |