#VRML V2.0 utf8 WorldInfo { title "DropSensor Test5" info [ "2001/1/17 by GoGoGo" "http://www1.plala.or.jp/Studio_GoGoGo/" ] } Viewpoint {position 0 13 14 orientation 1 0 0 -0.7 description "initial"} #オブジェ DEF Obj Transform {} #ホワイトボード DEF DS DropSensor {} Shape { appearance Appearance { material Material {emissiveColor 0.4 0.4 0.4} } geometry IndexedFaceSet { coord Coordinate {point [-10 0 6, 10 0 6, 10 0 -6, -10 0 -6]} coordIndex [0 1 2 3] } } #スクリプト DEF SC Script { eventIn MFString URL eventIn SFVec3f hitPoint eventOut MFNode addChildren field SFString st1 "Transform {translation " field SFString st3 " children [Inline {url \"" field SFString st4 "\"}]}" url "javascript: function hitPoint(value){ st2=value; } function URL(value){ addChildren=Browser.createVrmlFromString(st1+st2+st3+value[0]+st4); }" } ROUTE DS.url TO SC.URL ROUTE DS.hitPoint_changed TO SC.hitPoint ROUTE SC.addChildren TO Obj.addChildren