From c521828a08bc58fb7255e1e711be9eef5e362e62 Mon Sep 17 00:00:00 2001 From: Dejvino Date: Mon, 17 Nov 2025 08:47:05 +0100 Subject: [PATCH] Tweak: Camera movement and door glow and chances of movement --- tv-player/src/core/animate.js | 8 ++++---- tv-player/src/scene/door.js | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tv-player/src/core/animate.js b/tv-player/src/core/animate.js index 3852a9b..9f523a9 100644 --- a/tv-player/src/core/animate.js +++ b/tv-player/src/core/animate.js @@ -5,11 +5,11 @@ import { state } from '../state.js'; function updateCamera() { - const globalTime = Date.now() * 0.00005; - const lookAtTime = Date.now() * 0.00003; + const globalTime = Date.now() * 0.00003; + const lookAtTime = Date.now() * 0.0002; - const camAmplitude = 0.5; - const lookAmplitude = 0.05; + const camAmplitude = 0.2; + const lookAmplitude = 0.1; // Base Camera Position in front of the TV const baseX = -0.5; diff --git a/tv-player/src/scene/door.js b/tv-player/src/scene/door.js index 0016df8..213dad7 100644 --- a/tv-player/src/scene/door.js +++ b/tv-player/src/scene/door.js @@ -77,15 +77,15 @@ export function updateDoor() { if (stateTimer <= 0) { const nextState = Math.random(); - if (nextState < 0.4) { + if (nextState < 0.1) { doorState = DOOR_STATES.RESTING; stateTimer = 2 + Math.random() * 5; - } else if (nextState < 0.7) { + } else if (nextState < 0.5) { doorState = DOOR_STATES.OPENING; - stateTimer = 2 + Math.random() * 4; + stateTimer = 2 + Math.random() * 5; } else { doorState = DOOR_STATES.CLOSING; - stateTimer = 3 + Math.random() * 3; + stateTimer = 3 + Math.random() * 2; } } @@ -97,7 +97,7 @@ export function updateDoor() { break; case DOOR_STATES.CLOSING: if (doorGroupPanel.rotation.y < minAngle) { - doorGroupPanel.rotation.y += speed; + doorGroupPanel.rotation.y += speed * 2; } break; } @@ -105,7 +105,7 @@ export function updateDoor() { // Outside material pulsating glow if (outsideMaterial) { const glowMin = 0.001; - const glowMax = 0.01; + const glowMax = 0.005; const glowSpeed = 0.0001; // Speed of the pulsation glowIntensity += glowDirection * glowSpeed; if (glowIntensity >= glowMax) {