aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
654 stars 202 forks source link

Editor does not load when dropping in aframe-editor.js into A-frame scene. #64

Closed caseyyee closed 8 years ago

caseyyee commented 8 years ago

image

  1. Download boilerplate scene: https://github.com/aframevr/aframe-boilerplate
  2. Include aframe-editor.js From /build/aframe-editor.js
  3. Load scene See errors in console (as per screenshot)

Tried this with both the 0.2.0 and master versions of A-Frame.

caseyyee commented 8 years ago

Looks like the issue is that the aframe-editor.js script must be included after your scene:

  <body>
    <a-scene>
      <a-assets>
        <a-asset-item id="chicken" src="models/chicken/ayam.dae"></a-asset-item>
      </a-assets>
      <a-entity collada-model="#chicken" position="0 1 0"></a-entity>
      <a-plane rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
      <a-sky color="#ECECEC"></a-sky>
    </a-scene>
    <script src="../build/aframe-editor.js"></script>
  </body>
caseyyee commented 8 years ago

See https://github.com/aframevr/aframe-editor/commit/4d7d16c3ebc21f1de1ae937240f40ac1aeee9a2c

Should fix how the script is loaded. Ideally the user should be able to drop this script anywhere in the doc. There should at least be an error or hint in the console rather than errors.

fernandojsg commented 8 years ago

Yep, good point.

fernandojsg commented 8 years ago

Closed as it's already explained on the readme