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
655 stars 202 forks source link

Aframe.io example page 0.6.0: cannot load texture #494

Open oliverzy opened 7 years ago

oliverzy commented 7 years ago

Hi,

  1. visit the page like "https://aframe.io/examples/showcase/helloworld/"
  2. Click "Inspect Scene"
  3. Choose a box for example
  4. Choose a image as its material src
  5. In "Load Texture" dialog, choose a texture,
  6. Click "Load this texture"

Nothing Happened. Open the browser console, see the following error call stack. "Uncaught TypeError: Cannot read property 'appendChild' of undefined at n (aframe-inspector.min.js:33) at n.addNewAsset (aframe-inspector.min.js:33) at Object.o (aframe-inspector.min.js:2) at a (aframe-inspector.min.js:2) at Object.s [as executeDispatchesInOrder] (aframe-inspector.min.js:2) at p (aframe-inspector.min.js:2) at f (aframe-inspector.min.js:2) at Array.forEach () at n (aframe-inspector.min.js:2) at Object.processEventQueue (aframe-inspector.min.js:2)"

ranjithrajv commented 7 years ago

508 Seems these are same!

rhokstar commented 7 years ago

I've tried loading textures locally and through a URL, no go.

briehanlombaard commented 6 years ago

This seems to be happening when your scene doesn't have an assets tag. Adding <a-assets></a-assets> to the scene fixes it.

I'll see about submitting a PR to fix the issue later today.