three way view from the back

This commit is contained in:
Val Erastov 2019-02-22 00:43:12 -08:00
parent de645bc6e7
commit 0fdebe64da
2 changed files with 13 additions and 1 deletions

View file

@ -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({

View file

@ -16,6 +16,7 @@ export default {
'StandardViewTop': '5',
'StandardViewBottom': '6',
'StandardView3Way': '7',
'StandardView3WayBack': '8',
'HistoryBackward': ',',
'HistoryForward': '.',
'EditFace': 's',