Coder Social home page Coder Social logo

sopiro / physics Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 3.0 68.43 MB

2D Physics engine written in Typescript

Home Page: https://Sopiro.github.io/Physics/

License: MIT License

HTML 4.06% JavaScript 45.61% TypeScript 50.33%
physics-2d gjk physics-engine physics rigidbody-physics typescript javascript

physics's Introduction

2D Rigidbody Physics Engine

2D Rigid body physics engine written in TypeScript.

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

Optimized C++ library: https://github.com/Sopiro/Muli

Samples

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 callbacks
  • Constraint-based simulation
    • Contact constraint
    • Joints: Revolute, Prismatic, Distance, Max distance, Weld, Motor, Line, Angle and Grab
    • Soft constraints
    • 2-contact LCP solver (Block solver)
  • Optimization
    • Constraint islanding
    • Island(Rigid body) sleeping

References

physics's People

Contributors

johngebbie avatar sopiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.