0

How to add text in 360 degree photos using A-Frame The text should be like a popup message when the cursor goes to any icons it should popup the text

Example: consider that I am in kitchen when the cursor is goes to kitchen icon it should popup the text "kitchen"

Thanks in advance!

Chuva
  • 57
  • 2
  • 10
  • Possible duplicate of [How can I display text in A-Frame?](http://stackoverflow.com/questions/36276726/how-can-i-display-text-in-a-frame) – ngokevin Apr 12 '17 at 05:22

1 Answers1

0

You can add an event listener to show text.

document.querySelector('#yourHotspot').addEventListener('mouseenter', function () {
  document.querySelector('#yourText').setAttribute('visible', true);
});
ngokevin
  • 12,980
  • 2
  • 38
  • 84