EditorViewPicture beta
Class of @v12-engine/editor
export declare class EditorViewPicturePictures of the view (campaign plan EQ13): what the camera looks at now, at 1×, 2× or 4× its pixels, with nothing of the editor's in it (the overlays, the selection's rings, the flags at the starts; the gizmo is never in it), saved among the map's files (images/<name>.png) for a loading screen or a page of the game, and made the map's preview (GameMap.preview: what lists of maps and a campaign's loading screen show). What View › A picture of the view does, in code
A part of the editor, as it gives it (editor.viewPicture)
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the EditorViewPicture class.
Members
save
save(name: string, options?: ViewCaptureOptions): Promise<ViewPicture>;A picture of the view taken and kept among the map's files as images/<name>.png (.jpg for a JPEG): a change of the map until it is saved (Ctrl+S), as its other files. Gives back the picture, with its path
sizeAt
sizeAt(scale?: number): {
width: number;
height: number;
};How big a picture at a scale is: the view's own pixels times it, no wider or taller than the GPU draws into
take
take(options?: ViewCaptureOptions): Promise<ViewPicture>;A picture of the view as it is now, at a scale, with nothing of the editor's in it: not saved
usePreview
usePreview(picture: Pick<ViewPicture, 'data'>): Promise<string>;Makes a picture the map's preview (GameMap.preview), a JPEG 384 pixels wide: what lists of maps and a campaign's loading screen show. One step of the history