【问题标题】:How to add markers/hotspots in a-frame panaroma?如何在 a-frame panaroma 中添加标记/热点?
【发布时间】:2017-01-19 06:26:46
【问题描述】:

我正在尝试为 VR 体验寻找合适的 Web 框架,它应该可以在 PC 和手机上运行(我正在使用 ionic)。我尝试了许多基于 canvas/webGL 的工具,最后偶然发现了 aframe。我真的很喜欢这个,但我需要how to add markers to a panorama imageis it possible to toggle gyroscope on mobile devices 的帮助?

【问题讨论】:

标签: aframe


【解决方案1】:

文档中的指南有一个示例:

https://aframe.io/docs/0.4.0/guides/building-with-components.html

https://github.com/aframevr/360-image-gallery-boilerplate

在本例中,您放置平面。您将光标组件用于基于注视的光标。并在 mouseenter/mouseleave/click 上做一些事情。它使用了很多组件,但这就是它的样子:

        <a-entity class="link"
            geometry="primitive: plane; height: 1; width: 1"
            material="shader: flat; src: ${thumb}"
            event-set__1="_event: mousedown; scale: 1 1 1"
            event-set__2="_event: mouseup; scale: 1.2 1.2 1"
            event-set__3="_event: mouseenter; scale: 1.2 1.2 1"
            event-set__4="_event: mouseleave; scale: 1 1 1"
            set-image="on: click; target: #image-360; src: ${src}"
        </script>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-30
    • 2019-01-21
    • 1970-01-01
    • 2018-07-30
    相关资源
    最近更新 更多