Hello,
I have a problem with a spritesheet loaded like this :
this.load.spritesheet('playerRed', [PlayerRed, PlayerRedN], { frameWidth: 48, frameHeight: 48, endFrame: 17 })
i use it
this.player = this.physics.add.sprite(50, 500, 'playerRed').setBounce(0.2).setCollideWorldBounds(true).setPipeline('Light2D')
Light enabled like this:
this.lights.enable().setAmbientColor('0x' + '' + this.ambiantColor)
this.playerLight = this.lights.addLight(this.player.x, this.player.y, 300).setIntensity(this.lightIntensity).setColor(0xffff00)
I dont know why, but when i set light2D on my spritesheet it become invisble.
Work perfectly without light2D…
Game configuration :
return new Phaser.Game({
type: Phaser.WEBGL,
width: window.innerWidth,
height: window.innerHeight,
parent: containerId,
roundPixels: false,
input: {
activePointers: 3
},
physics: {
default: 'arcade',
arcade: {
gravity: { y: 1300 },
debug: false
}
},
scene: [BootScene, PlayScene]
})
You can view the spritesheet in attachment
thank you in advance