Completes documentation
This commit is contained in:
parent
85d45071fa
commit
8157ee4603
1 changed files with 4 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
### Listen to camera updates
|
||||
|
||||
```
|
||||
WA.camera.onCameraUpdate(callback: WasCameraUpdatedEventCallback): void
|
||||
WA.camera.onCameraUpdate: Subscription
|
||||
```
|
||||
|
||||
Listens to updates of the camera viewport. It will trigger for every update of the camera's properties (position or scale for instance). An event will be sent.
|
||||
|
@ -19,5 +19,7 @@ The event has the following attributes :
|
|||
|
||||
Example :
|
||||
```javascript
|
||||
WA.camera.onCameraUpdate((worldView) => console.log(worldView));
|
||||
WA.camera.onCameraUpdate.subscribe((worldView) => console.log(worldView));
|
||||
//later...
|
||||
WA.camera.onCameraUpdate().unsubscribe();
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue