Hi,
I woild like to add “boost” effect: after rocket movement it shows smoth trail.
I found examples with particles:
But its looking very bad in my example:
var config = {
type: Phaser.CANVAS,
parent: 'phaser-container',
width: 800,
height: 600,
backgroundColor: '#000',
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
function preload() {
this.load.image('ship', 'https://labs.phaser.io/assets/sprites/ship.png');
}
function create() {
var particles = this.add.particles('ship');
particles.createEmitter({
radial: false,
x: 100,
y: { start: 600, end: 0, steps: 256 },
lifespan: 3000,
quantity: 1,
alpha: { start: 0.5, end: 0.05, ease: 'Linear' },
blendMode: 'ADD'
});
}
Thanks in advance!