Jump to content

Stoppted for short time with heavy sprite


GBear
 Share

Recommended Posts

hi..

 

 

when i use spine, first time stopped for short time about 500ms..

 

it seems becuase of   'WebGLRenderer.prototype.updateTexture = function (texture)'

 

my spine data' texture is big,   it's 10 sheet textures with 2048*2048 

 

so when i play first time.. always stopped ..

 

how can i resolve this situation?

 

thx 

 

 

Link to comment
Share on other sites

Try enable mipmap for these textures

loader.add('testspine', 'test/myspine.json');loader.load(function(loader, resources) {    var res = resources['testspine'];    var spineData = res.spineData;    var spineAtlas = res.spineAtlas;    for (var i=0;i<spineAtlas.pages.length;i++) {       spineAtlas.pages[i].rendererObject.mipmap = true;    }    var spine = new PIXI.spine.Spine(spineData);    //...});
Link to comment
Share on other sites

hi.. ivan..

i don't use default loader with spine in this case..

because i wanna reduce capacity and loading time  so  all of spine is packed 

 

Textures loaded from atlas in loading time..

 

 

when i set mipmap i can see same situation..

 

 

it looke because of sprite..

when PIXi.spine.Spine created,  sprite created 

and then call updateTexture maybe..
 

..hmm 

 

can i control this?

Link to comment
Share on other sites

hi ivan.. 
 

It's means not about spine...    it will be spine with big atlas..

 

i'm using many spine data..

 

for example

fire01
fire02

lightning01

lightning02

 

and they use one atlas data like this

effect.atlaseffect1.pngeffect2.pngeffect3.pngeffect4.pngeffect5.pngeffect6.pngeffect7.pngeffect8.pngeffect9.pngeffect10.pngeffect11.pngeffect12.png

when i use effect at first  screen looks stopped for 500ms or a little bit more..

only first time..

 

first time stopped in 

WebGLRenderer.prototype.updateTexture = function (texture)'

there stopped maybe..

so i want to resolve this..

 

 

if don't understand. please tell me again.. 

i'll try to tell you with more information 

 

thx a lot . always..

 

Link to comment
Share on other sites

updateTexture uploads texture to videomemory. If you have 12 texture of 2048x2048 size, its 16MB per texture in videomemory, totally 196MB need to be uploaded. And all that 196MB exist in JS heap too, may be its GC issue. I dont think we can fix it now, but we're going to implement texture compression soon https://github.com/pixijs/pixi.js/issues/2200 , and I believe that it will solve the issue.

Link to comment
Share on other sites

Please consider using this thing for your project: https://github.com/pixijs/pixi-compressed-textures

 

You have to put DDS-es near your png files, and use this version of pixi: https://github.com/ivanpopelyshev/examples/blob/master/_site/js/pixi.js

 

I included rorated textures there too, but i didnt add Rope fix yet

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...