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

node 端使用报错 scene.preload 报错 #256

Open
Liting1 opened this issue Nov 23, 2021 · 1 comment
Open

node 端使用报错 scene.preload 报错 #256

Liting1 opened this issue Nov 23, 2021 · 1 comment

Comments

@Liting1
Copy link

Liting1 commented Nov 23, 2021

const earthPNG = 'https://p3.ssl.qhimg.com/t01806718065fe97c65.png',
earthJSON = 'https://s3.ssl.qhres2.com/static/d479c28f553c6cff.json';

await scene.preload([earthPNG, earthJSON]);

在node端运行上面的代码加载雪碧图会直接报错,fetch is not defined

@Liting1
Copy link
Author

Liting1 commented Nov 23, 2021

问题出现在 spritejs/lib/uitls/texture.js 文件的 227行左右
image

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

No branches or pull requests

2 participants