From bd95a7733108a9179adca9a15dc34b2d5cbff721 Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Wed, 24 Jan 2024 22:45:56 +0000 Subject: [PATCH 1/4] Add body tracking sample --- proposals/body-tracking.html | 182 +++++++++++++++++++++++++++++++++++ proposals/index.html | 3 + 2 files changed, 185 insertions(+) create mode 100644 proposals/body-tracking.html diff --git a/proposals/body-tracking.html b/proposals/body-tracking.html new file mode 100644 index 000000000..b148a4641 --- /dev/null +++ b/proposals/body-tracking.html @@ -0,0 +1,182 @@ + + + + + + + + + + + AR Plane Detection + + + + + +
+
+ Simple body tracking + This sample demonstrates using the WebXR body tracking API + to show your body's joints. +

+ + Back +

+
+
+ + + + diff --git a/proposals/index.html b/proposals/index.html index 3745bcd70..d317f19bd 100644 --- a/proposals/index.html +++ b/proposals/index.html @@ -132,6 +132,9 @@

Proposals

description: 'Demonstrates use of the mesh detection API in an immersive-ar session. ' + 'Implements JavaScript-level hit-test on the meshes and leverages the Anchors API.' }, + { title: 'Body tracking', category: 'AR', + path: 'body-tracking.html', + description: 'Demonstrates use of the body tracking in an immersive-ar session. ' }, ]; let mainElement = document.getElementById("main"); From 795d0cc0b4f083ae00ec881d3661636667e3cd8b Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Fri, 9 Feb 2024 00:28:04 +0000 Subject: [PATCH 2/4] rev three.js version --- proposals/body-tracking.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proposals/body-tracking.html b/proposals/body-tracking.html index b148a4641..bc0e2502f 100644 --- a/proposals/body-tracking.html +++ b/proposals/body-tracking.html @@ -32,7 +32,7 @@ // https://github.com/mrdoob/three.js/blob/master/LICENSE - import * as THREE from 'https://unpkg.com/three@0.160.0/build/three.module.js'; + import * as THREE from 'https://unpkg.com/three@0.161.0/build/three.module.js'; import {WebXRButton} from '../js/util/webxr-button.js'; import {hitTest, filterHitTestResults} from '../js/hit-test.js'; @@ -110,7 +110,6 @@ xrButton.setSession(null); renderer.setAnimationLoop(null); - renderer.xr.setSession(null) } function onWindowResize() { From edca99cba43f550154dc51ec549c397beb1383f5 Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Wed, 28 Aug 2024 22:55:11 +0000 Subject: [PATCH 3/4] make body tracking work in unbounded space --- proposals/body-tracking.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/body-tracking.html b/proposals/body-tracking.html index bc0e2502f..d56c77dfe 100644 --- a/proposals/body-tracking.html +++ b/proposals/body-tracking.html @@ -85,7 +85,7 @@ function onRequestSession() { let sessionInit = { requiredFeatures: ['body-tracking'], - optionalFeatures: ['local-floor', 'bounded-floor'], + optionalFeatures: ['local-floor', 'bounded-floor', 'unbounded'], }; navigator.xr.requestSession('immersive-ar', sessionInit).then((session) => { session.mode = 'immersive-ar'; From 7d42832f94eff0522a423ef73fc275c367d4d0d2 Mon Sep 17 00:00:00 2001 From: Rik Cabanier Date: Mon, 9 Sep 2024 17:25:29 +0000 Subject: [PATCH 4/4] add basic skeleton --- proposals/body-tracking.html | 146 +++++++++++++++++++++++++---------- 1 file changed, 105 insertions(+), 41 deletions(-) diff --git a/proposals/body-tracking.html b/proposals/body-tracking.html index d56c77dfe..536e51154 100644 --- a/proposals/body-tracking.html +++ b/proposals/body-tracking.html @@ -26,40 +26,81 @@ + +