Skip to content
New issue

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

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

Already on GitHub? # to your account

小程序渲染glb模型后无法响应任何事件 #11

Open
yukiSolo opened this issue Dec 29, 2022 · 0 comments
Open

小程序渲染glb模型后无法响应任何事件 #11

yukiSolo opened this issue Dec 29, 2022 · 0 comments

Comments

@yukiSolo
Copy link

加载基本的cube没有问题,加载obj模型没有问题;但加载glb后,微信开发者工具可以响应事件,真机上无法响应事件,附加载glb模型的代码:

        let GLTFLoader = gLTF(THREE)
        const gltfLoader = new GLTFLoader();
        gltfLoader.load(glbUrl, (gltf) => {
          const item = gltf.scene;
          _this.modelItem = item;
          _this.scene.add(_this.modelItem);
          _this.lights.forEach(light => {
            light.target = _this.modelItem
          })
          _this.inited = true;
          uni.hideLoading();
          
          _this.render();
        }, (res) => {
          console.log('progress res:', res)
        }, (error) => {
          uni.hideLoading();
          console.log('error:', error)
        });
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant