Skip to content

Commit

Permalink
Remove a couple of datgui options that are not needed on the Scaffold…
Browse files Browse the repository at this point in the history
…Viewer.
  • Loading branch information
alan-wu committed Jan 24, 2019
1 parent 18bd077 commit 6995ca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/ui/ScaffoldDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ var ScaffoldDialog = function(scaffoldViewerIn) {
_this.addDatGui();
_this.container.find("#meshGui")[0].appendChild(_this.datGui.domElement);
var viewAllButton = { 'View All':function(){ scaffoldViewer.viewAll() }};
var resetButton = { 'Reset':function(){ scaffoldViewer.resetView() }};
var readButton = { 'Read':function(){ scaffoldViewer.readWorkspacePrompt() }};
var commitButton = {'Commit':function() { scaffoldViewer.commitWorkspace() }};
var pushButton = {'Push':function() { scaffoldViewer.pushWorkspace() }};
_this.datGui.add(viewAllButton, 'View All');
_this.datGui.add(resetButton, 'Reset');
_this.datGui.add(readButton, 'Read');
_this.datGui.add(commitButton, 'Commit');
_this.datGui.add(pushButton, 'Push');
Expand Down
8 changes: 2 additions & 6 deletions src/utilities/csg.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports.csg = function(sceneIn, zincRendererIn) {
var plane = undefined;
var planeHelper = undefined;
var guiControls = new function() {
this.distance = 0.0;
this.distance = 1.0;
this.continuous = false;
this.xRotation = 0.0;
this.yRotation = 0.0;
Expand All @@ -50,7 +50,7 @@ exports.csg = function(sceneIn, zincRendererIn) {
meshCenter = currentGeometry.boundingSphere.center;
meshRadius = currentGeometry.boundingSphere.radius;
var origin = new THREE.Vector3(0, 0, 0);
meshDistance = origin.distanceTo(meshCenter);;
meshDistance = origin.distanceTo(meshCenter);
if (meshCenter.z < 0.0)
meshDistance = -meshDistance;
}
Expand Down Expand Up @@ -171,16 +171,12 @@ exports.csg = function(sceneIn, zincRendererIn) {
datGui = new dat.GUI({autoPlace: false});
datGui.domElement.id = 'csgGui';
parent.appendChild(datGui.domElement);
controls["viewport"] = function() {
console.log(scene.getZincCameraControls().getCurrentViewport())
};
controls["intersect"] = function() {
createCSG();
};
controls["remove cuts"] = function() {
scene.forEachGeometry(removeCutFace(scene));
};
datGui.add(controls, "viewport");
datGui.add(controls, "remove cuts");
distanceSlider = datGui.add(guiControls, 'distance', -1.0, 1.0).step(0.01).onChange(distanceSliderChanged());
xRotationSlider = datGui.add(guiControls, 'xRotation', -90, 90).step(1).onChange(xRotationSliderChanged());
Expand Down

0 comments on commit 6995ca1

Please sign in to comment.