Completes documentation
This commit is contained in:
parent
85d45071fa
commit
8157ee4603
@ -4,7 +4,7 @@
|
|||||||
### Listen to camera updates
|
### 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.
|
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 :
|
Example :
|
||||||
```javascript
|
```javascript
|
||||||
WA.camera.onCameraUpdate((worldView) => console.log(worldView));
|
WA.camera.onCameraUpdate.subscribe((worldView) => console.log(worldView));
|
||||||
|
//later...
|
||||||
|
WA.camera.onCameraUpdate().unsubscribe();
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user