drawon(canvas: FrameBuffer): Comp

Specifies the FrameBuffer the object should be drawn on.

paramcanvas

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

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

Misc