55 KiB
Planck.js API Doc
Index
Enumerations
- ContactFeatureType
- EPAxisType
- ManifoldType
- PointState
- SeparationFunctionType
- TOIOutputState
- VertexType
Classes
- AABB
- Body
- BoxShape
- BroadPhase
- ChainShape
- CircleShape
- ClipVertex
- Contact
- ContactEdge
- ContactFeature
- ContactID
- ContactImpulse
- DistanceInput
- DistanceJoint
- DistanceOutput
- DistanceProxy
- DynamicTree
- EPAxis
- EdgeShape
- Fixture
- FixtureProxy
- FrictionJoint
- GearJoint
- Iterator
- Jacobian
- Joint
- JointEdge
- Manifold
- ManifoldPoint
- MassData
- Mat22
- Mat33
- MotorJoint
- MouseJoint
- PolygonShape
- Pool
- Position
- PrismaticJoint
- PulleyJoint
- ReferenceFace
- RevoluteJoint
- RopeJoint
- Rot
- SeparationFunction
- Settings
- Shape
- Simplex
- SimplexCache
- SimplexVertex
- Solver
- Sweep
- TOIInput
- TOIOutput
- TempPolygon
- TimeStep
- Transform
- TreeNode
- Vec2
- Vec3
- Velocity
- VelocityConstraintPoint
- WeldJoint
- WheelJoint
- World
- WorldManifold
Interfaces
- ActiveKeys
- BodyDef
- DistanceJointDef
- DistanceJointOpt
- FixtureDef
- FixtureOpt
- FrictionJointDef
- FrictionJointOpt
- GearJointDef
- GearJointOpt
- JointDef
- JointOpt
- MaxSeparation
- MotorJointDef
- MotorJointOpt
- MouseJointDef
- MouseJointOpt
- PrismaticJointDef
- PrismaticJointOpt
- PulleyJointDef
- PulleyJointOpt
- RayCastInput
- RayCastOutput
- RevoluteJointDef
- RevoluteJointOpt
- RopeJointDef
- RopeJointOpt
- Testbed
- WeldJointDef
- WeldJointOpt
- WheelJointDef
- WheelJointOpt
- WorldDef
Type aliases
- BodyType
- ContactCallback
- DynamicTreeQueryCallback
- EvaluateFunction
- RayCastCallback
- ShapeType
- WorldAABBQueryCallback
- WorldRayCastCallback
Variables
- DEBUG_SOLVER
- DYNAMIC
- KINEMATIC
- SID
- STATIC
- _ASSERT
- _DEBUG
- atLowerLimit
- atUpperLimit
- edgeAxis
- equalLimits
- inactiveLimit
- internal
- math
- polygonAxis
- polygonBA
- rf
- s_registers
- s_subStep
- schema
- serializer
Functions
- ChainCircleContact
- ChainPolygonContact
- CircleCircleContact
- CollideCircles
- CollideEdgeCircle
- CollideEdgePolygon
- CollidePolygonCircle
- CollidePolygons
- ComputeCentroid
- Distance
- EdgeCircleContact
- EdgePolygonContact
- PolygonCircleContact
- PolygonContact
- Serializer
- TimeOfImpact
- Viewer
- assert
- clipSegmentToLine
- debug
- default
- diff
- findIncidentEdge
- findMaxSeparation
- getPointStates
- mixFriction
- mixRestitution
- now
- testOverlap
- testbed
Object literals
Type aliases
BodyType
Ƭ BodyType: "static" | "kinematic" | "dynamic"
Defined in src/dynamics/Body.ts:43
ContactCallback
Ƭ ContactCallback: function
Defined in src/dynamics/Contact.ts:76
Type declaration:
▸ (manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
DynamicTreeQueryCallback
Ƭ DynamicTreeQueryCallback: function
Defined in src/collision/DynamicTree.ts:36
Type declaration:
▸ (nodeId: number): boolean
Parameters:
| Name | Type |
|---|---|
nodeId |
number |
EvaluateFunction
Ƭ EvaluateFunction: function
Defined in src/dynamics/Contact.ts:66
Type declaration:
▸ (manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
RayCastCallback
Ƭ RayCastCallback: function
Defined in src/collision/AABB.ts:43
Type declaration:
▸ (subInput: RayCastInput, id: number): number
Parameters:
| Name | Type |
|---|---|
subInput |
RayCastInput |
id |
number |
ShapeType
Ƭ ShapeType: "circle" | "edge" | "polygon" | "chain"
Defined in src/collision/Shape.ts:131
WorldAABBQueryCallback
Ƭ WorldAABBQueryCallback: function
Defined in src/dynamics/World.ts:93
Called for each fixture found in the query AABB. It may return false to terminate the query.
Type declaration:
▸ (fixture: Fixture): boolean
Parameters:
| Name | Type |
|---|---|
fixture |
Fixture |
WorldRayCastCallback
Ƭ WorldRayCastCallback: function
Defined in src/dynamics/World.ts:88
Callback function for ray casts, see World.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, point: Vec2, normal: Vec2, fraction: number): number
Parameters:
| Name | Type |
|---|---|
fixture |
Fixture |
point |
Vec2 |
normal |
Vec2 |
fraction |
number |
Variables
Const DEBUG_SOLVER
• DEBUG_SOLVER: false = false
Defined in src/dynamics/Contact.ts:43
Const DYNAMIC
• DYNAMIC: "dynamic" = "dynamic"
Defined in src/dynamics/Body.ts:47
Const KINEMATIC
• KINEMATIC: "kinematic" = "kinematic"
Defined in src/dynamics/Body.ts:46
Let SID
• SID: number = 0
Defined in src/serializer/index.ts:10
Const STATIC
• STATIC: "static" = "static"
Defined in src/dynamics/Body.ts:45
Const _ASSERT
• _ASSERT: boolean = typeof ASSERT === 'undefined' ? false : ASSERT
Defined in src/util/common.ts:2
Defined in src/common/Math.ts:29
Defined in src/common/Vec2.ts:30
Defined in src/collision/AABB.ts:31
Defined in src/collision/DynamicTree.ts:33
Defined in src/common/Rot.ts:31
Defined in src/common/Transform.ts:31
Defined in src/common/Sweep.ts:32
Defined in src/common/Mat22.ts:30
Defined in src/collision/Distance.ts:36
Defined in src/dynamics/Contact.ts:40
Defined in src/collision/TimeOfImpact.ts:40
Defined in src/dynamics/Solver.ts:38
Defined in src/dynamics/Joint.ts:30
Defined in src/dynamics/Body.ts:41
Defined in src/dynamics/Fixture.ts:36
Defined in src/collision/BroadPhase.ts:33
Defined in src/dynamics/World.ts:38
Defined in src/common/Vec3.ts:30
Defined in src/common/Mat33.ts:31
Defined in src/collision/shape/CircleShape.ts:36
Defined in src/collision/shape/PolygonShape.ts:37
Defined in src/collision/shape/ChainShape.ts:36
Defined in src/collision/shape/CollideCircle.ts:35
Defined in src/collision/shape/CollideEdgeCircle.ts:36
Defined in src/collision/shape/CollidePolygon.ts:36
Defined in src/collision/shape/CollideCirclePolygone.ts:36
Defined in src/collision/shape/CollideEdgePolygon.ts:39
Defined in src/dynamics/joint/FrictionJoint.ts:36
Defined in src/dynamics/joint/RevoluteJoint.ts:39
Defined in src/dynamics/joint/PrismaticJoint.ts:39
Defined in src/dynamics/joint/GearJoint.ts:38
Defined in src/dynamics/joint/MotorJoint.ts:36
Defined in src/dynamics/joint/MouseJoint.ts:37
Defined in src/dynamics/joint/PulleyJoint.ts:36
Const _DEBUG
• _DEBUG: boolean = typeof DEBUG === 'undefined' ? false : DEBUG
Defined in src/util/common.ts:1
Defined in src/common/Math.ts:28
Defined in src/common/Vec2.ts:29
Defined in src/collision/AABB.ts:30
Defined in src/common/Rot.ts:30
Defined in src/common/Transform.ts:30
Defined in src/common/Mat22.ts:29
Defined in src/dynamics/Solver.ts:37
Defined in src/common/Vec3.ts:29
Defined in src/common/Mat33.ts:30
Const atLowerLimit
• atLowerLimit: 1 = 1
Defined in src/dynamics/joint/RevoluteJoint.ts:43
Defined in src/dynamics/joint/PrismaticJoint.ts:43
Defined in src/dynamics/joint/RopeJoint.ts:35
Const atUpperLimit
• atUpperLimit: 2 = 2
Defined in src/dynamics/joint/RevoluteJoint.ts:44
Defined in src/dynamics/joint/PrismaticJoint.ts:44
Defined in src/dynamics/joint/RopeJoint.ts:36
Const edgeAxis
• edgeAxis: EPAxis‹› = new EPAxis()
Defined in src/collision/shape/CollideEdgePolygon.ts:110
Const equalLimits
• equalLimits: 3 = 3
Defined in src/dynamics/joint/RevoluteJoint.ts:45
Defined in src/dynamics/joint/PrismaticJoint.ts:45
Defined in src/dynamics/joint/RopeJoint.ts:37
Const inactiveLimit
• inactiveLimit: 0 = 0
Defined in src/dynamics/joint/RevoluteJoint.ts:42
Defined in src/dynamics/joint/PrismaticJoint.ts:42
Defined in src/dynamics/joint/RopeJoint.ts:34
Const internal
• internal: object
Defined in src/index.ts:64
Defined in testbed/index.ts:890
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
Const polygonAxis
• polygonAxis: EPAxis‹› = new EPAxis()
Defined in src/collision/shape/CollideEdgePolygon.ts:111
Const polygonBA
• polygonBA: TempPolygon‹› = new TempPolygon()
Defined in src/collision/shape/CollideEdgePolygon.ts:112
Const rf
• rf: ReferenceFace‹› = new ReferenceFace()
Defined in src/collision/shape/CollideEdgePolygon.ts:113
Const s_registers
• s_registers: any[] = []
Defined in src/dynamics/Contact.ts:104
Const s_subStep
• s_subStep: TimeStep‹› = new TimeStep()
Defined in src/dynamics/Solver.ts:67
Const schema
• schema: any = require('../schema.json')
Defined in src/serializer/test/Validator.test.ts:12
Const serializer
• serializer: any = new Serializer()
Defined in src/serializer/index.ts:140
Functions
ChainCircleContact
▸ ChainCircleContact(manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Defined in src/collision/shape/CollideEdgeCircle.ts:52
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
Returns: void
ChainPolygonContact
▸ ChainPolygonContact(manifold: Manifold, xfA: Transform, fA: Fixture, indexA: number, xfB: Transform, fB: Fixture, indexB: number): void
Defined in src/collision/shape/CollideEdgePolygon.ts:52
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fA |
Fixture |
indexA |
number |
xfB |
Transform |
fB |
Fixture |
indexB |
number |
Returns: void
CircleCircleContact
▸ CircleCircleContact(manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Defined in src/collision/shape/CollideCircle.ts:40
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
Returns: void
CollideCircles
▸ CollideCircles(manifold: Manifold, circleA: CircleShape, xfA: Transform, circleB: CircleShape, xfB: Transform): void
Defined in src/collision/shape/CollideCircle.ts:46
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
circleA |
CircleShape |
xfA |
Transform |
circleB |
CircleShape |
xfB |
Transform |
Returns: void
CollideEdgeCircle
▸ CollideEdgeCircle(manifold: Manifold, edgeA: EdgeShape, xfA: Transform, circleB: CircleShape, xfB: Transform): void
Defined in src/collision/shape/CollideEdgeCircle.ts:68
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
edgeA |
EdgeShape |
xfA |
Transform |
circleB |
CircleShape |
xfB |
Transform |
Returns: void
CollideEdgePolygon
▸ CollideEdgePolygon(manifold: Manifold, edgeA: EdgeShape, xfA: Transform, polygonB: PolygonShape, xfB: Transform): void
Defined in src/collision/shape/CollideEdgePolygon.ts:119
This function collides and edge and a polygon, taking into account edge adjacency.
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
edgeA |
EdgeShape |
xfA |
Transform |
polygonB |
PolygonShape |
xfB |
Transform |
Returns: void
CollidePolygonCircle
▸ CollidePolygonCircle(manifold: Manifold, polygonA: PolygonShape, xfA: Transform, circleB: CircleShape, xfB: Transform): void
Defined in src/collision/shape/CollideCirclePolygone.ts:47
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
polygonA |
PolygonShape |
xfA |
Transform |
circleB |
CircleShape |
xfB |
Transform |
Returns: void
CollidePolygons
▸ CollidePolygons(manifold: Manifold, polyA: PolygonShape, xfA: Transform, polyB: PolygonShape, xfB: Transform): void
Defined in src/collision/shape/CollidePolygon.ts:146
Find edge normal of max separation on A - return if separating axis is found
Find edge normal of max separation on B - return if separation axis is found
Choose reference edge as min(minA, minB)
Find incident edge
Clip
The normal points from 1 to 2
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
polyA |
PolygonShape |
xfA |
Transform |
polyB |
PolygonShape |
xfB |
Transform |
Returns: void
ComputeCentroid
▸ ComputeCentroid(vs: Vec2[], count: number): Vec2
Defined in src/collision/shape/PolygonShape.ts:529
Parameters:
| Name | Type |
|---|---|
vs |
Vec2[] |
count |
number |
Returns: Vec2
Distance
▸ Distance(output: DistanceOutput, cache: SimplexCache, input: DistanceInput): void
Defined in src/collision/Distance.ts:94
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 |
cache |
SimplexCache |
input |
DistanceInput |
Returns: void
EdgeCircleContact
▸ EdgeCircleContact(manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Defined in src/collision/shape/CollideEdgeCircle.ts:42
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
Returns: void
EdgePolygonContact
▸ EdgePolygonContact(manifold: Manifold, xfA: Transform, fA: Fixture, indexA: number, xfB: Transform, fB: Fixture, indexB: number): void
Defined in src/collision/shape/CollideEdgePolygon.ts:45
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fA |
Fixture |
indexA |
number |
xfB |
Transform |
fB |
Fixture |
indexB |
number |
Returns: void
PolygonCircleContact
▸ PolygonCircleContact(manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Defined in src/collision/shape/CollideCirclePolygone.ts:41
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
Returns: void
PolygonContact
▸ PolygonContact(manifold: Manifold, xfA: Transform, fixtureA: Fixture, indexA: number, xfB: Transform, fixtureB: Fixture, indexB: number): void
Defined in src/collision/shape/CollidePolygon.ts:41
Parameters:
| Name | Type |
|---|---|
manifold |
Manifold |
xfA |
Transform |
fixtureA |
Fixture |
indexA |
number |
xfB |
Transform |
fixtureB |
Fixture |
indexB |
number |
Returns: void
Serializer
▸ Serializer(opts?: any): void
Defined in src/serializer/index.ts:12
Parameters:
| Name | Type |
|---|---|
opts? |
any |
Returns: void
TimeOfImpact
▸ TimeOfImpact(output: TOIOutput, input: TOIInput): void
Defined in src/collision/TimeOfImpact.ts:91
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 |
input |
TOIInput |
Returns: void
Viewer
▸ Viewer(world: any, opts: any): void
Defined in testbed/index.ts:471
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
Parameters:
| Name | Type |
|---|---|
statement |
boolean |
err? |
string |
log? |
any |
Returns: void
clipSegmentToLine
▸ clipSegmentToLine(vOut: ClipVertex[], vIn: ClipVertex[], normal: Vec2, offset: number, vertexIndexA: number): number
Defined in src/collision/Manifold.ts:323
Clipping for contact manifolds. Sutherland-Hodgman clipping.
Parameters:
| Name | Type |
|---|---|
vOut |
ClipVertex[] |
vIn |
ClipVertex[] |
normal |
Vec2 |
offset |
number |
vertexIndexA |
number |
Returns: number
Const debug
▸ debug(...rest: any[]): void
Defined in src/util/common.ts:4
Parameters:
| Name | Type |
|---|---|
...rest |
any[] |
Returns: void
default
▸ default‹T›(input: T, defaults: object): T
Defined in src/util/options.ts:1
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
Parameters:
| Name | Type |
|---|---|
time |
number |
Returns: number
findIncidentEdge
▸ findIncidentEdge(c: ClipVertex[], poly1: PolygonShape, xf1: Transform, edge1: number, poly2: PolygonShape, xf2: Transform): void
Defined in src/collision/shape/CollidePolygon.ts:91
Parameters:
| Name | Type |
|---|---|
c |
ClipVertex[] |
poly1 |
PolygonShape |
xf1 |
Transform |
edge1 |
number |
poly2 |
PolygonShape |
xf2 |
Transform |
Returns: void
findMaxSeparation
▸ findMaxSeparation(poly1: PolygonShape, xf1: Transform, poly2: PolygonShape, xf2: Transform, output: MaxSeparation): void
Defined in src/collision/shape/CollidePolygon.ts:56
Find the max separation between poly1 and poly2 using edge normals from poly1.
Parameters:
| Name | Type |
|---|---|
poly1 |
PolygonShape |
xf1 |
Transform |
poly2 |
PolygonShape |
xf2 |
Transform |
output |
MaxSeparation |
Returns: void
getPointStates
▸ getPointStates(state1: PointState[], state2: PointState[], manifold1: Manifold, manifold2: Manifold): void
Defined in src/collision/Manifold.ts:265
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[] |
state2 |
PointState[] |
manifold1 |
Manifold |
manifold2 |
Manifold |
Returns: void
mixFriction
▸ mixFriction(friction1: number, friction2: number): number
Defined in src/dynamics/Contact.ts:91
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
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
Returns: number
testOverlap
▸ testOverlap(shapeA: Shape, indexA: number, shapeB: Shape, indexB: number, xfA: Transform, xfB: Transform): boolean
Defined in src/collision/Distance.ts:691
Determine if two generic shapes overlap.
Parameters:
| Name | Type |
|---|---|
shapeA |
Shape |
indexA |
number |
shapeB |
Shape |
indexB |
number |
xfA |
Transform |
xfB |
Transform |
Returns: boolean
testbed
▸ testbed(opts: object, callback: function): any
Defined in testbed/index.ts:112
Parameters:
▪ opts: object
▪ callback: function
Parameters:
| Name | Type |
|---|---|
testbed |
Testbed |
Returns: any
▸ testbed(callback: function): any
Defined in testbed/index.ts:113
Parameters:
▪ callback: function
Parameters:
| Name | Type |
|---|---|
testbed |
Testbed |
Returns: any
Object literals
Const BodyDefDefault
▪ BodyDefDefault: object
Defined in src/dynamics/Body.ts:109
active
• active: true = true
Defined in src/dynamics/Body.ts:126
allowSleep
• allowSleep: true = true
Defined in src/dynamics/Body.ts:124
angle
• angle: number = 0
Defined in src/dynamics/Body.ts:112
angularDamping
• angularDamping: number = 0
Defined in src/dynamics/Body.ts:118
angularVelocity
• angularVelocity: number = 0
Defined in src/dynamics/Body.ts:115
awake
• awake: true = true
Defined in src/dynamics/Body.ts:125
bullet
• bullet: false = false
Defined in src/dynamics/Body.ts:121
fixedRotation
• fixedRotation: false = false
Defined in src/dynamics/Body.ts:120
gravityScale
• gravityScale: number = 1
Defined in src/dynamics/Body.ts:122
linearDamping
• linearDamping: number = 0
Defined in src/dynamics/Body.ts:117
linearVelocity
• linearVelocity: Vec2‹› = Vec2.zero()
Defined in src/dynamics/Body.ts:114
position
• position: Vec2‹› = Vec2.zero()
Defined in src/dynamics/Body.ts:111
type
• type: "static" = STATIC
Defined in src/dynamics/Body.ts:110
userData
• userData: null = null
Defined in src/dynamics/Body.ts:128
Const DEFAULTS
▪ DEFAULTS: object
Defined in src/dynamics/Joint.ts:85
Defined in src/dynamics/joint/DistanceJoint.ts:73
Defined in src/dynamics/joint/FrictionJoint.ts:66
Defined in src/dynamics/joint/RevoluteJoint.ts:113
Defined in src/dynamics/joint/PrismaticJoint.ts:109
Defined in src/dynamics/joint/GearJoint.ts:64
Defined in src/dynamics/joint/MotorJoint.ts:70
Defined in src/dynamics/joint/MouseJoint.ts:73
Defined in src/dynamics/joint/PulleyJoint.ts:81
Defined in src/dynamics/joint/RopeJoint.ts:67
Defined in src/dynamics/joint/WeldJoint.ts:80
Defined in src/dynamics/joint/WheelJoint.ts:88
collideConnected
• collideConnected: boolean = true
Defined in src/dynamics/Joint.ts:87
Defined in src/dynamics/joint/PulleyJoint.ts:82
correctionFactor
• correctionFactor: number = 0.3
Defined in src/dynamics/joint/MotorJoint.ts:73
dampingRatio
• dampingRatio: number = 0.7
Defined in src/dynamics/joint/DistanceJoint.ts:75
Defined in src/dynamics/joint/MouseJoint.ts:76
Defined in src/dynamics/joint/WeldJoint.ts:82
Defined in src/dynamics/joint/WheelJoint.ts:93
enableLimit
• enableLimit: boolean = false
Defined in src/dynamics/joint/RevoluteJoint.ts:118
Defined in src/dynamics/joint/PrismaticJoint.ts:110
enableMotor
• enableMotor: boolean = false
Defined in src/dynamics/joint/RevoluteJoint.ts:119
Defined in src/dynamics/joint/PrismaticJoint.ts:113
Defined in src/dynamics/joint/WheelJoint.ts:89
frequencyHz
• frequencyHz: number = 2
Defined in src/dynamics/joint/DistanceJoint.ts:74
Defined in src/dynamics/joint/MouseJoint.ts:75
Defined in src/dynamics/joint/WeldJoint.ts:81
Defined in src/dynamics/joint/WheelJoint.ts:92
lowerAngle
• lowerAngle: number = 0
Defined in src/dynamics/joint/RevoluteJoint.ts:114
lowerTranslation
• lowerTranslation: number = 0
Defined in src/dynamics/joint/PrismaticJoint.ts:111
maxForce
• maxForce: number = 0
Defined in src/dynamics/joint/FrictionJoint.ts:67
Defined in src/dynamics/joint/MotorJoint.ts:71
Defined in src/dynamics/joint/MouseJoint.ts:74
maxLength
• maxLength: number = 0
Defined in src/dynamics/joint/RopeJoint.ts:68
maxMotorForce
• maxMotorForce: number = 0
Defined in src/dynamics/joint/PrismaticJoint.ts:114
maxMotorTorque
• maxMotorTorque: number = 0
Defined in src/dynamics/joint/RevoluteJoint.ts:116
Defined in src/dynamics/joint/WheelJoint.ts:90
maxTorque
• maxTorque: number = 1
Defined in src/dynamics/joint/FrictionJoint.ts:68
Defined in src/dynamics/joint/MotorJoint.ts:72
motorSpeed
• motorSpeed: number = 0
Defined in src/dynamics/joint/RevoluteJoint.ts:117
Defined in src/dynamics/joint/PrismaticJoint.ts:115
Defined in src/dynamics/joint/WheelJoint.ts:91
ratio
• ratio: number = 1
Defined in src/dynamics/joint/GearJoint.ts:65
upperAngle
• upperAngle: number = 0
Defined in src/dynamics/joint/RevoluteJoint.ts:115
upperTranslation
• upperTranslation: number = 0
Defined in src/dynamics/joint/PrismaticJoint.ts:112
userData
• userData: null = null
Defined in src/dynamics/Joint.ts:86
Const FixtureDefDefault
▪ FixtureDefDefault: object
Defined in src/dynamics/Fixture.ts:81
density
• density: number = 0
Defined in src/dynamics/Fixture.ts:85
filterCategoryBits
• filterCategoryBits: number = 1
Defined in src/dynamics/Fixture.ts:89
filterGroupIndex
• filterGroupIndex: number = 0
Defined in src/dynamics/Fixture.ts:88
filterMaskBits
• filterMaskBits: number = 65535
Defined in src/dynamics/Fixture.ts:90
friction
• friction: number = 0.2
Defined in src/dynamics/Fixture.ts:83
isSensor
• isSensor: false = false
Defined in src/dynamics/Fixture.ts:86
restitution
• restitution: number = 0
Defined in src/dynamics/Fixture.ts:84
userData
• userData: null = null
Defined in src/dynamics/Fixture.ts:82
Const WorldDefDefault
▪ WorldDefDefault: object
Defined in src/dynamics/World.ts:62
allowSleep
• allowSleep: true = true
Defined in src/dynamics/World.ts:64
blockSolve
• blockSolve: true = true
Defined in src/dynamics/World.ts:68
continuousPhysics
• continuousPhysics: true = true
Defined in src/dynamics/World.ts:66
gravity
• gravity: Vec2‹› = Vec2.zero()
Defined in src/dynamics/World.ts:63
positionIterations
• positionIterations: number = 3
Defined in src/dynamics/World.ts:70
subStepping
• subStepping: false = false
Defined in src/dynamics/World.ts:67
velocityIterations
• velocityIterations: number = 8
Defined in src/dynamics/World.ts:69
warmStarting
• warmStarting: true = true
Defined in src/dynamics/World.ts:65
Const maxSeparation
▪ maxSeparation: object
Defined in src/collision/shape/CollidePolygon.ts:131
bestIndex
• bestIndex: number = 0
Defined in src/collision/shape/CollidePolygon.ts:133
maxSeparation
• maxSeparation: number = 0
Defined in src/collision/shape/CollidePolygon.ts:132