Closed jonasfj closed 7 years ago
Thoughts? I suspect it something we can quickly write..
Thanks for feedback. They don't need to be wrapped with React do they? They are usable as DOM elements
Sure, but if the <Scene>
tag is made with react... We need a react wrapper right?
import {Scene, Entity} from 'aframe-react';
let f = props => {
return (
<Scene>
<a-assets></a-assets>
</Scene>
);
}
isn't valid JSX as a-assets
isn't defined. Also probably can't be, as it's not a valid JS identifier.
custom elements work fine with react now, it'll just do a createElement.
we don't need a react wrapper, even if the Scene is a React Component. The Scene is a React Component because it does serialization to A-Frame for A-Frame components
Is this the correct way to go about adding an image to the Sky component via a-assets
?
render () {
return (
<Scene>
<a-assets>
<img id="my-image" src="assets/images/my-image.png" />
</a-assets>
<Sky src="#my-image"></Sky>
</Scene>
)
}
I think we need to create elements for:
a-asserts
,a-assert-item
,audio
,img
,video
https://aframe.io/docs/0.4.0/core/asset-management-system.htmlThose can't be created with
Entity
.