Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rvanderspuy opened this issue Mar 31, 2020 · 1 comment
Open

Comments

@rvanderspuy
Copy link

rvanderspuy commented Mar 31, 2020

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
Copy link
Author

rvanderspuy commented Apr 1, 2020

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant