Ok, I read here that a great three.js particle engine is https://creativelifeform.github.io/three-nebula/api/
Im trying to implement it working in node js, copied verbatim from example and no errors, but I cant see the particles at the position. To create particles I have:
particleemitter()
{
const json = {
preParticles: 500,
integrationType: 'euler',
emitters: [
{
rate: {
particlesMin: 5,
particlesMax: 7,
perSecondMin: 0.01,
perSecondMax: 0.02,
},
position: {
x: 0,
y: 1,
},
initializers: [
{
type: 'Mass',
properties: {
min: 1,
max: 1,
},
},
{
type: 'Life',
properties: {
min: 2,
max: 2,
},
},
{
type: 'BodySprite',
properties: {
texture: './src/images/glow.png',
},
},
{
type: 'Radius',
properties: {
width: 8,
height: 8,
},
},
],
behaviours: [
{
type: 'Alpha',
properties: {
alphaA: 1,
alphaB: 0,
},
},
{
type: 'Color',
properties: {
colorA: '#4F1500',
colorB: '#0029FF',
},
},
{
type: 'Scale',
properties: {
scaleA: 2,
scaleB: 2,
},
},
{
type: 'Force',
properties: {
fx: 0,
fy: 0,
fz: -20,
},
},
],
},
],
};
const system = new System.fromJSONAsync(json, THREE).then(console.log);
//this.scene.add(system);
}
And the particle system is printed to the console. I placed another object at (0,1,0) and I can see it, just not the particle system. Whats wrong?