drawon(canvas: FrameBuffer): Comp

Specifies the FrameBuffer the object should be drawn on.

paramcanvas- The FrameBuffer to draw on.

// Draw on another canvas
let canvas = makeCanvas(width(), height());

let beanOnCanvas = add([
    sprite("bean"),
    drawon(canvas.fb),
]);

returnsThe drawon comp.

sincev3000.0

kaplay logo

Misc

Layer