summaryrefslogtreecommitdiff
path: root/modules/webxr/native/library_godot_webxr.js
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2021-01-25 08:35:26 -0600
committerDavid Snopek <dsnopek@gmail.com>2021-01-25 08:39:50 -0600
commit39e022e01c958e6fe56fe5220a146e4774333376 (patch)
treeeac241dd9f022dc3a0372c3fdc26cbc5c3dfd396 /modules/webxr/native/library_godot_webxr.js
parent161c4be9d21f4368e7c8c99b3ea2175c02963ee0 (diff)
Support mono devices in WebXR
Diffstat (limited to 'modules/webxr/native/library_godot_webxr.js')
-rw-r--r--modules/webxr/native/library_godot_webxr.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/webxr/native/library_godot_webxr.js b/modules/webxr/native/library_godot_webxr.js
index 3041c16c79..764656712d 100644
--- a/modules/webxr/native/library_godot_webxr.js
+++ b/modules/webxr/native/library_godot_webxr.js
@@ -394,6 +394,15 @@ const GodotWebXR = {
GodotWebXR.pauseResumeMainLoop();
},
+ godot_webxr_get_view_count__proxy: 'sync',
+ godot_webxr_get_view_count__sig: 'i',
+ godot_webxr_get_view_count: function () {
+ if (!GodotWebXR.session || !GodotWebXR.pose) {
+ return 0;
+ }
+ return GodotWebXR.pose.views.length;
+ },
+
godot_webxr_get_render_targetsize__proxy: 'sync',
godot_webxr_get_render_targetsize__sig: 'i',
godot_webxr_get_render_targetsize: function () {