| 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 vrShellUi = (function() { | 5 var vrShellUi = (function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 let ui = new scene.Scene(); | 8 let ui = new scene.Scene(); |
| 9 let uiManager; | 9 let uiManager; |
| 10 let nativeCommandHandler; | 10 let nativeCommandHandler; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 y = this.MENU_MODE_SCREEN_ELEVATION; | 102 y = this.MENU_MODE_SCREEN_ELEVATION; |
| 103 distance = this.MENU_MODE_SCREEN_DISTANCE; | 103 distance = this.MENU_MODE_SCREEN_DISTANCE; |
| 104 height = this.MENU_MODE_SCREEN_HEIGHT; | 104 height = this.MENU_MODE_SCREEN_HEIGHT; |
| 105 } else if (this.fullscreen) { | 105 } else if (this.fullscreen) { |
| 106 distance = this.FULLSCREEN_DISTANCE; | 106 distance = this.FULLSCREEN_DISTANCE; |
| 107 } | 107 } |
| 108 | 108 |
| 109 let anim; | 109 let anim; |
| 110 anim = new api.Animation(this.elementId, ANIM_DURATION); | 110 anim = new api.Animation(this.elementId, ANIM_DURATION); |
| 111 anim.setTranslation(0, y, -distance); | 111 anim.setTranslation(0, y, -distance); |
| 112 anim.setEasing(new api.InOutEasing()); |
| 112 ui.addAnimation(anim); | 113 ui.addAnimation(anim); |
| 113 anim = new api.Animation(this.elementId, ANIM_DURATION); | 114 anim = new api.Animation(this.elementId, ANIM_DURATION); |
| 114 anim.setSize(height * this.SCREEN_RATIO, height); | 115 anim.setSize(height * this.SCREEN_RATIO, height); |
| 116 anim.setEasing(new api.InOutEasing()); |
| 115 ui.addAnimation(anim); | 117 ui.addAnimation(anim); |
| 116 | 118 |
| 117 ui.setBackgroundDistance(distance * this.BACKGROUND_DISTANCE_MULTIPLIER); | 119 ui.setBackgroundDistance(distance * this.BACKGROUND_DISTANCE_MULTIPLIER); |
| 118 } | 120 } |
| 119 | 121 |
| 120 // TODO(crbug/643815): Add a method setting aspect ratio (and possible | 122 // TODO(crbug/643815): Add a method setting aspect ratio (and possible |
| 121 // animation of changing it). | 123 // animation of changing it). |
| 122 | 124 |
| 123 getElementId() { | 125 getElementId() { |
| 124 return this.elementId; | 126 return this.elementId; |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 nativeCommandHandler.handleCommand(dict); | 968 nativeCommandHandler.handleCommand(dict); |
| 967 } | 969 } |
| 968 | 970 |
| 969 return { | 971 return { |
| 970 initialize: initialize, | 972 initialize: initialize, |
| 971 command: command, | 973 command: command, |
| 972 }; | 974 }; |
| 973 })(); | 975 })(); |
| 974 | 976 |
| 975 window.addEventListener('load', vrShellUi.initialize); | 977 window.addEventListener('load', vrShellUi.initialize); |
| OLD | NEW |