Compare commits

...

324 Commits
v0.3 ... master

Author SHA1 Message Date
11e53383c7 feat: deterministic natural logarithm
The rocket equation produces par-fuel and delta-v figures that ship inside
level data. A value that differs between platforms is the same class of bug
as a desynced replay, so log belongs in the kernel rather than falling back
to the host libm.

Reduce x = m*2^k with m in [2/3, 4/3), then ln(m) = 2*atanh((m-1)/(m+1)).
Accurate to <1e-13 against the host libm across the tested range.
2026-09-15 01:05:10 +03:00
4c82aabc5d feat: deterministic cross-platform math kernel
Replaces every host-libm call in the physics source with a kernel built from
IEEE-754-exact operations only, so simulation results are bit-identical on
ARM64/JavaScriptCore and x86-64/V8.

ECMAScript permits Math.sin/cos/atan2 to be implementation-dependent
approximations, and Rot.setAngle and Sweep.getTransform call them for every
rotating body on every step. Without this, a replay recorded on mobile does
not reproduce on desktop, which breaks replay verification and leaderboards.

- add src/common/DeterministicMath.ts (fdlibm-derived polynomials and
  Cody-Waite range reduction, plus a seeded mulberry32 PRNG)
- rewire the nine hoisted aliases in Math, Matrix, Rot, Sweep and
  dynamics/Position; no host libm call remains in src/
- export DeterministicMath and seedRandom for consumers
- add determinism tests, incl. a free fall matching the analytic solution

