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

talk show tell print

interpolator.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]

interpolator

interpolator

This example is to illustrate the use of a ##timesensor and interpolator. In another example, ##the interpolator will be replaced by a script.

shape


  Shape  {    ## # The shape
          geometry Sphere { radius 2 }
          ## # we will modify the Material (DEF)
          appearance Appearance {
                  material DEF MATERIAL Material {
                          diffuseColor 1 0 0
                          }
                  } ## <embed src=@vr-interpolator.wrl width=30 height=30></p>
    } 
  
  

The next section gives the code for the interpolor ##and the routing. Remember

timesensor


  
    DEF TIME TimeSensor { loop TRUE cycleInterval 5 } #<l++>
  
    DEF COLORS ColorInterpolator {
          key [ 0 0.5 1 ]
          keyValue [ 1 0 0,  0 0 1, 1 0 0 ]
          } #<l++>
  
  ROUTE TIME.fraction_changed TO COLORS.set_fraction
  ROUTE COLORS.value_changed TO MATERIAL.diffuseColor
  
  


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

draft version 0.3 (17/9/2001)