Remove most of modelingMachine.context.store (#3867)

This commit is contained in:
Frank Noirot
2024-09-12 22:06:50 -04:00
committed by GitHub
parent 772034af68
commit 728e87a627
21 changed files with 97 additions and 227 deletions

View File

@ -59,15 +59,6 @@ export function useSetupEngineManager(
return modifyGrid(kclManager.engineCommandManager, hidden)
},
})
modelingSend({
type: 'Set context',
data: {
streamDimensions: {
streamWidth: quadWidth,
streamHeight: quadHeight,
},
},
})
hasSetNonZeroDimensions.current = true
}
@ -111,24 +102,10 @@ export function useSetupEngineManager(
streamRef?.current?.offsetWidth ?? 0,
streamRef?.current?.offsetHeight ?? 0
)
if (
modelingContext.store.streamDimensions.streamWidth !== width ||
modelingContext.store.streamDimensions.streamHeight !== height
) {
engineCommandManager.handleResize({
streamWidth: width,
streamHeight: height,
})
modelingSend({
type: 'Set context',
data: {
streamDimensions: {
streamWidth: width,
streamHeight: height,
},
},
})
}
engineCommandManager.handleResize({
streamWidth: width,
streamHeight: height,
})
}, 500)
const onOnline = () => {