๐ŸŽจ Pixel Editor

โ–ฆ ร—
Click/drag to draw โ€ข Right-click to pick color โ€ข Scroll to zoom

Sprites

Code Editor

game.js

Game API

update(dt) Called every frame. dt = delta time in seconds.
draw(ctx) Called every frame to render.
init() Called once at game start.
keys Object with keyboard state (keys.Space, keys.ArrowLeft)
mouse Mouse state (mouse.x, mouse.y, mouse.left)
sprites Object with sprite canvases by name.
audio(name) Play a sound. 10 built-in arcade sounds, no file needed: piece, saut, tir, explosion, degat, bonus, victoire, perdu, clic, rebond. See the Docs โ†’ Audio & Son tab.
rand(min, max) Random float between min and max.
clamp(val, min, max) Clamp value between min and max.
rectCollide(a, b) AABB collision test between two rects {'{x,y,w,h}'}.
canvas The game canvas element.

Scene

Console

โ–ฒ
โ—€
โ–ผ
โ–ถ
A
B

Documentation

Sources

Projects