(map, settings, z)
| 41 | */ |
| 42 | export default class TMXObject { |
| 43 | constructor(map, settings, z) { |
| 44 | /** |
| 45 | * point list in JSON format |
| 46 | * @type {object[]} |
| 47 | */ |
| 48 | this.points = undefined; |
| 49 | |
| 50 | /** |
| 51 | * object name |
| 52 | * @type {string} |
| 53 | */ |
| 54 | this.name = settings.name; |
| 55 | |
| 56 | /** |
| 57 | * object x position |
| 58 | * @type {number} |
| 59 | */ |
| 60 | this.x = +settings.x; |
| 61 | |
| 62 | /** |
| 63 | * object y position |
| 64 | * @type {number} |
| 65 | */ |
| 66 | this.y = +settings.y; |
| 67 | |
| 68 | /** |
| 69 | * object z order |
| 70 | * @type {number} |
| 71 | */ |
| 72 | this.z = +z; |
| 73 | |
| 74 | /** |
| 75 | * object width |
| 76 | * @type {number} |
| 77 | */ |
| 78 | this.width = +settings.width || 0; |
| 79 | |
| 80 | /** |
| 81 | * object height |
| 82 | * @type {number} |
| 83 | */ |
| 84 | this.height = +settings.height || 0; |
| 85 | |
| 86 | /** |
| 87 | * object gid value |
| 88 | * when defined the object is a tiled object |
| 89 | * @type {number} |
| 90 | */ |
| 91 | this.gid = +settings.gid || null; |
| 92 | |
| 93 | /** |
| 94 | * tint color |
| 95 | * @type {string} |
| 96 | */ |
| 97 | this.tintcolor = settings.tintcolor; |
| 98 | |
| 99 | /** |
| 100 | * object type |
nothing calls this directly
no test coverage detected