Feature: static stage lights before the show

This commit is contained in:
Dejvino 2026-01-04 06:20:53 +00:00
parent 066fcc26cc
commit dcf12771d6

View File

@ -82,10 +82,29 @@ export class StageLights extends SceneFeature {
baseX: x
});
}
// Initialize static random state for pre-party
this.staticColor = new THREE.Color().setHSL(Math.random(), 0.8, 0.5);
this.focusPoint.set((Math.random() - 0.5) * 20, Math.random() * 2, -10 + (Math.random() - 0.5) * 10);
this.targetFocusPoint.copy(this.focusPoint);
}
update(deltaTime) {
const time = state.clock.getElapsedTime();
if (!state.partyStarted) {
this.lights.forEach((item) => {
const targetX = this.focusPoint.x + (item.baseX * 0.2);
item.target.position.set(targetX, this.focusPoint.y, this.focusPoint.z);
item.fixture.lookAt(targetX, this.focusPoint.y, this.focusPoint.z);
item.light.intensity = 30;
if (this.staticColor) {
item.light.color.copy(this.staticColor);
item.lens.material.color.copy(this.staticColor);
}
});
return;
}
// Change target area logic
let shouldChange = false;