Tweak: Rat path + calmer fire light + shadow of pages
This commit is contained in:
parent
bb923968e5
commit
3b1421e4e7
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user