|
9 | 9 | * A PIXI WebGL Tilemap. |
10 | 10 | * |
11 | 11 | * @class PIXI.Tilemap |
12 | | - * @extends {DisplayObjectContainer} |
| 12 | + * @extends {PIXI.DisplayObject} |
13 | 13 | * @param {PIXI.Texture} texture - The tilemap texture. |
14 | 14 | * @param {integer} displayWidth - The width of the display area. Used as the clipping limit for the shader. |
15 | 15 | * @param {integer} displayHeight - The height of the display area. Used as the clipping limit for the shader. |
|
21 | 21 | */ |
22 | 22 | PIXI.Tilemap = function (texture, displayWidth, displayHeight, mapWidth, mapHeight, tileWidth, tileHeight, layer) { |
23 | 23 |
|
24 | | - PIXI.DisplayObjectContainer.call(this); |
| 24 | + PIXI.DisplayObject.call(this); |
25 | 25 |
|
26 | 26 | /** |
27 | 27 | * The texture of the Tilemap |
@@ -160,12 +160,21 @@ PIXI.Tilemap = function (texture, displayWidth, displayHeight, mapWidth, mapHeig |
160 | 160 | */ |
161 | 161 | this.buffer = new PIXI.Float32Array(mapWidth * mapHeight * this.batchDataElement); |
162 | 162 |
|
| 163 | + /** |
| 164 | + * A required but un-used array. |
| 165 | + * Do not add objects to this array, Tilemaps cannot have children. |
| 166 | + * |
| 167 | + * @property children |
| 168 | + * @type Array |
| 169 | + * @private |
| 170 | + */ |
| 171 | + this.children = []; |
| 172 | + |
163 | 173 | }; |
164 | 174 |
|
165 | | -PIXI.Tilemap.prototype = Object.create(PIXI.DisplayObjectContainer.prototype); |
| 175 | +PIXI.Tilemap.prototype = Object.create(PIXI.DisplayObject.prototype); |
166 | 176 | PIXI.Tilemap.prototype.constructor = PIXI.Tilemap; |
167 | 177 |
|
168 | | -// unused methods overridden to prevent default behavior |
169 | 178 | PIXI.Tilemap.prototype.update = function () {}; |
170 | 179 | PIXI.Tilemap.prototype.postUpdate = function () {}; |
171 | 180 |
|
@@ -395,9 +404,10 @@ PIXI.Tilemap.prototype._renderWholeTilemap = function (renderSession) { |
395 | 404 | * @method onTextureUpdate |
396 | 405 | * @param event |
397 | 406 | * @private |
398 | | - */ |
399 | 407 | PIXI.Tilemap.prototype.onTextureUpdate = function () { |
400 | 408 |
|
401 | 409 | this.updateFrame = true; |
402 | 410 |
|
403 | 411 | }; |
| 412 | + */ |
| 413 | + |
0 commit comments