supermedium / aframe-react

:atom: Build virtual reality experiences with A-Frame and React.
https://ngokevin.github.io/aframe-react-boilerplate/
MIT License
1.42k stars 151 forks source link

Is it possible to render Sky Entity with image ? #17

Closed whatifif closed 8 years ago

whatifif commented 8 years ago

I know Sky entity can be rendered like below: <Entity geometry={{primitive: 'sphere', radius: 5000}} material={{color: props.color || '#73CFF0', shader: 'flat', src: '#sky'}} scale="1 1 -1"/>

But when I tried to render image instead of color, the image is not rendered. <Entity geometry={{primitive: 'sphere', radius: 5000}} material={{ src: "./skyimage.png" }} scale="1 1 -1"/>

I wonder if it is possible to render Sky Entity with image using aframe-react.

maxkrieger commented 8 years ago

Try changing your image src string to url(myimage.png). I think that sort of thing should be noted somewhere in the docs as it drove me a little nuts too :stuck_out_tongue:

whatifif commented 8 years ago

Yes, you are right.

The image url should be url(${img-url}) if img-url is variable. is template quote.