Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

MorpheusZ
 Share

Recommended Posts

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

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

  • 1 year later...

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...