Exporter
Extends: Object
Description
The class instance that exports maps to images and other formats.
Accessed by Global.Exporter
.
Properties
Viewport | Viewport |
ViewportContainer | ViewportContainer |
Camera | Camera |
int | Quality |
bool | UseCustomChunkSize |
Vector2 | exportOrigin |
Vector2 | exportSize |
Methods
void | Start ( int mode, int ppi, String path ) |
void | WriteForVTT ( int ppi, String path ) |
void | WriteJSON ( Dictionary data, String path ) |
void | WriteForMod ( int ppi, String path ) |
Dictionary | ExportForVTT ( int ppi, File image = null ) |
Dictionary | ExportResolution ( int ppi ) |
Array[] | ExportLOS ( ) |
Array[] | ExportObjectsLOS ( ) |
String | ExportImageBase64 ( File image ) |
Dictionary[] | ExportPortals ( ) |
Dictionary[] | ExportLights ( ) |
Vector2 | GetCustomChunkSize ( ) |
void | SetCustomChunkSize ( Vector2 size ) |
Property Descriptions
- Viewport Viewport:
Gets the main viewport that display
- ViewportContainer ViewportContainer:
Gets the container that holds the viewport of the map.
- Camera Camera:
Gets the map camera.
- int Quality:
Get or set the quality of the export from 1 to 100 if using an applicable format.
- bool UseCustomChunkSize:
Toggle is the exporter will export in chunks of a custom size.
- Vector2 exportOrigin:
Gets the export start position in world space. Read only.
- Vector2 exportSize:
Gets the export size in world space. Read only.
Method Descriptions
- void Start ( int mode, int ppi, String path ):
Starts the export process. Runs on separate thread. The parameter mode sets which format to export to. Valid options are: 0 = PNG, 1 = JPEG, 2 = WEBP, 3 = UniversalVTT, 4 = Mod.
- void WriteForVTT ( int ppi, String path ):
Called by the Exporter whenever VTT info baking is required.
- void WriteJSON ( Dictionary data, String path ):
Called by the Exporter to convert a Dictionary to a JSON file.
- void WriteForMod ( int ppi, String path ):
Called by the Exporter to process any mod processes.
- Dictionary ExportForVTT ( int ppi, File image = null ):
Called by the Exporter to pull any map data into a Dictionary before saving as JSON.
- Dictionary ExportResolution ( int ppi ):
Called by ExportForVTT() to parse map resolution data into a Dictionary.
- Array[] ExportLOS ( ):
Called by ExportForVTT() to parse LOS data into an Array of Array of Vector2 points.
- Array[] ExportObjectsLOS ( ):
Called by ExportForVTT() to parse object LOS data into an Array of Array of Vector2 points.
- String ExportImageBase64 ( File image ):
Convert an image into a base64 string.
- Dictionary[] ExportPortals ( ):
Called by ExportForVTT() to parse portals meta data into an Array of portal data.
- Dictionary[] ExportLights ( ):
Called by ExportForVTT() to parse lights meta data into an Array of light data.
- Vector2 GetCustomChunkSize ( ):
Gets the custom camera chunk size if enabled.
- void SetCustomChunkSize ( Vector2 size ):
Sets the custom camera chunk size if enabled.