diff --git a/data/theme.json b/data/theme.json index a33a37d..14d418b 100644 --- a/data/theme.json +++ b/data/theme.json @@ -32,11 +32,5 @@ "duration": [110, 340], "slices": [2, 6], "maxOffset": 12 - }, - "gameScene": { - "overlay": true, - "scanlineAlpha": 0.1, - "vignetteAlpha": 0.45, - "burstOnEntry": true } } diff --git a/js/scenes/GameScene.js b/js/scenes/GameScene.js index 7073a06..ce20979 100644 --- a/js/scenes/GameScene.js +++ b/js/scenes/GameScene.js @@ -8,7 +8,6 @@ import { formatSystemReport } from '../galaxy/SystemReport.js'; import { Ship } from '../entities/Ship.js'; import { Planet } from '../entities/Planet.js'; import { Starfield } from '../visuals/Starfield.js'; -import { CyberOverlay } from '../visuals/CyberOverlay.js'; const FONT_FALLBACK = "'Segoe UI', 'Helvetica Neue', Arial, sans-serif"; const HEADER_FONT = () => fontStack('header', FONT_FALLBACK); @@ -43,14 +42,6 @@ export class GameScene extends Phaser.Scene { this.cameraFollowShip = config.get('game.camera.followShip', true); this.cameraFollowRate = config.get('game.camera.followRate', 3.0); // 1/s - // The shared cyberpunk dressing (scanlines, vignette, occasional - // glitch burst) — the same overlay the menu uses, dialed down. - this.overlay = this.createThemeOverlay(); - if (this.overlay && config.get('theme.gameScene.burstOnEntry', true)) { - // One arrival glitch when we cut in from the menu. - this.time.delayedCall(350, () => this.overlay?.trigger(320, 0.8)); - } - // We are, after all, in a system. Show the player which one. (This // also establishes the galaxy — and its seed — for what follows.) this.createSystemHud(); @@ -162,39 +153,12 @@ export class GameScene extends Phaser.Scene { line(`seed ${this.galaxy.seed}`, { fontFamily: fam, fontSize: '11px', color: '#3d476b' }); } - /** - * The shared CRT/glitch overlay for this scene (data/theme.json → - * gameScene + overlay/glitch). Dialed down vs. the menu: fainter - * scanlines, lighter vignette — dressing, not the star of the show. - */ - createThemeOverlay() { - const theme = config.section('theme', {}); - const gs = config.section('theme.gameScene', {}); - if (gs.overlay === false) return null; - const overlay = theme.overlay ?? {}; - return new CyberOverlay(this, { - scanline: { - pitch: overlay.scanline?.pitch ?? 3, - alpha: gs.scanlineAlpha ?? overlay.scanline?.alpha ?? 0.1, - }, - grid: overlay.grid - ? { cell: overlay.grid.cell ?? 48, alpha: (overlay.grid.alpha ?? 0.05) * 0.6 } - : undefined, - vignette: overlay.vignette - ? { alpha: gs.vignetteAlpha ?? overlay.vignette.alpha ?? 0.4 } - : undefined, - sweep: overlay.sweep, - glitch: theme.glitch, - }); - } - update(_time, delta) { // Phaser v4 (Giedi): the engine does not step the scene's TimeClock or // TweenManager — drive them here or delayedCall/addEvent/tweens never // fire. (Same quirk as MenuScene.update; verified Sept 2026.) this.time.update(_time, delta); this.tweens.update(); - this.overlay?.update(_time, delta); this.ship.update(_time, delta); // The home world is solid: the ship may come within the clearance in // data/planets.json of its rim, but never closer (or through it). @@ -253,6 +217,5 @@ export class GameScene extends Phaser.Scene { shutdown() { this.starfield?.destroy(); - this.overlay?.destroy(); } }