More tidying and jshint fixing.

This commit is contained in:
Richard Davey 2016-07-20 17:28:19 +01:00
parent 82fb296b2a
commit 7645e773dc
3 changed files with 9 additions and 9 deletions

View file

@ -76,7 +76,7 @@ PIXI.Tilemap = function(texture, mapwidth, mapheight, tilewidth, tileheight, lay
var dataSize = mapwidth * mapheight * this.batchDataElement;
// create buffer data for the webgl rendering of this tile
this.buffer = new PIXI.Float32Array( dataSize );
this.buffer = new PIXI.Float32Array(dataSize);
};
@ -235,10 +235,10 @@ PIXI.Tilemap.prototype._renderBatch = function (renderSession) {
var shader = renderSession.shaderManager.tilemapShader;
// upload the VBO
gl.bufferData( gl.ARRAY_BUFFER, buffer, gl.STATIC_DRAW );
gl.bufferData(gl.ARRAY_BUFFER, buffer, gl.STATIC_DRAW);
// prepare the shader attributes
gl.vertexAttribPointer( shader.aPosition, 4, gl.FLOAT, false, 0, 0 );
gl.vertexAttribPointer(shader.aPosition, 4, gl.FLOAT, false, 0, 0);
// draw the entire VBO in one call
gl.drawArrays(gl.TRIANGLE_STRIP, 0, Math.floor(c / 4));
@ -275,7 +275,7 @@ PIXI.Tilemap.prototype._renderWholeTilemap = function (renderSession) {
// source texture unit
gl.activeTexture(gl.TEXTURE0);
// check if a texture is dirty..
// check if a texture is dirty...
if(this.texture.baseTexture._dirty[gl.id])
{
renderSession.renderer.updateTexture(this.texture.baseTexture);

View file

@ -619,7 +619,7 @@ Phaser.Tilemap.prototype = {
{
var ts = this.tilesets[i];
var li = this.layers[index];
this.createInternalLayer('layer' + index + '_internal_' + i.toString(), ts, li.width, li.height, ts.tileWidth, ts.tileHeight, group);
this.createInternalLayer('layer' + index + '_internal_' + i, ts, li.width, li.height, ts.tileWidth, ts.tileHeight, group);
}
if (this.game.renderType === Phaser.WEBGL)
@ -637,8 +637,8 @@ Phaser.Tilemap.prototype = {
/**
* Creates a new internal layer on this Tilemap.
*
* Internal layers are used when a Tilemap contains multiple Tilesets with different sized tiles. The tilesets
* each get a separate layer which is only ever referenced internally by the renderer. This approach permits us
* Internal layers are used when a Tilemap contains multiple Tilesets with different sized tiles. The tilesets
* each get a separate layer which is only ever referenced internally by the renderer. This approach permits us
* to handle large tiles at screen edges, and with the correct offset relative to the 'base' tileset regardless
* of size differences between the tiles.
*
@ -706,7 +706,7 @@ Phaser.Tilemap.prototype = {
if (ts === tileset)
{
// move the tile to this new layer
row.push( tile );
row.push(tile);
// erase it from the original (mixed tileset) layer
this.layers[0].data[y][x] = new Phaser.Tile(layer, -1, x, y, tileWidth, tileHeight);

View file

@ -156,7 +156,7 @@ Phaser.TilemapLayerGL = function (game, tilemap, index, width, height) {
// Cached tilesets from index -> Tileset
tilesets: []
}
};
/**
* The rendering mode (used by PIXI.Tilemap). Modes are: 0 - render entire screen of tiles, 1 - render entire map of tiles