|
| 1 | +// Simple Dev Console Test |
| 2 | +import { createDevConsoleDebugOverlayRuntime } from './tools/shared/devConsoleDebugOverlay.js'; |
| 3 | + |
| 4 | +const devRuntime = createDevConsoleDebugOverlayRuntime(); |
| 5 | + |
| 6 | +console.log("STATE:", devRuntime.getState()); |
| 7 | + |
| 8 | +devRuntime.showConsole(); |
| 9 | +devRuntime.showOverlay(); |
| 10 | + |
| 11 | +const result = devRuntime.executeConsoleInput("help", { |
| 12 | + runtime: { sceneId: "scene.dev", status: "ready" }, |
| 13 | + hotReload: { enabled: true }, |
| 14 | + validation: { errorCount: 0, warningCount: 0 } |
| 15 | +}); |
| 16 | + |
| 17 | +console.log("\nCOMMAND OUTPUT:"); |
| 18 | +console.log(result.output.lines); |
| 19 | + |
| 20 | +const diagnostics = devRuntime.collectDiagnostics({ |
| 21 | + runtime: { sceneId: "scene.dev", status: "ready" }, |
| 22 | + render: { fps: 60, stages: ["parallax","tilemap","entities"] }, |
| 23 | + hotReload: { enabled: true, pending: false }, |
| 24 | + validation: { errorCount: 0, warningCount: 0 }, |
| 25 | + camera: { x: 0, y: 0, zoom: 1 }, |
| 26 | + entities: { count: 5 }, |
| 27 | + tilemap: { layerCount: 2 }, |
| 28 | + input: { lastKey: null }, |
| 29 | + assets: { loaded: 10 } |
| 30 | +}); |
| 31 | + |
| 32 | +const overlay = devRuntime.renderOverlay(diagnostics.diagnostics); |
| 33 | + |
| 34 | +console.log("\nOVERLAY:"); |
| 35 | +console.log(overlay.sections.map(s => s.title)); |
0 commit comments