change default home view for belt
This commit is contained in:
parent
9a4613cd53
commit
987876a61f
2 changed files with 6 additions and 3 deletions
|
|
@ -872,7 +872,8 @@
|
||||||
|
|
||||||
API.conf.save();
|
API.conf.save();
|
||||||
|
|
||||||
API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0);
|
// API.const.SPACE.view.setHome(dev.bedBelt ? Math.PI/2 : 0, Math.PI / 2.5);
|
||||||
|
API.const.SPACE.view.setHome(0, Math.PI / 2.5);
|
||||||
// when changing devices, update focus on widgets
|
// when changing devices, update focus on widgets
|
||||||
if (chgdev) {
|
if (chgdev) {
|
||||||
setTimeout(API.space.set_focus, 0);
|
setTimeout(API.space.set_focus, 0);
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
panY = 0,
|
panY = 0,
|
||||||
panZ = 0,
|
panZ = 0,
|
||||||
home = 0,
|
home = 0,
|
||||||
|
up = PI4,
|
||||||
gridZOff = 0,
|
gridZOff = 0,
|
||||||
tweenTime = 500,
|
tweenTime = 500,
|
||||||
tweenDelay = 20,
|
tweenDelay = 20,
|
||||||
|
|
@ -960,7 +961,7 @@
|
||||||
view: {
|
view: {
|
||||||
top: function(then) { tweenCam({left: home, up: 0, panX, panY, panZ, then}) },
|
top: function(then) { tweenCam({left: home, up: 0, panX, panY, panZ, then}) },
|
||||||
back: function(then) { tweenCam({left: PI, up: PI2, panX, panY, panZ, then}) },
|
back: function(then) { tweenCam({left: PI, up: PI2, panX, panY, panZ, then}) },
|
||||||
home: function(then) { tweenCam({left: home, up: PI4, panX, panY, panZ, then}) },
|
home: function(then) { tweenCam({left: home, up, panX, panY, panZ, then}) },
|
||||||
front: function(then) { tweenCam({left: 0, up: PI2, panX, panY, panZ, then}) },
|
front: function(then) { tweenCam({left: 0, up: PI2, panX, panY, panZ, then}) },
|
||||||
right: function(then) { tweenCam({left: PI2, up: PI2, panX, panY, panZ, then}) },
|
right: function(then) { tweenCam({left: PI2, up: PI2, panX, panY, panZ, then}) },
|
||||||
left: function(then) { tweenCam({left: -PI2, up: PI2, panX, panY, panZ, then}) },
|
left: function(then) { tweenCam({left: -PI2, up: PI2, panX, panY, panZ, then}) },
|
||||||
|
|
@ -982,8 +983,9 @@
|
||||||
viewControl.setTarget(v);
|
viewControl.setTarget(v);
|
||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
setHome: function(r) {
|
setHome: function(r,u) {
|
||||||
home = r || 0;
|
home = r || 0;
|
||||||
|
up = u || PI4;
|
||||||
},
|
},
|
||||||
spin: function(then, count) {
|
spin: function(then, count) {
|
||||||
Space.view.front(() => {
|
Space.view.front(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue