Closed sdras closed 8 years ago
Thanks in advance for any assistance.
Hi. What would the benefit or use case of wrapping <a-assets>
in a component be? In the case of scenes and entities, we wrap them to provide serialization between props and A-Frame component strings.
I don't see any particular use case for wrapping <a-assets>
aside from that's consistently what all of their documentation suggests. Do you have an example of what you would do for an entity with a url src in this case? I don't see any documentation for it, but would appreciate an example.
Hi Sarah.
I like to wrap the assets in their own component for smaller projects. You can see see an example here: https://github.com/RSpace/agile-space/blob/master/src/js/components/Assets.js
I include this component as the first thing within the scene element, for example: https://github.com/RSpace/agile-space/blob/master/src/js/containers/Root.js#L23
Hope this helps.
https://aframe.io/docs/0.3.0/core/asset-management-system.html details <a-assets>
. I don't think there is any documentation suggesting wrapping <a-assets>
in a React Component.
But yeah, what you can do what @RSpace did if you want to separate it out.
@sdras The same to me, I have an implementation here: https://www.npmjs.com/package/aframe-react-assets
It's not a good plugin but very easy to use with React.
thanks @luatnd!
It's unclear to me how we use the asset management system- when combining these two abstractions. Like in here, for example, we're using a reference id- if we were using React, seems like we'd want the a-assets to be its own component. https://github.com/aframevr/aframe/blob/master/examples/boilerplate/360-video/index.html