|
1 |
| -import { aspectModeToString, rectToString, sizeToString, vectorToString, xyToString, logEnterFullscreen, logFullscreenFailed, logFullscreenUnsupported, logLeaveFullscreen, logOrientationChange, logResize } from './util' |
| 1 | +import { aspectModeToString, rectToString, sizeToString, xyToString, logEnterFullscreen, logFullscreenFailed, logFullscreenUnsupported, logLeaveFullscreen, logOrientationChange, logResize } from './util' |
2 | 2 |
|
3 | 3 | const { POST_RENDER } = Phaser.Core.Events
|
4 | 4 |
|
@@ -59,7 +59,7 @@ export default class DebugGameScalePlugin extends Phaser.Plugins.BasePlugin {
|
59 | 59 | const h = 128
|
60 | 60 | let x = ~~Math.max(0, cx - 0.5 * w)
|
61 | 61 | let y = ~~Math.max(0, cy - 0.5 * h)
|
62 |
| - const dy = 16 |
| 62 | + const dy = 15 |
63 | 63 | const sx = 1 / scale.displayScale.x
|
64 | 64 | const sy = 1 / scale.displayScale.y
|
65 | 65 |
|
@@ -89,9 +89,9 @@ export default class DebugGameScalePlugin extends Phaser.Plugins.BasePlugin {
|
89 | 89 | c.fillText(`screen: ${screen.width}×${screen.height} [${(screen.width / screen.height).toFixed(3)}] DPR=${devicePixelRatio}`, x, (y += dy))
|
90 | 90 | }
|
91 | 91 | if (visualViewport) {
|
92 |
| - const { offsetLeft, offsetTop, width, height } = visualViewport; |
| 92 | + const { offsetLeft, offsetTop, width, height, scale } = visualViewport |
93 | 93 |
|
94 |
| - c.fillText(`visualViewport: ${offsetLeft}, ${offsetTop}, ${width}, ${height}`, x, (y += dy)) |
| 94 | + c.fillText(`visualViewport: offsetLeft=${offsetLeft} offsetTop=${offsetTop} width=${width}, height=${height} scale=${scale}`, x, (y += dy)) |
95 | 95 | }
|
96 | 96 | }
|
97 | 97 | }
|
0 commit comments