fix: align world splat initial orientation
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-05-25 21:15:44 +08:00
parent 026bfd0615
commit 446b87443c

View File

@ -100,6 +100,8 @@ const DEFAULT_MESH_SETTINGS: Model3DViewerSettings = {
wireframe: false,
};
const WORLDLABS_ASSET_ROTATION: [number, number, number] = [Math.PI, 0, 0];
const EMPTY_MOVEMENT_STATE: MovementState = {
forward: false,
backward: false,
@ -1322,7 +1324,7 @@ function WorldSplatScene({
revealCompletedRef.current = false;
setParticleCloudData(null);
splatMesh.frustumCulled = false;
splatMesh.rotation.set(0, 0, 0);
splatMesh.rotation.set(...WORLDLABS_ASSET_ROTATION);
applySparkRevealProfile(sparkRenderer, splatMesh, SPLAT_LOADING_PROFILE);
let cancelled = false;
@ -1949,7 +1951,7 @@ function WorldSplatViewer({
<Model3DViewer
emptyStateTitle="准备加载 3D Mesh"
layerVisibility={fallbackMeshLayerVisibility}
modelRotation={[Math.PI, 0, 0]}
modelRotation={WORLDLABS_ASSET_ROTATION}
modelUrl={resolvedFallbackMeshUrl}
onCaptureReady={onCaptureReady}
onLayersChange={onFallbackMeshLayersChange}
@ -2087,7 +2089,7 @@ export function World3DViewer({
<Model3DViewer
emptyStateTitle={emptyStateTitle}
layerVisibility={meshLayerVisibility}
modelRotation={[Math.PI, 0, 0]}
modelRotation={WORLDLABS_ASSET_ROTATION}
modelUrl={meshUrl}
onLayersChange={onMeshLayersChange}
onStatsChange={onMeshStatsChange}