Reverts adding scale to the camera updated event and uses it directly from the website manager

This commit is contained in:
Benedicte Quimbert 2021-11-26 14:46:02 +01:00
parent 1e073d8a0e
commit 2a7c8f3786
2 changed files with 35 additions and 37 deletions

View file

@ -787,13 +787,13 @@ export class GameScene extends DirtyScene {
//listen event to share the actual worldView when the camera is updated
this.cameras.main.on("followupdate", (camera: Camera) => {
const worldView: WasCameraUpdatedEvent = {
const cameraEvent: WasCameraUpdatedEvent = {
x: camera.worldView.x,
y: camera.worldView.y,
width: camera.worldView.width,
height: camera.worldView.height,
};
iframeListener.sendCameraUpdated(worldView);
iframeListener.sendCameraUpdated(cameraEvent);
});
// Set up variables manager