##@ picture ## #@extern @vr-extern-proto-object-box.wrl PROTO Picture [ exposedField SFVec3f scale 1 1 1 exposedField SFColor color 0.3 0.3 0.3 exposedField SFFloat transparency 0 field SFVec2f position 0 0 field SFVec2f size 1 1 exposedField SFBool touchEnabled FALSE eventOut SFTime touchTime exposedField MFString texture [] ] { DEF TRANS Transform { scale IS scale children [ DEF TOUCHSENSOR TouchSensor { enabled IS touchEnabled touchTime IS touchTime } Shape { appearance Appearance { texture ImageTexture { url IS texture } } geometry DEF WINDOWBOX box { } } ] } DEF SCRIPT Script { field SFNode transformNode USE TRANS eventOut SFVec3f set_size field SFVec2f position IS position field SFVec2f size IS size url "vrmlscript: function initialize() { transformNode.translation = new SFVec3f(position.x,position.y,0); set_size = new SFVec3f(size.x,size.y,0.02); } " } ROUTE SCRIPT.set_size TO WINDOWBOX.size } ##