missing-user / physicsSim

Simple JS physics simulation with colliding primitives, that uses a spatial hash for efficiency

Home Page:https://missing-user.github.io/physicsSim

Repository from Github https://github.commissing-user/physicsSimRepository from Github https://github.commissing-user/physicsSim

Physics Simulation

My attempt at implementing a spatial hashing algorithm for 2D physics in JS. The algorithms uses circles, points and axis aligned rectangles as primitives and detects overlaps efficiently. Currently only simple spring forces are supported for the primitives. The solver is a semi implicit Euler implementation, so energy isn't perfectly conserved due to rounding errors

Check it out

About

Simple JS physics simulation with colliding primitives, that uses a spatial hash for efficiency

https://missing-user.github.io/physicsSim


Languages

Language:JavaScript 69.3%Language:HTML 22.2%Language:CSS 8.5%