Skip to content

Commit 3eaacff

Browse files
committed
Restore previous function phaserjs#4992
1 parent 6187930 commit 3eaacff

1 file changed

Lines changed: 2 additions & 24 deletions

File tree

src/tilemaps/components/TileToWorldX.js

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

7-
var CONST = require('../../const.js');
8-
97
/**
10-
* Converts from orthogonal tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
8+
* Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the
119
* layer's position, scale and scroll.
1210
*
1311
* @function Phaser.Tilemaps.Components.TileToWorldX
@@ -19,7 +17,7 @@ var CONST = require('../../const.js');
1917
*
2018
* @return {number}
2119
*/
22-
var OrthoTileToWorldX = function (tileX, camera, layer)
20+
var TileToWorldX = function (tileX, camera, layer)
2321
{
2422
var tileWidth = layer.baseTileWidth;
2523
var tilemapLayer = layer.tilemapLayer;
@@ -35,26 +33,6 @@ var OrthoTileToWorldX = function (tileX, camera, layer)
3533
}
3634

3735
return layerWorldX + tileX * tileWidth;
38-
39-
40-
};
41-
42-
var nullFunc = function ()
43-
{
44-
console.warn('With the current map type you have to use the TileToWorldXY function.');
45-
return null;
46-
};
47-
48-
var TileToWorldX = function (orientation)
49-
{
50-
switch (orientation)
51-
{
52-
case CONST.ORTHOGONAL:
53-
return OrthoTileToWorldX;
54-
default:
55-
return nullFunc;
56-
}
57-
5836
};
5937

6038
module.exports = TileToWorldX;

0 commit comments

Comments
 (0)