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
- Graphing - plot helpers for 2D and 3D graphs.
- Objects and shapes - constructors like
sphere(),line(), andtext(). - Theme and colors - adaptive colors and visual styling.
- DOM overlays - UI elements that layer on top of the canvas.
- Utilities - camera controls, updates, input, and scene helpers.