Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | /**
* What a host hands a scene to draw it with, per skin family: the **family kit**. The host API is the same for every
* family (`createSelectScene(kit, …)` and its siblings); only the kit says which family draws the scene and with what
* (ADR 0001). A kit is loaded before the scene is made: the family view reads it, the scene session never does.
*
* - `built-in`: a Be-Music Skin (`@be-music/player-skin-sdk`) with the player's settings for it.
* - `lr2`: the LR2 skin for the screen.
* - `beatoraja`: one entry of a beatoraja theme, loaded (skin, textures, fonts, the player's options, the theme files).
*/
import type { LR2Skin } from '@be-music/skin-lr2';
import type { BeMusicEffectLevel, BeMusicSkin } from '@be-music/player-skin-sdk';
import type { BeatorajaSceneKit } from '../skin/beatoraja/scene-kit.ts';
// The beatoraja kit's loaded entry is the skin layer's (`loadBeatorajaSceneKit` loads it).
export type { BeatorajaSceneKit };
/** The screens of a play: select, decide, play and result. */
export type SceneKind = 'select' | 'decide' | 'play' | 'result';
/** The skin families: the built-in Be-Music Skins, LR2 skins and beatoraja skins. */
export type SceneFamily = 'built-in' | 'lr2' | 'beatoraja';
/** Which screen a scene is and which family draws it; the host's router and test hook read it. */
export interface SceneIdentity {
readonly kind: SceneKind;
readonly family: SceneFamily;
}
/** A Be-Music Skin, with the player's settings for it. */
export interface BuiltInKit {
readonly family: 'built-in';
readonly skin: BeMusicSkin;
/**
* The player's values for the skin's `settings`, by setting id. The view checks them against the skin's schema
* (`resolveBeMusicSkinSettings`) before drawing; the skin's defaults apply without them.
*/
readonly settings?: Readonly<Record<string, unknown>>;
/** How much motion the skin shows (entrance, outro, ambient); `'full'` without one. */
readonly effects?: BeMusicEffectLevel;
}
/** The LR2 skin for one screen. */
export interface LR2Kit {
readonly family: 'lr2';
readonly skin: LR2Skin;
}
/** The LR2 play skin, with the skin that draws invisible notes. */
export interface LR2PlayKit extends LR2Kit {
/**
* The 9-keys play skin whose `notes.note[3]` (the green wide note of LR2's POP layout) is drawn over each invisible
* note when they are shown; a flat green bar without it.
*/
readonly invisibleNoteSkin?: LR2Skin;
}
/** A beatoraja theme entry, loaded. */
export interface BeatorajaKit {
readonly family: 'beatoraja';
readonly kit: BeatorajaSceneKit;
}
/** What the select screen is drawn with. */
export type SelectKit = BuiltInKit | LR2Kit | BeatorajaKit;
/** What the decide screen is drawn with. */
export type DecideKit = BuiltInKit | LR2Kit | BeatorajaKit;
/** What the play screen is drawn with. */
export type PlayKit = BuiltInKit | LR2PlayKit | BeatorajaKit;
/** What the result screen is drawn with. */
export type ResultKit = BuiltInKit | LR2Kit | BeatorajaKit;
/** Any scene's kit. */
export type FamilyKit = SelectKit | DecideKit | PlayKit | ResultKit;
|