Skip to content

Commit e6d468c

Browse files
committed
worldToTile fixed
1 parent aae73c3 commit e6d468c

8 files changed

Lines changed: 26617 additions & 227986 deletions

dist/phaser-arcade-physics.js

Lines changed: 11554 additions & 8443 deletions
Large diffs are not rendered by default.

dist/phaser-arcade-physics.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/phaser-facebook-instant-games.js

Lines changed: 0 additions & 203022 deletions
This file was deleted.

dist/phaser-facebook-instant-games.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/phaser.js

Lines changed: 15055 additions & 16518 deletions
Large diffs are not rendered by default.

dist/phaser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"dist": "webpack --config config/webpack.dist.config.js",
2525
"distfb": "webpack --config config/webpack.fb.dist.config.js",
2626
"distfull": "npm run dist && npm run distfb",
27+
"distT": "webpack --config config/webpack.dist.config.js && npm run toT",
28+
"toT": "@powershell Copy-Item ./dist/phaser.min.js ../phasertest/phaser.min.js",
29+
"toT2": "@powershell Copy-Item ./dist/phaser.js ../phasertest/phaser.min.js",
2730
"plugin.cam3d": "webpack --config plugins/camera3d/webpack.config.js",
2831
"plugin.spine": "webpack --config plugins/spine/webpack.config.js",
2932
"plugin.spine.dist": "webpack --config plugins/spine/webpack.auto.dist.config.js",

src/tilemaps/components/WorldToTileXY.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ var IsoWorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, lay
8080

8181
tileWidth *= tilemapLayer.scaleX;
8282
}
83+
worldX -= tileWidth/2;
8384

85+
86+
8487
point.x = snapToFloor
8588
? Math.floor((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2)
8689
: ((worldX / (tileWidth / 2) + worldY / (tileHeight / 2)) / 2);

0 commit comments

Comments
 (0)