#VRML V2.0 utf8 # # Simple anchor # anchor.wrl # by David R. Nadeau # # This example illustrates the use of an Anchor group around the # shapes used to build a door. Clicking on the door jumps you to # a new world ("stairwy.wrl"). # # Things to experiment with: # Change the anchor's URL to point to one of your own worlds. # # Add more doors and stairs. Add walls, floor, ceiling, etc. # Transform { translation 0.0 -2.5 0.0 children [ # # Three stairs # DEF Stair Shape { appearance Appearance { material Material { diffuseColor 1.0 1.0 1.0 } } geometry Box { size 4.0 0.25 1.0 } } Transform { translation 0.0 0.5 -1.0 children USE Stair } Transform { translation 0.0 1.0 -2.0 children USE Stair } # # Door # Transform { translation 0.0 4.125 -2.6 children [ Anchor { url "stairwy.wrl" description "Twisty Stairs" children [ # Door Shape { appearance Appearance { material Material { diffuseColor 0.6 0.4 0.0 } } geometry Box { size 3.0 6.0 0.2 } } # Door knob Transform { translation 1.18 -0.0 0.2 children [ Shape { appearance Appearance { material Material { diffuseColor 0.3 0.3 0.3 } } geometry Sphere { radius 0.15 } } ] } ] } ] } ] }