<?xml version="1.0" encoding="UTF-8"?>
<X3D>
<Scene>
<Viewpoint position='0 10 12' orientation='1 0 0 -0.78'/>
<NavigationInfo
type='
"EXAMINE"'
/>
<Transform>
<Shape>
<Appearance>
<Material diffuseColor='0.6 0.3 0'/>
</Appearance>
<Box size='10 0.1 10'/>
</Shape>
<TouchSensor DEF='ThS'/>
</Transform>
<Group DEF='Balls-Gp'>
</Group>
<Script DEF='Sc' directOutput='TRUE'>
<field accessType='inputOnly' type='SFVec3f' name='set_hitPoint'/>
<field accessType='inputOnly' type='MFNode' name='set_children'/>
<field accessType='initializeOnly' type='SFVec3f' name='pos' value='0 0 0'/>
<field accessType='initializeOnly' type='MFString' name='protoUrl' value='"proto_colorball_1_00.x3d"'/>
<field accessType='initializeOnly' type='SFNode' name='BallsGp'>
<Group USE='Balls-Gp'/>
</field>
<![CDATA[ecmascript:
function set_hitPoint (vec) {
pos = vec;
Browser.createVrmlFromURL( protoUrl, BallsGp, 'addChildren' );
}
function set_children (nodes,et) {
var last = nodes.length - 1;
nodes[last].ballPosition = pos;
nodes[last].startFloat = et + 1;
}
]]>
</Script>
<ROUTE fromNode='ThS' fromField='hitPoint_changed' toNode='Sc' toField='set_hitPoint'/>
<ROUTE fromNode='Balls-Gp' fromField='children' toNode='Sc' toField='set_children'/>
</Scene>
</X3D>