Skip to content
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

Implement resizing of canvas without having to reload the window #53

Open
CaedenPH opened this issue Aug 23, 2023 · 0 comments
Open

Implement resizing of canvas without having to reload the window #53

CaedenPH opened this issue Aug 23, 2023 · 0 comments

Comments

@CaedenPH
Copy link
Contributor

/**
 * Resize canvas
 * @return {void}
 */
function resizeCanvas(): void {
  const resize = () => {
    window.location.reload(); // TODO: Implement auto resize
  };
  // Test: may be breaking test when downloading logs on mobile
  // window.addEventListener("resize", resize);
}

Instead of having to reload, implement a dynamic resizing of all sprites

http://pixijs.download/release/docs/PIXI.Application.html#resizeTo

This can partially help but it does not inherently resize according to completely different screen sizes (mobile vs desktop)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant