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

textureLoader.loadAsync iOS真机无法加载材质 #21

Closed
washanhanzi opened this issue Jun 15, 2021 · 2 comments
Closed

textureLoader.loadAsync iOS真机无法加载材质 #21

washanhanzi opened this issue Jun 15, 2021 · 2 comments

Comments

@washanhanzi
Copy link

在开发者工具一切正常,但是真机无法加载,已配置合法域名。

 try {
      texture1 = await textureLoader.loadAsync("https://xxxx/result-0.jpg")
    } catch (err) {
      wx.showToast({
        title: "加载失败",
        icon: "error",
        duration: 2000
      })
      wx.getRealtimeLogManager().error(err)
    }

catch到的error没看懂。。

[00:07:35]  {"timestamp":8743946.552416667,"type":"error","target":{"bindingScreen":0,"scale":1,"naturalWidth":5760,"complete":false,"naturalHeight":3240,"height":3240,"premultiplyAlpha":true,"width":5760,"instance":10761289472,"tagName":"IMG","nodeName":"IMG","uid":10761289472,"src":"https://xxxx/result-0.jpg","crossOrigin":"anonymous"},"currentTarget":{"bindingScreen":0,"scale":1,"naturalWidth":5760,"complete":false,"naturalHeight":3240,"height":3240,"premultiplyAlpha":true,"width":5760,"instance":10761289472,"tagName":"IMG","nodeName":"IMG","uid":10761289472,"src":"https://xxxx/result-0.jpg","crossOrigin":"anonymous"}}
@washanhanzi
Copy link
Author

好像材质太大了。。换了个小的可以了。

@deepkolos
Copy link
Owner

微信小程序不支持加载2048以上的图片

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