Persist theme - Reload everything on a disconnect (#3250)
* Reload everything on a disconnect * fix unit-integration tests * Further improvements to connection manager; persist theme across reconnects * Fix up artifactGraph.test * Actually pass the callback * Kurt hmmm (#3308) * kurts attempts * we're almost sane * get tests working, praise be --------- Co-authored-by: 49lf <ircsurfer33@gmail.com> * typo --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { EngineCommandManagerEvents } from 'lang/std/engineConnection'
|
||||
import { engineCommandManager, sceneInfra } from 'lib/singletons'
|
||||
import { throttle, isReducedMotion } from 'lib/utils'
|
||||
|
||||
@ -13,9 +14,12 @@ export const CamToggle = () => {
|
||||
const [enableRotate, setEnableRotate] = useState(true)
|
||||
|
||||
useEffect(() => {
|
||||
engineCommandManager.waitForReady.then(async () => {
|
||||
sceneInfra.camControls.dollyZoom(fov)
|
||||
})
|
||||
engineCommandManager.addEventListener(
|
||||
EngineCommandManagerEvents.SceneReady,
|
||||
async () => {
|
||||
sceneInfra.camControls.dollyZoom(fov)
|
||||
}
|
||||
)
|
||||
}, [])
|
||||
|
||||
const toggleCamera = () => {
|
||||
|
Reference in New Issue
Block a user