API reference
Preparing search index…

ConvolutionFilter

Native Rml::ConvolutionFilter with a writable shared float32 kernel.

Each run crosses into Native once. Native owns the kernel; exported views retain their allocation after reinitialisation, collection and shutdown.

Source & inheritance
Member directory6

Constructors

Accessors

Methods

Constructors

Accessors

  • get kernel(): Float32Array

    Contiguous row-major native kernel; initialise before accessing.

    Returns

    Float32Array

    Writable view of (2x+1)(2*y+1) floats.

    Source & inheritance

Methods

  • Rml::ConvolutionFilter::operator[] as a checked shared row.

    Parameters

    index
    number

    Zero-based row index.

    Returns

    Float32Array

    Row retaining its native allocation.

    Source & inheritance
  • Rml::ConvolutionFilter::Run; only destination alpha is changed.

    Parameters

    destination
    Uint8Array

    Writable A8 or RGBA8 bytes.

    dimensions

    Destination region size.

    stride
    number

    Destination bytes per row.

    format

    Destination color format.

    source
    Uint8Array

    Source alpha or RGBA bytes.

    sourceDimensions

    Tightly packed source size.

    sourceOffset

    Source origin relative to destination.

    sourceFormat

    Source color format.

    Returns

    void

    Buffers must be live, nonoverlapping Uint8Array views without concurrent shared backing. Source rows are tightly packed. Finite kernel weights are checked before writes. Negative Sum weights require nonnegative output and incur a native preflight; values above 255 saturate as upstream specifies.

    Source & inheritance
  • Allocate zeroed Native-owned bytes for filter sources or destinations.

    Parameters

    byteLength
    number

    Nonnegative byte count within native int bounds.

    Returns

    Uint8Array

    Writable view retaining only the native allocation.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0