fix ctrl+click to focus
This commit is contained in:
parent
14afaf4d96
commit
6a8f2d355b
1 changed files with 2 additions and 5 deletions
|
|
@ -622,17 +622,14 @@ const api = exports({
|
|||
let left, up;
|
||||
if (normal) {
|
||||
let { x, y, z } = normal;
|
||||
left = new Vector3(x,y,0).angleTo(new Vector3(0,-1,0));
|
||||
up = new Vector3(0,y,z).angleTo(new Vector3(0,0,1));
|
||||
left = new Vector3(x,y,z).angleTo(new Vector3(0,-1,0));
|
||||
up = new Vector3(x,y,z).angleTo(new Vector3(0,0,1));
|
||||
if (x < 0) left = -left;
|
||||
}
|
||||
// sets "home" views (front, back, home, reset)
|
||||
space.platform.setCenter(center.x, -center.y, center.z);
|
||||
// sets camera focus
|
||||
space.view.panTo(center.x, center.z, -center.y, left, up);
|
||||
// space.view.setFocus(new Vector3(
|
||||
// center.x, center.z, -center.y
|
||||
// ));
|
||||
},
|
||||
|
||||
grid(state = {toggle:true}) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue