Skip to content

Commit 8a6fbba

Browse files
committed
Enabel webxr with html argument.
Check comments in `meshcat.html` for more info on how to use.
1 parent b56301e commit 8a6fbba

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

geometry/meshcat.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,30 @@
170170
make_connection(url, reconnect_ms);
171171
<!-- CONNECTION BLOCK END -->
172172

173+
const webxrMode = urlParams.get('webxr');
174+
if (webxrMode) {
175+
if (webxrMode === "vr") {
176+
viewer.handle_command({
177+
type: "enable_webxr",
178+
mode: "vr"
179+
});
180+
} else if (webxrMode === "ar") {
181+
viewer.handle_command({
182+
type: "enable_webxr",
183+
mode: "ar"
184+
});
185+
}
186+
}
187+
188+
const controllerMode = urlParams.get('controller');
189+
if (controllerMode === "on") {
190+
viewer.handle_command({
191+
type: "visualize_vr_controller"
192+
});
193+
}
194+
195+
196+
173197
</script>
174198

175199
<style>

tools/workspace/meshcat/repository.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def meshcat_repository(
1010
Updating this commit requires local testing; see
1111
drake/tools/workspace/meshcat/README.md for details.
1212
""",
13-
commit = "44eac463725f048c47debfe34d3f935d01aa6bac",
14-
sha256 = "7ac5e9fdcc407abb4770bad1cee849de939f1dc856ef38d601a1982abec68ac3", # noqa
13+
commit = "c788d692d62bf63408be3a127a6288c9845b4325",
14+
sha256 = "0ac908b62cc77fcb9b0fc9fa55e04eeee3eda3e94045e85ccef556cb0cb6271a", # noqa
1515
build_file = ":package.BUILD.bazel",
1616
mirrors = mirrors,
1717
)

0 commit comments

Comments
 (0)