Ctx

The Ctx object is the drawing context you receive inside the renderer callback. It collects all of the core helpers for creating objects, configuring the scene, and interacting with input and UI.

import { Renderer } from "meowshapes";

const renderer = new Renderer((ctx) => {
	ctx.grid();
	ctx.sphere(32);
});

If you're only using the online editor, most of these functions will be available without the ctx. prefix.


Overview