Everything you can do in Glitchlab. Click a category to see all the functions and try live examples.
These control the flow of your program. setup() runs once at the start, draw() runs over and over to animate things, and the rest help you set up your canvas.
9 itemsDraw rectangles, circles, lines, triangles, and text on your canvas. These are the building blocks of everything you'll make!
7 itemsControl how shapes look β their fill color, outline color, and line thickness. Colors can be names like "tomato", hex codes like "#ff0000", or a number 0β255 for shades of gray.
7 itemsRead the mouse position, check if keys are pressed, and respond to user input. These let you make interactive programs and games!
6 itemsUseful math functions for games β random numbers, measuring distance, and keeping values in range.
6 itemsSprites are movable game objects β rectangles with position, size, velocity, and color. Create them, draw them, move them, and check for collisions!
7 itemsCreate tiny pixel art images using text! Each character in a string becomes a colored pixel. Perfect for making game characters, items, and icons without loading any files.
3 itemsAdd sound effects and music to your games! All sounds are created instantly in the browser β no files to load. Play preset effects, musical notes, or drum beats.
3 itemsCreate custom colors with exact red, green, blue, and transparency values. Use this when color names aren't enough!
1 itemMove and rotate the canvas to draw things at angles or offset positions. Always use push() and pop() to save and restore your position!
4 itemsPause and resume the draw() loop. Useful for turn-based games, menus, or when you only want to redraw on user input.
2 itemsTools to help you build and debug your sketches. These are not part of your game β they're overlays that help you understand the coordinate system and position things.
1 itemEvery color name you can use β see them all with swatches so you know exactly what you'll get.
140+ colors