Type Alias CanvasShaderType<T, C>
CanvasShaderType<T, C>: CoreShaderType<T> & { render: ((this: CanvasShaderNode<T, C>,
ctx: CanvasRenderingContext2D,
quad: QuadOptions,
renderContext: (() => void)) => void); saveAndRestore?: boolean; update?: ((this: CanvasShaderNode<T, C>,
node: CoreNode) => void); } Type Parameters
- T extends object = Record<string, unknown>
- C extends object = Record<string, unknown>
Type declaration
render: ((this: CanvasShaderNode<T, C>, ctx: CanvasRenderingContext2D, quad: QuadOptions, renderContext: (() => void)) => void)
- (this, ctx, quad, renderContext): void
Parameters
- this: CanvasShaderNode<T, C>
- ctx: CanvasRenderingContext2D
- quad: QuadOptions
- renderContext: (() => void)
Returns void
Optional
saveAndRestore?: boolean
Optional
update?: ((this: CanvasShaderNode<T, C>, node: CoreNode) => void)
- (this, node): void
Returns void
Set this to true when using ctx functions that scale, clip, rotate, etc..