From c41209d0fc6b8f69c55d7c492f3919b937c2babf Mon Sep 17 00:00:00 2001 From: Sebastian Kupke Date: Wed, 4 May 2022 09:10:01 +0200 Subject: [PATCH] Added description to resolution. --- lib/pixi/resolution.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/pixi/resolution.html b/lib/pixi/resolution.html index 78e1085..1d9e055 100644 --- a/lib/pixi/resolution.html +++ b/lib/pixi/resolution.html @@ -35,7 +35,7 @@ const textProps = {fontSize: 72, fill: 0xffffff} - Mousetrap.bind(['1', '2', '3', '4'], (event, key) => { + Mousetrap.bind(['1', '2', '3', '4', '5'], (event, key) => { app.stage.removeChildren() @@ -69,9 +69,13 @@ // texts //-------------------- + const shortcuts = new PIXI.Text(`Press 1 - 5 to change Sprites`, textProps) + shortcuts.x = 100 + shortcuts.y = 100 + const width = new PIXI.Text(`Width: ${app.renderer.width}`, textProps) width.x = 100 - width.y = 100 + width.y = shortcuts.y + shortcuts.height * 2 const height = new PIXI.Text(`Height: ${app.renderer.height}`, textProps) height.x = 100 @@ -89,7 +93,7 @@ text.x = 100 text.y = devicePixelRatio.y + devicePixelRatio.height * 2 - app.stage.addChild(width, height, resolution, devicePixelRatio, text) + app.stage.addChild(shortcuts, width, height, resolution, devicePixelRatio, text) }) Mousetrap.trigger('1')