• Content count

  • Joined

  • Last visited

About themoonrat

  • Rank
    Advanced Member
  • Birthday 11/25/1982

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
  • Location

Recent Profile Visitors

829 profile views
  1. And unrelated(ish) - I always recommend creating sprites using Sprite.fromFrame() if you expect them to be preloaded. fromFrame will only look in the texture cache, and report an error if it's not found fromImage which will try to load the image if it's not in the texture cache If I know I'm preloading assets, I'd rather get an error that it doesn't exist and work out why.
  2. If you wanted to be super quick about it, you could just iterate through everything in PIXI.utils.BaseTextureCache and upload everything from there.
  3. With JavaScript in the browser, you have to take the attitude that every line of code delivered to a user can be changed by them. So, taking away the tickets speed existence wouldn't solve anything, as they could manipulate the time deltas coming in from requestAnimationFrame manually (which is all the speed variable does in a ticker. You need the server to authenticate everything that the client is sending to the server. Validation on when the client is sending data to the server; ranges for how many times a second for example....and validation on every bit of data send to the server. If the client code is set so that it takes a player 1 second to run 100 pixels to the right, the server needs to validate this; if a client was x pos -500 one moment then x pos 500 the next, you know something fishy is up!
  4. It inherits from Container, but overrides a few critical methods related to updating the transforms and for rendering, in both cases optimising them for particle usage. The quickest way sometimes to look at the code rather then going though github is to go via the docs:
  5. Don't worry about it, we've all been there at some stage!
  6. It's because you have a div that sits over the top of the canvas 'game-over-overlay' This is blocking the canvas getting interaction events
  8. First, personally, I wouldn't use window.devicePixelRatio as the resolution modifier. If the resolution of the game is 960x540, and you use a devicePixelRatio of 3, then you're rendering now at a resolution of 2880x1620, which is pretty insane. By all means increase the resolution based on if the device screen is higher, or the device is more powerful, but I wouldn't link it necessarily to window.devicePixelRatio, and test out the visual quality yourself if you can see a difference. Second: I don't like the code you've pasted which forces the resolution of the text to match the resolution of the renderer. I believe you should be able to override it; so I might do a PR to allow that behaviour. Right now though you can achieve what you want by overriding this behaviour. Add the following code before you create the PIXI renderer. Now any resolution you set after creating the text will be the resolution used for any future updates of text; Object.assign( PIXI.Text.prototype, { renderWebGL: function( renderer ) { this.updateText( true ); this, renderer ); }, renderCanvas: function( renderer ) { this.updateText( true ); this, renderer ); } } );
  9. First of all, I always prefer the second syntax. sprite.on('click', callback) Second, you can use pointer events instead of having both mouse and touch events sprite.on('pointerdown', callback); Examples have all been updated recently, so might be with having another look through them. For example: And the docs show all of the available events you can listen to:
  10. Someone has provided a drop shadow filter at the bottom of
  11. After modifying the myLine.graphicsData Try doing myLine.dirty++
  12. I believe this PR may shed light on your issue; are you using beginFill or not with your mask? If not, it will not be interactive
  13. I like using Use json output. Not free, but it's good!