• Public
  • Public/Protected
  • All

Tiled Scripting API

Tiled can be extended with the use of JavaScript.

Scripts can be used to implement custom map formats, custom actions and new tools. Scripts can also automate actions based on signals.

See the Tiled Manual for more information on writing or installing extensions.

Type Definitions

TypeScript type definitions for this API are available by installing the @mapeditor/tiled-api package, which allows you to write scripts using TypeScript and can provide auto-completion in your editor (also when using plain JavaScript).


Type aliases



Polygon: point[]

A polygon is not strictly a custom type. It is an array of objects that each have an x and y property, representing the points of the polygon.

To modify the polygon of a MapObject, change or set up the polygon array and then assign it to MapObject.polygon.


TiledObjectPropertyValue: number | string | boolean | ObjectRef | FilePath | MapObject | undefined

Generated using TypeDoc