2021-12-16 13:41:28 +01:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
|
2022-01-14 11:41:37 +01:00
|
|
|
export const isCameraSetEvent = new tg.IsInterface()
|
2021-12-16 13:41:28 +01:00
|
|
|
.withProperties({
|
|
|
|
x: tg.isNumber,
|
|
|
|
y: tg.isNumber,
|
2022-01-13 16:43:58 +01:00
|
|
|
width: tg.isOptional(tg.isNumber),
|
|
|
|
height: tg.isOptional(tg.isNumber),
|
2022-01-13 16:08:16 +01:00
|
|
|
lock: tg.isBoolean,
|
2021-12-16 13:41:28 +01:00
|
|
|
smooth: tg.isBoolean,
|
|
|
|
})
|
|
|
|
.get();
|
|
|
|
/**
|
|
|
|
* A message sent from the iFrame to the game to change the camera position.
|
|
|
|
*/
|
2022-01-14 11:41:37 +01:00
|
|
|
export type CameraSetEvent = tg.GuardedType<typeof isCameraSetEvent>;
|