Refactored all the GUI and rotation stuff out, colour links are working
parent
0b78ea2939
commit
efb4cf7608
1
gui.js
1
gui.js
|
@ -39,6 +39,7 @@ class FourDGUI {
|
||||||
this.gui.add(this.params, 'yRotate', [ 'XZ', 'XY', 'XW' ]);
|
this.gui.add(this.params, 'yRotate', [ 'XZ', 'XY', 'XW' ]);
|
||||||
this.gui.add(this.params, 'damping');
|
this.gui.add(this.params, 'damping');
|
||||||
this.gui.add(this.params, 'copy link');
|
this.gui.add(this.params, 'copy link');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
3
main.js
3
main.js
|
@ -65,7 +65,8 @@ const gui = new FourDGUI(
|
||||||
(c) => { scene.background = new THREE.Color(c) },
|
(c) => { scene.background = new THREE.Color(c) },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
material.color = new THREE.Color(gui.params.color);
|
||||||
|
scene.background = new THREE.Color(gui.params.background);
|
||||||
|
|
||||||
const dragK = 0.005;
|
const dragK = 0.005;
|
||||||
const damping = 0.99;
|
const damping = 0.99;
|
||||||
|
|
Loading…
Reference in New Issue