Completes documentation

This commit is contained in:
Benedicte Quimbert 2022-01-03 10:36:23 +01:00
parent 85d45071fa
commit 8157ee4603

View file

@ -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();
``` ```