proto object


  
  PROTO object [ ## "@vr-extern-object.wrl"
  exposedField SFColor color 0 0 1
  exposedField SFFloat transparency 0
  exposedField SFNode node NULL
  exposedField SFTime cycle 1
  ]{
  DEF time TimeSensor { cycleInterval IS cycle loop TRUE enabled TRUE }
  
  Group {
     children [
        DEF object Transform {
           children [
              DEF shape Shape {
                 appearance Appearance {
                    material Material {
                       diffuseColor IS color
                       transparency IS transparency
                    }
                 }
                 geometry Box {}
              }
           ] }
        Script {
        field SFNode shape USE shape
        field SFNode node IS node
        field SFTime cycle IS cycle
        url "javascript:
        function initialize() {
          if (node) shape.geometry = node;
          if (cycle == 0) time.enabled = FALSE;
        }
        "
        }
     ]
  }