Added description to resolution.
This commit is contained in:
		
							parent
							
								
									7e9f0159e8
								
							
						
					
					
						commit
						c41209d0fc
					
				| @ -35,7 +35,7 @@ | |||||||
| 
 | 
 | ||||||
|             const textProps = {fontSize: 72, fill: 0xffffff} |             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() |                 app.stage.removeChildren() | ||||||
| 
 | 
 | ||||||
| @ -69,9 +69,13 @@ | |||||||
| 
 | 
 | ||||||
|                 // texts |                 // 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) |                 const width = new PIXI.Text(`Width: ${app.renderer.width}`, textProps) | ||||||
|                 width.x = 100 |                 width.x = 100 | ||||||
|                 width.y = 100 |                 width.y = shortcuts.y + shortcuts.height * 2 | ||||||
| 
 | 
 | ||||||
|                 const height = new PIXI.Text(`Height: ${app.renderer.height}`, textProps) |                 const height = new PIXI.Text(`Height: ${app.renderer.height}`, textProps) | ||||||
|                 height.x = 100 |                 height.x = 100 | ||||||
| @ -89,7 +93,7 @@ | |||||||
|                 text.x = 100 |                 text.x = 100 | ||||||
|                 text.y = devicePixelRatio.y + devicePixelRatio.height * 2 |                 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') |             Mousetrap.trigger('1') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user