Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Functions

addFOW

  • Draw fog of war

    Parameters

    Returns Action

addLayer

  • addLayer(index: number): Action
  • Add a new layer at the index.

    Parameters

    • index: number

    Returns Action

addTileset

  • Add a new tileset. Tile

    Parameters

    Returns Action

addTilesetUriSelection

  • addTilesetUriSelection(selection: any): Action
  • Add a tileset URI to the paint tool to randomly draw from.

    Parameters

    • selection: any

    Returns Action

askSave

  • askSave(ask: boolean): Action
  • Prepare to ask to save on exit.

    Parameters

    • ask: boolean

    Returns Action

clearOverlay

  • clearOverlay(): object
  • Remove the overlay image.

    Returns object

    • type: string

clearSelection

  • Remove the current tileset and toolbox URI selection.

    Returns Action

coordinatesColor

  • coordinatesColor(color: number): Action
  • Set the coordinate font color.

    Parameters

    • color: number

    Returns Action

coordinatesPosition

  • coordinatesPosition(position: number): Action
  • Alignment for coordinate text on each tile.

    Parameters

    • position: number

    Returns Action

coordinatesSize

  • coordinatesSize(size: number): Action
  • Set the coordinate font size.

    Parameters

    • size: number

    Returns Action

counterRotateTile

  • Rotate the tile -60 degrees.

    Parameters

    Returns Action

editLayerName

  • Change the current layer name.

    Parameters

    Returns Action

editTileInfo

  • Set the tile information.

    Parameters

    Returns Action

flipTile

  • Flip the tile across the Y axis.

    Parameters

    Returns Action

layerDown

  • layerDown(value: number): Action
  • Move the layer down at the specific index.

    Parameters

    • value: number

    Returns Action

layerUp

  • layerUp(value: number): Action
  • Move the layer up at the specific index.

    Parameters

    • value: number

    Returns Action

listenMouse

  • listenMouse(listener: function): Function
  • Listen for mouse events for custom tools.

    Parameters

    • listener: function
        • (event: any, args: object): void
        • Parameters

          • event: any
          • args: object
            • button: string
            • coordinates: object[]

          Returns void

    Returns Function

newMap

  • Start a new map.

    Parameters

    Returns object

paintTiles

  • Paint tiles to the map.

    Parameters

    Returns Action

pickMapTile

  • Get the tileset URI for a tile at a specific location.

    Parameters

    Returns Action

random

  • random(): number
  • Returns number

redo

  • Redo the latest map paint.

    Returns Action

removeFOW

  • Remove fog of war

    Parameters

    Returns Action

removeLayer

  • removeLayer(layer: number): Action
  • Remove the layer at the index.

    Parameters

    • layer: number

    Returns Action

removeTiles

  • removeTiles(coordinates: TileCoord[], force?: boolean, clear?: boolean): Action
  • Remove tiles from the map.

    Parameters

    • coordinates: TileCoord[]
    • Optional force: boolean

      Force to remove a tile from the bottom layer. Typically a empty outline is painted.

    • Optional clear: boolean

      Clear the coordinate of all tiles from the current layer down

    Returns Action

removeTileset

  • removeTileset(name: string): Action
  • Parameters

    • name: string

      Remove tileset

    Returns Action

rotateTile

  • Rotate the tile 60 degrees.

    Parameters

    Returns Action

selectTile

  • Get the tileset URI for a tile at a specific location.

    Parameters

    Returns Action

setCanvasScale

  • setCanvasScale(scale: number): Action
  • Set the map scale for painting.

    Parameters

    • scale: number

    Returns Action

setDisplayScale

  • setDisplayScale(scale: number): Action
  • Set the map scale for display mode.

    Parameters

    • scale: number

    Returns Action

setFont

  • setFont(font: string): Action
  • Set the font for text on the map.

    Parameters

    • font: string

    Returns Action

setLayer

  • setLayer(layer: number): Action
  • Set the current layer to paint on.

    Parameters

    • layer: number

    Returns Action

setMap

  • Set the details of the entire map. Fast for large batch operations.

    Parameters

    Returns Action

setMode

  • Switch between editing in Paint or Display mode.

    Parameters

    Returns Action

setOverlay

  • setOverlay(overlay: string): Action
  • Set the overlay image file path.

    Parameters

    • overlay: string

    Returns Action

setOverlayOpacity

  • setOverlayOpacity(opacity: any): Action
  • Set the overlay image transparency.

    Parameters

    • opacity: any

      Bewteen 0 and 1

    Returns Action

setSavePath

  • setSavePath(value: string): Action
  • Set the suggested path for saving.

    Parameters

    • value: string

    Returns Action

setSelector

  • setSelector(value: number): Action
  • Set the current selected layer.

    Parameters

    • value: number

    Returns Action

setTilesetAndToolboxUri

  • setTilesetAndToolboxUri(uri: string): Action
  • Set the current tileset URI for the paint tool and toolbox.

    Parameters

    • uri: string

    Returns Action

setTilesetSettings

  • setTilesetSettings(settings: object): Action
  • Edit tileset settings

    Parameters

    Returns Action

setTilesetUri

  • setTilesetUri(uri: string): Action
  • Set the current tileset URI for the paint tool.

    Parameters

    • uri: string

    Returns Action

setTilesetUriRange

  • setTilesetUriRange(uri: string | string[]): Action
  • Set the paint tool to randomly draw from multiple tilesets.

    Parameters

    • uri: string | string[]

    Returns Action

setTool

  • setTool(tool: Tools | string, customCursor?: string): Action
  • Set the current tool. Custom tool names can be used to create new tools.

    Parameters

    • tool: Tools | string

      Tool name

    • Optional customCursor: string

      Path of the custom cursor image

    Returns Action

