debug: add logging for scene loading flow
This commit is contained in:
@@ -14,6 +14,7 @@ import { useOctreeGraphNode } from "@/hooks/three/useOctreeGraphNode";
|
||||
import type { MapNode } from "@/types/editor/editor";
|
||||
import type { OctreeReadyHandler } from "@/types/three/three";
|
||||
import type { SceneLoadingChangeHandler } from "@/types/world/sceneLoading";
|
||||
import { logger } from "@/utils/core/Logger";
|
||||
import { logModelLoadError } from "@/utils/three/modelLoadLogger";
|
||||
|
||||
export interface GameMapCollisionNode {
|
||||
@@ -108,6 +109,14 @@ export function GameMapCollision({
|
||||
const collisionReady =
|
||||
mapReady && settledCollisionNodeCount >= collisionNodes.length;
|
||||
|
||||
logger.debug("GameMapCollision", "State", {
|
||||
mapReady,
|
||||
collisionNodesCount: collisionNodes.length,
|
||||
settledCollisionNodeCount,
|
||||
collisionReady,
|
||||
buildOctree,
|
||||
});
|
||||
|
||||
const notifyLoaded = useCallback(() => {
|
||||
if (loadedNotifiedRef.current) return;
|
||||
|
||||
@@ -124,6 +133,7 @@ export function GameMapCollision({
|
||||
|
||||
const handleOctreeReady = useCallback<OctreeReadyHandler>(
|
||||
(octree) => {
|
||||
logger.info("GameMapCollision", "Octree built, calling onOctreeReady");
|
||||
onLoadingStateChange?.({
|
||||
currentStep: "Collision prête",
|
||||
progress: 0.92,
|
||||
|
||||
Reference in New Issue
Block a user