API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

T

typeMaskSource

@codexo/exojs / rendering / stable

Acceptable mask sources for RenderNode.mask. - `Rectangle` - solid axis-aligned mask. The fastest path: implemented internally via GPU scissor / clip rect; no intermediate render targets are required. - `Texture` - uses the texture's alpha channel as the mask. Stretched to fit the masked node's local bounds. The texture is sampled with no transform of its own; if you need transform/anchor/scale, use a `Sprite(texture)` as the mask source instead. - `RenderTexture` - same alpha-mask semantics as `Texture` for a dynamic/offscreen source. - `RenderNode` - the mask node's full visual output (after its own transform, filters, cacheAsTexture, etc.) is rendered into an intermediate render texture and used as the alpha mask. Acceptable sources include `Sprite`, `Graphics`, `Container`, and any other class that extends `RenderNode`. Bare `SceneNode` instances are structural-only and rejected at compile time. - `null` - no mask. Cost summary: `Rectangle` is O(1) GPU state. The other sources require one or two intermediate render textures plus an alpha-composite pass.

0
props
0
methods
0
events
Import
import { MaskSource } from '@codexo/exojs'

Acceptable mask sources for RenderNode.mask.

- `Rectangle` - solid axis-aligned mask. The fastest path: implemented internally via GPU scissor / clip rect; no intermediate render targets are required. - `Texture` - uses the texture's alpha channel as the mask. Stretched to fit the masked node's local bounds. The texture is sampled with no transform of its own; if you need transform/anchor/scale, use a `Sprite(texture)` as the mask source instead. - `RenderTexture` - same alpha-mask semantics as `Texture` for a dynamic/offscreen source. - `RenderNode` - the mask node's full visual output (after its own transform, filters, cacheAsTexture, etc.) is rendered into an intermediate render texture and used as the alpha mask. Acceptable sources include `Sprite`, `Graphics`, `Container`, and any other class that extends `RenderNode`. Bare `SceneNode` instances are structural-only and rejected at compile time. - `null` - no mask.

Cost summary: `Rectangle` is O(1) GPU state. The other sources require one or two intermediate render textures plus an alpha-composite pass.

Definition1
Source