WebGLSpriteBatch Class
Constructor
WebGLSpriteBatch
()
private
Item Index
Methods
Methods
_CompileShader
(
Any
private
-
gl
-
shaderSrc
-
shaderType
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
shaderSrc
Array -
shaderType
Number
Returns:
Any:
begin
(
-
renderSession
Parameters:
-
renderSession
ObjectThe RenderSession object
CompileFragmentShader
(
Any
-
gl
-
shaderSrc
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
shaderSrc
Array
Returns:
Any:
compileProgram
(
Any
-
gl
-
vertexSrc
-
fragmentSrc
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
vertexSrc
Array -
fragmentSrc
Array
Returns:
Any:
CompileVertexShader
(
Any
-
gl
-
shaderSrc
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
-
shaderSrc
Array
Returns:
Any:
destroy
()
Destroys the SpriteBatch.
end
()
flush
()
Renders the content and empties the current batch.
initDefaultShaders
()
private
renderTilingSprite
(
-
sprite
Renders a TilingSprite using the spriteBatch.
Parameters:
-
sprite
TilingSpritethe tilingSprite to render
setContext
(
-
gl
Parameters:
-
gl
WebGLContextthe current WebGL drawing context
start
()
stop
()
Properties
blendModes
Array
currentBatchSize
Number
dirty
Boolean
drawing
Boolean
indices
Uint16Array
Holds the indices
lastIndexCount
Number
shaders
Array
size
Number
The number of images in the SpriteBatch before it flushes
sprites
Array
textures
Array
vertices
Float32Array
Holds the vertices