API reference
Preparing search index…

Native-owned Rml::Mesh with shared vertex and index allocations.

Views survive collection and runtime shutdown. makeGeometry validates and snapshots nonempty meshes, then empties the source. Previously exported views remain independent of the immutable geometry.

Source & inheritance
Member directory9

Constructors

Properties

Accessors

Methods

Constructors

  • Allocate value-initialized native vertex and index vectors.

    Parameters

    vertexCount
    number = 0

    Number of vertices, default zero.

    indexCount
    number = 0

    Number of indices, default zero.

    Returns

    Source & inheritance

Properties

vertexStride: 20

Byte stride of the pinned native Rml::Vertex layout.

Source & inheritance

Accessors

  • get indices(): Int32Array

    Writable Rml::Mesh::indices with three vertex indices per triangle.

    Returns

    Int32Array

    View retaining the current native index allocation.

    Source & inheritance
  • get isValid(): boolean

    Rml::Mesh::operator bool; checks only whether indices are nonempty.

    Returns

    boolean

    Native truth value; makeGeometry performs full validation.

    Source & inheritance
  • get vertexCount(): number

    Native vertex vector size.

    Returns

    number

    Current vertex count.

    Source & inheritance
  • get vertices(): Uint8Array

    Writable Rml::Mesh::vertices bytes: float32 x/y at 0/4, premultiplied RGBA bytes at 8–11, float32 u/v at 12/16, repeated every 20 bytes.

    Returns

    Uint8Array

    View retaining the current native allocation.

    Source & inheritance

Methods

  • Compare native Rml::Mesh vertices and indices.

    Parameters

    other

    Mesh to compare.

    Returns

    boolean

    Native operator== result.

    Source & inheritance
  • Map one Rml::Mesh::vertices entry without copying its allocation.

    Parameters

    index
    number

    Zero-based vertex index within the current allocation.

    Returns

    Live fields retaining this allocation after resize or transfer.

    Source & inheritance
  • Resize native vectors in fresh storage, preserving their common prefix.

    Parameters

    vertexCount
    number

    New vertex count; new vertices are value-initialized.

    indexCount
    number

    New index count; new indices are zeroed.

    Returns

    void

    Previously returned views retain the old storage; obtain new views to edit the resized mesh.

    Source & inheritance

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