From 5deaa35cf5a3ef520831833e3b5188dfe05f3b1f Mon Sep 17 00:00:00 2001 From: Ivan Popelyshev Date: Wed, 22 Apr 2020 18:07:14 +0300 Subject: [PATCH] fix empty texture --- demo/basic.js | 2 +- src/CompositeRectTileLayer.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/demo/basic.js b/demo/basic.js index 329c1551..f544e942 100644 --- a/demo/basic.js +++ b/demo/basic.js @@ -10,7 +10,7 @@ loader.load(function (loader, resources) { //first parameter means z-layer, which is not used yet //second parameter is list of textures for layers stage = new PIXI.Container(); - tilemap = new PIXI.tilemap.CompositeRectTileLayer(0, [resources['atlas_image'].texture]); + tilemap = new PIXI.tilemap.CompositeRectTileLayer(); stage.addChild(tilemap); animate(); diff --git a/src/CompositeRectTileLayer.ts b/src/CompositeRectTileLayer.ts index 3a241267..d0b41cf3 100644 --- a/src/CompositeRectTileLayer.ts +++ b/src/CompositeRectTileLayer.ts @@ -35,6 +35,12 @@ namespace pixi_tilemap { } setBitmaps(bitmaps: Array) { + for (let i=0;i 5.2.1, it does not exist there.`); + } + } let texPerChild = this.texPerChild; let len1 = this.children.length; let len2 = Math.ceil(bitmaps.length / texPerChild);