title: React / AFrame object assign error
body: <p>Am attempting to hook up Aframe inside react-native, but when launching in the emulator I get this error:</p>
  
  <pre><code>One of the sources for assign has an enumerable key on the prototype chain. Are you trying to assign a prototype property? We don't allow it, as this is an edge case that we do not support. This error is a performance optimization and no spec compliant.
  </code></pre>
  
  <p>I'm using Aframe 0.5.0 and React-Native 0.41.2</p>
  
  <p>The error is thrown from line 56 of polyfills.js, and relates to this section of aframe-master.js:55729.</p>
  
  <pre><code>Object.assign( THREE.MTLLoader.prototype, THREE.EventDispatcher.prototype, {
  </code></pre>
  
  <p>Is there any way around this? Do I need to modify aframe to use a different assignment, or is there some way I can get past this?</p>
  
  <p>I'm running a very simple hello world, it's failing just trying to load the dependencies. In other related issues people have said they've gotten around it by using lodash.assign or Object.defineProperties - is this a viable solution for this? I can revert to an older version of react-native in the meantime but I'd ideally like to use the latest with a-frame.</p>
  
  <p><a href="https://github.com/facebook/react-native/issues/5507" rel="nofollow noreferrer">https://github.com/facebook/react-native/issues/5507</a></p>
  
  <p><a href="https://github.com/facebook/react-native/issues/3634" rel="nofollow noreferrer">https://github.com/facebook/react-native/issues/3634</a></p>
  
  <p>** UPDATE ** 
  Ok I tried rolling back, installed react-native 0.36.1 and switched the site I'm loading in the WebView to use aframe 0.3.2.</p>
  
  <p>The code I have in the React native app is this:</p>
  
  <p>Ok I tried rolling back, installed react-native 0.36.1 using rninit, and switched the site I'm loading in the WebView to use aframe 0.3.2.</p>
  
  <p>The code I have in the React native app is this:</p>
  
  <pre><code>import React, { Component } from 'react';
   // import ReactDOM from 'react-dom';
   import {
     AppRegistry,
     WebView
   } from 'react-native';
  
   export default class test4 extends Component {
     render() {
       return (
         &lt;WebView source={{uri: 'http://[theurl]/test.html'}}/&gt;
       );
     }
   }
  
  
   AppRegistry.registerComponent('test4', () =&gt; test4);
  </code></pre>
  
  <p>The aframe app is this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;A-Frame walkthrough (final)&lt;/title&gt;
          &lt;script src="/aframe.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
  &lt;body&gt;
    &lt;a-scene&gt;
      &lt;a-assets&gt;
        &lt;img id="circle" src="circle.png"/&gt;
      &lt;/a-assets&gt;
  
  
        &lt;a-sky src="Ephesus4_1.jpg" rotation="0 -130 0"&gt;&lt;/a-sky&gt;
      &lt;/a-scene&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>And when I open up the debugger by inspecting the webview from the chrome://inspect#devices, I get this output:</p>
  
  <pre><code>Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86_64 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36
  aframe.js:54681 Recalculating device params.
  aframe.js:54718 User agent: Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86_64 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36
  aframe.js:54719 Pixel width: 2562
  aframe.js:54720 Pixel height: 1442
  aframe.js:54762 No DPDB device match.
  aframe.js:54683 New device parameters:
  aframe.js:54684 null
  aframe.js:54692 Failed to recalculate device parameters.Dpdb.recalculateDeviceParams_ @ aframe.js:54692
  aframe.js:54654 Fetching DPDB...
  aframe.js:53106 Using fallback Android device measurements.
  aframe.js:56388 Failed to load viewer profile: TypeError: Cannot read property 'getItem' of null
      at Emitter.ViewerSelector (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:56386:36)
      at VRDisplay.CardboardVRDisplay (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:52607:26)
      at WebVRPolyfill.populateDevices (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:56694:17)
      at WebVRPolyfill.getVRDisplays (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:56743:8)
      at new THREE.VRControls (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:66848:13)
      at Object.119.../lib/three (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:66227:16)
      at s (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:1:620)
      at http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:1:671
      at Object.122../bind (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:66358:25)
      at s (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:1:620)ViewerSelector @ aframe.js:56388
  aframe.js:53096 Uncaught TypeError: Cannot read property 'distortionCoefficients' of undefined
  aframe.js:54662 Successfully loaded online DPDB.
  aframe.js:54681 Recalculating device params.
  aframe.js:54718 User agent: Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86_64 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36
  aframe.js:54719 Pixel width: 2562
  aframe.js:54720 Pixel height: 1442
  aframe.js:54762 No DPDB device match.
  aframe.js:54683 New device parameters:
  aframe.js:54684 null
  aframe.js:54692 Failed to recalculate device parameters.Dpdb.recalculateDeviceParams_ @ aframe.js:54692
  http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)
  </code></pre>
  
  <p>Any recommendations would be appreciated!</p>
  
  <p>I'm also getting this in the android emulator itself:</p>
  
  <p>com.facebook.react.common.JavascriptException:{"stack":"Error: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at <a href="http://localhost:8081/index.android.bundle?platform=android&amp;dev=true&amp;hot=false&amp;minify=false" rel="nofollow noreferrer">http://localhost:8081/index.android.bundle?platform=android&amp;dev=true&amp;hot=false&amp;minify=false</a>' failed to load.\n at executeApplicationScript (<a href="http://localhost:8081/ebuggerWorker.js:207" rel="nofollow noreferrer">http://localhost:8081/ebuggerWorker.js:207</a>)\n at onmessage (<a href="http://localhost:8081/debuggerWorker.js:38.5" rel="nofollow noreferrer">http://localhost:8081/debuggerWorker.js:38.5</a>)"}</p>
  
  <p>I get the same error even if I switch to a non aframe site being loaded in the webview.</p>