setToolboxUri

  • setToolboxUri(uri: string): Action
  • Set the currently displayed tileset in the toolbox.

    Parameters

    • uri: string

    Returns Action

showCoordinates

  • showCoordinates(show: boolean): Action
  • Show coordinates on the map.

    Parameters

    • show: boolean

    Returns Action

showTileInfo

  • showTileInfo(show: boolean): Action
  • Show tile info on hover.

    Parameters

    • show: boolean

    Returns Action

toggleAllLabels

  • toggleAllLabels(value: boolean): Action
  • Toggle all the labels on/off.

    Parameters

    • value: boolean

    Returns Action

toggleLayer

  • toggleLayer(layer: number): Action
  • Show/hide the layer.

    Parameters

    • layer: number

    Returns Action

undo

  • Undo the latest map paint.

    Returns Action

Object literals

Actions

Actions: object

ADD_COLUMN

ADD_COLUMN: string = "ADD_COLUMN"

ADD_FOW

ADD_FOW: string = "ADD_FOW"

ADD_LAYER

ADD_LAYER: string = "ADD_LAYER"

ADD_ROW

ADD_ROW: string = "ADD_ROW"

ADD_TILESET

ADD_TILESET: string = "ADD_TILESET"

ADD_TILESET_URI_SELECTION

ADD_TILESET_URI_SELECTION: string = "SET_TILESET_URI_SELECTION"

ASK_SAVE

ASK_SAVE: string = "ASK_SAVE"

CLEAR_OVERLAY

CLEAR_OVERLAY: string = "CLEAR_OVERLAY"

CLEAR_SELECTION

CLEAR_SELECTION: string = "CLEAR_SELECTION"

COORDINATES_COLOR

COORDINATES_COLOR: string = "COORDINATES_COLOR"

COORDINATES_POSITION

COORDINATES_POSITION: string = "COORDINATES_POSITION"

COORDINATES_SIZE

COORDINATES_SIZE: string = "COORDINATES_SIZE"

COUNTER_ROTATE

COUNTER_ROTATE: string = "COUNTER_ROTATE"

EDIT_DEFAULT_LABEL_OPTION

EDIT_DEFAULT_LABEL_OPTION: string = "EDIT_DEFAULT_LABEL_OPTION"

EDIT_LAYER_NAME

EDIT_LAYER_NAME: string = "EDIT_LAYER_NAME"

EDIT_TILE_INFO

EDIT_TILE_INFO: string = "EDIT_TILE_INFO"

FLIP_TILE

FLIP_TILE: string = "FLIP_TILE"

LAYER

LAYER: string = "LAYER"

LAYER_DOWN

LAYER_DOWN: string = "LAYER_DOWN"

LAYER_UP

LAYER_UP: string = "LAYER_UP"

NEW_MAP

NEW_MAP: string = "NEW_MAP"

OVERLAY_OPACITY

OVERLAY_OPACITY: string = "OVERLAY_OPACITY"

PAINT_TILES

PAINT_TILES: string = "PAINT_TILES"

PICK_MAP_TILE

PICK_MAP_TILE: string = "PICK_MAP_TILE"

REDO

REDO: string = "REDO"

REMOVE_COLUMN

REMOVE_COLUMN: string = "REMOVE_COLUMN"

REMOVE_FOW

REMOVE_FOW: string = "REMOVE_FOW"

REMOVE_LAYER

REMOVE_LAYER: string = "REMOVE_LAYER"

REMOVE_ROW

REMOVE_ROW: string = "REMOVE_ROW"

REMOVE_TILES

REMOVE_TILES: string = "REMOVE_TILES"

REMOVE_TILESET

REMOVE_TILESET: string = "REMOVE_TILESET"

ROTATE

ROTATE: string = "ROTATE"

SELECT_TILE

SELECT_TILE: string = "SELECT_TILE"

SET_CANVAS_SCALE

SET_CANVAS_SCALE: string = "SET_CANVAS_SCALE"

SET_DISPLAY_SCALE

SET_DISPLAY_SCALE: string = "SET_DISPLAY_SCALE"

SET_FONT

SET_FONT: string = "SET_FONT"

SET_MAP

SET_MAP: string = "SET_MAP"

SET_MODE

SET_MODE: string = "SET_MODE"

SET_OVERLAY

SET_OVERLAY: string = "SET_OVERLAY"

SET_SAVE_PATH

SET_SAVE_PATH: string = "SET_SAVE_PATH"

SET_SELECTOR

SET_SELECTOR: string = "SET_SELECTOR"

SET_TILESET_AND_TOOLBOX_URI

SET_TILESET_AND_TOOLBOX_URI: string = "SET_TILESET_AND_TOOLBOX_URI"

SET_TILESET_SETTINGS

SET_TILESET_SETTINGS: string = "SET_TILESET_SETTINGS"

SET_TILESET_URI

SET_TILESET_URI: string = "SET_TILESET_URI"

SET_TILESET_URI_RANGE

SET_TILESET_URI_RANGE: string = "SET_TILESET_URI_RANGE"

SET_TOOLBOX_URI

SET_TOOLBOX_URI: string = "SET_TOOLBOX_URI"

SHOW_COORDINATES

SHOW_COORDINATES: string = "SHOW_COORDINATES"

SHOW_TILE_INFO

SHOW_TILE_INFO: string = "SHOW_TILE_INFO"

TOGGLE_ALL_LABELS

TOGGLE_ALL_LABELS: string = "TOGGLE_ALL_LABELS"

TOGGLE_LAYER

TOGGLE_LAYER: string = "TOGGLE_LAYER"

TOOL

TOOL: string = "TOOL"

UNDO

UNDO: string = "UNDO"

Generated using TypeDoc