adjust snowbox bounds

This commit is contained in:
alex-mcneilly
2025-05-29 13:30:36 -07:00
committed by Diego Marcos
parent f369779dcc
commit 7bb2c0300b
+6 -5
View File
@@ -36,8 +36,8 @@
const SCENE_CONFIG = { const SCENE_CONFIG = {
SNOW_HEIGHT: 8, SNOW_HEIGHT: 8,
HALF_WIDTH: 25, HALF_WIDTH: 12,
HALF_DEPTH: 50, HALF_DEPTH: 48,
SNOW_MIN_Y: -0.7, SNOW_MIN_Y: -0.7,
CAMERA_DURATION: 90, CAMERA_DURATION: 90,
}; };
@@ -49,6 +49,7 @@
0.1, 0.1,
1000 1000
); );
console.log(camera.position);
const renderer = new THREE.WebGLRenderer(); const renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight); renderer.setSize(window.innerWidth, window.innerHeight);
@@ -85,13 +86,13 @@
const snowVolumeBox = new THREE.Box3( const snowVolumeBox = new THREE.Box3(
new THREE.Vector3( new THREE.Vector3(
cam.x - SCENE_CONFIG.HALF_WIDTH, cam.x - SCENE_CONFIG.HALF_WIDTH,
cam.y - SCENE_CONFIG.SNOW_HEIGHT / 1.5, cam.y - (SCENE_CONFIG.SNOW_HEIGHT * 8),
cam.z - SCENE_CONFIG.HALF_DEPTH, cam.z - SCENE_CONFIG.HALF_DEPTH * 2,
), ),
new THREE.Vector3( new THREE.Vector3(
cam.x + SCENE_CONFIG.HALF_WIDTH, cam.x + SCENE_CONFIG.HALF_WIDTH,
cam.y + SCENE_CONFIG.SNOW_HEIGHT * 2, cam.y + SCENE_CONFIG.SNOW_HEIGHT * 2,
cam.z + SCENE_CONFIG.HALF_DEPTH, cam.z + SCENE_CONFIG.HALF_DEPTH / 8,
), ),
); );