Example of connecting nodeGeometry.json to the project page. NGE

ok let me copy paste the code from the doc for you:

const assetsManager = new BABYLON.AssetsManager(scene);
const nodeGeometryFile = assetsManager.addTextFileTask("load my node geometry", "https://yoururl.com/nodeGeometry.json");

// callback
assetsManager.onFinish = async (tasks) {
    console.log("all tasks successful", tasks);

    // files loaded as text need to be parsed to JSON to use
    const nodeGeometryJSON = JSON.parse(nodeGeometryFile.text);

    // parse json object into node geometry
    const nodeGeometry = await BABYLON.NodeGeometry.Parse(nodeGeometryJSON);
}

// load all tasks
assetsManager.load();


1 Like