textmode.js / layering / TextmodeLayerOptions
Interface: TextmodeLayerOptions
Options for layers created with TextmodeLayerManager.add.
Properties
| Property | Type | Description |
|---|---|---|
blendMode? | LayerBlendMode | Blend mode used when compositing this layer. Defaults to LayerBlendMode.NORMAL. Pass a LayerBlendMode constant such as t.BLEND_ADDITIVE. |
fontSize? | number | Font size for the layer's glyph source. Defaults to 16. |
fontSource? | string | TextmodeFont | Source 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? | number | Horizontal layer offset in pixels. Defaults to 0. |
offsetY? | number | Vertical layer offset in pixels. Defaults to 0. |
opacity? | number | Layer opacity from 0 (transparent) to 1 (opaque). Defaults to 1. |
rotationZ? | number | Z rotation in degrees around the layer center. Defaults to 0. |
visible? | boolean | Whether the layer is visible. Defaults to true. |