Feature: configurable party guests + changed textures

This commit is contained in:
Dejvino 2025-12-30 06:22:10 +00:00
parent ab8334f9ab
commit cb9a6c4a48
6 changed files with 18 additions and 13 deletions

View File

@ -12,7 +12,17 @@ const guestTextureUrls = [
// --- Scene dimensions for positioning --- // --- Scene dimensions for positioning ---
const stageHeight = 1.5; const stageHeight = 1.5;
const stageDepth = 5; const stageDepth = 5;
const length = 44; const length = 20;
const numGuests = 150;
const moveSpeed = 0.8;
const movementArea = { x: 15, z: length, y: 0, centerZ: -4 };
const jumpChance = 0.01;
const jumpDuration = 0.3;
const jumpHeight = 0.05;
const jumpVariance = 0.5;
const rushIn = false;
const waitTimeBase = 10;
const waitTimeVariance = 10;
// --- Billboard Properties --- // --- Billboard Properties ---
const guestHeight = 2.5; const guestHeight = 2.5;
@ -61,7 +71,6 @@ export class PartyGuests extends SceneFeature {
const createGuests = () => { const createGuests = () => {
const geometry = new THREE.PlaneGeometry(guestWidth, guestHeight); const geometry = new THREE.PlaneGeometry(guestWidth, guestHeight);
const numGuests = 150;
for (let i = 0; i < numGuests; i++) { for (let i = 0; i < numGuests; i++) {
const material = materials[i % materials.length]; const material = materials[i % materials.length];
@ -69,7 +78,9 @@ export class PartyGuests extends SceneFeature {
const pos = new THREE.Vector3( const pos = new THREE.Vector3(
(Math.random() - 0.5) * 10, (Math.random() - 0.5) * 10,
guestHeight / 2, guestHeight / 2,
(Math.random() * 20) - 2 // Position them in the main hall movementArea.centerZ + ( rushIn
? (((Math.random()-0.5) * length * 0.6) - length * 0.3)
: ((Math.random()-0.5) * length))
); );
guest.visible = false; // Start invisible guest.visible = false; // Start invisible
guest.position.copy(pos); guest.position.copy(pos);
@ -99,13 +110,7 @@ export class PartyGuests extends SceneFeature {
state.camera.getWorldPosition(cameraPosition); state.camera.getWorldPosition(cameraPosition);
const time = state.clock.getElapsedTime(); const time = state.clock.getElapsedTime();
const moveSpeed = 1.0; // Move slower
const movementArea = { x: 15, z: 20, y: 0, centerZ: -4 };
const jumpChance = 0.05; // Jump way more
const jumpDuration = 0.5;
const jumpHeight = 0.1;
const jumpVariance = 0.5;
this.guests.forEach(guestObj => { this.guests.forEach(guestObj => {
const { mesh } = guestObj; const { mesh } = guestObj;
mesh.lookAt(cameraPosition.x, mesh.position.y, cameraPosition.z); mesh.lookAt(cameraPosition.x, mesh.position.y, cameraPosition.z);
@ -140,7 +145,7 @@ export class PartyGuests extends SceneFeature {
} else { } else {
guestObj.state = 'WAITING'; guestObj.state = 'WAITING';
guestObj.waitStartTime = time; guestObj.waitStartTime = time;
guestObj.waitTime = 3 + Math.random() * 4; guestObj.waitTime = waitTimeBase + Math.random() * waitTimeVariance;
} }
} }

View File

@ -24,7 +24,7 @@ export class StageLights extends SceneFeature {
}); });
this.beam = new THREE.Mesh(beamGeo, beamMat); this.beam = new THREE.Mesh(beamGeo, beamMat);
// Positioned high above the front of the stage area // Positioned high above the front of the stage area
this.beam.position.set(0, 8, -14); this.beam.position.set(0, 9, -14);
this.beam.castShadow = true; this.beam.castShadow = true;
this.beam.receiveShadow = true; this.beam.receiveShadow = true;
state.scene.add(this.beam); state.scene.add(this.beam);
@ -46,7 +46,7 @@ export class StageLights extends SceneFeature {
// Fixture Mesh // Fixture Mesh
const fixture = new THREE.Mesh(fixtureGeo, fixtureMat); const fixture = new THREE.Mesh(fixtureGeo, fixtureMat);
fixture.position.set(x, 7.5, -14); // Match beam position fixture.position.set(x, 8.5, -14); // Match beam position
state.scene.add(fixture); state.scene.add(fixture);
// Lens Mesh // Lens Mesh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 840 KiB

After

Width:  |  Height:  |  Size: 663 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 KiB

After

Width:  |  Height:  |  Size: 752 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 856 KiB

After

Width:  |  Height:  |  Size: 661 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 850 KiB