media @ VU
proto-slide-element-bullet.vr
proto-slide-element-bullet.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
bullet
Web3D/VR
##
##
##
##
##
switch
Switch {
whichChoice -1
choice [
DEF SPHERE_BULLET Transform {
translation -0.1 -0.1 0
children [
Shape {
appearance DEF BULLETAPPEARANCE Appearance {
material Material {
diffuseColor 0 .2 .9
}
}
geometry Sphere { radius 0.2 }
}
]
}
DEF BOX_BULLET Transform {
translation -0.1 -0.1 0
children [
Shape {
appearance USE BULLETAPPEARANCE
geometry Box { size 0.8 0.8 0.8 }
}
]
}
DEF CONE_BULLET Transform {
translation -0.1 -0.1 0
rotation 0 0 1 -1.56
children Shape {
appearance USE BULLETAPPEARANCE
geometry Cone { bottomRadius 0.4 height 0.8 }
}
}
]
}
bullet
PROTO Bullet [
exposedField SFString elementType "BULLET"
exposedField SFVec3f position 0 0 0
exposedField SFBool linebreak FALSE
exposedField SFString href ""
exposedField SFBool absolute FALSE
exposedField MFString justify ["BEGIN"]
exposedField SFColor color 0 0.2 0.9
exposedField SFInt32 startLevel -1
exposedField SFInt32 endLevel -1
exposedField SFFloat width 1
exposedField SFFloat height 1
exposedField MFNode bulletShape USE SPHERE_BULLET
] {
body
Transform {
translation IS position
children [
DEF TRANSFORM Transform {
children ##IS bulletShape
[
Transform {
translation -0.1 -0.1 0
children [
Shape {
appearance DEF BULLETAPPEARANCE Appearance {
material Material {
diffuseColor IS color
}
}
geometry Sphere { radius 0.2 }
} ] }
]
}
]
}
script
DEF SCRIPT Script {
directOutput TRUE
field SFFloat width IS width
field SFFloat height IS height
field SFNode transform USE TRANSFORM
url "javascript:
function initialize() {
transform.translation = new SFVec3f(width/2,height/2,0);
transform.scale = new SFVec3f(width,height,width);
}
"
}
}
(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.