2

protos

MMA1 Web3D/VRML 2001

(2)


zijn er nog vragen?

inhoud

nodes for assignment 2


      Sensors
  	(TouchSensor, PlaneSensor, CylinderSensor, SphereSensor),
  		                    DEF/USE,
  						PROTO 
  

timers, interpolators, sensors and scripts

%-->

dissection

dissection analog case

%-->

  
  

dissection discrete case

%-->

  
  

prototype

%-->

dissection prototype

%-->


  
  

...

routing



  DEF TOUCH TouchSensor { }
  DEF TIME TimeSensor { enabled FALSE loop TRUE } 
  DEF SCRIPT Script {     
  ...
  }
  ROUTE TOUCH.touchTime TO SCRIPT.touched
  ROUTE SCRIPT.enabled TO TIME.enabled
  ROUTE TIME.fraction_changed TO SCRIPT.set_fraction
  ROUTE SCRIPT.value_changed TO MATERIAL.diffuseColor  
  

instances



  Bulb { translation -8 0 0 scale 0.5 0.5 0.5 }
  Bulb { translation -5 0 0 }
  Bulb { scale 1.5 1.5 1.5 }
  Bulb { translation 5 0 0 }
  Bulb { translation 8 0 0 scale 0.5 0.5 0.5 }