Skip to content

cinematicsFrom beta ​

Function of @v12-engine/client

ts
export declare function cinematicsFrom(files: Record<string, unknown>, options?: Omit<ReadCinematicOptions, 'id'>): Record<string, CinematicDef>;

The cinematics of a folder of files, by id: cinematicsFrom(import.meta.glob('./cinematics/*.json', { eager: true })). A file is named for its cinematic (td.intro.json is td.intro): the id it gives inside wins, and the file's name is the id of one that gives none. Each is read as readCinematic reads it