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

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

Issue 2696273002: Can more conveniently set easing from JS. (Closed)
Patch Set: 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ui.addAnimation(anim); 99 ui.addAnimation(anim);
100 anim = new api.Animation(this.elementId, ANIM_DURATION); 100 anim = new api.Animation(this.elementId, ANIM_DURATION);
101 anim.setSize(height * this.SCREEN_RATIO, height); 101 anim.setSize(height * this.SCREEN_RATIO, height);
102 anim.setEasing(new api.InEasing(2));
cjgrant 2017/02/16 14:51:47 Was this meant to be included?
tiborg 2017/02/16 17:30:49 Oops, no. Removed.
102 ui.addAnimation(anim); 103 ui.addAnimation(anim);
103 } 104 }
104 105
105 // TODO(crbug/643815): Add a method setting aspect ratio (and possible 106 // TODO(crbug/643815): Add a method setting aspect ratio (and possible
106 // animation of changing it). 107 // animation of changing it).
107 108
108 getElementId() { 109 getElementId() {
109 return this.elementId; 110 return this.elementId;
110 } 111 }
111 }; 112 };
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 nativeCommandHandler.handleCommand(dict); 950 nativeCommandHandler.handleCommand(dict);
950 } 951 }
951 952
952 return { 953 return {
953 initialize: initialize, 954 initialize: initialize,
954 command: command, 955 command: command,
955 }; 956 };
956 })(); 957 })();
957 958
958 window.addEventListener('load', vrShellUi.initialize); 959 window.addEventListener('load', vrShellUi.initialize);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698