Skip to content

textmode.js / layering / TextmodeLayerOptions

Interface: TextmodeLayerOptions

Options for layers created with TextmodeLayerManager.add.

Properties

PropertyTypeDescription
blendMode?| "normal" | "darken" | "difference" | "exclusion" | "lighten" | "multiply" | "overlay" | "screen" | "additive" | "subtract" | "softLight" | "hardLight" | "colorDodge" | "colorBurn"Blend mode used when compositing this layer. Defaults to 'normal'.
fontSize?numberFont size for the layer's glyph source. Defaults to 16.
fontSource?string | TextmodeFontSource for the font to use in this layer. Can be a URL/path to a font file, or an existing TextmodeFont instance. Existing TextmodeFont inputs are forked per layer to keep resources independent.
offsetX?numberHorizontal layer offset in pixels. Defaults to 0.
offsetY?numberVertical layer offset in pixels. Defaults to 0.
opacity?numberLayer opacity from 0 (transparent) to 1 (opaque). Defaults to 1.
rotationZ?numberZ rotation in degrees around the layer center. Defaults to 0.
visible?booleanWhether the layer is visible. Defaults to true.