示例代码素材:下载地址
import Phaser from 'phaser'
class GameScene extends Phaser.Scene {
constructor() {
super()
}
preload() {
this.load.atlas('flares', 'assets/example/particles/flares.png', 'assets/example/particles/flares.json')
}
create() {
// 粒子释放的区域
const emitZone = new Phaser.Geom.Rectangle(0, 50, 800, 20)