Reputation: 149
I'm just playing around with the 360° image gallery: https://aframe.io/examples/showcase/360-image-gallery/
How do I check which 360° image is currently active and display additional images?
Thanks in advance Thomas
Upvotes: 0
Views: 131
Reputation: 84
You can check what image is currently active by using this line of code:
document.querySelector("#image-360").getAttribute("material").src
This grabs the with id = "image-360", so we can check what kind of image is being used. The attribute "material" is AFrame's object that is attached to so that can change the source image, texture, color, opacity and a few more things.
Adding additional images would require you to create either or and apply a .setAttribute("src", or );
Upvotes: 2