Skip to content

Commit e62d5f5

Browse files
committed
Add layer-equirect example, stereo-top-bottom 360 video by default for now
1 parent 7439dc9 commit e62d5f5

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Compositor Equirect Layer Example • A-Frame</title>
6+
<meta name="description" content="Compositor Equirect Layer Example • A-Frame">
7+
<script src="../../../dist/aframe-master.js"></script>
8+
<script src="https://unpkg.com/[email protected]/dist/aframe-environment-component.min.js"></script>
9+
<script src="toggle-layer.js"></script>
10+
</head>
11+
<body>
12+
<a-scene>
13+
<a-assets>
14+
<!--
15+
SOURCE:
16+
https://immersive-web.github.io/webxr-samples/layers-samples/media-layer-sample.html
17+
stereo-top-bottom 360 4300x4300 30fps
18+
-->
19+
<video id="video" autoplay preload="auto" loop crossorigin="anonymous" width="4300" height="4300">
20+
<source src="https://oculus-mp4.s3.amazonaws.com/immersive+video+8K+for+Oculus+Browser/everestvr_4.3k_30s_360_h264_crf23_binaural_CREDIT_JON_GRIFFITH_injected.mp4">
21+
</video>
22+
23+
<!--
24+
SOURCE:
25+
https://immersive-web.github.io/webxr-samples/layers-samples/eqrt-video.html
26+
stereo-left-right 180 3840x1920 30fps
27+
-->
28+
<!--
29+
<video id="video" autoplay preload="auto" loop crossorigin="anonymous" width="3840" height="1920">
30+
<source src="https://d25a56pc18k0co.cloudfront.net/sloths_binaural_3840_180_3D-injected.mp4">
31+
</video>
32+
-->
33+
34+
<!--
35+
SOURCE:
36+
https://immersive-web.github.io/webxr-samples/layers-samples/eqrt-layer.html
37+
stereo-top-bottom 4k image
38+
-->
39+
<!--
40+
<img id="image" src="https://cdn.jsdelivr.net/gh/immersive-web/webxr-samples@main/media/textures/chess-pano-4k.png" />
41+
-->
42+
</a-assets>
43+
<a-entity
44+
layer="src: #video; type: stereo-top-bottom-equirect; is180: false"
45+
position="0 0 0"></a-entity>
46+
<a-entity id="leftHand" toggle-layer laser-controls="hand: left"></a-entity>
47+
<a-entity id="rightHand" toggle-layer laser-controls="hand: right"></a-entity>
48+
</a-scene>
49+
</body>
50+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* global AFRAME */
2+
AFRAME.registerComponent('toggle-layer', {
3+
init: function () {
4+
var layerEl = document.querySelector('[layer]');
5+
this.el.addEventListener('thumbstickdown', function () {
6+
layerEl.components.layer.toggleCompositorLayer();
7+
});
8+
}
9+
});

0 commit comments

Comments
 (0)