1 | DEF Box1 Transform { ... DEF Start TouchSensor {} ...} |
2 | DEF DATA Transform { } |
3 | DEF BxAction Script { |
4 | eventIn SFBool isActive |
5 | field SFNode node USE DATA // A node to add these objects |
6 | field SFInt32 cone_count 0 |
7 | url "vrmlscript: |
8 | function isActive(value,time) |
9 | { if(value==true) |
10 | { node.addChildren = Browser.createVrmlFromString(' DEF Bx_'+ |
11 | cone_count+' Transform { children Shape { geometry Box {} }}'); |
12 | cone_count++;} |
13 | }" } |
14 | ROUTE Start.isActive TO BxAction.isActive |