workadventure/front/src/Api/Events/CameraFocusOnEvent.ts
2021-12-16 13:41:28 +01:00

16 lines
450 B
TypeScript

import * as tg from "generic-type-guard";
export const isCameraFocusOnEvent = 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 set the camera focus on certain place.
*/
export type CameraFocusOnEvent = tg.GuardedType<typeof isCameraFocusOnEvent>;