add assets to assets.json and update source URL

This commit is contained in:
alex-mcneilly
2025-05-28 14:16:45 -07:00
committed by Diego Marcos
parent da03493d11
commit cdf7b02838
2 changed files with 7 additions and 5 deletions
+4
View File
@@ -23,6 +23,10 @@
"url": "https://forge.dev/assets/splats/fireplace.spz",
"directory": "splats"
},
"snow-street.spz": {
"url": "https://forge-gfx.github.io/assets/splats/snow-street.spz",
"directory": "splats"
},
"branzino-amarin.spz": {
"url": "https://forge.dev/assets/splats/food/branzino-amarin.spz",
"directory": "splats/food"
+3 -5
View File
@@ -69,9 +69,7 @@
handleResize();
window.addEventListener("resize", handleResize);
// const backgroundURL = await getAssetFileURL("snow-street.spz");
const backgroundURL =
"./snow-street.spz";
const backgroundURL = await getAssetFileURL("snow-street.spz");
const background = new SplatMesh({ url: backgroundURL });
background.quaternion.set(1, 0, 0, 0);
scene.add(background);
@@ -221,9 +219,9 @@
controls.update(dt, camera);
// camera movement
const targetZ = 91;
const targetZ = 90.5;
const startZ = 104;
const duration = 90;
const duration = 9;
const progress = Math.min(1, t / duration);
const smoothProgress = Math.sin(progress * Math.PI * 0.5);
camera.position.z = startZ + (targetZ - startZ) * smoothProgress;