Background Image option instead of background color
Closed this issue · 1 comments
I have been trying to add a background image, instead of the default background color.
I have gone through some solutions but none of them worked, I have also looked into the React force graph in which you can access the current.scene
and then work your way from there.
However in this particular library it doesn't seem to work. Is it something I am doing wrong or is it just not possible in this library yet?
I found a workaround for this using AFRAME, for anyone who needs this functionality in the future here is the code that I have used.
var skyEl = document.querySelector('a-sky')
if(!skyEl){ skyEl = document.createElement('a-sky') scene.appendChild(skyEl) }
skyEl.setAttribute('id', 'image-360')
skyEl.setAttribute('radius', '2500')
skyEl.setAttribute('animation', 'property: rotation;from: 0 0 0; to: 0 360 0; dur: 500000; easing: linear; loop:true ');
skyEl.setAttribute('src', '#city')