Renamed Renderer spriteBatch to just batch.

This commit is contained in:
photonstorm 2016-10-25 14:30:29 +01:00
parent a271a52ec7
commit 8de992175e
4 changed files with 10 additions and 10 deletions

View file

@ -24,7 +24,7 @@ Phaser.Renderer.WebGL.GameObjects.Image = {
var tint = src.color._glTint;
var bg = src.color._glBg;
renderer.spriteBatch.addToBatch(src, verts, uvs, index, alpha, tint, bg);
renderer.batch.add(src, verts, uvs, index, alpha, tint, bg);
/*

View file

@ -20,7 +20,7 @@ Phaser.Renderer.WebGL.GameObjects.Sprite = {
// Would be good to get this down to 1 check, or even none.
if (src._mask || src._filters)
{
var spriteBatch = renderer.spriteBatch;
var spriteBatch = renderer.batch;
// push filter first as we need to ensure the stencil buffer is correct for any masking
if (src._filters)

View file

@ -366,7 +366,7 @@ Phaser.Renderer.WebGL.BatchManager.prototype = {
}
},
addToBatch: function (gameObject, verts, uvs, textureIndex, alpha, tintColors, bgColors)
add: function (gameObject, verts, uvs, textureIndex, alpha, tintColors, bgColors)
{
// console.log('addToBatch', gameObject.frame.name);

View file

@ -140,10 +140,10 @@ Phaser.Renderer.WebGL = function (game)
/**
* Manages the rendering of sprites
* @property spriteBatch
* @property batch
* @type WebGLSpriteBatch
*/
this.spriteBatch = new Phaser.Renderer.WebGL.BatchManager(this, 2000);
this.batch = new Phaser.Renderer.WebGL.BatchManager(this, 2000);
/**
* Manages the filters
@ -234,7 +234,7 @@ Phaser.Renderer.WebGL.prototype = {
gl.enable(gl.BLEND);
this.shaderManager.init();
this.spriteBatch.init();
this.batch.init();
this.filterManager.init();
this.stencilManager.init();
@ -453,7 +453,7 @@ Phaser.Renderer.WebGL.prototype = {
// console.log('render');
this.spriteBatch.begin();
this.batch.begin();
// this.filterManager.begin();
@ -461,7 +461,7 @@ Phaser.Renderer.WebGL.prototype = {
stage.render(this, stage);
this.spriteBatch.end();
this.batch.end();
// debugger;
@ -775,12 +775,12 @@ Phaser.Renderer.WebGL.prototype = {
this.offset = null;
this.shaderManager.destroy();
this.spriteBatch.destroy();
this.batch.destroy();
this.maskManager.destroy();
this.filterManager.destroy();
this.shaderManager = null;
this.spriteBatch = null;
this.batch = null;
this.maskManager = null;
this.filterManager = null;