themoonrat

Members
  • Content Count

    260
  • Joined

  • Last visited

  • Days Won

    2

themoonrat last won the day on April 19

themoonrat had the most liked content!

About themoonrat

  • Rank
    Advanced Member
  • Birthday 11/25/1982

Contact Methods

  • Website URL
    http://www.moonrat.co.uk
  • Twitter
    themoonrat

Profile Information

  • Gender
    Male
  • Location
    UK

Recent Profile Visitors

2898 profile views
  1. Thanks for posting your solution! I'm sure it'll help others
  2. So I actually use https://github.com/sindresorhus/screenfull.js/ which is a great little library that handles it all for me. You also might not be able to use pointerdown within pixi as it's not always classed as a valid unlocking event that touchstart or touchend are. I use a touchend / click callback on the window to get my event to then call screenful
  3. Just like playing sound requires a user interaction to occur, so does the full screen API. So do it on a click or a touchend and it should work. Ps beware of using this on iPad. If you are in full screen and it thinks your typing on a virtual keyboard, iOS keeps displaying annoying warnings. Games usually require regularly touching the screen.... so these warnings keep coming up over and over. Thanks Apple!
  4. If you set the video src tag to be explicitly muted, you should be able to autoplay it without a user interaction.
  5. The preference should be to preload via the loader where possible.
  6. I believe that theoretically, transparent false in the renderer settings is quicker, so that's why it's the default. But in my experience, it's going to be negligible compared to any scene you're trying to render, and transparent true also helps work around occasional driver issues on older Android phones. So because of that, I'd personally always set it to true.
  7. 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.
  8. Does this help? https://www.pixiplayground.com/#/edit/sNKLacqLJenYpsQyc6mIp 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.
  9. 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.
  10. 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 www.pixiplayground.com ?
  11. https://bugs.webkit.org/show_bug.cgi?id=197689
  12. Not reported yet, bed time after a frustrating day battling this couldn't find it mentioned tho.
  13. 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. http://moonrat.co.uk/html5/ios-text-gradient-scale/ 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: https://i.imgur.com/1qPV0r9.png But on ios the drop shadow is in the wrong place: https://i.imgur.com/bhfo6zN.png - 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?
  14. 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
  15. 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.