A-Frame “start experience” button

2019-08-30 01:43发布

问题:

I want to create a start experience like button on my A-Frame design. My experience needs to hide until you press a button and then it appears

回答1:

Two approaches:

1) Hide the a-frame scene until a html button is pressed

This one is simple. Bring a white <div> up front (by setting up a high z-index), and hide it (display: none) when a button is clicked.

Fiddle here.

2) Hide the experience content "in-game"

This one is a bit harder. Hide the a-camera within a white sphere with a button, and hide the sphere, when the button is clicked.

Fiddle here



标签: aframe