2020-07-28 20:21:55 -07:00
[Planck.js API Doc ](README.md ) › [Globals ](globals.md )
# Planck.js API Doc
## Index
### Enumerations
* [ContactFeatureType ](enums/contactfeaturetype.md )
2021-04-16 17:10:15 +02:00
* [EPAxisType ](enums/epaxistype.md )
2020-07-28 20:21:55 -07:00
* [ManifoldType ](enums/manifoldtype.md )
2021-04-16 17:10:15 +02:00
* [PointState ](enums/pointstate.md )
* [SeparationFunctionType ](enums/separationfunctiontype.md )
2020-07-28 20:21:55 -07:00
* [TOIOutputState ](enums/toioutputstate.md )
2021-04-16 17:10:15 +02:00
* [VertexType ](enums/vertextype.md )
2020-07-28 20:21:55 -07:00
### Classes
* [AABB ](classes/aabb.md )
* [Body ](classes/body.md )
* [BoxShape ](classes/boxshape.md )
* [BroadPhase ](classes/broadphase.md )
* [ChainShape ](classes/chainshape.md )
* [CircleShape ](classes/circleshape.md )
2021-04-16 17:10:15 +02:00
* [ClipVertex ](classes/clipvertex.md )
2020-07-28 20:21:55 -07:00
* [Contact ](classes/contact.md )
* [ContactEdge ](classes/contactedge.md )
2021-04-16 17:10:15 +02:00
* [ContactFeature ](classes/contactfeature.md )
* [ContactID ](classes/contactid.md )
2020-07-28 20:21:55 -07:00
* [ContactImpulse ](classes/contactimpulse.md )
2021-04-16 17:10:15 +02:00
* [DistanceInput ](classes/distanceinput.md )
2020-07-28 20:21:55 -07:00
* [DistanceJoint ](classes/distancejoint.md )
2021-04-16 17:10:15 +02:00
* [DistanceOutput ](classes/distanceoutput.md )
2020-07-28 20:21:55 -07:00
* [DistanceProxy ](classes/distanceproxy.md )
* [DynamicTree ](classes/dynamictree.md )
2021-04-16 17:10:15 +02:00
* [EPAxis ](classes/epaxis.md )
2020-07-28 20:21:55 -07:00
* [EdgeShape ](classes/edgeshape.md )
* [Fixture ](classes/fixture.md )
2021-04-16 17:10:15 +02:00
* [FixtureProxy ](classes/fixtureproxy.md )
2020-07-28 20:21:55 -07:00
* [FrictionJoint ](classes/frictionjoint.md )
* [GearJoint ](classes/gearjoint.md )
2021-04-16 17:10:15 +02:00
* [Iterator ](classes/iterator.md )
* [Jacobian ](classes/jacobian.md )
2020-07-28 20:21:55 -07:00
* [Joint ](classes/joint.md )
2021-04-16 17:10:15 +02:00
* [JointEdge ](classes/jointedge.md )
* [Manifold ](classes/manifold.md )
* [ManifoldPoint ](classes/manifoldpoint.md )
* [MassData ](classes/massdata.md )
2020-07-28 20:21:55 -07:00
* [Mat22 ](classes/mat22.md )
* [Mat33 ](classes/mat33.md )
* [MotorJoint ](classes/motorjoint.md )
* [MouseJoint ](classes/mousejoint.md )
* [PolygonShape ](classes/polygonshape.md )
2021-04-16 17:10:15 +02:00
* [Pool ](classes/pool.md )
2020-07-28 20:21:55 -07:00
* [Position ](classes/position.md )
* [PrismaticJoint ](classes/prismaticjoint.md )
* [PulleyJoint ](classes/pulleyjoint.md )
2021-04-16 17:10:15 +02:00
* [ReferenceFace ](classes/referenceface.md )
2020-07-28 20:21:55 -07:00
* [RevoluteJoint ](classes/revolutejoint.md )
* [RopeJoint ](classes/ropejoint.md )
* [Rot ](classes/rot.md )
2021-04-16 17:10:15 +02:00
* [SeparationFunction ](classes/separationfunction.md )
2021-04-30 16:24:24 -07:00
* [Settings ](classes/settings.md )
2020-07-28 20:21:55 -07:00
* [Shape ](classes/shape.md )
2021-04-16 17:10:15 +02:00
* [Simplex ](classes/simplex.md )
* [SimplexCache ](classes/simplexcache.md )
* [SimplexVertex ](classes/simplexvertex.md )
2020-07-28 20:21:55 -07:00
* [Solver ](classes/solver.md )
* [Sweep ](classes/sweep.md )
2021-04-16 17:10:15 +02:00
* [TOIInput ](classes/toiinput.md )
* [TOIOutput ](classes/toioutput.md )
* [TempPolygon ](classes/temppolygon.md )
* [TimeStep ](classes/timestep.md )
2020-07-28 20:21:55 -07:00
* [Transform ](classes/transform.md )
* [TreeNode ](classes/treenode.md )
* [Vec2 ](classes/vec2.md )
* [Vec3 ](classes/vec3.md )
* [Velocity ](classes/velocity.md )
* [VelocityConstraintPoint ](classes/velocityconstraintpoint.md )
* [WeldJoint ](classes/weldjoint.md )
* [WheelJoint ](classes/wheeljoint.md )
* [World ](classes/world.md )
2021-04-16 17:10:15 +02:00
* [WorldManifold ](classes/worldmanifold.md )
2020-07-28 20:21:55 -07:00
### Interfaces
2021-05-06 15:35:56 -07:00
* [ActiveKeys ](interfaces/activekeys.md )
2020-07-28 20:21:55 -07:00
* [BodyDef ](interfaces/bodydef.md )
* [DistanceJointDef ](interfaces/distancejointdef.md )
* [DistanceJointOpt ](interfaces/distancejointopt.md )
* [FixtureDef ](interfaces/fixturedef.md )
* [FixtureOpt ](interfaces/fixtureopt.md )
* [FrictionJointDef ](interfaces/frictionjointdef.md )
* [FrictionJointOpt ](interfaces/frictionjointopt.md )
* [GearJointDef ](interfaces/gearjointdef.md )
* [GearJointOpt ](interfaces/gearjointopt.md )
* [JointDef ](interfaces/jointdef.md )
* [JointOpt ](interfaces/jointopt.md )
2021-04-16 17:10:15 +02:00
* [MaxSeparation ](interfaces/maxseparation.md )
2020-07-28 20:21:55 -07:00
* [MotorJointDef ](interfaces/motorjointdef.md )
* [MotorJointOpt ](interfaces/motorjointopt.md )
* [MouseJointDef ](interfaces/mousejointdef.md )
* [MouseJointOpt ](interfaces/mousejointopt.md )
* [PrismaticJointDef ](interfaces/prismaticjointdef.md )
* [PrismaticJointOpt ](interfaces/prismaticjointopt.md )
* [PulleyJointDef ](interfaces/pulleyjointdef.md )
* [PulleyJointOpt ](interfaces/pulleyjointopt.md )
* [RayCastInput ](interfaces/raycastinput.md )
* [RayCastOutput ](interfaces/raycastoutput.md )
* [RevoluteJointDef ](interfaces/revolutejointdef.md )
* [RevoluteJointOpt ](interfaces/revolutejointopt.md )
* [RopeJointDef ](interfaces/ropejointdef.md )
* [RopeJointOpt ](interfaces/ropejointopt.md )
2021-05-06 15:35:56 -07:00
* [Testbed ](interfaces/testbed.md )
2020-07-28 20:21:55 -07:00
* [WeldJointDef ](interfaces/weldjointdef.md )
* [WeldJointOpt ](interfaces/weldjointopt.md )
* [WheelJointDef ](interfaces/wheeljointdef.md )
* [WheelJointOpt ](interfaces/wheeljointopt.md )
* [WorldDef ](interfaces/worlddef.md )
### Type aliases
* [BodyType ](globals.md#bodytype )
2021-04-16 17:10:15 +02:00
* [ContactCallback ](globals.md#contactcallback )
2021-05-08 11:13:58 -07:00
* [DynamicTreeQueryCallback ](globals.md#dynamictreequerycallback )
2020-07-28 20:21:55 -07:00
* [EvaluateFunction ](globals.md#evaluatefunction )
2021-05-08 11:13:58 -07:00
* [RayCastCallback ](globals.md#raycastcallback )
2020-07-28 20:21:55 -07:00
* [ShapeType ](globals.md#shapetype )
2021-04-16 17:10:15 +02:00
* [WorldAABBQueryCallback ](globals.md#worldaabbquerycallback )
* [WorldRayCastCallback ](globals.md#worldraycastcallback )
### Variables
* [DEBUG_SOLVER ](globals.md#const-debug_solver )
* [DYNAMIC ](globals.md#const-dynamic )
* [KINEMATIC ](globals.md#const-kinematic )
* [SID ](globals.md#let-sid )
* [STATIC ](globals.md#const-static )
* [_ASSERT ](globals.md#const-_assert )
* [_DEBUG ](globals.md#const-_debug )
* [atLowerLimit ](globals.md#const-atlowerlimit )
* [atUpperLimit ](globals.md#const-atupperlimit )
* [edgeAxis ](globals.md#const-edgeaxis )
* [equalLimits ](globals.md#const-equallimits )
* [inactiveLimit ](globals.md#const-inactivelimit )
* [internal ](globals.md#const-internal )
* [math ](globals.md#const-math )
* [polygonAxis ](globals.md#const-polygonaxis )
* [polygonBA ](globals.md#const-polygonba )
* [rf ](globals.md#const-rf )
* [s_registers ](globals.md#const-s_registers )
* [s_subStep ](globals.md#const-s_substep )
2021-05-11 18:30:36 -07:00
* [schema ](globals.md#const-schema )
2021-04-16 17:10:15 +02:00
* [serializer ](globals.md#const-serializer )
### Functions
* [ChainCircleContact ](globals.md#chaincirclecontact )
* [ChainPolygonContact ](globals.md#chainpolygoncontact )
* [CircleCircleContact ](globals.md#circlecirclecontact )
* [CollideCircles ](globals.md#collidecircles )
* [CollideEdgeCircle ](globals.md#collideedgecircle )
* [CollideEdgePolygon ](globals.md#collideedgepolygon )
* [CollidePolygonCircle ](globals.md#collidepolygoncircle )
* [CollidePolygons ](globals.md#collidepolygons )
* [ComputeCentroid ](globals.md#computecentroid )
* [Distance ](globals.md#distance )
* [EdgeCircleContact ](globals.md#edgecirclecontact )
* [EdgePolygonContact ](globals.md#edgepolygoncontact )
* [PolygonCircleContact ](globals.md#polygoncirclecontact )
* [PolygonContact ](globals.md#polygoncontact )
* [Serializer ](globals.md#serializer )
* [TimeOfImpact ](globals.md#timeofimpact )
2021-05-06 15:35:56 -07:00
* [Viewer ](globals.md#viewer )
2021-04-16 17:10:15 +02:00
* [assert ](globals.md#const-assert )
* [clipSegmentToLine ](globals.md#clipsegmenttoline )
* [debug ](globals.md#const-debug )
* [default ](globals.md#default )
* [diff ](globals.md#const-diff )
* [findIncidentEdge ](globals.md#findincidentedge )
* [findMaxSeparation ](globals.md#findmaxseparation )
* [getPointStates ](globals.md#getpointstates )
* [mixFriction ](globals.md#mixfriction )
* [mixRestitution ](globals.md#mixrestitution )
* [now ](globals.md#const-now )
* [testOverlap ](globals.md#testoverlap )
2021-05-06 15:35:56 -07:00
* [testbed ](globals.md#testbed )
2021-04-16 17:10:15 +02:00
### Object literals
* [BodyDefDefault ](globals.md#const-bodydefdefault )
* [DEFAULTS ](globals.md#const-defaults )
* [FixtureDefDefault ](globals.md#const-fixturedefdefault )
* [WorldDefDefault ](globals.md#const-worlddefdefault )
* [maxSeparation ](globals.md#const-maxseparation )
2020-07-28 20:21:55 -07:00
## Type aliases
### BodyType
Ƭ **BodyType** : *"static" | "kinematic" | "dynamic"*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:43 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L43 )*
2020-07-28 20:21:55 -07:00
___
2021-04-16 17:10:15 +02:00
### ContactCallback
2020-07-28 20:21:55 -07:00
2021-04-16 17:10:15 +02:00
Ƭ **ContactCallback** : *function*
2020-07-28 20:21:55 -07:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:76 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L76 )*
2020-07-28 20:21:55 -07:00
#### Type declaration:
2021-05-02 17:18:33 -07:00
▸ (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2020-07-28 20:21:55 -07:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
2020-07-28 20:21:55 -07:00
`indexA` | number |
2021-05-02 17:18:33 -07:00
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
2020-07-28 20:21:55 -07:00
`indexB` | number |
___
2021-05-08 11:13:58 -07:00
### DynamicTreeQueryCallback
Ƭ **DynamicTreeQueryCallback** : *function*
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/DynamicTree.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/DynamicTree.ts#L36 )*
2021-05-08 11:13:58 -07:00
#### Type declaration:
▸ (`nodeId` : number): *boolean*
**Parameters:**
Name | Type |
------ | ------ |
`nodeId` | number |
___
2020-07-28 20:21:55 -07:00
### EvaluateFunction
Ƭ **EvaluateFunction** : *function*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:66 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L66 )*
2020-07-28 20:21:55 -07:00
#### Type declaration:
2021-05-02 17:18:33 -07:00
▸ (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2020-07-28 20:21:55 -07:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
2020-07-28 20:21:55 -07:00
`indexA` | number |
2021-05-02 17:18:33 -07:00
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
2020-07-28 20:21:55 -07:00
`indexB` | number |
___
2021-05-08 11:13:58 -07:00
### RayCastCallback
Ƭ **RayCastCallback** : *function*
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/AABB.ts:43 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/AABB.ts#L43 )*
2021-05-08 11:13:58 -07:00
#### Type declaration:
▸ (`subInput` : [RayCastInput ](interfaces/raycastinput.md ), `id` : number): *number*
**Parameters:**
Name | Type |
------ | ------ |
`subInput` | [RayCastInput ](interfaces/raycastinput.md ) |
`id` | number |
___
2020-07-28 20:21:55 -07:00
### ShapeType
Ƭ **ShapeType** : *"circle" | "edge" | "polygon" | "chain"*
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/Shape.ts:131 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Shape.ts#L131 )*
2021-04-16 17:10:15 +02:00
___
### WorldAABBQueryCallback
Ƭ **WorldAABBQueryCallback** : *function*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:93 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L93 )*
2021-04-16 17:10:15 +02:00
Called for each fixture found in the query AABB. It may return `false` to terminate the query.
#### Type declaration:
2021-05-02 17:18:33 -07:00
▸ (`fixture` : [Fixture ](classes/fixture.md )): *boolean*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`fixture` | [Fixture ](classes/fixture.md ) |
2021-04-16 17:10:15 +02:00
___
### WorldRayCastCallback
Ƭ **WorldRayCastCallback** : *function*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:88 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L88 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
Callback function for ray casts, see [World.rayCast ](classes/world.md#raycast ).
2021-04-16 17:10:15 +02:00
Called for each fixture found in the query. You control how the ray cast
proceeds by returning a float: return -1: ignore this fixture and continue
return 0: terminate the ray cast return fraction: clip the ray to this point
return 1: don't clip the ray and continue
**`param` ** The fixture hit by the ray
**`param` ** The point of initial intersection
**`param` ** The normal vector at the point of intersection
**`param` **
**`returns` ** -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue
#### Type declaration:
2021-05-02 17:18:33 -07:00
▸ (`fixture` : [Fixture ](classes/fixture.md ), `point` : [Vec2 ](classes/vec2.md ), `normal` : [Vec2 ](classes/vec2.md ), `fraction` : number): *number*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`fixture` | [Fixture ](classes/fixture.md ) |
`point` | [Vec2 ](classes/vec2.md ) |
`normal` | [Vec2 ](classes/vec2.md ) |
2021-04-16 17:10:15 +02:00
`fraction` | number |
## Variables
### `Const` DEBUG_SOLVER
• **DEBUG_SOLVER** : *false* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:43 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L43 )*
2021-04-16 17:10:15 +02:00
___
### `Const` DYNAMIC
• **DYNAMIC** : *"dynamic"* = "dynamic"
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:47 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L47 )*
2021-04-16 17:10:15 +02:00
___
### `Const` KINEMATIC
• **KINEMATIC** : *"kinematic"* = "kinematic"
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:46 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L46 )*
2021-04-16 17:10:15 +02:00
___
### `Let` SID
• **SID** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/serializer/index.ts:10 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/index.ts#L10 )*
2021-04-16 17:10:15 +02:00
___
### `Const` STATIC
• **STATIC** : *"static"* = "static"
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:45 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L45 )*
2021-04-16 17:10:15 +02:00
___
### `Const` _ASSERT
• **_ASSERT** : *boolean* = typeof ASSERT === 'undefined' ? false : ASSERT
2021-05-11 18:30:36 -07:00
*Defined in [src/util/common.ts:2 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L2 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Math.ts:29 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Math.ts#L29 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Vec2.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec2.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/AABB.ts:31 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/AABB.ts#L31 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/DynamicTree.ts:33 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/DynamicTree.ts#L33 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Rot.ts:31 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Rot.ts#L31 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Transform.ts:31 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Transform.ts#L31 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Sweep.ts:32 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Sweep.ts#L32 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Mat22.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat22.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/Distance.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Distance.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:40 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L40 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/TimeOfImpact.ts:40 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/TimeOfImpact.ts#L40 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Solver.ts:38 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Solver.ts#L38 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Joint.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:41 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L41 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/BroadPhase.ts:33 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/BroadPhase.ts#L33 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:38 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L38 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Vec3.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec3.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Mat33.ts:31 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat33.ts#L31 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CircleShape.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CircleShape.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/PolygonShape.ts:37 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/PolygonShape.ts#L37 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/ChainShape.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/ChainShape.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideCircle.ts:35 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCircle.ts#L35 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgeCircle.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideCirclePolygone.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCirclePolygone.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:39 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L39 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/FrictionJoint.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:39 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L39 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:39 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L39 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/GearJoint.ts:38 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/GearJoint.ts#L38 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MotorJoint.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L36 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MouseJoint.ts:37 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L37 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PulleyJoint.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PulleyJoint.ts#L36 )*
2021-04-16 17:10:15 +02:00
___
### `Const` _DEBUG
• **_DEBUG** : *boolean* = typeof DEBUG === 'undefined' ? false : DEBUG
2021-05-11 18:30:36 -07:00
*Defined in [src/util/common.ts:1 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L1 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Math.ts:28 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Math.ts#L28 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Vec2.ts:29 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec2.ts#L29 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/AABB.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/AABB.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Rot.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Rot.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Transform.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Transform.ts#L30 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Mat22.ts:29 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat22.ts#L29 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Solver.ts:37 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Solver.ts#L37 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Vec3.ts:29 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec3.ts#L29 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Mat33.ts:30 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat33.ts#L30 )*
2021-04-16 17:10:15 +02:00
___
### `Const` atLowerLimit
• **atLowerLimit** : *1* = 1
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:43 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L43 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:43 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L43 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RopeJoint.ts:35 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L35 )*
2021-04-16 17:10:15 +02:00
___
### `Const` atUpperLimit
• **atUpperLimit** : *2* = 2
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:44 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L44 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:44 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L44 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RopeJoint.ts:36 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L36 )*
2021-04-16 17:10:15 +02:00
___
### `Const` edgeAxis
• **edgeAxis** : *[EPAxis](classes/epaxis.md)‹ › * = new EPAxis()
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:110 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L110 )*
2021-04-16 17:10:15 +02:00
___
### `Const` equalLimits
• **equalLimits** : *3* = 3
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:45 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L45 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:45 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L45 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RopeJoint.ts:37 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L37 )*
2021-04-16 17:10:15 +02:00
___
### `Const` inactiveLimit
• **inactiveLimit** : *0* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:42 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L42 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:42 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L42 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RopeJoint.ts:34 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L34 )*
2021-04-16 17:10:15 +02:00
___
### `Const` internal
• **internal** : *object*
2021-05-11 18:30:36 -07:00
*Defined in [src/index.ts:64 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/index.ts#L64 )*
2021-05-06 15:35:56 -07:00
2021-05-11 18:30:36 -07:00
*Defined in [testbed/index.ts:890 ](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L890 )*
2021-05-06 15:35:56 -07:00
**`deprecated` ** Merged with main namespace
2021-04-16 17:10:15 +02:00
**`deprecated` ** Merged with main namespace
#### Type declaration:
___
### `Const` math
• **math** : *Math & object* = Object.create(Math)
2021-05-11 18:30:36 -07:00
*Defined in [src/common/Math.ts:32 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Math.ts#L32 )*
2021-04-16 17:10:15 +02:00
___
### `Const` polygonAxis
• **polygonAxis** : *[EPAxis](classes/epaxis.md)‹ › * = new EPAxis()
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:111 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L111 )*
2021-04-16 17:10:15 +02:00
___
### `Const` polygonBA
• **polygonBA** : *[TempPolygon](classes/temppolygon.md)‹ › * = new TempPolygon()
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:112 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L112 )*
2021-04-16 17:10:15 +02:00
___
### `Const` rf
• **rf** : *[ReferenceFace](classes/referenceface.md)‹ › * = new ReferenceFace()
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:113 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L113 )*
2021-04-16 17:10:15 +02:00
___
### `Const` s_registers
• **s_registers** : *any[]* = []
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:104 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L104 )*
2021-04-16 17:10:15 +02:00
___
### `Const` s_subStep
2021-05-02 17:18:33 -07:00
• **s_subStep** : *[TimeStep](classes/timestep.md)‹ › * = new TimeStep()
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Solver.ts:67 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Solver.ts#L67 )*
___
### `Const` schema
• **schema** : *any* = require('../schema.json')
*Defined in [src/serializer/__test__/Validator.test.ts:12 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/__test__/Validator.test.ts#L12 )*
2021-04-16 17:10:15 +02:00
___
### `Const` serializer
• **serializer** : *any* = new Serializer()
2021-05-11 18:30:36 -07:00
*Defined in [src/serializer/index.ts:140 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/index.ts#L140 )*
2021-04-16 17:10:15 +02:00
## Functions
### ChainCircleContact
2021-05-08 11:13:58 -07:00
▸ **ChainCircleContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgeCircle.ts:52 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L52 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### ChainPolygonContact
2021-05-08 11:13:58 -07:00
▸ **ChainPolygonContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:52 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L52 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### CircleCircleContact
2021-05-08 11:13:58 -07:00
▸ **CircleCircleContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideCircle.ts:40 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCircle.ts#L40 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### CollideCircles
2021-05-08 11:13:58 -07:00
▸ **CollideCircles** (`manifold` : [Manifold ](classes/manifold.md ), `circleA` : [CircleShape ](classes/circleshape.md ), `xfA` : [Transform ](classes/transform.md ), `circleB` : [CircleShape ](classes/circleshape.md ), `xfB` : [Transform ](classes/transform.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideCircle.ts:46 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCircle.ts#L46 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`circleA` | [CircleShape ](classes/circleshape.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`circleB` | [CircleShape ](classes/circleshape.md ) |
`xfB` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### CollideEdgeCircle
2021-05-08 11:13:58 -07:00
▸ **CollideEdgeCircle** (`manifold` : [Manifold ](classes/manifold.md ), `edgeA` : [EdgeShape ](classes/edgeshape.md ), `xfA` : [Transform ](classes/transform.md ), `circleB` : [CircleShape ](classes/circleshape.md ), `xfB` : [Transform ](classes/transform.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgeCircle.ts:68 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L68 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`edgeA` | [EdgeShape ](classes/edgeshape.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`circleB` | [CircleShape ](classes/circleshape.md ) |
`xfB` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### CollideEdgePolygon
2021-05-11 18:30:36 -07:00
▸ **CollideEdgePolygon** (`manifold` : [Manifold ](classes/manifold.md ), `edgeA` : [EdgeShape ](classes/edgeshape.md ), `xfA` : [Transform ](classes/transform.md ), `polygonB` : [PolygonShape ](classes/polygonshape.md ), `xfB` : [Transform ](classes/transform.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:119 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L119 )*
2021-04-16 17:10:15 +02:00
This function collides and edge and a polygon, taking into account edge
adjacency.
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
2021-05-08 11:13:58 -07:00
`edgeA` | [EdgeShape ](classes/edgeshape.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`polygonB` | [PolygonShape ](classes/polygonshape.md ) |
`xfB` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### CollidePolygonCircle
2021-05-11 18:30:36 -07:00
▸ **CollidePolygonCircle** (`manifold` : [Manifold ](classes/manifold.md ), `polygonA` : [PolygonShape ](classes/polygonshape.md ), `xfA` : [Transform ](classes/transform.md ), `circleB` : [CircleShape ](classes/circleshape.md ), `xfB` : [Transform ](classes/transform.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideCirclePolygone.ts:47 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCirclePolygone.ts#L47 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
2021-05-08 11:13:58 -07:00
`polygonA` | [PolygonShape ](classes/polygonshape.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`circleB` | [CircleShape ](classes/circleshape.md ) |
`xfB` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### CollidePolygons
2021-05-08 11:13:58 -07:00
▸ **CollidePolygons** (`manifold` : [Manifold ](classes/manifold.md ), `polyA` : [PolygonShape ](classes/polygonshape.md ), `xfA` : [Transform ](classes/transform.md ), `polyB` : [PolygonShape ](classes/polygonshape.md ), `xfB` : [Transform ](classes/transform.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:146 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L146 )*
2021-04-16 17:10:15 +02:00
Find edge normal of max separation on A - return if separating axis is found< br >
Find edge normal of max separation on B - return if separation axis is found< br >
Choose reference edge as min(minA, minB)< br >
Find incident edge< br >
Clip
The normal points from 1 to 2
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
2021-04-16 17:10:15 +02:00
`polyA` | [PolygonShape ](classes/polygonshape.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`polyB` | [PolygonShape ](classes/polygonshape.md ) |
`xfB` | [Transform ](classes/transform.md ) |
**Returns:** *void*
___
### ComputeCentroid
2021-05-11 18:30:36 -07:00
▸ **ComputeCentroid** (`vs` : [Vec2 ](classes/vec2.md )[], `count` : number): *[Vec2](classes/vec2.md)*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/PolygonShape.ts:529 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/PolygonShape.ts#L529 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`vs` | [Vec2 ](classes/vec2.md )[] |
2021-04-16 17:10:15 +02:00
`count` | number |
2021-05-11 18:30:36 -07:00
**Returns:** *[Vec2](classes/vec2.md)*
2021-04-16 17:10:15 +02:00
___
### Distance
▸ **Distance** (`output` : [DistanceOutput ](classes/distanceoutput.md ), `cache` : [SimplexCache ](classes/simplexcache.md ), `input` : [DistanceInput ](classes/distanceinput.md )): *void*
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/Distance.ts:94 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Distance.ts#L94 )*
2021-04-16 17:10:15 +02:00
Compute the closest points between two shapes. Supports any combination of:
CircleShape, PolygonShape, EdgeShape. The simplex cache is input/output. On
the first call set SimplexCache.count to zero.
**Parameters:**
Name | Type |
------ | ------ |
`output` | [DistanceOutput ](classes/distanceoutput.md ) |
`cache` | [SimplexCache ](classes/simplexcache.md ) |
`input` | [DistanceInput ](classes/distanceinput.md ) |
**Returns:** *void*
___
### EdgeCircleContact
2021-05-08 11:13:58 -07:00
▸ **EdgeCircleContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgeCircle.ts:42 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L42 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### EdgePolygonContact
2021-05-08 11:13:58 -07:00
▸ **EdgePolygonContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideEdgePolygon.ts:45 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L45 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### PolygonCircleContact
2021-05-11 18:30:36 -07:00
▸ **PolygonCircleContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollideCirclePolygone.ts:41 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCirclePolygone.ts#L41 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
2021-05-08 11:13:58 -07:00
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### PolygonContact
2021-05-08 11:13:58 -07:00
▸ **PolygonContact** (`manifold` : [Manifold ](classes/manifold.md ), `xfA` : [Transform ](classes/transform.md ), `fixtureA` : [Fixture ](classes/fixture.md ), `indexA` : number, `xfB` : [Transform ](classes/transform.md ), `fixtureB` : [Fixture ](classes/fixture.md ), `indexB` : number): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:41 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L41 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-08 11:13:58 -07:00
`manifold` | [Manifold ](classes/manifold.md ) |
`xfA` | [Transform ](classes/transform.md ) |
`fixtureA` | [Fixture ](classes/fixture.md ) |
`indexA` | number |
`xfB` | [Transform ](classes/transform.md ) |
`fixtureB` | [Fixture ](classes/fixture.md ) |
`indexB` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### Serializer
▸ **Serializer** (`opts?` : any): *void*
2021-05-11 18:30:36 -07:00
*Defined in [src/serializer/index.ts:12 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/index.ts#L12 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
`opts?` | any |
**Returns:** *void*
___
### TimeOfImpact
▸ **TimeOfImpact** (`output` : [TOIOutput ](classes/toioutput.md ), `input` : [TOIInput ](classes/toiinput.md )): *void*
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/TimeOfImpact.ts:91 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/TimeOfImpact.ts#L91 )*
2021-04-16 17:10:15 +02:00
Compute the upper bound on time before two shapes penetrate. Time is
represented as a fraction between [0,tMax]. This uses a swept separating axis
and may miss some intermediate, non-tunneling collision. If you change the
time interval, you should call this function again.
Note: use Distance to compute the contact point and normal at the time of
impact.
CCD via the local separating axis method. This seeks progression by computing
the largest time at which separation is maintained.
**Parameters:**
Name | Type |
------ | ------ |
`output` | [TOIOutput ](classes/toioutput.md ) |
`input` | [TOIInput ](classes/toiinput.md ) |
**Returns:** *void*
___
2021-05-06 15:35:56 -07:00
### Viewer
▸ **Viewer** (`world` : any, `opts` : any): *void*
2021-05-11 18:30:36 -07:00
*Defined in [testbed/index.ts:471 ](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L471 )*
2021-05-06 15:35:56 -07:00
**Parameters:**
Name | Type |
------ | ------ |
`world` | any |
`opts` | any |
**Returns:** *void*
___
2021-04-16 17:10:15 +02:00
### `Const` assert
2021-05-11 18:30:36 -07:00
▸ **assert** (`statement` : boolean, `err?` : string, `log?` : any): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/util/common.ts:9 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L9 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`statement` | boolean |
`err?` | string |
2021-04-16 17:10:15 +02:00
`log?` | any |
**Returns:** *void*
___
### clipSegmentToLine
2021-05-02 17:18:33 -07:00
▸ **clipSegmentToLine** (`vOut` : [ClipVertex ](classes/clipvertex.md )[], `vIn` : [ClipVertex ](classes/clipvertex.md )[], `normal` : [Vec2 ](classes/vec2.md ), `offset` : number, `vertexIndexA` : number): *number*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/Manifold.ts:323 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Manifold.ts#L323 )*
2021-04-16 17:10:15 +02:00
Clipping for contact manifolds. Sutherland-Hodgman clipping.
**Parameters:**
Name | Type |
------ | ------ |
`vOut` | [ClipVertex ](classes/clipvertex.md )[] |
`vIn` | [ClipVertex ](classes/clipvertex.md )[] |
2021-05-02 17:18:33 -07:00
`normal` | [Vec2 ](classes/vec2.md ) |
2021-04-16 17:10:15 +02:00
`offset` | number |
`vertexIndexA` | number |
**Returns:** *number*
___
### `Const` debug
▸ **debug** (...`rest` : any[]): *void*
2021-05-11 18:30:36 -07:00
*Defined in [src/util/common.ts:4 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L4 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
`...rest` | any[] |
**Returns:** *void*
___
### default
2021-05-11 18:30:36 -07:00
▸ **default** ‹ **T**› (`input` : T, `defaults` : object): *T*
*Defined in [src/util/options.ts:1 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/options.ts#L1 )*
**Type parameters:**
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
▪ **T**
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`input` | T |
`defaults` | object |
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
**Returns:** *T*
2021-04-16 17:10:15 +02:00
___
### `Const` diff
2021-05-11 18:30:36 -07:00
▸ **diff** (`time` : number): *number*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/util/Timer.ts:5 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/Timer.ts#L5 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`time` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *number*
___
### findIncidentEdge
2021-05-02 17:18:33 -07:00
▸ **findIncidentEdge** (`c` : [ClipVertex ](classes/clipvertex.md )[], `poly1` : [PolygonShape ](classes/polygonshape.md ), `xf1` : [Transform ](classes/transform.md ), `edge1` : number, `poly2` : [PolygonShape ](classes/polygonshape.md ), `xf2` : [Transform ](classes/transform.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:91 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L91 )*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
`c` | [ClipVertex ](classes/clipvertex.md )[] |
2021-05-02 17:18:33 -07:00
`poly1` | [PolygonShape ](classes/polygonshape.md ) |
`xf1` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
`edge1` | number |
2021-05-02 17:18:33 -07:00
`poly2` | [PolygonShape ](classes/polygonshape.md ) |
`xf2` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### findMaxSeparation
2021-05-02 17:18:33 -07:00
▸ **findMaxSeparation** (`poly1` : [PolygonShape ](classes/polygonshape.md ), `xf1` : [Transform ](classes/transform.md ), `poly2` : [PolygonShape ](classes/polygonshape.md ), `xf2` : [Transform ](classes/transform.md ), `output` : [MaxSeparation ](interfaces/maxseparation.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:56 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L56 )*
2021-04-16 17:10:15 +02:00
Find the max separation between poly1 and poly2 using edge normals from
poly1.
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`poly1` | [PolygonShape ](classes/polygonshape.md ) |
`xf1` | [Transform ](classes/transform.md ) |
`poly2` | [PolygonShape ](classes/polygonshape.md ) |
`xf2` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
`output` | [MaxSeparation ](interfaces/maxseparation.md ) |
**Returns:** *void*
___
### getPointStates
2021-05-02 17:18:33 -07:00
▸ **getPointStates** (`state1` : [PointState ](enums/pointstate.md )[], `state2` : [PointState ](enums/pointstate.md )[], `manifold1` : [Manifold ](classes/manifold.md ), `manifold2` : [Manifold ](classes/manifold.md )): *void*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/Manifold.ts:265 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Manifold.ts#L265 )*
2021-04-16 17:10:15 +02:00
Compute the point states given two manifolds. The states pertain to the
transition from manifold1 to manifold2. So state1 is either persist or remove
while state2 is either add or persist.
**Parameters:**
Name | Type |
------ | ------ |
`state1` | [PointState ](enums/pointstate.md )[] |
`state2` | [PointState ](enums/pointstate.md )[] |
2021-05-02 17:18:33 -07:00
`manifold1` | [Manifold ](classes/manifold.md ) |
`manifold2` | [Manifold ](classes/manifold.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *void*
___
### mixFriction
2021-05-11 18:30:36 -07:00
▸ **mixFriction** (`friction1` : number, `friction2` : number): *number*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:91 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L91 )*
2021-04-16 17:10:15 +02:00
Friction mixing law. The idea is to allow either fixture to drive the
restitution to zero. For example, anything slides on ice.
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`friction1` | number |
`friction2` | number |
2021-04-16 17:10:15 +02:00
**Returns:** *number*
___
### mixRestitution
2021-05-11 18:30:36 -07:00
▸ **mixRestitution** (`restitution1` : number, `restitution2` : number): *number*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:99 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L99 )*
2021-04-16 17:10:15 +02:00
Restitution mixing law. The idea is allow for anything to bounce off an
inelastic surface. For example, a superball bounces on anything.
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`restitution1` | number |
`restitution2` | number |
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
**Returns:** *number*
2021-04-16 17:10:15 +02:00
___
### `Const` now
▸ **now** (): *number*
2021-05-11 18:30:36 -07:00
*Defined in [src/util/Timer.ts:1 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/Timer.ts#L1 )*
2021-04-16 17:10:15 +02:00
**Returns:** *number*
___
### testOverlap
2021-05-02 17:18:33 -07:00
▸ **testOverlap** (`shapeA` : [Shape ](classes/shape.md ), `indexA` : number, `shapeB` : [Shape ](classes/shape.md ), `indexB` : number, `xfA` : [Transform ](classes/transform.md ), `xfB` : [Transform ](classes/transform.md )): *boolean*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/Distance.ts:691 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Distance.ts#L691 )*
2021-04-16 17:10:15 +02:00
Determine if two generic shapes overlap.
**Parameters:**
Name | Type |
------ | ------ |
2021-05-02 17:18:33 -07:00
`shapeA` | [Shape ](classes/shape.md ) |
2021-04-16 17:10:15 +02:00
`indexA` | number |
2021-05-02 17:18:33 -07:00
`shapeB` | [Shape ](classes/shape.md ) |
2021-04-16 17:10:15 +02:00
`indexB` | number |
2021-05-02 17:18:33 -07:00
`xfA` | [Transform ](classes/transform.md ) |
`xfB` | [Transform ](classes/transform.md ) |
2021-04-16 17:10:15 +02:00
**Returns:** *boolean*
2021-05-06 15:35:56 -07:00
___
### testbed
▸ **testbed** (`opts` : object, `callback` : function): *any*
2021-05-11 18:30:36 -07:00
*Defined in [testbed/index.ts:112 ](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L112 )*
2021-05-06 15:35:56 -07:00
**Parameters:**
▪ **opts** : *object*
▪ **callback** : *function*
▸ (`testbed` : [Testbed ](interfaces/testbed.md )): *[World](classes/world.md)*
**Parameters:**
Name | Type |
------ | ------ |
`testbed` | [Testbed ](interfaces/testbed.md ) |
**Returns:** *any*
▸ **testbed** (`callback` : function): *any*
2021-05-11 18:30:36 -07:00
*Defined in [testbed/index.ts:113 ](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L113 )*
2021-05-06 15:35:56 -07:00
**Parameters:**
▪ **callback** : *function*
▸ (`testbed` : [Testbed ](interfaces/testbed.md )): *[World](classes/world.md)*
**Parameters:**
Name | Type |
------ | ------ |
`testbed` | [Testbed ](interfaces/testbed.md ) |
**Returns:** *any*
2021-04-16 17:10:15 +02:00
## Object literals
### `Const` BodyDefDefault
### ▪ **BodyDefDefault**: *object*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:109 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L109 )*
2021-04-16 17:10:15 +02:00
### active
• **active** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:126 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L126 )*
2021-04-16 17:10:15 +02:00
### allowSleep
• **allowSleep** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:124 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L124 )*
2021-04-16 17:10:15 +02:00
### angle
• **angle** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:112 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L112 )*
2021-04-16 17:10:15 +02:00
### angularDamping
• **angularDamping** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:118 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L118 )*
2021-04-16 17:10:15 +02:00
### angularVelocity
• **angularVelocity** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:115 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L115 )*
2021-04-16 17:10:15 +02:00
### awake
• **awake** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:125 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L125 )*
2021-04-16 17:10:15 +02:00
### bullet
• **bullet** : *false* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:121 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L121 )*
2021-04-16 17:10:15 +02:00
### fixedRotation
• **fixedRotation** : *false* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:120 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L120 )*
2021-04-16 17:10:15 +02:00
### gravityScale
• **gravityScale** : *number* = 1
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:122 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L122 )*
2021-04-16 17:10:15 +02:00
### linearDamping
• **linearDamping** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:117 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L117 )*
2021-04-16 17:10:15 +02:00
### linearVelocity
2021-05-02 17:18:33 -07:00
• **linearVelocity** : *[Vec2](classes/vec2.md)‹ › * = Vec2.zero()
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:114 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L114 )*
2021-04-16 17:10:15 +02:00
### position
2021-05-02 17:18:33 -07:00
• **position** : *[Vec2](classes/vec2.md)‹ › * = Vec2.zero()
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:111 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L111 )*
2021-04-16 17:10:15 +02:00
### type
• **type** : *"static"* = STATIC
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:110 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L110 )*
2021-04-16 17:10:15 +02:00
### userData
• **userData** : *null* = null
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Body.ts:128 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L128 )*
2021-04-16 17:10:15 +02:00
___
### `Const` DEFAULTS
### ▪ **DEFAULTS**: *object*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Joint.ts:85 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L85 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/DistanceJoint.ts:73 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/DistanceJoint.ts#L73 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/FrictionJoint.ts:66 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L66 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:113 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L113 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:109 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L109 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/GearJoint.ts:64 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/GearJoint.ts#L64 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MotorJoint.ts:70 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L70 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MouseJoint.ts:73 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L73 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PulleyJoint.ts:81 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PulleyJoint.ts#L81 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RopeJoint.ts:67 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L67 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WeldJoint.ts:80 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WeldJoint.ts#L80 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WheelJoint.ts:88 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L88 )*
2021-04-16 17:10:15 +02:00
### collideConnected
• **collideConnected** : *boolean* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Joint.ts:87 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L87 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PulleyJoint.ts:82 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PulleyJoint.ts#L82 )*
2021-04-16 17:10:15 +02:00
### correctionFactor
• **correctionFactor** : *number* = 0.3
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MotorJoint.ts:73 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L73 )*
2021-04-16 17:10:15 +02:00
### dampingRatio
• **dampingRatio** : *number* = 0.7
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/DistanceJoint.ts:75 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/DistanceJoint.ts#L75 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MouseJoint.ts:76 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L76 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WeldJoint.ts:82 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WeldJoint.ts#L82 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WheelJoint.ts:93 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L93 )*
2021-04-16 17:10:15 +02:00
### enableLimit
• **enableLimit** : *boolean* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:118 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L118 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:110 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L110 )*
2021-04-16 17:10:15 +02:00
### enableMotor
• **enableMotor** : *boolean* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:119 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L119 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:113 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L113 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WheelJoint.ts:89 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L89 )*
2021-04-16 17:10:15 +02:00
### frequencyHz
• **frequencyHz** : *number* = 2
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/DistanceJoint.ts:74 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/DistanceJoint.ts#L74 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MouseJoint.ts:75 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L75 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WeldJoint.ts:81 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WeldJoint.ts#L81 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WheelJoint.ts:92 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L92 )*
2021-04-16 17:10:15 +02:00
### lowerAngle
• **lowerAngle** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:114 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L114 )*
2021-04-16 17:10:15 +02:00
### lowerTranslation
• **lowerTranslation** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:111 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L111 )*
2021-04-16 17:10:15 +02:00
### maxForce
• **maxForce** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/FrictionJoint.ts:67 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L67 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MotorJoint.ts:71 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L71 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MouseJoint.ts:74 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L74 )*
2021-04-16 17:10:15 +02:00
### maxLength
• **maxLength** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RopeJoint.ts:68 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L68 )*
2021-04-16 17:10:15 +02:00
### maxMotorForce
• **maxMotorForce** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:114 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L114 )*
2021-04-16 17:10:15 +02:00
### maxMotorTorque
• **maxMotorTorque** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:116 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L116 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WheelJoint.ts:90 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L90 )*
2021-04-16 17:10:15 +02:00
### maxTorque
• **maxTorque** : *number* = 1
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/FrictionJoint.ts:68 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L68 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/MotorJoint.ts:72 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L72 )*
2021-04-16 17:10:15 +02:00
### motorSpeed
• **motorSpeed** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:117 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L117 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:115 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L115 )*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/WheelJoint.ts:91 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L91 )*
2021-04-16 17:10:15 +02:00
### ratio
• **ratio** : *number* = 1
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/GearJoint.ts:65 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/GearJoint.ts#L65 )*
2021-04-16 17:10:15 +02:00
### upperAngle
• **upperAngle** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/RevoluteJoint.ts:115 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L115 )*
2021-04-16 17:10:15 +02:00
### upperTranslation
• **upperTranslation** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/joint/PrismaticJoint.ts:112 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L112 )*
2021-04-16 17:10:15 +02:00
### userData
• **userData** : *null* = null
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Joint.ts:86 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L86 )*
2021-04-16 17:10:15 +02:00
___
### `Const` FixtureDefDefault
### ▪ **FixtureDefDefault**: *object*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:81 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L81 )*
2021-04-16 17:10:15 +02:00
### density
• **density** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:85 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L85 )*
2021-04-16 17:10:15 +02:00
### filterCategoryBits
• **filterCategoryBits** : *number* = 1
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:89 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L89 )*
2021-04-16 17:10:15 +02:00
### filterGroupIndex
• **filterGroupIndex** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:88 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L88 )*
2021-04-16 17:10:15 +02:00
### filterMaskBits
• **filterMaskBits** : *number* = 65535
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:90 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L90 )*
2021-04-16 17:10:15 +02:00
### friction
• **friction** : *number* = 0.2
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:83 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L83 )*
2021-04-16 17:10:15 +02:00
### isSensor
• **isSensor** : *false* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:86 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L86 )*
2021-04-16 17:10:15 +02:00
### restitution
• **restitution** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:84 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L84 )*
2021-04-16 17:10:15 +02:00
### userData
• **userData** : *null* = null
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Fixture.ts:82 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L82 )*
2021-04-16 17:10:15 +02:00
___
### `Const` WorldDefDefault
### ▪ **WorldDefDefault**: *object*
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:62 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L62 )*
2021-04-16 17:10:15 +02:00
### allowSleep
• **allowSleep** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:64 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L64 )*
2021-04-16 17:10:15 +02:00
### blockSolve
• **blockSolve** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:68 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L68 )*
2021-04-16 17:10:15 +02:00
### continuousPhysics
• **continuousPhysics** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:66 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L66 )*
2021-04-16 17:10:15 +02:00
### gravity
2021-05-02 17:18:33 -07:00
• **gravity** : *[Vec2](classes/vec2.md)‹ › * = Vec2.zero()
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:63 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L63 )*
2021-04-16 17:10:15 +02:00
### positionIterations
• **positionIterations** : *number* = 3
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:70 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L70 )*
2021-04-16 17:10:15 +02:00
### subStepping
• **subStepping** : *false* = false
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:67 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L67 )*
2021-04-16 17:10:15 +02:00
### velocityIterations
• **velocityIterations** : *number* = 8
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:69 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L69 )*
2021-04-16 17:10:15 +02:00
### warmStarting
• **warmStarting** : *true* = true
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/World.ts:65 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L65 )*
2021-04-16 17:10:15 +02:00
___
### `Const` maxSeparation
### ▪ **maxSeparation**: *object*
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:131 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L131 )*
2021-04-16 17:10:15 +02:00
### bestIndex
• **bestIndex** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:133 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L133 )*
2021-04-16 17:10:15 +02:00
### maxSeparation
• **maxSeparation** : *number* = 0
2021-05-11 18:30:36 -07:00
*Defined in [src/collision/shape/CollidePolygon.ts:132 ](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L132 )*