Base class for sprite batches

Hierarchy

Implements

Constructors

  • Parameters

    • context: default
    • capacity: number
    • depthOffset: number
    • yOffset: number
    • enableAlphaMultiplcation: boolean
    • enforceBeginAndEnd: boolean

    Returns SpriteBatchBase

Properties

_setup: boolean
begun: boolean
capacity: number
colorArray: Uint8Array
colorBuffer: WebGLBuffer
context: default
dataArray: Float32Array
dataBuffer: WebGLBuffer
depthOffset: number
enableAlphaMultiplcation: boolean
enforceBeginAndEnd: boolean
inverseSpriteTextureSize: undefined | default
shaderProgram: default
spriteCount: number
texCordBuffer: WebGLBuffer
texSprites: undefined | WebGLTexture
yOffset: number

Methods

  • Parameters

    • tileX: number
    • tileY: number
    • spriteSize: number
    • sourceX: number
    • sourceY: number
    • sourceSize: number
    • offsetX: number = 0
    • offsetY: number = 0
    • red: number = 255
    • green: number = 255
    • blue: number = 255
    • alpha: number = 255

    Returns undefined | number

  • Returns void

  • Returns void

  • Returns void

  • Binds sprites to be included in the next render

    Returns

    number of sprites being rendered

    Returns number

  • Parameters

    • index: number

    Returns boolean

  • Parameters

    • x: number
    • y: number
    • tileScale: number
    • viewportWidth: number
    • viewportHeight: number

    Returns void

  • Returns void

  • Parameters

    • index: number
    • tileX: number
    • tileY: number
    • spriteSize: number
    • sourceX: number
    • sourceY: number
    • sourceSize: number
    • offsetX: number = 0
    • offsetY: number = 0
    • red: number = 255
    • green: number = 255
    • blue: number = 255
    • alpha: number = 255

    Returns void

  • Parameters

    Returns Promise<void>

Generated using TypeDoc