API Docs for: 1.1.1
Show:

Kiwi.Renderers.TextureAtlasRenderer Class

The Renderer object for rendering Texture Atlases

Constructor

Kiwi.Renderers.TextureAtlasRenderer

(
  • gl
  • shaderManager
  • [params=null]
)
Kiwi.Renderers.TextureAtlasRenderer

Parameters:

Methods

_collateVertexAttributeArrays

(
  • gl
  • entity
  • camera
)
public

Collates all xy and uv coordinates into a buffer ready for upload to viceo memory

Parameters:

  • gl WebGLRenderingContext
  • entity Kiwi.Entity
  • camera Camera

_generateIndices

(
  • numQuads
)
private

Generates quad indices

Parameters:

  • numQuads Number

clear

(
  • gl
)
public

Clears the vertex buffer.

Parameters:

  • gl WebGLRenderingContext

concatBatch

(
  • vertexItems
)
public

Adds an array of precalculated xyuv values to the item array

Parameters:

  • vertexItems Array

disable

(
  • gl
)
public

Disables the renderer

Parameters:

  • gl WebGLRenderingContext

draw

(
  • gl
)
public

Makes a draw call, this is where things actually get rendered to the draw buffer (or a framebuffer).

Parameters:

  • gl WebGLRenderingContext

enable

(
  • gl
  • [params=null]
)
public

Enables the renderer ready for drawing

Parameters:

  • gl WebGLRenderingContext
  • [params=null] Object optional

setShaderPair

(
  • shaderPair
)
public

Defined in src\render\renderers\TextureAtlasRenderer.ts:182

Available since 1.1.0

Sets shader pair by name

Parameters:

  • shaderPair String

updateStageResolution

(
  • gl
  • res
)
public

Updates the stage resolution uniforms

Parameters:

  • gl WebGLRenderingContext
  • res Float32Array

updateTextureSize

(
  • gl
  • size
)
public

Updates the texture size uniforms

Parameters:

  • gl WebGLRenderingContext
  • size Float32Array

Properties

_maxItems

Number private

The maximum number of items that can be rendered by the renderer (not enforced)

_shaderPairName

String private

Defined in src\render\renderers\TextureAtlasRenderer.ts:50

Available since 1.1.0

The reference to the shaderPair.

_vertexBuffer

Kiwi.Renderers.GLArrayBuffer private

The Vertex Buffer

RENDERER_ID

Array public static

The identifier for this renderer.

shaderPair

Kiwi.Shaders.TextureAtlasShade public

The shaderPair that this renderer uses.