| 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 = {}; | 5 var api = {}; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Enumeration of scene update commands. | 8 * Enumeration of scene update commands. |
| 9 * @enum {number} | 9 * @enum {number} |
| 10 * @const | 10 * @const |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 /** | 331 /** |
| 332 * Enumeration of easing type. | 332 * Enumeration of easing type. |
| 333 * @enum {number} | 333 * @enum {number} |
| 334 * @const | 334 * @const |
| 335 */ | 335 */ |
| 336 api.EasingType = { | 336 api.EasingType = { |
| 337 'LINEAR': 0, | 337 'LINEAR': 0, |
| 338 'CUBICBEZIER': 1, | 338 'CUBICBEZIER': 1, |
| 339 'EASEIN': 2, | 339 'EASEIN': 2, |
| 340 'EASEOUT': 3 | 340 'EASEOUT': 3, |
| 341 'EASEINOUT': 4 |
| 341 }; | 342 }; |
| 342 | 343 |
| 343 /** | 344 /** |
| 344 * Abstract easing base class. | 345 * Abstract easing base class. |
| 345 * @abstract | 346 * @abstract |
| 346 */ | 347 */ |
| 347 api.Easing = class { | 348 api.Easing = class { |
| 348 constructor(type) { | 349 constructor(type) { |
| 349 this.type = type; | 350 this.type = type; |
| 350 } | 351 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 373 } | 374 } |
| 374 } | 375 } |
| 375 | 376 |
| 376 api.OutEasing = class extends api.Easing { | 377 api.OutEasing = class extends api.Easing { |
| 377 constructor(pow) { | 378 constructor(pow) { |
| 378 super(api.EasingType.EASEOUT); | 379 super(api.EasingType.EASEOUT); |
| 379 this.pow = pow; | 380 this.pow = pow; |
| 380 } | 381 } |
| 381 } | 382 } |
| 382 | 383 |
| 384 api.InOutEasing = class extends api.Easing { |
| 385 constructor(pow) { |
| 386 super(api.EasingType.EASEINOUT); |
| 387 this.pow = pow; |
| 388 } |
| 389 } |
| 390 |
| 383 /** | 391 /** |
| 384 * Base animation class. An animation can vary only one object property. | 392 * Base animation class. An animation can vary only one object property. |
| 385 * @struct | 393 * @struct |
| 386 */ | 394 */ |
| 387 api.Animation = class { | 395 api.Animation = class { |
| 388 constructor(elementId, durationMs) { | 396 constructor(elementId, durationMs) { |
| 389 /** @private {number} */ | 397 /** @private {number} */ |
| 390 this.id = -1; | 398 this.id = -1; |
| 391 /** @private {number} */ | 399 /** @private {number} */ |
| 392 this.meshId = elementId; | 400 this.meshId = elementId; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 if ('updateTab' in dict) { | 622 if ('updateTab' in dict) { |
| 615 this.onUpdateTab(dict['updateTabs']); | 623 this.onUpdateTab(dict['updateTabs']); |
| 616 } | 624 } |
| 617 if ('removeTab' in dict) { | 625 if ('removeTab' in dict) { |
| 618 this.onRemoveTab(dict['removeTab']); | 626 this.onRemoveTab(dict['removeTab']); |
| 619 } | 627 } |
| 620 | 628 |
| 621 this.onCommandHandlerFinished() | 629 this.onCommandHandlerFinished() |
| 622 } | 630 } |
| 623 }; | 631 }; |
| OLD | NEW |