Change the visibility of the image(A-frame/JS)

I want to manipulate an image element with JavaScript. I need to update the visibility setting of my image element based on the detection events of my target. The following format did not work when I used it.
const qr = document.getElementById(‘qrImage’)
qr.setAttribute(‘visible’, ‘true’)

Hi there!
That would be the way of hiding something in the 3D scene rather than the UI on top of it.
To do this for an image element in the UI it would need to be something like:

qr.style.display = 'none';

And from there is should work.

Hope this Helps!

4 Likes

Thanks! It’s worked.

2 Likes