1
0

fix: add workshop props — bookshelf, candles, crystal ball glow (#429)

Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
This commit is contained in:
2026-03-19 10:29:18 -04:00
committed by Timmy
parent a31c929770
commit cdb1a7546b
2 changed files with 112 additions and 8 deletions

View File

@@ -55,7 +55,7 @@
camera.position.set(0, 2.0, 4.5);
// --- Build scene elements ---
const { crystalBall, fireLight } = buildRoom(scene);
const { crystalBall, crystalLight, fireLight, candleLights } = buildRoom(scene);
const wizard = createWizard();
scene.add(wizard.group);
const familiar = createFamiliar();
@@ -93,13 +93,24 @@
familiar.update(dt);
controls.update();
// Crystal ball subtle rotation
// Crystal ball subtle rotation + pulsing glow
crystalBall.rotation.y += dt * 0.3;
const pulse = 0.3 + Math.sin(Date.now() * 0.002) * 0.15;
crystalLight.intensity = pulse;
crystalBall.material.emissiveIntensity = pulse * 0.5;
// Fireplace flicker
fireLight.intensity = 1.2 + Math.sin(Date.now() * 0.005) * 0.15
+ Math.sin(Date.now() * 0.013) * 0.1;
// Candle flicker — each offset slightly for variety
const now = Date.now();
for (let i = 0; i < candleLights.length; i++) {
candleLights[i].intensity = 0.4
+ Math.sin(now * 0.007 + i * 2.1) * 0.1
+ Math.sin(now * 0.019 + i * 1.3) * 0.05;
}
renderer.render(scene, camera);
}
animate();