mwg API
    Preparing search index...

    Class ColorTransformBatcher

    The Pixi batcher extension TintedSprite (and everything built on it) renders through - see the module doc comment above for what it adds and why.

    import { ColorTransformBatcher } from '@datamoc/mw_games/two-d/render';

    // registered automatically by TintedSprite.ts; naming the class directly is only ever
    // needed to check which batcher an object ended up in, or in Pixi extension diagnostics
    console.log(ColorTransformBatcher.extension.name); // 'mwg-color-transform'

    Hierarchy

    • Batcher
      • ColorTransformBatcher
    Index
    geometry: Geometry = ...

    The geometry used by this batcher. Must be implemented by subclasses.

    name: "mwg-color-transform" = ColorTransformBatcher.extension.name

    The name of the batcher. Must be implemented by subclasses.

    shader: Shader

    The shader used by this batcher. Must be implemented by subclasses. this can be shared by multiple batchers of the same type.

    vertexSize: number = VERTEX_SIZE

    The vertex size of the batcher. Must be implemented by subclasses.

    • Packs the attributes of a BatchableMeshElement into the provided views. Must be implemented by subclasses.

      Parameters

      • element: MeshElement

        The BatchableMeshElement to pack.

      • float32View: Float32Array

        The Float32Array view to pack into.

      • uint32View: Uint32Array

        The Uint32Array view to pack into.

      • index: number

        The starting index in the views.

      • textureId: number

        The texture ID to use.

      Returns void

    • Packs the attributes of a BatchableQuadElement into the provided views. Must be implemented by subclasses.

      Parameters

      • element: QuadElement

        The BatchableQuadElement to pack.

      • float32View: Float32Array

        The Float32Array view to pack into.

      • uint32View: Uint32Array

        The Uint32Array view to pack into.

      • index: number

        The starting index in the views.

      • textureId: number

        The texture ID to use.

      Returns void