media @ VU
proto-slide-backgrounds-spheres.vr
proto-slide-backgrounds-spheres.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
Web3D/VR
spheres
HUD
Transform {
translation 0 0 15
children [
DEF SPHERES Transform {
##translation -8 0 -35
translation -15 0 -35
scale 2 2 2
children [
Transform { children [
DEF SPHERE Shape {
appearance DEF SPHEREAPP Appearance {
material DEF SPHEREMAT Material {
emissiveColor 0.1 0.1 0.1
diffuseColor 0.5 0.5 0.5
transparency 0.8
}
}
geometry Sphere {}
}
] }
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
Transform { children[ Shape{appearance USE SPHEREAPP geometry Sphere{} }]}
]
}
DEF TIMER TimeSensor {
enabled TRUE
cycleInterval 12
loop TRUE
}
DEF SCRIPT Script {
directOutput TRUE
eventIn SFFloat trigger
field SFNode spheres USE SPHERES
url "javascript:
function initialize() {
}
function trigger(v,t) {
a = v*14*3.14;
b = v*12*3.14;
c = v*16*3.14;
d = v*2*3.14;
i = 0;
for(i=0;i<8;i++) {
spheres.children[i].translation = new SFVec3f(
i*2+Math.sin(a),
0.5*Math.cos(b)+6*Math.sin(d),
0.5*Math.sin(c)
);
spheres.children[i].children[0].geometry.radius =
1+0.1*Math.sin(c);
a+=0.8;
b+=0.5;
c+=0.7;
}
// sphere.appearance.material.transparency = 0.6;
}
"
}
ROUTE TIMER.fraction_changed TO SCRIPT.trigger
] }
(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.