Screen Responsiveness.... Is there a fixed base function on Pixi.js? #7225
Replies: 2 comments
-
No, its usually exercise to learn |
Beta Was this translation helpful? Give feedback.
-
In general Pixi doesn't have any tools for detecting screen ortation, but there are other resources online that can point you to the native APIs to do this. If you're using the Application class, there is however a built in way to auto-resize your view. It would look something like this: const app = new PIXI.Application({
resizeTo: window,
});
document.body.appendChild(app.view); The option |
Beta Was this translation helpful? Give feedback.
-
I have tried pixi.js on and off and even though it is an awesome library, I always find it hard to get started due to a single issue.
Most tutorials start by showing how do draw a small square with an image inside a black canvas.
Is there a prebuilt function I can use from the start that can make my canvas fill the entire screen and keep the content in place and in the same area of the screen regardless if I turn my, lets say (iphone or ipad) from portrait to landscape mode?
Thanks so much for your amazing work.
PS: Is there a newer tutorial online available, the one included is based on version 4. #StaySafe
Beta Was this translation helpful? Give feedback.
All reactions