fix: a pb with octree
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled

This commit is contained in:
Tom Boullay
2026-05-11 16:43:02 +02:00
parent 601cc4b6be
commit 6854f52b23
3 changed files with 28 additions and 8 deletions
+6 -2
View File
@@ -62,13 +62,17 @@ class ModelErrorBoundary extends Component<
interface GameMapProps {
onOctreeReady: OctreeReadyHandler;
buildOctree?: boolean;
}
export function GameMap({ onOctreeReady }: GameMapProps): React.JSX.Element {
export function GameMap({
onOctreeReady,
buildOctree = true,
}: GameMapProps): React.JSX.Element {
const [mapNodes, setMapNodes] = useState<LoadedMapNode[]>([]);
const groupRef = useRef<THREE.Group>(null);
useOctreeGraphNode(groupRef, onOctreeReady, mapNodes.length);
useOctreeGraphNode(groupRef, onOctreeReady, mapNodes.length, buildOctree);
useEffect(() => {
const loadMap = async () => {