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
1 DEF TIME1 TimeSensor { cycleInterval 3 }
2 DEF INTERP1 PositionInterpolator {
3 key [ 0.0 0.25 0.5 0.75 1.0]
4 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 ] }
5 DEF T1 Transform {
6 children Shape { geometry Sphere{} }
7 translation 3.0 0.0 0.0 }
8 DEF T2 Transform {
9 children [ DEF GO TouchSensor {}
10 Shape { geometry Box{} }]
11 translation -3.0 0.0 0.0 }
12 T2 is a box and starts the action. Whenever user clicks on it, it starts the script Action1-> TimeSensor-> PositionInterpolator -> T1

in Table To:


© 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 Nov 29 1998