Home Forums
11 | 28 | 2020
We have 1941 guests and 1 member online
JoomlaNook Forums
Welcome, Guest
Please Login or Register.    Lost Password?
ImageLoader and PIXI.TextureCache problem
(0 viewing) 
Go to bottom
TOPIC: ImageLoader and PIXI.TextureCache problem
Posts: 105
User Offline Click here to see the profile of this user
ImageLoader and PIXI.TextureCache problem 3 Years, 2 Months ago  

I have strange problem:

I do load of big texture (1,5 MB png) with loadFramedSpriteSheet(64, 64, ...)

After i have got 'loaded' event, i do load json, after that i start creating of sprites with PIXI.TextureCache

And in this moment happens strange - texture not exist yet!

for (var i = 0; i < mapdata.length; i++){ var id = mapdata[i]; var t = PIXI.TextureCache['world-' + name + '-tile-' + id]; if (!t) { alert('map parse error: ' + 'world-' + name + '-tile-' + id); return; } var tile = new PIXI.Sprite( t ); self.maptiles[id] = tile;}

Then you load this page in first time - you see error

Then you reload page second time - you see everything ok (image cached)

But why this happens? i thought, then 'loaded' fired image is ready, but looks like not.
Please help.


I didn't find the right solution from the Internet.


Flat Intro Animation
Logged Logged
Last Edit: 2017/09/26 08:28 By carterturner.
  The administrator has disabled public write access.
Go to top