简体   繁体   English

AFRAME-叠加场景

[英]AFRAME - Overlay scene

I am trying to understand how I could create an overlay menu on top of an A-FRAME scene. 我试图了解如何在A-FRAME场景的顶部创建覆盖菜单。

This website illustrates really well what I am trying to do -> https://vr.with.in/ 这个网站很好地说明了我要做什么-> https://vr.with.in/

If you click on one of the tiles from the home menu, you will notice that the previous scene is put into background and additional information are put into foreground on top of a semi-transparent overlay. 如果从主菜单中单击其中一个图块,则会注意到前一个场景被置于背景中,其他信息被置于半透明叠加层之上的前景中。

It will be much appreciated if someone could take me in the right direction. 如果有人可以将我带往正确的方向,将不胜感激。 Cheers. 干杯。

When you click any item, a new entiy with the details is created closer to the camera. 单击任何项​​目时,都会在靠近相机的地方创建一个包含详细信息的新实体。

At the same time, you create a sphere around the camera, which imitates "putting" into background: 同时,您在摄影机周围创建一个球体,该球体将“放”入背景中:

<a-sphere id="overlay" radius="2" material="opacity:0.4; color: black; side: back"></a-sphere>

Check it out here . 在这里查看

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

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