Phase 1 Complete: Dungeon Engine & Visuals. Switched to Manual Exploration Plan.
This commit is contained in:
15
src/main.js
15
src/main.js
@@ -45,15 +45,22 @@ console.log("Starting Dungeon Generation...");
|
||||
generator.startDungeon(mission);
|
||||
|
||||
// 4. Render Loop
|
||||
const animate = () => {
|
||||
let lastStepTime = 0;
|
||||
const STEP_DELAY = 1000; // 1 second delay
|
||||
|
||||
const animate = (time) => {
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
// Logic Step
|
||||
// Logic Step with Delay
|
||||
if (!generator.isComplete) {
|
||||
generator.step();
|
||||
if (time - lastStepTime > STEP_DELAY) {
|
||||
console.log("--- Executing Generation Step ---");
|
||||
generator.step();
|
||||
lastStepTime = time;
|
||||
}
|
||||
}
|
||||
|
||||
// Render
|
||||
renderer.render(cameraManager.getCamera());
|
||||
};
|
||||
animate();
|
||||
animate(0);
|
||||
|
||||
Reference in New Issue
Block a user