feat(core): expose generic host integration primitives

This commit is contained in:
Aymeric Rabot
2026-07-19 17:11:43 +02:00
parent 2084892383
commit 8f1c834e56
39 changed files with 2471 additions and 166 deletions
+8
View File
@@ -18,6 +18,7 @@ import {
markToolCancelConsumed,
triggerSFX,
useEditor,
usePathDraftPreview,
} from '@pascal-app/editor'
import { useViewer } from '@pascal-app/viewer'
import { Html } from '@react-three/drei'
@@ -285,6 +286,13 @@ const LiquidLineTool = () => {
// Leaving the tool clears Follow so re-arming it starts in free-draw.
useEffect(() => () => useLiquidLineToolOptions.getState().setFollow(false), [])
useEffect(() => {
usePathDraftPreview
.getState()
.setDraft('liquid-line', traceGhost ?? draftPoints, traceGhost ? null : cursorPos)
}, [cursorPos, draftPoints, traceGhost])
useEffect(() => () => usePathDraftPreview.getState().clear('liquid-line'), [])
useEffect(() => {
if (!activeLevelId) return