Class: Property

graphics.tmx. Property


new Property( [init])

A custom property definition.

A custom property definition.

Parameters:
Name Type Argument Description
init Object <optional>

A generic object containing properties with which to populate the newly instance. If this argument is null, it is ignored.

Extends

Members


name :string

The name of the property.

Type:
  • string

type :string

The type of the property. Can be string (default), int, float, bool, color or file (since 0.16, with color and file added in 0.17).

Boolean properties have a value of either true or false.

Color properties are stored in the format #AARRGGBB.

File properties are stored as paths relative from the location of the map file.

Type:
  • string

value

The value of the property.

Methods


clone()

Returns a shallow copy of the object.

Inherited From:
Returns:

a shallow copy of the object.


setTo(init)

Sets the members of the object to the specified values.

Parameters:
Name Type Description
init Object

The generic object to initialize the object.

Inherited From:
Returns:

The current object reference.


toObject()

Returns the Object representation of this object.

Overrides:
Returns:

the Object representation of this object.


toString()

Returns the string representation of this object.

Inherited From:
Returns:

the string representation of this object.