
Fast
Modern ES6 architecture. WebGL renderer with Canvas fallback. Web Audio with 3D spatial sound.
Free
Released under the permissive MIT License. No cost. Forever.
Standalone
Zero dependencies. Compatible with all major browsers and mobile devices. Under 100kb gzipped.
Why melonJS?
Canvas2D-Inspired API
The rendering system follows familiar HTML5 Canvas patterns —
save, restore, translate, rotate.
If you've used the Canvas API, you already know melonJS.
True Renderer Abstraction
Write your game once, run it on WebGL or Canvas2D. Automatic GPU fallback with zero code changes required.
Batteries Included
Physics, tilemaps, 3D mesh rendering, custom shaders, spatial audio, particles and UI — all in one package with no external dependencies.
Powerful Level Design
Design your levels visually with the Tiled map editor. melonJS natively supports orthogonal, isometric, and hexagonal maps with multiple layers, parallax scrolling, and more.
Try it Live
Jump right into a melonJS game — playable in your browser.
Get Started in Seconds
Scaffold a new project with a single command:
npm create melonjs@latest my-game
cd my-game
npm install
npm run dev Or use the API directly for a quick Hello World:
import { Application, Text } from "melonjs";
// create a new melonJS application
const app = new Application(1218, 562, {
parent: "screen",
scale: "auto",
});
// add a text display object
app.world.addChild(new Text(609, 281, {
font: "Arial",
size: 160,
fillStyle: "#FFFFFF",
textBaseline: "middle",
textAlign: "center",
text: "Hello World !",
})); Features
- Fast WebGL & Canvas rendering across desktop and mobile
- Web Audio with 3D spatial sound
- Sprites, animations, tinting, masking & 2D lighting
- Built-in 2D physics & collision detection
- Tiled map editor integration (orthogonal, isometric, hexagonal)
- Multi-input: mouse, touch, keyboard, gamepad & accelerometer
- Camera system with effects (shake, fade, flash)
- UI toolkit with drag-and-drop support
- Tweens, transitions & particle effects
- 3D mesh rendering with OBJ/MTL model loading & depth testing
- Custom shader effects for per-sprite WebGL rendering
- State manager, asset loader & plugin system
- Under 100kb gzipped — zero dependencies
Compatibility
Compatible with all major browsers and mobile devices
| Browser | Version | Status |
|---|---|---|
| Chrome / Edge | 80+ | ✓ |
| Firefox | 80+ | ✓ |
| Safari | 14+ | ✓ |
| Opera | 67+ | ✓ |
| Chrome Mobile | 80+ | ✓ |
| iOS Safari | 14+ | ✓ |