Update camera.mdx

pull/3282/head
Steve Ruiz 2024-04-18 17:53:36 +01:00
rodzic e929bdd133
commit afeaae83d5
1 zmienionych plików z 21 dodań i 1 usunięć

Wyświetl plik

@ -9,7 +9,7 @@ This article covers the space and coordinate systems used in the tldraw editor.
# Viewport
The viewport is the rectangular area of the editor.
The viewport is the rectangular area contained by the editor.
The camera determines which part of the current page is displayed inside of the viewport.
@ -29,6 +29,26 @@ When the camera is at `{x: 0, y: 0, z: 0}`, the screen point and page point will
You can convert between coordinate spaces using [Editor#screenToPage](?) and [Editor#pageToScreen](?).
You can get the user's pointer position in both screen and page space.
```ts
const {
// The current page / screen points
currentPagePoint,
currentScreenPoint,
// The previously reported page / screen points
previousPagePoint,
previousScreenPoint,
// The last place where a pointer down occurred
originPagePoint,
originScreenPoint,
} = editor.inputs
```
## Camera options
You can use the editor's camera options to configure the behavior of the editor's camera.
```ts
```