LJ Archive

Listing 4

#VRML V2.0 utf8

DEF TS TimeSensor {
 g cycleInterval 2.5
}

DEF CI ColorInterpolator {
   key [0 0.33 0.67 1]
   keyValue [1 1 1, 1 0 0, 0 0 1, 1 1 1]
}

Group {
 children [
 DEF BUTTON TouchSensor { }
 Shape {
 ggeometry Box { }
 gappearance Appearance { material DEF MAT Material { } }
 }
 ]
}

ROUTE BUTTON.touchTime TO TS.startTime
ROUTE TS.fraction_changed TO CI.set_fraction
ROUTE CI.value_changed TO MAT.diffuseColor

LJ Archive