UNPKG

prendy

Version:

Make games with prerendered backdrops using babylonjs and repond

42 lines (41 loc) 1.6 kB
import { AbstractMesh, CubeTexture, TargetCamera, Texture } from "@babylonjs/core"; import { MyTypes } from "../declarations"; import { PlaceName, CameraNameByPlace, SpotPositions, SpotRotations, SoundspotSounds, TriggerMeshes, WallMeshes } from "../types"; declare const defaultCamRefs: () => { camera: TargetCamera | null; camCubeMeshes: AbstractMesh[]; probeTexture: CubeTexture | null; backdropTexturesBySegment: Record<string, { color: Texture; depth: Texture; }[]>; isTriggerable: boolean; focusPointOnSlate: { x: number | null; y: number | null; }; }; export type DefaultCameraRefs = ReturnType<typeof defaultCamRefs>; export type CameraRefs<T_PlaceName extends PlaceName> = { [P_CameraName in CameraNameByPlace[T_PlaceName]]: ReturnType<typeof defaultCamRefs>; }; export default function places<T_MyTypes extends MyTypes = MyTypes>(prendyAssets: T_MyTypes["Assets"]): { startStates: { [x: string]: { toggledWalls: Record<string, boolean>; }; }; getDefaultState: <K_PlaceName extends string>(itemId: K_PlaceName | string) => { toggledWalls: Record<string, boolean>; }; getDefaultRefs: <K_PlaceName_1 extends string>(itemId: K_PlaceName_1) => { rootMesh: null | AbstractMesh; spotPositions: SpotPositions<string>; spotRotations: SpotRotations<string>; soundspotSounds: SoundspotSounds<string>; triggerMeshes: TriggerMeshes<string>; wallMeshes: WallMeshes<string>; camsRefs: CameraRefs<string>; }; }; export {};