Skip to content

johngebbie/Physics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Rigid Body Physics Engine

2D Rigid body physics engine written in TypeScript.

Live demo: https://sopiro.github.io/Physics/
Video: https://youtu.be/ROAqjE40pxU

Examples

example1 example2
example3 example4

Features

  • Real-time interactive simulation
  • Rigid body
    • Shapes: Convex polygons and circles
    • Density-based body definition
  • Collision detection
    • Broad phase, narrow phase collision detection
    • Dynamic AABB volume tree for spatial partitioning
    • Computing minimum distance between two convex shapes (GJK)
    • Contact manifold generation (EPA)
  • Collision resolution
    • Impulse-based collision response
    • Friction and restitution
    • Iterative solver (Sequential impulses)
    • Collision callback
  • Constraint-basd simulation
    • Contact constraint
    • Joints: Revolute, Prismatic, Distance, Max distance, Weld, Motor, Line, Angle, Grab
    • Soft constraints
    • Block solver
  • Optimization
    • Constraint islanding
    • Island(Rigid body) sleeping

References

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 50.3%
  • JavaScript 45.6%
  • HTML 4.1%