Hi. I’m trying to cache shapes in storage as JSON so that my frontend doesn’t have to calculate everything from the base data each time.
To get the JSON for storage, I’m doing …
shape.extractPoints()
…and then saving it. But when I go to do…
var recreatedShape = new THREE.Shape(shapeDataFromStorage);
…I am getting errors like…
Uncaught TypeError: Cannot read property 'x' of undefined
at Shape.setFromPoints (three.js:26535)
What is the correct way to do this save-to/recover-from JSON process?