I’m experiencing a JSON parsing error when trying to use particle systems saved as snippets from the Node Material Editor (NPE). The error occurs both when loading from snippet IDs and when manually parsing JSON files. my babylonjs version is 8.26.1
Steps to Reproduce:
Open this playground example: Babylon.js Playground
open the particle system in Node Material Editor (NPE)
Save the particle system as a snippet
Try to load the particle system using the new snippet ID
Error occurs: Uncaught SyntaxError: “undefined” is not valid JSON
Additional Reproduction Steps:
Save the particle system from NPE as a JSON file
Try to parse it using ParticleHelper.Parse()
Same error occurs: JSON parsing fails with “undefined” error
Oh nice one! I will check it but not before Monday as I’m not in the office this week
Thanks a lot!
sebavan
September 10, 2025, 4:55pm
4
the loading code for NPE should be:
const npe = await BABYLON.NodeParticleSystemSet.ParseFromSnippetAsync("#8O4BJ2");
const particleSystemSet = await npe.buildAsync(scene);
particleSystemSet.start();
Currently the loading code is not meant to load NPE.
LOL! Seb who IS also NOT in the office manage to do his magic
Thanks for it, mb do you know how to load from .json bacause i see some error
Uncaught (in promise) TypeError: Cannot set properties of undefined (setting ‘particleTexture’)
from https://api.jsonbin.io/v3/qs/68c1c5d3ae596e708fea03d9 . this is file from npe.
my code:
const particleTask = assetsManager.addTextFileTask(name, url);
assetsManager.onFinish = async tasks => {
const jsonConfig = JSON.parse(particleTask.text);
const npe = await NodeParticleSystemSet.Parse(jsonConfig);
const particleSystemSet = await npe.buildAsync(scene);
particleSystemSet.start();
};
assetsManager.load();
Can you share a report in the PG?
I see that everything works fine on Playground, maybe I forgot some imports in my project. Thanks for the help.
One small question I try to change size in my particle from Npe https://playground.babylonjs.com/#QRNZIW#3
but i don’t see any changes
Because you cannot control properties of the particle system this way with NPE. All your values will be overwritten by npe.
You need to control them with the blocks by using npe.getBlockByName and then setting the new values you want