change home/front default rotation in belt mode

This commit is contained in:
Stewart Allen 2021-01-22 15:33:18 -05:00
commit b482c79fa7
2 changed files with 9 additions and 2 deletions

View file

@ -729,6 +729,9 @@
UI.deviceRound.checked = dev.bedRound;
UI.deviceOrigin.checked = dev.outputOriginCenter || dev.originCenter;
// change home default in belt mode
API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0);
// add extruder selection buttons
if (dev.extruders) {
let ext = API.lists.extruders = [];

View file

@ -19,6 +19,7 @@
panX = 0,
panY = 0,
panZ = 0,
home = 0,
gridZOff = 0,
platformZOff = 0,
perspective = 35,
@ -938,9 +939,9 @@
},
view: {
top: function() { tweenCam({left: 0, up: 0, panX, panY, panZ}) },
top: function() { tweenCam({left: home, up: 0, panX, panY, panZ}) },
back: function() { tweenCam({left: PI, up: PI2, panX, panY, panZ}) },
home: function() { tweenCam({left: 0, up: PI4, panX, panY, panZ}) },
home: function() { tweenCam({left: home, up: PI4, panX, panY, panZ}) },
front: function() { tweenCam({left: 0, up: PI2, panX, panY, panZ}) },
right: function() { tweenCam({left: PI2, up: PI2, panX, panY, panZ}) },
left: function() { tweenCam({left: -PI2, up: PI2, panX, panY, panZ}) },
@ -962,6 +963,9 @@
viewControl.setTarget(v);
refresh();
},
setHome: function(r) {
home = r || 0;
}
},
mouse: {