Function makeIndexBufferForType

  • Make an indexData buffer for the creation of a WL.Mesh instance given a specific mesh index type.

    Returns

    A tuple containing the indexData buffer, and the indexType argument to be passed to the WL.Mesh constructor.

    Parameters

    • size: number

      The ammount of indices in the indexData buffer.

    • meshIndexType: UnsignedByte

      The mesh index type, which decides the byte size per index.

    Returns Uint8Array

  • Parameters

    • size: number
    • meshIndexType: UnsignedShort

    Returns Uint16Array

  • Parameters

    • size: number
    • meshIndexType: UnsignedInt

    Returns Uint32Array

  • Parameters

    • size: number
    • meshIndexType: MeshIndexType

    Returns Uint8Array | Uint16Array | Uint32Array

Generated using TypeDoc