We’ve finally managed to et around to implementing our onboarding screens using Hype 3 to our ionic doc. We’ve managed to integrate Hype 3 and Ionic, which now works well.
We have a number of apps which will use different onboarding screens and we wanted to keep the onboarding code as simple as possible.
We switch between screens using swipe rights and lefts.
Rather than coding specific screens to go to, we use showNextScreen() and showPreviousScreen(). This means we can create our onboarding screens in Hype 3 and simply drop them (literally) into the right folder and when the app starts up, it has no need to know the names of the screens as it simply follows the screens in order. Very simple and easy.
However the default transition duration for kSceneTransitionPushRightToLeft when using
is 1.1 sec which is too slow for us.
The docs for HYPEDocument.showNextScene() show a transition type but NOT a transition duration. If we choose the specific scene we can set a duration
HYPEDocument.showSceneNamed('SCENE NAME' , HYPEDocument.kSceneTransitionPushRightToLeft , 0.5);
We have got around the problem by creating a small circular queue and indexing around it to get the scene name explicitly and then we can set the duration.
It seems to us that the addition of the duration parameter to showNextScene() and showPreviousScene would be a useful thing to have. Its an enhancement but would make things a little easier as well as consistent with the showSceneNamed() function