textmode.js / Textmodifier / createTexture
Method: createTexture()
ts
createTexture(source): TextmodeTexture;Create a dynamic texture from an external canvas or video element.
Use this to sample canvases or videos rendered by libraries such as three.js, p5.js, Babylon.js, or hydra-synth.
The texture automatically updates each frame to capture the latest content from the source.
Parameters
| Parameter | Type | Description |
|---|---|---|
source | HTMLCanvasElement | HTMLVideoElement | Canvas or video element to capture. |
Returns
A TextmodeTexture that can be drawn with image.