All 14 upstream tests still pass (22 total).
2026-09-15 00:52:19 +03:00
Ali Shakiba
93dd64df0f v1.5.0 2026-04-07 15:59:37 +03:30
Ali Shakiba
6ede4f3d2d Publish add-body, add-fixture, add-joint events 2026-04-07 15:16:03 +03:30
Ali Shakiba
86c9079d69 Remove hasVertex0 and hasVertex3 from serialize Edge 2026-04-07 15:15:48 +03:30
Ali Shakiba
7791ea1f1b Remove temp fields from distance-joint serialization 2026-04-07 15:15:40 +03:30
Ali Shakiba
9415379691 Add fixedRotation to body serialize 2026-04-07 15:15:31 +03:30
Ali Shakiba
4fc10a7fee In polygon and chain deserialize use Vec2Value 2026-04-07 15:14:59 +03:30
Ali Shakiba
c96feaccea v1.4.3 2026-02-10 15:31:37 +03:30
Ali Shakiba
0bba3b2911 Bug fix addVec2 2026-02-10 15:30:00 +03:30
Ali Shakiba
f6d90c2703 Cleanup eslint, upgrade dev deps 2026-02-08 23:08:31 +03:30
Ali Shakiba
83e5f622be remove api doc, ignore docs/dist 2026-02-08 20:15:49 +03:30
Ali Shakiba
18a00bdcf6 use vitepress 2026-02-08 20:00:27 +03:30
Ali Shakiba
cdbf302d41 update docs 2025-10-21 14:05:17 -05:00
Ali Shakiba
3b561c1880 fix example 2025-06-06 07:21:41 +03:30
Ali Shakiba
724e410c8f fix example 2025-06-01 21:38:46 +03:30
Ali Shakiba
cbec05b7e8 v1.4.2 2025-06-01 21:33:59 +03:30
Ali Shakiba
9343ffc8ec fix testbed drawing 2025-06-01 21:32:45 +03:30
Ali Shakiba
be9b789942 clean up assert and unused statements 2025-06-01 11:24:41 +03:30
Ali Shakiba
3aee543586 fix testbed page 2025-06-01 11:03:05 +03:30
Ali Shakiba
23e89ec1f7 v1.4.1 2025-05-30 16:16:08 +03:30
Ali Shakiba
d12d0cc9df fix shape name export 2025-05-30 16:14:31 +03:30
Ali Shakiba
54cfa2d206 add setup and teardown to benchmark 2025-05-29 21:14:22 +03:30
Ali Shakiba
37414c7dad v1.4.0 2025-05-26 19:43:18 +03:30
Ali Shakiba
97e4fcd011 change changesets scripts 2025-05-26 19:41:16 +03:30
Ali Shakiba
75ece37751 pretty code 2025-05-26 19:41:12 +03:30
Ali Shakiba
0dcc98b053 split TestbedInterface and Testbed class 2025-05-26 19:41:05 +03:30
Ali Shakiba
e1a271755d mark serialize and deserialize as hidden instead of internal 2025-05-26 17:31:08 +03:30
Ali Shakiba
3446820c88 fix aabb raycast 2025-05-26 17:25:07 +03:30
Ali Shakiba
1999deb142
fix typo in contacts doc 2025-04-28 15:18:15 -05:00
Ali Shakiba
02600898af update docs 2025-04-14 21:28:32 +03:30
Ali Shakiba
ffc8cb316d change local dev testbed url format and handling 2025-04-13 13:24:34 +03:30
Ali Shakiba
f628eabc36
Update limitations.md 2025-02-10 01:31:52 +03:30
Ali Shakiba
6cfb385214 update docs, use object literal 2025-01-29 19:25:02 +03:30
Ali Shakiba
8416d7b516 Add playground link to docs 2024-12-28 02:26:06 +03:30
Ali Shakiba
1c50a3f381 build v1.3.0 2024-12-28 02:03:06 +03:30
Ali Shakiba
ce1c486efa No pointer interaction when mouseForce===0 2024-12-28 02:00:31 +03:30
Ali Shakiba
56193e788c Add DataDriver (experimental) 2024-12-27 22:42:56 +03:30
Ali Shakiba
bb9bb873fc Testbed rendering rewrite 2024-12-27 22:41:01 +03:30
Ali Shakiba
7c400fa896 build v1.2.0 2024-12-24 20:11:59 +03:30
Ali Shakiba
97bb79eb94 Improve queueUpdate 2024-12-24 20:09:56 +03:30
Ali Shakiba
4b06bb31bd Unify createFixture usage in examples 2024-12-24 19:58:07 +03:30
Ali Shakiba
f0127f4fe6
Add world.queueUpdate 2024-12-24 17:41:58 +03:30
Ali Shakiba
5b611d70fb Unify createBody usage in examples 2024-12-24 15:07:16 +03:30
Ali Shakiba
3b496b846c migrate examples to Vec2Value 2024-12-23 18:57:15 +03:30
Ali Shakiba
0b31620212 build v1.1.6 2024-12-23 18:30:56 +03:30
Ali Shakiba
922ff97583 Add static Vec2.normalize 2024-12-23 18:29:40 +03:30
Ali Shakiba
bee0e1609a Change clampVec2 arg to Vec2Value 2024-12-23 18:25:46 +03:30
Ali Shakiba
fe31a9101e fix api docs links 2024-12-20 15:08:27 +03:30
Ali Shakiba
97b1a8387d v1.1.5 2024-12-19 23:15:21 +03:30
Ali Shakiba
fbd0021e30 Un-hidden style field type 2024-12-19 23:13:52 +03:30
Ali Shakiba
50ce8a971a add changesets 2024-12-19 23:12:55 +03:30
Ali Shakiba
bdbac53347 add noEmit to eslint 2024-12-19 23:09:21 +03:30
Ali Shakiba
a1753d5a1d build v1.1.4 2024-12-18 15:24:45 +03:30
Ali Shakiba
a7a62dddd8 update examples 2024-12-18 15:23:07 +03:30
Ali Shakiba
cc7fde175f fix testbed style 2024-12-18 15:21:38 +03:30
Ali Shakiba
e2c850a5d4 allow style in fixture/body/joint def 2024-12-18 15:21:21 +03:30
Ali Shakiba
22541bc6e6 migrate examples to ts 2024-12-18 14:18:45 +03:30
Ali Shakiba
9604296ed3 rename examples to .ts 2024-12-18 14:18:44 +03:30
Ali Shakiba
c11f0493f6 build v1.1.3 2024-12-18 14:17:43 +03:30
Ali Shakiba
7d09b35cea update eslint 2024-12-18 13:02:16 +03:30
Ali Shakiba
fa2112ffc1 add clampVec2 2024-12-18 13:00:20 +03:30
Ali Shakiba
3cf402108c update optional joint props type 2024-12-18 13:00:14 +03:30
Ali Shakiba
c08580cd36 fix typedoc 2024-12-15 14:41:31 +03:30
Ali Shakiba
92ce0d1080 examples: use vite-alias planck, and lint pretty 2024-12-15 13:30:32 +03:30
Ali Shakiba
71f4e5c286 v1.1.2: add body.setTransform(xf) signature 2024-12-03 22:19:17 +03:30
Ali Shakiba
0e58a85d1a v1.1.1: fix serializing chain with loop 2024-11-30 23:31:39 +03:30
Ali Shakiba
b4d7ffa0ee v1.1.0 2024-11-24 09:31:10 +03:30
Ali Shakiba
cbaf2299c4 simplify license notice 2024-11-23 16:32:23 +03:30
Ali Shakiba
e5048fe80d
v1.1.0-alpha: vite build migration 2024-11-23 16:08:24 +03:30
Ali Shakiba
514a34b23f
remove year from license 2024-11-23 12:46:32 +03:30
Ali Shakiba
d87394b2e4
bump actions/checkout@v4 and actions/setup-node@v4 2024-11-22 22:26:59 +03:30
Ali Shakiba
9930e2174d lint testbed 2024-11-22 13:24:52 +03:30
Ali Shakiba
a4fbc31180 fix collide circle types 2024-11-22 13:23:28 +03:30
Ali Shakiba
733e30b659 v1.0.9: fix exported internal.Settings and hide internal, stats 2024-11-19 12:57:40 +03:30
Ali Shakiba
b6883d0723 Fix api index 2024-11-18 17:54:19 +03:30
Ali Shakiba
0e0bef9c1e v1.0.8: lint 2024-11-18 11:29:36 +03:30
Ali Shakiba
55a9b170d2 Build v1.0.7: testbed minor update 2024-11-17 23:03:44 +03:30
Ali Shakiba
50ff5fd0f9 add lineWidth to style 2024-11-10 19:01:27 +03:30
Ali Shakiba
4cd1883c2f clean up testbed class 2024-11-10 19:01:21 +03:30
Ali Shakiba
56f0d71814 add eslint quotes and semi rules 2024-10-27 23:41:00 +03:30
Ali Shakiba
404ebd14e2
exclude examples from tsconfig 2024-10-12 14:09:31 +03:30
Ali Shakiba
a9f23fa414 Fix wheel-joint doc 2024-09-30 23:53:02 +03:30
Ali Shakiba
9e20146bc5 Build v1.0.6: use es5 stage.js 2024-09-30 23:38:39 +03:30
Ali Shakiba
fb79f188fa
Update wheel-joint.md 2024-09-30 22:27:14 +03:30
Ali Shakiba
4b6d6ec0ab build v1.0.5 2024-08-17 01:40:15 +03:30
Ali Shakiba
363f566ce3 mv stage-js to peerDependencies 2024-08-17 01:40:15 +03:30
ArShAm
11d3966c1a
add utility iframe messenger to docs 2024-08-13 15:09:31 +03:30
Wojciech Maj
8ef74eca53 Remove unnecessary dependency on is-core-module 2024-08-09 22:41:03 +03:30
Ali Shakiba
ca98be96ae update docs 2024-07-23 23:10:43 +03:30
Ali Shakiba
0d2efe6ae0 replace vec2 with vec2value in the api, update docs 2024-05-23 23:07:21 +03:30
Ali Shakiba
293c0c6d1d update docs 2024-05-13 16:44:09 +03:30
James Stanley
fe829184b3 Example renderer: refer to this.world instead of global world 2024-05-02 14:39:39 +03:30
Ali Shakiba
09cf743d5e clean up docs 2024-05-02 12:50:37 +03:30
Ali Shakiba
3d9286bd81 migrate docs to vocs 2024-05-02 00:05:28 +03:30
James Stanley
e8e3ff9b3c
Documentation cleanup (#278)
documentation cleanup
2024-04-30 22:17:38 +03:30
James Stanley
fc913b1f22 Don't dereference null pointer if elements don't exist 2024-04-29 20:30:22 +03:30
Ali Shakiba
7caf1509c2 add docs pages 2024-04-29 20:07:45 +03:30
Ali Shakiba
f089bb0c66 use new stage version 2024-04-24 23:38:42 +03:30
Ali Shakiba
34e256609a update ray cast docs and minor bug fix 2024-04-01 16:55:16 +03:30
Ali Shakiba
2b0dd3d0e9 build 1.0.2 2024-03-13 16:49:16 +03:30
Ali Shakiba
4fc3e0325d clean up serializer code 2024-03-12 16:00:30 +03:30
Ali Shakiba
c2c482fd8b fix types 2024-03-12 16:00:30 +03:30
Ali Shakiba
6de9126f75 build 1.0.1 2024-01-01 20:01:49 -08:00
Ali Shakiba
af22d7c3d1 minor fix api visibility 2024-01-01 20:01:39 -08:00
Ali Shakiba
282c3fac45 build v1.0.0 2023-12-30 16:09:06 -08:00
Ali Shakiba
041726a83f build v1.0-beta.20 2023-12-26 19:39:48 -08:00
Ali Shakiba
b205657281 normalize joints _reset 2023-12-26 19:37:24 -08:00
Ali Shakiba
3e1f0bc74e add appData 2023-12-26 19:09:49 -08:00
Ali Shakiba
0a2556722b build beta.18 2023-12-25 19:04:39 -08:00
Ali Shakiba
ba52e0c9ff rename matrix functions 2023-12-25 18:50:41 -08:00
Ali Shakiba
eade1934a0 build v1.0.0-beta.18 2023-12-24 23:22:20 -08:00
Ali Shakiba
1ea2ddd477 update docs 2023-12-24 23:19:11 -08:00
Ali Shakiba
4de71d9038 build v1.0.0-beta.17 2023-12-24 22:33:09 -08:00
Ali Shakiba
1bbdadc890 add style for debugging 2023-12-20 23:24:43 -08:00
Ali Shakiba
dc63010b82 add Testbed.start() shortcut 2023-12-20 22:52:01 -08:00
Ali Shakiba
4830ce50cf use Vec2Value interface in the api 2023-12-20 22:48:53 -08:00
Ali Shakiba
3c6390079f update testbed types 2023-12-20 22:47:10 -08:00
Ali Shakiba
a714319f6c fix json schema 2023-12-20 22:35:09 -08:00
Oliver Zell
80803cbca4
fix: fix numerical stability for area weighted centroid 2023-12-20 21:00:57 +01:00
Ali Shakiba
820f6105d7 fix setMassData 2023-09-09 11:54:00 -07:00
Oliver Zell
3efc9234ff
feat: set sideEffects to false for planck.js (#262) 2023-08-28 18:58:54 +02:00
Ali Shakiba
1aa9fb300a remove unfinished rope 2023-08-26 21:33:07 -07:00
Ali Shakiba
fcfec569be clean up step functions 2023-08-26 21:25:45 -07:00
Ali Shakiba
6b3113eb57 build v1.0.0-beta.15 2023-08-26 16:42:08 -07:00
Ali Shakiba
7f82dc49f3 fix api doc 2023-08-26 16:41:20 -07:00
Ali Shakiba
83e71a3339 add npm preflight 2023-08-26 15:43:36 -07:00
Ali Shakiba
b42b76f4bc update api-doc 2023-08-26 15:43:19 -07:00
Ali Shakiba
6ab76c7b21 fix example 2023-08-26 15:42:09 -07:00
Ali Shakiba
71cb8243bf use vec2value in joints api 2023-08-26 15:41:59 -07:00
Ali Shakiba
4a54360b54 build v1-beta.14 2023-08-26 11:56:32 -07:00
Ali Shakiba
ae249043ed call refilter after updating filter data 2023-08-26 11:51:58 -07:00
Ali Shakiba
f190017c19 update WorldRayCastCallback doc 2023-08-24 23:44:58 -07:00
Ali Shakiba
25074e5ff3
Update README.md 2023-08-24 23:24:44 -07:00
Ali Shakiba
2edd8a14ed add js-doc for rot fields 2023-08-24 17:26:02 -07:00
Ali Shakiba
ee8785ff30 build v1-beta.13 2023-08-24 12:29:59 -07:00
Ali Shakiba
549e597d11 add template testbed example 2023-08-24 12:28:21 -07:00
Ali Shakiba
cb7052f1c1 fix velocity shift on mass data change 2023-08-24 12:26:43 -07:00
Ali Shakiba
57d8126998 remove old build files 2023-08-24 11:55:03 -07:00
Ali Shakiba
33eabb680c build v1-beta.12 2023-08-23 21:58:00 -07:00
Ali Shakiba
a29feef14f functional change from box2d #582 2023-08-23 21:57:17 -07:00
Ali Shakiba
cfc9102453 awake body on setTransform 2023-08-23 21:53:37 -07:00
Ali Shakiba
9d86ecc65b convert MassData to interface 2023-08-23 02:34:55 -07:00
Ali Shakiba
5b96d954b7 update Body.shouldCollide docs 2023-08-23 00:42:52 -07:00
Ali Shakiba
d43d2c1919 update api doc 2023-08-22 12:40:19 -07:00
Ali Shakiba
e957136800 fix typo in Settings 2023-08-22 12:23:12 -07:00
harun
a69b20475a
docs: Update Body class documentation (#259)
Added information about the setType and getType methods in the Body class documentation.
2023-08-20 09:28:08 -07:00
Ali Shakiba
a971fb7908 refactor testbed api 2023-08-20 09:23:47 -07:00
Ali Shakiba
ce047fa2e9 build v1.0-beta.9 2023-08-16 19:50:00 -07:00
Ali Shakiba
edd5883795 set v1-beta to umd, with es option 2023-08-16 19:43:31 -07:00
Ali Shakiba
80a5693796 refactor math functions 2023-08-16 19:43:31 -07:00
Ali Shakiba
48f873e6ea clean up revolute joint 2023-08-16 19:42:58 -07:00
Ali Shakiba
c7e93407f5 testbed use canvas drawing for joints 2023-08-16 19:42:58 -07:00
Ali Shakiba
5dafb74b72 fix fixture proxies reactivation 2023-08-16 19:41:42 -07:00
Ali Shakiba
1d77eb8e90 update api docs and examples 2023-08-14 13:59:23 -07:00
Ali Shakiba
2b297519d9 update build v1-beta.8 2023-08-11 09:54:13 -07:00
Ali Shakiba
46aea292e5 add lengthUnitsPerMeter to settings 2023-08-11 09:40:52 -07:00
Ali Shakiba
277f60eb13 update build v1-beta.7 2023-08-11 08:15:49 -07:00
Ali Shakiba
6090cc44a7 initialize DistanceInput 2023-08-11 08:11:10 -07:00
Ali Shakiba
b7ce8be80e
optimize matrix functions (#255) 2023-08-10 20:55:02 -07:00
Ali Shakiba
9bc1bc03dc fix node benchmark 2023-08-09 23:53:44 -07:00
Oliver Zell
652eb41563
test: switch to vitest (#252)
* test: switch to vitest

* docs: exclude tests from typedocs

* chore: remove ts-node dependency

* test: remove chai dependency
2023-08-07 13:32:29 -07:00
Ali Shakiba
e942302745 add git info to benchmark page 2023-08-06 23:41:04 -07:00
Ali Shakiba
322bdaf42b improve memory allocation 2023-08-06 22:20:43 -07:00
Ali Shakiba
500bb9c71e
fix benchmark link 2023-08-06 22:13:14 -07:00
Ali Shakiba
3aa18f07b6 add benchmark 2023-08-06 21:56:56 -07:00
Ali Shakiba
2ca89b0ad2 update stage.js version 2023-08-06 19:55:25 -07:00
Oliver Zell
849f0e7f9b fix: fix testbed findBody function 2023-08-06 19:29:11 -07:00
Ali Shakiba
1a4b19d3ee fix build, js files default to esm 2023-08-06 19:16:45 -07:00
Ali Shakiba
c2877d248c update pool class 2023-08-06 12:22:21 -07:00
Ali Shakiba
0d4e72564a remove duplicate type 2023-08-05 21:38:22 -07:00
Oliver Zell
a904b1fdb3
Merge pull request #247 from piqnt/shape-cast
feat: add ShapeCast function
2023-08-05 10:15:42 +02:00
Oliver Zell
05352bd7b6 docs: make ShapeCast example more interesting 2023-08-05 10:14:42 +02:00
Oliver Zell
bbcdc54da4 feat: add ShapeCast function 2023-08-05 09:29:46 +02:00
Oliver Zell
65eaf4d858 refactor: use early returns 2023-08-04 16:27:56 -07:00
Oliver Zell
c76525ba24 fix: fix anchor A formula for MotorJoint to include the offset 2023-08-04 16:27:56 -07:00
Oliver Zell
5ed20efedb docs: added documentation of damping parameter units 2023-08-04 16:27:56 -07:00
Oliver Zell
09b41946e3 refactor!: remove getVertex method on shapes 2023-08-04 16:27:56 -07:00
Oliver Zell
bfd859669b feat: body.setAwake now resets the sleep timer even if the body is awake 2023-08-04 16:27:56 -07:00
Oliver Zell
c7e33ee2d1 refactor: polygonal radius clarity 2023-08-04 16:27:56 -07:00
Oliver Zell
af01b2921d refactor: remove dead code 2023-08-04 16:27:56 -07:00
Oliver Zell
3ccbd84dc4 refactor: minor refactorings 2023-08-04 16:27:56 -07:00
Ali Shakiba
39a983b7c5
make build backward compatible (#245) 2023-08-01 14:30:08 -07:00
Ali Shakiba
cbfba8ccc8
typescript testbed and vite build (#244) 2023-07-31 21:47:06 -07:00
Ali Shakiba
499075d715
refactor exports and add esm export (#243) 2023-07-31 19:35:10 -07:00
Ali Shakiba
c8e7407241
update links 2023-07-28 19:02:24 -07:00
Ali Shakiba
f41da62e94
update links 2023-07-28 19:00:59 -07:00
Ali Shakiba
836cdb0d5f fix typo 2023-07-28 02:05:59 -07:00
harun
2d69c7727b Update OneSidedPlatform.js
Added comments for clarification of if(0) { ... } else { ... } usage
2023-07-23 22:34:22 -07:00
Ali Shakiba
298d7dd6d4
move docs to new site 2023-07-09 01:06:21 -07:00
Jean Saint Fleur
9ae39ce602 remove userData exception when he has falsy value "0" 2023-07-06 18:14:37 -07:00
Ali Shakiba
26b6185f95
remove install instruction 2023-07-04 23:55:51 -07:00
Ali Shakiba
29d2462eb3
fix DistanceJoint typing 2023-06-13 15:51:55 -07:00
Ali Shakiba
1702647e06 move initialization after factory call check 2023-06-12 11:17:29 -07:00
Ali Shakiba
889236ea3c move build-utils 2023-06-09 08:19:20 -07:00
Ali Shakiba
361199edae update license and changes 2023-06-09 08:19:20 -07:00
Ali Shakiba
04e9f70561 remove babel 2023-06-09 08:19:20 -07:00
Ali Shakiba
83eb157c73
remove bower.json 2023-06-08 18:09:06 -07:00
Ali Shakiba
83e3e33295
Update README.md 2023-06-02 23:08:58 -07:00
Oliver Zell
3b262124ce alpha.4 2022-03-29 12:23:36 +02:00
Oliver Zell
3fef1b9423
Merge pull request #212 from matthewvroman/hotfix/prismatic-joint-constraints
Include missing instantiation of m_K matrix
2022-03-04 19:53:23 +01:00
Matt Vroman
8c9c84220c Merge branch 'master' of https://github.com/shakiba/planck.js into hotfix/prismatic-joint-constraints 2022-03-03 18:50:59 -08:00
Matt Vroman
0015f7f50e Include missing instantiation of m_K matrix 2022-03-03 18:50:03 -08:00
Oliver Zell
158e5eb65c
Merge pull request #213 from shakiba/clean-up 2022-02-20 08:30:49 +01:00
Oliver Zell
8c61838d08 delete webpack config 2022-02-19 16:48:46 +01:00
Oliver Zell
22549b433a remove nodemon dependency 2022-02-19 16:44:17 +01:00
Oliver Zell
16995c4e4e fix test coverage scripts 2022-02-19 16:36:38 +01:00
Oliver Zell
f305373809 migrate to @rollup/plugin-babel 2022-02-19 16:00:02 +01:00
Oliver Zell
1229528e05 alpha.3 2022-01-23 09:51:49 +01:00
Oliver Zell
4c759066ea
Merge pull request #211 from shakiba/types-fix
Types fix
2022-01-23 09:43:37 +01:00
Oliver Zell
94b4d42dc4 Merge branch 'master' into types-fix 2022-01-21 20:42:02 +01:00
Oliver Zell
ac608af813 fix styling 2022-01-21 20:33:11 +01:00
Oliver Zell
159a3f9c4c export ContactImpulse type 2022-01-21 20:29:48 +01:00
Oliver Zell
95e155c282 declare static properties on Manifold directly 2022-01-21 20:03:48 +01:00
Oliver Zell
c10131b107
Merge pull request #210 from shakiba/reduce-function-overloading
Reduce function overloading
2022-01-20 20:16:21 +01:00
Oliver Zell
35717114ea make vec2.set and transform.set backward compatible 2021-12-23 19:42:08 +01:00
Oliver Zell
dcb32dd60c use Num in method names 2021-12-23 19:35:22 +01:00
Oliver Zell
52bd011de0 remove overloading of transform.set 2021-12-18 10:58:31 +01:00
Oliver Zell
e12acfe42b remove usage of overloaded functions in Rot 2021-12-18 10:51:55 +01:00
Oliver Zell
df092ddfeb remove usage of Vec3 object constructor 2021-12-17 20:55:20 +01:00
Oliver Zell
57b4379809 remove function overloads in Vec2 2021-12-17 20:50:53 +01:00
Oliver Zell
fd16eba95c
Merge pull request #202 from shakiba/types-fix
split class declarations into interface and object
2021-11-20 16:27:32 +01:00
Oliver Zell
cb32abaff6 fix typedoc 2021-11-20 16:16:20 +01:00
Oliver Zell
4604db1dfb exclude .test-d.ts files from typedoc 2021-11-20 14:13:25 +01:00
Oliver Zell
6d2fb83af3 Merge branch 'master' into types-fix 2021-11-20 13:46:24 +01:00
Oliver Zell
23e8d7b3fc add note to ts issue 2021-11-20 13:31:37 +01:00
Oliver Zell
a96bb35b8d
Merge pull request #206 from shakiba/eslint
migrate to eslint
2021-11-20 11:35:13 +01:00
Oliver Zell
116b5bc6c7 add types test 2021-11-03 20:16:39 +01:00
Oliver Zell
b10aace4d7 migrate to eslint 2021-10-31 15:18:32 +01:00
Oliver Zell
1685b7f367 use as const syntax 2021-10-30 22:23:03 +02:00
Oliver Zell
a4b5ce2b11 preserve constructor comments in declaration transformation 2021-10-30 21:56:10 +02:00
Dylan Greene
cb9fb5f27a Set awake param to true by default 2021-10-15 23:20:13 -07:00
Oliver Zell
cb585d699d preserve comments in declaration transformation 2021-10-10 17:10:00 +02:00
Oliver Zell
238fa1e8c1 use typescript guards in declaration transformer 2021-10-04 12:04:11 +02:00
Oliver Zell
cb9ec02f44 use name of nodes directly 2021-10-04 11:28:55 +02:00
Oliver Zell
97c029dff8 split class declarations into interface and object 2021-09-24 20:53:08 +02:00
Ali Shakiba
01dce1c8f4
Update README.md 2021-05-27 20:02:55 -07:00
Ali Shakiba
e12818409a remove abstract deserialize and serialize from Join/Shape 2021-05-11 22:00:37 -07:00
Ali Shakiba
d88d1498d5 clean up _deserialize typedef 2021-05-11 21:32:43 -07:00
Ali Shakiba
2ddac881d4 fix aabb 2021-05-11 20:53:07 -07:00
Ali Shakiba
7fd9c8605e tslint props typedef 2021-05-11 20:14:11 -07:00
Ali Shakiba
59c714c3ca mark toStrings as internal 2021-05-11 19:22:07 -07:00
Ali Shakiba
b1d7cd786c clean up isValid 2021-05-11 18:57:12 -07:00
Ali Shakiba
3d92e64398 generate typedocs 2021-05-11 18:30:36 -07:00
Ali Shakiba
c255e2aa41 mark Body and Fixture constructor as internal 2021-05-11 18:28:41 -07:00
Ali Shakiba
acc3bd8330 typescript tests 2021-05-11 16:03:26 -07:00
Ali Shakiba
00c08cf986 enable tslint typedef for functions 2021-05-08 18:26:16 -07:00
Ali Shakiba
25bb24cb04 update typedocs 2021-05-08 11:13:58 -07:00
Ali Shakiba
1523746162 clean up chain/edge next/prev vertex methods 2021-05-08 11:05:41 -07:00
Ali Shakiba
641bcd930f clean up types and docs 2021-05-08 10:57:45 -07:00
Ali Shakiba
f39e62ec1c alpha.2 2021-05-07 18:32:14 -07:00
Ali Shakiba
2597dc1897
update package name to planck (#195)
update package name
2021-05-07 16:44:05 -07:00
Ali Shakiba
ba823df7fc
update readme 2021-05-07 16:01:06 -07:00
Ali Shakiba
3f89cb77bc clean up package 2021-05-06 16:22:43 -07:00
Ali Shakiba
d28ef22c51 add testbed to docs 2021-05-06 16:22:31 -07:00
Ali Shakiba
eb47c5c1e4 update test script patch 2021-05-06 16:22:12 -07:00
Ali Shakiba
5a917f0bb1
Migrate Testbed to TypeScript (#191)
migrate testbed to typescript
2021-05-05 14:55:10 -07:00
Oliver Zell
a7b3fc766b
Merge pull request #188 from shakiba/fix-breakable-example
Fix breakable example
2021-05-04 19:30:02 +02:00
Oliver Zell
96eb5fb546 Merge branch 'master' into fix-breakable-example 2021-05-04 19:27:47 +02:00
Ali Shakiba
cc121fb192
Add build action 2021-05-02 19:42:23 -07:00
Ali Shakiba
cc2ddee17a
Update README.md 2021-05-02 18:40:36 -07:00
Ali Shakiba
9a212b0832 don't include generated declarations in api doc 2021-05-02 17:19:54 -07:00
Ali Shakiba
8127f05df5 fix testbed 2021-05-02 16:25:37 -07:00
Ali Shakiba
357956f66b use whitelist for declarationTransformer 2021-05-02 16:11:49 -07:00
Ali Shakiba
b78eb45745 minor fix ts 2021-05-02 15:23:36 -07:00
Oliver Zell
c1149fc65e Merge branch 'master' into fix-breakable-example 2021-05-01 18:51:54 +02:00
Oliver Zell
132bda2371 build dist files 2021-05-01 18:37:09 +02:00
Ali Shakiba
1b3d313372 convert Settings to class 2021-04-30 16:24:24 -07:00
Oliver Zell
c3bc2986f3 initialize normals and tangents in ContactImpulse 2021-04-30 20:54:30 +02:00
Ali Shakiba
6a5d3be431 tag serializer fuctions as internal 2021-04-30 10:56:21 -07:00
Ali Shakiba
3ede11b420 clean up body def docs 2021-04-23 21:05:37 -07:00
Ali Shakiba
2a3930dc0b remove addPair 2021-04-23 21:01:46 -07:00
Oliver Zell
63e787bb7c fix this binding 2021-04-23 21:01:46 -07:00
Ali Shakiba
696ed13eef
Create README.md 2021-04-17 11:09:11 -07:00
Oliver Zell
cfcb332665
Merge pull request #169 from shakiba/typescript
Migrate to TS
2021-04-16 17:11:31 +02:00
Oliver Zell
3aab68f578 Merge branch 'typescript' of https://github.com/shakiba/planck.js into typescript 2021-04-16 17:10:20 +02:00
Oliver Zell
bdc1c848d2 generate API docs 2021-04-16 17:10:15 +02:00
Oliver Zell
799dc7326c
Merge branch 'master' into typescript 2021-04-16 17:04:06 +02:00
Oliver Zell
7e469c4d4b add testbed to types 2021-04-15 20:04:02 +02:00
Oliver Zell
9b7f55c676 generate function declarations in type definitions 2021-04-14 22:16:57 +02:00
Oliver Zell
2696078864
Merge pull request #173 from shakiba/rollup-plugin-ts
Generate declaration file
2021-04-13 20:00:16 +02:00
Oliver Zell
6d0bbc5143 fix redeclarations of Joint in typings 2021-04-13 19:51:59 +02:00
Oliver Zell
8644019fd2 update dist files 2021-04-12 08:05:02 +02:00
Oliver Zell
fa1988a4a5 generate declaration file on build 2021-04-11 11:39:33 +02:00
Oliver Zell
e7d79dd36d use rollup-plugin-ts 2021-04-11 11:37:19 +02:00
Ali Shakiba
a360a037df change version to v1.0 2021-04-10 17:38:41 -07:00
Ali Shakiba
74bc4e8f74 cleanup types and docs 2021-04-10 17:36:20 -07:00
Ali Shakiba
4b5d9d79b9 optimize contact impulse reporting 2021-04-10 17:34:57 -07:00
Oliver Zell
d3141c289f minor TS fixes 2021-04-10 13:45:04 +02:00
Oliver Zell
61b7585bc2 fix TS error in PolygonShape 2021-04-10 13:36:52 +02:00
Oliver Zell
ea7accf940 fix rollup build 2021-04-10 13:33:50 +02:00
Ali Shakiba
6813d89e66 reorg files, lib to src 2021-03-28 23:57:16 -07:00
Ali Shakiba
d188285ad9 cleanup types and docs 2021-03-28 23:13:16 -07:00
Ali Shakiba
67a2978edb merge math d.ts 2021-03-28 23:08:45 -07:00
Ali Shakiba
73978694e2 improve types 2021-03-28 15:38:57 -07:00
Ali Shakiba
373abafdf5 auto-fix lint, and clean up comments 2021-03-28 15:25:55 -07:00
Ali Shakiba
32313e917f fix import 2021-03-28 15:22:23 -07:00
Ali Shakiba
3ba5d1bda7 auto-fix lint, and clean up docs 2021-03-28 15:17:45 -07:00
Ali Shakiba
830815a22b minor fix for joints 2021-03-28 15:07:44 -07:00
Ali Shakiba
3fb115bad9 typescript rope 2021-03-28 14:46:49 -07:00
Ali Shakiba
cfee322b90 typescript shape collision files 2021-03-28 14:33:09 -07:00
Ali Shakiba
2500d559cf cleanup types 2021-03-28 14:18:16 -07:00
Oliver Zell
ea06f27da2 set ts lib to ES2015 for Object.assign 2021-03-28 17:35:30 +02:00
Oliver Zell
97ac52a6f2 ts fixes for shape/* 2021-03-28 15:53:03 +02:00
Oliver Zell
e4f52f319e typescript joint/* 2021-03-28 15:37:52 +02:00
Ali Shakiba
02901c554f cleanup types 2021-03-28 01:22:28 -07:00
Ali Shakiba
4964479bf2 ts config 2021-03-28 00:31:56 -07:00
Ali Shakiba
c32a1e228d typescript serializer 2021-03-27 22:38:50 -07:00
Ali Shakiba
56445ed2e6 lint auto-fix 2021-03-27 22:28:04 -07:00
Ali Shakiba
fc8a1c4eaf typescript dynamics 2021-03-27 18:22:31 -07:00
Ali Shakiba
bf71dd7e5e declare debug/assert types 2021-03-27 16:07:26 -07:00
Ali Shakiba
564c486002 typescript collision and util 2021-03-27 15:43:15 -07:00
Oliver Zell
98cc48f9d8 typescript Shape classes 2021-03-27 15:51:40 +01:00
Oliver Zell
5e476a7abb add empty tsconfig 2021-03-27 15:51:03 +01:00
Ali Shakiba
9515e4c72c typescript common/* 2021-03-27 00:48:21 -07:00
Ali Shakiba
c028854af2
Update README.md 2021-03-26 22:04:05 -07:00
Ali Shakiba
f9a12c1879 typescript Sweep, Matt22, Matt33 2021-03-26 21:49:29 -07:00
Ali Shakiba
f14921dffb typescript index, Settings 2021-03-26 21:49:29 -07:00
Ali Shakiba
1cc26433a0 add typescript to build 2021-03-26 18:36:39 -07:00
Ali Shakiba
abfd3390ea
Update README.md 2021-03-21 17:30:24 -07:00
Ali Shakiba
e188b6c5b2
Update README.md 2021-03-21 14:46:25 -07:00
Ali Shakiba
86608052ca
Update README.md 2021-03-21 14:27:20 -07:00
Ali Shakiba
775b338630
Migrate to ESM and Rollup (#168)
migrate to esm and rollup
2021-03-21 14:09:03 -07:00
Ali Shakiba
81614c1600
Update README.md 2021-03-15 20:57:52 -07:00
488 changed files with 115647 additions and 135196 deletions

8
.changeset/README.md Normal file
View File

@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

11
.changeset/config.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}

50
.github/workflows/deploy-docs.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Deploy docs to github pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master", "main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build
run: npm run typedoc && npm run docs:build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
# Upload dist folder
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

38
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: npm-install
run: npm install
- name: npm-test
run: npm run test
- name: npm-lint
run: npm run lint
- name: npm-build
run: npm run build
- name: npm-test-types
run: npm run test:types
- name: npm-typedoc
run: npm run typedoc

52
.gitignore vendored
View File

@ -1,7 +1,51 @@
node_modules/
.idea
**/ignore
**/ignore.*
dist/docs/
# typedoc
docs/pages/api/
# vitepress
docs/.vitepress/cache/
docs/.vitepress/dist/
docs/.vitepress/.temp/
# misc
.DS_Store
*.pem
# dependencies
node_modules
.pnp
.pnp.js
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
.env
# testing
/coverage
/.nyc_output
# production
build
/docs/dist
# next.js
.next/
# out/
# vercel
.vercel
# ide
.idea/
.vscode*/
# typescript
*.tsbuildinfo
next-env.d.ts

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
/dist/
/docs/api/

4
.prettierrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"printWidth": 120,
"quoteProps": "preserve"
}

77
CHANGELOG.md Normal file
View File

@ -0,0 +1,77 @@
# planck
## 1.5.0
### Minor Changes
- 6ede4f3: Publish add-body, add-fixture, add-joint events
### Patch Changes
- 9415379: Add fixedRotation to body serialize
- 7791ea1: Remove temp fields from distance-joint serialization
- 86c9079: Remove hasVertex0 and hasVertex3 from serialize Edge
- 4fc10a7: In polygon and chain \_deserialize use Vec2Value
## 1.4.3
### Patch Changes
- 0bba3b2: Bug fix addVec2
## 1.4.2
### Patch Changes
- 9343ffc: Fix testbed drawing
## 1.4.1
### Patch Changes
- d12d0cc: Fix shape name alias export
## 1.4.0
### Minor Changes
- 0dcc98b: Split TestbedInterface and Testbed class
### Patch Changes
- e1a2717: Mark serialize and deserialize functions as @hidden instead of @internal
- 3446820: Fix AABB.rayCast
## 1.3.0
### Minor Changes
- bb9bb87: Testbed rendering rewrite
- 56193e7: Add DataDriver (experimental for demo use-case)
### Patch Changes
- ce1c486: No pointer interaction when mouseForce===0
## 1.2.0
### Minor Changes
- f0127f4: Add world.queueUpdate() to queue and defer updates after current simulation step
### Patch Changes
- 97bb79e: Improve world.queueUpdate
## 1.1.6
### Patch Changes
- f31114b: Add static Vec2.normalize
- bee0e16: Change clampVec2 arg to Vec2Value
## 1.1.5
### Patch Changes
- fbd0021: Un-hidden style field type

View File

@ -1,3 +1,10 @@
## 1.1.0
* Vite build migration
## 1.0.0
* Typescript migration
* Performance improvements
## 0.2
* TypeScript definitions added
* wSet/wAdd/wSub(a, v, b, w) replaced with combine/setCombine/addCombine/subCombine(a, v, b, w)

View File

@ -1,106 +0,0 @@
/*
* MIT License
* Copyright (c) 2019 Erin Catto
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*
* This is a simple example of building and running a simulation
* using Planck.js. Here we create a large ground box and a small dynamic
* box.
* There are no graphics for this example. Planck.js is meant to be used
* with your rendering engine in your game engine.
*
* To run this example simply run `node HelloWorld.js` from command line.
*/
var planck = require('./lib')
var Vec2 = planck.Vec2;
// Define the gravity vector.
var gravity = Vec2(0.0, -10.0);
// Construct a world object, which will hold and simulate the rigid bodies.
var world = planck.World(gravity);
// Define the ground body.
var groundBodyDef = {
position: Vec2(0.0, -10.0)
};
// Call the body factory which allocates memory for the ground body
// from a pool and creates the ground box shape (also from a pool).
// The body is also added to the world.
var groundBody = world.createBody(groundBodyDef);
// Define the ground box shape.
// The extents are the half-widths of the box.
var groundBox = planck.Box(50.0, 10.0);
// Add the ground fixture to the ground body.
groundBody.createFixture(groundBox, 0.0);
// Define the dynamic body. We set its position and call the body factory.
var bodyDef = {
type: 'dynamic',
position: Vec2(0.0, 4.0),
}
var body = world.createBody(bodyDef);
// Define another box shape for our dynamic body.
var dynamicBox = planck.Box(1.0, 1.0);
// Define the dynamic body fixture.
var fixtureDef = {
shape: dynamicBox,
// Set the box density to be non-zero, so it will be dynamic.
density: 1.0,
// Override the default friction.
friction: 0.3,
};
// Add the shape to the body.
body.createFixture(fixtureDef);
// Prepare for simulation. Typically we use a time step of 1/60 of a
// second (60Hz) and 10 iterations. This provides a high quality simulation
// in most game scenarios.
var timeStep = 1.0 / 60.0;
var velocityIterations = 6;
var positionIterations = 2;
// This is our little game loop.
for (var i = 0; i < 60; ++i) {
// Instruct the world to perform a single step of simulation.
// It is generally best to keep the time step and iterations fixed.
world.step(timeStep, velocityIterations, positionIterations);
// Now print the position and angle of the body.
var position = body.getPosition();
var angle = body.getAngle();
console.log(position.x.toFixed(2), position.y.toFixed(2), angle.toFixed(2));
}
console.log(Math.abs(position.x) < 0.01);
console.log(Math.abs(position.y - 1.01) < 0.01);
console.log(Math.abs(angle) < 0.01);

86
HelloWorld.ts Normal file
View File

@ -0,0 +1,86 @@
/*
* Copyright (c) Erin Catto
* Licensed under the MIT license
*/
/*
* This is a simple example of building and running a simulation
* using Planck.js. Here we create a large ground box and a small dynamic
* box.
* There are no graphics for this example. Planck.js is meant to be used
* with your rendering engine in your game engine.
*
* To run this example simply run `node HelloWorld.js` from command line.
*/
import { Box, World } from "./src";
// Define the gravity vector.
var gravity = { x: 0.0, y: -10.0 };
// Construct a world object, which will hold and simulate the rigid bodies.
var world = new World({
gravity: gravity,
});
// Define the ground body.
var groundBodyDef = {
position: { x: 0.0, y: -10.0 },
};
// Call the body factory which allocates memory for the ground body
// from a pool and creates the ground box shape (also from a pool).
// The body is also added to the world.
var groundBody = world.createBody(groundBodyDef);
// Define the ground box shape.
// The extents are the half-widths of the box.
var groundBox = new Box(50.0, 10.0);
// Add the ground fixture to the ground body.
groundBody.createFixture(groundBox, 0.0);
// Define the dynamic body. We set its position and call the body factory.
var body = world.createBody({
type: "dynamic",
position: { x: 0.0, y: 4.0 },
});
// Define another box shape for our dynamic body.
var dynamicBox = new Box(1.0, 1.0);
// Define the dynamic body fixture.
var fixtureDef = {
shape: dynamicBox,
// Set the box density to be non-zero, so it will be dynamic.
density: 1.0,
// Override the default friction.
friction: 0.3,
};
// Add the shape to the body.
body.createFixture(fixtureDef);
// Prepare for simulation. Typically we use a time step of 1/60 of a
// second (60Hz) and 10 iterations. This provides a high quality simulation
// in most game scenarios.
var timeStep = 1.0 / 60.0;
var velocityIterations = 6;
var positionIterations = 2;
// This is our little game loop.
for (var i = 0; i < 60; ++i) {
// Instruct the world to perform a single step of simulation.
// It is generally best to keep the time step and iterations fixed.
world.step(timeStep, velocityIterations, positionIterations);
// Now print the position and angle of the body.
var position = body.getPosition();
var angle = body.getAngle();
console.log(position.x.toFixed(2), position.y.toFixed(2), angle.toFixed(2));
}
console.log(Math.abs(position.x) < 0.01);
console.log(Math.abs(position.y - 1.01) < 0.01);
console.log(Math.abs(angle) < 0.01);

View File

@ -1,6 +1,5 @@
The MIT License
Copyright (c) 2021 Erin Catto, Ali Shakiba
Copyright (c) Erin Catto, Ali Shakiba
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

137
README.md
View File

@ -1,96 +1,65 @@
# planck-deterministic
A fork of [planck.js](https://github.com/piqnt/planck.js) (MIT, Erin Catto / Ali Shakiba)
with a **cross-platform deterministic math kernel**.
## Why
Upstream planck calls the host `Math.sin`, `Math.cos`, `Math.atan2` and `Math.random`.
IEEE-754 guarantees `+ - * /` and `sqrt` are correctly rounded, so those are identical
everywhere — but ECMAScript explicitly permits an *implementation-dependent approximation*
for the transcendental functions, and every engine forwards them to the host libm. Those
results differ between ARM64/JavaScriptCore (iOS) and x86-64/V8 (desktop).
`Rot.setAngle` and `Sweep.getTransform` call sin/cos for **every rotating body on every
step**. So a simulation shared between a mobile build and a desktop build diverges as soon
as anything rotates. That breaks replay portability, server-side replay verification, and
any leaderboard built on re-simulating a replay.
## What changed
- Added `src/common/DeterministicMath.ts` — `sin`, `cos`, `exp`, `atan`, `atan2`, `sqrt` and
a seeded PRNG, built from `+ - * /` and comparisons only. Coefficients and the Cody-Waite
range reduction follow fdlibm (Sun, freely distributable), the reference implementation
most libms derive from. Accuracy is within a few ulp of the host libm.
- Rewired the nine hoisted aliases in `Math.ts`, `Matrix.ts`, `Rot.ts`, `Sweep.ts` and
`dynamics/Position.ts` to use it. **No host libm call remains anywhere in `src/`.**
- Exported the kernel (`DeterministicMath`, `seedRandom`) so consumers can share the exact
same functions the solver uses and seed the PRNG for reproducible replays.
Every upstream test still passes, plus new determinism tests including a check that a
simulated free fall matches the closed-form analytic solution.
```js
import { World, seedRandom, DeterministicMath } from "planck-deterministic";
seedRandom(12345); // before a run, and before replaying it
```
## Upstream
This tracks planck.js v1.5.0. Upstream docs and API below.
---
# Planck.js
Planck.js is JavaScript rewrite of Box2D physics engine for cross-platform HTML5 game development.
Planck.js is JavaScript/TypeScript rewrite of Box2D physics engine for cross-platform HTML5 game development.
#### Motivations
- Taking advantage of Box2D's efforts and achievements
- Developing readable and maintainable JavaScript code
- Developing readable and editable code in JavaScript/TypeScript
- Providing idiomatic JavaScript/TypeScript API
- Optimizing the library for web and mobile platforms
- Providing a JavaScript-friendly API
#### [Documentation](https://piqnt.com/planck.js/docs/)
## Documentation
#### [Examples](https://piqnt.com/planck.js/)
- [Documentations Wiki](https://github.com/shakiba/planck.js/wiki/) - This is the best place to start, and find other resources
- [Examples](https://piqnt.com/planck.js/) - Online examples with editable code
#### [Discord](https://discord.com/invite/znjh6J7)
#### [Made with Planck.js](https://github.com/piqnt/planck.js/wiki/)
## Community
- [Discord](https://discord.gg/znjh6J7) - Community discussions and Q/A
- [Twitter @Piqnt](https://twitter.com/piqnt) - Updates and news
- [GitHub](https://github.com/shakiba/planck.js/) - Source code and issues
## API and Architecture
Planck.js includes Box2D algorithms without modification and its architecture is very similar to Box2D.
However some internal changes and refactoring are made during rewrite to address differences between C++ and JavaScript.
Planck.js public API closely follows Box2D API, with the following differences:
- `b2` prefix is dropped from class names, for example `b2World` is now available as `planck.World`.
- Method names are converted from UpperCamelCase to lowerCamelCase.
- Definition classes/objects (BodyDef, FixtureDef, etc.) are replaced by inline JavaScript objects (`{}`).
- Shapes are considered immutable and are not cloned when used to create fixtures.
- Contact filtering can be customized by overriding shouldCollide method of Fixture.
- Listener classes are replaced with simple functions.
- `World#on(eventName, listenerFn)` and `World#off(eventName, listenerFn)` are added to add and remove event listeners. Currently supported events are:
`'begin-contact'`, `'end-contact'`, `'pre-solve'`, `'post-solve'`, `'remove-joint'`, `'remove-fixture'`, `'remove-body'`
## Projects
#### Games
- [Astray 2](https://wwwtyro.github.io/astray-2/) ([source](https://github.com/wwwtyro/astray-2)) by Rye Terrell
- [I have to flap](https://ihavetoflap.web.app/) by Elias Ku
- [Hoverator](https://vgel.me/hoverator/) by Jonathon Vogel
- [Acolyte Fight](https://acolytefight.io/)
- [Comeback](http://romainclement.eu/Comeback/) by Romain Clément
- [Nitro Clash](http://nitroclash.io/)
- [Space Rage 2](https://space-rage-2-bad-prospects-dev.netlify.app/) by Hendrik Mans
- Air Hockey ([source](https://github.com/Steveeeie/webgl-air-hockey-server)) by Steve Meredith
- [Coined](https://coined--parameterized.repl.co/) ([source](https://repl.it/talk/challenge/Coined/13314))
- [Zzzone!](https://www.engehausen.de/jan/zzz.html) ([source](https://github.com/smurf667/zzzone)) by Jan Engehausen
#### Other Projects
- [Fall / Fill](https://twitter.com/jezzamonn/status/1246212104593403905) by Jez Swanson
- [1000 Unique Postcards](https://twitter.com/andreasgysin/status/956131218386509824) by Andreas Gysin
- [Flag in the Wind](https://codepen.io/unframework/pen/OrOMBg) by Nick Matantsev
- [Handle](https://twitter.com/marurur/status/1240141036606947329) by Ichiro Maruta
- [Q-Learning Ragdoll](https://codepen.io/mikkokam/pen/EGEjYe) by Mikko Kämäräinen
- [Dynamic Convex Hull](https://codepen.io/bozheng-stokes/pen/abormNX) by Bo Zheng
- [Chaotic Water Wheel](https://john-hearn.info/articles/simulate-chaotic-water-wheel-with-planck) by John Hearn
- [Walking EA](https://matsemann.github.io/walkingea/) by Mats Krüger Svensson
- [Neuroevolution Bots](https://twitter.com/mishig25/status/1077672181503590400) by Mishig Davaadorj
#### Game Development
- [Space](https://piqnt.com/space/)
- [Modd.io](https://www.modd.io/)
## Install
#### CDN
Planck.js is [available on jsDelivr](https://www.jsdelivr.com/package/npm/planck-js).
#### NPM
npm install planck-js --save
## Credits
[Box2D](https://github.com/erincatto/box2d) is a popular C++ 2D rigid-body physics engine created by [Erin Catto](https://twitter.com/erin_catto). Box2D is used in several popular games, such as Angry Birds, Limbo and Crayon Physics, as well as game development tools and libraries such as Apple's SpriteKit.
[Planck.js](https://github.com/shakiba/planck.js) is developed and maintained by [Ali Shakiba](https://github.com/shakiba/).
TypeScript definitions for planck.js are developed by [Oliver Zell](https://github.com/zOadT).
## License
Planck.js is [available under the MIT license](./LICENSE.txt).
#### [Report Issues](https://github.com/piqnt/planck.js/issues)
To speed up resolving issues, please provide [testbed](https://piqnt.com/planck.js/docs/testbed) code to reproduce the issue.

225
benchmark/benchmark.ts Normal file
View File

@ -0,0 +1,225 @@
export interface TestInterface {
name: string;
createBoxShape: (hx: number, hy: number) => any;
createBoxBody: (shape: any, x: number, y: number, density: number) => any;
step: (timeStep: number, velocityIterations: number, positionIterations: number) => void;
setup: () => void;
teardown: () => void;
}
export interface XY {
x: number;
y: number;
}
export type TestFactory = (gravity: XY, edgeV1: XY, edgeV2: XY, edgeDensity: number) => TestInterface;
const PYRAMID_SIZE = 40;
const GRAVITY = { x: 0, y: -10 };
const DELTA_X = { x: 0.5625, y: 1 };
const DELTA_Y = { x: 1.125, y: 0 };
const BOX_DENSITY = 5;
const GROUND_DENSITY = 0;
const TIME_STEP = 1 / 60;
const VELOCITY_ITERATIONS = 3;
const POSITION_ITERATIONS = 3;
const EDGE_V1 = { x: -40, y: 0 };
const EDGE_V2 = { x: 40, y: 0 };
const START_X = { x: -7, y: 0.75 };
const BOX_SIZE = { x: 0.5, y: 0.5 };
const WARMUP_ITERATIONS = 64;
const BENCH_ITERATIONS = 256;
function setupWorld(test: TestInterface) {
// Setup world
const shape = test.createBoxShape(BOX_SIZE.x, BOX_SIZE.y);
const x = { ...START_X };
for (let i = 0; i < PYRAMID_SIZE; ++i) {
const y = { ...x };
for (let j = i; j < PYRAMID_SIZE; ++j) {
test.createBoxBody(shape, y.x, y.y, BOX_DENSITY);
y.x += DELTA_Y.x;
y.y += DELTA_Y.y;
}
x.x += DELTA_X.x;
x.y += DELTA_X.y;
}
}
export type ProgressFunc = (value: number, max: number) => void;
async function warmupAsync(test: TestInterface, progress: ProgressFunc): Promise<void> {
return new Promise<void>((resolve: (value: void) => void) => {
let step = 0;
progress(0, WARMUP_ITERATIONS + BENCH_ITERATIONS);
const runNext = () => {
if (step < WARMUP_ITERATIONS) {
test.step(TIME_STEP, VELOCITY_ITERATIONS, POSITION_ITERATIONS);
progress(step, WARMUP_ITERATIONS + BENCH_ITERATIONS);
step++;
window.requestAnimationFrame(runNext);
} else {
resolve();
}
};
window.requestAnimationFrame(runNext);
});
}
async function benchAsync(test: TestInterface, progress: ProgressFunc): Promise<number[]> {
return new Promise((resolve: (value: number[]) => void) => {
let step = 0;
progress(0, WARMUP_ITERATIONS + BENCH_ITERATIONS);
const times: number[] = [];
const runNext = () => {
if (step < BENCH_ITERATIONS) {
const begin = performance.now();
test.step(TIME_STEP, VELOCITY_ITERATIONS, POSITION_ITERATIONS);
times.push(performance.now() - begin);
progress(WARMUP_ITERATIONS + step, WARMUP_ITERATIONS + BENCH_ITERATIONS);
step++;
window.requestAnimationFrame(runNext);
} else {
resolve(times);
}
};
window.requestAnimationFrame(runNext);
});
}
function warmup(test: TestInterface) {
for (let i = 0; i < WARMUP_ITERATIONS; i++) {
test.step(TIME_STEP, VELOCITY_ITERATIONS, POSITION_ITERATIONS);
}
}
function bench(test: TestInterface) {
const times: number[] = [];
for (let i = 0; i < BENCH_ITERATIONS; i++) {
const begin = performance.now();
test.step(TIME_STEP, VELOCITY_ITERATIONS, POSITION_ITERATIONS);
times.push(performance.now() - begin);
}
return times.sort();
}
function mean(values: number[]) {
let total = 0;
for (const value of values) total += value;
return total / BENCH_ITERATIONS;
}
// Simple nearest-rank %ile (on sorted array). We should have enough samples to make this reasonable.
function percentile(values: number[], pc: number) {
const rank = Math.floor((pc * values.length) / 100);
return values[rank];
}
export function prepareTests(factories: TestFactory[]) {
return factories.map((factory: TestFactory) => factory(GRAVITY, EDGE_V1, EDGE_V2, GROUND_DENSITY));
}
export function runTest(test: TestInterface) {
setupWorld(test);
warmup(test);
const times = bench(test);
return {
name: test.name,
avg: mean(times),
p5: percentile(times, 5),
p95: percentile(times, 95),
};
}
export async function runTestAsync(test: TestInterface, progress: ProgressFunc) {
setupWorld(test);
await warmupAsync(test, progress);
const times = await benchAsync(test, progress);
return {
name: test.name,
avg: mean(times),
p5: percentile(times, 5),
p95: percentile(times, 95),
};
}
export type TestResult = ReturnType<typeof runTest>;
export function runAllTests(factories: TestFactory[]) {
const tests = prepareTests(factories);
const results: TestResult[] = [];
console.log("Running Benchmarks:");
for (const test of tests) {
const result = runTest(test);
results.push(result);
console.log(` ✓ ${result.name}`);
}
return results.sort((a: TestResult, b: TestResult) => a.avg - b.avg);
}
const noop = () => undefined;
export async function runAllTestsAsync(factories: TestFactory[]) {
const tests = prepareTests(factories);
console.log("Running Benchmarks:");
const results: TestResult[] = [];
for (const test of tests) {
// eslint-disable-next-line no-await-in-loop
const result = await runTestAsync(test, noop);
console.log(` ✓ ${result.name}`);
results.push(result);
}
return results.sort((a: TestResult, b: TestResult) => a.avg - b.avg);
}
export function resultsToMarkdown(results: TestResult[]) {
const header = ["Name", "avg ms/frame", "5th %ile", "95th %ile", "Ratio"];
const rows = results.map((r: TestResult) => [
r.name,
r.avg.toFixed(2),
r.p5.toString(),
r.p95.toString(),
(r.avg / results[0].avg).toFixed(2),
]);
const lengths = header.map((label: string, index: number) =>
Math.max(label.length, ...rows.map((columns: string[]) => columns[index].length)),
);
function getDashes(length: number) {
return "-".repeat(length);
}
const dashes = `| ${lengths.map(getDashes).join(" | ")} |`;
const lines: string[] = [];
lines.push(`| ${header.map(pad).join(" | ")} |`);
lines.push(dashes);
function pad(value: string, index: number) {
const length = lengths[index];
if (value.length < length) {
if (index > 0) return " ".repeat(length - value.length) + value;
return value + " ".repeat(length - value.length);
}
return value;
}
for (const row of rows) {
lines.push(`| ${row.map(pad).join(" | ")} |`);
}
return lines.join("\n");
}
export function logResults(results: TestResult[]) {
console.log("\nResults:");
console.log(resultsToMarkdown(results));
}

106
benchmark/browser.ts Normal file
View File

@ -0,0 +1,106 @@
import { prepareTests, resultsToMarkdown, runTestAsync, TestResult, TestInterface, TestFactory } from "./benchmark";
import { box2dJsFactory } from "./tests/box2d-js";
import { planckFactory } from "./tests/planck";
export const tests: TestFactory[] = [
box2dJsFactory,
planckFactory,
];
export function getBrowserInfo() {
const ua = navigator.userAgent;
let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) ?? [];
if (/trident/i.test(M[1])) {
const tem = /\brv[ :]+(\d+)/g.exec(ua) ?? [];
const version = tem[1] || "";
return `IE ${version}`;
}
if (M[1] === "Chrome") {
const tem = ua.match(/\bOPR|Edge\/(\d+)/);
if (tem !== null) return `Opera ${tem[1]}`;
}
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, "-?"];
const tem = ua.match(/version\/(\d+)/i);
if (tem !== null) M.splice(1, 1, tem[1]);
return `${M[0]} ${M[1]}`;
}
const startButton = document.getElementById("start") as HTMLButtonElement;
const tbody = document.querySelector("tbody") as HTMLElement;
const ratioHead = document.getElementById("ratio") as HTMLElement;
const branchName = document.getElementById("branch-name") as HTMLElement;
branchName.innerHTML = [
import.meta.env.VITE_GIT_BRANCH_NAME,
import.meta.env.VITE_GIT_COMMIT_HASH.slice(0, 7),
import.meta.env.VITE_GIT_COMMIT_DATE.slice(0, 19).replace("T", " "),
'\"' + import.meta.env.VITE_GIT_LAST_COMMIT_MESSAGE + '\"',
].join("<br />");
const testRows = prepareTests(tests).map((test: TestInterface) => {
const row = document.createElement("tr");
tbody.appendChild(row);
const name = document.createElement("td");
const avg = document.createElement("td");
const p5 = document.createElement("td");
const p95 = document.createElement("td");
const ratio = document.createElement("td");
name.textContent = test.name;
row.appendChild(name);
row.appendChild(avg);
row.appendChild(p5);
row.appendChild(p95);
row.appendChild(ratio);
const progress = document.createElement("progress");
return {
row,
test,
begin() {
test.setup();
ratio.appendChild(progress);
progress.value = 0;
},
progress(value: number, max: number) {
progress.value = value;
progress.max = max;
},
end(result: TestResult) {
test.teardown();
avg.textContent = result.avg.toFixed(2);
p5.textContent = result.p5.toString();
p95.textContent = result.p95.toString();
ratio.textContent = "✓";
},
final(ratioValue: number) {
ratio.textContent = ratioValue.toFixed(2);
tbody.appendChild(row);
},
};
});
type TestResultAndRow = TestResult & { testRow: typeof testRows[0] };
export async function runAllTestsAsync() {
ratioHead.textContent = "";
const results: TestResultAndRow[] = [];
for (const testRow of testRows) {
testRow.begin();
// eslint-disable-next-line no-await-in-loop
const result = await runTestAsync(testRow.test, testRow.progress);
testRow.end(result);
results.push({ ...result, testRow });
}
results.sort((a: TestResultAndRow, b: TestResultAndRow) => a.avg - b.avg).forEach((result: TestResultAndRow) => result.testRow.final(result.avg / results[0].avg));
startButton.removeAttribute("disabled");
ratioHead.textContent = "Ratio";
console.log(`Browser: ${getBrowserInfo()}\n${resultsToMarkdown(results)}`);
}
startButton.addEventListener("click", () => {
startButton.disabled = true;
runAllTestsAsync();
});

49
benchmark/index.html Normal file
View File

@ -0,0 +1,49 @@
<html>
<head>
<meta charset="utf-8" />
<title>Planck.js/Box2D Benchmark</title>
<style>
th, td {
padding: 2px 5px;
}
table {
border-collapse: collapse;
margin-top: 5px;
}
td {
border: 1px solid gray;
}
th:first-child {
text-align: left;
}
progress {
width: 200px;
}
textarea {
width: 500px;
height: 300px;
}
</style>
</head>
<body>
<h3>Planck.js/Box2D Benchmark</h3>
<button id="start">Start</button>
<table>
<thead>
<tr>
<th>Name</th>
<th>avg ms/frame</th>
<th>5th %ile</th>
<th>95th %ile</th>
<th id="ratio">Ratio</th>
</tr>
</thead>
<tbody></tbody>
</table>
<script src="https://kripken.github.io/box2d.js/build/Box2D_v2.3.1_min.js"></script>
<script type="module" src="./browser.ts"></script>
<br />
<br />
<span id="branch-name"></span>
</body>
</html>

13
benchmark/node.ts Normal file
View File

@ -0,0 +1,13 @@
import { performance } from "perf_hooks";
global.performance = performance as any;
import { logResults, runAllTests } from "./benchmark";
import type { TestFactory } from "./benchmark";
import { planckFactory } from "./tests/planck";
export const tests: TestFactory[] = [
planckFactory,
];
const results = runAllTests(tests);
logResults(results);

View File

@ -0,0 +1,42 @@
import "./fixprocess";
const { b2Body, b2World, b2Vec2, b2EdgeShape, b2PolygonShape, b2_dynamicBody, b2BodyDef } = Box2D;
import type { TestFactory } from "../benchmark";
export const box2dJsFactory: TestFactory = (gravity, edgeV1, edgeV2, edgeDensity) => {
let world: typeof b2World;
let ground: typeof b2Body;
let edgeShape: typeof b2EdgeShape;
return {
name: "box2d.js",
setup() {
world = new b2World(new b2Vec2(gravity.x, gravity.y));
ground = world.CreateBody(new b2BodyDef());
edgeShape = new b2EdgeShape();
edgeShape.Set(new b2Vec2(edgeV1.x, edgeV1.y), new b2Vec2(edgeV2.x, edgeV2.y));
ground.CreateFixture(edgeShape as any, edgeDensity);
},
teardown() {
world = null;
ground = null;
edgeShape = null;
},
createBoxShape(hx: number, hy: number) {
const box = new b2PolygonShape();
box.SetAsBox(hx, hy);
return box;
},
createBoxBody(shape: any, x: number, y: number, density: number) {
const bd = new b2BodyDef();
bd.set_type(b2_dynamicBody);
bd.set_position(new b2Vec2(x, y));
const body = world.CreateBody(bd);
body.CreateFixture(shape, density);
},
step(timeStep: number, velocityIterations: number, positionIterations: number) {
world.Step(timeStep, velocityIterations, positionIterations);
},
};
};

View File

@ -0,0 +1,19 @@
// box2d.js tries to access process.stdout/err, need to emulate it
if ("requestAnimationFrame" in globalThis) {
// // @ts-ignore
// window.process.stdout = {
// write(x: string) {
// console.log(x);
// return true;
// },
// };
// // @ts-ignore
// globalThis.process.stderr = {
// write(x: string) {
// console.error(x);
// return true;
// },
// };
}

39
benchmark/tests/planck.ts Normal file
View File

@ -0,0 +1,39 @@
import { World, Vec2, EdgeShape, BoxShape, Body } from "../../src/index";
import { TestFactory } from "../benchmark";
export const planckFactory: TestFactory = (gravity, edgeV1, edgeV2, edgeDensity) => {
let world: World | null = null;
let ground: Body | null = null;
let edgeShape: EdgeShape | null = null;
return {
name: "planck.js (current)",
setup() {
world = new World({
gravity: new Vec2(gravity.x, gravity.y),
});
ground = world.createBody({});
edgeShape = new EdgeShape(new Vec2(edgeV1.x, edgeV1.y), new Vec2(edgeV2.x, edgeV2.y));
ground.createFixture(edgeShape as any, edgeDensity);
},
createBoxShape(hx: number, hy: number) {
return new BoxShape(hx, hy);
},
createBoxBody(shape: any, x: number, y: number, density: number) {
const body = world?.createBody({
type: "dynamic",
position: new Vec2(x, y),
});
body?.createFixture(shape, density);
},
step(timeStep: number, velocityIterations: number, positionIterations: number) {
world?.step(timeStep, velocityIterations, positionIterations);
},
teardown() {
world = null;
ground = null;
edgeShape = null;
},
};
};

View File

@ -1,23 +0,0 @@
{
"name": "planck-js",
"description": "2D JavaScript physics engine for cross-platform HTML5 game development",
"keywords": [
"html5",
"javascript",
"game",
"physics",
"engine",
"2d",
"mobile"
],
"license": "zlib",
"repository": {
"type": "git",
"url": "git://github.com/shakiba/planck.js.git"
},
"ignore": [
"example/",
"ignore/",
"test/"
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

4346
dist/planck-with-testbed.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

16987
dist/planck-with-testbed.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/planck-with-testbed.mjs.map vendored Normal file

File diff suppressed because one or more lines are too long

18836
dist/planck.commonjs.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

4346
dist/planck.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

30810
dist/planck.js vendored

File diff suppressed because it is too large Load Diff

2
dist/planck.js.map vendored

File diff suppressed because one or more lines are too long

19
dist/planck.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12144
dist/planck.mjs vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/planck.mjs.map vendored Normal file

File diff suppressed because one or more lines are too long

96
docs/.vitepress/config.ts Normal file
View File

@ -0,0 +1,96 @@
import { defineConfig } from "vitepress";
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Planck.js Docs",
description: "2D Physics Engine for JavaScript",
srcDir: "./pages",
base: "/planck.js/docs/",
outDir: "../dist/docs",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
search: {
provider: "local",
},
nav: [
{ text: "API Reference", link: "/api/" },
{ text: "Playground", link: "https://piqnt.com/" },
{ text: "GitHub", link: "https://github.com/piqnt/planck.js/" },
{ text: "Discord", link: "https://discord.gg/znjh6J7" },
],
sidebar: [
{ link: "/", text: "Introduction" },
{
text: "Get Started",
collapsed: true,
items: [
{ link: "/run-your-code", text: "Run Your Code" },
{ link: "/hello-world", text: "Hello World" },
{ link: "/core-concepts", text: "Core Concepts" },
{ link: "/install", text: "Install" },
],
},
{
text: "API Conventions",
collapsed: true,
items: [
{ link: "/api-conventions/units", text: "Units" },
{ link: "/api-conventions/factories-and-definitions", text: "Factories and Definitions" },
{ link: "/api-conventions/implicit-destruction", text: "Implicit Destruction" },
{ link: "/api-conventions/user-data", text: "User Data" },
],
},
{ link: "/world", text: "World" },
{ link: "/body", text: "Body" },
{ link: "/fixture", text: "Fixture" },
{
text: "Shape",
collapsed: true,
link: "/shape",
items: [
{ link: "/shape", text: "Shape" },
{ link: "/shape/circle", text: "Circle" },
{ link: "/shape/polygon", text: "Polygon" },
{ link: "/shape/edge", text: "Edge" },
{ link: "/shape/chain", text: "Chain" },
],
},
{
text: "Joint",
collapsed: true,
link: "/joint",
items: [
{ link: "/joint", text: "Joint" },
{ link: "/joint/distance-joint", text: "Distance Joint" },
{ link: "/joint/friction-joint", text: "Friction Joint" },
{ link: "/joint/gear-joint", text: "Gear Joint" },
{ link: "/joint/motor-joint", text: "Motor Joint" },
{ link: "/joint/prismatic-joint", text: "Prismatic Joint" },
{ link: "/joint/pulley", text: "Pulley" },
{ link: "/joint/revolute-joint", text: "Revolute Joint" },
{ link: "/joint/rope-joint", text: "Rope Joint" },
{ link: "/joint/weld-joint", text: "Weld Joint" },
{ link: "/joint/wheel-joint", text: "Wheel Joint" },
{ link: "/joint/mouse-joint", text: "Mouse Joint" },
],
},
{ link: "/contacts", text: "Contacts" },
{ link: "/collision", text: "Collision" },
{ link: "/world/simulation", text: "Simulation" },
{ link: "/rendering", text: "Rendering" },
{ link: "/testbed", text: "Testbed" },
{ link: "/limitations", text: "Limitations" },
{ link: "/api/", text: "API Reference" },
{ link: "/references-resources", text: "References & Resources" },
{ link: "/credits", text: "Credits & License" },
],
},
});

View File

@ -1,71 +0,0 @@
### API Index
* [World](/docs/api/classes/world.md)
* [Body](/docs/api/classes/body.md)
* [Fixture](/docs/api/classes/fixture.md)
* [Settings](/docs/api/classes/settings.md)
#### Math
* [Math](/docs/api/classes/math.md)
* [Vec2](/docs/api/classes/vec2.md)
* [Vec3](/docs/api/classes/vec3.md)
* [Transform](/docs/api/classes/transform.md)
* [Rot](/docs/api/classes/rot.md)
* [Mat22](/docs/api/classes/mat22.md)
* [Mat33](/docs/api/classes/mat33.md)
#### Shapes
* [BoxShape](/docs/api/classes/boxshape.md)
* [ChainShape](/docs/api/classes/chainshape.md)
* [CircleShape](/docs/api/classes/circleshape.md)
* [EdgeShape](/docs/api/classes/edgeshape.md)
* [PolygonShape](/docs/api/classes/polygonshape.md)
#### Joints
* [FrictionJoint](/docs/api/classes/frictionjoint.md)
* [DistanceJoint](/docs/api/classes/distancejoint.md)
* [GearJoint](/docs/api/classes/gearjoint.md)
* [MotorJoint](/docs/api/classes/motorjoint.md)
* [MouseJoint](/docs/api/classes/mousejoint.md)
* [PrismaticJoint](/docs/api/classes/prismaticjoint.md)
* [PulleyJoint](/docs/api/classes/pulleyjoint.md)
* [RevoluteJoint](/docs/api/classes/revolutejoint.md)
* [RopeJoint](/docs/api/classes/ropejoint.md)
* [WeldJoint](/docs/api/classes/weldjoint.md)
* [WheelJoint](/docs/api/classes/wheeljoint.md)
#### Collision Internal
* [BroadPhase](/docs/api/classes/broadphase.md)
* [AABB](/docs/api/classes/aabb.md)
* [DynamicTree](/docs/api/classes/dynamictree.md)
* [TreeNode](/docs/api/classes/treenode.md)
* [DistanceProxy](/docs/api/classes/distanceproxy.md)
* [ContactFeatureType](/docs/api/enums/contactfeaturetype.md)
* [ManifoldType](/docs/api/enums/manifoldtype.md)
* [TOIOutputState](/docs/api/enums/toioutputstate.md)
* [FixtureProxy](/docs/api/interfaces/fixtureproxy.md)
* [Manifold](/docs/api/interfaces/manifold.md)
* [ManifoldPoint](/docs/api/interfaces/manifoldpoint.md)
* [WorldManifold](/docs/api/interfaces/worldmanifold.md)
#### Dynamics Internal
* [Solver](/docs/api/classes/solver.md)
* [Contact](/docs/api/classes/contact.md)
* [ContactImpulse](/docs/api/classes/contactimpulse.md)
* [ContactEdge](/docs/api/classes/contactedge.md)
* [ContactFeature](/docs/api/interfaces/contactfeature.md)
* [ContactID](/docs/api/interfaces/contactid.md)
* [Position](/docs/api/classes/position.md)
* [Velocity](/docs/api/classes/velocity.md)
* [Sweep](/docs/api/classes/sweep.md)
* [VelocityConstraintPoint](/docs/api/classes/velocityconstraintpoint.md)

View File

@ -1,75 +0,0 @@
[Planck.js API Doc](README.md) › [Globals](globals.md)
# Planck.js API Doc
### API Index
* [World](/docs/api/classes/world.md)
* [Body](/docs/api/classes/body.md)
* [Fixture](/docs/api/classes/fixture.md)
* [Settings](/docs/api/classes/settings.md)
#### Math
* [Math](/docs/api/classes/math.md)
* [Vec2](/docs/api/classes/vec2.md)
* [Vec3](/docs/api/classes/vec3.md)
* [Transform](/docs/api/classes/transform.md)
* [Rot](/docs/api/classes/rot.md)
* [Mat22](/docs/api/classes/mat22.md)
* [Mat33](/docs/api/classes/mat33.md)
#### Shapes
* [BoxShape](/docs/api/classes/boxshape.md)
* [ChainShape](/docs/api/classes/chainshape.md)
* [CircleShape](/docs/api/classes/circleshape.md)
* [EdgeShape](/docs/api/classes/edgeshape.md)
* [PolygonShape](/docs/api/classes/polygonshape.md)
#### Joints
* [FrictionJoint](/docs/api/classes/frictionjoint.md)
* [DistanceJoint](/docs/api/classes/distancejoint.md)
* [GearJoint](/docs/api/classes/gearjoint.md)
* [MotorJoint](/docs/api/classes/motorjoint.md)
* [MouseJoint](/docs/api/classes/mousejoint.md)
* [PrismaticJoint](/docs/api/classes/prismaticjoint.md)
* [PulleyJoint](/docs/api/classes/pulleyjoint.md)
* [RevoluteJoint](/docs/api/classes/revolutejoint.md)
* [RopeJoint](/docs/api/classes/ropejoint.md)
* [WeldJoint](/docs/api/classes/weldjoint.md)
* [WheelJoint](/docs/api/classes/wheeljoint.md)
#### Collision Internal
* [BroadPhase](/docs/api/classes/broadphase.md)
* [AABB](/docs/api/classes/aabb.md)
* [DynamicTree](/docs/api/classes/dynamictree.md)
* [TreeNode](/docs/api/classes/treenode.md)
* [DistanceProxy](/docs/api/classes/distanceproxy.md)
* [ContactFeatureType](/docs/api/enums/contactfeaturetype.md)
* [ManifoldType](/docs/api/enums/manifoldtype.md)
* [TOIOutputState](/docs/api/enums/toioutputstate.md)
* [FixtureProxy](/docs/api/interfaces/fixtureproxy.md)
* [Manifold](/docs/api/interfaces/manifold.md)
* [ManifoldPoint](/docs/api/interfaces/manifoldpoint.md)
* [WorldManifold](/docs/api/interfaces/worldmanifold.md)
#### Dynamics Internal
* [Solver](/docs/api/classes/solver.md)
* [Contact](/docs/api/classes/contact.md)
* [ContactImpulse](/docs/api/classes/contactimpulse.md)
* [ContactEdge](/docs/api/classes/contactedge.md)
* [ContactFeature](/docs/api/interfaces/contactfeature.md)
* [ContactID](/docs/api/interfaces/contactid.md)
* [Position](/docs/api/classes/position.md)
* [Velocity](/docs/api/classes/velocity.md)
* [Sweep](/docs/api/classes/sweep.md)
* [VelocityConstraintPoint](/docs/api/classes/velocityconstraintpoint.md)

View File

@ -1,322 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [AABB](aabb.md)
# Class: AABB
## Hierarchy
* **AABB**
## Callable
▸ **AABB**(`lower?`: [Vec2](vec2.md), `upper?`: [Vec2](vec2.md)): *[AABB](aabb.md)*
*Defined in [collision/index.d.ts:34](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L34)*
**Parameters:**
Name | Type |
------ | ------ |
`lower?` | [Vec2](vec2.md) |
`upper?` | [Vec2](vec2.md) |
**Returns:** *[AABB](aabb.md)*
## Index
### Properties
* [lowerBound](aabb.md#lowerbound)
* [upperBound](aabb.md#upperbound)
### Methods
* [areEqual](aabb.md#areequal)
* [assert](aabb.md#assert)
* [combine](aabb.md#combine)
* [combinePoints](aabb.md#combinepoints)
* [constroctor](aabb.md#constroctor)
* [contains](aabb.md#contains)
* [diff](aabb.md#diff)
* [extend](aabb.md#extend)
* [getCenter](aabb.md#getcenter)
* [getExtents](aabb.md#getextents)
* [getPerimeter](aabb.md#getperimeter)
* [isValid](aabb.md#isvalid)
* [rayCast](aabb.md#raycast)
* [set](aabb.md#set)
* [testOverlap](aabb.md#testoverlap)
* [toString](aabb.md#tostring)
## Properties
### lowerBound
• **lowerBound**: *[Vec2](vec2.md)*
*Defined in [collision/index.d.ts:45](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L45)*
___
### upperBound
• **upperBound**: *[Vec2](vec2.md)*
*Defined in [collision/index.d.ts:46](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L46)*
## Methods
### areEqual
▸ **areEqual**(`a`: [AABB](aabb.md), `b`: [AABB](aabb.md)): *boolean*
*Defined in [collision/index.d.ts:42](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L42)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [AABB](aabb.md) |
`b` | [AABB](aabb.md) |
**Returns:** *boolean*
___
### assert
▸ **assert**(`o`: any): *void*
*Defined in [collision/index.d.ts:39](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L39)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### combine
▸ **combine**(`a`: [AABB](aabb.md), `b`: [AABB](aabb.md)): *void*
*Defined in [collision/index.d.ts:52](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L52)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [AABB](aabb.md) |
`b` | [AABB](aabb.md) |
**Returns:** *void*
___
### combinePoints
▸ **combinePoints**(`a`: [Vec2](vec2.md), `b`: [Vec2](vec2.md)): *void*
*Defined in [collision/index.d.ts:53](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L53)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Vec2](vec2.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *void*
___
### constroctor
▸ **constroctor**(`lower?`: [Vec2](vec2.md), `upper?`: [Vec2](vec2.md)): *any*
*Defined in [collision/index.d.ts:36](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L36)*
**Parameters:**
Name | Type |
------ | ------ |
`lower?` | [Vec2](vec2.md) |
`upper?` | [Vec2](vec2.md) |
**Returns:** *any*
___
### contains
▸ **contains**(`aabb`: [AABB](aabb.md)): *boolean*
*Defined in [collision/index.d.ts:55](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L55)*
**Parameters:**
Name | Type |
------ | ------ |
`aabb` | [AABB](aabb.md) |
**Returns:** *boolean*
___
### diff
▸ **diff**(`a`: [AABB](aabb.md), `b`: [AABB](aabb.md)): *number*
*Defined in [collision/index.d.ts:43](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L43)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [AABB](aabb.md) |
`b` | [AABB](aabb.md) |
**Returns:** *number*
___
### extend
▸ **extend**(`aabb`: [AABB](aabb.md), `value`: number): *void*
*Defined in [collision/index.d.ts:40](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L40)*
**Parameters:**
Name | Type |
------ | ------ |
`aabb` | [AABB](aabb.md) |
`value` | number |
**Returns:** *void*
▸ **extend**(`value`: number): *[AABB](aabb.md)*
*Defined in [collision/index.d.ts:56](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L56)*
**Parameters:**
Name | Type |
------ | ------ |
`value` | number |
**Returns:** *[AABB](aabb.md)*
___
### getCenter
▸ **getCenter**(): *[Vec2](vec2.md)*
*Defined in [collision/index.d.ts:49](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L49)*
**Returns:** *[Vec2](vec2.md)*
___
### getExtents
▸ **getExtents**(): *[Vec2](vec2.md)*
*Defined in [collision/index.d.ts:50](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L50)*
**Returns:** *[Vec2](vec2.md)*
___
### getPerimeter
▸ **getPerimeter**(): *number*
*Defined in [collision/index.d.ts:51](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L51)*
**Returns:** *number*
___
### isValid
▸ **isValid**(`o`: any): *boolean*
*Defined in [collision/index.d.ts:38](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L38)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *boolean*
▸ **isValid**(): *boolean*
*Defined in [collision/index.d.ts:48](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L48)*
**Returns:** *boolean*
___
### rayCast
▸ **rayCast**(`output`: [RayCastOutput](../interfaces/raycastoutput.md), `input`: [RayCastInput](../interfaces/raycastinput.md)): *boolean*
*Defined in [collision/index.d.ts:57](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L57)*
**Parameters:**
Name | Type |
------ | ------ |
`output` | [RayCastOutput](../interfaces/raycastoutput.md) |
`input` | [RayCastInput](../interfaces/raycastinput.md) |
**Returns:** *boolean*
___
### set
▸ **set**(`aabb`: [AABB](aabb.md)): *void*
*Defined in [collision/index.d.ts:54](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L54)*
**Parameters:**
Name | Type |
------ | ------ |
`aabb` | [AABB](aabb.md) |
**Returns:** *void*
___
### testOverlap
▸ **testOverlap**(`a`: [AABB](aabb.md), `b`: [AABB](aabb.md)): *boolean*
*Defined in [collision/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L41)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [AABB](aabb.md) |
`b` | [AABB](aabb.md) |
**Returns:** *boolean*
___
### toString
▸ **toString**(): *string*
*Defined in [collision/index.d.ts:58](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L58)*
**Returns:** *string*

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [BoxShape](boxshape.md)
# Class: BoxShape
## Hierarchy
* any
↳ **BoxShape**
## Callable
▸ **BoxShape**(`hx`: number, `hy`: number, `center?`: [Vec2](vec2.md), `angle?`: number): *[BoxShape](boxshape.md)*
*Defined in [shape/index.d.ts:78](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L78)*
**Parameters:**
Name | Type |
------ | ------ |
`hx` | number |
`hy` | number |
`center?` | [Vec2](vec2.md) |
`angle?` | number |
**Returns:** *[BoxShape](boxshape.md)*
## Index
### Constructors
* [constructor](boxshape.md#constructor)
## Constructors
### constructor
\+ **new BoxShape**(`hx`: number, `hy`: number, `center?`: [Vec2](vec2.md), `angle?`: number): *[BoxShape](boxshape.md)*
*Defined in [shape/index.d.ts:79](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L79)*
**Parameters:**
Name | Type |
------ | ------ |
`hx` | number |
`hy` | number |
`center?` | [Vec2](vec2.md) |
`angle?` | number |
**Returns:** *[BoxShape](boxshape.md)*

View File

@ -1,7 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [BroadPhase](broadphase.md)
# Class: BroadPhase
## Hierarchy
* **BroadPhase**

View File

@ -1,97 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ChainShape](chainshape.md)
# Class: ChainShape
## Hierarchy
* any
↳ **ChainShape**
## Callable
▸ **ChainShape**(`vertices`: [Vec2](vec2.md)[], `loop?`: boolean): *[ChainShape](chainshape.md)*
*Defined in [shape/index.d.ts:83](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L83)*
**Parameters:**
Name | Type |
------ | ------ |
`vertices` | [Vec2](vec2.md)[] |
`loop?` | boolean |
**Returns:** *[ChainShape](chainshape.md)*
## Index
### Constructors
* [constructor](chainshape.md#constructor)
### Properties
* [TYPE](chainshape.md#static-type)
### Methods
* [getChildEdge](chainshape.md#getchildedge)
* [getVertex](chainshape.md#getvertex)
## Constructors
### constructor
\+ **new ChainShape**(`vertices`: [Vec2](vec2.md)[], `loop?`: boolean): *[ChainShape](chainshape.md)*
*Defined in [shape/index.d.ts:85](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L85)*
**Parameters:**
Name | Type |
------ | ------ |
`vertices` | [Vec2](vec2.md)[] |
`loop?` | boolean |
**Returns:** *[ChainShape](chainshape.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"chain"*
*Defined in [shape/index.d.ts:85](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L85)*
## Methods
### getChildEdge
▸ **getChildEdge**(`edge`: [EdgeShape](edgeshape.md), `childIndex`: number): *void*
*Defined in [shape/index.d.ts:97](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L97)*
**Parameters:**
Name | Type |
------ | ------ |
`edge` | [EdgeShape](edgeshape.md) |
`childIndex` | number |
**Returns:** *void*
___
### getVertex
▸ **getVertex**(`index`: number): *[Vec2](vec2.md)*
*Defined in [shape/index.d.ts:98](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L98)*
**Parameters:**
Name | Type |
------ | ------ |
`index` | number |
**Returns:** *[Vec2](vec2.md)*

View File

@ -1,131 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [CircleShape](circleshape.md)
# Class: CircleShape
## Hierarchy
* any
↳ **CircleShape**
## Callable
▸ **CircleShape**(`position`: [Vec2](vec2.md), `radius?`: number): *[CircleShape](circleshape.md)*
*Defined in [shape/index.d.ts:23](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L23)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`radius?` | number |
**Returns:** *[CircleShape](circleshape.md)*
▸ **CircleShape**(`radius?`: number): *[CircleShape](circleshape.md)*
*Defined in [shape/index.d.ts:24](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L24)*
**Parameters:**
Name | Type |
------ | ------ |
`radius?` | number |
**Returns:** *[CircleShape](circleshape.md)*
## Index
### Constructors
* [constructor](circleshape.md#constructor)
### Properties
* [TYPE](circleshape.md#static-type)
### Methods
* [getCenter](circleshape.md#getcenter)
* [getVertex](circleshape.md#getvertex)
* [getVertexCount](circleshape.md#getvertexcount)
## Constructors
### constructor
\+ **new CircleShape**(`position`: [Vec2](vec2.md), `radius?`: number): *[CircleShape](circleshape.md)*
*Defined in [shape/index.d.ts:26](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L26)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`radius?` | number |
**Returns:** *[CircleShape](circleshape.md)*
\+ **new CircleShape**(`radius?`: number): *[CircleShape](circleshape.md)*
*Defined in [shape/index.d.ts:28](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L28)*
**Parameters:**
Name | Type |
------ | ------ |
`radius?` | number |
**Returns:** *[CircleShape](circleshape.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"circle"*
*Defined in [shape/index.d.ts:26](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L26)*
## Methods
### getCenter
▸ **getCenter**(): *[Vec2](vec2.md)*
*Defined in [shape/index.d.ts:34](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L34)*
**Returns:** *[Vec2](vec2.md)*
___
### getVertex
▸ **getVertex**(`index?`: number): *[Vec2](vec2.md)*
*Defined in [shape/index.d.ts:35](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L35)*
**Parameters:**
Name | Type |
------ | ------ |
`index?` | number |
**Returns:** *[Vec2](vec2.md)*
___
### getVertexCount
▸ **getVertexCount**(`index?`: number): *1*
*Defined in [shape/index.d.ts:36](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L36)*
**Parameters:**
Name | Type |
------ | ------ |
`index?` | number |
**Returns:** *1*

View File

@ -1,463 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Contact](contact.md)
# Class: Contact
## Hierarchy
* **Contact**
## Index
### Constructors
* [constructor](contact.md#constructor)
### Methods
* [_solvePositionConstraint](contact.md#_solvepositionconstraint)
* [evaluate](contact.md#evaluate)
* [flagForFiltering](contact.md#flagforfiltering)
* [getChildIndexA](contact.md#getchildindexa)
* [getChildIndexB](contact.md#getchildindexb)
* [getFixtureA](contact.md#getfixturea)
* [getFixtureB](contact.md#getfixtureb)
* [getFriction](contact.md#getfriction)
* [getManifold](contact.md#getmanifold)
* [getNext](contact.md#getnext)
* [getRestitution](contact.md#getrestitution)
* [getTangentSpeed](contact.md#gettangentspeed)
* [getWorldManifold](contact.md#getworldmanifold)
* [initConstraint](contact.md#initconstraint)
* [initVelocityConstraint](contact.md#initvelocityconstraint)
* [isEnabled](contact.md#isenabled)
* [isTouching](contact.md#istouching)
* [resetFriction](contact.md#resetfriction)
* [resetRestitution](contact.md#resetrestitution)
* [setEnabled](contact.md#setenabled)
* [setFriction](contact.md#setfriction)
* [setRestitution](contact.md#setrestitution)
* [setTangentSpeed](contact.md#settangentspeed)
* [solvePositionConstraint](contact.md#solvepositionconstraint)
* [solvePositionConstraintTOI](contact.md#solvepositionconstrainttoi)
* [solveVelocityConstraint](contact.md#solvevelocityconstraint)
* [storeConstraintImpulses](contact.md#storeconstraintimpulses)
* [update](contact.md#update)
* [warmStartConstraint](contact.md#warmstartconstraint)
## Constructors
### constructor
\+ **new Contact**(`fA`: [Fixture](fixture.md), `indexA`: number, `fB`: [Fixture](fixture.md), `indexB`: number, `evaluateFcn`: [EvaluateFunction](../globals.md#evaluatefunction)): *[Contact](contact.md)*
*Defined in [index.d.ts:331](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L331)*
**Parameters:**
Name | Type |
------ | ------ |
`fA` | [Fixture](fixture.md) |
`indexA` | number |
`fB` | [Fixture](fixture.md) |
`indexB` | number |
`evaluateFcn` | [EvaluateFunction](../globals.md#evaluatefunction) |
**Returns:** *[Contact](contact.md)*
## Methods
### _solvePositionConstraint
▸ **_solvePositionConstraint**(`step`: any, `toi`: boolean, `toiA?`: [Body](body.md) | null, `toiB?`: [Body](body.md) | null): *number*
*Defined in [index.d.ts:415](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L415)*
**Parameters:**
Name | Type |
------ | ------ |
`step` | any |
`toi` | boolean |
`toiA?` | [Body](body.md) &#124; null |
`toiB?` | [Body](body.md) &#124; null |
**Returns:** *number*
___
### evaluate
▸ **evaluate**(`manifold`: [Manifold](../interfaces/manifold.md), `xfA`: [Transform](transform.md), `xfB`: [Transform](transform.md)): *void*
*Defined in [index.d.ts:411](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L411)*
**Parameters:**
Name | Type |
------ | ------ |
`manifold` | [Manifold](../interfaces/manifold.md) |
`xfA` | [Transform](transform.md) |
`xfB` | [Transform](transform.md) |
**Returns:** *void*
___
### flagForFiltering
▸ **flagForFiltering**(): *void*
*Defined in [index.d.ts:402](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L402)*
**Returns:** *void*
___
### getChildIndexA
▸ **getChildIndexA**(): *number*
*Defined in [index.d.ts:400](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L400)*
**Returns:** *number*
___
### getChildIndexB
▸ **getChildIndexB**(): *number*
*Defined in [index.d.ts:401](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L401)*
**Returns:** *number*
___
### getFixtureA
▸ **getFixtureA**(): *[Fixture](fixture.md)*
*Defined in [index.d.ts:398](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L398)*
**Returns:** *[Fixture](fixture.md)*
___
### getFixtureB
▸ **getFixtureB**(): *[Fixture](fixture.md)*
*Defined in [index.d.ts:399](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L399)*
**Returns:** *[Fixture](fixture.md)*
___
### getFriction
▸ **getFriction**(): *number*
*Defined in [index.d.ts:404](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L404)*
**Returns:** *number*
___
### getManifold
▸ **getManifold**(): *[Manifold](../interfaces/manifold.md)*
*Defined in [index.d.ts:392](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L392)*
**Returns:** *[Manifold](../interfaces/manifold.md)*
___
### getNext
▸ **getNext**(): *[Contact](contact.md) | null*
*Defined in [index.d.ts:397](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L397)*
**Returns:** *[Contact](contact.md) | null*
___
### getRestitution
▸ **getRestitution**(): *number*
*Defined in [index.d.ts:407](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L407)*
**Returns:** *number*
___
### getTangentSpeed
▸ **getTangentSpeed**(): *number*
*Defined in [index.d.ts:410](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L410)*
**Returns:** *number*
___
### getWorldManifold
▸ **getWorldManifold**(`worldManifold`: [WorldManifold](../interfaces/worldmanifold.md) | null | undefined): *[WorldManifold](../interfaces/worldmanifold.md) | undefined*
*Defined in [index.d.ts:393](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L393)*
**Parameters:**
Name | Type |
------ | ------ |
`worldManifold` | [WorldManifold](../interfaces/worldmanifold.md) &#124; null &#124; undefined |
**Returns:** *[WorldManifold](../interfaces/worldmanifold.md) | undefined*
___
### initConstraint
▸ **initConstraint**(`step`: object): *void*
*Defined in [index.d.ts:391](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L391)*
**Parameters:**
▪ **step**: *object*
Name | Type |
------ | ------ |
`dtRatio` | number |
`warmStarting` | boolean |
**Returns:** *void*
___
### initVelocityConstraint
▸ **initVelocityConstraint**(`step`: object): *void*
*Defined in [index.d.ts:416](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L416)*
**Parameters:**
▪ **step**: *object*
Name | Type |
------ | ------ |
`blockSolve` | boolean |
**Returns:** *void*
___
### isEnabled
▸ **isEnabled**(): *boolean*
*Defined in [index.d.ts:395](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L395)*
**Returns:** *boolean*
___
### isTouching
▸ **isTouching**(): *boolean*
*Defined in [index.d.ts:396](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L396)*
**Returns:** *boolean*
___
### resetFriction
▸ **resetFriction**(): *void*
*Defined in [index.d.ts:405](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L405)*
**Returns:** *void*
___
### resetRestitution
▸ **resetRestitution**(): *void*
*Defined in [index.d.ts:408](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L408)*
**Returns:** *void*
___
### setEnabled
▸ **setEnabled**(`flag`: boolean): *void*
*Defined in [index.d.ts:394](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L394)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### setFriction
▸ **setFriction**(`friction`: number): *void*
*Defined in [index.d.ts:403](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L403)*
**Parameters:**
Name | Type |
------ | ------ |
`friction` | number |
**Returns:** *void*
___
### setRestitution
▸ **setRestitution**(`restitution`: number): *void*
*Defined in [index.d.ts:406](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L406)*
**Parameters:**
Name | Type |
------ | ------ |
`restitution` | number |
**Returns:** *void*
___
### setTangentSpeed
▸ **setTangentSpeed**(`speed`: number): *void*
*Defined in [index.d.ts:409](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L409)*
**Parameters:**
Name | Type |
------ | ------ |
`speed` | number |
**Returns:** *void*
___
### solvePositionConstraint
▸ **solvePositionConstraint**(`step`: any): *number*
*Defined in [index.d.ts:413](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L413)*
**Parameters:**
Name | Type |
------ | ------ |
`step` | any |
**Returns:** *number*
___
### solvePositionConstraintTOI
▸ **solvePositionConstraintTOI**(`step`: any, `toiA?`: [Body](body.md) | null, `toiB?`: [Body](body.md) | null): *number*
*Defined in [index.d.ts:414](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L414)*
**Parameters:**
Name | Type |
------ | ------ |
`step` | any |
`toiA?` | [Body](body.md) &#124; null |
`toiB?` | [Body](body.md) &#124; null |
**Returns:** *number*
___
### solveVelocityConstraint
▸ **solveVelocityConstraint**(`step`: object): *void*
*Defined in [index.d.ts:419](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L419)*
**Parameters:**
▪ **step**: *object*
Name | Type |
------ | ------ |
`blockSolve` | boolean |
**Returns:** *void*
___
### storeConstraintImpulses
▸ **storeConstraintImpulses**(`step?`: any): *void*
*Defined in [index.d.ts:418](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L418)*
**Parameters:**
Name | Type |
------ | ------ |
`step?` | any |
**Returns:** *void*
___
### update
▸ **update**(`listener?`: object): *void*
*Defined in [index.d.ts:412](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L412)*
**Parameters:**
▪`Optional` **listener**: *object*
Name | Type |
------ | ------ |
`beginContact` | |
`endContact` | |
`oreSolve` | |
**Returns:** *void*
___
### warmStartConstraint
▸ **warmStartConstraint**(`step?`: any): *void*
*Defined in [index.d.ts:417](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L417)*
**Parameters:**
Name | Type |
------ | ------ |
`step?` | any |
**Returns:** *void*

View File

@ -1,48 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ContactEdge](contactedge.md)
# Class: ContactEdge
## Hierarchy
* **ContactEdge**
## Index
### Properties
* [contact](contactedge.md#contact)
* [next](contactedge.md#next)
* [other](contactedge.md#other)
* [prev](contactedge.md#prev)
## Properties
### contact
• **contact**: *[Contact](contact.md)*
*Defined in [index.d.ts:295](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L295)*
___
### next
• **next**: *[ContactEdge](contactedge.md) | undefined*
*Defined in [index.d.ts:297](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L297)*
___
### other
• **other**: *[Body](body.md) | undefined*
*Defined in [index.d.ts:298](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L298)*
___
### prev
• **prev**: *[ContactEdge](contactedge.md) | undefined*
*Defined in [index.d.ts:296](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L296)*

View File

@ -1,7 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ContactImpulse](contactimpulse.md)
# Class: ContactImpulse
## Hierarchy
* **ContactImpulse**

View File

@ -1,198 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [DistanceJoint](distancejoint.md)
# Class: DistanceJoint
## Hierarchy
* any
↳ **DistanceJoint**
## Callable
▸ **DistanceJoint**(`def`: [DistanceJointDef](../interfaces/distancejointdef.md)): *[DistanceJoint](distancejoint.md)*
*Defined in [joint/index.d.ts:60](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L60)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [DistanceJointDef](../interfaces/distancejointdef.md) |
**Returns:** *[DistanceJoint](distancejoint.md)*
▸ **DistanceJoint**(`def`: [DistanceJointOpt](../interfaces/distancejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchorA`: [Vec2](vec2.md), `anchorB`: [Vec2](vec2.md)): *[DistanceJoint](distancejoint.md)*
*Defined in [joint/index.d.ts:61](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L61)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [DistanceJointOpt](../interfaces/distancejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchorA` | [Vec2](vec2.md) |
`anchorB` | [Vec2](vec2.md) |
**Returns:** *[DistanceJoint](distancejoint.md)*
## Index
### Constructors
* [constructor](distancejoint.md#constructor)
### Properties
* [TYPE](distancejoint.md#static-type)
### Methods
* [getDampingRatio](distancejoint.md#getdampingratio)
* [getFrequency](distancejoint.md#getfrequency)
* [getLength](distancejoint.md#getlength)
* [getLocalAnchorA](distancejoint.md#getlocalanchora)
* [getLocalAnchorB](distancejoint.md#getlocalanchorb)
* [setDampingRatio](distancejoint.md#setdampingratio)
* [setFrequency](distancejoint.md#setfrequency)
* [setLength](distancejoint.md#setlength)
## Constructors
### constructor
\+ **new DistanceJoint**(`def`: [DistanceJointDef](../interfaces/distancejointdef.md)): *[DistanceJoint](distancejoint.md)*
*Defined in [joint/index.d.ts:63](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L63)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [DistanceJointDef](../interfaces/distancejointdef.md) |
**Returns:** *[DistanceJoint](distancejoint.md)*
\+ **new DistanceJoint**(`def`: [DistanceJointOpt](../interfaces/distancejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchorA`: [Vec2](vec2.md), `anchorB`: [Vec2](vec2.md)): *[DistanceJoint](distancejoint.md)*
*Defined in [joint/index.d.ts:65](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L65)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [DistanceJointOpt](../interfaces/distancejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchorA` | [Vec2](vec2.md) |
`anchorB` | [Vec2](vec2.md) |
**Returns:** *[DistanceJoint](distancejoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"distance-joint"*
*Defined in [joint/index.d.ts:63](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L63)*
## Methods
### getDampingRatio
▸ **getDampingRatio**(): *number*
*Defined in [joint/index.d.ts:97](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L97)*
**Returns:** *number*
___
### getFrequency
▸ **getFrequency**(): *number*
*Defined in [joint/index.d.ts:95](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L95)*
**Returns:** *number*
___
### getLength
▸ **getLength**(): *number*
*Defined in [joint/index.d.ts:93](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L93)*
**Returns:** *number*
___
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:90](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L90)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:91](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L91)*
**Returns:** *[Vec2](vec2.md)*
___
### setDampingRatio
▸ **setDampingRatio**(`ratio`: number): *void*
*Defined in [joint/index.d.ts:96](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L96)*
**Parameters:**
Name | Type |
------ | ------ |
`ratio` | number |
**Returns:** *void*
___
### setFrequency
▸ **setFrequency**(`hz`: number): *void*
*Defined in [joint/index.d.ts:94](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L94)*
**Parameters:**
Name | Type |
------ | ------ |
`hz` | number |
**Returns:** *void*
___
### setLength
▸ **setLength**(`length`: number): *void*
*Defined in [joint/index.d.ts:92](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L92)*
**Parameters:**
Name | Type |
------ | ------ |
`length` | number |
**Returns:** *void*

View File

@ -1,153 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [DistanceProxy](distanceproxy.md)
# Class: DistanceProxy
## Hierarchy
* **DistanceProxy**
## Index
### Constructors
* [constructor](distanceproxy.md#constructor)
### Properties
* [m_buffer](distanceproxy.md#m_buffer)
* [m_count](distanceproxy.md#m_count)
* [m_radius](distanceproxy.md#m_radius)
* [m_vertices](distanceproxy.md#m_vertices)
### Methods
* [getSupport](distanceproxy.md#getsupport)
* [getSupportVertex](distanceproxy.md#getsupportvertex)
* [getVertex](distanceproxy.md#getvertex)
* [getVertexCount](distanceproxy.md#getvertexcount)
* [set](distanceproxy.md#set)
## Constructors
### constructor
\+ **new DistanceProxy**(): *[DistanceProxy](distanceproxy.md)*
*Defined in [collision/index.d.ts:19](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L19)*
**Returns:** *[DistanceProxy](distanceproxy.md)*
## Properties
### m_buffer
• **m_buffer**: *[Vec2](vec2.md)[]*
*Defined in [collision/index.d.ts:22](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L22)*
internal
___
### m_count
• **m_count**: *number*
*Defined in [collision/index.d.ts:24](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L24)*
internal
___
### m_radius
• **m_radius**: *number*
*Defined in [collision/index.d.ts:25](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L25)*
internal
___
### m_vertices
• **m_vertices**: *[Vec2](vec2.md)[]*
*Defined in [collision/index.d.ts:23](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L23)*
internal
## Methods
### getSupport
▸ **getSupport**(`d`: [Vec2](vec2.md)): *number*
*Defined in [collision/index.d.ts:29](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L29)*
**Parameters:**
Name | Type |
------ | ------ |
`d` | [Vec2](vec2.md) |
**Returns:** *number*
___
### getSupportVertex
▸ **getSupportVertex**(`d`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [collision/index.d.ts:30](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L30)*
**Parameters:**
Name | Type |
------ | ------ |
`d` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### getVertex
▸ **getVertex**(`index`: number): *[Vec2](vec2.md)*
*Defined in [collision/index.d.ts:28](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L28)*
**Parameters:**
Name | Type |
------ | ------ |
`index` | number |
**Returns:** *[Vec2](vec2.md)*
___
### getVertexCount
▸ **getVertexCount**(): *number*
*Defined in [collision/index.d.ts:27](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L27)*
**Returns:** *number*
___
### set
▸ **set**(`shape`: [Shape](shape.md), `index`: number): *void*
*Defined in [collision/index.d.ts:31](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L31)*
**Parameters:**
Name | Type |
------ | ------ |
`shape` | [Shape](shape.md) |
`index` | number |
**Returns:** *void*

View File

@ -1,353 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [DynamicTree](dynamictree.md)
# Class: DynamicTree
## Hierarchy
* **DynamicTree**
## Index
### Methods
* [allocateNode](dynamictree.md#allocatenode)
* [balance](dynamictree.md#balance)
* [computeHeight](dynamictree.md#computeheight)
* [createProxy](dynamictree.md#createproxy)
* [destroyProxy](dynamictree.md#destroyproxy)
* [freeNode](dynamictree.md#freenode)
* [getAreaRatio](dynamictree.md#getarearatio)
* [getFatAABB](dynamictree.md#getfataabb)
* [getHeight](dynamictree.md#getheight)
* [getMaxBalance](dynamictree.md#getmaxbalance)
* [getUserData](dynamictree.md#getuserdata)
* [insertLeaf](dynamictree.md#insertleaf)
* [moveProxy](dynamictree.md#moveproxy)
* [query](dynamictree.md#query)
* [rayCast](dynamictree.md#raycast)
* [rebuildBottomUp](dynamictree.md#rebuildbottomup)
* [removeLeaf](dynamictree.md#removeleaf)
* [shiftOrigin](dynamictree.md#shiftorigin)
* [validate](dynamictree.md#validate)
* [validateMetrics](dynamictree.md#validatemetrics)
* [validateStructure](dynamictree.md#validatestructure)
## Methods
### allocateNode
▸ **allocateNode**(): *[TreeNode](treenode.md)*
*Defined in [collision/index.d.ts:74](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L74)*
**Returns:** *[TreeNode](treenode.md)*
___
### balance
▸ **balance**(`iA`: [TreeNode](treenode.md)): *[TreeNode](treenode.md)*
*Defined in [collision/index.d.ts:81](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L81)*
**Parameters:**
Name | Type |
------ | ------ |
`iA` | [TreeNode](treenode.md) |
**Returns:** *[TreeNode](treenode.md)*
___
### computeHeight
▸ **computeHeight**(`node?`: [TreeNode](treenode.md)): *number*
*Defined in [collision/index.d.ts:84](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L84)*
**Parameters:**
Name | Type |
------ | ------ |
`node?` | [TreeNode](treenode.md) |
**Returns:** *number*
___
### createProxy
▸ **createProxy**(`aabb`: [AABB](aabb.md), `userData`: any): *string*
*Defined in [collision/index.d.ts:76](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L76)*
**Parameters:**
Name | Type |
------ | ------ |
`aabb` | [AABB](aabb.md) |
`userData` | any |
**Returns:** *string*
___
### destroyProxy
▸ **destroyProxy**(`id`: number): *void*
*Defined in [collision/index.d.ts:77](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L77)*
**Parameters:**
Name | Type |
------ | ------ |
`id` | number |
**Returns:** *void*
___
### freeNode
▸ **freeNode**(`node`: [TreeNode](treenode.md)): *void*
*Defined in [collision/index.d.ts:75](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L75)*
**Parameters:**
Name | Type |
------ | ------ |
`node` | [TreeNode](treenode.md) |
**Returns:** *void*
___
### getAreaRatio
▸ **getAreaRatio**(): *number*
*Defined in [collision/index.d.ts:83](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L83)*
**Returns:** *number*
___
### getFatAABB
▸ **getFatAABB**(`id`: number): *[AABB](aabb.md)*
*Defined in [collision/index.d.ts:73](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L73)*
**Parameters:**
Name | Type |
------ | ------ |
`id` | number |
**Returns:** *[AABB](aabb.md)*
___
### getHeight
▸ **getHeight**(): *number*
*Defined in [collision/index.d.ts:82](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L82)*
**Returns:** *number*
___
### getMaxBalance
▸ **getMaxBalance**(): *number*
*Defined in [collision/index.d.ts:88](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L88)*
**Returns:** *number*
___
### getUserData
▸ **getUserData**(`id`: number): *unknown*
*Defined in [collision/index.d.ts:72](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L72)*
**Parameters:**
Name | Type |
------ | ------ |
`id` | number |
**Returns:** *unknown*
___
### insertLeaf
▸ **insertLeaf**(`leaf`: [TreeNode](treenode.md)): *void*
*Defined in [collision/index.d.ts:79](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L79)*
**Parameters:**
Name | Type |
------ | ------ |
`leaf` | [TreeNode](treenode.md) |
**Returns:** *void*
___
### moveProxy
▸ **moveProxy**(`id`: number, `aabb`: [AABB](aabb.md), `d`: [Vec2](vec2.md)): *boolean*
*Defined in [collision/index.d.ts:78](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L78)*
**Parameters:**
Name | Type |
------ | ------ |
`id` | number |
`aabb` | [AABB](aabb.md) |
`d` | [Vec2](vec2.md) |
**Returns:** *boolean*
___
### query
▸ **query**(`aabb`: [AABB](aabb.md), `queryCallback`: function): *void*
*Defined in [collision/index.d.ts:91](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L91)*
**Parameters:**
▪ **aabb**: *[AABB](aabb.md)*
▪ **queryCallback**: *function*
▸ (`id`: number): *boolean*
**Parameters:**
Name | Type |
------ | ------ |
`id` | number |
**Returns:** *void*
___
### rayCast
▸ **rayCast**(`input`: [RayCastInput](../interfaces/raycastinput.md), `rayCastCallback`: function): *void*
*Defined in [collision/index.d.ts:92](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L92)*
**Parameters:**
▪ **input**: *[RayCastInput](../interfaces/raycastinput.md)*
▪ **rayCastCallback**: *function*
▸ (`subInput`: [RayCastInput](../interfaces/raycastinput.md), `id`: number): *number*
**Parameters:**
Name | Type |
------ | ------ |
`subInput` | [RayCastInput](../interfaces/raycastinput.md) |
`id` | number |
**Returns:** *void*
___
### rebuildBottomUp
▸ **rebuildBottomUp**(): *void*
*Defined in [collision/index.d.ts:89](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L89)*
**Returns:** *void*
___
### removeLeaf
▸ **removeLeaf**(`leaf`: [TreeNode](treenode.md)): *void*
*Defined in [collision/index.d.ts:80](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L80)*
**Parameters:**
Name | Type |
------ | ------ |
`leaf` | [TreeNode](treenode.md) |
**Returns:** *void*
___
### shiftOrigin
▸ **shiftOrigin**(`newOrigin`: [Vec2](vec2.md)): *void*
*Defined in [collision/index.d.ts:90](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L90)*
**Parameters:**
Name | Type |
------ | ------ |
`newOrigin` | [Vec2](vec2.md) |
**Returns:** *void*
___
### validate
▸ **validate**(): *void*
*Defined in [collision/index.d.ts:87](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L87)*
**Returns:** *void*
___
### validateMetrics
▸ **validateMetrics**(`node`: [TreeNode](treenode.md)): *void*
*Defined in [collision/index.d.ts:86](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L86)*
**Parameters:**
Name | Type |
------ | ------ |
`node` | [TreeNode](treenode.md) |
**Returns:** *void*
___
### validateStructure
▸ **validateStructure**(`node`: [TreeNode](treenode.md)): *void*
*Defined in [collision/index.d.ts:85](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L85)*
**Parameters:**
Name | Type |
------ | ------ |
`node` | [TreeNode](treenode.md) |
**Returns:** *void*

View File

@ -1,96 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [EdgeShape](edgeshape.md)
# Class: EdgeShape
## Hierarchy
* any
↳ **EdgeShape**
## Callable
▸ **EdgeShape**(`v1`: [Vec2](vec2.md), `v2`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:39](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L39)*
**Parameters:**
Name | Type |
------ | ------ |
`v1` | [Vec2](vec2.md) |
`v2` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*
## Index
### Constructors
* [constructor](edgeshape.md#constructor)
### Properties
* [TYPE](edgeshape.md#static-type)
### Methods
* [setNext](edgeshape.md#setnext)
* [setPrev](edgeshape.md#setprev)
## Constructors
### constructor
\+ **new EdgeShape**(`v1`: [Vec2](vec2.md), `v2`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L41)*
**Parameters:**
Name | Type |
------ | ------ |
`v1` | [Vec2](vec2.md) |
`v2` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"edge"*
*Defined in [shape/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L41)*
## Methods
### setNext
▸ **setNext**(`v3?`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:53](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L53)*
**Parameters:**
Name | Type |
------ | ------ |
`v3?` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*
___
### setPrev
▸ **setPrev**(`v0?`: [Vec2](vec2.md)): *[EdgeShape](edgeshape.md)*
*Defined in [shape/index.d.ts:54](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L54)*
**Parameters:**
Name | Type |
------ | ------ |
`v0?` | [Vec2](vec2.md) |
**Returns:** *[EdgeShape](edgeshape.md)*

View File

@ -1,451 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Fixture](fixture.md)
# Class: Fixture
## Hierarchy
* **Fixture**
## Index
### Constructors
* [constructor](fixture.md#constructor)
### Methods
* [createProxies](fixture.md#createproxies)
* [destroyProxies](fixture.md#destroyproxies)
* [getAABB](fixture.md#getaabb)
* [getBody](fixture.md#getbody)
* [getDensity](fixture.md#getdensity)
* [getFilterCategoryBits](fixture.md#getfiltercategorybits)
* [getFilterGroupIndex](fixture.md#getfiltergroupindex)
* [getFilterMaskBits](fixture.md#getfiltermaskbits)
* [getFriction](fixture.md#getfriction)
* [getMassData](fixture.md#getmassdata)
* [getNext](fixture.md#getnext)
* [getRestitution](fixture.md#getrestitution)
* [getShape](fixture.md#getshape)
* [getType](fixture.md#gettype)
* [getUserData](fixture.md#getuserdata)
* [isSensor](fixture.md#issensor)
* [rayCast](fixture.md#raycast)
* [refilter](fixture.md#refilter)
* [setDensity](fixture.md#setdensity)
* [setFilterData](fixture.md#setfilterdata)
* [setFriction](fixture.md#setfriction)
* [setRestitution](fixture.md#setrestitution)
* [setSensor](fixture.md#setsensor)
* [setUserData](fixture.md#setuserdata)
* [shouldCollide](fixture.md#shouldcollide)
* [synchronize](fixture.md#synchronize)
* [testPoint](fixture.md#testpoint)
## Constructors
### constructor
\+ **new Fixture**(`body`: [Body](body.md), `def`: [FixtureDef](../interfaces/fixturedef.md)): *[Fixture](fixture.md)*
*Defined in [index.d.ts:85](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L85)*
**Parameters:**
Name | Type |
------ | ------ |
`body` | [Body](body.md) |
`def` | [FixtureDef](../interfaces/fixturedef.md) |
**Returns:** *[Fixture](fixture.md)*
\+ **new Fixture**(`body`: [Body](body.md), `shape`: [Shape](shape.md), `def?`: [FixtureOpt](../interfaces/fixtureopt.md)): *[Fixture](fixture.md)*
*Defined in [index.d.ts:86](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L86)*
**Parameters:**
Name | Type |
------ | ------ |
`body` | [Body](body.md) |
`shape` | [Shape](shape.md) |
`def?` | [FixtureOpt](../interfaces/fixtureopt.md) |
**Returns:** *[Fixture](fixture.md)*
\+ **new Fixture**(`body`: [Body](body.md), `shape`: [Shape](shape.md), `density?`: number): *[Fixture](fixture.md)*
*Defined in [index.d.ts:87](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L87)*
**Parameters:**
Name | Type |
------ | ------ |
`body` | [Body](body.md) |
`shape` | [Shape](shape.md) |
`density?` | number |
**Returns:** *[Fixture](fixture.md)*
## Methods
### createProxies
▸ **createProxies**(`broadPhase`: [BroadPhase](broadphase.md), `xf`: [Transform](transform.md)): *void*
*Defined in [index.d.ts:122](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L122)*
**Parameters:**
Name | Type |
------ | ------ |
`broadPhase` | [BroadPhase](broadphase.md) |
`xf` | [Transform](transform.md) |
**Returns:** *void*
___
### destroyProxies
▸ **destroyProxies**(`broadPhase`: [BroadPhase](broadphase.md)): *void*
*Defined in [index.d.ts:123](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L123)*
**Parameters:**
Name | Type |
------ | ------ |
`broadPhase` | [BroadPhase](broadphase.md) |
**Returns:** *void*
___
### getAABB
▸ **getAABB**(`childIndex`: number): *[AABB](aabb.md)*
*Defined in [index.d.ts:121](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L121)*
**Parameters:**
Name | Type |
------ | ------ |
`childIndex` | number |
**Returns:** *[AABB](aabb.md)*
___
### getBody
▸ **getBody**(): *[Body](body.md)*
*Defined in [index.d.ts:110](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L110)*
**Returns:** *[Body](body.md)*
___
### getDensity
▸ **getDensity**(): *number*
*Defined in [index.d.ts:112](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L112)*
**Returns:** *number*
___
### getFilterCategoryBits
▸ **getFilterCategoryBits**(): *number*
*Defined in [index.d.ts:127](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L127)*
**Returns:** *number*
___
### getFilterGroupIndex
▸ **getFilterGroupIndex**(): *number*
*Defined in [index.d.ts:126](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L126)*
**Returns:** *number*
___
### getFilterMaskBits
▸ **getFilterMaskBits**(): *number*
*Defined in [index.d.ts:128](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L128)*
**Returns:** *number*
___
### getFriction
▸ **getFriction**(): *number*
*Defined in [index.d.ts:114](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L114)*
**Returns:** *number*
___
### getMassData
▸ **getMassData**(`massData`: [MassData](../interfaces/massdata.md)): *void*
*Defined in [index.d.ts:120](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L120)*
**Parameters:**
Name | Type |
------ | ------ |
`massData` | [MassData](../interfaces/massdata.md) |
**Returns:** *void*
___
### getNext
▸ **getNext**(): *[Fixture](fixture.md) | null*
*Defined in [index.d.ts:111](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L111)*
**Returns:** *[Fixture](fixture.md) | null*
___
### getRestitution
▸ **getRestitution**(): *number*
*Defined in [index.d.ts:116](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L116)*
**Returns:** *number*
___
### getShape
▸ **getShape**(): *[Shape](shape.md)*
*Defined in [index.d.ts:105](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L105)*
**Returns:** *[Shape](shape.md)*
___
### getType
▸ **getType**(): *[ShapeType](../globals.md#shapetype)*
*Defined in [index.d.ts:104](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L104)*
**Returns:** *[ShapeType](../globals.md#shapetype)*
___
### getUserData
▸ **getUserData**(): *unknown*
*Defined in [index.d.ts:108](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L108)*
**Returns:** *unknown*
___
### isSensor
▸ **isSensor**(): *boolean*
*Defined in [index.d.ts:106](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L106)*
**Returns:** *boolean*
___
### rayCast
▸ **rayCast**(`output`: [RayCastOutput](../interfaces/raycastoutput.md), `input`: [RayCastInput](../interfaces/raycastinput.md), `childIndex`: number): *boolean*
*Defined in [index.d.ts:119](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L119)*
**Parameters:**
Name | Type |
------ | ------ |
`output` | [RayCastOutput](../interfaces/raycastoutput.md) |
`input` | [RayCastInput](../interfaces/raycastinput.md) |
`childIndex` | number |
**Returns:** *boolean*
___
### refilter
▸ **refilter**(): *void*
*Defined in [index.d.ts:129](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L129)*
**Returns:** *void*
___
### setDensity
▸ **setDensity**(`density`: number): *void*
*Defined in [index.d.ts:113](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L113)*
**Parameters:**
Name | Type |
------ | ------ |
`density` | number |
**Returns:** *void*
___
### setFilterData
▸ **setFilterData**(`filter`: object): *void*
*Defined in [index.d.ts:125](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L125)*
**Parameters:**
▪ **filter**: *object*
Name | Type |
------ | ------ |
`categoryBits` | number |
`groupIndex` | number |
`maskBits` | number |
**Returns:** *void*
___
### setFriction
▸ **setFriction**(`friction`: number): *void*
*Defined in [index.d.ts:115](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L115)*
**Parameters:**
Name | Type |
------ | ------ |
`friction` | number |
**Returns:** *void*
___
### setRestitution
▸ **setRestitution**(`restitution`: number): *void*
*Defined in [index.d.ts:117](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L117)*
**Parameters:**
Name | Type |
------ | ------ |
`restitution` | number |
**Returns:** *void*
___
### setSensor
▸ **setSensor**(`sensor`: boolean): *void*
*Defined in [index.d.ts:107](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L107)*
**Parameters:**
Name | Type |
------ | ------ |
`sensor` | boolean |
**Returns:** *void*
___
### setUserData
▸ **setUserData**(`data`: any): *void*
*Defined in [index.d.ts:109](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L109)*
**Parameters:**
Name | Type |
------ | ------ |
`data` | any |
**Returns:** *void*
___
### shouldCollide
▸ **shouldCollide**(`that`: [Fixture](fixture.md)): *boolean*
*Defined in [index.d.ts:130](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L130)*
**Parameters:**
Name | Type |
------ | ------ |
`that` | [Fixture](fixture.md) |
**Returns:** *boolean*
___
### synchronize
▸ **synchronize**(`broadPhase`: [BroadPhase](broadphase.md), `xf1`: [Transform](transform.md), `xf2`: [Transform](transform.md)): *void*
*Defined in [index.d.ts:124](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L124)*
**Parameters:**
Name | Type |
------ | ------ |
`broadPhase` | [BroadPhase](broadphase.md) |
`xf1` | [Transform](transform.md) |
`xf2` | [Transform](transform.md) |
**Returns:** *void*
___
### testPoint
▸ **testPoint**(`p`: [Vec2](vec2.md)): *boolean*
*Defined in [index.d.ts:118](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L118)*
**Parameters:**
Name | Type |
------ | ------ |
`p` | [Vec2](vec2.md) |
**Returns:** *boolean*

View File

@ -1,168 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [FrictionJoint](frictionjoint.md)
# Class: FrictionJoint
## Hierarchy
* any
↳ **FrictionJoint**
## Callable
▸ **FrictionJoint**(`def`: [FrictionJointDef](../interfaces/frictionjointdef.md)): *[FrictionJoint](frictionjoint.md)*
*Defined in [joint/index.d.ts:111](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L111)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [FrictionJointDef](../interfaces/frictionjointdef.md) |
**Returns:** *[FrictionJoint](frictionjoint.md)*
▸ **FrictionJoint**(`def`: [FrictionJointOpt](../interfaces/frictionjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[FrictionJoint](frictionjoint.md)*
*Defined in [joint/index.d.ts:112](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L112)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [FrictionJointOpt](../interfaces/frictionjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[FrictionJoint](frictionjoint.md)*
## Index
### Constructors
* [constructor](frictionjoint.md#constructor)
### Properties
* [TYPE](frictionjoint.md#static-type)
### Methods
* [getLocalAnchorA](frictionjoint.md#getlocalanchora)
* [getLocalAnchorB](frictionjoint.md#getlocalanchorb)
* [getMaxForce](frictionjoint.md#getmaxforce)
* [getMaxTorque](frictionjoint.md#getmaxtorque)
* [setMaxForce](frictionjoint.md#setmaxforce)
* [setMaxTorque](frictionjoint.md#setmaxtorque)
## Constructors
### constructor
\+ **new FrictionJoint**(`def`: [FrictionJointDef](../interfaces/frictionjointdef.md)): *[FrictionJoint](frictionjoint.md)*
*Defined in [joint/index.d.ts:114](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L114)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [FrictionJointDef](../interfaces/frictionjointdef.md) |
**Returns:** *[FrictionJoint](frictionjoint.md)*
\+ **new FrictionJoint**(`def`: [FrictionJointOpt](../interfaces/frictionjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[FrictionJoint](frictionjoint.md)*
*Defined in [joint/index.d.ts:115](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L115)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [FrictionJointOpt](../interfaces/frictionjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[FrictionJoint](frictionjoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"friction-joint"*
*Defined in [joint/index.d.ts:114](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L114)*
## Methods
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:139](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L139)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:140](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L140)*
**Returns:** *[Vec2](vec2.md)*
___
### getMaxForce
▸ **getMaxForce**(): *number*
*Defined in [joint/index.d.ts:142](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L142)*
**Returns:** *number*
___
### getMaxTorque
▸ **getMaxTorque**(): *number*
*Defined in [joint/index.d.ts:144](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L144)*
**Returns:** *number*
___
### setMaxForce
▸ **setMaxForce**(`force`: number): *void*
*Defined in [joint/index.d.ts:141](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L141)*
**Parameters:**
Name | Type |
------ | ------ |
`force` | number |
**Returns:** *void*
___
### setMaxTorque
▸ **setMaxTorque**(`torque`: number): *void*
*Defined in [joint/index.d.ts:143](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L143)*
**Parameters:**
Name | Type |
------ | ------ |
`torque` | number |
**Returns:** *void*

View File

@ -1,144 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [GearJoint](gearjoint.md)
# Class: GearJoint
## Hierarchy
* any
↳ **GearJoint**
## Callable
▸ **GearJoint**(`def`: [GearJointDef](../interfaces/gearjointdef.md)): *[GearJoint](gearjoint.md)*
*Defined in [joint/index.d.ts:157](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L157)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [GearJointDef](../interfaces/gearjointdef.md) |
**Returns:** *[GearJoint](gearjoint.md)*
▸ **GearJoint**(`def`: [GearJointOpt](../interfaces/gearjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `joint1`: [RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md), `joint2`: [RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md), `ratio?`: number): *[GearJoint](gearjoint.md)*
*Defined in [joint/index.d.ts:158](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L158)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [GearJointOpt](../interfaces/gearjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`joint1` | [RevoluteJoint](revolutejoint.md) &#124; [PrismaticJoint](prismaticjoint.md) |
`joint2` | [RevoluteJoint](revolutejoint.md) &#124; [PrismaticJoint](prismaticjoint.md) |
`ratio?` | number |
**Returns:** *[GearJoint](gearjoint.md)*
## Index
### Constructors
* [constructor](gearjoint.md#constructor)
### Properties
* [TYPE](gearjoint.md#static-type)
### Methods
* [getJoint1](gearjoint.md#getjoint1)
* [getJoint2](gearjoint.md#getjoint2)
* [getRatio](gearjoint.md#getratio)
* [setRatio](gearjoint.md#setratio)
## Constructors
### constructor
\+ **new GearJoint**(`def`: [GearJointDef](../interfaces/gearjointdef.md)): *[GearJoint](gearjoint.md)*
*Defined in [joint/index.d.ts:160](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L160)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [GearJointDef](../interfaces/gearjointdef.md) |
**Returns:** *[GearJoint](gearjoint.md)*
\+ **new GearJoint**(`def`: [GearJointOpt](../interfaces/gearjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `joint1`: [RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md), `joint2`: [RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md), `ratio?`: number): *[GearJoint](gearjoint.md)*
*Defined in [joint/index.d.ts:162](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L162)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [GearJointOpt](../interfaces/gearjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`joint1` | [RevoluteJoint](revolutejoint.md) &#124; [PrismaticJoint](prismaticjoint.md) |
`joint2` | [RevoluteJoint](revolutejoint.md) &#124; [PrismaticJoint](prismaticjoint.md) |
`ratio?` | number |
**Returns:** *[GearJoint](gearjoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"gear-joint"*
*Defined in [joint/index.d.ts:160](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L160)*
## Methods
### getJoint1
▸ **getJoint1**(): *[RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md)*
*Defined in [joint/index.d.ts:191](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L191)*
**Returns:** *[RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md)*
___
### getJoint2
▸ **getJoint2**(): *[RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md)*
*Defined in [joint/index.d.ts:192](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L192)*
**Returns:** *[RevoluteJoint](revolutejoint.md) | [PrismaticJoint](prismaticjoint.md)*
___
### getRatio
▸ **getRatio**(): *number*
*Defined in [joint/index.d.ts:194](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L194)*
**Returns:** *number*
___
### setRatio
▸ **setRatio**(`ratio`: number): *void*
*Defined in [joint/index.d.ts:193](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L193)*
**Parameters:**
Name | Type |
------ | ------ |
`ratio` | number |
**Returns:** *void*

View File

@ -1,48 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [internal](../modules/internal.md) › [Distance](../modules/internal.distance.md) › [Cache](internal.distance.cache.md)
# Class: Cache
## Hierarchy
* **Cache**
## Index
### Properties
* [count](internal.distance.cache.md#count)
* [indexA](internal.distance.cache.md#indexa)
* [indexB](internal.distance.cache.md#indexb)
* [metric](internal.distance.cache.md#metric)
## Properties
### count
• **count**: *number*
*Defined in [index.d.ts:695](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L695)*
___
### indexA
• **indexA**: *number[]*
*Defined in [index.d.ts:693](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L693)*
___
### indexB
• **indexB**: *number[]*
*Defined in [index.d.ts:694](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L694)*
___
### metric
• **metric**: *number*
*Defined in [index.d.ts:692](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L692)*

View File

@ -1,57 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [internal](../modules/internal.md) › [Distance](../modules/internal.distance.md) › [Input](internal.distance.input.md)
# Class: Input
## Hierarchy
* **Input**
## Index
### Properties
* [proxyA](internal.distance.input.md#proxya)
* [proxyB](internal.distance.input.md#proxyb)
* [transformA](internal.distance.input.md#transforma)
* [transformB](internal.distance.input.md#transformb)
* [useRadii](internal.distance.input.md#useradii)
## Properties
### proxyA
• **proxyA**: *[DistanceProxy](distanceproxy.md)*
*Defined in [index.d.ts:679](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L679)*
___
### proxyB
• **proxyB**: *[DistanceProxy](distanceproxy.md)*
*Defined in [index.d.ts:680](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L680)*
___
### transformA
• **transformA**: *[Transform](transform.md) | null*
*Defined in [index.d.ts:681](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L681)*
___
### transformB
• **transformB**: *[Transform](transform.md) | null*
*Defined in [index.d.ts:682](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L682)*
___
### useRadii
• **useRadii**: *boolean*
*Defined in [index.d.ts:683](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L683)*

View File

@ -1,48 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [internal](../modules/internal.md) › [Distance](../modules/internal.distance.md) › [Output](internal.distance.output.md)
# Class: Output
## Hierarchy
* **Output**
## Index
### Properties
* [distance](internal.distance.output.md#distance)
* [iterations](internal.distance.output.md#iterations)
* [pointA](internal.distance.output.md#pointa)
* [pointB](internal.distance.output.md#pointb)
## Properties
### distance
• **distance**: *number*
*Defined in [index.d.ts:688](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L688)*
___
### iterations
• **iterations**: *number*
*Defined in [index.d.ts:689](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L689)*
___
### pointA
• **pointA**: *[Vec2](vec2.md)*
*Defined in [index.d.ts:686](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L686)*
___
### pointB
• **pointB**: *[Vec2](vec2.md)*
*Defined in [index.d.ts:687](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L687)*

View File

@ -1,57 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [internal](../modules/internal.md) › [TimeOfImpact](../modules/internal.timeofimpact.md) › [Input](internal.timeofimpact.input.md)
# Class: Input
## Hierarchy
* **Input**
## Index
### Properties
* [proxyA](internal.timeofimpact.input.md#proxya)
* [proxyB](internal.timeofimpact.input.md#proxyb)
* [sweepA](internal.timeofimpact.input.md#sweepa)
* [sweepB](internal.timeofimpact.input.md#sweepb)
* [tMax](internal.timeofimpact.input.md#tmax)
## Properties
### proxyA
• **proxyA**: *[DistanceProxy](distanceproxy.md)*
*Defined in [index.d.ts:702](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L702)*
___
### proxyB
• **proxyB**: *[DistanceProxy](distanceproxy.md)*
*Defined in [index.d.ts:703](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L703)*
___
### sweepA
• **sweepA**: *[Sweep](sweep.md)*
*Defined in [index.d.ts:704](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L704)*
___
### sweepB
• **sweepB**: *[Sweep](sweep.md)*
*Defined in [index.d.ts:705](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L705)*
___
### tMax
• **tMax**: *number | undefined*
*Defined in [index.d.ts:706](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L706)*

View File

@ -1,75 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [internal](../modules/internal.md) › [TimeOfImpact](../modules/internal.timeofimpact.md) › [Output](internal.timeofimpact.output.md)
# Class: Output
## Hierarchy
* **Output**
## Index
### Properties
* [state](internal.timeofimpact.output.md#state)
* [t](internal.timeofimpact.output.md#t)
* [e_failed](internal.timeofimpact.output.md#static-e_failed)
* [e_overlapped](internal.timeofimpact.output.md#static-e_overlapped)
* [e_separated](internal.timeofimpact.output.md#static-e_separated)
* [e_touching](internal.timeofimpact.output.md#static-e_touching)
* [e_unknown](internal.timeofimpact.output.md#static-e_unknown)
## Properties
### state
• **state**: *[TOIOutputState](../enums/toioutputstate.md) | undefined*
*Defined in [index.d.ts:709](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L709)*
___
### t
• **t**: *number | undefined*
*Defined in [index.d.ts:710](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L710)*
___
### `Static` e_failed
▪ **e_failed**: *[TOIOutputState](../enums/toioutputstate.md)*
*Defined in [index.d.ts:713](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L713)*
___
### `Static` e_overlapped
▪ **e_overlapped**: *[TOIOutputState](../enums/toioutputstate.md)*
*Defined in [index.d.ts:714](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L714)*
___
### `Static` e_separated
▪ **e_separated**: *[TOIOutputState](../enums/toioutputstate.md)*
*Defined in [index.d.ts:716](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L716)*
___
### `Static` e_touching
▪ **e_touching**: *[TOIOutputState](../enums/toioutputstate.md)*
*Defined in [index.d.ts:715](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L715)*
___
### `Static` e_unknown
▪ **e_unknown**: *[TOIOutputState](../enums/toioutputstate.md)*
*Defined in [index.d.ts:712](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L712)*

View File

@ -1,230 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Joint](joint.md)
# Class: Joint
## Hierarchy
* **Joint**
## Index
### Methods
* [getAnchorA](joint.md#getanchora)
* [getAnchorB](joint.md#getanchorb)
* [getBodyA](joint.md#getbodya)
* [getBodyB](joint.md#getbodyb)
* [getCollideConnected](joint.md#getcollideconnected)
* [getNext](joint.md#getnext)
* [getReactionForce](joint.md#getreactionforce)
* [getReactionTorque](joint.md#getreactiontorque)
* [getType](joint.md#gettype)
* [getUserData](joint.md#getuserdata)
* [initVelocityConstraints](joint.md#initvelocityconstraints)
* [isActive](joint.md#isactive)
* [setUserData](joint.md#setuserdata)
* [shiftOrigin](joint.md#shiftorigin)
* [solvePositionConstraints](joint.md#solvepositionconstraints)
* [solveVelocityConstraints](joint.md#solvevelocityconstraints)
## Methods
### getAnchorA
▸ **getAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L41)*
**Returns:** *[Vec2](vec2.md)*
___
### getAnchorB
▸ **getAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:42](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L42)*
**Returns:** *[Vec2](vec2.md)*
___
### getBodyA
▸ **getBodyA**(): *[Body](body.md)*
*Defined in [joint/index.d.ts:35](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L35)*
**Returns:** *[Body](body.md)*
___
### getBodyB
▸ **getBodyB**(): *[Body](body.md)*
*Defined in [joint/index.d.ts:36](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L36)*
**Returns:** *[Body](body.md)*
___
### getCollideConnected
▸ **getCollideConnected**(): *boolean*
*Defined in [joint/index.d.ts:40](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L40)*
**Returns:** *boolean*
___
### getNext
▸ **getNext**(): *[Joint](joint.md) | null*
*Defined in [joint/index.d.ts:37](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L37)*
**Returns:** *[Joint](joint.md) | null*
___
### getReactionForce
▸ **getReactionForce**(`inv_dt`: number): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:43](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L43)*
**Parameters:**
Name | Type |
------ | ------ |
`inv_dt` | number |
**Returns:** *[Vec2](vec2.md)*
___
### getReactionTorque
▸ **getReactionTorque**(`inv_dt`: number): *number*
*Defined in [joint/index.d.ts:44](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L44)*
**Parameters:**
Name | Type |
------ | ------ |
`inv_dt` | number |
**Returns:** *number*
___
### getType
▸ **getType**(): *string*
*Defined in [joint/index.d.ts:34](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L34)*
**Returns:** *string*
___
### getUserData
▸ **getUserData**(): *unknown*
*Defined in [joint/index.d.ts:38](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L38)*
**Returns:** *unknown*
___
### initVelocityConstraints
▸ **initVelocityConstraints**(`step`: any): *void*
*Defined in [joint/index.d.ts:46](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L46)*
**Parameters:**
Name | Type |
------ | ------ |
`step` | any |
**Returns:** *void*
___
### isActive
▸ **isActive**(): *boolean*
*Defined in [joint/index.d.ts:33](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L33)*
**Returns:** *boolean*
___
### setUserData
▸ **setUserData**(`data`: any): *void*
*Defined in [joint/index.d.ts:39](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L39)*
**Parameters:**
Name | Type |
------ | ------ |
`data` | any |
**Returns:** *void*
___
### shiftOrigin
▸ **shiftOrigin**(`newOrigin`: [Vec2](vec2.md)): *void*
*Defined in [joint/index.d.ts:45](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L45)*
**Parameters:**
Name | Type |
------ | ------ |
`newOrigin` | [Vec2](vec2.md) |
**Returns:** *void*
___
### solvePositionConstraints
▸ **solvePositionConstraints**(`step`: any): *boolean*
*Defined in [joint/index.d.ts:48](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L48)*
**Parameters:**
Name | Type |
------ | ------ |
`step` | any |
**Returns:** *boolean*
___
### solveVelocityConstraints
▸ **solveVelocityConstraints**(`step`: any): *void*
*Defined in [joint/index.d.ts:47](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L47)*
**Parameters:**
Name | Type |
------ | ------ |
`step` | any |
**Returns:** *void*

View File

@ -1,357 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Mat22](mat22.md)
# Class: Mat22
## Hierarchy
* **Mat22**
## Index
### Constructors
* [constructor](mat22.md#constructor)
### Properties
* [ex](mat22.md#ex)
* [ey](mat22.md#ey)
### Methods
* [getInverse](mat22.md#getinverse)
* [set](mat22.md#set)
* [setIdentity](mat22.md#setidentity)
* [setZero](mat22.md#setzero)
* [solve](mat22.md#solve)
* [toString](mat22.md#tostring)
* [abs](mat22.md#static-abs)
* [add](mat22.md#static-add)
* [assert](mat22.md#static-assert)
* [isValid](mat22.md#static-isvalid)
* [mul](mat22.md#static-mul)
* [mulMat22](mat22.md#static-mulmat22)
* [mulT](mat22.md#static-mult)
* [mulVec2](mat22.md#static-mulvec2)
## Constructors
### constructor
\+ **new Mat22**(`a`: number, `b`: number, `c`: number, `d`: number): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:193](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L193)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`b` | number |
`c` | number |
`d` | number |
**Returns:** *[Mat22](mat22.md)*
\+ **new Mat22**(`a`: object, `b`: object): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:194](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L194)*
**Parameters:**
▪ **a**: *object*
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
▪ **b**: *object*
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
**Returns:** *[Mat22](mat22.md)*
\+ **new Mat22**(): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:195](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L195)*
**Returns:** *[Mat22](mat22.md)*
## Properties
### ex
• **ex**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:210](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L210)*
___
### ey
• **ey**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:211](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L211)*
## Methods
### getInverse
▸ **getInverse**(): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:218](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L218)*
**Returns:** *[Mat22](mat22.md)*
___
### set
▸ **set**(`a`: [Mat22](mat22.md)): *void*
*Defined in [common/index.d.ts:213](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L213)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Mat22](mat22.md) |
**Returns:** *void*
▸ **set**(`a`: [Vec2](vec2.md), `b`: [Vec2](vec2.md)): *void*
*Defined in [common/index.d.ts:214](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L214)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Vec2](vec2.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *void*
▸ **set**(`a`: number, `b`: number, `c`: number, `d`: number): *void*
*Defined in [common/index.d.ts:215](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L215)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`b` | number |
`c` | number |
`d` | number |
**Returns:** *void*
___
### setIdentity
▸ **setIdentity**(): *void*
*Defined in [common/index.d.ts:216](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L216)*
**Returns:** *void*
___
### setZero
▸ **setZero**(): *void*
*Defined in [common/index.d.ts:217](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L217)*
**Returns:** *void*
___
### solve
▸ **solve**(`v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:219](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L219)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### toString
▸ **toString**(): *string*
*Defined in [common/index.d.ts:212](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L212)*
**Returns:** *string*
___
### `Static` abs
▸ **abs**(`mx`: [Mat22](mat22.md)): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:207](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L207)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
**Returns:** *[Mat22](mat22.md)*
___
### `Static` add
▸ **add**(`mx1`: [Mat22](mat22.md), `mx2`: [Mat22](mat22.md)): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:208](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L208)*
**Parameters:**
Name | Type |
------ | ------ |
`mx1` | [Mat22](mat22.md) |
`mx2` | [Mat22](mat22.md) |
**Returns:** *[Mat22](mat22.md)*
___
### `Static` assert
▸ **assert**(`o`: any): *void*
*Defined in [common/index.d.ts:199](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L199)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### `Static` isValid
▸ **isValid**(`o`: any): *boolean*
*Defined in [common/index.d.ts:198](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L198)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *boolean*
___
### `Static` mul
▸ **mul**(`mx`: [Mat22](mat22.md), `my`: [Mat22](mat22.md)): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:201](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L201)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
`my` | [Mat22](mat22.md) |
**Returns:** *[Mat22](mat22.md)*
▸ **mul**(`mx`: [Mat22](mat22.md), `v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:202](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L202)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulMat22
▸ **mulMat22**(`mx`: [Mat22](mat22.md), `my`: [Mat22](mat22.md)): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:204](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L204)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
`my` | [Mat22](mat22.md) |
**Returns:** *[Mat22](mat22.md)*
___
### `Static` mulT
▸ **mulT**(`mx`: [Mat22](mat22.md), `my`: [Mat22](mat22.md)): *[Mat22](mat22.md)*
*Defined in [common/index.d.ts:205](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L205)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
`my` | [Mat22](mat22.md) |
**Returns:** *[Mat22](mat22.md)*
▸ **mulT**(`mx`: [Mat22](mat22.md), `v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:206](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L206)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulVec2
▸ **mulVec2**(`mx`: [Mat22](mat22.md), `v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:203](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L203)*
**Parameters:**
Name | Type |
------ | ------ |
`mx` | [Mat22](mat22.md) |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*

View File

@ -1,293 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Mat33](mat33.md)
# Class: Mat33
## Hierarchy
* **Mat33**
## Index
### Constructors
* [constructor](mat33.md#constructor)
### Properties
* [ex](mat33.md#ex)
* [ey](mat33.md#ey)
* [ez](mat33.md#ez)
### Methods
* [getInverse22](mat33.md#getinverse22)
* [getSymInverse33](mat33.md#getsyminverse33)
* [setZero](mat33.md#setzero)
* [solve22](mat33.md#solve22)
* [solve33](mat33.md#solve33)
* [toString](mat33.md#tostring)
* [add](mat33.md#static-add)
* [assert](mat33.md#static-assert)
* [isValid](mat33.md#static-isvalid)
* [mul](mat33.md#static-mul)
* [mulVec2](mat33.md#static-mulvec2)
* [mulVec3](mat33.md#static-mulvec3)
## Constructors
### constructor
\+ **new Mat33**(`a`: [Vec3](vec3.md), `b`: [Vec3](vec3.md), `c`: [Vec3](vec3.md)): *[Mat33](mat33.md)*
*Defined in [common/index.d.ts:222](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L222)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Vec3](vec3.md) |
`b` | [Vec3](vec3.md) |
`c` | [Vec3](vec3.md) |
**Returns:** *[Mat33](mat33.md)*
\+ **new Mat33**(`a`: any, `b`: any, `c`: any): *[Mat33](mat33.md)*
*Defined in [common/index.d.ts:223](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L223)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | any |
`b` | any |
`c` | any |
**Returns:** *[Mat33](mat33.md)*
\+ **new Mat33**(): *[Mat33](mat33.md)*
*Defined in [common/index.d.ts:224](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L224)*
**Returns:** *[Mat33](mat33.md)*
## Properties
### ex
• **ex**: *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:236](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L236)*
___
### ey
• **ey**: *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:237](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L237)*
___
### ez
• **ez**: *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:238](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L238)*
## Methods
### getInverse22
▸ **getInverse22**(`M`: [Mat33](mat33.md)): *void*
*Defined in [common/index.d.ts:244](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L244)*
**Parameters:**
Name | Type |
------ | ------ |
`M` | [Mat33](mat33.md) |
**Returns:** *void*
___
### getSymInverse33
▸ **getSymInverse33**(`M`: [Mat33](mat33.md)): *void*
*Defined in [common/index.d.ts:245](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L245)*
**Parameters:**
Name | Type |
------ | ------ |
`M` | [Mat33](mat33.md) |
**Returns:** *void*
___
### setZero
▸ **setZero**(): *[Mat33](mat33.md)*
*Defined in [common/index.d.ts:241](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L241)*
**Returns:** *[Mat33](mat33.md)*
___
### solve22
▸ **solve22**(`v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:243](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L243)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### solve33
▸ **solve33**(`v`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:242](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L242)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### toString
▸ **toString**(): *string*
*Defined in [common/index.d.ts:240](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L240)*
**Returns:** *string*
___
### `Static` add
▸ **add**(`a`: [Mat33](mat33.md), `b`: [Mat33](mat33.md)): *[Mat33](mat33.md)*
*Defined in [common/index.d.ts:234](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L234)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Mat33](mat33.md) |
`b` | [Mat33](mat33.md) |
**Returns:** *[Mat33](mat33.md)*
___
### `Static` assert
▸ **assert**(`o`: any): *void*
*Defined in [common/index.d.ts:228](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L228)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### `Static` isValid
▸ **isValid**(`o`: any): *boolean*
*Defined in [common/index.d.ts:227](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L227)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *boolean*
___
### `Static` mul
▸ **mul**(`a`: [Mat33](mat33.md), `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:230](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L230)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Mat33](mat33.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
▸ **mul**(`a`: [Mat33](mat33.md), `b`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:231](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L231)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Mat33](mat33.md) |
`b` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### `Static` mulVec2
▸ **mulVec2**(`a`: [Mat33](mat33.md), `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:233](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L233)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Mat33](mat33.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulVec3
▸ **mulVec3**(`a`: [Mat33](mat33.md), `b`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:232](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L232)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Mat33](mat33.md) |
`b` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*

View File

@ -1,193 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Math](math.md)
# Class: Math
## Hierarchy
* **Math**
## Index
### Properties
* [EPSILON](math.md#readonly-epsilon)
### Methods
* [assert](math.md#static-assert)
* [clamp](math.md#static-clamp)
* [invSqrt](math.md#static-invsqrt)
* [isFinite](math.md#static-isfinite)
* [isPowerOfTwo](math.md#static-ispoweroftwo)
* [mod](math.md#static-mod)
* [nextPowerOfTwo](math.md#static-nextpoweroftwo)
* [random](math.md#static-random)
## Properties
### `Readonly` EPSILON
• **EPSILON**: *number*
*Defined in [common/index.d.ts:2](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L2)*
## Methods
### `Static` assert
▸ **assert**(`x`: any): *void*
*Defined in [common/index.d.ts:8](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L8)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | any |
**Returns:** *void*
___
### `Static` clamp
▸ **clamp**(`num`: number, `min`: number, `max`: number): *number*
*Defined in [common/index.d.ts:14](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L14)*
**Parameters:**
Name | Type |
------ | ------ |
`num` | number |
`min` | number |
`max` | number |
**Returns:** *number*
___
### `Static` invSqrt
▸ **invSqrt**(`x`: number): *number*
*Defined in [common/index.d.ts:9](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L9)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
**Returns:** *number*
___
### `Static` isFinite
▸ **isFinite**(`x`: any): *boolean*
*Defined in [common/index.d.ts:7](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L7)*
This function is used to ensure that a floating point number is not a NaN or
infinity.
**Parameters:**
Name | Type |
------ | ------ |
`x` | any |
**Returns:** *boolean*
___
### `Static` isPowerOfTwo
▸ **isPowerOfTwo**(`x`: number): *boolean*
*Defined in [common/index.d.ts:11](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L11)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
**Returns:** *boolean*
___
### `Static` mod
▸ **mod**(`num`: number, `min`: number, `max`: number): *number*
*Defined in [common/index.d.ts:12](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L12)*
**Parameters:**
Name | Type |
------ | ------ |
`num` | number |
`min` | number |
`max` | number |
**Returns:** *number*
▸ **mod**(`num`: number, `max?`: number): *number*
*Defined in [common/index.d.ts:13](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L13)*
**Parameters:**
Name | Type |
------ | ------ |
`num` | number |
`max?` | number |
**Returns:** *number*
___
### `Static` nextPowerOfTwo
▸ **nextPowerOfTwo**(`x`: number): *number*
*Defined in [common/index.d.ts:10](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L10)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
**Returns:** *number*
___
### `Static` random
▸ **random**(`min`: number, `max`: number): *number*
*Defined in [common/index.d.ts:15](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L15)*
**Parameters:**
Name | Type |
------ | ------ |
`min` | number |
`max` | number |
**Returns:** *number*
▸ **random**(`max?`: number): *number*
*Defined in [common/index.d.ts:16](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L16)*
**Parameters:**
Name | Type |
------ | ------ |
`max?` | number |
**Returns:** *number*

View File

@ -1,228 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [MotorJoint](motorjoint.md)
# Class: MotorJoint
## Hierarchy
* any
↳ **MotorJoint**
## Callable
▸ **MotorJoint**(`def`: [MotorJointDef](../interfaces/motorjointdef.md)): *[MotorJoint](motorjoint.md)*
*Defined in [joint/index.d.ts:206](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L206)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MotorJointDef](../interfaces/motorjointdef.md) |
**Returns:** *[MotorJoint](motorjoint.md)*
▸ **MotorJoint**(`def`: [MotorJointOpt](../interfaces/motorjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md)): *[MotorJoint](motorjoint.md)*
*Defined in [joint/index.d.ts:207](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L207)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MotorJointOpt](../interfaces/motorjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
**Returns:** *[MotorJoint](motorjoint.md)*
## Index
### Constructors
* [constructor](motorjoint.md#constructor)
### Properties
* [TYPE](motorjoint.md#static-type)
### Methods
* [getAngularOffset](motorjoint.md#getangularoffset)
* [getCorrectionFactor](motorjoint.md#getcorrectionfactor)
* [getLinearOffset](motorjoint.md#getlinearoffset)
* [getMaxForce](motorjoint.md#getmaxforce)
* [getMaxTorque](motorjoint.md#getmaxtorque)
* [setAngularOffset](motorjoint.md#setangularoffset)
* [setCorrectionFactor](motorjoint.md#setcorrectionfactor)
* [setLinearOffset](motorjoint.md#setlinearoffset)
* [setMaxForce](motorjoint.md#setmaxforce)
* [setMaxTorque](motorjoint.md#setmaxtorque)
## Constructors
### constructor
\+ **new MotorJoint**(`def`: [MotorJointDef](../interfaces/motorjointdef.md)): *[MotorJoint](motorjoint.md)*
*Defined in [joint/index.d.ts:209](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L209)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MotorJointDef](../interfaces/motorjointdef.md) |
**Returns:** *[MotorJoint](motorjoint.md)*
\+ **new MotorJoint**(`def`: [MotorJointOpt](../interfaces/motorjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md)): *[MotorJoint](motorjoint.md)*
*Defined in [joint/index.d.ts:211](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L211)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MotorJointOpt](../interfaces/motorjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
**Returns:** *[MotorJoint](motorjoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"motor-joint"*
*Defined in [joint/index.d.ts:209](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L209)*
## Methods
### getAngularOffset
▸ **getAngularOffset**(): *number*
*Defined in [joint/index.d.ts:245](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L245)*
**Returns:** *number*
___
### getCorrectionFactor
▸ **getCorrectionFactor**(): *number*
*Defined in [joint/index.d.ts:241](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L241)*
**Returns:** *number*
___
### getLinearOffset
▸ **getLinearOffset**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:243](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L243)*
**Returns:** *[Vec2](vec2.md)*
___
### getMaxForce
▸ **getMaxForce**(): *number*
*Defined in [joint/index.d.ts:237](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L237)*
**Returns:** *number*
___
### getMaxTorque
▸ **getMaxTorque**(): *number*
*Defined in [joint/index.d.ts:239](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L239)*
**Returns:** *number*
___
### setAngularOffset
▸ **setAngularOffset**(`angularOffset`: number): *void*
*Defined in [joint/index.d.ts:244](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L244)*
**Parameters:**
Name | Type |
------ | ------ |
`angularOffset` | number |
**Returns:** *void*
___
### setCorrectionFactor
▸ **setCorrectionFactor**(`factor`: number): *void*
*Defined in [joint/index.d.ts:240](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L240)*
**Parameters:**
Name | Type |
------ | ------ |
`factor` | number |
**Returns:** *void*
___
### setLinearOffset
▸ **setLinearOffset**(`linearOffset`: [Vec2](vec2.md)): *void*
*Defined in [joint/index.d.ts:242](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L242)*
**Parameters:**
Name | Type |
------ | ------ |
`linearOffset` | [Vec2](vec2.md) |
**Returns:** *void*
___
### setMaxForce
▸ **setMaxForce**(`force`: number): *void*
*Defined in [joint/index.d.ts:236](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L236)*
**Parameters:**
Name | Type |
------ | ------ |
`force` | number |
**Returns:** *void*
___
### setMaxTorque
▸ **setMaxTorque**(`torque`: number): *void*
*Defined in [joint/index.d.ts:238](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L238)*
**Parameters:**
Name | Type |
------ | ------ |
`torque` | number |
**Returns:** *void*

View File

@ -1,202 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [MouseJoint](mousejoint.md)
# Class: MouseJoint
## Hierarchy
* any
↳ **MouseJoint**
## Callable
▸ **MouseJoint**(`def`: [MouseJointDef](../interfaces/mousejointdef.md)): *[MouseJoint](mousejoint.md)*
*Defined in [joint/index.d.ts:258](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L258)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MouseJointDef](../interfaces/mousejointdef.md) |
**Returns:** *[MouseJoint](mousejoint.md)*
▸ **MouseJoint**(`def`: [MouseJointOpt](../interfaces/mousejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `target`: [Vec2](vec2.md)): *[MouseJoint](mousejoint.md)*
*Defined in [joint/index.d.ts:259](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L259)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MouseJointOpt](../interfaces/mousejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`target` | [Vec2](vec2.md) |
**Returns:** *[MouseJoint](mousejoint.md)*
## Index
### Constructors
* [constructor](mousejoint.md#constructor)
### Properties
* [TYPE](mousejoint.md#static-type)
### Methods
* [getDampingRatio](mousejoint.md#getdampingratio)
* [getFrequency](mousejoint.md#getfrequency)
* [getMaxForce](mousejoint.md#getmaxforce)
* [getTarget](mousejoint.md#gettarget)
* [setDampingRatio](mousejoint.md#setdampingratio)
* [setFrequency](mousejoint.md#setfrequency)
* [setMaxForce](mousejoint.md#setmaxforce)
* [setTarget](mousejoint.md#settarget)
## Constructors
### constructor
\+ **new MouseJoint**(`def`: [MouseJointDef](../interfaces/mousejointdef.md)): *[MouseJoint](mousejoint.md)*
*Defined in [joint/index.d.ts:261](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L261)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MouseJointDef](../interfaces/mousejointdef.md) |
**Returns:** *[MouseJoint](mousejoint.md)*
\+ **new MouseJoint**(`def`: [MouseJointOpt](../interfaces/mousejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `target`: [Vec2](vec2.md)): *[MouseJoint](mousejoint.md)*
*Defined in [joint/index.d.ts:263](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L263)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [MouseJointOpt](../interfaces/mousejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`target` | [Vec2](vec2.md) |
**Returns:** *[MouseJoint](mousejoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"mouse-joint"*
*Defined in [joint/index.d.ts:261](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L261)*
## Methods
### getDampingRatio
▸ **getDampingRatio**(): *number*
*Defined in [joint/index.d.ts:290](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L290)*
**Returns:** *number*
___
### getFrequency
▸ **getFrequency**(): *number*
*Defined in [joint/index.d.ts:288](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L288)*
**Returns:** *number*
___
### getMaxForce
▸ **getMaxForce**(): *number*
*Defined in [joint/index.d.ts:286](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L286)*
**Returns:** *number*
___
### getTarget
▸ **getTarget**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:284](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L284)*
**Returns:** *[Vec2](vec2.md)*
___
### setDampingRatio
▸ **setDampingRatio**(`ratio`: number): *void*
*Defined in [joint/index.d.ts:289](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L289)*
**Parameters:**
Name | Type |
------ | ------ |
`ratio` | number |
**Returns:** *void*
___
### setFrequency
▸ **setFrequency**(`hz`: number): *void*
*Defined in [joint/index.d.ts:287](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L287)*
**Parameters:**
Name | Type |
------ | ------ |
`hz` | number |
**Returns:** *void*
___
### setMaxForce
▸ **setMaxForce**(`force`: number): *void*
*Defined in [joint/index.d.ts:285](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L285)*
**Parameters:**
Name | Type |
------ | ------ |
`force` | number |
**Returns:** *void*
___
### setTarget
▸ **setTarget**(`target`: [Vec2](vec2.md)): *void*
*Defined in [joint/index.d.ts:283](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L283)*
**Parameters:**
Name | Type |
------ | ------ |
`target` | [Vec2](vec2.md) |
**Returns:** *void*

View File

@ -1,88 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [PolygonShape](polygonshape.md)
# Class: PolygonShape
## Hierarchy
* any
↳ **PolygonShape**
## Callable
▸ **PolygonShape**(`vertices`: [Vec2](vec2.md)[]): *[PolygonShape](polygonshape.md)*
*Defined in [shape/index.d.ts:58](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L58)*
**Parameters:**
Name | Type |
------ | ------ |
`vertices` | [Vec2](vec2.md)[] |
**Returns:** *[PolygonShape](polygonshape.md)*
## Index
### Constructors
* [constructor](polygonshape.md#constructor)
### Properties
* [TYPE](polygonshape.md#static-type)
### Methods
* [getVertex](polygonshape.md#getvertex)
* [validate](polygonshape.md#validate)
## Constructors
### constructor
\+ **new PolygonShape**(`vertices`: [Vec2](vec2.md)[]): *[PolygonShape](polygonshape.md)*
*Defined in [shape/index.d.ts:60](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L60)*
**Parameters:**
Name | Type |
------ | ------ |
`vertices` | [Vec2](vec2.md)[] |
**Returns:** *[PolygonShape](polygonshape.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"polygon"*
*Defined in [shape/index.d.ts:60](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L60)*
## Methods
### getVertex
▸ **getVertex**(`index`: number): *[Vec2](vec2.md)*
*Defined in [shape/index.d.ts:70](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L70)*
**Parameters:**
Name | Type |
------ | ------ |
`index` | number |
**Returns:** *[Vec2](vec2.md)*
___
### validate
▸ **validate**(): *void*
*Defined in [shape/index.d.ts:71](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L71)*
**Returns:** *void*

View File

@ -1,51 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Position](position.md)
# Class: Position
## Hierarchy
* **Position**
## Index
### Properties
* [a](position.md#a)
* [c](position.md#c)
### Methods
* [getTransform](position.md#gettransform)
## Properties
### a
• **a**: *number*
*Defined in [common/index.d.ts:26](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L26)*
___
### c
• **c**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:25](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L25)*
## Methods
### getTransform
▸ **getTransform**(`xf`: [Transform](transform.md), `p`: [Vec2](vec2.md)): *[Transform](transform.md)*
*Defined in [common/index.d.ts:27](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L27)*
**Parameters:**
Name | Type |
------ | ------ |
`xf` | [Transform](transform.md) |
`p` | [Vec2](vec2.md) |
**Returns:** *[Transform](transform.md)*

View File

@ -1,316 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [PrismaticJoint](prismaticjoint.md)
# Class: PrismaticJoint
## Hierarchy
* any
↳ **PrismaticJoint**
## Callable
▸ **PrismaticJoint**(`def`: [PrismaticJointDef](../interfaces/prismaticjointdef.md)): *[PrismaticJoint](prismaticjoint.md)*
*Defined in [joint/index.d.ts:303](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L303)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PrismaticJointDef](../interfaces/prismaticjointdef.md) |
**Returns:** *[PrismaticJoint](prismaticjoint.md)*
▸ **PrismaticJoint**(`def`: [PrismaticJointOpt](../interfaces/prismaticjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md), `axis`: [Vec2](vec2.md)): *[PrismaticJoint](prismaticjoint.md)*
*Defined in [joint/index.d.ts:304](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L304)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PrismaticJointOpt](../interfaces/prismaticjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
`axis` | [Vec2](vec2.md) |
**Returns:** *[PrismaticJoint](prismaticjoint.md)*
## Index
### Constructors
* [constructor](prismaticjoint.md#constructor)
### Properties
* [TYPE](prismaticjoint.md#static-type)
### Methods
* [enableLimit](prismaticjoint.md#enablelimit)
* [enableMotor](prismaticjoint.md#enablemotor)
* [getJointSpeed](prismaticjoint.md#getjointspeed)
* [getJointTranslation](prismaticjoint.md#getjointtranslation)
* [getLocalAnchorA](prismaticjoint.md#getlocalanchora)
* [getLocalAnchorB](prismaticjoint.md#getlocalanchorb)
* [getLocalAxisA](prismaticjoint.md#getlocalaxisa)
* [getLowerLimit](prismaticjoint.md#getlowerlimit)
* [getMotorForce](prismaticjoint.md#getmotorforce)
* [getMotorSpeed](prismaticjoint.md#getmotorspeed)
* [getReferenceAngle](prismaticjoint.md#getreferenceangle)
* [getUpperLimit](prismaticjoint.md#getupperlimit)
* [isLimitEnabled](prismaticjoint.md#islimitenabled)
* [isMotorEnabled](prismaticjoint.md#ismotorenabled)
* [setLimits](prismaticjoint.md#setlimits)
* [setMaxMotorForce](prismaticjoint.md#setmaxmotorforce)
* [setMotorSpeed](prismaticjoint.md#setmotorspeed)
## Constructors
### constructor
\+ **new PrismaticJoint**(`def`: [PrismaticJointDef](../interfaces/prismaticjointdef.md)): *[PrismaticJoint](prismaticjoint.md)*
*Defined in [joint/index.d.ts:306](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L306)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PrismaticJointDef](../interfaces/prismaticjointdef.md) |
**Returns:** *[PrismaticJoint](prismaticjoint.md)*
\+ **new PrismaticJoint**(`def`: [PrismaticJointOpt](../interfaces/prismaticjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md), `axis`: [Vec2](vec2.md)): *[PrismaticJoint](prismaticjoint.md)*
*Defined in [joint/index.d.ts:308](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L308)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PrismaticJointOpt](../interfaces/prismaticjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
`axis` | [Vec2](vec2.md) |
**Returns:** *[PrismaticJoint](prismaticjoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"prismatic-joint"*
*Defined in [joint/index.d.ts:306](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L306)*
## Methods
### enableLimit
▸ **enableLimit**(`flag`: boolean): *void*
*Defined in [joint/index.d.ts:349](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L349)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### enableMotor
▸ **enableMotor**(`flag`: boolean): *void*
*Defined in [joint/index.d.ts:354](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L354)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### getJointSpeed
▸ **getJointSpeed**(): *number*
*Defined in [joint/index.d.ts:347](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L347)*
**Returns:** *number*
___
### getJointTranslation
▸ **getJointTranslation**(): *number*
*Defined in [joint/index.d.ts:346](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L346)*
**Returns:** *number*
___
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:342](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L342)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:343](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L343)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAxisA
▸ **getLocalAxisA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:344](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L344)*
**Returns:** *[Vec2](vec2.md)*
___
### getLowerLimit
▸ **getLowerLimit**(): *number*
*Defined in [joint/index.d.ts:350](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L350)*
**Returns:** *number*
___
### getMotorForce
▸ **getMotorForce**(`inv_dt`: number): *number*
*Defined in [joint/index.d.ts:358](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L358)*
**Parameters:**
Name | Type |
------ | ------ |
`inv_dt` | number |
**Returns:** *number*
___
### getMotorSpeed
▸ **getMotorSpeed**(): *number*
*Defined in [joint/index.d.ts:357](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L357)*
**Returns:** *number*
___
### getReferenceAngle
▸ **getReferenceAngle**(): *number*
*Defined in [joint/index.d.ts:345](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L345)*
**Returns:** *number*
___
### getUpperLimit
▸ **getUpperLimit**(): *number*
*Defined in [joint/index.d.ts:351](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L351)*
**Returns:** *number*
___
### isLimitEnabled
▸ **isLimitEnabled**(): *boolean*
*Defined in [joint/index.d.ts:348](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L348)*
**Returns:** *boolean*
___
### isMotorEnabled
▸ **isMotorEnabled**(): *boolean*
*Defined in [joint/index.d.ts:353](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L353)*
**Returns:** *boolean*
___
### setLimits
▸ **setLimits**(`lower`: number, `upper`: number): *void*
*Defined in [joint/index.d.ts:352](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L352)*
**Parameters:**
Name | Type |
------ | ------ |
`lower` | number |
`upper` | number |
**Returns:** *void*
___
### setMaxMotorForce
▸ **setMaxMotorForce**(`force`: number): *void*
*Defined in [joint/index.d.ts:356](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L356)*
**Parameters:**
Name | Type |
------ | ------ |
`force` | number |
**Returns:** *void*
___
### setMotorSpeed
▸ **setMotorSpeed**(`speed`: number): *void*
*Defined in [joint/index.d.ts:355](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L355)*
**Parameters:**
Name | Type |
------ | ------ |
`speed` | number |
**Returns:** *void*

View File

@ -1,184 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [PulleyJoint](pulleyjoint.md)
# Class: PulleyJoint
## Hierarchy
* any
↳ **PulleyJoint**
## Callable
▸ **PulleyJoint**(`def`: [PulleyJointDef](../interfaces/pulleyjointdef.md)): *[PulleyJoint](pulleyjoint.md)*
*Defined in [joint/index.d.ts:377](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L377)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PulleyJointDef](../interfaces/pulleyjointdef.md) |
**Returns:** *[PulleyJoint](pulleyjoint.md)*
▸ **PulleyJoint**(`def`: [PulleyJointOpt](../interfaces/pulleyjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `groundA`: [Vec2](vec2.md), `groundB`: [Vec2](vec2.md), `anchorA`: [Vec2](vec2.md), `anchorB`: [Vec2](vec2.md), `ratio`: number): *[PulleyJoint](pulleyjoint.md)*
*Defined in [joint/index.d.ts:378](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L378)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PulleyJointOpt](../interfaces/pulleyjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`groundA` | [Vec2](vec2.md) |
`groundB` | [Vec2](vec2.md) |
`anchorA` | [Vec2](vec2.md) |
`anchorB` | [Vec2](vec2.md) |
`ratio` | number |
**Returns:** *[PulleyJoint](pulleyjoint.md)*
## Index
### Constructors
* [constructor](pulleyjoint.md#constructor)
### Properties
* [MIN_PULLEY_LENGTH](pulleyjoint.md#static-min_pulley_length)
* [TYPE](pulleyjoint.md#static-type)
### Methods
* [getCurrentLengthA](pulleyjoint.md#getcurrentlengtha)
* [getCurrentLengthB](pulleyjoint.md#getcurrentlengthb)
* [getGroundAnchorA](pulleyjoint.md#getgroundanchora)
* [getGroundAnchorB](pulleyjoint.md#getgroundanchorb)
* [getLengthA](pulleyjoint.md#getlengtha)
* [getLengthB](pulleyjoint.md#getlengthb)
* [getRatio](pulleyjoint.md#getratio)
## Constructors
### constructor
\+ **new PulleyJoint**(`def`: [PulleyJointDef](../interfaces/pulleyjointdef.md)): *[PulleyJoint](pulleyjoint.md)*
*Defined in [joint/index.d.ts:381](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L381)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PulleyJointDef](../interfaces/pulleyjointdef.md) |
**Returns:** *[PulleyJoint](pulleyjoint.md)*
\+ **new PulleyJoint**(`def`: [PulleyJointOpt](../interfaces/pulleyjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `groundA`: [Vec2](vec2.md), `groundB`: [Vec2](vec2.md), `anchorA`: [Vec2](vec2.md), `anchorB`: [Vec2](vec2.md), `ratio`: number): *[PulleyJoint](pulleyjoint.md)*
*Defined in [joint/index.d.ts:383](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L383)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [PulleyJointOpt](../interfaces/pulleyjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`groundA` | [Vec2](vec2.md) |
`groundB` | [Vec2](vec2.md) |
`anchorA` | [Vec2](vec2.md) |
`anchorB` | [Vec2](vec2.md) |
`ratio` | number |
**Returns:** *[PulleyJoint](pulleyjoint.md)*
## Properties
### `Static` MIN_PULLEY_LENGTH
▪ **MIN_PULLEY_LENGTH**: *number*
*Defined in [joint/index.d.ts:381](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L381)*
___
### `Static` TYPE
▪ **TYPE**: *"pulley-joint"*
*Defined in [joint/index.d.ts:380](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L380)*
## Methods
### getCurrentLengthA
▸ **getCurrentLengthA**(): *number*
*Defined in [joint/index.d.ts:414](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L414)*
**Returns:** *number*
___
### getCurrentLengthB
▸ **getCurrentLengthB**(): *number*
*Defined in [joint/index.d.ts:415](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L415)*
**Returns:** *number*
___
### getGroundAnchorA
▸ **getGroundAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:409](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L409)*
**Returns:** *[Vec2](vec2.md)*
___
### getGroundAnchorB
▸ **getGroundAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:410](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L410)*
**Returns:** *[Vec2](vec2.md)*
___
### getLengthA
▸ **getLengthA**(): *number*
*Defined in [joint/index.d.ts:411](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L411)*
**Returns:** *number*
___
### getLengthB
▸ **getLengthB**(): *number*
*Defined in [joint/index.d.ts:412](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L412)*
**Returns:** *number*
___
### getRatio
▸ **getRatio**(): *number*
*Defined in [joint/index.d.ts:413](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L413)*
**Returns:** *number*

View File

@ -1,314 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [RevoluteJoint](revolutejoint.md)
# Class: RevoluteJoint
## Hierarchy
* any
↳ **RevoluteJoint**
## Callable
▸ **RevoluteJoint**(`def`: [RevoluteJointDef](../interfaces/revolutejointdef.md)): *[RevoluteJoint](revolutejoint.md)*
*Defined in [joint/index.d.ts:432](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L432)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RevoluteJointDef](../interfaces/revolutejointdef.md) |
**Returns:** *[RevoluteJoint](revolutejoint.md)*
▸ **RevoluteJoint**(`def`: [RevoluteJointOpt](../interfaces/revolutejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[RevoluteJoint](revolutejoint.md)*
*Defined in [joint/index.d.ts:433](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L433)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RevoluteJointOpt](../interfaces/revolutejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[RevoluteJoint](revolutejoint.md)*
## Index
### Constructors
* [constructor](revolutejoint.md#constructor)
### Properties
* [TYPE](revolutejoint.md#static-type)
### Methods
* [enableLimit](revolutejoint.md#enablelimit)
* [enableMotor](revolutejoint.md#enablemotor)
* [getJointAngle](revolutejoint.md#getjointangle)
* [getJointSpeed](revolutejoint.md#getjointspeed)
* [getLocalAnchorA](revolutejoint.md#getlocalanchora)
* [getLocalAnchorB](revolutejoint.md#getlocalanchorb)
* [getLowerLimit](revolutejoint.md#getlowerlimit)
* [getMaxMotorTorque](revolutejoint.md#getmaxmotortorque)
* [getMotorSpeed](revolutejoint.md#getmotorspeed)
* [getMotorTorque](revolutejoint.md#getmotortorque)
* [getReferenceAngle](revolutejoint.md#getreferenceangle)
* [getUpperLimit](revolutejoint.md#getupperlimit)
* [isLimitEnabled](revolutejoint.md#islimitenabled)
* [isMotorEnabled](revolutejoint.md#ismotorenabled)
* [setLimits](revolutejoint.md#setlimits)
* [setMaxMotorTorque](revolutejoint.md#setmaxmotortorque)
* [setMotorSpeed](revolutejoint.md#setmotorspeed)
## Constructors
### constructor
\+ **new RevoluteJoint**(`def`: [RevoluteJointDef](../interfaces/revolutejointdef.md)): *[RevoluteJoint](revolutejoint.md)*
*Defined in [joint/index.d.ts:435](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L435)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RevoluteJointDef](../interfaces/revolutejointdef.md) |
**Returns:** *[RevoluteJoint](revolutejoint.md)*
\+ **new RevoluteJoint**(`def`: [RevoluteJointOpt](../interfaces/revolutejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[RevoluteJoint](revolutejoint.md)*
*Defined in [joint/index.d.ts:437](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L437)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RevoluteJointOpt](../interfaces/revolutejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[RevoluteJoint](revolutejoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"revolute-joint"*
*Defined in [joint/index.d.ts:435](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L435)*
## Methods
### enableLimit
▸ **enableLimit**(`flag`: boolean): *void*
*Defined in [joint/index.d.ts:481](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L481)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### enableMotor
▸ **enableMotor**(`flag`: boolean): *void*
*Defined in [joint/index.d.ts:474](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L474)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### getJointAngle
▸ **getJointAngle**(): *number*
*Defined in [joint/index.d.ts:471](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L471)*
**Returns:** *number*
___
### getJointSpeed
▸ **getJointSpeed**(): *number*
*Defined in [joint/index.d.ts:472](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L472)*
**Returns:** *number*
___
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:468](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L468)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:469](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L469)*
**Returns:** *[Vec2](vec2.md)*
___
### getLowerLimit
▸ **getLowerLimit**(): *number*
*Defined in [joint/index.d.ts:482](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L482)*
**Returns:** *number*
___
### getMaxMotorTorque
▸ **getMaxMotorTorque**(): *number*
*Defined in [joint/index.d.ts:479](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L479)*
**Returns:** *number*
___
### getMotorSpeed
▸ **getMotorSpeed**(): *number*
*Defined in [joint/index.d.ts:477](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L477)*
**Returns:** *number*
___
### getMotorTorque
▸ **getMotorTorque**(`inv_dt`: number): *number*
*Defined in [joint/index.d.ts:475](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L475)*
**Parameters:**
Name | Type |
------ | ------ |
`inv_dt` | number |
**Returns:** *number*
___
### getReferenceAngle
▸ **getReferenceAngle**(): *number*
*Defined in [joint/index.d.ts:470](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L470)*
**Returns:** *number*
___
### getUpperLimit
▸ **getUpperLimit**(): *number*
*Defined in [joint/index.d.ts:483](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L483)*
**Returns:** *number*
___
### isLimitEnabled
▸ **isLimitEnabled**(): *boolean*
*Defined in [joint/index.d.ts:480](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L480)*
**Returns:** *boolean*
___
### isMotorEnabled
▸ **isMotorEnabled**(): *boolean*
*Defined in [joint/index.d.ts:473](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L473)*
**Returns:** *boolean*
___
### setLimits
▸ **setLimits**(`lower`: number, `upper`: number): *void*
*Defined in [joint/index.d.ts:484](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L484)*
**Parameters:**
Name | Type |
------ | ------ |
`lower` | number |
`upper` | number |
**Returns:** *void*
___
### setMaxMotorTorque
▸ **setMaxMotorTorque**(`torque`: number): *void*
*Defined in [joint/index.d.ts:478](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L478)*
**Parameters:**
Name | Type |
------ | ------ |
`torque` | number |
**Returns:** *void*
___
### setMotorSpeed
▸ **setMotorSpeed**(`speed`: number): *void*
*Defined in [joint/index.d.ts:476](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L476)*
**Parameters:**
Name | Type |
------ | ------ |
`speed` | number |
**Returns:** *void*

View File

@ -1,151 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [RopeJoint](ropejoint.md)
# Class: RopeJoint
## Hierarchy
* any
↳ **RopeJoint**
## Callable
▸ **RopeJoint**(`def`: [RopeJointDef](../interfaces/ropejointdef.md)): *[RopeJoint](ropejoint.md)*
*Defined in [joint/index.d.ts:502](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L502)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RopeJointDef](../interfaces/ropejointdef.md) |
**Returns:** *[RopeJoint](ropejoint.md)*
▸ **RopeJoint**(`def`: [RopeJointOpt](../interfaces/ropejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[RopeJoint](ropejoint.md)*
*Defined in [joint/index.d.ts:503](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L503)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RopeJointOpt](../interfaces/ropejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[RopeJoint](ropejoint.md)*
## Index
### Constructors
* [constructor](ropejoint.md#constructor)
### Properties
* [TYPE](ropejoint.md#static-type)
### Methods
* [getLimitState](ropejoint.md#getlimitstate)
* [getLocalAnchorA](ropejoint.md#getlocalanchora)
* [getLocalAnchorB](ropejoint.md#getlocalanchorb)
* [getMaxLength](ropejoint.md#getmaxlength)
* [setMaxLength](ropejoint.md#setmaxlength)
## Constructors
### constructor
\+ **new RopeJoint**(`def`: [RopeJointDef](../interfaces/ropejointdef.md)): *[RopeJoint](ropejoint.md)*
*Defined in [joint/index.d.ts:505](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L505)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RopeJointDef](../interfaces/ropejointdef.md) |
**Returns:** *[RopeJoint](ropejoint.md)*
\+ **new RopeJoint**(`def`: [RopeJointOpt](../interfaces/ropejointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[RopeJoint](ropejoint.md)*
*Defined in [joint/index.d.ts:507](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L507)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [RopeJointOpt](../interfaces/ropejointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[RopeJoint](ropejoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"rope-joint"*
*Defined in [joint/index.d.ts:505](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L505)*
## Methods
### getLimitState
▸ **getLimitState**(): *[LIMIT_STATE](../enums/limit_state.md)*
*Defined in [joint/index.d.ts:535](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L535)*
**Returns:** *[LIMIT_STATE](../enums/limit_state.md)*
___
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:531](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L531)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:532](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L532)*
**Returns:** *[Vec2](vec2.md)*
___
### getMaxLength
▸ **getMaxLength**(): *number*
*Defined in [joint/index.d.ts:534](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L534)*
**Returns:** *number*
___
### setMaxLength
▸ **setMaxLength**(`length`: number): *void*
*Defined in [joint/index.d.ts:533](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L533)*
**Parameters:**
Name | Type |
------ | ------ |
`length` | number |
**Returns:** *void*

View File

@ -1,396 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Rot](rot.md)
# Class: Rot
## Hierarchy
* **Rot**
## Callable
▸ **Rot**(`angle`: number): *[Rot](rot.md)*
*Defined in [common/index.d.ts:159](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L159)*
**Parameters:**
Name | Type |
------ | ------ |
`angle` | number |
**Returns:** *[Rot](rot.md)*
▸ **Rot**(`rot`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:160](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L160)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
▸ **Rot**(): *[Rot](rot.md)*
*Defined in [common/index.d.ts:161](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L161)*
**Returns:** *[Rot](rot.md)*
## Index
### Constructors
* [constructor](rot.md#constructor)
### Properties
* [c](rot.md#c)
* [s](rot.md#s)
### Methods
* [getAngle](rot.md#getangle)
* [getXAxis](rot.md#getxaxis)
* [getYAxis](rot.md#getyaxis)
* [set](rot.md#set)
* [setAngle](rot.md#setangle)
* [setIdentity](rot.md#setidentity)
* [assert](rot.md#static-assert)
* [clone](rot.md#static-clone)
* [identity](rot.md#static-identity)
* [isValid](rot.md#static-isvalid)
* [mul](rot.md#static-mul)
* [mulRot](rot.md#static-mulrot)
* [mulSub](rot.md#static-mulsub)
* [mulT](rot.md#static-mult)
* [mulTRot](rot.md#static-multrot)
* [mulTVec2](rot.md#static-multvec2)
* [mulVec2](rot.md#static-mulvec2)
## Constructors
### constructor
\+ **new Rot**(`angle`: number): *[Rot](rot.md)*
*Defined in [common/index.d.ts:171](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L171)*
**Parameters:**
Name | Type |
------ | ------ |
`angle` | number |
**Returns:** *[Rot](rot.md)*
\+ **new Rot**(`rot`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:173](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L173)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
\+ **new Rot**(): *[Rot](rot.md)*
*Defined in [common/index.d.ts:174](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L174)*
**Returns:** *[Rot](rot.md)*
## Properties
### c
• **c**: *number*
*Defined in [common/index.d.ts:164](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L164)*
___
### s
• **s**: *number*
*Defined in [common/index.d.ts:163](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L163)*
## Methods
### getAngle
▸ **getAngle**(): *number*
*Defined in [common/index.d.ts:169](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L169)*
**Returns:** *number*
___
### getXAxis
▸ **getXAxis**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:170](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L170)*
**Returns:** *[Vec2](vec2.md)*
___
### getYAxis
▸ **getYAxis**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:171](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L171)*
**Returns:** *[Vec2](vec2.md)*
___
### set
▸ **set**(`angle`: number | [Rot](rot.md)): *void*
*Defined in [common/index.d.ts:167](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L167)*
**Parameters:**
Name | Type |
------ | ------ |
`angle` | number &#124; [Rot](rot.md) |
**Returns:** *void*
___
### setAngle
▸ **setAngle**(`angle`: number): *void*
*Defined in [common/index.d.ts:168](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L168)*
**Parameters:**
Name | Type |
------ | ------ |
`angle` | number |
**Returns:** *void*
___
### setIdentity
▸ **setIdentity**(): *void*
*Defined in [common/index.d.ts:166](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L166)*
**Returns:** *void*
___
### `Static` assert
▸ **assert**(`o`: any): *void*
*Defined in [common/index.d.ts:181](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L181)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### `Static` clone
▸ **clone**(`rot`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:178](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L178)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
___
### `Static` identity
▸ **identity**(): *[Rot](rot.md)*
*Defined in [common/index.d.ts:179](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L179)*
**Returns:** *[Rot](rot.md)*
___
### `Static` isValid
▸ **isValid**(`o`: any): *boolean*
*Defined in [common/index.d.ts:180](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L180)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *boolean*
___
### `Static` mul
▸ **mul**(`rot`: [Rot](rot.md), `m`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:182](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L182)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
▸ **mul**(`rot`: [Rot](rot.md), `m`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:183](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L183)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulRot
▸ **mulRot**(`rot`: [Rot](rot.md), `m`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:184](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L184)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
___
### `Static` mulSub
▸ **mulSub**(`rot`: [Rot](rot.md), `v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:186](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L186)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulT
▸ **mulT**(`rot`: [Rot](rot.md), `m`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:187](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L187)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
▸ **mulT**(`rot`: [Rot](rot.md), `m`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:188](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L188)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulTRot
▸ **mulTRot**(`rot`: [Rot](rot.md), `m`: [Rot](rot.md)): *[Rot](rot.md)*
*Defined in [common/index.d.ts:189](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L189)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Rot](rot.md) |
**Returns:** *[Rot](rot.md)*
___
### `Static` mulTVec2
▸ **mulTVec2**(`rot`: [Rot](rot.md), `m`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:190](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L190)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulVec2
▸ **mulVec2**(`rot`: [Rot](rot.md), `m`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:185](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L185)*
**Parameters:**
Name | Type |
------ | ------ |
`rot` | [Rot](rot.md) |
`m` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*

View File

@ -1,305 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Settings](settings.md)
# Class: Settings
Tuning constants based on meters-kilograms-seconds (MKS) units.
## Hierarchy
* **Settings**
## Index
### Properties
* [aabbExtension](settings.md#aabbextension)
* [aabbMultiplier](settings.md#aabbmultiplier)
* [angularSleepTolerance](settings.md#angularsleeptolerance)
* [angularSleepToleranceSqr](settings.md#angularsleeptolerancesqr)
* [angularSlop](settings.md#angularslop)
* [baumgarte](settings.md#baumgarte)
* [linearSleepTolerance](settings.md#linearsleeptolerance)
* [linearSleepToleranceSqr](settings.md#linearsleeptolerancesqr)
* [linearSlop](settings.md#linearslop)
* [linearSlopSquared](settings.md#linearslopsquared)
* [maxAngularCorrection](settings.md#maxangularcorrection)
* [maxDistnceIterations](settings.md#maxdistnceiterations)
* [maxLinearCorrection](settings.md#maxlinearcorrection)
* [maxManifoldPoints](settings.md#maxmanifoldpoints)
* [maxPolygonVertices](settings.md#maxpolygonvertices)
* [maxRotation](settings.md#maxrotation)
* [maxRotationSquared](settings.md#maxrotationsquared)
* [maxSubSteps](settings.md#maxsubsteps)
* [maxTOIContacts](settings.md#maxtoicontacts)
* [maxTOIIterations](settings.md#maxtoiiterations)
* [maxTranslation](settings.md#maxtranslation)
* [maxTranslationSquared](settings.md#maxtranslationsquared)
* [polygonRadius](settings.md#polygonradius)
* [timeToSleep](settings.md#timetosleep)
* [toiBaugarte](settings.md#toibaugarte)
* [velocityThreshold](settings.md#velocitythreshold)
## Properties
### aabbExtension
• **aabbExtension**: *number*
*Defined in [index.d.ts:553](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L553)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L560)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L661)*
A body cannot sleep if its angular velocity is above this tolerance.
___
### angularSleepToleranceSqr
• **angularSleepToleranceSqr**: *number*
*Defined in [index.d.ts:662](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L662)*
___
### angularSlop
• **angularSlop**: *number*
*Defined in [index.d.ts:573](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L573)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L642)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L655)*
A body cannot sleep if its linear velocity is above this tolerance.
___
### linearSleepToleranceSqr
• **linearSleepToleranceSqr**: *number*
*Defined in [index.d.ts:656](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L656)*
___
### linearSlop
• **linearSlop**: *number*
*Defined in [index.d.ts:566](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L566)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L567)*
___
### maxAngularCorrection
• **maxAngularCorrection**: *number*
*Defined in [index.d.ts:621](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L621)*
The maximum angular position correction used when solving constraints. This
helps to prevent overshoot.
___
### maxDistnceIterations
• **maxDistnceIterations**: *number*
*Defined in [index.d.ts:603](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L603)*
Maximum iterations to find Distance.
___
### maxLinearCorrection
• **maxLinearCorrection**: *number*
*Defined in [index.d.ts:615](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L615)*
The maximum linear position correction used when solving constraints. This
helps to prevent overshoot.
___
### maxManifoldPoints
• **maxManifoldPoints**: *number*
*Defined in [index.d.ts:541](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L541)*
The maximum number of contact points between two convex shapes. Do not change
this value.
___
### maxPolygonVertices
• **maxPolygonVertices**: *number*
*Defined in [index.d.ts:547](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L547)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L634)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L635)*
___
### maxSubSteps
• **maxSubSteps**: *number*
*Defined in [index.d.ts:586](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L586)*
Maximum number of sub-steps per contact in continuous physics simulation.
___
### maxTOIContacts
• **maxTOIContacts**: *number*
*Defined in [index.d.ts:593](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L593)*
Maximum number of contacts to be handled to solve a TOI impact.
___
### maxTOIIterations
• **maxTOIIterations**: *number*
*Defined in [index.d.ts:598](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L598)*
Maximum iterations to solve a TOI.
___
### maxTranslation
• **maxTranslation**: *number*
*Defined in [index.d.ts:627](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L627)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L628)*
___
### polygonRadius
• **polygonRadius**: *number*
*Defined in [index.d.ts:581](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L581)*
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](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L650)*
The time that a body must be still before it will go to sleep.
___
### toiBaugarte
• **toiBaugarte**: *number*
*Defined in [index.d.ts:643](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L643)*
___
### velocityThreshold
• **velocityThreshold**: *number*
*Defined in [index.d.ts:609](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L609)*
A velocity threshold for elastic collisions. Any collision with a relative
linear velocity below this threshold will be treated as inelastic.

View File

@ -1,154 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Shape](shape.md)
# Class: Shape
## Hierarchy
* **Shape**
## Index
### Methods
* [computeAABB](shape.md#computeaabb)
* [computeDistanceProxy](shape.md#computedistanceproxy)
* [computeMass](shape.md#computemass)
* [getChildCount](shape.md#getchildcount)
* [getRadius](shape.md#getradius)
* [getType](shape.md#gettype)
* [isValid](shape.md#isvalid)
* [rayCast](shape.md#raycast)
* [testPoint](shape.md#testpoint)
## Methods
### computeAABB
▸ **computeAABB**(`aabb`: [AABB](aabb.md), `xf`: [Transform](transform.md), `childIndex?`: number): *void*
*Defined in [shape/index.d.ts:18](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L18)*
**Parameters:**
Name | Type |
------ | ------ |
`aabb` | [AABB](aabb.md) |
`xf` | [Transform](transform.md) |
`childIndex?` | number |
**Returns:** *void*
___
### computeDistanceProxy
▸ **computeDistanceProxy**(`proxy`: [DistanceProxy](distanceproxy.md)): *void*
*Defined in [shape/index.d.ts:20](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L20)*
**Parameters:**
Name | Type |
------ | ------ |
`proxy` | [DistanceProxy](distanceproxy.md) |
**Returns:** *void*
___
### computeMass
▸ **computeMass**(`massData`: [MassData](../interfaces/massdata.md), `density?`: number): *void*
*Defined in [shape/index.d.ts:19](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L19)*
**Parameters:**
Name | Type |
------ | ------ |
`massData` | [MassData](../interfaces/massdata.md) |
`density?` | number |
**Returns:** *void*
___
### getChildCount
▸ **getChildCount**(): *number*
*Defined in [shape/index.d.ts:15](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L15)*
**Returns:** *number*
___
### getRadius
▸ **getRadius**(): *number*
*Defined in [shape/index.d.ts:13](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L13)*
**Returns:** *number*
___
### getType
▸ **getType**(): *[ShapeType](../globals.md#shapetype)*
*Defined in [shape/index.d.ts:14](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L14)*
**Returns:** *[ShapeType](../globals.md#shapetype)*
___
### isValid
▸ **isValid**(`shape`: any): *boolean*
*Defined in [shape/index.d.ts:12](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L12)*
**Parameters:**
Name | Type |
------ | ------ |
`shape` | any |
**Returns:** *boolean*
___
### rayCast
▸ **rayCast**(`output`: [RayCastOutput](../interfaces/raycastoutput.md), `input`: [RayCastInput](../interfaces/raycastinput.md), `xf`: [Transform](transform.md), `childIndex?`: number): *boolean*
*Defined in [shape/index.d.ts:17](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L17)*
**Parameters:**
Name | Type |
------ | ------ |
`output` | [RayCastOutput](../interfaces/raycastoutput.md) |
`input` | [RayCastInput](../interfaces/raycastinput.md) |
`xf` | [Transform](transform.md) |
`childIndex?` | number |
**Returns:** *boolean*
___
### testPoint
▸ **testPoint**(`xf`: [Transform](transform.md), `p`: [Vec2](vec2.md)): *false*
*Defined in [shape/index.d.ts:16](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L16)*
**Parameters:**
Name | Type |
------ | ------ |
`xf` | [Transform](transform.md) |
`p` | [Vec2](vec2.md) |
**Returns:** *false*

View File

@ -1,7 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Solver](solver.md)
# Class: Solver
## Hierarchy
* **Solver**

View File

@ -1,189 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Sweep](sweep.md)
# Class: Sweep
## Hierarchy
* **Sweep**
## Index
### Properties
* [a](sweep.md#a)
* [a0](sweep.md#a0)
* [alpha0](sweep.md#alpha0)
* [c](sweep.md#c)
* [c0](sweep.md#c0)
* [localCenter](sweep.md#localcenter)
### Methods
* [advance](sweep.md#advance)
* [clone](sweep.md#clone)
* [forward](sweep.md#forward)
* [getTransform](sweep.md#gettransform)
* [normalize](sweep.md#normalize)
* [set](sweep.md#set)
* [setLocalCenter](sweep.md#setlocalcenter)
* [setTransform](sweep.md#settransform)
## Properties
### a
• **a**: *number*
*Defined in [common/index.d.ts:251](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L251)*
___
### a0
• **a0**: *number*
*Defined in [common/index.d.ts:254](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L254)*
___
### alpha0
• **alpha0**: *number*
*Defined in [common/index.d.ts:252](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L252)*
___
### c
• **c**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:250](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L250)*
___
### c0
• **c0**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:253](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L253)*
___
### localCenter
• **localCenter**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:249](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L249)*
## Methods
### advance
▸ **advance**(`alpha`: number): *void*
*Defined in [common/index.d.ts:259](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L259)*
**Parameters:**
Name | Type |
------ | ------ |
`alpha` | number |
**Returns:** *void*
___
### clone
▸ **clone**(): *[Sweep](sweep.md)*
*Defined in [common/index.d.ts:262](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L262)*
**Returns:** *[Sweep](sweep.md)*
___
### forward
▸ **forward**(): *void*
*Defined in [common/index.d.ts:260](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L260)*
**Returns:** *void*
___
### getTransform
▸ **getTransform**(`xf`: [Transform](transform.md), `beta`: number): *void*
*Defined in [common/index.d.ts:258](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L258)*
**Parameters:**
Name | Type |
------ | ------ |
`xf` | [Transform](transform.md) |
`beta` | number |
**Returns:** *void*
___
### normalize
▸ **normalize**(): *void*
*Defined in [common/index.d.ts:261](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L261)*
**Returns:** *void*
___
### set
▸ **set**(`sweep`: [Sweep](sweep.md)): *void*
*Defined in [common/index.d.ts:263](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L263)*
**Parameters:**
Name | Type |
------ | ------ |
`sweep` | [Sweep](sweep.md) |
**Returns:** *void*
___
### setLocalCenter
▸ **setLocalCenter**(`localCenter`: [Vec2](vec2.md), `xf`: [Transform](transform.md)): *void*
*Defined in [common/index.d.ts:257](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L257)*
**Parameters:**
Name | Type |
------ | ------ |
`localCenter` | [Vec2](vec2.md) |
`xf` | [Transform](transform.md) |
**Returns:** *void*
___
### setTransform
▸ **setTransform**(`xf`: [Transform](transform.md)): *void*
*Defined in [common/index.d.ts:256](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L256)*
**Parameters:**
Name | Type |
------ | ------ |
`xf` | [Transform](transform.md) |
**Returns:** *void*

View File

@ -1,344 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Transform](transform.md)
# Class: Transform
## Hierarchy
* **Transform**
## Callable
▸ **Transform**(`position`: [Vec2](vec2.md), `rotation`: number): *[Transform](transform.md)*
*Defined in [common/index.d.ts:126](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L126)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`rotation` | number |
**Returns:** *[Transform](transform.md)*
▸ **Transform**(): *[Transform](transform.md)*
*Defined in [common/index.d.ts:127](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L127)*
**Returns:** *[Transform](transform.md)*
## Index
### Constructors
* [constructor](transform.md#constructor)
### Properties
* [p](transform.md#p)
* [q](transform.md#q)
### Methods
* [set](transform.md#set)
* [setIdentity](transform.md#setidentity)
* [assert](transform.md#static-assert)
* [clone](transform.md#static-clone)
* [identity](transform.md#static-identity)
* [isValid](transform.md#static-isvalid)
* [mul](transform.md#static-mul)
* [mulT](transform.md#static-mult)
* [mulTVec2](transform.md#static-multvec2)
* [mulTXf](transform.md#static-multxf)
* [mulVec2](transform.md#static-mulvec2)
* [mulXf](transform.md#static-mulxf)
## Constructors
### constructor
\+ **new Transform**(`position`: [Vec2](vec2.md), `rotation`: number): *[Transform](transform.md)*
*Defined in [common/index.d.ts:134](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L134)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`rotation` | number |
**Returns:** *[Transform](transform.md)*
\+ **new Transform**(): *[Transform](transform.md)*
*Defined in [common/index.d.ts:136](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L136)*
**Returns:** *[Transform](transform.md)*
## Properties
### p
• **p**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:129](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L129)*
___
### q
• **q**: *[Rot](rot.md)*
*Defined in [common/index.d.ts:130](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L130)*
## Methods
### set
▸ **set**(`position`: [Vec2](vec2.md), `rotation`: number): *void*
*Defined in [common/index.d.ts:133](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L133)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`rotation` | number |
**Returns:** *void*
▸ **set**(`xf`: [Transform](transform.md)): *void*
*Defined in [common/index.d.ts:134](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L134)*
**Parameters:**
Name | Type |
------ | ------ |
`xf` | [Transform](transform.md) |
**Returns:** *void*
___
### setIdentity
▸ **setIdentity**(): *void*
*Defined in [common/index.d.ts:132](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L132)*
**Returns:** *void*
___
### `Static` assert
▸ **assert**(`o`: any): *void*
*Defined in [common/index.d.ts:143](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L143)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### `Static` clone
▸ **clone**(`xf`: [Transform](transform.md)): *[Transform](transform.md)*
*Defined in [common/index.d.ts:139](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L139)*
**Parameters:**
Name | Type |
------ | ------ |
`xf` | [Transform](transform.md) |
**Returns:** *[Transform](transform.md)*
___
### `Static` identity
▸ **identity**(): *[Transform](transform.md)*
*Defined in [common/index.d.ts:141](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L141)*
**Returns:** *[Transform](transform.md)*
___
### `Static` isValid
▸ **isValid**(`o`: any): *boolean*
*Defined in [common/index.d.ts:142](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L142)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *boolean*
___
### `Static` mul
▸ **mul**(`a`: [Transform](transform.md), `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:144](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L144)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
▸ **mul**(`a`: [Transform](transform.md), `b`: [Transform](transform.md)): *[Transform](transform.md)*
*Defined in [common/index.d.ts:145](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L145)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Transform](transform.md) |
**Returns:** *[Transform](transform.md)*
▸ **mul**(`a`: [Transform](transform.md), `b`: [Vec2](vec2.md)[]): *[Vec2](vec2.md)[]*
*Defined in [common/index.d.ts:146](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L146)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Vec2](vec2.md)[] |
**Returns:** *[Vec2](vec2.md)[]*
▸ **mul**(`a`: [Transform](transform.md), `b`: [Transform](transform.md)[]): *[Transform](transform.md)[]*
*Defined in [common/index.d.ts:147](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L147)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Transform](transform.md)[] |
**Returns:** *[Transform](transform.md)[]*
___
### `Static` mulT
▸ **mulT**(`a`: [Transform](transform.md), `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:153](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L153)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
▸ **mulT**(`a`: [Transform](transform.md), `b`: [Transform](transform.md)): *[Transform](transform.md)*
*Defined in [common/index.d.ts:154](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L154)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Transform](transform.md) |
**Returns:** *[Transform](transform.md)*
___
### `Static` mulTVec2
▸ **mulTVec2**(`a`: [Transform](transform.md), `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:155](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L155)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulTXf
▸ **mulTXf**(`a`: [Transform](transform.md), `b`: [Transform](transform.md)): *[Transform](transform.md)*
*Defined in [common/index.d.ts:156](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L156)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Transform](transform.md) |
**Returns:** *[Transform](transform.md)*
___
### `Static` mulVec2
▸ **mulVec2**(`a`: [Transform](transform.md), `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:151](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L151)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mulXf
▸ **mulXf**(`a`: [Transform](transform.md), `b`: [Transform](transform.md)): *[Transform](transform.md)*
*Defined in [common/index.d.ts:152](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L152)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Transform](transform.md) |
`b` | [Transform](transform.md) |
**Returns:** *[Transform](transform.md)*

View File

@ -1,75 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [TreeNode](treenode.md)
# Class: TreeNode
## Hierarchy
* **TreeNode**
## Index
### Properties
* [aabb](treenode.md#aabb)
* [child1](treenode.md#child1)
* [child2](treenode.md#child2)
* [height](treenode.md#height)
* [id](treenode.md#id)
* [parent](treenode.md#parent)
* [userData](treenode.md#userdata)
## Properties
### aabb
• **aabb**: *[AABB](aabb.md)*
*Defined in [collision/index.d.ts:63](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L63)*
___
### child1
• **child1**: *[TreeNode](treenode.md)*
*Defined in [collision/index.d.ts:66](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L66)*
___
### child2
• **child2**: *[TreeNode](treenode.md)*
*Defined in [collision/index.d.ts:67](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L67)*
___
### height
• **height**: *number*
*Defined in [collision/index.d.ts:68](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L68)*
___
### id
• **id**: *number*
*Defined in [collision/index.d.ts:62](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L62)*
___
### parent
• **parent**: *[TreeNode](treenode.md)*
*Defined in [collision/index.d.ts:65](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L65)*
___
### userData
• **userData**: *any*
*Defined in [collision/index.d.ts:64](https://github.com/shakiba/planck.js/blob/038d425/lib/collision/index.d.ts#L64)*

View File

@ -1,855 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Vec2](vec2.md)
# Class: Vec2
## Hierarchy
* **Vec2**
## Callable
▸ **Vec2**(`x`: number, `y`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:30](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L30)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
**Returns:** *[Vec2](vec2.md)*
▸ **Vec2**(`obj`: object): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:31](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L31)*
**Parameters:**
▪ **obj**: *object*
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
**Returns:** *[Vec2](vec2.md)*
▸ **Vec2**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:32](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L32)*
**Returns:** *[Vec2](vec2.md)*
## Index
### Constructors
* [constructor](vec2.md#constructor)
### Properties
* [x](vec2.md#x)
* [y](vec2.md#y)
### Methods
* [add](vec2.md#add)
* [addCombine](vec2.md#addcombine)
* [addMul](vec2.md#addmul)
* [clamp](vec2.md#clamp)
* [clone](vec2.md#clone)
* [length](vec2.md#length)
* [lengthSquared](vec2.md#lengthsquared)
* [mul](vec2.md#mul)
* [neg](vec2.md#neg)
* [normalize](vec2.md#normalize)
* [set](vec2.md#set)
* [setCombine](vec2.md#setcombine)
* [setMul](vec2.md#setmul)
* [setZero](vec2.md#setzero)
* [sub](vec2.md#sub)
* [subCombine](vec2.md#subcombine)
* [subMul](vec2.md#submul)
* [toString](vec2.md#tostring)
* [abs](vec2.md#static-abs)
* [add](vec2.md#static-add)
* [addCross](vec2.md#static-addcross)
* [areEqual](vec2.md#static-areequal)
* [assert](vec2.md#static-assert)
* [clamp](vec2.md#static-clamp)
* [clone](vec2.md#static-clone)
* [combine](vec2.md#static-combine)
* [cross](vec2.md#static-cross)
* [distance](vec2.md#static-distance)
* [distanceSquared](vec2.md#static-distancesquared)
* [dot](vec2.md#static-dot)
* [isValid](vec2.md#static-isvalid)
* [lengthOf](vec2.md#static-lengthof)
* [lengthSquared](vec2.md#static-lengthsquared)
* [lower](vec2.md#static-lower)
* [mid](vec2.md#static-mid)
* [mul](vec2.md#static-mul)
* [neg](vec2.md#static-neg)
* [skew](vec2.md#static-skew)
* [sub](vec2.md#static-sub)
* [upper](vec2.md#static-upper)
* [zero](vec2.md#static-zero)
## Constructors
### constructor
\+ **new Vec2**(`x`: number, `y`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:55](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L55)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
**Returns:** *[Vec2](vec2.md)*
\+ **new Vec2**(`obj`: object): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:57](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L57)*
**Parameters:**
▪ **obj**: *object*
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
**Returns:** *[Vec2](vec2.md)*
\+ **new Vec2**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:58](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L58)*
**Returns:** *[Vec2](vec2.md)*
## Properties
### x
• **x**: *number*
*Defined in [common/index.d.ts:34](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L34)*
___
### y
• **y**: *number*
*Defined in [common/index.d.ts:35](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L35)*
## Methods
### add
▸ **add**(`w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:44](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L44)*
**Parameters:**
Name | Type |
------ | ------ |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### addCombine
▸ **addCombine**(`a`: number, `v`: [Vec2](vec2.md), `b`: number, `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:45](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L45)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
`b` | number |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### addMul
▸ **addMul**(`a`: number, `v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:46](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L46)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### clamp
▸ **clamp**(`max`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:55](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L55)*
**Parameters:**
Name | Type |
------ | ------ |
`max` | number |
**Returns:** *[Vec2](vec2.md)*
___
### clone
▸ **clone**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:38](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L38)*
**Returns:** *[Vec2](vec2.md)*
___
### length
▸ **length**(): *number*
*Defined in [common/index.d.ts:51](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L51)*
**Returns:** *number*
___
### lengthSquared
▸ **lengthSquared**(): *number*
*Defined in [common/index.d.ts:52](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L52)*
**Returns:** *number*
___
### mul
▸ **mul**(`m`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:50](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L50)*
**Parameters:**
Name | Type |
------ | ------ |
`m` | number |
**Returns:** *[Vec2](vec2.md)*
___
### neg
▸ **neg**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:54](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L54)*
**Returns:** *[Vec2](vec2.md)*
___
### normalize
▸ **normalize**(): *number*
*Defined in [common/index.d.ts:53](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L53)*
**Returns:** *number*
___
### set
▸ **set**(`x`: number, `y`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:40](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L40)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
**Returns:** *[Vec2](vec2.md)*
▸ **set**(`value`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:41](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L41)*
**Parameters:**
Name | Type |
------ | ------ |
`value` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### setCombine
▸ **setCombine**(`a`: number, `v`: [Vec2](vec2.md), `b`: number, `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:42](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L42)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
`b` | number |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### setMul
▸ **setMul**(`a`: number, `v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:43](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L43)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### setZero
▸ **setZero**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:39](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L39)*
**Returns:** *[Vec2](vec2.md)*
___
### sub
▸ **sub**(`w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:47](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L47)*
**Parameters:**
Name | Type |
------ | ------ |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### subCombine
▸ **subCombine**(`a`: number, `v`: [Vec2](vec2.md), `b`: number, `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:48](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L48)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
`b` | number |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### subMul
▸ **subMul**(`a`: number, `v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:49](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L49)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### toString
▸ **toString**(): *string*
*Defined in [common/index.d.ts:37](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L37)*
**Returns:** *string*
___
### `Static` abs
▸ **abs**(`v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:85](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L85)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` add
▸ **add**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:78](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L78)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` addCross
▸ **addCross**(`a`: [Vec2](vec2.md), `v`: [Vec2](vec2.md), `w`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:76](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L76)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Vec2](vec2.md) |
`v` | [Vec2](vec2.md) |
`w` | number |
**Returns:** *[Vec2](vec2.md)*
▸ **addCross**(`a`: [Vec2](vec2.md), `v`: number, `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:77](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L77)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Vec2](vec2.md) |
`v` | number |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` areEqual
▸ **areEqual**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *boolean*
*Defined in [common/index.d.ts:70](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L70)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *boolean*
___
### `Static` assert
▸ **assert**(`o`: any): *void*
*Defined in [common/index.d.ts:65](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L65)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### `Static` clamp
▸ **clamp**(`v`: [Vec2](vec2.md), `max`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:89](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L89)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`max` | number |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` clone
▸ **clone**(`v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:63](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L63)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` combine
▸ **combine**(`a`: number, `v`: [Vec2](vec2.md), `b`: number, `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:79](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L79)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`v` | [Vec2](vec2.md) |
`b` | number |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` cross
▸ **cross**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *number*
*Defined in [common/index.d.ts:73](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L73)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *number*
▸ **cross**(`v`: [Vec2](vec2.md), `w`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:74](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L74)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | number |
**Returns:** *[Vec2](vec2.md)*
▸ **cross**(`v`: number, `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:75](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L75)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | number |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` distance
▸ **distance**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *number*
*Defined in [common/index.d.ts:68](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L68)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *number*
___
### `Static` distanceSquared
▸ **distanceSquared**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *number*
*Defined in [common/index.d.ts:69](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L69)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *number*
___
### `Static` dot
▸ **dot**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *number*
*Defined in [common/index.d.ts:72](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L72)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *number*
___
### `Static` isValid
▸ **isValid**(`v`: any): *boolean*
*Defined in [common/index.d.ts:64](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L64)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | any |
**Returns:** *boolean*
___
### `Static` lengthOf
▸ **lengthOf**(`v`: [Vec2](vec2.md)): *number*
*Defined in [common/index.d.ts:66](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L66)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *number*
___
### `Static` lengthSquared
▸ **lengthSquared**(`v`: [Vec2](vec2.md)): *number*
*Defined in [common/index.d.ts:67](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L67)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *number*
___
### `Static` lower
▸ **lower**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:88](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L88)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mid
▸ **mid**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:86](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L86)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` mul
▸ **mul**(`a`: [Vec2](vec2.md), `b`: number): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:82](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L82)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | [Vec2](vec2.md) |
`b` | number |
**Returns:** *[Vec2](vec2.md)*
▸ **mul**(`a`: number, `b`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:83](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L83)*
**Parameters:**
Name | Type |
------ | ------ |
`a` | number |
`b` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` neg
▸ **neg**(`v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:84](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L84)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` skew
▸ **skew**(`v`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:71](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L71)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` sub
▸ **sub**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:81](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L81)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` upper
▸ **upper**(`v`: [Vec2](vec2.md), `w`: [Vec2](vec2.md)): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:87](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L87)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec2](vec2.md) |
`w` | [Vec2](vec2.md) |
**Returns:** *[Vec2](vec2.md)*
___
### `Static` zero
▸ **zero**(): *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:61](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L61)*
**Returns:** *[Vec2](vec2.md)*

View File

@ -1,403 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Vec3](vec3.md)
# Class: Vec3
## Hierarchy
* **Vec3**
## Callable
▸ **Vec3**(`x`: number, `y`: number, `z`: number): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:92](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L92)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
`z` | number |
**Returns:** *[Vec3](vec3.md)*
▸ **Vec3**(`obj`: object): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:93](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L93)*
**Parameters:**
▪ **obj**: *object*
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
`z` | number |
**Returns:** *[Vec3](vec3.md)*
▸ **Vec3**(): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:94](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L94)*
**Returns:** *[Vec3](vec3.md)*
## Index
### Constructors
* [constructor](vec3.md#constructor)
### Properties
* [x](vec3.md#x)
* [y](vec3.md#y)
* [z](vec3.md#z)
### Methods
* [add](vec3.md#add)
* [mul](vec3.md#mul)
* [neg](vec3.md#neg)
* [set](vec3.md#set)
* [setZero](vec3.md#setzero)
* [sub](vec3.md#sub)
* [toString](vec3.md#tostring)
* [add](vec3.md#static-add)
* [areEqual](vec3.md#static-areequal)
* [assert](vec3.md#static-assert)
* [clone](vec3.md#static-clone)
* [cross](vec3.md#static-cross)
* [dot](vec3.md#static-dot)
* [isValid](vec3.md#static-isvalid)
* [mul](vec3.md#static-mul)
* [neg](vec3.md#static-neg)
* [sub](vec3.md#static-sub)
## Constructors
### constructor
\+ **new Vec3**(`x`: number, `y`: number, `z`: number): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:106](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L106)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
`z` | number |
**Returns:** *[Vec3](vec3.md)*
\+ **new Vec3**(`obj`: object): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:108](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L108)*
**Parameters:**
▪ **obj**: *object*
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
`z` | number |
**Returns:** *[Vec3](vec3.md)*
\+ **new Vec3**(): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:109](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L109)*
**Returns:** *[Vec3](vec3.md)*
## Properties
### x
• **x**: *number*
*Defined in [common/index.d.ts:96](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L96)*
___
### y
• **y**: *number*
*Defined in [common/index.d.ts:97](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L97)*
___
### z
• **z**: *number*
*Defined in [common/index.d.ts:98](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L98)*
## Methods
### add
▸ **add**(`w`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:103](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L103)*
**Parameters:**
Name | Type |
------ | ------ |
`w` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### mul
▸ **mul**(`m`: number): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:105](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L105)*
**Parameters:**
Name | Type |
------ | ------ |
`m` | number |
**Returns:** *[Vec3](vec3.md)*
___
### neg
▸ **neg**(): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:106](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L106)*
**Returns:** *[Vec3](vec3.md)*
___
### set
▸ **set**(`x`: number, `y`: number, `z`: number): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:102](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L102)*
**Parameters:**
Name | Type |
------ | ------ |
`x` | number |
`y` | number |
`z` | number |
**Returns:** *[Vec3](vec3.md)*
___
### setZero
▸ **setZero**(): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:101](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L101)*
**Returns:** *[Vec3](vec3.md)*
___
### sub
▸ **sub**(`w`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:104](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L104)*
**Parameters:**
Name | Type |
------ | ------ |
`w` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### toString
▸ **toString**(): *string*
*Defined in [common/index.d.ts:100](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L100)*
**Returns:** *string*
___
### `Static` add
▸ **add**(`v`: [Vec3](vec3.md), `w`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:117](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L117)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
`w` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### `Static` areEqual
▸ **areEqual**(`v`: [Vec3](vec3.md), `w`: [Vec3](vec3.md)): *boolean*
*Defined in [common/index.d.ts:114](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L114)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
`w` | [Vec3](vec3.md) |
**Returns:** *boolean*
___
### `Static` assert
▸ **assert**(`o`: any): *void*
*Defined in [common/index.d.ts:123](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L123)*
**Parameters:**
Name | Type |
------ | ------ |
`o` | any |
**Returns:** *void*
___
### `Static` clone
▸ **clone**(`v`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:113](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L113)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### `Static` cross
▸ **cross**(`v`: [Vec3](vec3.md), `w`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:116](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L116)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
`w` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### `Static` dot
▸ **dot**(`v`: [Vec3](vec3.md), `w`: [Vec3](vec3.md)): *number*
*Defined in [common/index.d.ts:115](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L115)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
`w` | [Vec3](vec3.md) |
**Returns:** *number*
___
### `Static` isValid
▸ **isValid**(`v`: any): *void*
*Defined in [common/index.d.ts:122](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L122)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | any |
**Returns:** *void*
___
### `Static` mul
▸ **mul**(`v`: [Vec3](vec3.md), `m`: number): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:119](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L119)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
`m` | number |
**Returns:** *[Vec3](vec3.md)*
___
### `Static` neg
▸ **neg**(`v`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:120](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L120)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*
___
### `Static` sub
▸ **sub**(`v`: [Vec3](vec3.md), `w`: [Vec3](vec3.md)): *[Vec3](vec3.md)*
*Defined in [common/index.d.ts:118](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L118)*
**Parameters:**
Name | Type |
------ | ------ |
`v` | [Vec3](vec3.md) |
`w` | [Vec3](vec3.md) |
**Returns:** *[Vec3](vec3.md)*

View File

@ -1,30 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [Velocity](velocity.md)
# Class: Velocity
## Hierarchy
* **Velocity**
## Index
### Properties
* [v](velocity.md#v)
* [w](velocity.md#w)
## Properties
### v
• **v**: *[Vec2](vec2.md)*
*Defined in [common/index.d.ts:20](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L20)*
___
### w
• **w**: *number*
*Defined in [common/index.d.ts:21](https://github.com/shakiba/planck.js/blob/038d425/lib/common/index.d.ts#L21)*

View File

@ -1,75 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [VelocityConstraintPoint](velocityconstraintpoint.md)
# Class: VelocityConstraintPoint
## Hierarchy
* **VelocityConstraintPoint**
## Index
### Properties
* [normalImpulse](velocityconstraintpoint.md#normalimpulse)
* [normalMass](velocityconstraintpoint.md#normalmass)
* [rA](velocityconstraintpoint.md#ra)
* [rB](velocityconstraintpoint.md#rb)
* [tangentImpulse](velocityconstraintpoint.md#tangentimpulse)
* [tangentMass](velocityconstraintpoint.md#tangentmass)
* [velocityBias](velocityconstraintpoint.md#velocitybias)
## Properties
### normalImpulse
• **normalImpulse**: *number*
*Defined in [index.d.ts:304](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L304)*
___
### normalMass
• **normalMass**: *number*
*Defined in [index.d.ts:306](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L306)*
___
### rA
• **rA**: *[Vec2](vec2.md)*
*Defined in [index.d.ts:302](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L302)*
___
### rB
• **rB**: *[Vec2](vec2.md)*
*Defined in [index.d.ts:303](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L303)*
___
### tangentImpulse
• **tangentImpulse**: *number*
*Defined in [index.d.ts:305](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L305)*
___
### tangentMass
• **tangentMass**: *number*
*Defined in [index.d.ts:307](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L307)*
___
### velocityBias
• **velocityBias**: *number*
*Defined in [index.d.ts:308](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L308)*

View File

@ -1,179 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [WeldJoint](weldjoint.md)
# Class: WeldJoint
## Hierarchy
* any
↳ **WeldJoint**
## Callable
▸ **WeldJoint**(`def`: [WeldJointDef](../interfaces/weldjointdef.md)): *[WeldJoint](weldjoint.md)*
*Defined in [joint/index.d.ts:547](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L547)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WeldJointDef](../interfaces/weldjointdef.md) |
**Returns:** *[WeldJoint](weldjoint.md)*
▸ **WeldJoint**(`def`: [WeldJointOpt](../interfaces/weldjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[WeldJoint](weldjoint.md)*
*Defined in [joint/index.d.ts:548](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L548)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WeldJointOpt](../interfaces/weldjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[WeldJoint](weldjoint.md)*
## Index
### Constructors
* [constructor](weldjoint.md#constructor)
### Properties
* [TYPE](weldjoint.md#static-type)
### Methods
* [getDampingRatio](weldjoint.md#getdampingratio)
* [getFrequency](weldjoint.md#getfrequency)
* [getLocalAnchorA](weldjoint.md#getlocalanchora)
* [getLocalAnchorB](weldjoint.md#getlocalanchorb)
* [getReferenceAngle](weldjoint.md#getreferenceangle)
* [setDampingRatio](weldjoint.md#setdampingratio)
* [setFrequency](weldjoint.md#setfrequency)
## Constructors
### constructor
\+ **new WeldJoint**(`def`: [WeldJointDef](../interfaces/weldjointdef.md)): *[WeldJoint](weldjoint.md)*
*Defined in [joint/index.d.ts:550](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L550)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WeldJointDef](../interfaces/weldjointdef.md) |
**Returns:** *[WeldJoint](weldjoint.md)*
\+ **new WeldJoint**(`def`: [WeldJointOpt](../interfaces/weldjointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md)): *[WeldJoint](weldjoint.md)*
*Defined in [joint/index.d.ts:552](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L552)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WeldJointOpt](../interfaces/weldjointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
**Returns:** *[WeldJoint](weldjoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"weld-joint"*
*Defined in [joint/index.d.ts:550](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L550)*
## Methods
### getDampingRatio
▸ **getDampingRatio**(): *number*
*Defined in [joint/index.d.ts:581](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L581)*
**Returns:** *number*
___
### getFrequency
▸ **getFrequency**(): *number*
*Defined in [joint/index.d.ts:579](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L579)*
**Returns:** *number*
___
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:575](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L575)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:576](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L576)*
**Returns:** *[Vec2](vec2.md)*
___
### getReferenceAngle
▸ **getReferenceAngle**(): *number*
*Defined in [joint/index.d.ts:577](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L577)*
**Returns:** *number*
___
### setDampingRatio
▸ **setDampingRatio**(`ratio`: number): *void*
*Defined in [joint/index.d.ts:580](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L580)*
**Parameters:**
Name | Type |
------ | ------ |
`ratio` | number |
**Returns:** *void*
___
### setFrequency
▸ **setFrequency**(`hz`: number): *void*
*Defined in [joint/index.d.ts:578](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L578)*
**Parameters:**
Name | Type |
------ | ------ |
`hz` | number |
**Returns:** *void*

View File

@ -1,304 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [WheelJoint](wheeljoint.md)
# Class: WheelJoint
## Hierarchy
* any
↳ **WheelJoint**
## Callable
▸ **WheelJoint**(`def`: [WheelJointDef](../interfaces/wheeljointdef.md)): *[WheelJoint](wheeljoint.md)*
*Defined in [joint/index.d.ts:596](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L596)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WheelJointDef](../interfaces/wheeljointdef.md) |
**Returns:** *[WheelJoint](wheeljoint.md)*
▸ **WheelJoint**(`def`: [WheelJointOpt](../interfaces/wheeljointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md), `axis`: [Vec2](vec2.md)): *[WheelJoint](wheeljoint.md)*
*Defined in [joint/index.d.ts:597](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L597)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WheelJointOpt](../interfaces/wheeljointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
`axis` | [Vec2](vec2.md) |
**Returns:** *[WheelJoint](wheeljoint.md)*
## Index
### Constructors
* [constructor](wheeljoint.md#constructor)
### Properties
* [TYPE](wheeljoint.md#static-type)
### Methods
* [enableMotor](wheeljoint.md#enablemotor)
* [getJointSpeed](wheeljoint.md#getjointspeed)
* [getJointTranslation](wheeljoint.md#getjointtranslation)
* [getLocalAnchorA](wheeljoint.md#getlocalanchora)
* [getLocalAnchorB](wheeljoint.md#getlocalanchorb)
* [getLocalAxisA](wheeljoint.md#getlocalaxisa)
* [getMaxMotorTorque](wheeljoint.md#getmaxmotortorque)
* [getMotorSpeed](wheeljoint.md#getmotorspeed)
* [getMotorTorque](wheeljoint.md#getmotortorque)
* [getSpringDampingRatio](wheeljoint.md#getspringdampingratio)
* [getSpringFrequencyHz](wheeljoint.md#getspringfrequencyhz)
* [isMotorEnabled](wheeljoint.md#ismotorenabled)
* [setMaxMotorTorque](wheeljoint.md#setmaxmotortorque)
* [setMotorSpeed](wheeljoint.md#setmotorspeed)
* [setSpringDampingRatio](wheeljoint.md#setspringdampingratio)
* [setSpringFrequencyHz](wheeljoint.md#setspringfrequencyhz)
## Constructors
### constructor
\+ **new WheelJoint**(`def`: [WheelJointDef](../interfaces/wheeljointdef.md)): *[WheelJoint](wheeljoint.md)*
*Defined in [joint/index.d.ts:599](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L599)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WheelJointDef](../interfaces/wheeljointdef.md) |
**Returns:** *[WheelJoint](wheeljoint.md)*
\+ **new WheelJoint**(`def`: [WheelJointOpt](../interfaces/wheeljointopt.md), `bodyA`: [Body](body.md), `bodyB`: [Body](body.md), `anchor`: [Vec2](vec2.md), `axis`: [Vec2](vec2.md)): *[WheelJoint](wheeljoint.md)*
*Defined in [joint/index.d.ts:601](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L601)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [WheelJointOpt](../interfaces/wheeljointopt.md) |
`bodyA` | [Body](body.md) |
`bodyB` | [Body](body.md) |
`anchor` | [Vec2](vec2.md) |
`axis` | [Vec2](vec2.md) |
**Returns:** *[WheelJoint](wheeljoint.md)*
## Properties
### `Static` TYPE
▪ **TYPE**: *"wheel-joint"*
*Defined in [joint/index.d.ts:599](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L599)*
## Methods
### enableMotor
▸ **enableMotor**(`flag`: boolean): *void*
*Defined in [joint/index.d.ts:642](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L642)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### getJointSpeed
▸ **getJointSpeed**(): *number*
*Defined in [joint/index.d.ts:640](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L640)*
**Returns:** *number*
___
### getJointTranslation
▸ **getJointTranslation**(): *number*
*Defined in [joint/index.d.ts:639](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L639)*
**Returns:** *number*
___
### getLocalAnchorA
▸ **getLocalAnchorA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:636](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L636)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAnchorB
▸ **getLocalAnchorB**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:637](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L637)*
**Returns:** *[Vec2](vec2.md)*
___
### getLocalAxisA
▸ **getLocalAxisA**(): *[Vec2](vec2.md)*
*Defined in [joint/index.d.ts:638](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L638)*
**Returns:** *[Vec2](vec2.md)*
___
### getMaxMotorTorque
▸ **getMaxMotorTorque**(): *number*
*Defined in [joint/index.d.ts:646](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L646)*
**Returns:** *number*
___
### getMotorSpeed
▸ **getMotorSpeed**(): *number*
*Defined in [joint/index.d.ts:644](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L644)*
**Returns:** *number*
___
### getMotorTorque
▸ **getMotorTorque**(`inv_dt`: number): *number*
*Defined in [joint/index.d.ts:647](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L647)*
**Parameters:**
Name | Type |
------ | ------ |
`inv_dt` | number |
**Returns:** *number*
___
### getSpringDampingRatio
▸ **getSpringDampingRatio**(): *number*
*Defined in [joint/index.d.ts:651](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L651)*
**Returns:** *number*
___
### getSpringFrequencyHz
▸ **getSpringFrequencyHz**(): *number*
*Defined in [joint/index.d.ts:649](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L649)*
**Returns:** *number*
___
### isMotorEnabled
▸ **isMotorEnabled**(): *boolean*
*Defined in [joint/index.d.ts:641](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L641)*
**Returns:** *boolean*
___
### setMaxMotorTorque
▸ **setMaxMotorTorque**(`torque`: number): *void*
*Defined in [joint/index.d.ts:645](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L645)*
**Parameters:**
Name | Type |
------ | ------ |
`torque` | number |
**Returns:** *void*
___
### setMotorSpeed
▸ **setMotorSpeed**(`speed`: number): *void*
*Defined in [joint/index.d.ts:643](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L643)*
**Parameters:**
Name | Type |
------ | ------ |
`speed` | number |
**Returns:** *void*
___
### setSpringDampingRatio
▸ **setSpringDampingRatio**(`ratio`: number): *void*
*Defined in [joint/index.d.ts:650](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L650)*
**Parameters:**
Name | Type |
------ | ------ |
`ratio` | number |
**Returns:** *void*
___
### setSpringFrequencyHz
▸ **setSpringFrequencyHz**(`hz`: number): *void*
*Defined in [joint/index.d.ts:648](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L648)*
**Parameters:**
Name | Type |
------ | ------ |
`hz` | number |
**Returns:** *void*

View File

@ -1,914 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [World](world.md)
# Class: World
## Hierarchy
* **World**
## Callable
▸ **World**(`def?`: [WorldDef](../interfaces/worlddef.md)): *[World](world.md)*
*Defined in [index.d.ts:433](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L433)*
**Parameters:**
Name | Type |
------ | ------ |
`def?` | [WorldDef](../interfaces/worlddef.md) |
**Returns:** *[World](world.md)*
## Index
### Constructors
* [constructor](world.md#constructor)
### Methods
* [clearForces](world.md#clearforces)
* [createBody](world.md#createbody)
* [createDynamicBody](world.md#createdynamicbody)
* [createJoint](world.md#createjoint)
* [createKinematicBody](world.md#createkinematicbody)
* [destroyBody](world.md#destroybody)
* [destroyJoint](world.md#destroyjoint)
* [getAllowSleeping](world.md#getallowsleeping)
* [getAutoClearForces](world.md#getautoclearforces)
* [getBodyCount](world.md#getbodycount)
* [getBodyList](world.md#getbodylist)
* [getContactCount](world.md#getcontactcount)
* [getContactList](world.md#getcontactlist)
* [getContinuousPhysics](world.md#getcontinuousphysics)
* [getGravity](world.md#getgravity)
* [getJointCount](world.md#getjointcount)
* [getJointList](world.md#getjointlist)
* [getProxyCount](world.md#getproxycount)
* [getSubStepping](world.md#getsubstepping)
* [getTreeBalance](world.md#gettreebalance)
* [getTreeHeight](world.md#gettreeheight)
* [getTreeQuality](world.md#gettreequality)
* [getWarmStarting](world.md#getwarmstarting)
* [isLocked](world.md#islocked)
* [off](world.md#off)
* [on](world.md#on)
* [publish](world.md#publish)
* [queryAABB](world.md#queryaabb)
* [rayCast](world.md#raycast)
* [setAllowSleeping](world.md#setallowsleeping)
* [setAutoClearForces](world.md#setautoclearforces)
* [setContinuousPhysics](world.md#setcontinuousphysics)
* [setGravity](world.md#setgravity)
* [setSubStepping](world.md#setsubstepping)
* [setWarmStarting](world.md#setwarmstarting)
* [shiftOrigin](world.md#shiftorigin)
* [step](world.md#step)
## Constructors
### constructor
\+ **new World**(`def?`: [WorldDef](../interfaces/worlddef.md)): *[World](world.md)*
*Defined in [index.d.ts:434](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L434)*
**Parameters:**
Name | Type |
------ | ------ |
`def?` | [WorldDef](../interfaces/worlddef.md) |
**Returns:** *[World](world.md)*
## Methods
### clearForces
▸ **clearForces**(): *void*
*Defined in [index.d.ts:480](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L480)*
**Returns:** *void*
___
### createBody
▸ **createBody**(`def`: [BodyDef](../interfaces/bodydef.md)): *[Body](body.md)*
*Defined in [index.d.ts:488](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L488)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [BodyDef](../interfaces/bodydef.md) |
**Returns:** *[Body](body.md)*
▸ **createBody**(`position`: [Vec2](vec2.md), `angle?`: number): *[Body](body.md)*
*Defined in [index.d.ts:489](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L489)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`angle?` | number |
**Returns:** *[Body](body.md)*
▸ **createBody**(): *[Body](body.md)*
*Defined in [index.d.ts:490](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L490)*
**Returns:** *[Body](body.md)*
___
### createDynamicBody
▸ **createDynamicBody**(`def`: [BodyDef](../interfaces/bodydef.md)): *[Body](body.md)*
*Defined in [index.d.ts:491](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L491)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [BodyDef](../interfaces/bodydef.md) |
**Returns:** *[Body](body.md)*
▸ **createDynamicBody**(`position`: [Vec2](vec2.md), `angle?`: number): *[Body](body.md)*
*Defined in [index.d.ts:492](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L492)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`angle?` | number |
**Returns:** *[Body](body.md)*
▸ **createDynamicBody**(): *[Body](body.md)*
*Defined in [index.d.ts:493](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L493)*
**Returns:** *[Body](body.md)*
___
### createJoint
▸ **createJoint**‹**T**›(`joint`: T): *T | null*
*Defined in [index.d.ts:498](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L498)*
**Type parameters:**
▪ **T**: *[Joint](joint.md)*
**Parameters:**
Name | Type |
------ | ------ |
`joint` | T |
**Returns:** *T | null*
___
### createKinematicBody
▸ **createKinematicBody**(`def`: [BodyDef](../interfaces/bodydef.md)): *[Body](body.md)*
*Defined in [index.d.ts:494](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L494)*
**Parameters:**
Name | Type |
------ | ------ |
`def` | [BodyDef](../interfaces/bodydef.md) |
**Returns:** *[Body](body.md)*
▸ **createKinematicBody**(`position`: [Vec2](vec2.md), `angle?`: number): *[Body](body.md)*
*Defined in [index.d.ts:495](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L495)*
**Parameters:**
Name | Type |
------ | ------ |
`position` | [Vec2](vec2.md) |
`angle?` | number |
**Returns:** *[Body](body.md)*
▸ **createKinematicBody**(): *[Body](body.md)*
*Defined in [index.d.ts:496](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L496)*
**Returns:** *[Body](body.md)*
___
### destroyBody
▸ **destroyBody**(`b`: [Body](body.md)): *boolean*
*Defined in [index.d.ts:497](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L497)*
**Parameters:**
Name | Type |
------ | ------ |
`b` | [Body](body.md) |
**Returns:** *boolean*
___
### destroyJoint
▸ **destroyJoint**(`joint`: [Joint](joint.md)): *void*
*Defined in [index.d.ts:499](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L499)*
**Parameters:**
Name | Type |
------ | ------ |
`joint` | [Joint](joint.md) |
**Returns:** *void*
___
### getAllowSleeping
▸ **getAllowSleeping**(): *boolean*
*Defined in [index.d.ts:471](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L471)*
**Returns:** *boolean*
___
### getAutoClearForces
▸ **getAutoClearForces**(): *boolean*
*Defined in [index.d.ts:479](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L479)*
**Returns:** *boolean*
___
### getBodyCount
▸ **getBodyCount**(): *number*
*Defined in [index.d.ts:464](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L464)*
**Returns:** *number*
___
### getBodyList
▸ **getBodyList**(): *[Body](body.md) | null*
*Defined in [index.d.ts:461](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L461)*
**Returns:** *[Body](body.md) | null*
___
### getContactCount
▸ **getContactCount**(): *number*
*Defined in [index.d.ts:466](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L466)*
**Returns:** *number*
___
### getContactList
▸ **getContactList**(): *[Contact](contact.md) | null*
*Defined in [index.d.ts:463](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L463)*
**Returns:** *[Contact](contact.md) | null*
___
### getContinuousPhysics
▸ **getContinuousPhysics**(): *boolean*
*Defined in [index.d.ts:475](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L475)*
**Returns:** *boolean*
___
### getGravity
▸ **getGravity**(): *[Vec2](vec2.md)*
*Defined in [index.d.ts:468](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L468)*
**Returns:** *[Vec2](vec2.md)*
___
### getJointCount
▸ **getJointCount**(): *number*
*Defined in [index.d.ts:465](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L465)*
**Returns:** *number*
___
### getJointList
▸ **getJointList**(): *[Joint](joint.md) | null*
*Defined in [index.d.ts:462](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L462)*
**Returns:** *[Joint](joint.md) | null*
___
### getProxyCount
▸ **getProxyCount**(): *number*
*Defined in [index.d.ts:483](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L483)*
**Returns:** *number*
___
### getSubStepping
▸ **getSubStepping**(): *boolean*
*Defined in [index.d.ts:477](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L477)*
**Returns:** *boolean*
___
### getTreeBalance
▸ **getTreeBalance**(): *number*
*Defined in [index.d.ts:485](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L485)*
**Returns:** *number*
___
### getTreeHeight
▸ **getTreeHeight**(): *number*
*Defined in [index.d.ts:484](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L484)*
**Returns:** *number*
___
### getTreeQuality
▸ **getTreeQuality**(): *number*
*Defined in [index.d.ts:486](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L486)*
**Returns:** *number*
___
### getWarmStarting
▸ **getWarmStarting**(): *boolean*
*Defined in [index.d.ts:473](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L473)*
**Returns:** *boolean*
___
### isLocked
▸ **isLocked**(): *boolean*
*Defined in [index.d.ts:469](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L469)*
**Returns:** *boolean*
___
### off
▸ **off**(`name`: "begin-contact", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:516](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L516)*
**Parameters:**
▪ **name**: *"begin-contact"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
**Returns:** *[World](world.md)*
▸ **off**(`name`: "end-contact", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:517](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L517)*
**Parameters:**
▪ **name**: *"end-contact"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
**Returns:** *[World](world.md)*
▸ **off**(`name`: "pre-solve", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:518](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L518)*
**Parameters:**
▪ **name**: *"pre-solve"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md), `oldManifold`: [Manifold](../interfaces/manifold.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
`oldManifold` | [Manifold](../interfaces/manifold.md) |
**Returns:** *[World](world.md)*
▸ **off**(`name`: "post-solve", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:519](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L519)*
**Parameters:**
▪ **name**: *"post-solve"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md), `impulse`: [ContactImpulse](contactimpulse.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
`impulse` | [ContactImpulse](contactimpulse.md) |
**Returns:** *[World](world.md)*
▸ **off**(`name`: "remove-body", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:520](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L520)*
**Parameters:**
▪ **name**: *"remove-body"*
▪ **listener**: *function*
▸ (`body`: [Body](body.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`body` | [Body](body.md) |
**Returns:** *[World](world.md)*
▸ **off**(`name`: "remove-joint", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:521](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L521)*
**Parameters:**
▪ **name**: *"remove-joint"*
▪ **listener**: *function*
▸ (`joint`: [Joint](joint.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`joint` | [Joint](joint.md) |
**Returns:** *[World](world.md)*
▸ **off**(`name`: "remove-fixture", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:522](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L522)*
**Parameters:**
▪ **name**: *"remove-fixture"*
▪ **listener**: *function*
▸ (`fixture`: [Fixture](fixture.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`fixture` | [Fixture](fixture.md) |
**Returns:** *[World](world.md)*
___
### on
▸ **on**(`name`: "begin-contact", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:509](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L509)*
**Parameters:**
▪ **name**: *"begin-contact"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
**Returns:** *[World](world.md)*
▸ **on**(`name`: "end-contact", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:510](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L510)*
**Parameters:**
▪ **name**: *"end-contact"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
**Returns:** *[World](world.md)*
▸ **on**(`name`: "pre-solve", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:511](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L511)*
**Parameters:**
▪ **name**: *"pre-solve"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md), `oldManifold`: [Manifold](../interfaces/manifold.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
`oldManifold` | [Manifold](../interfaces/manifold.md) |
**Returns:** *[World](world.md)*
▸ **on**(`name`: "post-solve", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:512](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L512)*
**Parameters:**
▪ **name**: *"post-solve"*
▪ **listener**: *function*
▸ (`contact`: [Contact](contact.md), `impulse`: [ContactImpulse](contactimpulse.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`contact` | [Contact](contact.md) |
`impulse` | [ContactImpulse](contactimpulse.md) |
**Returns:** *[World](world.md)*
▸ **on**(`name`: "remove-body", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:513](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L513)*
**Parameters:**
▪ **name**: *"remove-body"*
▪ **listener**: *function*
▸ (`body`: [Body](body.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`body` | [Body](body.md) |
**Returns:** *[World](world.md)*
▸ **on**(`name`: "remove-joint", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:514](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L514)*
**Parameters:**
▪ **name**: *"remove-joint"*
▪ **listener**: *function*
▸ (`joint`: [Joint](joint.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`joint` | [Joint](joint.md) |
**Returns:** *[World](world.md)*
▸ **on**(`name`: "remove-fixture", `listener`: function): *[World](world.md)*
*Defined in [index.d.ts:515](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L515)*
**Parameters:**
▪ **name**: *"remove-fixture"*
▪ **listener**: *function*
▸ (`fixture`: [Fixture](fixture.md)): *void*
**Parameters:**
Name | Type |
------ | ------ |
`fixture` | [Fixture](fixture.md) |
**Returns:** *[World](world.md)*
___
### publish
▸ **publish**(`name`: string, `arg1`: any, `arg2`: any, `arg3`: any): *number*
*Defined in [index.d.ts:524](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L524)*
**Parameters:**
Name | Type |
------ | ------ |
`name` | string |
`arg1` | any |
`arg2` | any |
`arg3` | any |
**Returns:** *number*
___
### queryAABB
▸ **queryAABB**(`aabb`: [AABB](aabb.md), `queryCallback`: function): *void*
*Defined in [index.d.ts:481](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L481)*
**Parameters:**
▪ **aabb**: *[AABB](aabb.md)*
▪ **queryCallback**: *function*
▸ (`fixture`: [Fixture](fixture.md)): *boolean*
**Parameters:**
Name | Type |
------ | ------ |
`fixture` | [Fixture](fixture.md) |
**Returns:** *void*
___
### rayCast
▸ **rayCast**(`point1`: [Vec2](vec2.md), `point2`: [Vec2](vec2.md), `reportFixtureCallback`: function): *void*
*Defined in [index.d.ts:482](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L482)*
**Parameters:**
▪ **point1**: *[Vec2](vec2.md)*
▪ **point2**: *[Vec2](vec2.md)*
▪ **reportFixtureCallback**: *function*
▸ (`fixture`: [Fixture](fixture.md), `point`: [Vec2](vec2.md), `normal`: [Vec2](vec2.md), `fraction`: number): *number*
**Parameters:**
Name | Type |
------ | ------ |
`fixture` | [Fixture](fixture.md) |
`point` | [Vec2](vec2.md) |
`normal` | [Vec2](vec2.md) |
`fraction` | number |
**Returns:** *void*
___
### setAllowSleeping
▸ **setAllowSleeping**(`flag`: boolean): *void*
*Defined in [index.d.ts:470](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L470)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### setAutoClearForces
▸ **setAutoClearForces**(`flag`: boolean): *void*
*Defined in [index.d.ts:478](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L478)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### setContinuousPhysics
▸ **setContinuousPhysics**(`flag`: boolean): *void*
*Defined in [index.d.ts:474](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L474)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### setGravity
▸ **setGravity**(`gravity`: [Vec2](vec2.md)): *void*
*Defined in [index.d.ts:467](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L467)*
**Parameters:**
Name | Type |
------ | ------ |
`gravity` | [Vec2](vec2.md) |
**Returns:** *void*
___
### setSubStepping
▸ **setSubStepping**(`flag`: boolean): *void*
*Defined in [index.d.ts:476](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L476)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### setWarmStarting
▸ **setWarmStarting**(`flag`: boolean): *void*
*Defined in [index.d.ts:472](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L472)*
**Parameters:**
Name | Type |
------ | ------ |
`flag` | boolean |
**Returns:** *void*
___
### shiftOrigin
▸ **shiftOrigin**(`newOrigin`: [Vec2](vec2.md)): *void*
*Defined in [index.d.ts:487](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L487)*
**Parameters:**
Name | Type |
------ | ------ |
`newOrigin` | [Vec2](vec2.md) |
**Returns:** *void*
___
### step
▸ **step**(`timeStep`: number, `velocityIterations?`: number, `positionIterations?`: number): *void*
*Defined in [index.d.ts:500](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L500)*
**Parameters:**
Name | Type |
------ | ------ |
`timeStep` | number |
`velocityIterations?` | number |
`positionIterations?` | number |
**Returns:** *void*

View File

@ -1,26 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ContactFeatureType](contactfeaturetype.md)
# Enumeration: ContactFeatureType
## Index
### Enumeration members
* [Face](contactfeaturetype.md#face)
* [Vertex](contactfeaturetype.md#vertex)
## Enumeration members
### Face
• **Face**: = 1
*Defined in [index.d.ts:20](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L20)*
___
### Vertex
• **Vertex**: = 0
*Defined in [index.d.ts:19](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L19)*

View File

@ -1,44 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [LIMIT_STATE](limit_state.md)
# Enumeration: LIMIT_STATE
## Index
### Enumeration members
* [AT_LOWER_LIMIT](limit_state.md#at_lower_limit)
* [AT_UPPER_LIMIT](limit_state.md#at_upper_limit)
* [EQUAL_LIMITS](limit_state.md#equal_limits)
* [INACTIVE_LIMIT](limit_state.md#inactive_limit)
## Enumeration members
### AT_LOWER_LIMIT
• **AT_LOWER_LIMIT**:
*Defined in [joint/index.d.ts:8](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L8)*
___
### AT_UPPER_LIMIT
• **AT_UPPER_LIMIT**:
*Defined in [joint/index.d.ts:9](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L9)*
___
### EQUAL_LIMITS
• **EQUAL_LIMITS**:
*Defined in [joint/index.d.ts:10](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L10)*
___
### INACTIVE_LIMIT
• **INACTIVE_LIMIT**:
*Defined in [joint/index.d.ts:7](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L7)*

View File

@ -1,35 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ManifoldType](manifoldtype.md)
# Enumeration: ManifoldType
## Index
### Enumeration members
* [Circles](manifoldtype.md#circles)
* [FaceA](manifoldtype.md#facea)
* [FaceB](manifoldtype.md#faceb)
## Enumeration members
### Circles
• **Circles**: = 0
*Defined in [index.d.ts:36](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L36)*
___
### FaceA
• **FaceA**: = 1
*Defined in [index.d.ts:37](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L37)*
___
### FaceB
• **FaceB**: = 2
*Defined in [index.d.ts:38](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L38)*

View File

@ -1,5 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [TOIOutputState](toioutputstate.md)
# Enumeration: TOIOutputState

View File

@ -1,173 +0,0 @@
[Planck.js API Doc](README.md) › [Globals](globals.md)
# Planck.js API Doc
## Index
### Namespaces
* [internal](modules/internal.md)
### Enumerations
* [ContactFeatureType](enums/contactfeaturetype.md)
* [LIMIT_STATE](enums/limit_state.md)
* [ManifoldType](enums/manifoldtype.md)
* [TOIOutputState](enums/toioutputstate.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)
* [Contact](classes/contact.md)
* [ContactEdge](classes/contactedge.md)
* [ContactImpulse](classes/contactimpulse.md)
* [DistanceJoint](classes/distancejoint.md)
* [DistanceProxy](classes/distanceproxy.md)
* [DynamicTree](classes/dynamictree.md)
* [EdgeShape](classes/edgeshape.md)
* [Fixture](classes/fixture.md)
* [FrictionJoint](classes/frictionjoint.md)
* [GearJoint](classes/gearjoint.md)
* [Joint](classes/joint.md)
* [Mat22](classes/mat22.md)
* [Mat33](classes/mat33.md)
* [Math](classes/math.md)
* [MotorJoint](classes/motorjoint.md)
* [MouseJoint](classes/mousejoint.md)
* [PolygonShape](classes/polygonshape.md)
* [Position](classes/position.md)
* [PrismaticJoint](classes/prismaticjoint.md)
* [PulleyJoint](classes/pulleyjoint.md)
* [RevoluteJoint](classes/revolutejoint.md)
* [RopeJoint](classes/ropejoint.md)
* [Rot](classes/rot.md)
* [Settings](classes/settings.md)
* [Shape](classes/shape.md)
* [Solver](classes/solver.md)
* [Sweep](classes/sweep.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)
### Interfaces
* [BodyDef](interfaces/bodydef.md)
* [ContactFeature](interfaces/contactfeature.md)
* [ContactID](interfaces/contactid.md)
* [DistanceJointDef](interfaces/distancejointdef.md)
* [DistanceJointOpt](interfaces/distancejointopt.md)
* [FixtureDef](interfaces/fixturedef.md)
* [FixtureOpt](interfaces/fixtureopt.md)
* [FixtureProxy](interfaces/fixtureproxy.md)
* [FrictionJointDef](interfaces/frictionjointdef.md)
* [FrictionJointOpt](interfaces/frictionjointopt.md)
* [GearJointDef](interfaces/gearjointdef.md)
* [GearJointOpt](interfaces/gearjointopt.md)
* [JointDef](interfaces/jointdef.md)
* [JointEdge](interfaces/jointedge.md)
* [JointOpt](interfaces/jointopt.md)
* [Manifold](interfaces/manifold.md)
* [ManifoldPoint](interfaces/manifoldpoint.md)
* [MassData](interfaces/massdata.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)
* [WeldJointDef](interfaces/weldjointdef.md)
* [WeldJointOpt](interfaces/weldjointopt.md)
* [WheelJointDef](interfaces/wheeljointdef.md)
* [WheelJointOpt](interfaces/wheeljointopt.md)
* [WorldDef](interfaces/worlddef.md)
* [WorldManifold](interfaces/worldmanifold.md)
### Type aliases
* [BodyType](globals.md#bodytype)
* [ContactCallack](globals.md#contactcallack)
* [EvaluateFunction](globals.md#evaluatefunction)
* [ShapeType](globals.md#shapetype)
## Type aliases
### BodyType
Ƭ **BodyType**: *"static" | "kinematic" | "dynamic"*
*Defined in [index.d.ts:148](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L148)*
___
### ContactCallack
Ƭ **ContactCallack**: *function*
*Defined in [index.d.ts:311](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L311)*
#### Type declaration:
▸ (`manifold`: [Manifold](interfaces/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 & object*
**Parameters:**
Name | Type |
------ | ------ |
`manifold` | [Manifold](interfaces/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 |
___
### EvaluateFunction
Ƭ **EvaluateFunction**: *function*
*Defined in [index.d.ts:321](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L321)*
#### Type declaration:
▸ (`manifold`: [Manifold](interfaces/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](interfaces/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 |
___
### ShapeType
Ƭ **ShapeType**: *"circle" | "edge" | "polygon" | "chain"*
*Defined in [shape/index.d.ts:6](https://github.com/shakiba/planck.js/blob/038d425/lib/shape/index.d.ts#L6)*

View File

@ -1,138 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [BodyDef](bodydef.md)
# Interface: BodyDef
## Hierarchy
* **BodyDef**
## Index
### Properties
* [active](bodydef.md#optional-active)
* [allowSleep](bodydef.md#optional-allowsleep)
* [angle](bodydef.md#optional-angle)
* [angularDamping](bodydef.md#optional-angulardamping)
* [angularVelocity](bodydef.md#optional-angularvelocity)
* [awake](bodydef.md#optional-awake)
* [bullet](bodydef.md#optional-bullet)
* [fixedRotation](bodydef.md#optional-fixedrotation)
* [gravityScale](bodydef.md#optional-gravityscale)
* [linearDamping](bodydef.md#optional-lineardamping)
* [linearVelocity](bodydef.md#optional-linearvelocity)
* [position](bodydef.md#optional-position)
* [type](bodydef.md#optional-type)
* [userData](bodydef.md#optional-userdata)
## Properties
### `Optional` active
• **active**? : *boolean*
*Defined in [index.d.ts:290](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L290)*
___
### `Optional` allowSleep
• **allowSleep**? : *boolean*
*Defined in [index.d.ts:288](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L288)*
___
### `Optional` angle
• **angle**? : *number*
*Defined in [index.d.ts:280](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L280)*
___
### `Optional` angularDamping
• **angularDamping**? : *number*
*Defined in [index.d.ts:284](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L284)*
___
### `Optional` angularVelocity
• **angularVelocity**? : *number*
*Defined in [index.d.ts:282](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L282)*
___
### `Optional` awake
• **awake**? : *boolean*
*Defined in [index.d.ts:289](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L289)*
___
### `Optional` bullet
• **bullet**? : *boolean*
*Defined in [index.d.ts:286](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L286)*
___
### `Optional` fixedRotation
• **fixedRotation**? : *boolean*
*Defined in [index.d.ts:285](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L285)*
___
### `Optional` gravityScale
• **gravityScale**? : *number*
*Defined in [index.d.ts:287](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L287)*
___
### `Optional` linearDamping
• **linearDamping**? : *number*
*Defined in [index.d.ts:283](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L283)*
___
### `Optional` linearVelocity
• **linearVelocity**? : *[Vec2](../classes/vec2.md)*
*Defined in [index.d.ts:281](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L281)*
___
### `Optional` position
• **position**? : *[Vec2](../classes/vec2.md)*
*Defined in [index.d.ts:279](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L279)*
___
### `Optional` type
• **type**? : *[BodyType](../globals.md#bodytype)*
*Defined in [index.d.ts:278](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L278)*
___
### `Optional` userData
• **userData**? : *any*
*Defined in [index.d.ts:291](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L291)*

View File

@ -1,48 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ContactFeature](contactfeature.md)
# Interface: ContactFeature
## Hierarchy
* **ContactFeature**
## Index
### Properties
* [indexA](contactfeature.md#indexa)
* [indexB](contactfeature.md#indexb)
* [typeA](contactfeature.md#typea)
* [typeB](contactfeature.md#typeb)
## Properties
### indexA
• **indexA**: *number*
*Defined in [index.d.ts:24](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L24)*
___
### indexB
• **indexB**: *number*
*Defined in [index.d.ts:25](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L25)*
___
### typeA
• **typeA**: *[ContactFeatureType](../enums/contactfeaturetype.md)*
*Defined in [index.d.ts:26](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L26)*
___
### typeB
• **typeB**: *[ContactFeatureType](../enums/contactfeaturetype.md)*
*Defined in [index.d.ts:27](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L27)*

View File

@ -1,30 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ContactID](contactid.md)
# Interface: ContactID
## Hierarchy
* **ContactID**
## Index
### Properties
* [cf](contactid.md#cf)
* [key](contactid.md#readonly-key)
## Properties
### cf
• **cf**: *[ContactFeature](contactfeature.md)*
*Defined in [index.d.ts:31](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L31)*
___
### `Readonly` key
• **key**: *number*
*Defined in [index.d.ts:32](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L32)*

View File

@ -1,115 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [DistanceJointDef](distancejointdef.md)
# Interface: DistanceJointDef
## Hierarchy
↳ [JointDef](jointdef.md)
↳ [DistanceJointOpt](distancejointopt.md)
↳ **DistanceJointDef**
## Index
### Properties
* [bodyA](distancejointdef.md#bodya)
* [bodyB](distancejointdef.md#bodyb)
* [collideConnected](distancejointdef.md#optional-collideconnected)
* [dampingRatio](distancejointdef.md#dampingratio)
* [frequencyHz](distancejointdef.md#frequencyhz)
* [length](distancejointdef.md#length)
* [localAnchorA](distancejointdef.md#localanchora)
* [localAnchorB](distancejointdef.md#localanchorb)
* [userData](distancejointdef.md#optional-userdata)
## Properties
### bodyA
• **bodyA**: *[Body](../classes/body.md)*
*Inherited from [JointDef](jointdef.md).[bodyA](jointdef.md#bodya)*
*Defined in [joint/index.d.ts:56](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L56)*
___
### bodyB
• **bodyB**: *[Body](../classes/body.md)*
*Inherited from [JointDef](jointdef.md).[bodyB](jointdef.md#bodyb)*
*Defined in [joint/index.d.ts:57](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L57)*
___
### `Optional` collideConnected
• **collideConnected**? : *boolean*
*Inherited from [JointOpt](jointopt.md).[collideConnected](jointopt.md#optional-collideconnected)*
*Overrides [JointOpt](jointopt.md).[collideConnected](jointopt.md#optional-collideconnected)*
*Defined in [joint/index.d.ts:52](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L52)*
___
### dampingRatio
• **dampingRatio**: *number*
*Inherited from [DistanceJointOpt](distancejointopt.md).[dampingRatio](distancejointopt.md#dampingratio)*
*Defined in [joint/index.d.ts:102](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L102)*
___
### frequencyHz
• **frequencyHz**: *number*
*Inherited from [DistanceJointOpt](distancejointopt.md).[frequencyHz](distancejointopt.md#frequencyhz)*
*Defined in [joint/index.d.ts:101](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L101)*
___
### length
• **length**: *number*
*Inherited from [DistanceJointOpt](distancejointopt.md).[length](distancejointopt.md#length)*
*Defined in [joint/index.d.ts:103](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L103)*
___
### localAnchorA
• **localAnchorA**: *[Vec2](../classes/vec2.md)*
*Defined in [joint/index.d.ts:107](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L107)*
___
### localAnchorB
• **localAnchorB**: *[Vec2](../classes/vec2.md)*
*Defined in [joint/index.d.ts:108](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L108)*
___
### `Optional` userData
• **userData**? : *any*
*Inherited from [JointOpt](jointopt.md).[userData](jointopt.md#optional-userdata)*
*Overrides [JointOpt](jointopt.md).[userData](jointopt.md#optional-userdata)*
*Defined in [joint/index.d.ts:51](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L51)*

View File

@ -1,65 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [DistanceJointOpt](distancejointopt.md)
# Interface: DistanceJointOpt
## Hierarchy
* [JointOpt](jointopt.md)
↳ **DistanceJointOpt**
↳ [DistanceJointDef](distancejointdef.md)
## Index
### Properties
* [collideConnected](distancejointopt.md#optional-collideconnected)
* [dampingRatio](distancejointopt.md#dampingratio)
* [frequencyHz](distancejointopt.md#frequencyhz)
* [length](distancejointopt.md#length)
* [userData](distancejointopt.md#optional-userdata)
## Properties
### `Optional` collideConnected
• **collideConnected**? : *boolean*
*Inherited from [JointOpt](jointopt.md).[collideConnected](jointopt.md#optional-collideconnected)*
*Defined in [joint/index.d.ts:52](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L52)*
___
### dampingRatio
• **dampingRatio**: *number*
*Defined in [joint/index.d.ts:102](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L102)*
___
### frequencyHz
• **frequencyHz**: *number*
*Defined in [joint/index.d.ts:101](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L101)*
___
### length
• **length**: *number*
*Defined in [joint/index.d.ts:103](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L103)*
___
### `Optional` userData
• **userData**? : *any*
*Inherited from [JointOpt](jointopt.md).[userData](jointopt.md#optional-userdata)*
*Defined in [joint/index.d.ts:51](https://github.com/shakiba/planck.js/blob/038d425/lib/joint/index.d.ts#L51)*

View File

@ -1,111 +0,0 @@
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [FixtureDef](fixturedef.md)
# Interface: FixtureDef
## Hierarchy
* [FixtureOpt](fixtureopt.md)
↳ **FixtureDef**
## Index
### Properties
* [density](fixturedef.md#density)
* [filterCategoryBits](fixturedef.md#filtercategorybits)
* [filterGroupIndex](fixturedef.md#filtergroupindex)
* [filterMaskBits](fixturedef.md#filtermaskbits)
* [friction](fixturedef.md#friction)
* [isSensor](fixturedef.md#issensor)
* [restitution](fixturedef.md#restitution)
* [shape](fixturedef.md#shape)
* [userData](fixturedef.md#userdata)
## Properties
### density
• **density**: *number*
*Inherited from [FixtureOpt](fixtureopt.md).[density](fixtureopt.md#density)*
*Defined in [index.d.ts:137](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L137)*
___
### filterCategoryBits
• **filterCategoryBits**: *number*
*Inherited from [FixtureOpt](fixtureopt.md).[filterCategoryBits](fixtureopt.md#filtercategorybits)*
*Defined in [index.d.ts:140](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L140)*
___
### filterGroupIndex
• **filterGroupIndex**: *number*
*Inherited from [FixtureOpt](fixtureopt.md).[filterGroupIndex](fixtureopt.md#filtergroupindex)*
*Defined in [index.d.ts:139](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L139)*
___
### filterMaskBits
• **filterMaskBits**: *number*
*Inherited from [FixtureOpt](fixtureopt.md).[filterMaskBits](fixtureopt.md#filtermaskbits)*
*Defined in [index.d.ts:141](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L141)*
___
### friction
• **friction**: *number*
*Inherited from [FixtureOpt](fixtureopt.md).[friction](fixtureopt.md#friction)*
*Defined in [index.d.ts:135](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L135)*
___
### isSensor
• **isSensor**: *boolean*
*Inherited from [FixtureOpt](fixtureopt.md).[isSensor](fixtureopt.md#issensor)*
*Defined in [index.d.ts:138](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L138)*
___
### restitution
• **restitution**: *number*
*Inherited from [FixtureOpt](fixtureopt.md).[restitution](fixtureopt.md#restitution)*
*Defined in [index.d.ts:136](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L136)*
___
### shape
• **shape**: *[Shape](../classes/shape.md)*
*Defined in [index.d.ts:145](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L145)*
___
### userData
• **userData**: *any*
*Inherited from [FixtureOpt](fixtureopt.md).[userData](fixtureopt.md#userdata)*
*Defined in [index.d.ts:134](https://github.com/shakiba/planck.js/blob/038d425/lib/index.d.ts#L134)*

Some files were not shown because too many files have changed in this diff Show More