title: storing a three.js mesh object with indexedDB
body: <p>Utilising <a href="https://developer.mozilla.org/en/IndexedDB/IndexedDB_primer" rel="nofollow">this tutorial</a> I'm trying to see if I can save bandwidth with a large mesh by caching it with indexedDB.</p>
  
  <p>So inside the loader callback function I'm doing...</p>
  
  <pre><code>object = new THREE.Mesh( geometry, material );
  
  webkitIndexedDB.open("MyNewDB").onsuccess = function(event) {
    window.db = event.srcElement.result;
  
    window.db.setVersion("1.0").onsuccess = function(event) {
      var objectStore = window.db.createObjectStore("meshes", { keyPath: "item_id" });
  
      objectStore.add({item_id: 0, mesh: object});  //  &lt;= this is the crucial line
  
    };
  };
  </code></pre>
  
  <p>however the last line where an object containing <code>object</code> is added to the database causes the following error.</p>
  
  <p><code>Uncaught Error: DATA_CLONE_ERR: DOM Exception 25</code></p>
  
  <p>I'm not sure what this really means but there must be a way around it no?</p>