Use the MovieTexture node to place QuickTime movies in your VRML scene.
Apple QuickTime should be installed on your computer.
DEF ROTY Transform {children DEF ROTX Transform {children DEF ROTZ Transform
{ children [
DEF TS1 TouchSensor {}
Shape {appearance Appearance {texture MovieTexture {
loop TRUE
speed 1
url "sample.mov"
}
}
geometry Box {size 4 4 4}}
] }
}}
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 -3.14, 0 0 1 -6.28]
}
DEF ROTXInterpolator OrientationInterpolator {
key [ 0 0.5 1 ]
keyValue [1 0 0 0, 1 0 0 -3.14, 1 0 0 -6.28]
}
DEF TIMER TimeSensor { 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
|