This commit is contained in:
buncccc 2025-04-14 16:39:31 +12:00
parent f19ce6219c
commit bca0869987
4 changed files with 5 additions and 18 deletions

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 1006689567576dc4ba3e610b5f29b209
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>three.js - kinect</title> <title>Holoprojection browser endpoint</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta <meta
name="viewport" name="viewport"
@ -26,6 +26,8 @@
type="video/mp4" type="video/mp4"
/> />
</video> </video>
<div id="main-scene-container"></div>
<canvas id="debugCanvas" width="512" height="256" />
<script type="importmap"> <script type="importmap">
{ {
@ -80,14 +82,7 @@
} }
function init() { function init() {
const container = document.createElement("div"); const container = document.getElementById("main-scene-container");
document.body.appendChild(container);
const info = document.createElement("div");
info.id = "info";
info.innerHTML =
'<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> - kinect';
document.body.appendChild(info);
camera = new THREE.PerspectiveCamera( camera = new THREE.PerspectiveCamera(
50, 50,
@ -265,6 +260,5 @@
</script> </script>
<canvas id="debugCanvas" width="512" height="256" />
</body> </body>
</html> </html>

View File

@ -55,7 +55,7 @@ void main() {
vec4 pos = vec4( vec4 pos = vec4(
( position.x / width - 0.5 )*boxSize, ( position.x / width - 0.5 )*boxSize,
( position.y / height - 0.5 )*boxSize, ( position.y / height - 0.5 )*boxSize,
(-1.0)*z*boxSize*0.5, // we applied a (-1.0) multiplier to try to flip element [2,2] z*boxSize*0.5, // we had applied a (-1.0) multiplier to try to flip element [2,2]
1.0); 1.0);
//vec4 pos2 = pos; //vec4 pos2 = pos;
vec4 pos2 = c2wm * pos; vec4 pos2 = c2wm * pos;