feat(core): expose generic host integration primitives
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user