If you used a scaled Dynamic Tilemap Layer and rotated or flipped tiles, the tiles that were rotated or flipped would be positioned incorrectly in WebGL. Fix #3778

This commit is contained in:
Richard Davey 2018-09-26 16:49:18 +01:00
parent 6fef0fb57e
commit 32bd01daba
2 changed files with 4 additions and 3 deletions

View file

@ -37,6 +37,7 @@
* When using `MatterGameObject` and `fromVerts` as the shape type it wouldn't pass the values to `Bodies.fromVertices` because of a previous conditional. It now passes them over correctly and the body is only set if the result is valid.
* The Static Tilemap Layer would stop drawing all tiles from that point on, if it encountered a tile which had invalid texture coordinates (such as a tile from another tileset). It now skips invalid tiles properly again. Fix #4002 (thanks @jdotrjs)
* If you used a RenderTexture as a tileset then Dynamic Tilemap Layers would render the tiles inversed on the y-axis in WebGL. Fix #4017 (thanks @s-s)
* If you used a scaled Dynamic Tilemap Layer and rotated or flipped tiles, the tiles that were rotated or flipped would be positioned incorrectly in WebGL. Fix #3778 (thanks @nkholski)
### Examples, Documentation and TypeScript

View file

@ -75,9 +75,9 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer
src,
texture,
texture.width, texture.height,
tw + x + tile.pixelX * sx, th + y + tile.pixelY * sy,
tile.width * sx, tile.height * sy,
1, 1,
(tw + x + tile.pixelX) * sx, (th + y + tile.pixelY) * sy,
tile.width, tile.height,
sx, sy,
tile.rotation,
tile.flipX, tile.flipY,
scrollFactorX, scrollFactorY,