prendy
Version:
Make games with prerendered backdrops using babylonjs and repond
53 lines (52 loc) • 1.87 kB
TypeScript
import { AnimationNameFromCharacter, CharacterName, PlaceName, SpotNameByPlace } from "../types";
import { Vector3 } from "@babylonjs/core";
export declare const characterEvents: {
setAnimation: import("repond-events").EventTypeDefinition<{
who: string;
to: string;
}>;
setPosition: import("repond-events").EventTypeDefinition<{
who: string;
to: Vector3;
}>;
setRotationY: import("repond-events").EventTypeDefinition<{
who: string;
to: number;
}>;
springRotation: import("repond-events").EventTypeDefinition<{
who: string;
to: number;
}>;
springAddToRotationY: import("repond-events").EventTypeDefinition<{
who: string;
addedRotation: number;
}>;
lookAtOther: import("repond-events").EventTypeDefinition<{
whoA: string;
whoB: string;
}>;
lookAtEachother: import("repond-events").EventTypeDefinition<{
whoA: string;
whoB: string;
}>;
lookAtSpot: import("repond-events").EventTypeDefinition<{
place: string;
spot: string;
who: string | undefined;
}>;
moveAt2DAngle: import("repond-events").EventTypeDefinition<{
who: string;
angle: number;
}>;
};
type CharacterSetAnimationParams<T_Character extends CharacterName> = {
who: T_Character;
to: AnimationNameFromCharacter<CharacterName>;
};
type CharacterLookAtSpotParams<T_Place extends PlaceName> = {
who: CharacterName;
place: T_Place;
to: SpotNameByPlace[T_Place];
};
export type CharacterEventParameters<T_Group, T_Event, T_GenericParamA> = T_Group extends "character" ? T_Event extends "setAnimation" ? CharacterSetAnimationParams<T_GenericParamA & CharacterName> : T_Event extends "lookAtSpot" ? CharacterLookAtSpotParams<T_GenericParamA & PlaceName> : never : never;
export {};