Skip to content

Commit 7bd190f

Browse files
authored
Merge pull request #2 from DynamoDS/addLevelOverview
feat: level intro camera overview
2 parents 196dda9 + ccc94a4 commit 7bd190f

4 files changed

Lines changed: 566 additions & 10 deletions

File tree

src/config/GameConfig.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ export const WIRE_CURVE_SEGMENTS = 24;
7979
/** Duration (ms) of the red flash before a broken wire disappears. */
8080
export const WIRE_BREAK_FLASH_MS = 180;
8181

82+
// ── Level intro camera pan ─────────────────────────────────────────────────────
83+
/** Duration of the outward pan from spawn to goal flag (ms). */
84+
export const INTRO_PAN_OUT_MS = 2000;
85+
/** Pause at goal flag before panning back (ms). */
86+
export const INTRO_PAUSE_MS = 500;
87+
/** Duration of the return pan from goal flag back to player (ms). */
88+
export const INTRO_RETURN_MS = 1000;
89+
/** Camera zoom level during overview (1 = normal; smaller = more world visible). */
90+
export const INTRO_ZOOM_OUT = 0.2;
91+
8292
/** Max fuel (matches UI bar denominator). */
8393
export const PLAYER_FUEL_MAX = 72;
8494
/** Upward velocity while holding Shift with fuel (Arcade Y is down-positive). */

src/levels/buildLevelFromGraph.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,6 @@ export function buildLevelFromGraph(
633633
}
634634

635635
scene.cameras.main.setBounds(0, WORLD_TOP_Y, worldWidth, physicsHeight);
636-
scene.cameras.main.startFollow(player.sprite, true, 0.1, 0.1);
637636

638637
return { worldWidth, player, spawnX, spawnY, coins: collectibles, fireGround, safeGround, connectors, flag, movingPlatforms, jacobot };
639638
}

0 commit comments

Comments
 (0)