現在、曲面画像に焦点を合わせると、その色が変わります。WebVR aframe.ioを使用して曲面画像をオーバーレイする
代わりに、アイコン、再生アイコンなどでオーバーレイしたいと思います。
これをどのように達成できますか?コードは以下の通りである:
HTML
<a-curvedimage id="vid1" material="opacity: 0" data-src="vid1.mp4" selectable height="2" radius="5.3" theta-length="32" position="0 2.2 -0" rotation="0 65 0" scale="0.7 0.7 0.7" src="#tile1">
</a-curvedimage>
JS
AFRAME.registerComponent('selectable', {
init: function() {
var el = this.el;
this.el.addEventListener('mouseenter', function (evt) {
this.setAttribute('material', 'color', 'blue');
});
this.el.addEventListener('mouseleave', function (evt) {
this.setAttribute('material', 'color', '');
});
});
}