简体   繁体   English

在A框架中添加弹出文本

[英]Adding pop-up text in A-Frame

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 如何使用A框架在360度照片中添加文本当光标移至任何图标时,文本应该像弹出消息一样弹出文本

Example : consider that I am in kitchen when the cursor is goes to kitchen icon it should popup the text "kitchen" 例如 :当我将光标移到厨房图标上时,我应该在厨房里,它会弹出文本“ kitchen”

Thanks in advance! 提前致谢!

You can add an event listener to show text. 您可以添加事件侦听器以显示文本。

document.querySelector('#yourHotspot').addEventListener('mouseenter', function () {
  document.querySelector('#yourText').setAttribute('visible', true);
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM