diff --git a/gui.js b/gui.js index 451e14a..475be10 100644 --- a/gui.js +++ b/gui.js @@ -2,8 +2,8 @@ import { GUI } from 'lil-gui'; const DEFAULTS = { - thickness: 1.0, - nodesize: 2.0, + thickness: 0.5, + nodesize: 1.5, linkopacity: 0.5, link2opacity: 0.5, shape: '120-cell', @@ -13,10 +13,10 @@ const DEFAULTS = { inscribe_all: false, color: 0x3293a9, background: 0xd4d4d4, - hyperplane: 1.5, + hyperplane: 0.93, zoom: 1, xRotate: 'YW', - yRotate: 'XZ', + yRotate: 'XW', dtheta: 0, dpsi: 0, } @@ -65,9 +65,9 @@ class FourDGUI { options_ctrl = this.gui.add(this.params, 'option').options(options).onChange((option) => { setVisibility(option) }); - this.gui.add(this.params, 'hyperplane', 1.4, 2.0); + this.gui.add(this.params, 'hyperplane', 0.5, 1 / 0.8); this.gui.add(this.params, 'zoom', 0.1, 2.0); - this.gui.add(this.params, 'thickness', 0, 2); + this.gui.add(this.params, 'thickness', 0, 1); this.gui.add(this.params, 'linkopacity', 0, 1).onChange( (v) => setLinkOpacity(v, true) ); diff --git a/main.js b/main.js index 1891d05..5045917 100644 --- a/main.js +++ b/main.js @@ -9,7 +9,7 @@ import { FourDShape } from './fourDShape.js'; import { get_colours } from './colours.js'; const FACE_OPACITY = 0.3; -const CAMERA_K = 10; +const CAMERA_K = 5; // scene, lights and camera @@ -213,8 +213,8 @@ function animate() { rotfn[gui.params.xRotate](theta), rotfn[gui.params.yRotate](psi) ]; - shape.hyperplane = gui.params.hyperplane; - camera.position.set(0, 0, gui.params.zoom * CAMERA_K / gui.params.hyperplane); + shape.hyperplane = 1 / gui.params.hyperplane; + camera.position.set(0, 0, gui.params.zoom * CAMERA_K * gui.params.hyperplane); shape.link_scale = gui.params.thickness; shape.node_scale = gui.params.nodesize;