The AsciiText Node

For now let's focus on the AsciiText node. This node creates the text string "This is a cool demo world!" The spacing parameter refers to the height of the text, in this case, 1 unit. Justification CENTER places the center of the text at the default coordinates (0,0,0). Finally, the width parameter is used to limit the width of the text, if necessary. Here, the value of 0 specifies no width constraints.

#VRML V1.0 ascii
DEF BackgroundColor Info { string "0 0.5 0.5" }
Separator {
        Material {
                ambientColor 0.2 0.2 0.2
                diffuseColor 0.8 0.8 0.8
                specularColor 0 0 0 
                emissiveColor 0 0 0
                shininess 0.2
                transparency 0
        } #Material

        AsciiText {
              string  "This is a demo world!"
              spacing 1
              justification CENTER
              width 0
        } #AsciiText

} #Separator    

AsciiText demo full screen


Next Table of contents