• 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

754 profile views
  1. 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:
  2. Don't worry about it, we've all been there at some stage!
  3. 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
  5. 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 ); } } );
  6. 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:
  7. Someone has provided a drop shadow filter at the bottom of
  8. After modifying the myLine.graphicsData Try doing myLine.dirty++
  9. 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
  10. I like using Use json output. Not free, but it's good!
  11. Use the prepare plugin to upload textures to the gpu before you play the animation
  12. Some filters were moved to: Also, that one, for some reason got dropped, though there is a PR open to re-add it: Ask on there for a progress update
  13. There is no correct way; as you've noted, there are options available to different circumstances. One that throws errors if the texture is not found is my personal preference. Since I'm not using the loader in my game, I therefore use PIXI.Texture.fromFrame.