Skip to content

textmode.js / media / TextmodeTexture

Class: TextmodeTexture

Dynamic texture source for external canvas or video content.

Create one with Textmodifier.createTexture and draw it with Textmodifier.image. The texture refreshes each frame so it can mirror renderers such as three.js, p5.js, Babylon.js, or hydra-synth.

Extends

Extended by

Accessors

AccessorDescription
heightIdeal draw height in grid cells.
originalHeightOriginal source height in pixels.
originalWidthOriginal source width in pixels.
sourceSource element this texture captures.
textureWebGL texture backing this source.
widthIdeal draw width in grid cells.

Methods

MethodDescription
backgroundSet the background color used for transparent pixels.
brightnessRangeCapture only source pixels whose brightness is inside the inclusive byte range.
cellColorSet the cell color used when cellColorMode is 'fixed'.
cellColorModeSet whether cell color is sampled from the source or fixed.
charactersSet the characters used for brightness mapping.
charColorSet the character color used when charColorMode is 'fixed'.
charColorModeSet whether character color is sampled from the source or fixed.
charRotationRotate generated characters.
clearConversionsClear this source's conversion stack and return to single-mode conversion.
conversionModeSelect the conversion mode for this source.
conversionsSet an ordered conversion stack for this source.
disposeDispose of the resource and free associated WebGL textures.
flipXFlip the source horizontally.
flipYFlip the source vertically.
invertEnable or disable source color inversion.