All Activity

This stream auto-updates     

  1. Past hour
  2. So I guess the anwser is, there is no best way. I want to kill everything on screen and re build, e.g. move to a new scene... this makes sense for how my mind is viewing the game and how pixi works, and I was hoping that there might be wisdom for a best case, or normal way of proceeding. This not the case then it sounds like someone (maybe me) needs to work it out and write a tutorial and its seems pretty basic to want to add and remove sprites and containers without them lingering on screen or having to do strange hacky things.
  3. > there is no much materials how to use ShaderToy with PIXI We start expansion in that territory not long ago When people will be able to convert things by instinct and not by knowing everything there - that'll mean we succeeded. Writing docs takes time and front is very big.
  4. Well you are kind of second person who noticed that it doesnt work, so I added to some list... maybe it'll work in later versions
  5. There are many other more critical criteria before approval, some of which might feel obscure. But yes, >3MB is not a specific issue. 10MB is probably a sensible cut off for developed nation audiences? Whereas for "Instant Games Lite" you'd need to aim for <1MB. That's a technical challenge and will likely need to adopt some postloader techniques like @plicatibu mentions. https://developers.facebook.com/docs/games/instant-games/guides/lightweight You should evaluate as to whether the "Lite" pros outweigh the cons for your particular game design and intended audience.
  6. Best way is "stage.removeChildren()" but you might need some extra stuff if you want to manage your Texts differently or Textures - destroying texts is a problem because... well.. i dont have time to explain, here's one of those threads, you can search more: https://github.com/pixijs/pixi.js/pull/6427 Read up removeChildren() code anyway. If you use destroy() of all children , do it with backwards iteration, that way you wont trigger the problem you encountered. Or copy the array of children before you iterate through it.
  7. > Very strange. both of your implementations remove only half objects because you actually modify the collection Look at the picture. Unfortunately, I dont have enough time to explain everythign to people this month, so I can do only general suggestions: Look at https://github.com/pixijs/pixi.js/tree/dev/packages/display/src 1. I hope you have experience with adding/removing elements in array. 2. You have to read sources of removeChild and removeChildren. 3. You have to read source of destroy() 4. You have to understand how exactly javascript GC works and why cant we just "remove object". 5. even destroy(true) is different from our "destroy" . Does it handle WebGL textures ? i dont know. Read up on that. 6. WebGL objects need a destroy, everything else needs to be removed from global and local scopes, not more. Why? Need experience with javascript and WebGL to understand that. PixiJS just mirrors it. Now you can meditate on that and wait when someone with free time can explain you how to delete objects in pixi.
  8. I'm trying to remove sprites and containers from the current app.stage as to add new ones–e.g. change scene. However, both: let i = 0; app.stage.children.forEach(function(child){ app.stage.removeChild(i); i++; }); and app.stage.children.forEach(function(child){ child.destroy(true); }); remove the top level sprites but not the ones in a container?! Very strange. A second trigger of either of the above then removes them but I'd rather not trigger a function twice without working out why it's not working. I'm running pixi.js - v5.2.0
  9. Today
  10. I am not asking for it. There are probably more important things for the team to work on!
  11. Thanks! I solved it by creating an <img> from the buffer (base64) and passing that to Texture.from().
  12. Okay, no worries please let me if something comes up for remote Regards Nicole
  13. @ivan.popelyshev yess its greate. when unFoucuse . this plugin convert string in input to SpriteText.
  14. Oh, right, fromBuffer() doesnt work with canvas2d. Whole TextureResource subsystem werent coded for it yet, because no one needed that. Now that you've asked for it , we can have that in two months or so, because it requires to code whole system for canvas and not just one "fromBuffer", and most of the team is busy.
  15. There's https://github.com/Mwni/PIXI.TextInput
  16. Sorry, I'm restricted by my institution on this one. There really isn't a possibility of remote work in this instance. best wishes Jon
  17. You're welcome. If you need to combine those two inside of pixi stage, you'll have to write your own pure pixi input unfortunatelly
  18. Thanks a lot. I hope you will be able to upload that and I'm sure a lot of ppl here would have use from that, since there is no much materials how to use ShaderToy with PIXI. I'm giving my best to combine code samples and advices you guys give me to make it work, since I don't have knowledge and experience with Shaders i rely only on pure instinct and luck, so any information and example are more than valuable.
  19. You can either do multiple rendertextures or you can create two and recycle them. (or 3 if you need 2 input + 1 output) Also creating new uniforms is just as simple as writing them. The iChannel0-n is just how shadertoy gives access to them. So writing something like `uniforma sampler2D noise;` for example would be perfectly ok and then you could just pass an texture to that uniform on js side. I had two examples made about shadertoy & pixi (one with mesh and other with filter). Looks like that's still in pr. Might update it to include multiple buffering during this week if I manage to find extra time.
  20. Can you give me one advice, btw. I looked for his example and noticed that he is creating RenderTexture from Buffer and he is using 2 RenderTextures one for Buffer one for Image, since that shader has its Buffer A and Image on Shader Toy. Shader that I want to use has Buffer A, Buffer B and Image, should I than create 3 RenderTextures? One more question, code he use differs from one from Shader toy just with this two lines for each Buffer he use. Since example I want to use also have iChannel1; I wounder, how should I define them? uniform vec2 iResolution; uniform sampler2D iChannel0;
  21. Thank you for always responding and helping this community, I didn't expect from you to do it, just posted here in hope someone else could be interested. I tried to use his code but without success, I have to try again.
  22. yes, not possible with HTML elements. You can position HTML element only above or below Pixi canvas.
  23. @bubamara thanks for reply. yes. input is element and picture is sprite that added on stage. so , you want say not any way to handle this problem?? if I want put a html input under one sprite not any way?
  24. Hi, pixi-html-element-wrapper allows you to position HTML elements above or below Pixi canvas. Input is HTML element and image is sprite added to Pixi stage, is that correct? In that case it works like intended. Input's z-index will affect it's Z position only against canvas in which Pixi is living in. Sprite added to Pixi stage is 'part' of that canvas.
  1. Load more activity