fixed bug with nodesize from links
parent
a076427af3
commit
372a9c1a37
3
gui.js
3
gui.js
|
@ -13,6 +13,7 @@ class FourDGUI {
|
||||||
this.gui = new GUI();
|
this.gui = new GUI();
|
||||||
this.parseLinkParams();
|
this.parseLinkParams();
|
||||||
const guiObj = this;
|
const guiObj = this;
|
||||||
|
console.log(this.link);
|
||||||
this.params = {
|
this.params = {
|
||||||
shape: this.link['shape'] || DEFAULT_SHAPE,
|
shape: this.link['shape'] || DEFAULT_SHAPE,
|
||||||
thickness: this.link['thickness'] || 1,
|
thickness: this.link['thickness'] || 1,
|
||||||
|
@ -80,6 +81,7 @@ class FourDGUI {
|
||||||
const guiObj = this;
|
const guiObj = this;
|
||||||
this.link['hyperplane'] = this.numParam('hyperplane', parseFloat, 2);
|
this.link['hyperplane'] = this.numParam('hyperplane', parseFloat, 2);
|
||||||
this.link['thickness'] = this.numParam('thickness', parseFloat, 1);
|
this.link['thickness'] = this.numParam('thickness', parseFloat, 1);
|
||||||
|
this.link['nodesize'] = this.numParam('nodesize', parseFloat, 1);
|
||||||
this.link['color'] = this.numParam(
|
this.link['color'] = this.numParam(
|
||||||
'color', (s) => guiObj.stringToHex(s), DEFAULT_COLOR
|
'color', (s) => guiObj.stringToHex(s), DEFAULT_COLOR
|
||||||
);
|
);
|
||||||
|
@ -96,6 +98,7 @@ class FourDGUI {
|
||||||
const url = new URL(this.linkUrl.origin + this.linkUrl.pathname);
|
const url = new URL(this.linkUrl.origin + this.linkUrl.pathname);
|
||||||
url.searchParams.append("shape", this.params.shape);
|
url.searchParams.append("shape", this.params.shape);
|
||||||
url.searchParams.append("thickness", this.params.thickness.toString());
|
url.searchParams.append("thickness", this.params.thickness.toString());
|
||||||
|
url.searchParams.append("nodesize", this.params.nodesize.toString());
|
||||||
url.searchParams.append("color", this.hexToString(this.params.color));
|
url.searchParams.append("color", this.hexToString(this.params.color));
|
||||||
url.searchParams.append("background", this.hexToString(this.params.background));
|
url.searchParams.append("background", this.hexToString(this.params.background));
|
||||||
url.searchParams.append("hyperplane", this.params.hyperplane.toString());
|
url.searchParams.append("hyperplane", this.params.hyperplane.toString());
|
||||||
|
|
Loading…
Reference in New Issue