skyfish-qc / pixi-miniprogram

一个可运行于微信小程序的PIXI引擎,通过模拟window环境,有些功能小程序无法模拟,就直接修改了PIXI引擎代码,最终使得PIXI引擎正常运行在小程序上
MIT License
126 stars 34 forks source link

pixi-miniprogram的demo在模拟器可以正常运行,在物理机上运行报错 #34

Closed ericliyee closed 3 months ago

ericliyee commented 3 months ago

WAServiceMainContext.js:1 MiniProgramError Intl is not defined ReferenceError: Intl is not defined at (libs/pixi.miniprogram.js:1:495696) at (libs/pixi.miniprogram.js:1:495693) at C (libs/pixi.miniprogram.js:1:42982) at createPIXI (pages/index/index.js:22:20)

skyfish-qc commented 3 months ago

这个是小程序环境的bug,你可以在微信开发者社区那里找到相同的问题 https://developers.weixin.qq.com/community/develop/doc/00044a6a7782b8f211df8d36e5e400

skyfish-qc commented 3 months ago

你可以使用v6版本的,那个版本的pixi没有使用intl这个api

ericliyee commented 3 months ago

切换到v6版本报错如下: TypeError: Cannot read property 'Asset' of undefined at vendor.js:formatted:36405 at installSpine (vendor.js:formatted:57292) at Object. (vendor.js:formatted:9571) at Function. (WAServiceMainContext.js?t=wechat&s=1711950918874&v=3.2.2:1) at :20384/appservice/ at WAServiceMainContext.js?t=wechat&s=1711950918874&v=3.2.2:1 at WAServiceMainContext.js?t=wechat&s=1711950918874&v=3.2.2:1 at Array.forEach () at WAServiceMainContext.js?t=wechat&s=1711950918874&v=3.2.2:1(env: macOS,mp,1.06.2310080; lib: 3.2.2)

skyfish-qc commented 3 months ago

6.3.2版本里面的example里面的libs文件夹没有更新到pixi库,请在dist里面复制过去覆盖使用

ericliyee commented 3 months ago

问题已解决