-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start games without loading screen if assets are ready before half the fade-in #6025
Conversation
this.setPercent(100); | ||
|
||
const fadeInDuration = Math.min( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really struggling to understand this logic, had to read it multiple times.
Could we split each side of the Math.min into named variables like fadeInDurationIfShowingGDevelopSplash
and fadeInDurationIfUsingBackgroundColor
?
Also, I don't understand the Positive_infinity. Will this make a fade_in infinite if no splash or background color?
if ( | ||
remainingTime <= 0 || | ||
!this._isFirstLayout || | ||
(this._isWatermarkEnabled && totalElapsedTime < fadeInDuration / 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment explaining what we do here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.