Skip to content

textmode.js / loading / LoadingScreenOptions

Interface: LoadingScreenOptions

Options for configuring the loading screen.

Example

js
const tm = textmode.create({
 width: 800,
 height: 600,
 loadingScreen: {
   message: 'booting...',
 }
});

Properties

PropertyTypeDescription
message?stringMessage to display on the loading screen. Default is 'loading...'.
renderer?(context) => voidProvides a custom renderer function for the loading screen, overriding the default loading screen. The context parameter is a LoadingScreenRendererContext object.
tone?"auto" | "light" | "dark"Color tone of the loading screen. Can be 'auto', 'light', or 'dark'. Default is 'auto'.

Based on the background color the textmode.js canvas is rendered on, the loading screen will automatically choose a light or dark theme when set to 'auto'.
transition?"none" | "fade"Type of transition effect. Default is 'fade'.
transitionDuration?numberDuration of the transition effect in milliseconds. Default is 500ms.