Donate Donating to nape helps push me to keep on making it better!
Donators | Forums | Project Page
Loading
Index
Documentation | Demos | API
Current documented version:
Milestone 9.1 : "r8"

For general development purposes, you should always use a debug build. Release builds should only be used when you are ready to release a final product to get that little bit of extra speed. Debug builds contain lots of error catching in the API to make sure that you aren't doing anything undefined or simply wrong, you'll save yourself a lot of headache using the debug build.

If you happen to be helping me out with some bug hunting, then I'll likely ask you to use the assert build which contains thousands of assertions throughout the internal engine for things which aren't your fault! DO NOT use these for general purpose use as they run very slowly!

Download:
For Haxe you can use haxelib project nape to keep up to date
For AS3 users, build versions can be downloaded below:
Main
Versions prior to 9.1

Haxe compiler options
For debug builds, no additional options are required.
For release builds, specify: -D NAPE_RELEASE_BUILD
For assert builds, specify: -D NAPE_ASSERT -D NAPE_NO_INLINE
If working solely in Haxe you can/should use --no-inline instead of -D NAPE_NO_INLINE as well as -debug
For creating AS3 .swcs or Haxe .swfs for use with -swf-lib you need to use my flib tool available on my github page as well as specifying the additional options: -D swc -D flib



Note on conventions.
● Throughout documentation I make use of the pseudo modifier 'const' (after C/C++ const modifier) on both arguments and methods to specify that the given argument will not be modified, or that the given method will not modify the object on which it is called.

For example: const function example(x:const Vec2)  Specifies that in calling the function example, neither the argument 'x' nor the 'this' object on which the method is called will be modified.

● Along with the 'const' pseudo-modifier, I also make use of the 'Maybe' pseudo-type to specify that in the return of a method, the value may be null.

● In the documentation 'CompatiblePolygon' refers to either: a Vec2List, an Array<Vec2>, a flash.Vector<Vec2> for flash9+ targets, or a GeomPoly. Whilst a Polygon Shape type is not a CompatiblePolygon; polygon::localVertices or polygon::worldVertices are CompatiblePolygon's as these are Vec2List's

Documentation
Doc
Overview
Brief(ish) overview of everything in Nape.



Demos
Demo
Filtering
Short demonstration of InteractionFilter and InteractionGroup's
BodyFromGraphic
Demonstrating MarchingSquares to generate bodies from graphics and bitmaps.
DynamicDestruction
Showing how one might perform destructions of dynamic objects.
StressPyramid
Pyramid stress-test
Portals
Complex portal physics demo.
PerlinSquares
Demo of Marching squares and convex decompositions using 3D evolving Perlin Noise.
Constraints
Demo of constraint types.
WaterBalls
Demo of dynamic water objects and marching squares.
Callbacks
Demonstration of most callback events.
UserDefinedConstraints
Demonstration of User-Defined Constraints
Cutting
Simple decomposition and line cutting demonstraint
DestructableTerrain
Demonstration of MarchingSquares for destructable terrain.



API
Package
nape
Nape Physics Engine