Table of contents Chapter index Previous slide Next slide 166
A sample use of a TouchSensor node

Sensing viewer actions
A sample use of a TouchSensor node
DEF Touch TouchSensor { }

DEF Timer1 TimeSensor { . . . }

DEF Rot1 OrientationInterpolator { . . . }

DEF Frame1 Transform {
    children [
        Shape { . . . }
    ]
}

ROUTE Touch.touchTime         TO Timer1.set_startTime
ROUTE Timer1.fraction_changed TO Rot1.set_fraction
ROUTE Rot1.value_changed      TO Frame1.set_rotation