media @ VU
template-logo.vr
template-logo.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
template logo
image and text
<image type=mov src=@logo.gif id=@tid-ch-1 color=blue w=7 h=4 s=3>
<i><text size=0.5 s=1.8 id=@tid-t-1 text=red>@text1</text> </i>
<p><text size=0.5 s=1.8 id=@tid-t-2 a=1 text=red>@text2</text>
<p>
<3dobject id=@tid-o-1 s=0.5 x=6 y=0>
DEF @tid-touch TouchSensor { }
<b>@no</b>
Shape {
appearance Appearance {
material DEF @tid-MAT Material {
diffuseColor 1 1 1
transparency 0.4
}
}
geometry Box {}
}
</3dobject>
animator
<3dobject>
DEF @tid-script Script {
directOutput TRUE
eventIn SFTime touch
eventOut SFFloat transparency
field SFNode text1 USE @tid-t-1
field SFNode text2 USE @tid-t-2
field MFString string []
field SFInt32 state 0
url "javascript:
function touch(value) {
if (state==0) {
text1.alpha = 1;
text2.alpha = 0;
state = 1;
} else if (state == 1) {
string = text1.string;
text1.string = text2.string[0];
text1.alpha = 0;
text2.alpha = 1;
state = 2;
} else if (state == 2) {
text1.string = string;
state = 0;
}
}
"
}
ROUTE @tid-touch.touchTime TO @tid-script.touch
DEF @tid-time TimeSensor { loop TRUE cycleInterval 5 }
DEF @tid-colors ColorInterpolator {
key [ 0 0.5 1 ]
keyValue [ 0 1 0, 1 0 0 ,1 0 1 ]
}
DEF @tid-scalar ScalarInterpolator {
key [ 0 0.5 1 ]
keyValue [ 0 0.5 1 ]
}
ROUTE @tid-time.fraction TO @tid-colors.fraction
ROUTE @tid-colors.value TO @tid-t-1.color
ROUTE @tid-colors.value TO @tid-MAT.diffuseColor
DEF @tid-back ColorInterpolator {
key [ 0 0.5 1 ]
keyValue [ 1 1 0, 0 1 0 ,0 1 1 ]
}
DEF @tid-rotation OrientationInterpolator {
key [ 0 0.5 1]
keyValue [ 1 1 0 0, 1 1 0 1.56 , 1 1 0 3.14 ]
}
ROUTE @tid-time.fraction TO @tid-back.fraction
ROUTE @tid-back.value TO @tid-ch-1.color
ROUTE @tid-time.fraction TO @tid-scalar.fraction
ROUTE @tid-scalar.value TO @tid-ch-1.alpha
ROUTE @tid-time.fraction TO @tid-rotation.fraction
ROUTE @tid-rotation.value TO @tid-o-1.rotation
</3dobject>
</image>
(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.