We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e869611 commit 34cadecCopy full SHA for 34cadec
packages/canvas-pixi/index.ts
@@ -2,11 +2,13 @@ import '@nativescript/canvas-polyfill';
2
import * as Pixii from 'pixi.js';
3
4
export class TNSPIXIApplication extends Pixii.Application {
5
- constructor({canvas, ...props}) {
+ constructor({ canvas, ...props }) {
6
(global as any).PIXI = (global as any).window.PIXI = (global as any).PIXI || Pixii;
7
super({
8
view: canvas,
9
- ...props
+ width: canvas.width || undefined,
10
+ height: canvas.height || undefined,
11
+ ...props,
12
});
13
}
14
0 commit comments