Back to browse
Crashcat – Lightweight 3D physics for JavaScript

Crashcat – Lightweight 3D physics for JavaScript

by isaac_mason_·Feb 12, 2026·1 point·0 comments

AI Analysis

●●●BangerWizardryShip ItSolve My Problem

Pure JS physics with CCD and shapecasting, skips the 3MB WASM tax.

Strengths
  • Tree-shakeable TypeScript design means zero bloat for features you don't use.
  • Continuous collision detection prevents fast bodies tunneling through geometry—critical gap in lightweight JS libs.
  • Sane architectural choice: pure JS avoids the nightmare of split state management between WASM and JS.
Weaknesses
  • Pure JS means performance ceiling vs Rapier/Cannon.js; limited to smaller scenes or simpler constraints.
  • No mention of platform support (mobile, VR); constraint docs and real-world game examples would strengthen adoption.
Target Audience

JavaScript game developers and creative technologists building 3D web experiences

Similar To

Cannon.js · Babylon.js physics · Oimo.js

Post Description

Hi HN,

I made crashcat, a lightweight 3D physics library for JavaScript games and creative websites.

Existing WASM physics libraries you can find on npm today are performant, but sometimes you just want a little capsule guy to run around on a mesh without downloading a ~3mb WASM file. They often require manual memory management, which feels a bit alien in JavaScript and is easy to mess up.

My view on WASM is becoming: go all in, or all out. Having physics state in WASM and game state in JavaScript is an architectural wart. Just build a C++ or Rust engine if you want the best result! But if you want something simple in JS, crashcat can serve that better.

Some existing pure JavaScript libraries solve the bundle size problem but miss useful features like shapecasting, CCD (continuous collision detection, prevents fast moving bodies "tunneling" through other bodies), and fast raycasts.

The library is written in TypeScript and designed to be highly tree-shakeable. Only need boxes and spheres? Your bundler will strip out all the collision logic for triangle meshes, convex hulls, etc.

It supports rigid body simulation with various convex shapes, triangle meshes, and compound shapes. It uses GJK/EPA for collision detection, has CCD, broadphase spatial acceleration with a dynamic bounding volume tree, and APIs for world queries like raycasts and shapecasts. It's library agnostic.

Give it a try!

Demo: https://crashcat.dev GitHub: https://github.com/isaac-mason/crashcat

Similar Projects

Developer Tools●●Solid

Soft Body Jiggle Physics

Renderer-agnostic jiggle physics with one-rule deformation: vertex += weight * boneJiggle.

CozyBig Brain
vesperance
202d ago