{"action":"closed","issue":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/4017","repository_url":"https://api.github.com/repos/photonstorm/phaser","labels_url":"https://api.github.com/repos/photonstorm/phaser/issues/4017/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser/issues/4017/comments","events_url":"https://api.github.com/repos/photonstorm/phaser/issues/4017/events","html_url":"https://github.com/photonstorm/phaser/issues/4017","id":357975391,"node_id":"MDU6SXNzdWUzNTc5NzUzOTE=","number":4017,"title":"v3.12.0, WebGL: Flipped tiles from saved RenderTexture in DynamicTilemapLayer ","user":{"login":"s-s","id":1055288,"node_id":"MDQ6VXNlcjEwNTUyODg=","avatar_url":"https://avatars1.githubusercontent.com/u/1055288?v=4","gravatar_id":"","url":"https://api.github.com/users/s-s","html_url":"https://github.com/s-s","followers_url":"https://api.github.com/users/s-s/followers","following_url":"https://api.github.com/users/s-s/following{/other_user}","gists_url":"https://api.github.com/users/s-s/gists{/gist_id}","starred_url":"https://api.github.com/users/s-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-s/subscriptions","organizations_url":"https://api.github.com/users/s-s/orgs","repos_url":"https://api.github.com/users/s-s/repos","events_url":"https://api.github.com/users/s-s/events{/privacy}","received_events_url":"https://api.github.com/users/s-s/received_events","type":"User","site_admin":false},"labels":[{"id":1028871493,"node_id":"MDU6TGFiZWwxMDI4ODcxNDkz","url":"https://api.github.com/repos/photonstorm/phaser/labels/%F0%9F%A6%94%20Need%20to%20reproduce","name":"🦔 Need to reproduce","color":"ddb971","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-07T08:45:42Z","updated_at":"2018-09-26T15:33:00Z","closed_at":"2018-09-26T15:33:00Z","author_association":"CONTRIBUTOR","body":"<!--\r\nThank you for taking the time to contribute towards Phaser. Before submitting your issue, check the following:\r\n\r\n1. This repo is for Phaser 3 only. Phaser 2.x issues should be raised in the [Phaser CE](https://github.com/photonstorm/phaser-ce) repo.\r\n\r\n2. This repo should not be used for technical support. If you're struggling to use Phaser then post your question to the [forum](http://www.html5gamedevs.com/forum/33-phaser-3/), [Slack](https://phaser.io/community/slack) or [Discord](https://phaser.io/community/discord) channels. GitHub Issues are for bugs and feature requests only.\r\n\r\n3. Make sure your issue isn't a duplicate, or has already been fixed.\r\n\r\n4. If your issue contains _any_ form of hostility it will be closed and you will be blocked from access to all our repos. Be nice. We do this for free.\r\n\r\n5. If all the above is ok, fill out the template below.\r\n-->\r\n\r\n\r\n## Version\r\n<!--\r\nEnter the version of Phaser you're using. You can find this output to the Dev Tools console in your browser.\r\n-->\r\n* Phaser Version: 3.12.0\r\n<!--\r\nPlace the operating system **below** this comment.\r\n-->\r\n* Operating system: Any (reproduces on Windows, Linux, iOS)\r\n<!--\r\nIf the bug is browser specific, please enter the version **below** this comment:\r\n-->\r\n* Browser: Any (reproduces on latest Chrome, Firefox, Safari)\r\n\r\n\r\n## Description\r\n\r\n<!--\r\nWrite a detailed description of the bug **below** this comment. Include the expected behavior and what actually happens. If the issue is device specific, please say so.\r\n-->\r\n\r\n0. Setup a game with WebGL;\r\n1. Create a RenderTexture;\r\n2. Fill it with with some content (see full demo as an example);\r\n3. Save it to cache;\r\n4. Create a tilemap and add cached texture as tileset;\r\n5. Add DynamicTilemapLayer and fill it with any content.\r\n\r\n### Expected result\r\n\r\nDynamicTilemapLayer should be rendered with tiles from original texture.\r\n\r\n### Actual result\r\n\r\nDynamicTilemapLayer is rendered with tiles flipped over Y, but with false flipY.\r\n\r\n## Example Test Code\r\nFull demo: [here](http://jsfiddle.net/d2h4q69p/3/) (top left - static layer, middle right - dynamic layer, bottom left - texture itself) \r\n```javascript\r\nvar TILE_SIZE = 32,\r\n\tlayerData = [[0, 1]],\r\n\trt, map, tiles;\r\n\t\t\t\t\t\r\nrt = this.make.renderTexture({\r\n\t\tx: 0,\r\n\t\ty: 0,\r\n\t\theight: TILE_SIZE,\r\n\t\twidth: TILE_SIZE * 2,\r\n\t\tadd: false\r\n\t});\r\n\r\n/*** fill rt with content ***/\t\r\n\r\nrt.saveTexture('tiles');\r\nrt.destroy();\r\n\r\nmap = this.make.tilemap({ data: layerData, tileWidth: TILE_SIZE, tileHeight: TILE_SIZE });\r\ntiles = map.addTilesetImage('tiles', null, TILE_SIZE, TILE_SIZE);\r\n\r\nmap.createDynamicLayer(0, tiles); // <--- tiles are rendered flippedY comparing to original texture\r\n```\r\n\r\n<!--\r\nAll issues must have source code demonstrating the problem. We automatically close issues after 30 days if no code is provided.\r\n\r\nThe code can be pasted directly below this comment, or you can link to codepen, jsbin, or similar. The code will ideally be runnable instantly. The more work involved in turning your code into a reproducible test case, the longer it will take the fix the issue.\r\n-->\r\n\r\n\r\n## Additional Information\r\n\r\nNo issues with Canvas, no issues with StaticTilemapLayer for WebGL (see demo).\r\n\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/63117746-v3-12-0-webgl-flipped-tiles-from-saved-rendertexture-in-dynamictilemaplayer?utm_campaign=plugin&utm_content=tracker%2F283654&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F283654&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}
{"actor":{"display_login":"photonstorm"}}