media @ VU
web3d-problem-touch.vr
web3d-problem-touch.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
Web3D/VR
touchsensor
monitor
#@proto @vr-extern-monitor.wrl
group
Group {
children [
DEF message monitor { translation 2 2 0 string "wait" }
DEF touch TouchSensor {}
DEF script Script {
directOutput TRUE
eventIn SFVec2f feel
field SFNode message USE message
field SFNode touch USE touch
url "javascript:
function feel(value) {
str_x = 'x: ' + value.x;
str_y = ' y:' + value.y;
str = str_x + ' ' + str_y;
print(str);
message.string = new MFString(str_x,str_y);
}
"
}
shape
Shape {
geometry Box { } ## default
appearance Appearance {
texture MovieTexture {
loop TRUE
url "@logo.gif"
}
}
}
]
ROUTE touch.hitTexCoord_changed TO script.feel
}
scene
Viewpoint { position 0 0 10 }
(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.