phaser - v4.0.0-rc.4
    Preparing search index...
    type BatchHandlerConfig = {
        fragmentSource?: string;
        indexBufferDynamic?: boolean;
        indicesPerInstance?: number;
        instancesPerBatch?: number;
        maxTexturesPerBatch?: number;
        name: string;
        shaderAdditions?: ShaderAdditionConfig[];
        shaderFeatures?: string[];
        shaderName?: string;
        vertexBufferLayout?: WebGLAttributeBufferLayout | any;
        vertexBufferLayoutAdd?: (WebGLAttributeLayout | any)[];
        vertexBufferLayoutRemove?: string[];
        vertexSource?: string;
        verticesPerInstance?: number;
    }
    Index

    Properties

    fragmentSource?: string

    The fragment shader source code. If not provided, a default quad shader will be used.

    indexBufferDynamic?: boolean

    Whether the index buffer should be created as a dynamic buffer. This is useful for handlers that need to change the index data frequently.

    indicesPerInstance?: number

    The number of indices per instance. This is used to populate and advance the element buffer. Default quads use 6 indices in the TRIANGLE_STRIP pattern [0, 0, 1, 2, 3, 3] to connect independent quads with degenerate topology. The minimum number is 3.

    instancesPerBatch?: number

    The number of instances per batch. Instances are usually quads. This factors into the size of the vertex buffer. The default is based on 16-bit vertex indices, which allows for 65535 vertices. This is divided by verticesPerInstance to get the number of instances. Note that no larger number of vertices is possible with 16-bit indices.

    maxTexturesPerBatch?: number

    The maximum number of textures per batch entry. This defaults to the maximum number of textures supported by the renderer. It is used to compile the shader program. At runtime, the manager may suggest a different number, which is interpreted by the node's updateTextureCount method.

    name: string

    The name of the RenderNode. This should be unique within the manager.

    shaderAdditions?: ShaderAdditionConfig[]

    An array of shader additions to apply to the shader program.

    shaderFeatures?: string[]

    An array of shader features to enable in the shader program.

    shaderName?: string

    The base name to use for the shader program.

    vertexBufferLayout?: WebGLAttributeBufferLayout | any

    The vertex buffer layout for the batch handler. If not provided, a default quad layout will be used. The count property will be determined by the instancesPerBatch and verticesPerInstance properties. The location and bytes properties of each attribute will be determined automatically during initialization. You may provide a Partial WebGLAttributeBufferLayout, which will be filled in automatically during initialization.

    vertexBufferLayoutAdd?: (WebGLAttributeLayout | any)[]

    An array of additional attribute layouts to add to the vertex buffer layout. This is useful for adding attributes to the default shader program. You may provide a Partial WebGLAttributeLayout, which will be filled in automatically during initialization.

    vertexBufferLayoutRemove?: string[]

    An array of attribute names to remove from the vertex buffer layout. This is useful for removing attributes that are not used by the shader program.

    vertexSource?: string

    The vertex shader source code. If not provided, a default quad shader will be used.

    verticesPerInstance?: number

    The number of unique vertices per instance. This is usually 4 for a quad.