Skip to content

Jaymun723/vysics-engine

Repository files navigation

Vysics Engine

⚠️ This project is still in early development !

A 2D impulse based, rigid body physics engine for the web. The goal of this project is not to create a state of the art physics engine. The goal is to create an understandable code that people can read & used to better understand classic physics.

πŸš€ Try it online

Based on:

Implemented & Todos

βœ…: Implemented

πŸ”§: Still needs some work

πŸ”œ: Not implemented but planned

Physics parts

  • Shapes:
    • Circle βœ…
    • Rectangle βœ…
    • Convex Polygons βœ…
    • Any type of Polygons (decomposition in convex polygons) πŸ”œ
  • Forces:
    • Gravity βœ…
    • Drag βœ…
    • Linear / Angular dumping πŸ”œ
    • Constraints πŸ”œ
    • Joints πŸ”œ
  • Integrations:
    • Verlet integration βœ…
  • Collisions:
    • Broad Phase:
      • Brute method βœ…
      • Grid method βœ… πŸ”§
      • R-Trees method πŸ”œ (rbush for inspiration)
    • Narrow phase:
      • SAT βœ…
      • GJK πŸ”œ
    • Resolution based on impulse βœ… πŸ”§
    • Continuous detection πŸ”œ (Physics for Game Programmers; Continuous Collision)

More engine related parts

  • Debug drawings (using Vancas) πŸ”œ
  • Tests (using jest) πŸ”œ (maybe never 😞)
  • Integration with Vancas πŸ”œ
  • Optimisation (not a priority) πŸ”œ

Examples

The playground and more importantly its code are a good example on how to use the vysics engine.

More examples will come after πŸ”œ...

Documentation

W.I.P.

For the moment you may want to generate docs using TypeDoc.

Releases

No releases published

Packages

No packages published

Languages