Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties id
, name
, type
, rotation
, properties
, visible
, x
, y
, width
and height
. Other properties will be added according to the object type (such as text, polyline, gid etc.)
name | type | arguments | description |
---|---|---|---|
tiledObject | object |
Tiled object to convert to an internal parsed object normalising and copying properties over. |
|
offsetX | number | <optional> |
Optional additional offset to apply to the object's x property. Defaults to 0. |
offsetY | number | <optional> |
Optional additional offset to apply to the object's y property. Defaults to 0. |
The parsed object containing properties read from the Tiled object according to it's type with x and y values updated according to the given offsets.