This chapter provides a detailed definition of the various elementary actions used in script commands.
add_node ‐ A node addition action
None.
This action is used to add a node. The node that is included in the add_node element defines the new node that will be added as daughter node of the target node(s) when the action is executed.
One of the following elements must occur in add_node: node or use.
A leaf node.
The example below defines an action that adds a new sphere node.
<add_node>
<node id="sphere_#{#n}">
<sphere id="sphere" radius="(0.05+({#n}*.02))"
sky_sphere="false" segments="{#segments}">
<texture encoding="jpeg" xlink:href="sky.jpg"
id="sky" tile_s="1" tile_t="-1" />
</sphere>
</node/>
</add_node>