# schteppe/cannon.js

A lightweight 3D physics engine written in JavaScript.

Repository: https://github.com/schteppe/cannon.js
Canonical: https://ross.abutalabs.com/products/cannonjs
Homepage: http://schteppe.github.com/cannon.js
Language: JavaScript
License: MIT
License Family: permissive
Topics: physics-engine, javascript
Last push: 2023-08-04T10:35:17+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": 5355, "days_push": 1125, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4995, forks 740 (observed 2026-08-28T04:09:04.396088+00:00)

## What it is
cannon.js is a lightweight 3D rigid body physics engine written in JavaScript for the web. It provides collision detection, friction, restitution, constraints, and a Gauss-Seidel constraint solver, usable in browsers or Node.js.

## Use cases
- add physics to a three.js 3D scene
- simulate falling spheres and rigid bodies in the browser
- build a simple 3D game with gravity and collisions
- create hinge or ball-socket joints between bodies
- run a physics simulation headlessly in Node.js

## When to choose
- you need a small, pure-JavaScript physics engine with no native dependencies
- you are building browser-based 3D games or visualizations with three.js
- you need basic rigid body dynamics, constraints, and collision detection

## When to avoid
- you need high-performance or highly accurate physics for large scenes (consider ammo.js or Rapier)
- you need soft body or advanced fluid simulation
- you need a project under very active development

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

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

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:04.396088+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-29T18:17:37.596781+00:00, confidence not recorded.
  - readme: https://github.com/schteppe/cannon.js (fetched 2026-08-28T04:09:04.396088+00:00, sha a833973f0e8c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
