Engine API Reference - v2.12.2
    Preparing search index...

    Class DrawCommands

    Container holding parameters for multi-draw commands.

    Obtain an instance via MeshInstance#setMultiDraw and populate it using DrawCommands#add followed by DrawCommands#update.

    Index

    Accessors

    Methods

    Accessors

    Methods

    • Writes one draw command into the allocated storage.

      Parameters

      • i: number

        Draw index to update.

      • indexOrVertexCount: number

        Number of indices or vertices to draw.

      • instanceCount: number

        Number of instances to draw (use 1 if not instanced).

      • firstIndexOrVertex: number

        Starting index (in indices, not bytes) or starting vertex.

      • OptionalbaseVertex: number = 0

        Signed base vertex (WebGPU only). Defaults to 0.

      • OptionalfirstInstance: number = 0

        First instance (WebGPU only). Defaults to 0.

      Returns void