added basic WA.camera commands

This commit is contained in:
Hanusiak Piotr
2021-12-16 13:41:28 +01:00
parent 99ffb7b450
commit 5f26a39a5d
9 changed files with 112 additions and 4 deletions
@@ -0,0 +1,15 @@
import * as tg from "generic-type-guard";
export const isCameraSetPositionEvent = new tg.IsInterface()
.withProperties({
x: tg.isNumber,
y: tg.isNumber,
width: tg.isNumber,
height: tg.isNumber,
smooth: tg.isBoolean,
})
.get();
/**
* A message sent from the iFrame to the game to change the camera position.
*/
export type CameraSetPositionEvent = tg.GuardedType<typeof isCameraSetPositionEvent>;