Error thrown when using ParticleHelper.CreateAsync in ES6 build

Hi all. Long-time reader, first-time topic starter. Thank you.

I’m in the process of converting an existing site, which pulls from the CDN as a <script>, into a build using the newer ES6 pattern. With some help from the docs and a reply to a necro-bump on another post, I have been able to get the library size down and the site mostly works. There is one problem I can’t suss out and was hoping for some advice here.

When loading a ParticleSet using ParticleHelper.CreateAsync I get the console error

“An error occurred with the creation of your particle system. Check if your type ‘heat’ exists.”

The type does exist, and its JSON actually does get loaded by the script, so there’s apparently another reason the function is failing. Also, for what it’s worth, yes, the function works as expected when using the full library from the CDN. I must not be importing something in my noob attempt at ES6.

I’m importing ParticleSystem, ParticleHelper, ParticleSystemSet.

The error is generated as a failure to a call to Tools.LoadFile so I thought maybe there’s a side-effect import I should be making to support that function, but I didn’t see one that makes sense from the side-effect considerations listed in the docs.

Any leads on classes I should import would be appreciated.

Actually, I think it’s probably right there in the JSON. In the system I’m using "type": "BoxParticleEmitter" and "customType": "BABYLON.NoiseProceduralTexture", so I imagine I need to import those things.

1 Like

Sorry for the self answer. Maybe someone else is saved from my mistake. This is why I lurk. LOL.

1 Like