Chromium Code Reviews| Index: chrome/browser/resources/vr_shell/vr_shell_ui.js |
| diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.js b/chrome/browser/resources/vr_shell/vr_shell_ui.js |
| index 7203c2c9dbe58c76c98e1f4aa737e4ffca505a28..ff7398e208fb94854035f4fd376f4678ceee5f16 100644 |
| --- a/chrome/browser/resources/vr_shell/vr_shell_ui.js |
| +++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js |
| @@ -57,6 +57,7 @@ var vrShellUi = (function() { |
| this.fullscreen = false; |
| let element = new api.UiElement(0, 0, 0, 0); |
| + element.setName('Content'); |
| element.setFill(new api.Content()); |
| element.setVisible(false); |
| element.setSize( |
| @@ -69,6 +70,7 @@ var vrShellUi = (function() { |
| // quad, to keep the reticle roughly planar with the content if near |
| // content. |
| let backPlane = new api.UiElement(0, 0, 0, 0); |
| + backPlane.setName('Content backing'); |
| backPlane.setSize(1000, 1000); |
| backPlane.setTranslation(0, 0, -0.01); |
| backPlane.setParentId(this.elementId); |
| @@ -204,6 +206,7 @@ var vrShellUi = (function() { |
| this.rotationX, this.rotationY, this.rotationZ, 2 * Math.PI); |
| } |
| + element.setName(domId); |
| this.id = ui.addElement(element); |
| this.domElement = domElement; |
| } |
| @@ -219,6 +222,7 @@ var vrShellUi = (function() { |
| // Create an invisible parent, from which the button will hover. |
| let backing = new api.UiElement(0, 0, 0, 0); |
| + backing.setName(domId + '-backing'); |
| backing.setParentId(parentId); |
| backing.setVisible(false); |
| this.backingElementId = ui.addElement(backing); |
| @@ -294,6 +298,7 @@ var vrShellUi = (function() { |
| this.enabled = false; |
| let backing = new api.UiElement(0, 0, 0, 0); |
| + backing.setName('Navigation indicator backing'); |
| backing.setVisible(false); |
| backing.setTranslation(0, 0, -BACKING_DISTANCE); |
| backing.setLockToFieldOfView(true); |
| @@ -418,6 +423,7 @@ var vrShellUi = (function() { |
| /** @const */ var BUTTON_SPACING = 0.14; |
| let controls = new api.UiElement(0, 0, 0, 0); |
| + controls.setName('Controls'); |
| controls.setVisible(false); |
| controls.setTranslation(0, BUTTON_Y, BUTTON_Z); |
| this.controlsId = ui.addElement(controls); |
| @@ -735,7 +741,8 @@ var vrShellUi = (function() { |
| {r: 0.1, g: 0.1, b: 0.1, a: 1.0}; |
| // Make ground plane. |
| - let groundPlane = new api.UiElementUpdate(); |
| + let groundPlane = new api.UiElement(); |
|
tiborg
2017/03/24 22:03:06
Why make these UiElements? They don't show a sprit
cjgrant
2017/03/27 14:03:22
UiElement is meant to be passed to ui.addElement()
tiborg
2017/03/27 14:55:07
As discussed offline, let's move this change to a
|
| + groundPlane.setName('Ground plane'); |
| groundPlane.setVisible(true); |
| groundPlane.setSize(this.SCENE_GROUND_SIZE, this.SCENE_GROUND_SIZE); |
| groundPlane.setFill( |
| @@ -746,7 +753,8 @@ var vrShellUi = (function() { |
| this.groundPlaneId = ui.addElement(groundPlane); |
| // Make ceiling plane. |
| - let ceilingPlane = new api.UiElementUpdate(); |
| + let ceilingPlane = new api.UiElement(); |
| + ceilingPlane.setName('Ceiling'); |
| ceilingPlane.setVisible(true); |
| ceilingPlane.setSize(this.SCENE_GROUND_SIZE, this.SCENE_GROUND_SIZE); |
| ceilingPlane.setFill( |
| @@ -757,7 +765,8 @@ var vrShellUi = (function() { |
| this.ceilingPlaneId = ui.addElement(ceilingPlane); |
| // Ground grid. |
| - let groundGrid = new api.UiElementUpdate(); |
| + let groundGrid = new api.UiElement(); |
| + groundGrid.setName('Ground grid'); |
| groundGrid.setVisible(true); |
| groundGrid.setSize(this.SCENE_GROUND_SIZE, this.SCENE_GROUND_SIZE); |
| let transparentHorizonColor = { |