Documentation / spryte / SharedRenderer
Interface: SharedRenderer
Defined in: shared.ts:12
spryte drawing on a WebGL2 context another engine owns. See createSharedRenderer.
Properties
draw
readonlydraw:Draw
Defined in: shared.ts:13
Methods
target()
target(
framebuffer,width,height):void
Defined in: shared.ts:19
Where the next draw.begin() draws: the host's framebuffer (null for the canvas) and its size in pixels. Call it when the host's destination changes, such as a filter or post-processing pass that renders into its own framebuffer. Until it's called, drawing goes to the canvas at its current size.
Parameters
framebuffer
WebGLFramebuffer | null
width
number
height
number
Returns
void