Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set scale mode on individual game objects #5739

Closed
marcusx2 opened this issue Jun 10, 2021 · 0 comments
Closed

Allow to set scale mode on individual game objects #5739

marcusx2 opened this issue Jun 10, 2021 · 0 comments

Comments

@marcusx2
Copy link

marcusx2 commented Jun 10, 2021

I want to have my game on fit mode, but I want the background to fill the whole screen. There is no easy way to do this right now.

There are only 2 options currently available:
1 - I can set the scale mode to NONE and manually control the scale of everything.
2 - I set the background url on the html, not in Phaser. This way I can have a background covering the whole screen but have the rest of the game in FIT mode. The problem with this is that you have no control over the images loaded in the HTML in the phaser side(at least I didn't find a way. Like use setPosition, setScale, etc on the image from the html). When I say image loaded on the html side I mean this.

It would be great if I could set the scale model of everything to FIT on the config, but then overwrite the scale mode of a specific game object. Like, on the create method do myimage.scaleMode(ENVELOP) or something like that.

I think this would help a lot because this gives the user more power. Fit mode is often fine except for the black bars. If we could just call ENVELOP on an individual gameobject that would be great.

I'll leave a relevant discussion here for reference

@phaserjs phaserjs locked and limited conversation to collaborators Nov 4, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants