media @ VU
proto-text.vr
proto-text.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
text
Web3D/VR
PROTO text
[
field SFVec2f size 17.0 9.0
field MFNode lines []
] {
DEF TRANS Transform {
children IS lines
}
DEF SCRIPT Script {
directOutput TRUE
field SFNode Trans USE TRANS
field SFVec2f size IS size
field MFNode lines IS lines
url "vrmlscript:
function initialize()
{
Trans.translation = new SFVec3f(-size[0]/2 , size[1]/2 , 0);
var i = 0;
var x = 0;
var y = lines[0].size/2;
for(i=0;i<lines.length; i++){
var line = lines[i];
if(line.justify[0] == 'MIDDLE') {
x = size[0]/2;
} else {
x = 0;
}
y = y - line.size;
line.translation = new SFVec3f(x,y,0);
}
}
"
}
}
(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.