mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-12 03:13:24 +01:00
reorganize menus
This commit is contained in:
parent
5048f74c4b
commit
97ef5fa786
3 changed files with 36 additions and 13 deletions
|
|
@ -95,6 +95,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardViewFront',
|
||||
appearance: {
|
||||
label: 'front'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, AXIS.Z, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
@ -102,6 +105,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardViewBack',
|
||||
appearance: {
|
||||
label: 'back'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, NEG_Z, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
@ -109,6 +115,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardViewLeft',
|
||||
appearance: {
|
||||
label: 'left'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, NEG_X, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
@ -116,6 +125,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardViewRight',
|
||||
appearance: {
|
||||
label: 'right'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, AXIS.X, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
@ -123,6 +135,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardViewTop',
|
||||
appearance: {
|
||||
label: 'top'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, AXIS.Y, NEG_Z, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
@ -130,6 +145,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardViewBottom',
|
||||
appearance: {
|
||||
label: 'bottom'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, NEG_Y, AXIS.Z, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
@ -137,13 +155,9 @@ export default [
|
|||
},
|
||||
{
|
||||
id: 'StandardView3Way',
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, DIR_3_WAY_VIEW, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'StandardView3Way',
|
||||
appearance: {
|
||||
label: 'three way'
|
||||
},
|
||||
invoke: ctx => {
|
||||
ctx.services.viewer.lookAt(ORIGIN, DIR_3_WAY_VIEW, AXIS.Y, ctx.services.viewer.sceneSetup.camera.position.length());
|
||||
ctx.services.viewer.requestRender();
|
||||
|
|
|
|||
|
|
@ -2,20 +2,28 @@ export default [
|
|||
{
|
||||
id: 'file',
|
||||
cssIcons: ['file'],
|
||||
actions: ['Save', 'StlExport', '-', 'IMPORT_STL']
|
||||
actions: ['Save', 'StlExport', '-', 'IMPORT_STL', '-', 'ReassignSketch']
|
||||
},
|
||||
{
|
||||
id: 'craft',
|
||||
cssIcons: ['magic'],
|
||||
info: 'set of available craft operations on a solid',
|
||||
actions: ['EXTRUDE', 'CUT', 'REVOLVE', 'LOFT', 'SHELL', 'FILLET', 'DATUM_CREATE', 'ReassignSketch']
|
||||
actions: ['EXTRUDE', 'CUT', 'REVOLVE', 'LOFT', 'SHELL', 'FILLET', 'DATUM_CREATE']
|
||||
},
|
||||
{
|
||||
id: 'primitives',
|
||||
label: 'add',
|
||||
cssIcons: ['cube', 'plus'],
|
||||
info: 'set of available solid creation operations',
|
||||
actions: ['PLANE', 'BOX', 'SPHERE']
|
||||
actions: ['PLANE', 'BOX', 'SPHERE', 'CONE', 'CYLINDER', 'TORUS']
|
||||
},
|
||||
{
|
||||
id: 'views',
|
||||
label: 'views',
|
||||
cssIcons: ['camera'],
|
||||
info: 'switching camera views',
|
||||
actions: ['StandardViewFront', 'StandardViewBack', 'StandardViewLeft', 'StandardViewRight',
|
||||
'StandardViewTop', 'StandardViewBottom', 'StandardView3Way']
|
||||
},
|
||||
{
|
||||
id: 'boolean',
|
||||
|
|
@ -29,8 +37,9 @@ export default [
|
|||
label: 'start',
|
||||
cssIcons: ['rocket'],
|
||||
info: 'common set of actions',
|
||||
actions: ['EXTRUDE', 'CUT', 'SHELL', '-', 'INTERSECTION', 'SUBTRACT', 'UNION', '-', 'PLANE', 'BOX', 'SPHERE', '-',
|
||||
'EditFace', '-', 'DeselectAll', 'RefreshSketches']
|
||||
actions: ['EXTRUDE', 'CUT', 'REVOLVE', 'LOFT', 'FILLET', '-',
|
||||
'PLANE', 'BOX', 'SPHERE', 'CONE', 'CYLINDER', 'TORUS', '-',
|
||||
'EditFace']
|
||||
},
|
||||
{
|
||||
id: 'SolidContext',
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import OperationHistory from '../craft/ui/OperationHistory';
|
|||
import Expressions from '../expressions/Expressions';
|
||||
|
||||
export function activate({services, streams}) {
|
||||
streams.ui.controlBars.left.value = ['menu.file', 'menu.craft', 'menu.boolean', 'menu.primitives', 'Donate', 'GitHub'];
|
||||
streams.ui.controlBars.left.value = ['menu.file', 'menu.craft', 'menu.boolean', 'menu.primitives', 'menu.views', 'Donate', 'GitHub'];
|
||||
streams.ui.controlBars.right.value = [
|
||||
['Info', {label: null}],
|
||||
['RefreshSketches', {label: null}],
|
||||
|
|
|
|||
Loading…
Reference in a new issue