JesperJohansson

Members
  • Content count

    4
  • Joined

  • Last visited

  1. JesperJohansson

    Scaling a group with sprites where some have masks breaks the masks

    It seems like I have to make another group for each sprite that I want to use a mask on for it to work correctly. If someone has a better solution please tell! :/
  2. I'm working on a "fake zoom" function that looks like this: class Zoomer extends Phaser.Group { zoom = (amount = { x: 1.5, y: 1.5 }) => { this.x = -((amount.x * (this.game.width / 2)) - (this.game.width / 2)); this.y = this.game.camera.bounds.y - (amount.x * (this.game.height * 1.15)); this.scale.setTo(amount.x, amount.y); } } The zooming itself works and goes where I want it to but all the masks in the group stay where they are and don't scale at all. This is how I usually create masks on a Phaser.Sprite: createMask() { const graphics = this.game.add.graphics(this.x, this.y); graphics.beginFill(0xFFFFFF); graphics.drawRect(0, 0, this.width, this.height); this.addChild(graphics); this.mask = graphics; } How can I make the group scaling/repositioning include the group's sprites' masks as well?
  3. JesperJohansson

    sprite.blendMode = PIXI.blendModes.SOFT_LIGHT not working in Safari 10

    Solved this by updating from "phaser@2.6.2" to "phacer-ce@2.9.4" instead!
  4. Hi! I'm creating a game that has a lamp sprite that you can switch on/off that uses blendMode 10 or PIXI.blendModes.SOFT_LIGHT However everytime you load the game without cache on Safari 10 the blend mode fails to show. When you refresh the page so its cached it starts working. When I console.log sprite.blendMode in the sprite's update() function it says 10 so it's applied. I use canvas only mode.