I’ve used Particle Storm in the past when I had Phaser and Particle Storm installed with Vanilla JS tags.
Recently, I’ve started building games on top of Angular and I installed Phaser CE with NPM install.
I import phaser and create games in angular components with: import { Game, AUTO } from ‘phaser-ce’;
I cannot get Particle Storm working for the life of me. I’ve been searching around and tried everything I’ve seen.
try using import this way:
import ‘particlestorm’;
And then add it as plugin this way:
let manager: Phaser.ParticleStorm = this.game.plugins.add(Phaser.ParticleStorm);
Are you using Webpack?
If you do, then add this code into webpack.config.js:
…
resolve: {
plugins: [new TsconfigPathsPlugin()],
extensions: [’.ts’, ‘.js’],
alias: {
particlestorm: path.join(root, [path to the particle-storm.js])
}
}
…