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
-
Notifications
You must be signed in to change notification settings - Fork 0
Simple JS physics simulation with colliding primitives, that uses a spatial hash for efficiency
missing-user/physicsSim
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple JS physics simulation with colliding primitives, that uses a spatial hash for efficiency