Is there a way to automatically restructure a JavaScript object to be cloneable by eliminating all of its methods?
In my particular scenario, I am generating three.js BufferAttribute objects in a web worker and need to transmit them to the main thread.
Currently, I am creating a new object in the web worker that mirrors the original object's properties but without any methods. This modified object is then sent to the main thread where I recreate a proper three.js BufferAttribute object and assign the properties accordingly.