fix: smooth world splat camera dragging
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-04-06 02:15:12 +08:00
parent cd1256d816
commit e21e3896a2

View File

@ -716,6 +716,11 @@ function WorldSplatScene({
renderer,
blurAmount: 0.18,
maxStdDev: Math.sqrt(7),
originDistance: 0.85,
view: {
sortRadial: true,
sortDistance: 0.04,
},
}),
[renderer]
);
@ -728,7 +733,6 @@ function WorldSplatScene({
useEffect(() => {
sparkRenderer.frustumCulled = false;
sparkRenderer.renderOrder = 10;
sparkRenderer.originDistance = 0.12;
applySparkRevealProfile(sparkRenderer, splatMesh, SPLAT_NORMAL_PROFILE);
return () => {
sparkRenderer.removeFromParent();
@ -780,9 +784,6 @@ function WorldSplatScene({
}, [camera, groundPlaneOffset, onLoadStateChange, sparkRenderer, splatMesh]);
useFrame(() => {
sparkRenderer.position.copy(camera.position);
sparkRenderer.updateMatrixWorld();
const phase = revealPhaseRef.current;
const revealElapsed =
phase === "revealing"