File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,11 @@ export class Game {
5656 private dpr : number ;
5757
5858 private getWorldX ( clientX : number ) : number {
59- const dpr = this . dpr || 1 ;
60- const zoom = this . currentScene . getCamera ( ) == undefined ? 1 : this . currentScene . getCamera ( ) . getZoomAmount ( ) ;
61- const cameraX = this . currentScene . getCamera ( ) == undefined ? 0 : this . currentScene . getCamera ( ) . getX ( ) ;
62- return ( clientX * dpr )
59+ return clientX * this . dpr ;
6360 }
6461
6562 private getWorldY ( clientY : number ) : number {
66- const dpr = this . dpr || 1 ;
67- const zoom = this . currentScene . getCamera ( ) == undefined ? 1 : this . currentScene . getCamera ( ) . getZoomAmount ( ) ;
68- const cameraY = this . currentScene . getCamera ( ) == undefined ? 0 : this . currentScene . getCamera ( ) . getY ( ) ;
69- return ( clientY * dpr )
63+ return clientY * this . dpr ;
7064 }
7165
7266
You can’t perform that action at this time.
0 commit comments