1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00

Make animations set their initial values immediately

Summary:
Currently, it takes one frame for animations to set their first value. For fading stuff in, that means it briefly appears at 100% opacity, then jumps to 0%, then fades in from there.

Instead, immediately tween to the initial value.

Test Plan: Comments in Pholio fade in nicely. Preview is still a janky pile of mess until D6267.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6268
This commit is contained in:
epriestley 2013-06-21 18:57:10 -07:00
parent 75fa580f3f
commit 07c113a0f3
2 changed files with 4 additions and 1 deletions

View file

@ -2442,7 +2442,7 @@ celerity_register_resource_map(array(
),
'javelin-fx' =>
array(
'uri' => '/res/c7cefec3/rsrc/externals/javelin/ext/fx/FX.js',
'uri' => '/res/23fb3d44/rsrc/externals/javelin/ext/fx/FX.js',
'type' => 'js',
'requires' =>
array(

View file

@ -87,6 +87,9 @@ JX.install('FX', {
this._interval = setInterval(
JX.bind(this, this._tween),
Math.round(1000 / this.getFps()));
// Immediately update to the initial values.
this._tween();
},
_tween: function() {