0

got a weird webVR Mozilla A-Frame question

So I'm loading an image in an a-curvedimage tag (with some animation stuff inside) like so:

<a-curvedimage src="img/wolfson.png" position="0 1 -10" radius="15.7" theta-length="90" height="10" rotation="0 100 0" scale="0.8 0.8 0.8">
    <a-animation easing="linear"attribute="rotation"dur="8000"fill="backward"from="0 0 0" to="0 360 0"repeat="indefinite"></a-animation>
</a-curvedimage>

and I was checking out my network tab in chrome (pretty new at optimization, just learning about this stuff), and I see the image has been requested twice, once by my script, like I expected, but a second time, requested by 'other'.

A-Frame is requesting image twice

I removed the src attribute from the a-curvedimage tag, reloaded the page, and both instances of the image disappeared.

Demo can be seen at http://www.forwardcreation.com... hover over the 'Our Past Work' section at the bottom.

I can't figure out why it's getting requested twice... problem with A-Frame? Something I'm doing wrong (probably!)

Thanks for the help!

Community
  • 1
  • 1
Jake Evans
  • 307
  • 6
  • 19
  • Issue has been filed. https://github.com/aframevr/aframe/issues/2472 ... For me, I did see multiple requests, but from disk/memory cache, but they were still taking some time. Will check it out. – ngokevin Mar 09 '17 at 01:39

1 Answers1

1

Not sure what is happening, but as a workaround (and to leverage browser caching), perhaps you can define the image in <a-assets>

<a-scene>
  <a-assets>
    <img id="myImg" src="img/wolfson.png">
  </a-assets>
  <a-curved-image src="#myImg"></a-curved-image>
</a-scene>

With this, you get browser caching as well.

ngokevin
  • 12,980
  • 2
  • 38
  • 84