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
+6
View File
@@ -11,6 +11,7 @@ import {
markToolCancelConsumed,
triggerSFX,
useEditor,
usePathDraftPreview,
} from '@pascal-app/editor'
import { useViewer } from '@pascal-app/viewer'
import { Html } from '@react-three/drei'
@@ -98,6 +99,11 @@ const LinesetTool = () => {
const altAnchorRef = useRef<{ clientY: number; baseY: number } | null>(null)
const lastClientYRef = useRef<number | null>(null)
useEffect(() => {
usePathDraftPreview.getState().setDraft('lineset', draftPoints, cursorPos)
}, [cursorPos, draftPoints])
useEffect(() => () => usePathDraftPreview.getState().clear('lineset'), [])
useEffect(() => {
if (!activeLevelId) return