Open cohenerickson opened 1 year ago
Depending on what you want to accomplish, Ruffle provides a JS Boolean in the configuration object to toggle the splash screen entirely.
"splashScreen": true | false
and CSS variables available to customize the preloader background and logo display (which can technically be any background object)ruffle-player, ruffle-embed, ruffle-object { --splash-screen-background: #f2f6fa; --logo-display: block; }
Depending on what you want to accomplish, Ruffle provides a JS Boolean in the configuration object to toggle the splash screen entirely.
"splashScreen": true | false
and CSS variables available to customize the preloader background and logo display (which can technically be any background object)ruffle-player, ruffle-embed, ruffle-object { --splash-screen-background: #f2f6fa; --logo-display: block; }
I'm hoping to see something a bit more customizable, right now we are locked to just those 2 configuration options.
correct me if I'm wrong, but I thought the option to do custom splash screens is already filled by the options where you can completely hide ruffle's load screen as far as I can tell, that gives you absolute freedom in what takes it's place
can't get much more custom than 100% of it being custom
Overview
Some sites (such as the one I maintain) have or are looking to create custom loading screens in order to make the emulator blend into the theme of the website better, other game platforms such as Unity provide API's to easily create these screens however there isn't a system for this in Ruffle.
Some issues relating to this system: #875 #2302
Current System
Currently, this screen is hard coded into shadow-template.ts and requires one to modify this file and rebuild.
Proposed Solution
Add an options paramater to
<SourceAPI>.createPlayer()
that takes in a template for this screen. This alone won't allow for custom progress bars though, there will also have to be aonProgress
event that will allow the program to dynamically update the custom progress bar.