awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
liabru avatar

liabru/matter-js

0
View on GitHub↗
18,256 stars·1,988 forks·JavaScript·MIT·31 views

Matter Js

Matter-js is a 2D rigid body physics engine written in JavaScript for simulating realistic physical interactions, collisions, and dynamics in web browsers. It functions as a web physics simulation library that calculates motion, gravity, and constraints for objects rendered on a web canvas.

The library includes a built-in canvas physics visualizer to draw physical bodies, joints, and constraints for debugging and gameplay. It distinguishes itself through a plugin system that supports recursive dependency resolution and internal method patching to inject custom logic into the engine's execution chain.

The engine covers a broad range of simulation capabilities, including rigid body dynamics, environmental force simulation, and the management of complex composite shapes. It provides systems for collision detection and resolution using raycasting and bounding boxes, as well as constraint solving for physical joint connections. Additional tools include world state serialization, mouse-based object manipulation, and real-time performance monitoring.

Features

  • 2D Rigid Body Physics Engines - Calculates realistic movement and collisions for two-dimensional objects on the web using a rigid body physics engine.
  • Friction and Restitution Systems - Processes contact using restitution, air resistance, and static friction to simulate realistic bounces and slides.
  • Verlet Integration - Uses Verlet integration and impulse solvers to handle object collisions and friction.
  • Physics and Simulation - Acts as a specialized physics simulation library for calculating motion and gravity on a web canvas.
  • Game Development - Provides a comprehensive toolkit for building interactive browser games with real-time physical simulations.
  • Game Loops - Provides a dedicated runner to manage the timing and execution of the physics update and rendering cycles.
  • Physical Body Management - Enables precise control over the velocity, position, and center of mass for individual physical objects.
  • Physics Engines - Allows adding complex structural constraints, jointed bodies, and environmental forces to web applications.
  • Collision Detection - Provides a comprehensive system for identifying and resolving contacts between bodies using multi-phase detection and raycasting.
  • Mechanical Joint Constraints - Links physical bodies using joints and limits to restrict movement and define structural relationships.
  • Rigid Body Solvers - Employs a rigid body solver to calculate physical interactions and movement for 2D objects.
  • Composite Body Hierarchies - The physics engine creates compound and composite bodies with concave or convex hulls to represent intricate physical objects.
  • Simulation Loops - Automates the continuous update loop to ensure consistent physical movement and state transitions.
  • Simulation State Integration - Calculates the next state of the physical world by advancing the engine forward through discrete timesteps.
  • Physics - Resolves physical contact and joint constraints using the Gauss-Seidel method.
  • Verlet Integration Loops - Uses a Verlet integration loop to ensure stable and efficient physical movement across discrete timesteps.
  • Force and Impulse Applications - Provides APIs to apply physical forces, gravity, and impulses to modify body behavior.
  • Simulation Visualizers - Provides a visualizer to draw rigid bodies and interactions using wireframes, colors, or sprites for debugging.
  • Plugin Systems - Ships an extensible plugin architecture for defining new behaviors and sharing global configurations.
  • Multi-Phase Collision Detection - Uses broad-phase bounding boxes to prune distant objects before applying narrow-phase geometric intersection tests.
  • Collision Event Handlers - Triggers specific event handlers and callbacks when individual bodies collide within the simulation.
  • Collision Notification Filters - Provides filtering mechanisms to control which physical objects interact and which pass through each other.
  • Fixture Shape Definitions - Supports the construction of complex collision geometries using convex hulls and concave paths.
  • Spatial Querying Systems - Detects object intersections and proximity using raycasting and region tests to trigger game logic.
  • Gauss-Seidel Constraint Solvers - Implements an iterative Gauss-Seidel solver to maintain structural stability between linked rigid bodies.
  • Separating Axis Theorem Collisions - Detects intersections between convex polygons by checking for overlapping projections along potential separating axes.
  • Simulation Time Scaling - Provides controls to adjust the simulation speed, allowing for slow-motion or accelerated physical movement.
  • Simulation Timestepping - Implements adaptive timestepping and sub-stepping to maintain physical stability across varying display refresh rates.
  • Physics Debug Rendering - Draws physical objects to the screen using a built-in visualizer or custom rendering loop.
  • Physics Visualizers - Provides a built-in canvas visualizer to render physical bodies, joints, and constraints.
  • Simulation Viewport Management - Renders simulated bodies to a canvas with support for zooming and translating the physics world view.
  • Environmental Physics Simulators - Simulates environmental forces such as wind, gravity, and magnetism by applying constant forces.
  • Sequential Impulse Solvers - Uses sequential impulse solvers to resolve physical bounces and friction through immediate velocity changes.
  • Runtime Method Patching - Features a system for intercepting internal engine functions to inject custom logic via runtime method patching.
  • Direct Object Manipulation - Enables users to grab, drag, and manipulate physical bodies in real time using a mouse cursor.
  • Game Engines and Frameworks - JavaScript 2D rigid body physics engine.
  • Physics Engines - 2D physics engine for the web.

