The script can access any exposedField, eventIn or eventOut of any node to which it has a pointer: |
DEF MyCube3 Transform { } |
DEF Example_3 Script { |
field SFNode node USE MyCube3 |
eventIn SFVec3f pos |
directOutput TRUE |
url "javascript: |
function pos(value) { |
node.set_translation = value; |
}" |
} |