Issue while using dat.GUI in a three.js example

前端 未结 3 884
情话喂你
情话喂你 2021-01-02 05:56

I tried to use dat.GUI in the following three.js example.

I just did the following code changes to add a GUI to adjust mesh opacity.



        
3条回答
  •  隐瞒了意图╮
    2021-01-02 06:14

    Move the controls init block after the renderer init block, and change this line:

    controls = new THREE.TrackballControls( camera );
    

    to this:

    controls = new THREE.TrackballControls( camera, renderer.domElement );
    

提交回复
热议问题