SpriteBatch for WebGl 2

Hierarchy

Constructors

  • Parameters

    • context: WebGlRendererContext
    • id: string
    • capacity: number
    • depthOffset: number
    • yOffset: number
    • enableAlphaMultiplcation: boolean
    • enforceBeginAndEnd: boolean

    Returns default

Properties

_setup: boolean
begun: boolean
capacity: number
colorArray: Uint8Array
colorBuffer: WebGLBuffer
dataArray: Float32Array
dataBuffer: WebGLBuffer
depthOffset: number
enableAlphaMultiplcation: boolean
enforceBeginAndEnd: boolean
id: string
inverseSpriteTextureSize: undefined | default
requiresSubpixels: boolean
shaderProgram: default
spriteCount: number
texCordBuffer: WebGLBuffer
texSprites: undefined | WebGLTexture
vertexArray: WebGLVertexArrayObject
yRenderOffset: 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

  • 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
    • Optional blend: boolean

    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

Generated using TypeDoc