Back to archiveGenerative Experiments
Matter.js

Physics Collider

A colorful 2D physics sandbox with collisions, drag interaction, motion trails, and periodic anti-gravity bursts.

How It Works

  • Circle, rectangle, and polygon bodies spawn with varied restitution and air drag.
  • Collision events trigger impact flashes and spark strokes on an offscreen trail layer.
  • Nearby bodies draw transient connection lines to create a reactive network effect.
  • Periodic force bursts keep the simulation lively and prevent static settling.

Source Code

tsx