Documentation / spryte / RenderTarget
Class: RenderTarget
Defined in: target.ts:23
An offscreen image you draw into with draw.into(target, fn) and then draw like any image: post-processing, cached static layers, minimaps, trails. Size is in pixels.
On WebGL2 the contents live on the GPU and are lost if the context is lost: redraw them when draw.contextLost turns false again, or redraw every frame.
Constructors
Constructor
new RenderTarget(
width,height,format?):RenderTarget
Defined in: target.ts:24
Parameters
width
number
height
number
format?
TargetFormat = "rgba8"
The storage this target really has, after any fallback.
Returns
RenderTarget
Properties
format
readonlyformat:TargetFormat="rgba8"
Defined in: target.ts:28
The storage this target really has, after any fallback.
height
readonlyheight:number
Defined in: target.ts:26
width
readonlywidth:number
Defined in: target.ts:25