vasturiano / 3d-force-graph-vr

3D force-directed graph component in VR
https://vasturiano.github.io/3d-force-graph-vr/example/large-graph/
MIT License
214 stars 51 forks source link

Adding a video behind the graph #23

Closed malani-art closed 2 years ago

malani-art commented 2 years ago

Hey! I believe this should be a quick question, simple solution, but I can't seem to add a video BEHIND the graph/a background video.

My code in Graph.js:

// Display
  width={width}
  height={height}
  backgroundColor={"#background-video"}
  showNavInfo={false}

In style.scss:

background-video {

width: 100vw;
height: 100vh;
object-fit: cover;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: -1;

Despite making it backgroundColor and z-index -1, the video still appears in front of the graph.

Any ideas?

Thank you

vasturiano commented 2 years ago

@malani-art you'll probably want to make the globe component background transparent, like so:

backgroundColor="rgba(0,0,0,0)"
malani-art commented 2 years ago

@vasturiano YES! It worked. Thank you!