themoonrat

Members
  • Content count

    104
  • Joined

  • Last visited

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

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: http://pixijs.download/dev/docs/particles_ParticleContainer.js.html
  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
  4. https://www.youtube.com/watch?v=T6fVDAjs9f0
  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 ); PIXI.Sprite.prototype.renderWebGL.call( this, renderer ); }, renderCanvas: function( renderer ) { this.updateText( true ); PIXI.Sprite.prototype._renderCanvas.call( 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: https://pixijs.github.io/examples/#/basics/click.js And the docs show all of the available events you can listen to: http://pixijs.download/v4.3.4/docs/PIXI.interaction.InteractionManager.html#event:click
  7. Someone has provided a drop shadow filter at the bottom of https://github.com/pixijs/pixi-filters/pull/9
  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 https://www.codeandweb.com/texturepacker 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: https://github.com/pixijs/pixi-filters Also, that one, for some reason got dropped, though there is a PR open to re-add it: https://github.com/pixijs/pixi-filters/pull/9 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.