Internally this list is at present implemented as a linked list with
object pooled nodes and iterators with various fast paths made for
standard access patterns (For instance accessing successive elements
runs in constant time when using random access functions)

Iteration of this list can be done in various ways, but the preferred
way on all targets, is through use of the foreach function:

list.foreach(function (obj) {
});

This method is inlined so that in haxe no closure will need to be created.

In AS3, a closure would need to be created in general, so for performance
reasons you 'may' choose to use iteration as follows:

Internally this list is at present implemented as a linked list with
object pooled nodes and iterators with various fast paths made for
standard access patterns (For instance accessing successive elements
runs in constant time when using random access functions)

Iteration of this list can be done in various ways, but the preferred
way on all targets, is through use of the foreach function:

list.foreach(function (obj) {
});

This method is inlined so that in haxe no closure will need to be created.

In AS3, a closure would need to be created in general, so for performance
reasons you 'may' choose to use iteration as follows:

For a given interaction type, two Shapes will be permitted to interact only if
(shape1.group & shape2.mask) != 0 && (shape2.group & shape1.mask) != 0

There are 32 real groups corresponding to a set bit in the group/mask fields. For instance
a group value of 0x120 corresponds to the 'real' groups 5 and 8 as 0x120 = (1<<5) | (1<<8)

Nape provides group/mask for each interaction type. The actual precedence of interactions
is further defined simply as: Sensor > Fluid > Collision.
Two static bodies can never interact, and with the exception of sensor interaction, at least one
of the two bodies must be dynamic.
Sensor interactions have the highest precedence, followed by fluid and then collisions.
Sensor interaction is permitted only if one of the shapes is sensorEnabled, whilst fluid
is permitted only if one of the shapes is fluidEnabled.

Internally this list is at present implemented as a linked list with
object pooled nodes and iterators with various fast paths made for
standard access patterns (For instance accessing successive elements
runs in constant time when using random access functions)

Iteration of this list can be done in various ways, but the preferred
way on all targets, is through use of the foreach function:

list.foreach(function (obj) {
});

This method is inlined so that in haxe no closure will need to be created.

In AS3, a closure would need to be created in general, so for performance
reasons you 'may' choose to use iteration as follows: