Skip to content

Commit

Permalink
Fix the fade out logic when fade in has not happened
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Dec 24, 2023
1 parent 58b20df commit aa07425
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions example/src/FadeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class FadeManager {
const fadeState = this._fadeState;
if ( fadeState.has( object ) ) {

return;
return false;

}

Expand All @@ -166,6 +166,8 @@ export class FadeManager {

} );

return true;

}

completeFade( object ) {
Expand Down Expand Up @@ -203,10 +205,15 @@ export class FadeManager {

fadeOut( object ) {

this.guaranteeState( object );

const noState = this.guaranteeState( object );
const state = this._fadeState.get( object );
state.fadeOutTarget = 1;
if ( noState ) {

state.fadeInTarget = 1;
state.fadeIn = 1;

}

}

Expand Down

0 comments on commit aa07425

Please sign in to comment.