- To begin, I ran the command npm install -g ionic
- Followed by ionic start pixiApp blank --v2
- Navigated to the pixiApp directory with cd pixiApp
- Installed necessary dependencies using npm install
- Added a specific version of pixi.js (4.1.0) with npm install pixi.js --save
- Despite @types/pixi.js being intended for v3, I included it using npm install --save @types/pixi.js
- Manually updated Indexed.d.ts in pixiApp\node_modules\@types\pixi.js with code from https://github.com/pixijs/pixi-typescript/blob/v4.x/pixi.js.d.ts
- Incorporated the following snippet into home.ts:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import * as PIXI from 'pixi.js';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController) {}
ngOnInit() {
PIXI.autoDetectRenderer(800, 600, {backgroundColor: 0x1099bb});
}
}
- Finally, I launched the app using the command: ionic serve
Unfortunately, the results were not what I expected
[16:56:52] rollup: Export 'autoDetectRenderer' is not defined by 'D:\labs\ionic2\pixiApp\src\pages\home\home.ts'
Despite my attempts, I have been unable to resolve the issue :(:(
Any assistance you can provide would be greatly appreciated.
Thank you and best regards