MorpheusZ Posted August 30, 2014 Share Posted August 30, 2014 How can I resize a TilemapLayer? I'm resizing my game on browser resize, and if the size increases the layer is only rendered to an area equal to the old size.Increasing a layer's width/height scales it, but it is not quite what I want. Something equivalent to setBoundsToWorld() (like what the camera have) would be perfect. Link to comment Share on other sites More sharing options...
mariogarranz Posted August 31, 2014 Share Posted August 31, 2014 This is something that was asked some time ago and I think Rich is considering adding it to Phaser, but it's not available right now.https://github.com/photonstorm/phaser/issues/642 Link to comment Share on other sites More sharing options...
mariogarranz Posted September 1, 2014 Share Posted September 1, 2014 Rich just added this functionality to Phaser today!Man, he must really love you, the rest of us had to wait for months Thanks a lot to Rich for including this into Phaser. Link to comment Share on other sites More sharing options...
MorpheusZ Posted September 4, 2014 Author Share Posted September 4, 2014 Awesome! I've downloaded a phaser version with the RESIZE option and I'm playing around with it. This still does not solve the layer resizing problem, though. If I created a TilemapLayer before setting the world size, there no way to change it. If I resize my browser and then re-adjust the world size, the layer's bounds will not get updated, and it will still get clipped at the old bounds. Link to comment Share on other sites More sharing options...
xerver Posted September 4, 2014 Share Posted September 4, 2014 Information about scaling a tilemap layer: http://www.html5gamedevs.com/topic/8897-scaling-down-a-tilemap-layer/?hl=%2Bscaling+%2Blayer tl;dr: not yet supported, for many reasons. Link to comment Share on other sites More sharing options...
jdnichollsc Posted September 5, 2015 Share Posted September 5, 2015 Information about scaling a tilemap layer: http://www.html5gamedevs.com/topic/8897-scaling-down-a-tilemap-layer/?hl=%2Bscaling+%2Blayer tl;dr: not yet supported, for many reasons. Hi Xerver, How is possible to make resize like https://runpixierun.tresensa.com/ in Phaser using Phaser.ScaleManager.RESIZE? Thanks in advance Link to comment Share on other sites More sharing options...
xerver Posted September 6, 2015 Share Posted September 6, 2015 I don't understand why you are so blown away by that page resizing, just scale your containers. Or setup the scale manager to do it for you. There are tons of scale manager tutorials out there, and even a book. jdnichollsc 1 Link to comment Share on other sites More sharing options...
jdnichollsc Posted September 6, 2015 Share Posted September 6, 2015 I don't understand why you are so blown away by that page resizing, just scale your containers. Or setup the scale manager to do it for you. There are tons of scale manager tutorials out there, and even a book. See my example: http://phaser.azurewebsites.net/runner/ What should I do in the resize function to scale the layers and sprites? o.O Link to comment Share on other sites More sharing options...
xerver Posted September 7, 2015 Share Posted September 7, 2015 You should use the Phaser scale manager, or if in just pixi container.scale.set(); jdnichollsc 1 Link to comment Share on other sites More sharing options...
jdnichollsc Posted September 7, 2015 Share Posted September 7, 2015 You should use the Phaser scale manager, or if in just pixi container.scale.set(); Do you have any example of scaling in this scaleMode maintaining proportions? Link to comment Share on other sites More sharing options...
Recommended Posts