#VRML V2.0 utf8 # [X3D] VRML V4.0 utf8 # PROFILE Immersive # [X3D] version=4.0 # [X3D] noNamespaceSchemaLocation=/specifications/x3d-4.0.xsd # X3D-to-VRML-97 XSL translation autogenerated by X3dToVrml97.xslt # /x3d/content/X3dToVrml97.xslt # Transformation using XSLT processor: Saxonica # [head] # META "title" "Robot.x3d" # META "description" "X3D encodings example: Robot. Seek or zoom in towards the robot to start a simple animation sequence. This scene demonstrates nested prototype instances" # META "creator" "Don Brutzman and Joe Williams" # META "created" "1 June 2002" # META "modified" "28 September 2025" # META "specificationSection" "X3D encodings, ISO/IEC 19776-1.3, Part 1: XML encoding, Annex C.15 Robot" # META "specificationUrl" "/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-CD/Part01/examples.html#Robot" # META "identifier" "/x3d/content/examples/Basic/X3dSpecifications/Robot.x3d" # META "generator" "X3D-Edit 4.0, /x3d/tools/X3D-Edit" # META "license" "../license.html" # [Scene] ========== ========== ========== WorldInfo { title "Robot.x3d" } EXTERNPROTO Shuttle [ field SFTime rate field SFFloat distance field MFNode children exposedField SFTime startTime exposedField SFTime stopTime field SFBool loop ][ "ShuttlesAndPendulums.x3d#Shuttle" "/Specifications/Encodings/ShuttlesAndPendulums.x3d#Shuttle" ] EXTERNPROTO Pendulum [ field SFTime rate field SFFloat maxAngle field MFNode children exposedField SFTime startTime exposedField SFTime stopTime field SFBool loop ][ "ShuttlesAndPendulums.x3d#Pendulum" "/x3d/content/examples/Basic/X3dSpecifications/ShuttlesAndPendulums.x3d#Pendulum" ] NavigationInfo { speed 20 type [ "WALK" "ANY" ] } Viewpoint { description "Watch Robot Stand" position 0 0 150 } Viewpoint { description "Watch Robot Walk when close" position 0 0 95 } DEF Near ProximitySensor { size 200 200 200 } DEF WALK Shuttle { stopTime 1 rate 10 distance 20 children [ Transform { rotation 0 1 0 1.57 children [ Shape { appearance DEF A Appearance { material Material { diffuseColor 0 0.5 0.7 } } # head geometry Box { } } Transform { scale 1 5 1 translation 0 -5 0 children [ Shape { appearance USE A # body geometry Sphere { } } ] } Transform { rotation 0 1 0 1.57 translation 1.5 0 0 children [ DEF Arm Pendulum { stopTime 1 rate 1 maxAngle 0.52 children [ Transform { translation 0 -3 0 children [ Shape { appearance USE A geometry Cylinder { height 4 radius 0.5 } } ] } ] } ] } Transform { rotation 0 -1 0 1.57 translation -1.5 0 0 children [ # name='Pendulum' no longer required for ProtoInstance USE nodes USE Arm ] } ] } ] } ROUTE Near.enterTime TO WALK.startTime ROUTE Near.enterTime TO Arm.startTime ROUTE Near.exitTime TO WALK.stopTime ROUTE Near.exitTime TO Arm.stopTime