diff --git a/magic-mirror/src/core/animate.js b/magic-mirror/src/core/animate.js index d073f47..be3045a 100644 --- a/magic-mirror/src/core/animate.js +++ b/magic-mirror/src/core/animate.js @@ -15,7 +15,7 @@ function updateCamera() { const lookAmplitude = 0.4; // Base Camera Position in front of the TV - const baseX = -0.5; + const baseX = -0.3; const baseY = 1.5; const baseZ = 1.9; diff --git a/magic-mirror/src/scene/fireplace.js b/magic-mirror/src/scene/fireplace.js index 8686a25..fa26c7d 100644 --- a/magic-mirror/src/scene/fireplace.js +++ b/magic-mirror/src/scene/fireplace.js @@ -143,5 +143,6 @@ export function updateFire() { // Flicker light const flicker = Math.random() * 0.4; fireLight.intensity = 1.2 + flicker; - fireLight.position.y = 0.2 + 1.0 / 2 + (Math.random() - 0.5) * 0.1; + const t = state.clock.getElapsedTime(); + fireLight.position.y = 0.2 + 1.0 / 2 + Math.sin(t * 3)*0.01 + Math.cos(t * 7)*0.01 + Math.cos(t * 11 ) * 0.01; } \ No newline at end of file diff --git a/magic-mirror/src/scene/lectern.js b/magic-mirror/src/scene/lectern.js index 76966d6..c410dd8 100644 --- a/magic-mirror/src/scene/lectern.js +++ b/magic-mirror/src/scene/lectern.js @@ -139,7 +139,9 @@ export function createLectern(x, y, z, rotY) { const flippingPageGroup = new THREE.Group(); const frontPage = new THREE.Mesh(pageGeo, flippingPageMat); + frontPage.castShadow = true; const backPage = new THREE.Mesh(pageGeo, flippingPageBackMat); + backPage.castShadow = true; backPage.rotation.y = Math.PI; // Rotate the back page to face the other way flippingPageGroup.add(frontPage); @@ -148,7 +150,6 @@ export function createLectern(x, y, z, rotY) { lecternState.flippingPage = flippingPageGroup; // Assign the group to the state lecternState.flippingPage.position.x = bookWidth / 4; lecternState.flippingPage.visible = false; - lecternState.flippingPage.castShadow = true; bookGroup.add(lecternState.flippingPage); lecternGroup.add(bookGroup); diff --git a/magic-mirror/src/scene/rat.js b/magic-mirror/src/scene/rat.js index 4ae3856..daed51a 100644 --- a/magic-mirror/src/scene/rat.js +++ b/magic-mirror/src/scene/rat.js @@ -72,7 +72,7 @@ export function createRats(x, y, z, rotY) { new THREE.Vector3(0.8, 0, -1.2), new THREE.Vector3(-1.0, 0, -1.3), new THREE.Vector3(-1.8, 0, -1.0), - new THREE.Vector3(-1.9, 0, 0.7), + new THREE.Vector3(-1.1, 0, 0.7), new THREE.Vector3(0.5, 0, 0.5), new THREE.Vector3(1.8, 0, 1.0), new THREE.Vector3(x, y, z), // End at the hole diff --git a/magic-mirror/src/scene/root.js b/magic-mirror/src/scene/root.js index ee6faff..e16a019 100644 --- a/magic-mirror/src/scene/root.js +++ b/magic-mirror/src/scene/root.js @@ -144,7 +144,7 @@ export function createSceneObjects() { createFireplace(state.roomSize / 2 - 0.5, -1, -Math.PI / 2); // --- Lectern --- - createLectern(-state.roomSize/2 + 0.4, 0, -0.1, Math.PI / 2.3); + createLectern(-state.roomSize/2 + 0.4, 0, 0.1, Math.PI / 2.3); createRats(state.roomSize/2 - 0.01, 0, 0.37, -Math.PI / 2);