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

Side by Side Diff: chrome/browser/resources/vr_shell/vr_shell_ui.js

Issue 2696293002: Adds in-out easing type. (Closed)
Patch Set: MakeUnique, default value, comments Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 y = this.MENU_MODE_SCREEN_ELEVATION; 89 y = this.MENU_MODE_SCREEN_ELEVATION;
90 z = -this.MENU_MODE_SCREEN_DISTANCE; 90 z = -this.MENU_MODE_SCREEN_DISTANCE;
91 height = this.MENU_MODE_SCREEN_HEIGHT; 91 height = this.MENU_MODE_SCREEN_HEIGHT;
92 } else if (this.fullscreen) { 92 } else if (this.fullscreen) {
93 z = -this.FULLSCREEN_DISTANCE; 93 z = -this.FULLSCREEN_DISTANCE;
94 } 94 }
95 95
96 let anim; 96 let anim;
97 anim = new api.Animation(this.elementId, ANIM_DURATION); 97 anim = new api.Animation(this.elementId, ANIM_DURATION);
98 anim.setTranslation(0, y, z); 98 anim.setTranslation(0, y, z);
99 anim.setEasing(new api.InOutEasing());
99 ui.addAnimation(anim); 100 ui.addAnimation(anim);
100 anim = new api.Animation(this.elementId, ANIM_DURATION); 101 anim = new api.Animation(this.elementId, ANIM_DURATION);
101 anim.setSize(height * this.SCREEN_RATIO, height); 102 anim.setSize(height * this.SCREEN_RATIO, height);
103 anim.setEasing(new api.InOutEasing());
102 ui.addAnimation(anim); 104 ui.addAnimation(anim);
103 } 105 }
104 106
105 // TODO(crbug/643815): Add a method setting aspect ratio (and possible 107 // TODO(crbug/643815): Add a method setting aspect ratio (and possible
106 // animation of changing it). 108 // animation of changing it).
107 109
108 getElementId() { 110 getElementId() {
109 return this.elementId; 111 return this.elementId;
110 } 112 }
111 }; 113 };
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 nativeCommandHandler.handleCommand(dict); 951 nativeCommandHandler.handleCommand(dict);
950 } 952 }
951 953
952 return { 954 return {
953 initialize: initialize, 955 initialize: initialize,
954 command: command, 956 command: command,
955 }; 957 };
956 })(); 958 })();
957 959
958 window.addEventListener('load', vrShellUi.initialize); 960 window.addEventListener('load', vrShellUi.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698