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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -