exports

exports

new exports(name, version)

Constructor for the Overlay class.

Since:
  • 0.0.2
Source:
See:
Parameters:
Name Type Description
name string

The name of the userscript

version string

The version of the userscript

exports

new exports(templateManager)

Constructor for ApiManager class

Since:
  • 0.11.34
Source:
Parameters:
Name Type Description
templateManager TemplateManager

exports

new exports()

The constructor for the observer class

Since:
  • 0.43.2
Source:

exports

exports

new exports(paramsopt)

The constructor for the Template class with enhanced pixel tracking.

Since:
  • 0.65.2
Source:
Parameters:
Name Type Attributes Default Description
params Object <optional>
{}

Object containing all optional parameters

Name Type Attributes Default Description
displayName string <optional>
'My template'

The display name of the template

sortID number <optional>
0

The sort number of the template for rendering priority

authorID string <optional>
''

The user ID of the person who exported the template (prevents sort ID collisions)

url string <optional>
''

The URL to the source image

file File <optional>
null

The template file (pre-processed File or processed bitmap)

coords Array.<number> <optional>
null

The coordinates of the top left corner as (tileX, tileY, pixelX, pixelY)

chunked Object <optional>
null

The affected chunks of the template, and their template for each chunk

tileSize number <optional>
1000

The size of a tile in pixels (assumes square tiles)

pixelCount number <optional>
0

Total number of pixels in the template (calculated automatically during processing)