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

Error: THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead. #33

Open
tjeeay opened this issue Sep 21, 2020 · 7 comments

Comments

@tjeeay
Copy link

tjeeay commented Sep 21, 2020

克隆示例代码后运行报错,看似是glTF版本问题,有人碰到过吗?

Error: THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.
    at GLTFLoader.parse (VM34 gltf-loader.js:163)
    at Object.onLoad (VM34 gltf-loader.js:86)
    at a.<anonymous> (VM40 index.js:2)
    at a.e.<computed> [as onload] (VM40 index.js:1)
    at a._ (VM40 index.js:1)
    at l (VM40 index.js:1)
    at Function.o.<computed> (VM27 WAService.js:1)
    at VM27 WAService.js:1
    at E (VM27 WAService.js:1)
    at i.<anonymous> (VM27 WAService.js:1)

image

@okdin
Copy link

okdin commented Sep 21, 2020

我今天也碰到了,17号代码还能运行,今天21号突然报这个错,模型重新导出为gltf 2.0也不行,应该是FileLoader出错了

微信截图_20200921181732

@okdin
Copy link

okdin commented Sep 21, 2020

发现是因为升级了微信开发者工具后出现了这个报错,原来的版本1.03.2006090可以运行,升级到1.03.2009140后就出现这个报错了,但真机测试没问题

@yangger6
Copy link

@ele828 麻烦看看这个问题,这边也遇到了这个问题

@yangger6
Copy link

yangger6 commented Jan 28, 2021

emm, 试了一下手动wx.request请求数据是可以正常拿到数据并且parse,但是通过loader.load内部调用的wx.request是返回空数据,可能是example的wx.request的流程有问题,这部分就没细看了,加载是加载出来了,贴图又丢了= =。

wx.request({
          url,
          method: 'get',
          header: {
            // 'content-type': 'text/plain; charset=x-user-defined',
            // 'accept-charset': 'x-user-defined'
          },
          responseType: 'arraybuffer',
          success (res) {
            console.log(resourcePath)
            try {
              scope.parse(res.data, resourcePath, function (gltf) {
                onLoad(gltf);
              }, _onError);
            } catch (e) {
              _onError(e);
            }
          },
          fail (e) {
          }
        })

@SunXinFei
Copy link

emm, 试了一下手动wx.request请求数据是可以正常拿到数据并且parse,但是通过loader.load内部调用的wx.request是返回空数据,可能是example的wx.request的流程有问题,这部分就没细看了,加载是加载出来了,贴图又丢了= =。

wx.request({
          url,
          method: 'get',
          header: {
            // 'content-type': 'text/plain; charset=x-user-defined',
            // 'accept-charset': 'x-user-defined'
          },
          responseType: 'arraybuffer',
          success (res) {
            console.log(resourcePath)
            try {
              scope.parse(res.data, resourcePath, function (gltf) {
                onLoad(gltf);
              }, _onError);
            } catch (e) {
              _onError(e);
            }
          },
          fail (e) {
          }
        })

@yangger6 贴图最后怎么解决的呢

@deepkolos
Copy link

https://github.com/deepkolos/platformize 这个解决了

@designbyadrian
Copy link

I'd really like to know what you were discussing here, as I'm perhaps facing a similar issue.

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

6 participants