Slaus

Members
  • Content Count

    10
  • Joined

  • Last visited

  1. Done! Memory usage is very stationary at ~200Mb. Thank you very much! But I don't understand your pessimism about "just moving problem to another domain". Is there something else I need to worry about? Relying on GC in untyped imperative language is the only way to go, I think ^^
  2. Thank you for your answer. So I guess it's some trouble with releasing canvas objects which spawn on Graphics.generateCanvasTexture´╗┐() calls? Maybe there is a way to release all the previously created canvas objects? I was looking to https://github.com/photonstorm/phaser/blob/v2.4.3/src/pixi/utils/CanvasPool.js photonstorm was suggesting in that thread, but there is no connection with PIXI, so I guess I'll have to patch Graphics.js somehow?
  3. Hello. I'm drawing charts with Graphics.generateCanvasTexture() every frame. I need exactly canvas renderer due to antialiasing. The problem is browser's memory usage going from 200Mb to 1.2Gb in mere seconds. Invoking texture.destroy() doesn't help. There was a talk about canvas creation memory leak and folks seemed to handle it somehow, but I can't figure out how they did Is there any way to destroy such previously created textures or reuse them to create successive ones? Thanks in advance
  4. Found the reason: I had a custom shader for which I was getting dummy (to make shader working) texture this way: let whatever for ( let i in PIXI.utils.TextureCache ) { if ( i.indexOf( '.json' ) >= 0 ) continue whatever = i break } sometimes it happen so that loadbar/loadscreen.png was obtained this way and after a while loading scene was destroyed: load_scene.destroy( true ) which cause loadbar/loadscreen.png textures to also remove which lead to shader stop working and PIXI to shutdown. Thanks for help! Glad everything's working again! Cheers!
  5. Hello everyone. In my 100k+ lines_of_code project in late weeks was introduced a bug which sometimes causes all the graphics to disappear at the end of loading process. Could you please help me to hunt it down? First, game loads background and loading bar with PIXI.loader and displays it with PIXI. Then loads all the other resources the same way. When other resources finish loading there is a chance (50% for some machines and <1% for others) that none will be displayed and both background and loading bar also disappear. When it happens, line: PIXI.renderer.render( stage ) throws these errors (currently using PIXI 4.5.3): where Sprite.js:208 of my version is and WebGLRenderer.js:408 is I was trying to examine and reverse every change made to the project for last weeks, but they are pretty innocent and it didn't help What I figured out so far is that sprite.baseTexture.orig of every existing image somehow becomes null at some point and every width() getter stops working which throws such exceptions, but weird part is that these errors are only thrown once - not every requestAnimationFrame() call, hmm. And I couldn't find any line in PIXI and PIXI.loader where there would be something like sprite.baseTexture.orig = null or BaseTexture: this.orig = null ... Do you guys have any ideas what could cause such behavior and any possible steps to fix it? Thanks in advance!
  6. Sample at http://pixijs.github.io/examples/?v=v4.5.3#/filters/filter-mouse.js fails for me with error Cannot ready property 'location' of undefined at VertexArrayObject.js:171 and 'location' is shader.attributes.aTextureCoord passed from Quad.js:98. But sample http://pixijs.io/examples/?v=v4.5.2#/basics/custom-filter.js works somehow. When I change any line at filter-mouse.js sample with vTextureCoord to anything else it also stops working. WebGL Inspector shows that that custom filter (when it's not working) is the only having no aTextureCoord attribute, so shader.attributes.aTextureCoord is undefined. Shader builder program optimizes it somehow so that it doesn't have such attribute anymore maybe? Edit: oh, I guess it's the same issue as described in https://github.com/pixijs/pixi.js/issues/4476 Ivan was mentioning about it occurring because some sampler optimizes out aTextureCoord attribute. Is there a way trick the optimizer so that it won't remove it? Thanks in advance ^^ (eagerly waiting for pixi v5 in the meantime)
  7. Resources to load are specified with a list of .json files generated by TexturePacker. I need to cancel caching so intend to append "file.png?123456" unique numbers to every file specified within .json files. I specified middleware to do that but somehow middleware is actually called for file.png even before it is called for file.json Is it possible to modify contents of loading .json files on the fly? Or just solve such problem in any other way?