media @ VU
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources _

talk show tell print

effect-decorator.vr

effect-decorator.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]


  <3dobject start=1>
  DEF decorator-script-@id Script {
  field SFNode me USE decorator-script-@id
  field SFNode channel USE @id
  field SFNode slide USE @the_id
  
  field SFVec3f orig_location  0 0 0
  field SFRotation orig_rotation 0 0 0 0
  field SFVec3f orig_scale  1 1 1 
  
  field SFInt32 from @from
  field SFInt32 to @to
  
  field SFVec3f translation  @translation
  field SFRotation rotation @rotation
  field SFVec3f scale  @scale
  eventIn SFInt32 level
  url "javascript:
       function initialize() {
       orig_location = channel.location;
       orig_rotation = channel.rotation;
       orig_location = channel.location;
       Browser.addRoute(slide,'level',me,'level');
       }
       function shutdown() {
       Browser.deleteRoute(slide,'level',me,'level');
       }
       function level(value,time) {
       if (value > from && ( to == -1 || value <= to )) { 
           //slide.bgChoice = 0;
           //background.whichChoice = 0;
           sphere.appearance.material.transparency = 0.2;
           sphere.appearance.material.diffuseColor = new SFColor(0,1,1);
           //look.diffuseColor = new SFColor(0,1,1);
           //channel.location = translation;
           //channel.rotation = rotation;
           //channel.scale = scale;
       } else {
           //slide.bgChoice = -1;
           background.whichChoice = -1;
           //channel.location = orig_location;
           //channel.rotation = orig_rotation;
           //channel.scale = orig_scale;
       }
      }"
  }
  </3dobject>
  
  


(C) A. Eliëns 21/5/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.