What problem does it solve?
Matter.js skills help you implement 2D physics interactions reliably instead of guessing engine setup details, rendering configuration, and teardown behavior.
Core Features & Use Cases
- Engine/World setup that works immediately: create an Engine, configure Render (debug or custom), and run a Runner with a minimal, repeatable scaffold.
- Body and constraint composition: add common rigid bodies and constraints using Composite so the simulation behaves as expected.
- Interaction + cleanup patterns: optionally add mouse drag via MouseConstraint and include SPA-friendly teardown steps to prevent leaks or duplicated canvases.
- Use case: build a scroll/interaction-friendly canvas scene (e.g., draggable UI elements, physics-based decorations, or interactive landing-page effects).
Quick Start
Use the matterjs skill to implement a 2D physics canvas by creating a Matter Engine, adding a Matter.Render and Runner, then composing bodies into the world and configuring mouse interaction only if needed.