(displayPos: Vec2)
| 38 | } |
| 39 | |
| 40 | displayToWorld(displayPos: Vec2): Vec2 { |
| 41 | const displayRect = this.rects.fromDisplay(); |
| 42 | |
| 43 | return new Vec2( |
| 44 | this.camera.react.pos.x + |
| 45 | (displayPos.x - displayRect.size.x / 2) / this.camera.react.zoom, |
| 46 | this.camera.react.pos.y + |
| 47 | (displayPos.y - displayRect.size.y / 2) / this.camera.react.zoom, |
| 48 | ); |
| 49 | } |
| 50 | worldToDisplay(worldPos: Vec2): Vec2 { |
| 51 | const displayRect = this.rects.fromDisplay(); |
| 52 |
no test coverage detected