我无法将Pixi连接到Angular,我已经添加到了angular.json文件。
"scripts": [
"../node_modules/pixi.js/lib/index.js"
],
在课堂上:
import * as PIXI from 'pixi.js';
export class Render {
public app: any;
constructor(el) {
this.app = new PIXI.Application({
width: 800,
height: 600
});
el.nativeElement.insertAdjacentHTML('beforeend', this.app.view);
}
}
编译时,我遇到了错误
ERROR in ./node_modules/pixi.js/lib/mesh/webgl/MeshRenderer.js 模块未找到: 错误详情: 无法解析路径 '/home/ashenemy/testProj/new-tuning-project/node_modules/pixi.js/lib/mesh/webgl' 中的 'path'