media @ VU
web3d-video-time-2.vr
web3d-video-time-2.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
Web3D/VR
time (2)
##
##
##
WorldInfo {
title "Timed timer"
info [
"timetime.wrl Copyright (c) 1997, David R. Nadeau"
"options:wwwProgress=true"
]
}
Viewpoint {
position 0.0 0.0 12.0
description "Entry view"
}
NavigationInfo {
type [ "EXAMINE", "ANY" ]
headlight TRUE
}
# Red Boxes
Collision {
collide FALSE
children [
DEF Red Transform {
# animated scale
children [
Shape {
appearance DEF Red-App Appearance {
material Material {
diffuseColor 1.0 0.0 0.0
}
texture DEF M1 MovieTexture {
url "local/clips/effects/balls.wmv" #<a href=http://www.vid.d>/
startTime 0 stopTime -1 loop TRUE
repeatS FALSE repeatT FALSE
}
}
geometry Box { }
}
]
}
Transform { translation 2.0 2.0 0.0 children USE Red }
Transform { translation -2.0 2.0 0.0 children USE Red }
Transform { translation 2.0 -2.0 0.0 children USE Red }
Transform { translation -2.0 -2.0 0.0 children USE Red }
Transform { translation 0.0 -2.0 2.0 children USE Red }
Transform { translation 0.0 2.0 2.0 children USE Red }
Transform { translation 2.0 0.0 2.0 children USE Red }
Transform { translation -2.0 0.0 2.0 children USE Red }
Transform { translation 0.0 -2.0 -2.0 children USE Red }
Transform { translation 0.0 2.0 -2.0 children USE Red }
Transform { translation 2.0 0.0 -2.0 children USE Red }
Transform { translation -2.0 0.0 -2.0 children USE Red }
]
}
# Blue Boxes
Collision {
collide FALSE
children [
DEF Blue Transform {
translation 2.0 0.0 0.0
# animated scale
children [
Shape {
appearance DEF Blue-App Appearance {
material Material {
diffuseColor 0.0 0.0 1.0
#transparency 0.5
}
texture DEF M2 MovieTexture {
url "local/clips/effects/flash.wmv"
startTime 0 stopTime -1 loop TRUE
repeatS FALSE repeatT FALSE
}
}
geometry Box { }
}
]
}
Transform { translation -4.0 0.0 0.0 children USE Blue }
Transform { translation -2.0 0.0 2.0 children USE Blue }
Transform { translation -2.0 0.0 -2.0 children USE Blue }
Transform { translation -2.0 2.0 0.0 children USE Blue }
Transform { translation -2.0 -2.0 0.0 children USE Blue }
Transform { translation 0.0 2.0 2.0 children USE Blue }
Transform { translation 0.0 2.0 -2.0 children USE Blue }
Transform { translation -4.0 2.0 2.0 children USE Blue }
Transform { translation -4.0 2.0 -2.0 children USE Blue }
Transform { translation 0.0 -2.0 2.0 children USE Blue }
Transform { translation 0.0 -2.0 -2.0 children USE Blue }
Transform { translation -4.0 -2.0 2.0 children USE Blue }
Transform { translation -4.0 -2.0 -2.0 children USE Blue }
]
}
DEF Clock TimeSensor {
cycleInterval 3.0
loop FALSE
}
DEF Trigger TimeSensor {
loop TRUE
cycleInterval 5.0
}
DEF RedScale PositionInterpolator {
key [ 0.0, 0.5, 1.0 ]
keyValue [
1.0 1.0 1.0,
0.0001 0.0001 0.0001,
1.0 1.0 1.0,
]
}
DEF BlueScale PositionInterpolator {
key [ 0.0, 0.25, 0.5, 0.75, 1.0 ]
keyValue [
1.0 1.0 1.0,
0.0001 0.0001 0.0001,
1.0 1.0 1.0,
0.0001 0.0001 0.0001,
1.0 1.0 1.0,
]
}
ROUTE Trigger.cycleTime TO Clock.set_startTime
ROUTE Clock.fraction_changed TO RedScale.set_fraction
ROUTE Clock.fraction_changed TO BlueScale.set_fraction
ROUTE RedScale.value_changed TO Red.set_scale
ROUTE BlueScale.value_changed TO Blue.set_scale
# VRML absolute time
# startup timer
DEF initTS TimeSensor {
cycleInterval 0.1
loop TRUE
}
# start videos
ROUTE initTS.cycleTime TO M1.set_startTime
ROUTE initTS.cycleTime TO M2.set_startTime
# stop the startup timer
ROUTE initTS.cycleTime TO initTS.set_stopTime
(C) A. Eliëns
21/5/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.