MCPcopy
hub / github.com/piqnt/planck.js

github.com/piqnt/planck.js @main sqlite

repository ↗ · DeepWiki ↗
1,437 symbols 4,030 edges 152 files 515 documented · 36%
README

Planck.js

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 editable code in JavaScript/TypeScript
  • Providing idiomatic JavaScript/TypeScript API
  • Optimizing the library for web and mobile platforms

Documentation

Examples

Discord

Made with Planck.js

Report Issues

To speed up resolving issues, please provide testbed code to reproduce the issue.

Extension points exported contracts — how you extend this code

MaxSeparation (Interface)
@internal
src/collision/shape/CollidePolygon.ts
ComputedStyle (Interface)
(no doc) [2 implementers]
testbed/world-view/ComputedStyle.ts
AsteroidPhysicsListener (Interface)
(no doc) [1 implementers]
example/Asteroid.ts
ShufflePhysicsListener (Interface)
(no doc) [1 implementers]
example/Shuffle.ts
BreakoutPhysicsListener (Interface)
(no doc) [1 implementers]
example/Breakout.ts
SoccerPhysicsListener (Interface)
(no doc) [1 implementers]
example/Soccer.ts
BilliardPhysicsListener (Interface)
(no doc) [1 implementers]
example/8-Ball.ts
TestbedInterface (Interface)
(no doc) [1 implementers]
src/util/Testbed.ts

Core symbols most depended-on inside this repo

createFixture
called by 276
src/dynamics/Body.ts
createBody
called by 231
src/dynamics/World.ts
crossVec2Vec2
called by 126
src/common/Vec2.ts
setVec2
called by 106
src/common/Vec2.ts
sub
called by 102
src/common/Vec2.ts
neo
called by 92
src/common/Rot.ts
assert
called by 85
src/collision/AABB.ts
zero
called by 82
src/common/Vec2.ts

Shape

Method 984
Class 200
Function 165
Interface 78
Enum 10

Languages

TypeScript100%

Modules by API surface

src/dynamics/Body.ts74 symbols
src/common/Vec2.ts56 symbols
example/Breakout.ts56 symbols
src/dynamics/World.ts53 symbols
src/dynamics/Contact.ts47 symbols
src/collision/Distance.ts43 symbols
src/dynamics/Fixture.ts41 symbols
src/common/Matrix.ts38 symbols
src/collision/DynamicTree.ts38 symbols
example/Asteroid.ts38 symbols
src/dynamics/joint/PrismaticJoint.ts34 symbols
src/dynamics/joint/RevoluteJoint.ts33 symbols

Dependencies from manifests, versioned

@changesets/cli2.29.8 · 1×
@eslint/js9.39.2 · 1×
@types/chai5.2.3 · 1×
@vitest/coverage-v84.0.18 · 1×
ajv8.17.1 · 1×
eslint9.39.2 · 1×
eslint-config-prettier10.1.8 · 1×
prettier3.8.1 · 1×
rimraf6.1.2 · 1×
rollup-plugin-license3.6.0 · 1×
sinon21.0.1 · 1×
terser5.46.0 · 1×

For agents

$ claude mcp add planck.js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact