Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BatchProcessor

This class manages a list of mesh batches of different types; it acts as a "meta" MeshBatch that initiates all rendering.

Hierarchy

  • BatchProcessor

Index

Constructors

constructor

Properties

numBatches

numBatches: number

The number of batches currently stored in the BatchProcessor.

onBatchComplete

onBatchComplete: function

This callback is executed whenever a batch is finished and replaced by a new one. The finished MeshBatch is passed to the callback. Typically, this callback is used to actually render it.

Type declaration

    • (MeshBatch: any): void
    • Parameters

      • MeshBatch: any

      Returns void

Methods

addMesh

  • Adds a mesh to the current batch, or to a new one if the current one does not support it. Whenever the batch changes, onBatchComplete is called for the previous one.

    @param mesh the mesh to add to the current (or new) batch. @param state the render state from which to take the current settings for alpha, modelview matrix, and blend mode. @param subset the subset of the mesh you want to add, or null for the complete mesh. @param ignoreTransformations when enabled, the mesh's vertices will be added without transforming them in any way (no matter the value of the state's modelviewMatrix).

    Parameters

    Returns void

clear

  • clear(): void

dispose

  • dispose(): void

fillToken

finishBatch

  • finishBatch(): void

getBatchAt

Protected get_numBatches

  • get_numBatches(): number

Protected get_onBatchComplete

  • get_onBatchComplete(): function

Protected set_onBatchComplete

  • set_onBatchComplete(value: function): function
  • Parameters

    • value: function
        • (MeshBatch: any): void
        • Parameters

          • MeshBatch: any

          Returns void

    Returns function

      • (MeshBatch: any): void
      • Parameters

        • MeshBatch: any

        Returns void

trim

  • trim(): void

Generated using TypeDoc