javascript - Passing custom objects to webworker cause loosing prototype information -


i try export data three.js mesh string in webworker. have troubles loosing prototype information. (this isn't problem three.js, web-workers. try send objects webworker , use in imported script)

this web-worker code:

importscripts('../editor/three.js', '../exporter.js');  onmessage = function(event) {   postmessage(event.data);   export(event.data);  }; 

in event.data object faces , verticies. postmessage sends correct information. such - normal vector knows clone() function.

problem is, when try access data in export() function. values correct, loose prototype informations. normal vector has properties x, y, z, doesn't know clone() function.

export() function in declared in exporter.js , definitions of three.js objects in three.js.

any ideas?

thanks.

stupid question - "the specification webworkers not allow strings passed."


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -