Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有没有可能加上类型变成ts版本? #32

Open
lithbitren opened this issue Dec 2, 2023 · 3 comments
Open

有没有可能加上类型变成ts版本? #32

lithbitren opened this issue Dec 2, 2023 · 3 comments

Comments

@lithbitren
Copy link

或者加上d.ts的标注文件

@skyfish-qc
Copy link
Owner

d.ts文件可以使用cdn打包站点打包的
https://cdn.jsdelivr.net/npm/pixi.js@5.2.1/pixi.js.d.ts

@lithbitren
Copy link
Author

d.ts文件可以使用cdn打包站点打包的 https://cdn.jsdelivr.net/npm/pixi.js@5.2.1/pixi.js.d.ts

不行啊,类型有问题啊,光是例子里的事件绑定 PIXI.dispatchEvent(e)就识别不了,我后来又找了6.2.2的d.ts,也对不上啊

球求大佬给个在ts下运行的example

@lithbitren
Copy link
Author

lithbitren commented Dec 11, 2023

关于ts有没有可能对引擎修改进行解耦,比如先import PIXI,然后再来个const miniPIXI = miniProgram(PIXI),后续通过minPIXI调用API,这样就可以尽可能的少的编辑原版库的类型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants