ViewFile beta
Interface of @v12-engine/client
export interface ViewFile<T>A file of the game's laid over fields of its view (GameView): what it is called, how it is read (checked, throwing on what is wrong, with where) and written, which fields it is laid over and how, and how a world drawing it and a game playing it take it as it changes
Members
fields
readonly fields: readonly (keyof GameView)[];The fields of the view the file is laid over
game
game?(client: GameClientApi, view: GameView, before: Partial<GameView> | undefined): void;What a game being played does besides its world: its HUD, its floats, its pings, its quality
lay
lay(code: Partial<GameView>, file: T): Partial<GameView>;Those fields as the code says them with the file laid over them: new values, the code's own left as they were
name
readonly name: string;The file's name in the game's folder: hud.json
read
read(data: unknown): T;The file as data, checked: throws on what is wrong, saying where
text
text(file: T): string;The file as it is written: tidy, a field a line
world
world?(world: ViewFileWorld, view: GameView, before: Partial<GameView> | undefined, environment: MapEnvironment): void;What a world drawing the view does as the file is laid again (before: the fields as they were; none when it is taken whole, as a game starts): draws the effects, the layers' looks... environment is what the map says of its looks now