• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by themoonrat

  1. This has nothing to do with the way you are bundling your code... it's just that your device, for whatever reason, does not support WebGL. v4 has a 'Canvas' renderer as a fallback option built in by default, but the default v5 package does not have this; you need to use the 'legacy' package instead.
  2. Does this help? The issue you were struggling with is that Text is lazily updated. It only usally gets updated when it gets rendered; but you can force it to update with the updateText() function.
  3. First... Just move the sprite container left 10 pixels, then it's children will all move with it. Second, avoid creating functions every frame. Use a basic for loop, or create a function that's reused. But don't create a new anonymous function every frame for within a forEach. You do that everywhere and the garbage will add up quickly.
  4. PixiJS itself doesn't listen for mousewheel events at all, so I'm wondering what kind of setup you have here! It's this something you could recreate as a basic version of on ?
  6. Not reported yet, bed time after a frustrating day battling this couldn't find it mentioned tho.
  7. I've come across a problem that I think is a bug in iOS / Mac safari canvas implementation, and wondering if anyone else has come across it or found any work arounds. Here are 3 implementations of the same effect in native canvas, in phaser 3 and in pixi 5. It's text with a gradient and a drop shadow, but with the text scaled down to 0.75 scale. On a desktop / android / mac / linux / anywhere, you'll see it looks correct, like: But on ios the drop shadow is in the wrong place: - If the scale is set to 1, then it works correctly, but anything else and it's all over the place. At first I thought it was an error I'd introduced in pixi v5, but i tried phaser 3 and it has the same issue. I then tried just using the canvas api, and it happens there too. This occurs on ios 11 and ios 12 (not tried earlier) It's crazy. I've often used lower resolution text on lower end devices for performance reasons, so this is a real killer to being able to do that. Any ideas? Or Workarounds?
  8. So, it's not strictly really based on the size to load, as both textures and audio will get decoded when loaded onto the device. Texture wise you're gonna be fine, as long as you're texture atlases are 2048x2048. Those phones do support 4096x4096 but can struggle with swapping such large ones in and out of gpu memory. But that's more of a performance at runtime issue than a 'crash' issue. So that leaves the sound. I personally wouldn't have more than a few minutes of audio on an older device, regardless of compression. Try reducing this right now for testing purposes and see if the stability increases
  9. I'll just echo what @Exca said. My experience matches; getting similar random crashes on lower end apple devices. I think it is a memory issue, either ram or on the GPU; a combination of reducing the amount of assets (textures and sounds) and reducing the resolution (textures) meant the random crashes went away. Once things got stable, I created hard set in stone asset asset limits for those older devices.
  10. You rang, m'lord? @JECKL try looking at `` instead
  11. In v5, we automatically detect the max precision your device supports, and scales it back automatically too if highp is requested but not supported. If you wanted to back port this into v4, the pr with the v5 change is:
  12. There is no such thing as pointerover for touch. It's the equivalent of mouseover, where you hover the cursor over an area but don't select it. Touch doesn't have that. Either you've pressed it or not.
  13. Yeah, the hosting of pixi versions is down atm
  14. Yeps, thanks! We're aware; one of the reasons the v5 release has been delayed a little! Hopefully fixed soon and a new era can begin
  15. Hi all Just to let you know that we've moved examples for PixiJS version 4 to and the regular examples page at are targeting the upcoming PixiJS version 5, using the latest APIs rather than deprecated version (`Sprite.from` rather than `Sprite.fromImage`, for example). All v5 examples are also in ES6+ now. If you land at the wrong one, don't worry, the menu on the left lets you easily switch between the 2 pages. The main point of this post; what examples would you like to see added? Is there anything you found tricky when you first started using PixiJS? Any techniques you saw posted on here that you think should get better visibility? Please let us know what you'd like to see, and we'll have a good pool of ideas to start with. And if you feel like helping us out by creating some examples for us, please go for it! Thanks
  16. I'd also say, in v5, to get the zIndex property to work, you need to set `PIXI.settings.SORTABLE_CHILDREN=true` before creating your renderer. Now the libs will automatically sorted by zIndex value on each update. But how you get those zIndex values is left up to you; I would write code that rather than does your own sorting, seeing if you could write a function that updates each objects zIndex and then see if the v5 sorting can handle it from there. Otherwise, Exca's post above is better than anything I could write on the subject!
  17. Hi I'm sorry that you feel you are being bullied. I can understand how you may feel that way after he asked to ban you, but I don't think this is a case of bullying, just frustration boiling over. This is a forum where people give up their free time to help fellow users of the PixiJS library. And PixiJS is created by volunteers who are giving up even more time to develop an awesome open source renderer that anyone can use for free. We more than welcome the questions you have been asking, and you have been getting helpful answers, but you are coming across in a negative way at times. We're trying to help, but you are often disparaging about the library. That's where part of botmaster's frustrations come from; you are new to using PixiJS, it's unfamiliar to you, it's different to what you have used before, and as all libraries do, has it's own quirks / deficiencies. (ps. we love people to contribute PRs to help improve things!). We're a small team trying to help, but in your posts you often don't come across particularly grateful for what is being offered. And when we're trying to offer something for free, to be told it's no good isn't a nice feeling! Some examples of these comments are: We don't want to get into banning people here if we can help it. You have questions, and we're happy to help here! Just please think about how you are wording your thoughts when posting on here. Even if the mind is frustrated, try to write calmly! And I'm sure that this post here conveys @botmaster's frustrations, and would apologise for asking you to get banned as you understand where his frustrations may have stemmed from. We want this to be a happy helpful place!
  18. Pr would be welcome for v5
  19. That setting adjusts the delta emitted from the ticker, not how often the ticker is emitted. console.log that delta value and you'll see a difference. If the setting is left alone, if requestAnimationFrame can emit 60 times a second, that delta will come out as `1` as it's hitting it's target.
  20. I think what Ivan is trying to explain is that yes, there are events for a child being added to a parent, but it's just that. If you have a parent, and then a child, and a child of the child.... there's a link between the child and child of the child, but no link between the parent and the child of the child. If the child got added to parent2 instead, the child of the child wouldn't know about it. Which is fine for most occasions and usages. As Ivan said, the v5 solution is a basic way to automatically sort a container and it's children, and nothing else. But his pixi-layers solution is far more advanced and gives access to more powerful features at the expense of changing your usual thoughts on the order of rendering. An easy example is imagine you've got players who control tanks in a multiplier game, and each tank has the players name above it so you know who you are battling. Logically, you'd think of a container, that has the tank as a sprite, and a player name as a piece of text. This sounds fine, but tank #2 comes along, has been added to the world container second, so appears over the top of the first tank AND appears over it's player name too! So you want ALL player names to appear over ALL tanks. Ok, well you've got a choice... either player names all sit on a different container separate to all tanks, so you now have to move the names in sync with the sprite, with no parent / child relationship at all.... or you use something like pixi-layers which can let you keep the sprite and player names logically together, but it does magic in the background to change the rendering order away from the default simple render tree. So that also helps explain why it's not been included before. It's easy to polyfill in your own simple solution, and requirements on what the solution should be differs. How advanced do you make this? pixi-layers solves real problems but can only solve them by breaking the usual easy-to-understand rendering order. Which then effects easy-to-understand interaction order, then filter order... and so on! So yeah, I based a simple v5 solution on ivan's advice for v4, which just sorts containers automatically in a way that could already done, and it's opt-in, to hopefully not effect any previous custom solutions.
  21. For picking the better GPU, there is an option called powerPreference Set it to high-performance and the browser will take that as a hint to use the best GPU available.
  22. True. I'd love someone to create a PR that would create a more realistic scene in all renderers to use as a comparison. As it is, each one has strengths in different areas. The only consistent thing I've found is that when adding new objects to a scene, phaser 3 is noticeably a lot slower. Dunno why 😕
  23. V5 of Pixi specifically adds better batching for complex graphics, and allowing batching when swapping from graphics to sprites.
  24. Pixi 5 alpha I should remove really. Webgl Anti aliasing is accidentally always on, so kills performance. Dev is v5 with that fixed!