FoliagePreviewHost beta
Interface of @v12-engine/editor
ts
export interface FoliagePreviewHostWhat the previews reach of the editor: its view's world, where the camera looks, the ground under the pointer, the Patch tool's selection, its frames
Members
camera
ts
readonly camera: {
readonly focus: Vec2;
};Where the camera looks
drawing
ts
readonly drawing: {
readonly world: FoliageWorld;
};What draws the map: its world, whose layers of cells, walkers and wind the previews use
hovered
ts
readonly hovered: Vec2 | null;The ground under the pointer: none off the map
onFrame
ts
onFrame(run: (dt: number) => void): () => void;Something to do before each frame the editor draws; what stops it
redraw
ts
redraw(): void;Draws the view again, as a change does
styles
ts
readonly styles: {
readonly selection: {
readonly layer: string | undefined;
readonly size: number;
cells(): number[];
};
};The styles of grass and bushes: the Patch tool's selection