Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: chrome/browser/resources/vr_shell/vr_shell_ui_api.js

Issue 2433253002: Add passive and FOV-locked properties to UI elements. (Closed)
Patch Set: Add passive and FOV-locked properties to UI elements. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/vr_shell/vr_shell_ui_api.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
index 018972ccaf2c5f26f42f6162a2d85d8080b07aba..d1fdb00323078b387e35ae2a2e3749c15f56b100 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
@@ -162,6 +162,21 @@ var api = (function() {
setVisible(visible) {
this.visible = !!visible;
}
+
+ /**
+ * Passive implies that an element ignores input, even if visible.
+ */
+ setPassive(passive) {
+ this.passive = !!passive;
+ }
+
+ /**
+ * Causes an element to be rendered relative to the field of view, rather
+ * than the scene. Elements locked in this way should not have a parent.
+ */
+ setLockToFieldOfView(locked) {
+ this.lockToFov = !!locked;
+ }
};
/**
« chrome/browser/android/vr_shell/vr_shell.cc ('K') | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698