| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var api = (function() { | 5 var api = (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Enumeration of scene update commands. | 9 * Enumeration of scene update commands. |
| 10 * @enum {number} | 10 * @enum {number} |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 this.xAnchoring = x; | 155 this.xAnchoring = x; |
| 156 this.yAnchoring = y; | 156 this.yAnchoring = y; |
| 157 } | 157 } |
| 158 | 158 |
| 159 /** | 159 /** |
| 160 * Visibility controls whether the element is rendered. | 160 * Visibility controls whether the element is rendered. |
| 161 */ | 161 */ |
| 162 setVisible(visible) { | 162 setVisible(visible) { |
| 163 this.visible = !!visible; | 163 this.visible = !!visible; |
| 164 } | 164 } |
| 165 |
| 166 /** |
| 167 * Passive implies that an element ignores input, even if visible. |
| 168 */ |
| 169 setPassive(passive) { |
| 170 this.passive = !!passive; |
| 171 } |
| 172 |
| 173 /** |
| 174 * Causes an element to be rendered relative to the field of view, rather |
| 175 * than the scene. Elements locked in this way should not have a parent. |
| 176 */ |
| 177 setLockToFieldOfView(locked) { |
| 178 this.lockToFov = !!locked; |
| 179 } |
| 165 }; | 180 }; |
| 166 | 181 |
| 167 /** | 182 /** |
| 168 * Represents a new UI element. This object builds on UiElementUpdate, | 183 * Represents a new UI element. This object builds on UiElementUpdate, |
| 169 * forcing the underlying texture coordinates to be specified. | 184 * forcing the underlying texture coordinates to be specified. |
| 170 */ | 185 */ |
| 171 class UiElement extends UiElementUpdate { | 186 class UiElement extends UiElementUpdate { |
| 172 /** | 187 /** |
| 173 * Constructor of UiElement. | 188 * Constructor of UiElement. |
| 174 * pixelX and pixelY values indicate the left upper corner; pixelWidth and | 189 * pixelX and pixelY values indicate the left upper corner; pixelWidth and |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 Action: Action, | 295 Action: Action, |
| 281 Mode: Mode, | 296 Mode: Mode, |
| 282 getContentElementId: getContentElementId, | 297 getContentElementId: getContentElementId, |
| 283 UiElement: UiElement, | 298 UiElement: UiElement, |
| 284 UiElementUpdate: UiElementUpdate, | 299 UiElementUpdate: UiElementUpdate, |
| 285 Animation: Animation, | 300 Animation: Animation, |
| 286 doAction: doAction, | 301 doAction: doAction, |
| 287 domLoaded: domLoaded, | 302 domLoaded: domLoaded, |
| 288 }; | 303 }; |
| 289 })(); | 304 })(); |
| OLD | NEW |