File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * @author Richard Davey <rich@photonstorm.com>
3+ * @copyright 2020 Photon Storm Ltd.
4+ * @license {@link https://opensource.org/licenses/MIT|MIT License }
5+ */
6+
7+ var CONST = require ( '../const' ) ;
8+ var NOOP = require ( '../../utils/NOOP' ) ;
9+ var TileToWorldX = require ( './TileToWorldX' ) ;
10+
11+ /**
12+ * Gets the correct function to use to translate tiles, based on the map orientation.
13+ *
14+ * @function Phaser.Tilemaps.Components.GetTileToWorldXFunction
15+ * @since 3.50.0
16+ *
17+ * @param {number } orientation - The Tilemap orientation constant.
18+ *
19+ * @return {Phaser.Tilemaps.Components.TileToWorldX) } The function to use to translate tiles for the given map type.
20+ */
21+ var GetTileToWorldXFunction = function ( orientation )
22+ {
23+ if ( orientation === CONST . ORTHOGONAL )
24+ {
25+ return TileToWorldX ;
26+ }
27+ else
28+ {
29+ return NOOP ;
30+ }
31+ } ;
32+
33+ module . exports = GetTileToWorldXFunction ;
You can’t perform that action at this time.
0 commit comments