displays ...">

How to create a spherical region with 180 degrees / hemisphere / segment / partial video in A-Frame?

<a-videosphere src="myvideo.mp4">displays the video on the entire 360-degree sphere, but I want to display the video or image, but only on part of the sphere, like a hemisphere. Sort of:


(from MathWorld - Wolfram web resource: wolfram.com )

How would I do this in A-Frame?

+5
source share
1 answer

You can use the geometry of the sphere ( <a-entity geometry="primitive: sphere">or <a-sphere>) and control the angles of the phiLength/thetaLengthsphere to indicate the segment. Theta length controls horizontal angular sweep, and phi length controls vertical angular sweep:


(source: mediabox.fr )

For the hemisphere, we would do:

<a-entity geometry="primitive: sphere; thetaLength: 180; radius: 5000; segmentsWidth: 64; segmentsHeight: 20" scale="1 1 -1" material="src: #myVideo; shader: flat"></a-entity>

Or:

<a-sphere theta-length="180">

.

:

<a-videosphere src="#myVideo" geometry="thetaLength: 180"></a-videosphere>

, . , , . , , background-size: cover, , , - , .

+5

Source: https://habr.com/ru/post/1650704/


All Articles