Skip to content

Commit 7645e77

Browse files
committed
More tidying and jshint fixing.
1 parent 82fb296 commit 7645e77

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/pixi/extras/Tilemap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ PIXI.Tilemap = function(texture, mapwidth, mapheight, tilewidth, tileheight, lay
7676
var dataSize = mapwidth * mapheight * this.batchDataElement;
7777

7878
// create buffer data for the webgl rendering of this tile
79-
this.buffer = new PIXI.Float32Array( dataSize );
79+
this.buffer = new PIXI.Float32Array(dataSize);
8080

8181
};
8282

@@ -235,10 +235,10 @@ PIXI.Tilemap.prototype._renderBatch = function (renderSession) {
235235
var shader = renderSession.shaderManager.tilemapShader;
236236

237237
// upload the VBO
238-
gl.bufferData( gl.ARRAY_BUFFER, buffer, gl.STATIC_DRAW );
238+
gl.bufferData(gl.ARRAY_BUFFER, buffer, gl.STATIC_DRAW);
239239

240240
// prepare the shader attributes
241-
gl.vertexAttribPointer( shader.aPosition, 4, gl.FLOAT, false, 0, 0 );
241+
gl.vertexAttribPointer(shader.aPosition, 4, gl.FLOAT, false, 0, 0);
242242

243243
// draw the entire VBO in one call
244244
gl.drawArrays(gl.TRIANGLE_STRIP, 0, Math.floor(c / 4));
@@ -275,7 +275,7 @@ PIXI.Tilemap.prototype._renderWholeTilemap = function (renderSession) {
275275
// source texture unit
276276
gl.activeTexture(gl.TEXTURE0);
277277

278-
// check if a texture is dirty..
278+
// check if a texture is dirty...
279279
if(this.texture.baseTexture._dirty[gl.id])
280280
{
281281
renderSession.renderer.updateTexture(this.texture.baseTexture);

src/tilemap/Tilemap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ Phaser.Tilemap.prototype = {
619619
{
620620
var ts = this.tilesets[i];
621621
var li = this.layers[index];
622-
this.createInternalLayer('layer' + index + '_internal_' + i.toString(), ts, li.width, li.height, ts.tileWidth, ts.tileHeight, group);
622+
this.createInternalLayer('layer' + index + '_internal_' + i, ts, li.width, li.height, ts.tileWidth, ts.tileHeight, group);
623623
}
624624

625625
if (this.game.renderType === Phaser.WEBGL)
@@ -637,8 +637,8 @@ Phaser.Tilemap.prototype = {
637637
/**
638638
* Creates a new internal layer on this Tilemap.
639639
*
640-
* Internal layers are used when a Tilemap contains multiple Tilesets with different sized tiles. The tilesets
641-
* each get a separate layer which is only ever referenced internally by the renderer. This approach permits us
640+
* Internal layers are used when a Tilemap contains multiple Tilesets with different sized tiles. The tilesets
641+
* each get a separate layer which is only ever referenced internally by the renderer. This approach permits us
642642
* to handle large tiles at screen edges, and with the correct offset relative to the 'base' tileset regardless
643643
* of size differences between the tiles.
644644
*
@@ -706,7 +706,7 @@ Phaser.Tilemap.prototype = {
706706
if (ts === tileset)
707707
{
708708
// move the tile to this new layer
709-
row.push( tile );
709+
row.push(tile);
710710

711711
// erase it from the original (mixed tileset) layer
712712
this.layers[0].data[y][x] = new Phaser.Tile(layer, -1, x, y, tileWidth, tileHeight);

src/tilemap/TilemapLayerGL.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Phaser.TilemapLayerGL = function (game, tilemap, index, width, height) {
156156
// Cached tilesets from index -> Tileset
157157
tilesets: []
158158

159-
}
159+
};
160160

161161
/**
162162
* The rendering mode (used by PIXI.Tilemap). Modes are: 0 - render entire screen of tiles, 1 - render entire map of tiles

0 commit comments

Comments
 (0)