workadventure/front/src/Api/Events/ColorEvent.ts
David Négrier 90f7287860 Adding the ability to set the player's color outline via the scripting API
(currently not shared with the other players yet)
2021-12-21 17:02:53 +01:00

14 lines
376 B
TypeScript

import * as tg from "generic-type-guard";
export const isColorEvent = new tg.IsInterface()
.withProperties({
red: tg.isNumber,
green: tg.isNumber,
blue: tg.isNumber,
})
.get();
/**
* A message sent from the iFrame to the game to dynamically set the outline of the player.
*/
export type ColorEvent = tg.GuardedType<typeof isColorEvent>;