Skip to content

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

Open
@yukiSolo

Description

@yukiSolo

加载基本的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)
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions