Web3D/VRML
[] readme course preface 1 2 3 4 5 6 7 reference examples resources

talk show tell print

problem-touch.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]

touchsensor

monitor


  
  #@proto @vr-extern-monitor.wrl
  
  

group


  
  Group {
  children [
  
  DEF message monitor { translation 2 2 0 string "wait"  }
  
  DEF touch TouchSensor {}
  
  DEF script Script {
  directOutput TRUE
  eventIn SFVec2f feel
  field SFNode message USE message 
  field SFNode touch USE touch 
  url "javascript:
  function feel(value) {
          str_x = 'x: ' + value.x;
          str_y = ' y:' + value.y;
          str = str_x + ' ' + str_y;
          print(str);
          message.string = new MFString(str_x,str_y);
          }
          "
  }
  
  

shape


  
          Shape {
                     geometry Box { } ## default
                     appearance Appearance {
                          texture MovieTexture {
                                  loop TRUE
                                  url "@logo.gif"
                          }
                  }
             }
  ]
  
  ROUTE touch.hitTexCoord_changed TO script.feel
  }
  
  

scene


  
  
  Viewpoint { position 0 0 10 }
  
  


[] readme course preface 1 2 3 4 5 6 7 reference examples resources
eliens@cs.vu.nl

draft version 0.3 (17/9/2001)