Skip to content

Commit da651dc

Browse files
committed
Fixed require filename
1 parent 1839e58 commit da651dc

4 files changed

Lines changed: 34 additions & 31 deletions

File tree

src/tilemaps/Tile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @license {@link https://opensource.org/licenses/MIT|MIT License}
55
*/
66

7-
var CONST = require('./const.js');
7+
var CONST = require('./const');
88
var Class = require('../utils/Class');
99
var Components = require('../gameobjects/components');
1010
var Rectangle = require('../geom/rectangle');

src/tilemaps/components/CullTiles.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* @license {@link https://opensource.org/licenses/MIT|MIT License}
55
*/
66

7-
var CONST = require('../../const.js');
8-
var SnapFloor = require('../../math/snap/SnapFloor');
9-
var SnapCeil = require('../../math/snap/SnapCeil');
107
var CheckIsoBounds = require('./CheckIsoBounds');
8+
var CONST = require('../const');
119
var GetCullBounds = require('./GetCullBounds');
10+
var SnapCeil = require('../../math/snap/SnapCeil');
11+
var SnapFloor = require('../../math/snap/SnapFloor');
1212

1313
/**
1414
* Orientation-Decorated function that returns the tiles in the given layer that are within the camera's viewport. This is used internally.
@@ -17,7 +17,7 @@ var GetCullBounds = require('./GetCullBounds');
1717
* @since 3.50.iso
1818
* --- decorator:
1919
* @param {function} getCullBounds
20-
* --- inner function :
20+
* --- inner function :
2121
* @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.
2222
* @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.
2323
* @param {array} [outputArray] - An optional array to store the Tile objects within.
@@ -27,7 +27,7 @@ var GetCullBounds = require('./GetCullBounds');
2727
var GetStandardCullTiles = function (getCullBounds)
2828
{
2929
console.log('getting standard cull tiles function');
30-
30+
3131
var StandardCullTiles = function (layer, camera, outputArray, renderOrder)
3232
{
3333
if (outputArray === undefined) { outputArray = []; }
@@ -61,7 +61,7 @@ var GetStandardCullTiles = function (getCullBounds)
6161
var y;
6262
var tile;
6363

64-
64+
6565
if (renderOrder === 0)
6666
{
6767
// right-down
@@ -138,7 +138,7 @@ var GetStandardCullTiles = function (getCullBounds)
138138
}
139139
}
140140
}
141-
141+
142142

143143
tilemapLayer.tilesDrawn = outputArray.length;
144144
tilemapLayer.tilesTotal = mapWidth * mapHeight;
@@ -216,14 +216,14 @@ var IsoCullTiles = function (layer, camera, outputArray, renderOrder)
216216
boundsTop = SnapFloor(camera.worldView.y - tilemapLayer.y, rowH, 0, true) - tilemapLayer.cullPaddingY;
217217
boundsBottom = SnapCeil(camera.worldView.bottom - tilemapLayer.y, rowH, 0, true) + tilemapLayer.cullPaddingY;
218218
}
219-
220-
221-
219+
220+
221+
222222

223223
drawLeft = Math.max(0, boundsLeft);
224224
drawRight = Math.min(mapWidth, boundsRight);
225225
drawTop = Math.max(0, boundsTop);
226-
226+
227227
drawBottom = Math.min(mapHeight, boundsBottom);
228228
}
229229
}
@@ -330,10 +330,10 @@ var IsoCullTiles = function (layer, camera, outputArray, renderOrder)
330330
{
331331
continue;
332332
}
333-
333+
334334
outputArray.push(tile);
335335
}
336-
336+
337337
}
338338
}
339339
}
@@ -353,7 +353,7 @@ var IsoCullTiles = function (layer, camera, outputArray, renderOrder)
353353
{
354354
continue;
355355
}
356-
356+
357357
outputArray.push(tile);
358358
}
359359
}
@@ -375,7 +375,7 @@ var IsoCullTiles = function (layer, camera, outputArray, renderOrder)
375375
{
376376
continue;
377377
}
378-
378+
379379
outputArray.push(tile);
380380
}
381381
}

src/tilemaps/components/GetCullBounds.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* @license {@link https://opensource.org/licenses/MIT|MIT License}
55
*/
66

7-
8-
var CONST = require('../../const.js');
9-
var SnapFloor = require('../../math/snap/SnapFloor');
7+
var CONST = require('../const');
108
var SnapCeil = require('../../math/snap/SnapCeil');
9+
var SnapFloor = require('../../math/snap/SnapFloor');
1110

1211
/**
1312
* Returns the bounds in the given layer that are within the camera's viewport.
@@ -68,7 +67,7 @@ var HexaGetCullBounds = function (layer, camera)
6867
// placed on the grid and we cannot trust layer.baseTileWidth to give us the true size.
6968
var tileW = Math.floor(tilemap.tileWidth * tilemapLayer.scaleX);
7069
var tileH = Math.floor(tilemap.tileHeight * tilemapLayer.scaleY);
71-
70+
7271
var sidel = layer.hexSideLength;
7372
var rowH = ((tileH - sidel) / 2 + sidel);
7473

src/tilemaps/dynamiclayer/DynamicTilemapLayer.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ var DynamicTilemapLayer = new Class({
112112

113113
// Link the LayerData with this static tilemap layer
114114
this.layer.tilemapLayer = this;
115-
115+
116116
/**
117117
* The Tileset/s associated with this layer.
118118
*
@@ -148,14 +148,16 @@ var DynamicTilemapLayer = new Class({
148148
this.skipCull = false;
149149

150150
/**
151-
* In isometric mode, you can control the amount of distance (in tiles, from the cameras' borders) that the Cameras before culling.
151+
* In isometric mode, you can control the amount of distance (in tiles, from the cameras borders)
152+
* that the cameras will still render tiles before culling.
153+
*
152154
* By default the camera will allow 1 full tile in all directions.
153155
*
154-
* However, there are some instances when you may wish to adjust this, and changing this variable allows you to do so.
155-
*
156+
* However, there are some instances when you may wish to adjust this, and changing this property allows you to do so.
157+
*
156158
* @name Phaser.Tilemaps.DynamicTilemapLayer#isoCullDistances
157159
* @type {Phaser.Math.Vector2}
158-
* @since 3.50.iso
160+
* @since 3.50.0
159161
*/
160162
this.isoCullDistances = new Vector2(1, 1);
161163

@@ -222,6 +224,8 @@ var DynamicTilemapLayer = new Class({
222224
*/
223225
this.cullCallback = TilemapComponents.CullTiles(this.layer.orientation);
224226

227+
// TODO ^^^
228+
225229
/**
226230
* The rendering (draw) order of the tiles in this layer.
227231
*
@@ -1191,7 +1195,7 @@ var DynamicTilemapLayer = new Class({
11911195
*/
11921196
tileToWorldX: function (tileX, camera)
11931197
{
1194-
return this.tilemap.TileToWorldX(tileX, camera, this.layer);
1198+
return this.tilemap.tileToWorldX(tileX, camera, this.layer);
11951199
},
11961200

11971201
/**
@@ -1208,7 +1212,7 @@ var DynamicTilemapLayer = new Class({
12081212
*/
12091213
tileToWorldY: function (tileY, camera)
12101214
{
1211-
return this.tilemap.TileToWorldY(tileY, camera, this.layer);
1215+
return this.tilemap.tileToWorldY(tileY, camera, this.layer);
12121216
},
12131217

12141218
/**
@@ -1228,7 +1232,7 @@ var DynamicTilemapLayer = new Class({
12281232
*/
12291233
tileToWorldXY: function (tileX, tileY, point, camera)
12301234
{
1231-
return this.tilemap.TileToWorldXY(tileX, tileY, point, camera, this.layer);
1235+
return this.tilemap.tileToWorldXY(tileX, tileY, point, camera, this.layer);
12321236
},
12331237

12341238
/**
@@ -1281,7 +1285,7 @@ var DynamicTilemapLayer = new Class({
12811285
*/
12821286
worldToTileX: function (worldX, snapToFloor, camera)
12831287
{
1284-
return this.tilemap.WorldToTileX(worldX, snapToFloor, camera, this.layer);
1288+
return this.tilemap.worldToTileX(worldX, snapToFloor, camera, this.layer);
12851289
},
12861290

12871291
/**
@@ -1299,7 +1303,7 @@ var DynamicTilemapLayer = new Class({
12991303
*/
13001304
worldToTileY: function (worldY, snapToFloor, camera)
13011305
{
1302-
return this.tilemap.WorldToTileY(worldY, snapToFloor, camera, this.layer);
1306+
return this.tilemap.worldToTileY(worldY, snapToFloor, camera, this.layer);
13031307
},
13041308

13051309
/**
@@ -1320,7 +1324,7 @@ var DynamicTilemapLayer = new Class({
13201324
*/
13211325
worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)
13221326
{
1323-
return this.tilemap.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);
1327+
return this.tilemap.worldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);
13241328
}
13251329

13261330
});

0 commit comments

Comments
 (0)