From efb4cf76084106e1e8bcc1742311c6ee55b3a309 Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Sat, 29 Jul 2023 16:52:00 +1000 Subject: [PATCH] Refactored all the GUI and rotation stuff out, colour links are working --- gui.js | 1 + main.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gui.js b/gui.js index bf04cf1..d8e0f0f 100644 --- a/gui.js +++ b/gui.js @@ -39,6 +39,7 @@ class FourDGUI { this.gui.add(this.params, 'yRotate', [ 'XZ', 'XY', 'XW' ]); this.gui.add(this.params, 'damping'); this.gui.add(this.params, 'copy link'); + } diff --git a/main.js b/main.js index 2d913e1..2566ae8 100644 --- a/main.js +++ b/main.js @@ -65,7 +65,8 @@ const gui = new FourDGUI( (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 damping = 0.99;