<stack> creates a stack structure by arranging all the children objects into a "stack" along the z axis.

The first child remains at the same position. The rest of the children are re-positioned in such a way that each child is vertically above to the previous child along the z axis.

In terms of alignment, all objects are aligned to the middle along the x and y axes. A spacing attribute can be optionally provided to specify how much space to add between every two objects.

In the example below, three cubes of varying sizes are grouped into a stack, automatically aligned to center along the x and y axes, and have a spacing of 5 between every two cubes. Note that the first child (smallest, black) is at the top of the stack, while the last child (largest) is at the base of the stack.