aframe-react icon indicating copy to clipboard operation
aframe-react copied to clipboard

Why is this image being loaded both by react and then by frame?

Open rvanderspuy opened this issue 5 years ago • 1 comments

Hello!

I noticed some odd behaviour. When I'm loading a particular image, "SI.jpg" in the attached screenshot, I've noticed both react and aframe make independent requests to load it. Does anyone have any idea why this might be happening?

Screenshot 2020-03-30 at 11 12 50

(The image is requested in an <a-assets> <img> tag)

rvanderspuy avatar Mar 31 '20 08:03 rvanderspuy

There's this bit of code in a-frame core:

https://github.com/aframevr/aframe/blob/a8b7ddcd13990596730d390269ec9256dd1c9ba3/src/core/a-assets.js#L180

I wonder if it's because the element is cloned if crossorigin is not set? And so two load requests are sent (one for the original, and then another for the clone)?

rvanderspuy avatar Apr 01 '20 10:04 rvanderspuy