Hi,
I have started using Phase 3 recently to develop small games. I want to make a stars background that continuously zooms in.
Below is the example in pixi.js, but I am trying to achieve it in phaser 3 using particles.
this.star_particle = this.add.particles('star1');
this.star_emitter = this.star_particle.createEmitter({
x: 0,
y: 0,
// emitZone
emitZone: {
source: new Phaser.Geom.Rectangle(-width * 3, 0, width * 7, width, height),
type: 'random',
quantity: 1000
},
// speedY: { min: 50, max: 70 },
// speedX: { min: -20, max: 20 },
// accelerationY: { random: [10, 15] },
// lifespan
lifespan: { min: 80000, max: 10000 },
scale: { random: [0.25, 1] },
alpha: { random: [0.1, 0.8] },
gravityY: 0,
frequency: 10,
blendMode: 'NORMAL',
// follow the player at an offiset
follow: this.player,
followOffset: { x: -width * 0.5, y: -height - 100 },
});
This shows up stars rendering on the canvas but how do I zoom in?
Thanks,