Skip to content

Commit

Permalink
Fix convertCanvasCoordinates signature in README (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukix authored Dec 28, 2020
1 parent cbbe694 commit 929c50b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ or just by drawing its outline (or both).

### convertCanvasCoordinates
```ts
({
(
x: number,
y: number,
canvasWidth: number,
canvasHeight: number,
camera: Camera,
}) => { x: number, y: number }
camera: Camera
) => { x: number, y: number }
```
A function that converts canvas coordinates (for example `event.offsetX` and `event.offsetY` from `onclick` event) to base coordinates that you use to render objects (taking into account any transformations caused by camera's position and zoom).

Expand Down

0 comments on commit 929c50b

Please sign in to comment.