Merge branch 'player-local-storage' of github.com:thecodingmachine/workadventure into player-local-storage

This commit is contained in:
Benedicte Quimbert 2021-12-08 11:49:49 +01:00
commit a38fbf1cfc
2 changed files with 3 additions and 4 deletions

View file

@ -1,13 +1,13 @@
{.section-title.accent.text-primary}
# API Camera functions Reference
### Listen to the camera update
### Listen to camera updates
```
WA.camera.onCameraUpdate(callback: WasCameraUpdatedEventCallback): void
```
Listens to the updating of the camera linked to the player. It will trigger for every update of the camera's properties (position or scale for instance). An event will then 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.
The event has the following attributes :
* **x (number):** coordinate X of the camera's world view (the area looked at by the camera).

View file

@ -62,7 +62,7 @@ export type IframeEventMap = {
registerMenu: MenuRegisterEvent;
unregisterMenu: UnregisterMenuEvent;
setTiles: SetTilesEvent;
modifyEmbeddedWebsite: Partial<EmbeddedWebsite>; // Note: name should be compulsory in fact;
modifyEmbeddedWebsite: Partial<EmbeddedWebsite>; // Note: name should be compulsory in fact
};
export interface IframeEvent<T extends keyof IframeEventMap> {
type: T;
@ -197,7 +197,6 @@ export const isIframeQuery = (event: any): event is IframeQuery<keyof IframeQuer
const result = iframeQueryMapTypeGuards[type].query(event.data);
if (!result) {
console.warn('Received a query with type "' + type + '" but the payload is invalid.');
console.log(event);
}
return result;
};