| 6 | * @param app - the game application instance calling this function |
| 7 | */ |
| 8 | export function consoleHeader(app: Application): void { |
| 9 | const renderType = app.renderer.type; |
| 10 | const gpu_renderer = |
| 11 | typeof app.renderer.GPURenderer === "string" |
| 12 | ? ` (${app.renderer.GPURenderer})` |
| 13 | : ""; |
| 14 | const audioType = device.hasWebAudio ? "Web Audio" : "HTML5 Audio"; |
| 15 | |
| 16 | // output video information in the console |
| 17 | console.log( |
| 18 | `${renderType} renderer${gpu_renderer} | ${audioType} | ` + |
| 19 | `pixel ratio ${device.devicePixelRatio} | ${ |
| 20 | device.platform.nodeJS |
| 21 | ? "node.js" |
| 22 | : device.platform.isMobile |
| 23 | ? "mobile" |
| 24 | : "desktop" |
| 25 | } | ${device.getScreenOrientation()} | ${device.language}`, |
| 26 | ); |
| 27 | |
| 28 | console.log( |
| 29 | `resolution: ` + |
| 30 | `requested ${(app.settings as any).width}x${ |
| 31 | (app.settings as any).height |
| 32 | }, got ${app.renderer.width}x${app.renderer.height}`, |
| 33 | ); |
| 34 | } |