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

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

Issue 2615613009: Put Scene class into scene namespace. (Closed)
Patch Set: Fix nit. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui_api.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js b/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
index d3a1f905eef6a08163228662e135b6c29dabd79c..00182e1162d1eb4a62270e15f5b5fd19a58a4b64 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui_scene.js
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var ui = new Object();
+var scene = {};
/**
- * The scene class assists in managing element and animations in the scene.
- * It allows scene update commands to be queued in batches, and manages
- * allocation of element and animation IDs.
+ * The scene class assists in managing element and animations in the UI. It
+ * allows UI update API commands to be queued in batches, and manages allocation
+ * of element and animation IDs.
*
* Examples:
*
- * var scene = new ui.Scene();
+ * var ui = new scene.Scene();
*
* // Add an element.
* var el = new api.UiElement(100, 200, 50, 50);
@@ -24,25 +24,25 @@ var ui = new Object();
* // Place it just below the content quad edge.
* el.setTranslation(0, -0.2, 0.0);
*
- * // Add it to the scene.
- * var buttonId = scene.addElement(el);
- * scene.flush();
+ * // Add it to the ui.
+ * var buttonId = ui.addElement(el);
+ * ui.flush();
*
* // Make the button twice as big.
* var update = new api.UiElementUpdate();
* update.setSize(bunttonWidth * 2, buttonHeight * 2);
- * scene.updateElement(buttonId, update);
- * scene.flush();
+ * ui.updateElement(buttonId, update);
+ * ui.flush();
*
* // Animate the button size back to its original size, over 250 ms.
* var resize = new api.Animation(buttonId, 250);
* resize.setSize(buttonWidth, buttonHeight);
- * scene.addAnimation(resize);
- * scene.flush();
+ * ui.addAnimation(resize);
+ * ui.flush();
*
* @struct
*/
-ui.Scene = class {
+scene.Scene = class {
constructor() {
/** @private {number} */
this.idIndex = 1;
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui_api.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698