Compare commits
No commits in common. "fd08d223ae8a5e50333f9cb4eec4e9a62358b6c0" and "4784d5ee26ce8b02740225ee39ba7e7424b20c25" have entirely different histories.
fd08d223ae
...
4784d5ee26
@ -61,9 +61,9 @@
|
||||
let videoUrls = []; // Array to hold all video URLs
|
||||
let currentVideoIndex = -1; // Index of the currently playing video
|
||||
|
||||
const originalLampIntensity = 0.8; // Base intensity for the flickering lamp
|
||||
const originalLampIntensity = 1.5; // Base intensity for the flickering lamp
|
||||
const originalScreenIntensity = 0.2; // Base intensity for the screen glow
|
||||
const screenIntensityPulse = 0.2;
|
||||
const screenIntensityPulse = 0.4;
|
||||
|
||||
const roomSize = 5;
|
||||
const roomHeight = 3;
|
||||
@ -141,7 +141,7 @@
|
||||
const ambientLight = new THREE.AmbientLight(0x111111);
|
||||
scene.add(ambientLight);
|
||||
|
||||
const roomLight = new THREE.PointLight(0xffaa55, 0.05, roomSize);
|
||||
const roomLight = new THREE.PointLight(0xffaa55, 0.2, roomSize);
|
||||
roomLight.position.set(0, 1.8, 0);
|
||||
scene.add(roomLight);
|
||||
|
||||
@ -694,24 +694,15 @@
|
||||
cameraMesh.castShadow = true; cameraMesh.receiveShadow = true;
|
||||
scene.add(cameraMesh);
|
||||
|
||||
// --- 8. Pizza Box ---
|
||||
// --- 8. Pizza Box (On the table) ---
|
||||
const boxGeometry = new THREE.BoxGeometry(0.5, 0.05, 0.5);
|
||||
const boxMaterial = new THREE.MeshPhongMaterial({ color: 0xe0c896, shininess: 5 });
|
||||
const pizzaBox = new THREE.Mesh(boxGeometry, boxMaterial);
|
||||
pizzaBox.position.set(-1.8, 0.025, -0.8);
|
||||
pizzaBox.position.set(1.8, 0.7 + 0.025, 0.8);
|
||||
pizzaBox.rotation.y = Math.PI / 5;
|
||||
pizzaBox.castShadow = true; pizzaBox.receiveShadow = true;
|
||||
scene.add(pizzaBox);
|
||||
|
||||
// --- 8. Cassette ---
|
||||
const cassetteGeometry = new THREE.BoxGeometry(0.2, 0.05, 0.45);
|
||||
const cassetteMaterial = new THREE.MeshPhongMaterial({ color: 0xe0c896, shininess: 5 });
|
||||
const cassette = new THREE.Mesh(cassetteGeometry, cassetteMaterial);
|
||||
cassette.position.set(-0.5, 0.025, -1.4);
|
||||
cassette.rotation.y = Math.PI / 3;
|
||||
cassette.castShadow = true; cassette.receiveShadow = true;
|
||||
scene.add(cassette);
|
||||
|
||||
createDoor(roomSize/2, -roomSize/2 * 0.5, -Math.PI/2);
|
||||
createBookshelf(-roomSize/2 + 0.2, roomSize/2*0.2, Math.PI/2, 0);
|
||||
createBookshelf(-roomSize/2 + 0.2, roomSize/2*0.7, Math.PI/2, 0);
|
||||
@ -1350,27 +1341,26 @@
|
||||
const globalTime = Date.now() * 0.00005;
|
||||
const lookAtTime = Date.now() * 0.00003;
|
||||
|
||||
const camAmplitude = 0.7;
|
||||
const camAmplitude = 0.6;
|
||||
const lookAmplitude = 0.05;
|
||||
|
||||
// Base Camera Position in front of the TV
|
||||
const baseX = -0.5;
|
||||
const baseX = 0;
|
||||
const baseY = 1.5;
|
||||
const baseZ = 2.5;
|
||||
const baseZ = 3;
|
||||
|
||||
// Base LookAt target (Center of the screen)
|
||||
const baseTargetX = -0.7;
|
||||
const baseTargetX = -1;
|
||||
const baseTargetY = 1.7;
|
||||
const baseTargetZ = -0.3;
|
||||
const baseTargetZ = -0.96;
|
||||
|
||||
// Camera Position Offsets (Drift)
|
||||
const camOffsetX = Math.sin(globalTime * 3.1) * camAmplitude;
|
||||
const camOffsetY = Math.cos(globalTime * 2.5) * camAmplitude * 0.4;
|
||||
const camOffsetZ = Math.cos(globalTime * 3.2) * camAmplitude * 1.4;
|
||||
|
||||
camera.position.x = baseX + camOffsetX;
|
||||
camera.position.y = baseY + camOffsetY;
|
||||
camera.position.z = baseZ + camOffsetZ;
|
||||
camera.position.z = baseZ;
|
||||
|
||||
// LookAt Target Offsets (Subtle Gaze Shift)
|
||||
const lookOffsetX = Math.sin(lookAtTime * 1.5) * lookAmplitude;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user