{"action":"created","issue":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/1605","labels_url":"https://api.github.com/repos/photonstorm/phaser/issues/1605/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser/issues/1605/comments","events_url":"https://api.github.com/repos/photonstorm/phaser/issues/1605/events","html_url":"https://github.com/photonstorm/phaser/pull/1605","id":56922306,"number":1605,"title":"Added scaling capability to TilemapLayer","user":{"login":"mickez","id":1352555,"avatar_url":"https://avatars.githubusercontent.com/u/1352555?v=3","gravatar_id":"","url":"https://api.github.com/users/mickez","html_url":"https://github.com/mickez","followers_url":"https://api.github.com/users/mickez/followers","following_url":"https://api.github.com/users/mickez/following{/other_user}","gists_url":"https://api.github.com/users/mickez/gists{/gist_id}","starred_url":"https://api.github.com/users/mickez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickez/subscriptions","organizations_url":"https://api.github.com/users/mickez/orgs","repos_url":"https://api.github.com/users/mickez/repos","events_url":"https://api.github.com/users/mickez/events{/privacy}","received_events_url":"https://api.github.com/users/mickez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-07T19:20:40Z","updated_at":"2015-02-08T18:31:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/photonstorm/phaser/pulls/1605","html_url":"https://github.com/photonstorm/phaser/pull/1605","diff_url":"https://github.com/photonstorm/phaser/pull/1605.diff","patch_url":"https://github.com/photonstorm/phaser/pull/1605.patch"},"body":"See feature request  #1603 and #735\r\n\r\nUsage is as following:\r\n```\r\nvar layer = map.createLayer('layerName');\r\nlayer.setScale(4);\r\n```\r\n\r\nA common use case would be to make sure your pixel art game renders crisp at high resolution, without having to pre-process all files (which would cause an undesirable performance hit anyway).\r\n\r\nJSFiddle example! http://jsfiddle.net/mickez/zp3f33hv/\r\n\r\nit works by iterating through the underlying block data in the corresponding `map.layers` and set the `scale` property inherited from `Phaser.Image`. The rest of the code changes is to make sure the camera is moved accordingly and the correct size is rendered.\r\n\r\nI'm unsure if all functions that would be affected by the maps size has been updated accordingly, but my tests have shown that rendering and collision works properly."},"comment":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/comments/73424150","html_url":"https://github.com/photonstorm/phaser/pull/1605#issuecomment-73424150","issue_url":"https://api.github.com/repos/photonstorm/phaser/issues/1605","id":73424150,"user":{"login":"mickez","id":1352555,"avatar_url":"https://avatars.githubusercontent.com/u/1352555?v=3","gravatar_id":"","url":"https://api.github.com/users/mickez","html_url":"https://github.com/mickez","followers_url":"https://api.github.com/users/mickez/followers","following_url":"https://api.github.com/users/mickez/following{/other_user}","gists_url":"https://api.github.com/users/mickez/gists{/gist_id}","starred_url":"https://api.github.com/users/mickez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickez/subscriptions","organizations_url":"https://api.github.com/users/mickez/orgs","repos_url":"https://api.github.com/users/mickez/repos","events_url":"https://api.github.com/users/mickez/events{/privacy}","received_events_url":"https://api.github.com/users/mickez/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T18:31:50Z","updated_at":"2015-02-08T18:31:50Z","body":"Another approach to solve both problems described above would be to calculate the scaling of the TilemapLayer inside the arcade physics collision checks itself. This would remove the need to edit any data (that is to just simply use the scale property) and in turn still have the ability to add two TilemapLayers which uses the same data"}}