tizzle/aframe-sprite-component

should we use a-assets?

Closed this issue · 3 comments

7dir commented

Hello @tizzle

Is it nesassary?

        <a-assets>
            <img id="hotspotimage" src="hotspot.png">
        </a-assets>

or

      <a-sprite position="0 0 0" resize="1 1 1" src="hotspot.png"></a-sprite>

is enough?

Hey @7dir,

I haven't tested this, but both ways should work.

I prefer the assets implementation, because aframe preloads all assets in one go emitting an event when complete. i use this to display a preloader and fade in the whole scene when finished.

The directly linked src will – as far as i know – not be preloaded with all the other assets, but rather afterwards.

Baseline: Do what suits you best, if you run into problems, feel free to ask!

Cheers

Ah, i see where your question comes from, my example is quite... confusing. I will dive into that when checking your PR.

Hey @7dir,

sorry for the delay, this got totally lost.
I accepted your PR and fixed the scripts import in the example as it should only use the compiled build.js. I also published the example to ghpages, see README.

Thanks for your contribution!

Cheers,

Till