小游戏的代码片段好像有bug 下载片段下来就是完整的飞机大战了真是无语了
先进行安装
"@pixi/unsafe-eval": "6.2.2",
"pixi.js": "6.2.2"
然后构建npm
game.js代码
import './js/libs/weapp-adapter'
import './js/libs/symbol'
import * as PIXI from 'pixi.js';
import { ShaderSystem } from '@pixi/core';
import { install } from '@pixi/unsafe-eval';
install({
ShaderSystem,
});
let app = new PIXI.Application({
width: 640,
height: 360,
});
document.body.appendChild(app.view);
let text = new PIXI.Text(
'This text will scroll up and be masked, so you can see how masking works. Lorem ipsum and all that.\n\n' +
'You can put anything in the container and it will be masked!',
{
fontSize: 24,
fill: 0x1010ff,
wordWrap: true,
wordWrapWidth: 180,
}
);
打开控制台报错 ` Unrecognized source type to auto-detect Resource`
目前发现只用 new PIXI.Text 才会出现,浏览器环境是没有问题的
同问
楼主有进展吗,我也遇到同样问题,谢谢
楼主有解决方案了吗