filter dup slice indices in cam. fix factor declaration
This commit is contained in:
parent
da3faa2bf5
commit
6051177161
2 changed files with 4 additions and 3 deletions
|
|
@ -1100,8 +1100,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function sliceWidget(widget) {
|
function sliceWidget(widget) {
|
||||||
widget.stack = STACKS.create(widget.id, widget.mesh),
|
widget.stack = STACKS.create(widget.id, widget.mesh);
|
||||||
factor = (widget.getVertices().count / defvert);
|
let factor = (widget.getVertices().count / defvert);
|
||||||
|
|
||||||
// compensate for zcut (widget moved through floor)
|
// compensate for zcut (widget moved through floor)
|
||||||
widget.stack.obj.view.position.z = widget.track.zcut || 0;
|
widget.stack.obj.view.position.z = widget.track.zcut || 0;
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,8 @@
|
||||||
return opt.down ? b-a : a-b;
|
return opt.down ? b-a : a-b;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// filter duplicate values
|
||||||
|
array = array.map(v => v.round(5)).filter((e,i,a) => i < 1 || a[i-1] !== a[i]);
|
||||||
return array.map(v => Math.abs(parseFloat(v.toFixed(5))));
|
return array.map(v => Math.abs(parseFloat(v.toFixed(5))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue