Studio: Splash Screen
This project demonstrates how to create a tap-to-begin system with a loading screen, using state machines to manage transitions between asset loading, onboarding, and experience readiness. It also includes a simple rotating animation triggered after onboarding.
Components
start-screen
This component manages the loading and onboarding process, displaying a progress bar during asset loading and a “Tap to Begin” message once onboarding is ready. It transitions through three states: loading, onboarding, and experience-ready.
Functionality
When the start-screen component is added to an entity:
- Displays a loading progress indicator.
- Monitors asset loading progress using ecs.assets.getStatistics().
- Shows an onboarding message (“Tap to Begin”) after assets finish loading.
- Waits for user interaction (SCREEN_TOUCH_START or click) to transition to the experience-ready state.
- Dispatches a global experience-ready event to signal that the onboarding process is complete.
Schema
- progressText: ecs.eid - Reference to the progress text UI element.
- messageText: ecs.eid - Reference to the onboarding message UI element.
- beginMessage: ecs.string - Message displayed when onboarding is ready to begin (default: “Tap to begin”).
Code Highlight
example
This component listens for the global experience-ready event and starts a rotating animation when onboarding is complete.
Functionality
- Responds to the experience-ready event by initiating a rotation animation.
- Applies the animation to the associated entity with configurable parameters.
Code Highlight
Additional Features
- The loading screen dynamically updates progress as assets load.
- Onboarding is interactive, requiring user input to proceed.
- Smooth transition to the experience with a welcoming rotational effect.
Other Work by George Butler