Skip to content

Commit fcaacaa

Browse files
committed
working
1 parent 510df87 commit fcaacaa

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
Volumetric Performance Toolbox
2-
=====
3-
4-
> How can artists create new live performances during the time of COVID-19? Volumetric Performance Toolbox empowers creators to perform from their own living spaces for a virtual audience. Movement artist Valencia James performed publicly with the Toolbox for the first time on September 24, 2020 in the Mozilla Hubs virtual social space. The project is a collaboration between Valencia James, Glowbox and Sorob Louie as part of Eyebeam’s Rapid Response for a Better Digital Future fellowship.
5-
6-
More information on the Volumetric Performance Toolbox here:
7-
8-
https://valenciajames.com/volumetric-performance/
9-
10-
https://www.glowbox.io/work/volumetric-performance/
11-
12-
This is a fork of the Depthkit.js project, it demonstrates visualizing HLS stream of a custom video texture.
13-
The custom texture is generate by this fork of AKVFX https://github.com/volumetricperformance/akvfx
14-
151
# Depthkit.js
162
[![Build Status](https://travis-ci.org/juniorxsound/DepthKit.js.svg?branch=master)](https://travis-ci.org/juniorxsound/DepthKit.js) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
173

examples/stream.html

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030
top: 0; left: 0;
3131
width: 20%;
3232
}
33+
#error {
34+
color: rgb(255, 80, 80);
35+
background-color: rgba(0,0,0,0.5);
36+
37+
width: 100%;
38+
39+
}
3340
</style>
3441
</head>
3542

@@ -45,8 +52,9 @@
4552

4653
<div id="info">
4754
Volumnetric Stream example, assumes HLS stream and stacked RGB+D textures
48-
</div>
55+
<div id="error"></div>
4956

57+
</div>
5058
<script>
5159

5260
//Some general Three.js components
@@ -58,9 +66,13 @@
5866
var depthkit;
5967
var dkstream;
6068

69+
function showError(err){
70+
document.getElementById("error").innerHTML = err;
71+
}
72+
6173
init();
6274

63-
function init() {
75+
async function init() {
6476

6577
//Setup renderer
6678
renderer = new THREE.WebGLRenderer();
@@ -87,17 +99,31 @@
8799
scene.add(gridHelper);
88100

89101
depthkit = new DepthkitStream();
102+
let url ;
103+
try {
104+
url = await fetch ("https://pv8hjtwzy1.execute-api.us-west-2.amazonaws.com/prod/");
105+
url = await url.text();
90106

91-
depthkit.load('https://stream.mux.com/Qv01KrOQC02xvM7yiYlcMQvpc74Tk01qkQs8pQMXnKIzAs.m3u8', 'points',
92-
dk => {
93-
dkstream = dk;
107+
} catch (error) {
108+
// show error
109+
showError( error.message );
94110

95-
//Add the character to the scene
96-
scene.add(dkstream);
111+
}
112+
113+
if(url !== "No steams were available")
114+
{
115+
depthkit.load(url, 'points',
116+
dk => {
117+
dkstream = dk;
97118

98-
},
99-
);
119+
//Add the character to the scene
120+
scene.add(dkstream);
100121

122+
},
123+
);
124+
}else{
125+
showError( "No steams were available" );
126+
}
101127
window.addEventListener( 'resize', onWindowResize, false );
102128

103129
render();

0 commit comments

Comments
 (0)