Seperate pending messages from artifact map (#3084)

* start of seperating pending message from artifact map

* continue migration to sendCommandVersion2

* mostly massage types

* process artifact after the fact

* clean up
This commit is contained in:
Kurt Hutten
2024-07-23 17:13:23 +10:00
committed by GitHub
parent 1b8688f274
commit a68748abcf
4 changed files with 366 additions and 526 deletions

View File

@ -138,15 +138,23 @@ export const ModelingMachineProvider = ({
sceneInfra.camControls.syncDirection = 'engineToClient'
const settings: Models['CameraSettings_type'] = (
await engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'default_camera_get_settings',
},
})
)?.data?.data?.settings
const resp = await engineCommandManager.sendSceneCommand({
type: 'modeling_cmd_req',
cmd_id: uuidv4(),
cmd: {
type: 'default_camera_get_settings',
},
})
const settings =
resp &&
resp.success &&
resp.resp.type === 'modeling' &&
resp.resp.data.modeling_response.type ===
'default_camera_get_settings'
? resp.resp.data.modeling_response.data.settings
: ({} as Models['DefaultCameraGetSettings_type']['settings'])
if (settings.up.z !== 1) {
// workaround for gimbal lock situation
await engineCommandManager.sendSceneCommand({