Jump to content

Responsive Design


AntoniaChimp
 Share

Recommended Posts

Hey !

I was able to resize my canvas so it always fills the whole screen, with

  app.renderer.view.style.position = "absolute";
  app.renderer.view.style.display = "block";
  app.renderer.autoResize = true;
  app.renderer.resize(window.innerWidth, window.innerHeight);

But if I put sprites or graphics on it, their position is always pixel based. So if I change the resolution of the screen it isnt
on the same position anymore relatively.

Is it possible to position them with % or relatively to bottom left corner ? I mean without setting concrete pixels which are different on every screen resolution. Or do I have to write more or less a form of media queries ?


 

Link to comment
Share on other sites

Another possible solution is to fix canvas width/height and scale it saving the aspect ratio: https://github.com/ivanpopelyshev/pixi-starfighter

Its fine if linear filtering works for your case. Otherwise, you have to use "resize" and adjust stage scale. There's no packaged solution in pixijs for that.

Link to comment
Share on other sites

  • 3 years later...

It is also difficult for me to cope with the preparation of a high-quality presentation on my own, especially if it is a responsible task for a meeting with investors. In such cases, I use custom powerpoint slides  It helps me to convey a main idea that is supported by thorough research, graphs, charts and content that cannot be ignored.

Edited by Olloverr
specification
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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