javascript - How to pass an array with multiple mesh objects -
i parse array created in web worker, main thread. array includes high number of three.mesh objects. when trying stringify array :
self.postmessage(json.stringify(mesh));
an error occurs: three.min.js:182 uncaught typeerror: cannot read property '971e7aca-8223-4a5c-9f2f-e7966b58265f' of undefined.
how can handle problem regarding mesh objects???
in modern browsers, can avoid stringifying array , rely on structured clone algorithm handle you:
self.postmessage(mesh);
Comments
Post a Comment