-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add configurable loading screen. #3760
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
Conversation
96735eb to
3bf560c
Compare
ngokevin
left a comment
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.
- baseline unit test
src/core/scene/a-scene.js
Outdated
| writable: true | ||
| }, | ||
|
|
||
| setupLoader: { |
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.
Can place all the loader code in a module that exports functions setupLoader(sceneEl) to not pollute scope, not meant to be callable by user
src/core/scene/a-scene.js
Outdated
|
|
||
| setupLoader: { | ||
| value: function () { | ||
| var self = this; |
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.
a little daunting to read a web of instantiations that aren't used until later in various places. need to jump up/down the function to follow.
src/core/scene/a-scene.js
Outdated
| writable: true | ||
| }, | ||
|
|
||
| removeLoader: { |
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.
Can also free the created geometry/materials
|
@ngokevin This is ready to go:
|
|
I'd document the |
Description:
Loading screen to avoid blank screen while loading assets and scene render loop has not yet started. The loader animation doesn't require 60fps to mask main thread pauses.
The logic is a
pseudo-componentsince it has to initialize and render while the assets load.The title of the page is displayed above the loading indicator.
The color of the dots, background and style of the title bar are configurable.