Slaus

Members
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Slaus

  1. Thank for your answer, Ivan. I've got an answer from Engler about OnError being called with the error, the loader, and the resource that failed. http://englercj.github.io/resource-loader/classes/loader.html#onerrorsignal Got too used to error handlers being called with single error objects, so didn't look for docs, sorry my bad. Since I didn't know how to catch what files failed to load, so I just reset the loader and reload all the resources again relying on browser cache to handle repeats and it magically worked well. Thanks for your help.
  2. Hello. My game loads many resources (100+); on specific PC occasional weird error happens: net::ERR_CONNECTION_RESET 200 OK for several files so loading abrupts. I failed to google what that error even means and every time it happens to different files and in 1 in 20 times game loads successfully. Errors I dealt with previously was 404 (Not Found) which was caused both by absent network or absent files, so I was just reloading the whole page hoping for network connection to recover. Anyway, error is an error, so failed files need to be recovered somehow, but I don't know how to do it yet. How can I know what files failed to load? Prints: Error: Failed to load element using: IMG Is there a way to know which file failed to load? How can I add failed file back to the loading bundle continuing the ongoing loading process? If sub-resource failed to load (for example, .png file of .json spritesheet) should I re-queue that sub-resource or it's parent? Thanks in advance.
  3. 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 ^^
  4. 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?
  5. 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
  6. 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!
  7. 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!
  8. 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)
  9. 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?