TimeSensor node
This is what the Ascii text in the VRML files
looks like after converting from MAX:
#VRML V2.0 utf8
# Produced by 3D Studio MAX VRML 2.0 exporter, Version 1
# MAX File: timesensor05.max, Date: Mon Oct 14 13:57:28 1996
DEF entry Viewpoint {
position -18.01 69.03 117.2
orientation 0.9997 0.02371 0.002033 -0.1711
fieldOfView 1.304
description "entry"
}
DEF NavInfo01 NavigationInfo {
avatarSize [0, 1.6, 0.75]
headlight TRUE
speed 5
type "WALK"
visibilityLimit 0
}
DEF side_view Viewpoint {
position -168.5 95.83 -65.13
orientation 0.1418 0.9662 0.2153 -2.008
fieldOfView 0.6552
description "side_view"
}
DEF TimeSensor01-TIMER TimeSensor {
cycleInterval 0.6667
loop TRUE
startTime 1
}
DEF TimeSensor01-SCRIPT Script {
eventIn SFFloat fractionIn
eventOut SFFloat fractionOut
url "vrmlscript:
function fractionIn(i) {
fractionOut = 0.2 * i;
}"
}
DEF Sphere-ROOT Transform {
translation 0.3255 19.87 -1.187
rotation 0 -1 0 -1.571
scale 1 1 1
children [
DEF Sphere-TIMER TimeSensor { loop FALSE cycleInterval 3.333 },
DEF Sphere-POS-INTERP PositionInterpolator {
key [0, 0.03, 0.06, 0.09, 0.12, 0.15, 0.18, 0.21, ]
keyValue [0.3255 19.87 -1.187, 0.3255 55.81 -1.187, 0.3255 79.04 -1.187,
0.3255 89.58 -1.187, 0.3255 87.41 -1.187, 0.3255 72.54 -1.187,
0.3255 44.97 -1.187, 0.3255 19.53 -1.187, ] },
Shape {
appearance Appearance {
material Material {
diffuseColor 0.01961 0.4667 0.3255
shininess 0.4
transparency 0
}
}
geometry Sphere { radius 19.89 }
}
]
}
ROUTE Sphere-TIMER.fraction_changed TO Sphere-POS-INTERP.set_fraction
ROUTE Sphere-POS-INTERP.value_changed TO Sphere-ROOT.set_translation
ROUTE TimeSensor01-TIMER.fraction_changed TO TimeSensor01-SCRIPT.fractionIn
ROUTE TimeSensor01-SCRIPT.fractionOut TO Sphere-POS-INTERP.set_fraction
DEF Cone-ROOT Transform {
translation 51.15 8.552 -0.9903
rotation -0.5985 -0.09872 -0.795 -0.4478
children [
DEF Cone-TIMER TimeSensor { loop FALSE cycleInterval 3.333 },
DEF Cone-POS-INTERP PositionInterpolator {
key [0, 0.03, 0.06, 0.09, 0.12, ]
keyValue [51.15 8.552 -0.9903, 48.79 14.82 0.8651, 46.44 21.1 2.72,
44.09 27.37 4.576, 43.3 29.46 5.194, ] },
DEF Cone-ROT-INTERP OrientationInterpolator {
key [0, 0.03, 0.06, 0.09, 0.12, 0.15, 0.18, 0.21, ]
keyValue [-0.5985 -0.09872 -0.795 -0.4478, -0.5728 -0.2808 0.7701 -0.6048,
-0.3159 -0.2108 0.9251 -1.371, 0.07842 0.1576 -0.9844 -3.917,
0.4003 0.1993 -0.8945 -3.568, 0.7653 0.2235 -0.6036 -3.376,
0.9347 0.2075 -0.2887 -3.044, 0.9838 0.1781 -0.02212 -2.875,
] },
Transform {
translation 0 16.68 0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.2314 0.2745 0.5765
shininess 0.4
transparency 0
}
}
geometry Cone { bottomRadius 19.89 height 33.36 }
}
] }
]
}
ROUTE Cone-TIMER.fraction_changed TO Cone-POS-INTERP.set_fraction
ROUTE Cone-POS-INTERP.value_changed TO Cone-ROOT.set_translation
ROUTE TimeSensor01-TIMER.fraction_changed TO TimeSensor01-SCRIPT.fractionIn
ROUTE TimeSensor01-SCRIPT.fractionOut TO Cone-POS-INTERP.set_fraction
ROUTE Cone-TIMER.fraction_changed TO Cone-ROT-INTERP.set_fraction
ROUTE Cone-ROT-INTERP.value_changed TO Cone-ROOT.set_rotation
ROUTE TimeSensor01-TIMER.fraction_changed TO TimeSensor01-SCRIPT.fractionIn
ROUTE TimeSensor01-SCRIPT.fractionOut TO Cone-ROT-INTERP.set_fraction
DEF Box-ROOT Transform {
translation -53.48 9.904 -9.192
rotation -0.7893 0.1039 0.6051 -0.4285
scale 1 1 1
scaleOrientation 0.9161 0 0.401 -0.2405
children [
DEF Box-TIMER TimeSensor { loop FALSE cycleInterval 3.333 },
DEF Box-POS-INTERP PositionInterpolator {
key [0, 0.03, 0.06, 0.09, 0.12, 0.15, 0.18, 0.21, ]
keyValue [-53.48 9.904 -9.192, -76.5 16.07 -9.192, -91.59 20.12 -9.192,
-98.75 22.03 -9.192, -97.97 21.82 -9.192, -89.25 19.49 -9.192,
-72.6 15.03 -9.192, -57.09 10.87 -9.192, ] },
Transform {
translation 0 15 0
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.5843 0.02745 0.1569
shininess 0.4
transparency 0
}
}
geometry Box { size 28 30 39 }
}
] }
]
}
ROUTE Box-TIMER.fraction_changed TO Box-POS-INTERP.set_fraction
ROUTE Box-POS-INTERP.value_changed TO Box-ROOT.set_translation
ROUTE TimeSensor01-TIMER.fraction_changed TO TimeSensor01-SCRIPT.fractionIn
ROUTE TimeSensor01-SCRIPT.fractionOut TO Box-POS-INTERP.set_fraction

dFORM |