-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ScreenNavigator, StackScreenNavigator: added an experimental workarou…
…nd for the issue where the first few frames of a transition can be skipped. the full animation is now visible even on slow mobile devices.
- Loading branch information
1 parent
9c26e3c
commit b37b803
Showing
1 changed file
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b37b803
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.
Makes a big difference. Thanks!
b37b803
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.
But now sometimes an exception is thrown because item equals null in line 734 of BaseScreenNavigator.
b37b803
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 don't know how to reproduce that issue. Are you removing a screen? If so, when?
b37b803
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.
This commit causes my very first frame of stage3d drawing to be invisible. I was doing the trick where you draw a flash.display.Bitmap to the flash stage and then listen for Starling's Event.ROOT_CREATED to convert it into a starling.textures.Texture. The effect is a seamless transition from preloader image to the game's background image. With this commit there is exactly 1 frame of white flash while it waits for the ENTER_FRAME, which ruins the effect.
I could try and avoid the visibility toggle if I could set myScreenNavigator.transition = null, but if you try to set transition to null in ScreenNavigator it detects the null and assigns it defaultTransition() instead (which does nothing).
So there's not really a workaround for this right now other than to rollback to a previous commit.
b37b803
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.
Thanks. I'll see what I can do.
b37b803
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.
Okay, I just pushed some changes that should clear this up. If the transition is null, the ScreenNavigator won't wait for Event.ENTER_FRAME. There is no animation to optimize in that case, so it just shows the new screen instantly. That should once again allow for a preloader image while Starling initializes.
b37b803
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.
Works perfectly