2021-01-11 20:32:57 -08:00

8.0 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › Settings

Class: Settings

Tuning constants based on meters-kilograms-seconds (MKS) units.

Hierarchy

  • Settings

Index

Properties

Properties

aabbExtension

• aabbExtension: number

Defined in index.d.ts:553

This is used to fatten AABBs in the dynamic tree. This allows proxies to move by a small amount without triggering a tree adjustment. This is in meters.


aabbMultiplier

• aabbMultiplier: number

Defined in index.d.ts:560

This is used to fatten AABBs in the dynamic tree. This is used to predict the future position based on the current displacement. This is a dimensionless multiplier.


angularSleepTolerance

• angularSleepTolerance: number

Defined in index.d.ts:661

A body cannot sleep if its angular velocity is above this tolerance.


angularSleepToleranceSqr

• angularSleepToleranceSqr: number

Defined in index.d.ts:662


angularSlop

• angularSlop: number

Defined in index.d.ts:573

A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.


baumgarte

• baumgarte: number

Defined in index.d.ts:642

This scale factor controls how fast overlap is resolved. Ideally this would be 1 so that overlap is removed in one time step. However using values close to 1 often lead to overshoot.


linearSleepTolerance

• linearSleepTolerance: number

Defined in index.d.ts:655

A body cannot sleep if its linear velocity is above this tolerance.


linearSleepToleranceSqr

• linearSleepToleranceSqr: number

Defined in index.d.ts:656


linearSlop

• linearSlop: number

Defined in index.d.ts:566

A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.


linearSlopSquared

• linearSlopSquared: number

Defined in index.d.ts:567


maxAngularCorrection

• maxAngularCorrection: number

Defined in index.d.ts:621

The maximum angular position correction used when solving constraints. This helps to prevent overshoot.


maxDistnceIterations

• maxDistnceIterations: number

Defined in index.d.ts:603

Maximum iterations to find Distance.


maxLinearCorrection

• maxLinearCorrection: number

Defined in index.d.ts:615

The maximum linear position correction used when solving constraints. This helps to prevent overshoot.


maxManifoldPoints

• maxManifoldPoints: number

Defined in index.d.ts:541

The maximum number of contact points between two convex shapes. Do not change this value.


maxPolygonVertices

• maxPolygonVertices: number

Defined in index.d.ts:547

The maximum number of vertices on a convex polygon. You cannot increase this too much because BlockAllocator has a maximum object size.


maxRotation

• maxRotation: number

Defined in index.d.ts:634

The maximum angular velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't need to adjust this.


maxRotationSquared

• maxRotationSquared: number

Defined in index.d.ts:635


maxSubSteps

• maxSubSteps: number

Defined in index.d.ts:586

Maximum number of sub-steps per contact in continuous physics simulation.


maxTOIContacts

• maxTOIContacts: number

Defined in index.d.ts:593

Maximum number of contacts to be handled to solve a TOI impact.


maxTOIIterations

• maxTOIIterations: number

Defined in index.d.ts:598

Maximum iterations to solve a TOI.


maxTranslation

• maxTranslation: number

Defined in index.d.ts:627

The maximum linear velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't need to adjust this.


maxTranslationSquared

• maxTranslationSquared: number

Defined in index.d.ts:628


polygonRadius

• polygonRadius: number

Defined in index.d.ts:581

The radius of the polygon/edge shape skin. This should not be modified. Making this smaller means polygons will have an insufficient buffer for continuous collision. Making it larger may create artifacts for vertex collision.


timeToSleep

• timeToSleep: number

Defined in index.d.ts:650

The time that a body must be still before it will go to sleep.


toiBaugarte

• toiBaugarte: number

Defined in index.d.ts:643


velocityThreshold

• velocityThreshold: number

Defined in index.d.ts:609

A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic.