Skip to content

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.





  • 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.