mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 09:52:34 +01:00
three way view from the back
This commit is contained in:
parent
de645bc6e7
commit
0fdebe64da
2 changed files with 13 additions and 1 deletions
|
|
@ -4,7 +4,8 @@ import Vector from 'math/vector';
|
|||
const NEG_X = AXIS.X.negate();
|
||||
const NEG_Y = AXIS.Y.negate();
|
||||
const NEG_Z = AXIS.Z.negate();
|
||||
const DIR_3_WAY_VIEW = new Vector(1, 1, 1).normalize();
|
||||
const DIR_3_WAY_VIEW = new Vector(1, 1, 1).normalize();
|
||||
const DIR_3_WAY_BACK_VIEW = new Vector(-1, 1, -1).normalize();
|
||||
|
||||
function lookAtFace(viewer, face, currFace) {
|
||||
let dist = currFace ? currFace.csys.origin.distanceTo(viewer.sceneSetup.camera.position) : undefined;
|
||||
|
|
@ -163,6 +164,16 @@ export default [
|
|||
ctx.services.viewer.requestRender();
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'StandardView3WayBack',
|
||||
appearance: {
|
||||
label: 'three way back'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, DIR_3_WAY_BACK_VIEW, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'HistoryBackward',
|
||||
invoke: ctx => ctx.services.craft.historyTravel.backward({
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export default {
|
|||
'StandardViewTop': '5',
|
||||
'StandardViewBottom': '6',
|
||||
'StandardView3Way': '7',
|
||||
'StandardView3WayBack': '8',
|
||||
'HistoryBackward': ',',
|
||||
'HistoryForward': '.',
|
||||
'EditFace': 's',
|
||||
|
|
|
|||
Loading…
Reference in a new issue