src/components/box.jsx
@@ -4,10 +4,12 @@ import * as THREE from 'three'; import { MODEL_BOX_SCALE } from '@/config/setting' import * as Common from '../utils/common'; import { useStore } from '@/store'; const Box = (props) => { const { position = [0, 300, 0], rotationY = 0 } = props; const state = useStore(); const boxModel = useMemo(() => { const fbx = useFBX('/models/box/box.fbx'); if (!fbx.castShadow) { @@ -18,8 +20,8 @@ }, []) useEffect(() => { }, []); console.log(state.shelfList['1-1-1']); }, [props]); return ( <>