Basic HTML version of Foils prepared March 18 1998

Foil 28 ECMAScript Example -I

From Scripting and EAI in VRML97 CPS616 -- Information Track of CPS -- Spring Semester 98. by Hasan Ozdemir (Geoffrey C. Fox)

Listing and VRML of Script Starting a Conventional PositionInterpolater for Foil 28
DEF TIME1 TimeSensor { cycleInterval 3 }
DEF INTERP1 PositionInterpolator {
key [ 0.0 0.25 0.5 0.75 1.0]
keyValue [ 3.0 0.0 0.0 3.0 -.95 0.0 3.0 0.0 0.0 3.0 +.95 0.0 3.0 0.0 0.0 ] }
DEF T1 Transform {
children Shape { geometry Sphere{} }
translation 3.0 0.0 0.0 }
DEF T2 Transform {
children [ DEF GO TouchSensor {}
Shape { geometry Box{} }]
translation -3.0 0.0 0.0 }
T2 is a box and starts the action. Whenever user clicks on it, it starts the script Action1-> TimeSensor-> PositionInterpolator -> T1



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 5 1998