Use the MovieTexture node to place animated GIF files in your VRML scene.
DEF ROTY Transform {children DEF ROTX Transform {children DEF ROTZ Transform
{ children
Transform {rotation 0 0 1 0 children [
Shape {appearance Appearance {
texture MovieTexture {
loop TRUE
url "banner.gif"
}
}
geometry Box {size 8.8 3.1 0.1}}
DEF TS1 TouchSensor {}]
}
}}}
DEF ROTYInterpolator OrientationInterpolator {
key [ 0 0.5 1 ]
keyValue [0 1 0 0 0 1 0 -3.14 0 1 0 -6.28]
}
DEF ROTZInterpolator OrientationInterpolator {
key [ 0 0.5 1 ]
keyValue [0 0 1 0, 0 0 1 -0.8, 0 0 1 0]
}
DEF ROTXInterpolator OrientationInterpolator {
key [ 0 0.5 1 ]
keyValue [1 0 0 0, 1 0 0 0.8, 1 0 0 0]
}
DEF TIMER TimeSensor { enabled TRUE
loop FALSE cycleInterval 10}
ROUTE TS1.touchTime TO TIMER.startTime
ROUTE TIMER.fraction_changed TO ROTYInterpolator.set_fraction
ROUTE TIMER.fraction_changed TO ROTZInterpolator.set_fraction
ROUTE TIMER.fraction_changed TO ROTXInterpolator.set_fraction
ROUTE ROTYInterpolator.value_changed TO ROTY.rotation
ROUTE ROTZInterpolator.value_changed TO ROTZ.rotation
ROUTE ROTXInterpolator.value_changed TO ROTX.rotation
|