textmode.js / Textmodifier / shader
Method: shader()
ts
shader(shader): void;Set a custom shader for subsequent drawing operations.
The shader persists until explicitly reset via resetShader or by calling shader(null). This behavior matches p5.js, allowing multiple draw calls with the same shader.
Parameters
| Parameter | Type | Description |
|---|---|---|
shader | TextmodeShader | null | Custom shader to use, or null to reset to the default shader. |
Returns
void