reset camera on empty scene (#3293)

* reset camera on empty scene

* tweak numbers

* number tweak again
This commit is contained in:
Kurt Hutten
2024-08-06 17:05:46 +10:00
committed by GitHub
parent ffe0da6dcd
commit 2bc99ba39b

View File

@ -366,7 +366,7 @@ export const modelingMachine = createMachine(
'Artifact graph emptied': 'hidePlanes', 'Artifact graph emptied': 'hidePlanes',
}, },
entry: 'show default planes', entry: ['show default planes', 'reset camera position'],
}, },
}, },
@ -1063,6 +1063,17 @@ export const modelingMachine = createMachine(
sketchEnginePathId: '', sketchEnginePathId: '',
sketchPlaneId: '', sketchPlaneId: '',
}), }),
'reset camera position': () =>
engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'default_camera_look_at',
center: { x: 0, y: 0, z: 0 },
vantage: { x: 0, y: -1250, z: 580 },
up: { x: 0, y: 0, z: 1 },
},
}),
'set new sketch metadata': assign((_, { data }) => ({ 'set new sketch metadata': assign((_, { data }) => ({
sketchDetails: data, sketchDetails: data,
})), })),