Star history

Star history chart for liabru/matter-jsStar history chart for liabru/matter-js

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Matter Js

Similar open-source projects, ranked by how many features they share with Matter Js.
  • erincatto/box2derincatto avatar

    erincatto/box2d

    9,505View on GitHub↗

    Box2D is a 2D physics engine and rigid body simulator designed to compute collisions, forces, and joints in a two-dimensional plane. It functions as a collision detection library and a constraint-based physics solver that calculates the movement and interaction of solid objects using mass, friction, and restitution properties. The engine ensures consistency across different hardware architectures through a deterministic trigonometry implementation. It prevents high-speed objects from passing through boundaries using continuous collision detection and time-of-impact interpolation. The system

    C
    View on GitHub↗9,505
  • wellcaffeinated/physicsjswellcaffeinated avatar

    wellcaffeinated/PhysicsJS

    3,705View on GitHub↗

    PhysicsJS is a JavaScript physics engine and 2D rigid body simulator designed to calculate the collisions, constraints, and dynamics of physical bodies. It functions as a modular physics library for simulating the movement and interaction of circular bodies and convex polygons. The engine implements constraint-based dynamics to enforce distance and angle constraints between objects, enabling the creation of articulated structures and linked physics. It utilizes impulse-based resolution to handle collisions and prevent objects from passing through one another. The library provides capabilitie

    JavaScript
    View on GitHub↗3,705
  • dimforge/rapierdimforge avatar

    dimforge/rapier

    5,471View on GitHub↗

    Rapier is a cross-platform physics engine and rigid body dynamics solver designed for 2D and 3D simulations. It functions as a collision detection system and a robotics simulation framework, providing a consistent API for calculating physical interactions across different environments. The engine distinguishes itself with specialized robotics capabilities, including a toolkit for importing URDF and STL models to control multibody chains. It supports precise mechanical movement through inverse kinematics calculations and the application of PID controllers for dynamic body control. The simulat

    Rust
    View on GitHub↗5,471
  • jrouwe/joltphysicsjrouwe avatar

    jrouwe/JoltPhysics

    9,685View on GitHub↗

    JoltPhysics is a high-performance C++ physics engine designed for multi-threaded simulation of 3D rigid bodies and soft bodies. It serves as a deterministic simulation framework, ensuring identical results across different platforms and architectures to support networked synchronization. The engine distinguishes itself through a focus on concurrent execution across multiple CPU cores to handle large numbers of active bodies. It provides specialized systems for vehicle physics, including wheeled and tracked models, as well as soft body physics for deformable objects and cloth. The simulation

    C++c-plus-pluscppgame-development
    View on GitHub↗9,685
See all 30 alternatives to Matter Js→

Frequently asked questions

What does liabru/matter-js do?

Matter-js is a 2D rigid body physics engine written in JavaScript for simulating realistic physical interactions, collisions, and dynamics in web browsers. It functions as a web physics simulation library that calculates motion, gravity, and constraints for objects rendered on a web canvas.

What are the main features of liabru/matter-js?

The main features of liabru/matter-js are: 2D Rigid Body Physics Engines, Friction and Restitution Systems, Verlet Integration, Physics and Simulation, Game Development, Game Loops, Physical Body Management, Physics Engines.

What are some open-source alternatives to liabru/matter-js?

Open-source alternatives to liabru/matter-js include: erincatto/box2d — Box2D is a 2D physics engine and rigid body simulator designed to compute collisions, forces, and joints in a… wellcaffeinated/physicsjs — PhysicsJS is a JavaScript physics engine and 2D rigid body simulator designed to calculate the collisions,… dimforge/rapier — Rapier is a cross-platform physics engine and rigid body dynamics solver designed for 2D and 3D simulations. It… jrouwe/joltphysics — JoltPhysics is a high-performance C++ physics engine designed for multi-threaded simulation of 3D rigid bodies and… avianphysics/avian — Avian is a 2D physics engine and rigid body dynamics simulator designed to calculate physical motion using mass,… melonjs/melonjs — melonJS is a lightweight HTML5 game engine for building 2D games in the browser using JavaScript. It provides a…