Skip to content

Add automatic resize on window #368

@Exeloo

Description

@Exeloo

Which package or utils is this feature request for?

graphics-2d

Feature

Add a way to automatically adapt the size of a window to the canva inside.

Also make the game coordinate works with an aspect ratio (dev create his game in 1920x1080, if someone has a 2560x1440, coords at (100, 100) will become (133, 133).

Also create a flag (like img object-fit in html) that take "fill" that will change the aspect ratio of the window to fill the window with the canva, "contain" that will contain all the game without cropping it and without change the ratio (scaling is made on the bigger size) and "cover" that is like contain but it crops to fit the ratio (scaling is made on the smaller size) https://developer.mozilla.org/ko/docs/Web/CSS/Reference/Properties/object-fit

Ideal solution or implementation

/

Alternative solutions or implementations

No response

Other context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions