body
DEF TRANSFORMXX Transform {
translation IS position
children [
DEF TRANSFORM Transform {
translation IS location
rotation IS rotation
scale IS scale
children [
DEF BOXTRANSFORM Transform {
translation 0 0 -0.015
}
Shape {
appearance Appearance {
material Material {
diffuseColor 0 0 0
specularColor 0 0 0
emissiveColor IS color
transparency IS alpha
}
}
geometry DEF TEXT Text {
string IS string
fontStyle FontStyle {
size IS height
family IS family
style IS style
justify [ "BEGIN" ]
topToBottom TRUE
leftToRight TRUE
}
}
}
DEF xswitch Switch {
whichChoice -1
choice [
Transform {
rotation IS arotation
translation IS atrans
scale IS ascale
children [
Switch {
whichChoice IS atype
choice [
Shape {
geometry Box { size IS asize }
appearance DEF APP Appearance {
material Material {
diffuseColor IS acolor
transparency IS aalpha
}
##texture ImageTexture { url IS annot }
texture DEF MOVIE MovieTexture { url IS annot }
}
} ## 0
Transform {
scale 3 3 3
children [
Shape {
geometry nsphere { }
appearance USE APP
} ] } ## 1
Shape {
geometry IS anode
appearance USE APP
} ## 2
Transform {
children [
Transform {
translation 0 0 -1
children [
Shape {
geometry Box { size IS asize }
appearance USE APP
}
] }
Shape {
geometry IS anode
##appearance USE APP
} ]} ## 3
Transform {
children [
Transform {
scale 3 3 3
children [
Shape {
geometry nsphere { }
appearance USE APP
} ] }
Shape {
geometry IS anode
##appearance USE APP
} ]} ## 4
Layer3D {
depth -100
translation 0 0
size 1 1
viewpoint Viewpoint { position 0 0 10 }
navigationInfo NavigationInfo { headlight TRUE }
children [
Transform {
rotation IS arotation
translation IS atrans
scale IS ascale
children [
Inline { url IS ascene }
]}
]
} ## 5
]} ## atype
]
}
]} ## Switch
DEF touch TouchSensor { }
DEF script Script {
directOutput TRUE
eventIn SFBool over
field SFNode xswitch USE xswitch
field SFNode movie USE MOVIE
url "javascript:
function over(v,t) {
Browser.print('OK ' + v);
if (v) {
xswitch.whichChoice = 0;
//movie.startTime = t;
movie.loop = TRUE;
}
else {
xswitch.whichChoice = -1;
//movie.stopTime = t;
movie.loop = FALSE;
}
}"
}
ROUTE touch.isOver TO script.over
]
} ] }