nape.callbacks

..
BodyCallback

Callback object for Body type events.

This, like all other callback objects are automatically reused and you should not keep any reference to them.

BodyListener

Event listener for Body type events.

The events that can be caught are WAKE and SLEEP type events. Theses listeners will only operate on Bodys, not Interactors in general.

Callback

Base type for Callback event objects.

Callback objects are automatically reused and you should not keep references to them.

CbEvent

Enumeration of possible callback event types.

CbType

Callback Type applied to Interactors and Constraints.

Callback types are ranged over by listeners.

CbTypeIterator

Haxe Iterator compatible iterator over Nape list.

CbTypeList

Nape list of CbType type objects

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 (var i:int = 0; i < list.length; i++) {

ConstraintCallback

Callback object for Constraint type events.

This, like all other callback objects are automatically reused and you should not keep any reference to them.

ConstraintListener

Event listener for Constraint type events.

The events that can be caught are WAKE, SLEEP and BREAK type events. Theses listeners will only operate on Constraints.

InteractionCallback

Callback object for Interaction type events.

This, like all other callback objects are automatically reused and you should not keep any reference to them.

InteractionListener

Event listener for Interaction type events.

Interaction type events can occur between any two Interactors (whether they be Shapes, Bodys, Compounds or a mix thereof).

The events that can be caught are BEGIN, ONGOING, and END type events. Theses listeners will operate between pairs of Interactors.

InteractionType

Enumeration of Interaction types.

Listener

Base type for all Nape callback listeners.

ListenerIterator

Haxe Iterator compatible iterator over Nape list.

ListenerList

Nape list of Listener type objects

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 (var i:int = 0; i < list.length; i++) {

ListenerType

Enumeration of Listener types.

OptionType

OptionType representing matching behaviour for Listeners.

An object's set of CbType's 'matches' against an OptionType iff. the OptionType's includes list intersects the object's set of CbTypes and the OptionType's excludes list 'does not' intersect the object's set of CbTypes.

option = new OptionType([A, B], [C, D]);
obj.cbTypes = [] // => does not match option.
obj.cbTypes = [A] // => matches the option
obj.cbTypes = [A, C] // => does not match option.
The optionType's includes and excludes list are managed to be always disjoint: The action of including an already excluded type serves to remove it from the excludes list, equalliy excluding an already included type serves to remove it from the includes list.
var option = new OptionType();
option.including(A); // option = {[A]:[]}
option.excluding(A); // option = {[]:[]}
option.excluding(A); // option = {[]:[A]}
option.including(A); // option = {[A]:[]}

PreCallback

Callback object for Pre-Interaction type events.

This, like all other callback objects are automatically reused and you should not keep any reference to them.

PreFlag

Enumeration of interaction states for arbiters. These values are returned by PreListener callback handlers.

PreListener

Event listener for Pre-Interaction type events.

Pre-Interaction type events can occur between any two Interactors (whether they be Shapes, Bodys, Compounds or a mix thereof).