UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

15 lines 629 B
import { useEffect } from "preact/hooks"; import { getSceneGraphExpanded } from "../../states/useSceneGraphExpanded"; import useSyncState from "../hooks/useSyncState"; import { useSignal } from "@preact/signals"; export default (manager) => { const expandedSignal = useSignal(false); const sceneGraphExpanded = useSyncState(getSceneGraphExpanded); useEffect(() => { if ("outerObject3d" in manager && sceneGraphExpanded?.has(manager.outerObject3d)) expandedSignal.value = true; }, [sceneGraphExpanded, manager]); return expandedSignal; }; //# sourceMappingURL=useExpanded.js.map