1667 lines
55 KiB
Markdown
1667 lines
55 KiB
Markdown
[Planck.js API Doc](README.md) › [Globals](globals.md)
|
||
|
||
# Planck.js API Doc
|
||
|
||
## Index
|
||
|
||
### Enumerations
|
||
|
||
* [ContactFeatureType](enums/contactfeaturetype.md)
|
||
* [EPAxisType](enums/epaxistype.md)
|
||
* [ManifoldType](enums/manifoldtype.md)
|
||
* [PointState](enums/pointstate.md)
|
||
* [SeparationFunctionType](enums/separationfunctiontype.md)
|
||
* [TOIOutputState](enums/toioutputstate.md)
|
||
* [VertexType](enums/vertextype.md)
|
||
|
||
### 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)
|
||
* [ClipVertex](classes/clipvertex.md)
|
||
* [Contact](classes/contact.md)
|
||
* [ContactEdge](classes/contactedge.md)
|
||
* [ContactFeature](classes/contactfeature.md)
|
||
* [ContactID](classes/contactid.md)
|
||
* [ContactImpulse](classes/contactimpulse.md)
|
||
* [DistanceInput](classes/distanceinput.md)
|
||
* [DistanceJoint](classes/distancejoint.md)
|
||
* [DistanceOutput](classes/distanceoutput.md)
|
||
* [DistanceProxy](classes/distanceproxy.md)
|
||
* [DynamicTree](classes/dynamictree.md)
|
||
* [EPAxis](classes/epaxis.md)
|
||
* [EdgeShape](classes/edgeshape.md)
|
||
* [Fixture](classes/fixture.md)
|
||
* [FixtureProxy](classes/fixtureproxy.md)
|
||
* [FrictionJoint](classes/frictionjoint.md)
|
||
* [GearJoint](classes/gearjoint.md)
|
||
* [Iterator](classes/iterator.md)
|
||
* [Jacobian](classes/jacobian.md)
|
||
* [Joint](classes/joint.md)
|
||
* [JointEdge](classes/jointedge.md)
|
||
* [Manifold](classes/manifold.md)
|
||
* [ManifoldPoint](classes/manifoldpoint.md)
|
||
* [MassData](classes/massdata.md)
|
||
* [Mat22](classes/mat22.md)
|
||
* [Mat33](classes/mat33.md)
|
||
* [MotorJoint](classes/motorjoint.md)
|
||
* [MouseJoint](classes/mousejoint.md)
|
||
* [PolygonShape](classes/polygonshape.md)
|
||
* [Pool](classes/pool.md)
|
||
* [Position](classes/position.md)
|
||
* [PrismaticJoint](classes/prismaticjoint.md)
|
||
* [PulleyJoint](classes/pulleyjoint.md)
|
||
* [ReferenceFace](classes/referenceface.md)
|
||
* [RevoluteJoint](classes/revolutejoint.md)
|
||
* [RopeJoint](classes/ropejoint.md)
|
||
* [Rot](classes/rot.md)
|
||
* [SeparationFunction](classes/separationfunction.md)
|
||
* [Settings](classes/settings.md)
|
||
* [Shape](classes/shape.md)
|
||
* [Simplex](classes/simplex.md)
|
||
* [SimplexCache](classes/simplexcache.md)
|
||
* [SimplexVertex](classes/simplexvertex.md)
|
||
* [Solver](classes/solver.md)
|
||
* [Sweep](classes/sweep.md)
|
||
* [TOIInput](classes/toiinput.md)
|
||
* [TOIOutput](classes/toioutput.md)
|
||
* [TempPolygon](classes/temppolygon.md)
|
||
* [TimeStep](classes/timestep.md)
|
||
* [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)
|
||
* [WorldManifold](classes/worldmanifold.md)
|
||
|
||
### Interfaces
|
||
|
||
* [ActiveKeys](interfaces/activekeys.md)
|
||
* [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)
|
||
* [MaxSeparation](interfaces/maxseparation.md)
|
||
* [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)
|
||
* [Testbed](interfaces/testbed.md)
|
||
* [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)
|
||
* [ContactCallback](globals.md#contactcallback)
|
||
* [DynamicTreeQueryCallback](globals.md#dynamictreequerycallback)
|
||
* [EvaluateFunction](globals.md#evaluatefunction)
|
||
* [RayCastCallback](globals.md#raycastcallback)
|
||
* [ShapeType](globals.md#shapetype)
|
||
* [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)
|
||
* [schema](globals.md#const-schema)
|
||
* [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)
|
||
* [Viewer](globals.md#viewer)
|
||
* [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)
|
||
* [testbed](globals.md#testbed)
|
||
|
||
### 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)
|
||
|
||
## Type aliases
|
||
|
||
### BodyType
|
||
|
||
Ƭ **BodyType**: *"static" | "kinematic" | "dynamic"*
|
||
|
||
*Defined in [src/dynamics/Body.ts:43](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L43)*
|
||
|
||
___
|
||
|
||
### ContactCallback
|
||
|
||
Ƭ **ContactCallback**: *function*
|
||
|
||
*Defined in [src/dynamics/Contact.ts:76](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L76)*
|
||
|
||
#### Type declaration:
|
||
|
||
▸ (`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*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
___
|
||
|
||
### DynamicTreeQueryCallback
|
||
|
||
Ƭ **DynamicTreeQueryCallback**: *function*
|
||
|
||
*Defined in [src/collision/DynamicTree.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/DynamicTree.ts#L36)*
|
||
|
||
#### Type declaration:
|
||
|
||
▸ (`nodeId`: number): *boolean*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`nodeId` | number |
|
||
|
||
___
|
||
|
||
### EvaluateFunction
|
||
|
||
Ƭ **EvaluateFunction**: *function*
|
||
|
||
*Defined in [src/dynamics/Contact.ts:66](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L66)*
|
||
|
||
#### Type declaration:
|
||
|
||
▸ (`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*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
___
|
||
|
||
### RayCastCallback
|
||
|
||
Ƭ **RayCastCallback**: *function*
|
||
|
||
*Defined in [src/collision/AABB.ts:43](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/AABB.ts#L43)*
|
||
|
||
#### Type declaration:
|
||
|
||
▸ (`subInput`: [RayCastInput](interfaces/raycastinput.md), `id`: number): *number*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`subInput` | [RayCastInput](interfaces/raycastinput.md) |
|
||
`id` | number |
|
||
|
||
___
|
||
|
||
### ShapeType
|
||
|
||
Ƭ **ShapeType**: *"circle" | "edge" | "polygon" | "chain"*
|
||
|
||
*Defined in [src/collision/Shape.ts:131](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Shape.ts#L131)*
|
||
|
||
___
|
||
|
||
### WorldAABBQueryCallback
|
||
|
||
Ƭ **WorldAABBQueryCallback**: *function*
|
||
|
||
*Defined in [src/dynamics/World.ts:93](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L93)*
|
||
|
||
Called for each fixture found in the query AABB. It may return `false` to terminate the query.
|
||
|
||
#### Type declaration:
|
||
|
||
▸ (`fixture`: [Fixture](classes/fixture.md)): *boolean*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`fixture` | [Fixture](classes/fixture.md) |
|
||
|
||
___
|
||
|
||
### WorldRayCastCallback
|
||
|
||
Ƭ **WorldRayCastCallback**: *function*
|
||
|
||
*Defined in [src/dynamics/World.ts:88](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L88)*
|
||
|
||
Callback function for ray casts, see [World.rayCast](classes/world.md#raycast).
|
||
|
||
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:
|
||
|
||
▸ (`fixture`: [Fixture](classes/fixture.md), `point`: [Vec2](classes/vec2.md), `normal`: [Vec2](classes/vec2.md), `fraction`: number): *number*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`fixture` | [Fixture](classes/fixture.md) |
|
||
`point` | [Vec2](classes/vec2.md) |
|
||
`normal` | [Vec2](classes/vec2.md) |
|
||
`fraction` | number |
|
||
|
||
## Variables
|
||
|
||
### `Const` DEBUG_SOLVER
|
||
|
||
• **DEBUG_SOLVER**: *false* = false
|
||
|
||
*Defined in [src/dynamics/Contact.ts:43](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L43)*
|
||
|
||
___
|
||
|
||
### `Const` DYNAMIC
|
||
|
||
• **DYNAMIC**: *"dynamic"* = "dynamic"
|
||
|
||
*Defined in [src/dynamics/Body.ts:47](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L47)*
|
||
|
||
___
|
||
|
||
### `Const` KINEMATIC
|
||
|
||
• **KINEMATIC**: *"kinematic"* = "kinematic"
|
||
|
||
*Defined in [src/dynamics/Body.ts:46](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L46)*
|
||
|
||
___
|
||
|
||
### `Let` SID
|
||
|
||
• **SID**: *number* = 0
|
||
|
||
*Defined in [src/serializer/index.ts:10](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/index.ts#L10)*
|
||
|
||
___
|
||
|
||
### `Const` STATIC
|
||
|
||
• **STATIC**: *"static"* = "static"
|
||
|
||
*Defined in [src/dynamics/Body.ts:45](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L45)*
|
||
|
||
___
|
||
|
||
### `Const` _ASSERT
|
||
|
||
• **_ASSERT**: *boolean* = typeof ASSERT === 'undefined' ? false : ASSERT
|
||
|
||
*Defined in [src/util/common.ts:2](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L2)*
|
||
|
||
*Defined in [src/common/Math.ts:29](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Math.ts#L29)*
|
||
|
||
*Defined in [src/common/Vec2.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec2.ts#L30)*
|
||
|
||
*Defined in [src/collision/AABB.ts:31](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/AABB.ts#L31)*
|
||
|
||
*Defined in [src/collision/DynamicTree.ts:33](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/DynamicTree.ts#L33)*
|
||
|
||
*Defined in [src/common/Rot.ts:31](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Rot.ts#L31)*
|
||
|
||
*Defined in [src/common/Transform.ts:31](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Transform.ts#L31)*
|
||
|
||
*Defined in [src/common/Sweep.ts:32](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Sweep.ts#L32)*
|
||
|
||
*Defined in [src/common/Mat22.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat22.ts#L30)*
|
||
|
||
*Defined in [src/collision/Distance.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Distance.ts#L36)*
|
||
|
||
*Defined in [src/dynamics/Contact.ts:40](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L40)*
|
||
|
||
*Defined in [src/collision/TimeOfImpact.ts:40](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/TimeOfImpact.ts#L40)*
|
||
|
||
*Defined in [src/dynamics/Solver.ts:38](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Solver.ts#L38)*
|
||
|
||
*Defined in [src/dynamics/Joint.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L30)*
|
||
|
||
*Defined in [src/dynamics/Body.ts:41](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L41)*
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L36)*
|
||
|
||
*Defined in [src/collision/BroadPhase.ts:33](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/BroadPhase.ts#L33)*
|
||
|
||
*Defined in [src/dynamics/World.ts:38](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L38)*
|
||
|
||
*Defined in [src/common/Vec3.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec3.ts#L30)*
|
||
|
||
*Defined in [src/common/Mat33.ts:31](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat33.ts#L31)*
|
||
|
||
*Defined in [src/collision/shape/CircleShape.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CircleShape.ts#L36)*
|
||
|
||
*Defined in [src/collision/shape/PolygonShape.ts:37](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/PolygonShape.ts#L37)*
|
||
|
||
*Defined in [src/collision/shape/ChainShape.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/ChainShape.ts#L36)*
|
||
|
||
*Defined in [src/collision/shape/CollideCircle.ts:35](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCircle.ts#L35)*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgeCircle.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L36)*
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L36)*
|
||
|
||
*Defined in [src/collision/shape/CollideCirclePolygone.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCirclePolygone.ts#L36)*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:39](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L39)*
|
||
|
||
*Defined in [src/dynamics/joint/FrictionJoint.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L36)*
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:39](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L39)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:39](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L39)*
|
||
|
||
*Defined in [src/dynamics/joint/GearJoint.ts:38](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/GearJoint.ts#L38)*
|
||
|
||
*Defined in [src/dynamics/joint/MotorJoint.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L36)*
|
||
|
||
*Defined in [src/dynamics/joint/MouseJoint.ts:37](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L37)*
|
||
|
||
*Defined in [src/dynamics/joint/PulleyJoint.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PulleyJoint.ts#L36)*
|
||
|
||
___
|
||
|
||
### `Const` _DEBUG
|
||
|
||
• **_DEBUG**: *boolean* = typeof DEBUG === 'undefined' ? false : DEBUG
|
||
|
||
*Defined in [src/util/common.ts:1](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L1)*
|
||
|
||
*Defined in [src/common/Math.ts:28](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Math.ts#L28)*
|
||
|
||
*Defined in [src/common/Vec2.ts:29](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec2.ts#L29)*
|
||
|
||
*Defined in [src/collision/AABB.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/AABB.ts#L30)*
|
||
|
||
*Defined in [src/common/Rot.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Rot.ts#L30)*
|
||
|
||
*Defined in [src/common/Transform.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Transform.ts#L30)*
|
||
|
||
*Defined in [src/common/Mat22.ts:29](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat22.ts#L29)*
|
||
|
||
*Defined in [src/dynamics/Solver.ts:37](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Solver.ts#L37)*
|
||
|
||
*Defined in [src/common/Vec3.ts:29](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Vec3.ts#L29)*
|
||
|
||
*Defined in [src/common/Mat33.ts:30](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Mat33.ts#L30)*
|
||
|
||
___
|
||
|
||
### `Const` atLowerLimit
|
||
|
||
• **atLowerLimit**: *1* = 1
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:43](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L43)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:43](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L43)*
|
||
|
||
*Defined in [src/dynamics/joint/RopeJoint.ts:35](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L35)*
|
||
|
||
___
|
||
|
||
### `Const` atUpperLimit
|
||
|
||
• **atUpperLimit**: *2* = 2
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:44](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L44)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:44](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L44)*
|
||
|
||
*Defined in [src/dynamics/joint/RopeJoint.ts:36](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L36)*
|
||
|
||
___
|
||
|
||
### `Const` edgeAxis
|
||
|
||
• **edgeAxis**: *[EPAxis](classes/epaxis.md)‹›* = new EPAxis()
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:110](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L110)*
|
||
|
||
___
|
||
|
||
### `Const` equalLimits
|
||
|
||
• **equalLimits**: *3* = 3
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:45](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L45)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:45](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L45)*
|
||
|
||
*Defined in [src/dynamics/joint/RopeJoint.ts:37](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L37)*
|
||
|
||
___
|
||
|
||
### `Const` inactiveLimit
|
||
|
||
• **inactiveLimit**: *0* = 0
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:42](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L42)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:42](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L42)*
|
||
|
||
*Defined in [src/dynamics/joint/RopeJoint.ts:34](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L34)*
|
||
|
||
___
|
||
|
||
### `Const` internal
|
||
|
||
• **internal**: *object*
|
||
|
||
*Defined in [src/index.ts:64](https://github.com/shakiba/planck.js/blob/acc3bd8/src/index.ts#L64)*
|
||
|
||
*Defined in [testbed/index.ts:890](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L890)*
|
||
|
||
**`deprecated`** Merged with main namespace
|
||
|
||
**`deprecated`** Merged with main namespace
|
||
|
||
#### Type declaration:
|
||
|
||
___
|
||
|
||
### `Const` math
|
||
|
||
• **math**: *Math & object* = Object.create(Math)
|
||
|
||
*Defined in [src/common/Math.ts:32](https://github.com/shakiba/planck.js/blob/acc3bd8/src/common/Math.ts#L32)*
|
||
|
||
___
|
||
|
||
### `Const` polygonAxis
|
||
|
||
• **polygonAxis**: *[EPAxis](classes/epaxis.md)‹›* = new EPAxis()
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:111](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L111)*
|
||
|
||
___
|
||
|
||
### `Const` polygonBA
|
||
|
||
• **polygonBA**: *[TempPolygon](classes/temppolygon.md)‹›* = new TempPolygon()
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:112](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L112)*
|
||
|
||
___
|
||
|
||
### `Const` rf
|
||
|
||
• **rf**: *[ReferenceFace](classes/referenceface.md)‹›* = new ReferenceFace()
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:113](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L113)*
|
||
|
||
___
|
||
|
||
### `Const` s_registers
|
||
|
||
• **s_registers**: *any[]* = []
|
||
|
||
*Defined in [src/dynamics/Contact.ts:104](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L104)*
|
||
|
||
___
|
||
|
||
### `Const` s_subStep
|
||
|
||
• **s_subStep**: *[TimeStep](classes/timestep.md)‹›* = new TimeStep()
|
||
|
||
*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)*
|
||
|
||
___
|
||
|
||
### `Const` serializer
|
||
|
||
• **serializer**: *any* = new Serializer()
|
||
|
||
*Defined in [src/serializer/index.ts:140](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/index.ts#L140)*
|
||
|
||
## Functions
|
||
|
||
### ChainCircleContact
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgeCircle.ts:52](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L52)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### ChainPolygonContact
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:52](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L52)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### CircleCircleContact
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideCircle.ts:40](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCircle.ts#L40)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### CollideCircles
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideCircle.ts:46](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCircle.ts#L46)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### CollideEdgeCircle
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgeCircle.ts:68](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L68)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### CollideEdgePolygon
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:119](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L119)*
|
||
|
||
This function collides and edge and a polygon, taking into account edge
|
||
adjacency.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### CollidePolygonCircle
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideCirclePolygone.ts:47](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCirclePolygone.ts#L47)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### CollidePolygons
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:146](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L146)*
|
||
|
||
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 |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### ComputeCentroid
|
||
|
||
▸ **ComputeCentroid**(`vs`: [Vec2](classes/vec2.md)[], `count`: number): *[Vec2](classes/vec2.md)*
|
||
|
||
*Defined in [src/collision/shape/PolygonShape.ts:529](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/PolygonShape.ts#L529)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`vs` | [Vec2](classes/vec2.md)[] |
|
||
`count` | number |
|
||
|
||
**Returns:** *[Vec2](classes/vec2.md)*
|
||
|
||
___
|
||
|
||
### Distance
|
||
|
||
▸ **Distance**(`output`: [DistanceOutput](classes/distanceoutput.md), `cache`: [SimplexCache](classes/simplexcache.md), `input`: [DistanceInput](classes/distanceinput.md)): *void*
|
||
|
||
*Defined in [src/collision/Distance.ts:94](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Distance.ts#L94)*
|
||
|
||
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
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgeCircle.ts:42](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgeCircle.ts#L42)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### EdgePolygonContact
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideEdgePolygon.ts:45](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideEdgePolygon.ts#L45)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### PolygonCircleContact
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollideCirclePolygone.ts:41](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollideCirclePolygone.ts#L41)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### PolygonContact
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:41](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L41)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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 |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### Serializer
|
||
|
||
▸ **Serializer**(`opts?`: any): *void*
|
||
|
||
*Defined in [src/serializer/index.ts:12](https://github.com/shakiba/planck.js/blob/acc3bd8/src/serializer/index.ts#L12)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`opts?` | any |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### TimeOfImpact
|
||
|
||
▸ **TimeOfImpact**(`output`: [TOIOutput](classes/toioutput.md), `input`: [TOIInput](classes/toiinput.md)): *void*
|
||
|
||
*Defined in [src/collision/TimeOfImpact.ts:91](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/TimeOfImpact.ts#L91)*
|
||
|
||
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*
|
||
|
||
___
|
||
|
||
### Viewer
|
||
|
||
▸ **Viewer**(`world`: any, `opts`: any): *void*
|
||
|
||
*Defined in [testbed/index.ts:471](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L471)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`world` | any |
|
||
`opts` | any |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### `Const` assert
|
||
|
||
▸ **assert**(`statement`: boolean, `err?`: string, `log?`: any): *void*
|
||
|
||
*Defined in [src/util/common.ts:9](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L9)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`statement` | boolean |
|
||
`err?` | string |
|
||
`log?` | any |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### clipSegmentToLine
|
||
|
||
▸ **clipSegmentToLine**(`vOut`: [ClipVertex](classes/clipvertex.md)[], `vIn`: [ClipVertex](classes/clipvertex.md)[], `normal`: [Vec2](classes/vec2.md), `offset`: number, `vertexIndexA`: number): *number*
|
||
|
||
*Defined in [src/collision/Manifold.ts:323](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Manifold.ts#L323)*
|
||
|
||
Clipping for contact manifolds. Sutherland-Hodgman clipping.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`vOut` | [ClipVertex](classes/clipvertex.md)[] |
|
||
`vIn` | [ClipVertex](classes/clipvertex.md)[] |
|
||
`normal` | [Vec2](classes/vec2.md) |
|
||
`offset` | number |
|
||
`vertexIndexA` | number |
|
||
|
||
**Returns:** *number*
|
||
|
||
___
|
||
|
||
### `Const` debug
|
||
|
||
▸ **debug**(...`rest`: any[]): *void*
|
||
|
||
*Defined in [src/util/common.ts:4](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/common.ts#L4)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`...rest` | any[] |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### default
|
||
|
||
▸ **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:**
|
||
|
||
▪ **T**
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`input` | T |
|
||
`defaults` | object |
|
||
|
||
**Returns:** *T*
|
||
|
||
___
|
||
|
||
### `Const` diff
|
||
|
||
▸ **diff**(`time`: number): *number*
|
||
|
||
*Defined in [src/util/Timer.ts:5](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/Timer.ts#L5)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`time` | number |
|
||
|
||
**Returns:** *number*
|
||
|
||
___
|
||
|
||
### findIncidentEdge
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:91](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L91)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### findMaxSeparation
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:56](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L56)*
|
||
|
||
Find the max separation between poly1 and poly2 using edge normals from
|
||
poly1.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`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) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### getPointStates
|
||
|
||
▸ **getPointStates**(`state1`: [PointState](enums/pointstate.md)[], `state2`: [PointState](enums/pointstate.md)[], `manifold1`: [Manifold](classes/manifold.md), `manifold2`: [Manifold](classes/manifold.md)): *void*
|
||
|
||
*Defined in [src/collision/Manifold.ts:265](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Manifold.ts#L265)*
|
||
|
||
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)[] |
|
||
`manifold1` | [Manifold](classes/manifold.md) |
|
||
`manifold2` | [Manifold](classes/manifold.md) |
|
||
|
||
**Returns:** *void*
|
||
|
||
___
|
||
|
||
### mixFriction
|
||
|
||
▸ **mixFriction**(`friction1`: number, `friction2`: number): *number*
|
||
|
||
*Defined in [src/dynamics/Contact.ts:91](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L91)*
|
||
|
||
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 |
|
||
------ | ------ |
|
||
`friction1` | number |
|
||
`friction2` | number |
|
||
|
||
**Returns:** *number*
|
||
|
||
___
|
||
|
||
### mixRestitution
|
||
|
||
▸ **mixRestitution**(`restitution1`: number, `restitution2`: number): *number*
|
||
|
||
*Defined in [src/dynamics/Contact.ts:99](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L99)*
|
||
|
||
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 |
|
||
------ | ------ |
|
||
`restitution1` | number |
|
||
`restitution2` | number |
|
||
|
||
**Returns:** *number*
|
||
|
||
___
|
||
|
||
### `Const` now
|
||
|
||
▸ **now**(): *number*
|
||
|
||
*Defined in [src/util/Timer.ts:1](https://github.com/shakiba/planck.js/blob/acc3bd8/src/util/Timer.ts#L1)*
|
||
|
||
**Returns:** *number*
|
||
|
||
___
|
||
|
||
### testOverlap
|
||
|
||
▸ **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*
|
||
|
||
*Defined in [src/collision/Distance.ts:691](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/Distance.ts#L691)*
|
||
|
||
Determine if two generic shapes overlap.
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`shapeA` | [Shape](classes/shape.md) |
|
||
`indexA` | number |
|
||
`shapeB` | [Shape](classes/shape.md) |
|
||
`indexB` | number |
|
||
`xfA` | [Transform](classes/transform.md) |
|
||
`xfB` | [Transform](classes/transform.md) |
|
||
|
||
**Returns:** *boolean*
|
||
|
||
___
|
||
|
||
### testbed
|
||
|
||
▸ **testbed**(`opts`: object, `callback`: function): *any*
|
||
|
||
*Defined in [testbed/index.ts:112](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L112)*
|
||
|
||
**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*
|
||
|
||
*Defined in [testbed/index.ts:113](https://github.com/shakiba/planck.js/blob/acc3bd8/testbed/index.ts#L113)*
|
||
|
||
**Parameters:**
|
||
|
||
▪ **callback**: *function*
|
||
|
||
▸ (`testbed`: [Testbed](interfaces/testbed.md)): *[World](classes/world.md)*
|
||
|
||
**Parameters:**
|
||
|
||
Name | Type |
|
||
------ | ------ |
|
||
`testbed` | [Testbed](interfaces/testbed.md) |
|
||
|
||
**Returns:** *any*
|
||
|
||
## Object literals
|
||
|
||
### `Const` BodyDefDefault
|
||
|
||
### ▪ **BodyDefDefault**: *object*
|
||
|
||
*Defined in [src/dynamics/Body.ts:109](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L109)*
|
||
|
||
### active
|
||
|
||
• **active**: *true* = true
|
||
|
||
*Defined in [src/dynamics/Body.ts:126](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L126)*
|
||
|
||
### allowSleep
|
||
|
||
• **allowSleep**: *true* = true
|
||
|
||
*Defined in [src/dynamics/Body.ts:124](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L124)*
|
||
|
||
### angle
|
||
|
||
• **angle**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Body.ts:112](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L112)*
|
||
|
||
### angularDamping
|
||
|
||
• **angularDamping**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Body.ts:118](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L118)*
|
||
|
||
### angularVelocity
|
||
|
||
• **angularVelocity**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Body.ts:115](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L115)*
|
||
|
||
### awake
|
||
|
||
• **awake**: *true* = true
|
||
|
||
*Defined in [src/dynamics/Body.ts:125](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L125)*
|
||
|
||
### bullet
|
||
|
||
• **bullet**: *false* = false
|
||
|
||
*Defined in [src/dynamics/Body.ts:121](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L121)*
|
||
|
||
### fixedRotation
|
||
|
||
• **fixedRotation**: *false* = false
|
||
|
||
*Defined in [src/dynamics/Body.ts:120](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L120)*
|
||
|
||
### gravityScale
|
||
|
||
• **gravityScale**: *number* = 1
|
||
|
||
*Defined in [src/dynamics/Body.ts:122](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L122)*
|
||
|
||
### linearDamping
|
||
|
||
• **linearDamping**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Body.ts:117](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L117)*
|
||
|
||
### linearVelocity
|
||
|
||
• **linearVelocity**: *[Vec2](classes/vec2.md)‹›* = Vec2.zero()
|
||
|
||
*Defined in [src/dynamics/Body.ts:114](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L114)*
|
||
|
||
### position
|
||
|
||
• **position**: *[Vec2](classes/vec2.md)‹›* = Vec2.zero()
|
||
|
||
*Defined in [src/dynamics/Body.ts:111](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L111)*
|
||
|
||
### type
|
||
|
||
• **type**: *"static"* = STATIC
|
||
|
||
*Defined in [src/dynamics/Body.ts:110](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L110)*
|
||
|
||
### userData
|
||
|
||
• **userData**: *null* = null
|
||
|
||
*Defined in [src/dynamics/Body.ts:128](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Body.ts#L128)*
|
||
|
||
___
|
||
|
||
### `Const` DEFAULTS
|
||
|
||
### ▪ **DEFAULTS**: *object*
|
||
|
||
*Defined in [src/dynamics/Joint.ts:85](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L85)*
|
||
|
||
*Defined in [src/dynamics/joint/DistanceJoint.ts:73](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/DistanceJoint.ts#L73)*
|
||
|
||
*Defined in [src/dynamics/joint/FrictionJoint.ts:66](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L66)*
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:113](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L113)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:109](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L109)*
|
||
|
||
*Defined in [src/dynamics/joint/GearJoint.ts:64](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/GearJoint.ts#L64)*
|
||
|
||
*Defined in [src/dynamics/joint/MotorJoint.ts:70](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L70)*
|
||
|
||
*Defined in [src/dynamics/joint/MouseJoint.ts:73](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L73)*
|
||
|
||
*Defined in [src/dynamics/joint/PulleyJoint.ts:81](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PulleyJoint.ts#L81)*
|
||
|
||
*Defined in [src/dynamics/joint/RopeJoint.ts:67](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L67)*
|
||
|
||
*Defined in [src/dynamics/joint/WeldJoint.ts:80](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WeldJoint.ts#L80)*
|
||
|
||
*Defined in [src/dynamics/joint/WheelJoint.ts:88](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L88)*
|
||
|
||
### collideConnected
|
||
|
||
• **collideConnected**: *boolean* = true
|
||
|
||
*Defined in [src/dynamics/Joint.ts:87](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L87)*
|
||
|
||
*Defined in [src/dynamics/joint/PulleyJoint.ts:82](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PulleyJoint.ts#L82)*
|
||
|
||
### correctionFactor
|
||
|
||
• **correctionFactor**: *number* = 0.3
|
||
|
||
*Defined in [src/dynamics/joint/MotorJoint.ts:73](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L73)*
|
||
|
||
### dampingRatio
|
||
|
||
• **dampingRatio**: *number* = 0.7
|
||
|
||
*Defined in [src/dynamics/joint/DistanceJoint.ts:75](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/DistanceJoint.ts#L75)*
|
||
|
||
*Defined in [src/dynamics/joint/MouseJoint.ts:76](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L76)*
|
||
|
||
*Defined in [src/dynamics/joint/WeldJoint.ts:82](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WeldJoint.ts#L82)*
|
||
|
||
*Defined in [src/dynamics/joint/WheelJoint.ts:93](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L93)*
|
||
|
||
### enableLimit
|
||
|
||
• **enableLimit**: *boolean* = false
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:118](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L118)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:110](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L110)*
|
||
|
||
### enableMotor
|
||
|
||
• **enableMotor**: *boolean* = false
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:119](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L119)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:113](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L113)*
|
||
|
||
*Defined in [src/dynamics/joint/WheelJoint.ts:89](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L89)*
|
||
|
||
### frequencyHz
|
||
|
||
• **frequencyHz**: *number* = 2
|
||
|
||
*Defined in [src/dynamics/joint/DistanceJoint.ts:74](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/DistanceJoint.ts#L74)*
|
||
|
||
*Defined in [src/dynamics/joint/MouseJoint.ts:75](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L75)*
|
||
|
||
*Defined in [src/dynamics/joint/WeldJoint.ts:81](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WeldJoint.ts#L81)*
|
||
|
||
*Defined in [src/dynamics/joint/WheelJoint.ts:92](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L92)*
|
||
|
||
### lowerAngle
|
||
|
||
• **lowerAngle**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:114](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L114)*
|
||
|
||
### lowerTranslation
|
||
|
||
• **lowerTranslation**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:111](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L111)*
|
||
|
||
### maxForce
|
||
|
||
• **maxForce**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/FrictionJoint.ts:67](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L67)*
|
||
|
||
*Defined in [src/dynamics/joint/MotorJoint.ts:71](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L71)*
|
||
|
||
*Defined in [src/dynamics/joint/MouseJoint.ts:74](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MouseJoint.ts#L74)*
|
||
|
||
### maxLength
|
||
|
||
• **maxLength**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/RopeJoint.ts:68](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RopeJoint.ts#L68)*
|
||
|
||
### maxMotorForce
|
||
|
||
• **maxMotorForce**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:114](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L114)*
|
||
|
||
### maxMotorTorque
|
||
|
||
• **maxMotorTorque**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:116](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L116)*
|
||
|
||
*Defined in [src/dynamics/joint/WheelJoint.ts:90](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L90)*
|
||
|
||
### maxTorque
|
||
|
||
• **maxTorque**: *number* = 1
|
||
|
||
*Defined in [src/dynamics/joint/FrictionJoint.ts:68](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/FrictionJoint.ts#L68)*
|
||
|
||
*Defined in [src/dynamics/joint/MotorJoint.ts:72](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/MotorJoint.ts#L72)*
|
||
|
||
### motorSpeed
|
||
|
||
• **motorSpeed**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:117](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L117)*
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:115](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L115)*
|
||
|
||
*Defined in [src/dynamics/joint/WheelJoint.ts:91](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/WheelJoint.ts#L91)*
|
||
|
||
### ratio
|
||
|
||
• **ratio**: *number* = 1
|
||
|
||
*Defined in [src/dynamics/joint/GearJoint.ts:65](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/GearJoint.ts#L65)*
|
||
|
||
### upperAngle
|
||
|
||
• **upperAngle**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/RevoluteJoint.ts:115](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/RevoluteJoint.ts#L115)*
|
||
|
||
### upperTranslation
|
||
|
||
• **upperTranslation**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/joint/PrismaticJoint.ts:112](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/joint/PrismaticJoint.ts#L112)*
|
||
|
||
### userData
|
||
|
||
• **userData**: *null* = null
|
||
|
||
*Defined in [src/dynamics/Joint.ts:86](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Joint.ts#L86)*
|
||
|
||
___
|
||
|
||
### `Const` FixtureDefDefault
|
||
|
||
### ▪ **FixtureDefDefault**: *object*
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:81](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L81)*
|
||
|
||
### density
|
||
|
||
• **density**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:85](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L85)*
|
||
|
||
### filterCategoryBits
|
||
|
||
• **filterCategoryBits**: *number* = 1
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:89](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L89)*
|
||
|
||
### filterGroupIndex
|
||
|
||
• **filterGroupIndex**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:88](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L88)*
|
||
|
||
### filterMaskBits
|
||
|
||
• **filterMaskBits**: *number* = 65535
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:90](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L90)*
|
||
|
||
### friction
|
||
|
||
• **friction**: *number* = 0.2
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:83](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L83)*
|
||
|
||
### isSensor
|
||
|
||
• **isSensor**: *false* = false
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:86](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L86)*
|
||
|
||
### restitution
|
||
|
||
• **restitution**: *number* = 0
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:84](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L84)*
|
||
|
||
### userData
|
||
|
||
• **userData**: *null* = null
|
||
|
||
*Defined in [src/dynamics/Fixture.ts:82](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Fixture.ts#L82)*
|
||
|
||
___
|
||
|
||
### `Const` WorldDefDefault
|
||
|
||
### ▪ **WorldDefDefault**: *object*
|
||
|
||
*Defined in [src/dynamics/World.ts:62](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L62)*
|
||
|
||
### allowSleep
|
||
|
||
• **allowSleep**: *true* = true
|
||
|
||
*Defined in [src/dynamics/World.ts:64](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L64)*
|
||
|
||
### blockSolve
|
||
|
||
• **blockSolve**: *true* = true
|
||
|
||
*Defined in [src/dynamics/World.ts:68](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L68)*
|
||
|
||
### continuousPhysics
|
||
|
||
• **continuousPhysics**: *true* = true
|
||
|
||
*Defined in [src/dynamics/World.ts:66](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L66)*
|
||
|
||
### gravity
|
||
|
||
• **gravity**: *[Vec2](classes/vec2.md)‹›* = Vec2.zero()
|
||
|
||
*Defined in [src/dynamics/World.ts:63](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L63)*
|
||
|
||
### positionIterations
|
||
|
||
• **positionIterations**: *number* = 3
|
||
|
||
*Defined in [src/dynamics/World.ts:70](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L70)*
|
||
|
||
### subStepping
|
||
|
||
• **subStepping**: *false* = false
|
||
|
||
*Defined in [src/dynamics/World.ts:67](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L67)*
|
||
|
||
### velocityIterations
|
||
|
||
• **velocityIterations**: *number* = 8
|
||
|
||
*Defined in [src/dynamics/World.ts:69](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L69)*
|
||
|
||
### warmStarting
|
||
|
||
• **warmStarting**: *true* = true
|
||
|
||
*Defined in [src/dynamics/World.ts:65](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/World.ts#L65)*
|
||
|
||
___
|
||
|
||
### `Const` maxSeparation
|
||
|
||
### ▪ **maxSeparation**: *object*
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:131](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L131)*
|
||
|
||
### bestIndex
|
||
|
||
• **bestIndex**: *number* = 0
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:133](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L133)*
|
||
|
||
### maxSeparation
|
||
|
||
• **maxSeparation**: *number* = 0
|
||
|
||
*Defined in [src/collision/shape/CollidePolygon.ts:132](https://github.com/shakiba/planck.js/blob/acc3bd8/src/collision/shape/CollidePolygon.ts#L132)*
|