# schteppe/p2.js

JavaScript 2D physics library

Repository: https://github.com/schteppe/p2.js
Canonical: https://ross.abutalabs.com/products/p2js
Language: JavaScript
License: NOASSERTION
License Family: other
Topics: physics-engine, physics, gamedev
Last push: 2022-07-09T03:13:18+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4961, "days_push": 1516, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2691, forks 330 (observed 2026-08-28T04:07:10.965076+00:00)

## What it is
p2.js is a 2D rigid body physics engine written in JavaScript, providing collision detection, friction, restitution, springs, motors, and constraints. It is designed for use in browser-based games and interactive applications.

## Use cases
- simulate 2d physics in a browser game
- rigid body collision detection in javascript
- add springs and constraints to a 2d game
- build a physics-based puzzle game in html5
- simulate ragdoll or vehicle physics in javascript

## When to choose
- you need a dedicated 2D physics engine for a JavaScript game
- you want collision detection, constraints, and springs out of the box
- you are building browser-based interactive physics demos

## When to avoid
- you need 3D physics simulation
- you need a library with active development and recent releases
- you need a full game engine with rendering built in

## Facets
- artifact type: library
- maturity: maintenance
- function: game-engine, simulation, graphics
- domain: simulation, web-development
- platform: browser, cross-platform
- tags: physics-engine, 2d-physics, rigid-body, collision-detection, gamedev, game-development, javascript, nodejs

## Member repositories
- schteppe/p2.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:10.965076+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:16:33.978952+00:00, confidence not recorded.
  - readme: https://github.com/schteppe/p2.js (fetched 2026-08-28T04:07:10.965076+00:00, sha 4517d3bc1252)
- Data as of 2026-08-30T08:39:29.467469+00:00.
