Reverting getBounds to bound to avoid excessive loading of tiles.
This commit is contained in:
@@ -143,14 +143,14 @@ export default class Tile extends PIXI.Sprite {
|
||||
let count = this.unregister()
|
||||
|
||||
if (keepTextures > 0) {
|
||||
keptTextures.push({ url: this.url, texture: this.texture})
|
||||
keptTextures.push({ url: this.url, texture: this.texture })
|
||||
|
||||
let opts = { children: true, texture: false, baseTexture: false }
|
||||
if (debug) console.log("Tile.destroy", registeredTiles.size, opts)
|
||||
super.destroy(opts)
|
||||
|
||||
while(keptTextures.length > keepTextures) {
|
||||
let {url, texture} = keptTextures.shift()
|
||||
while (keptTextures.length > keepTextures) {
|
||||
let { url, texture } = keptTextures.shift()
|
||||
if (Tile.isObsolete(url)) {
|
||||
texture.destroy(true) // Destroy base as well
|
||||
if (debug) console.log("Destroying texture and baseTexture", url)
|
||||
|
||||
Reference in New Issue
Block a user