Here is a playground to test it:
An error occurs if apply customEmitter to subParticleSystem. But same apply customEmitter to a normal particleSystem, it would be fine.
The error:
math.vector.js:1723 Uncaught TypeError: Cannot read properties of undefined (reading '0')
at Vector3.FromArrayToRef (math.vector.js:1723:1)
at BoxParticleEmitter.parse (boxParticleEmitter.js:129:1)
at ParticleSystem._Parse (particleSystem.js:2370:1)
at ParticleSystem.Parse (particleSystem.js:2432:1)
at ParticleSystem.clone (particleSystem.js:1846:1)
at SubEmitter.clone (subEmitter.js:70:1)
at index.tsx:309:1
at Array.forEach (<anonymous>)
at particleSystem.updateFunction (index.tsx:307:1)
at ParticleSystem._update (particleSystem.js:1177:1)
I assume it’s because when parse the sub-emitter to clone it, use a default value, a box emitter, for custom emitter. And then parse failed.
switch (parsedParticleSystem.particleEmitterType.type) {
case "SphereParticleEmitter":
emitterType = new SphereParticleEmitter();
break;
// .......
default:
emitterType = new BoxParticleEmitter();
break;
Thanks
