mirror of
https://github.com/storytold/spark.git
synced 2026-10-18 07:40:38 +00:00
add assets to assets.json and update source URL
This commit is contained in:
committed by
Diego Marcos
parent
da03493d11
commit
cdf7b02838
@@ -23,6 +23,10 @@
|
|||||||
"url": "https://forge.dev/assets/splats/fireplace.spz",
|
"url": "https://forge.dev/assets/splats/fireplace.spz",
|
||||||
"directory": "splats"
|
"directory": "splats"
|
||||||
},
|
},
|
||||||
|
"snow-street.spz": {
|
||||||
|
"url": "https://forge-gfx.github.io/assets/splats/snow-street.spz",
|
||||||
|
"directory": "splats"
|
||||||
|
},
|
||||||
"branzino-amarin.spz": {
|
"branzino-amarin.spz": {
|
||||||
"url": "https://forge.dev/assets/splats/food/branzino-amarin.spz",
|
"url": "https://forge.dev/assets/splats/food/branzino-amarin.spz",
|
||||||
"directory": "splats/food"
|
"directory": "splats/food"
|
||||||
|
|||||||
@@ -69,9 +69,7 @@
|
|||||||
handleResize();
|
handleResize();
|
||||||
window.addEventListener("resize", handleResize);
|
window.addEventListener("resize", handleResize);
|
||||||
|
|
||||||
// const backgroundURL = await getAssetFileURL("snow-street.spz");
|
const backgroundURL = await getAssetFileURL("snow-street.spz");
|
||||||
const backgroundURL =
|
|
||||||
"./snow-street.spz";
|
|
||||||
const background = new SplatMesh({ url: backgroundURL });
|
const background = new SplatMesh({ url: backgroundURL });
|
||||||
background.quaternion.set(1, 0, 0, 0);
|
background.quaternion.set(1, 0, 0, 0);
|
||||||
scene.add(background);
|
scene.add(background);
|
||||||
@@ -221,9 +219,9 @@
|
|||||||
controls.update(dt, camera);
|
controls.update(dt, camera);
|
||||||
|
|
||||||
// camera movement
|
// camera movement
|
||||||
const targetZ = 91;
|
const targetZ = 90.5;
|
||||||
const startZ = 104;
|
const startZ = 104;
|
||||||
const duration = 90;
|
const duration = 9;
|
||||||
const progress = Math.min(1, t / duration);
|
const progress = Math.min(1, t / duration);
|
||||||
const smoothProgress = Math.sin(progress * Math.PI * 0.5);
|
const smoothProgress = Math.sin(progress * Math.PI * 0.5);
|
||||||
camera.position.z = startZ + (targetZ - startZ) * smoothProgress;
|
camera.position.z = startZ + (targetZ - startZ) * smoothProgress;
|
||||||
|
|||||||
Reference in New Issue
Block a user