qmetrics.net

Matter.js

JavaScript two-dimensional rigid body physics engine

Matter.js simulates 2D rigid-body physics for browser games and interactive pages. It runs in modern browsers and Node.js with canvas rendering and touch-friendly controls.

Overview

Matter.js is a JavaScript implementation of two-dimensional rigid body dynamics aimed at web projects. Developers add bodies, constraints, and forces to build stacks, vehicles, cloth-like setups, and arcade-style interactions with collision detection across broad, mid, and narrow phases.

The engine supports compound and composite bodies, concave and convex hulls, friction, restitution, sleeping static bodies, gravity, raycasting, and collision filtering. A built-in canvas renderer can draw vectors and textures, while plugins add rounded corners, camera views, time scaling, and extra query helpers.

Demos on the project site illustrate stacks, bridges, soft bodies, slingshot games, and similar scenes. The package installs through npm or Yarn and can be bundled into larger front-end toolchains, though some bundler defaults may affect real-time performance in development.

Matter.js is written as an original JavaScript physics core rather than a port from another language, and targets cross-browser desktop use plus mobile touch input.

Key features

  • Rigid and compound bodies
  • Concave and convex collision shapes
  • Constraints and gravity
  • Friction and restitution
  • Canvas renderer with textures
  • Raycasting and region queries
  • Sleeping and static bodies
  • Plugin extension system

Use cases

  • Browser-based physics games
  • Interactive diagrams and demos
  • Stacking and collision puzzles
  • Soft-body and cloth experiments

Tags

Similar software

Bevy Engine

Rust game engine with ECS architecture

Bevy Engine is a data-driven Rust game engine for 2D and 3D work. It emphasizes modularity, parallel execution, and fast iteration while the project remains under active development.

★ 50k⟳ yesterdayApache-2.0
Open Source Alternative to:Unity

Phaser

HTML5 2D game framework with Canvas and WebGL

Phaser is a JavaScript and TypeScript framework for browser games on desktop and mobile, with scene APIs, physics, animations, and loaders. Games can target embed platforms or wrap for native stores via third-party tooling

★ 40.8k⟳ 3 months agoMIT

raylib

Minimal C library for games and graphical programs

raylib is a C99 graphics and game programming library with no mandatory external dependencies. It suits prototypes, tools, education, and embedded targets across desktop, mobile, and web.

★ 35.8k⟳ todayZlib
Frameworks & PlatformsDesktop/CLI app

wgpu

Cross-platform safe Rust graphics API

wgpu implements the WebGPU-style API in Rust for native and WebAssembly targets. It backs Firefox, Servo, and Deno WebGPU integration and maps to Vulkan, Metal, D3D12, and GLES.

★ 18.7k⟳ todayApache-2.0
Frameworks & PlatformsDesktop/CLI app

GLFW

Cross-platform windowing library for OpenGL and Vulkan

GLFW is a C library that creates windows, graphics contexts, and surfaces while handling input and events. It targets OpenGL, OpenGL ES, and Vulkan on desktop and Unix-like systems.

★ 15.5k⟳ 3 months agoZlib
Frameworks & PlatformsDesktop/CLI app

Bullet3

Real-time collision and multi-physics simulation SDK

Bullet Physics SDK provides real-time collision detection and multi-physics simulation for games, visual effects, VR, robotics, and machine learning. PyBullet Python bindings are recommended for robotics and RL workflows.

★ 14.9k⟳ 1 month agoZlib · open core
Frameworks & PlatformsDesktop/CLI app