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); 

see example on mdn


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -