OrbitControls and dat.gui text doesn't work

后端 未结 1 1520
陌清茗
陌清茗 2021-02-15 11:12

I am using three.js and dat.gui with a text property.

Also, I have OrbitControls in my scene:

cameraControl = new THREE.OrbitControls(came

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-15 11:30

    You need to pass the dom element you want to listen the events from.

    cameraControl = new THREE.OrbitControls(camera,renderer.domElement);
    

    Otherwise OrbitControls adds the events to the document and that conflicts with DAT.GUI.

    0 讨论(0)
提交回复
热议问题