Class MeshBatch<O>

Type Parameters

  • O

Hierarchy (View Summary)

Implements

Constructors

Properties

_entries: MeshBatchEntry<O>[] = []
entries: readonly MeshBatchEntry<O>[] = ...

Entries in this batch (in order of storage).

entryChanges: BatchEntryChange[] = []

Array containing an item for each entry in this batch. Allows using entry index to look up it's associated change.

firstChangedEntryIndex?: number

Entry index of the first changed entry. Allows skipping unchanged entries before it.

initialized: boolean = false
lastChangedEntryIndex?: number

Entry index of the last changed entry. Allows stopping change-application early.

objectEntries: Map<O, MeshBatchEntry<O>> = ...

Map from object to entry. For lookup only.

Batch storage. Entry updates/changes will also be applied to the storage

Accessors

  • get size(): number

    Size of the batch. The unit depends on how the batch is used in its batcher.

    Returns number

  • set size(size: number): void

    Parameters

    • size: number

    Returns void

Methods

  • Apply changes and try to do the least amount of work for it.

    With a lot of changes per tick this becomes a performance-critical method.

    Returns void