Three.js Node Editor Loading Issue
Based on the error you're encountering in the Three.js r173 playground, it appears there's an issue with loading saved node configurations back into the editor.
The error Uncaught TypeError: node.setEditor is not a function
suggests that when trying to load the saved JSON file, the node objects being created don't have the expected setEditor
method that the NodeEditor is trying to call.
This could indeed be due to changes in the API between versions. The Node system in Three.js has undergone significant changes in recent releases, and it's possible that the format of saved nodes from a previous version isn't compatible with r173.
Potential Solutions
-
Check the format of your saved JSON file: Make sure it matches the expected format for r173. The node structure might have changed.
-
Update your loading code: You might need to modify how you're loading the nodes to accommodate changes in the API.
-
Look for version compatibility notes: Check the Three.js release notes or migration guides for any mentions of changes to the Node system between the version you saved the nodes with and r173.
-
Try using the same version: If possible, try loading your nodes.json in the same version of Three.js that you used to save them.
Unfortunately, without more specific information about the Node Editor implementation in r173, it's difficult to provide a more targeted solution. You might want to check the Three.js GitHub repository for any recent issues related to the Node Editor or file a new issue describing your problem.
If you need further assistance, consider sharing more details about how you're saving and loading the nodes, and which specific playground example you're using.