Hiyve Components - v1.0.0
    Preparing search index...

    Props for MusicGames.

    interface MusicGamesProps {
        background?: string;
        cardColors?: Partial<GameColors>;
        collectionStore?: CollectionStore;
        colors?: Partial<MusicHubColors>;
        defaultLevel?: number;
        defaultPlaying?: string | null;
        defaultTopic?: PracticeTopicId | null;
        gameLabels?: Partial<MusicGameLabels>;
        games?: readonly MusicGameDef[];
        level?: number;
        lobbyLabels?: Partial<GameLobbyLabels>;
        mascot?: false | MascotName;
        onError?: (error: Error) => void;
        onLevelChange?: (level: Level) => void;
        onPlayingChange?: (id: string | null) => void;
        onResult?: (result: GameResult) => void;
        onSeedChange?: (seed: number) => void;
        onTopicChange?: (topic: PracticeTopicId | null) => void;
        player?: { id: string; name?: string };
        playing?: string | null;
        results?: readonly GameResult[];
        resultStore?: ResultStore;
        retryUntilRight?: boolean;
        samples?: SampleSource;
        seed?: number;
        showInstructionsFirst?: boolean;
        sounds?: boolean;
        sx?: SxProps<Theme>;
        topic?: PracticeTopicId | null;
        topics?: readonly PracticeTopic[];
    }

    Hierarchy

    • Omit<MusicGameProps, "game" | "onBack" | "labels" | "colors">
      • MusicGamesProps
    Index

    Properties

    background?: string

    Behind the game: any CSS background (default: the game's colour glowing over a deep navy) — 'transparent' to show the host's own

    cardColors?: Partial<GameColors>

    The cards' colours in each game

    collectionStore?: CollectionStore

    Where what is won — a train's wagons, a sky, a band member, a potion — is collected

    colors?: Partial<MusicHubColors>

    The lobby's colours

    defaultLevel?: number

    The level to start on when the game keeps it (default: 1)

    defaultPlaying?: string | null

    The game to open on when the component keeps it (default: null, the lobby)

    defaultTopic?: PracticeTopicId | null

    The topic to start on when the game keeps it (default: null, its own cards)

    gameLabels?: Partial<MusicGameLabels>
    games?: readonly MusicGameDef[]

    Where an id is looked up (default: defaultMusicGames)

    level?: number

    The level played, 1 to the game's levels, when the host keeps it

    lobbyLabels?: Partial<GameLobbyLabels>
    mascot?: false | MascotName

    The face beside the lobby's title, or false for none (default: 'owl')

    onError?: (error: Error) => void
    onLevelChange?: (level: Level) => void

    Called when the player picks another level

    onPlayingChange?: (id: string | null) => void

    Called when a game is picked (its id) or left (null)

    onResult?: (result: GameResult) => void

    Called with each finished game's result

    onSeedChange?: (seed: number) => void

    Called with a new seed when the player asks for a new game

    onTopicChange?: (topic: PracticeTopicId | null) => void

    Called with null when the player goes back to the game's own cards (the topic chip's close button)

    player?: { id: string; name?: string }

    Who is playing, kept with each result

    playing?: string | null

    The id of the game being played, or null for the lobby, when the host keeps it

    results?: readonly GameResult[]

    Results to count each game's plays from in the lobby; read from resultStore when not given

    resultStore?: ResultStore

    Where each finished game's result is saved

    retryUntilRight?: boolean

    After a wrong answer, another go at the same card, where the game plays that way (default: true)

    samples?: SampleSource

    Recorded instrument samples for the notes, from a host you choose; without it a small built-in voice plays

    seed?: number

    The seed the game is dealt from, when the host keeps it; a new seed is a new game

    showInstructionsFirst?: boolean

    Open the how-to-play help before the first card (default: true)

    sounds?: boolean

    Sounds on (default: true)

    sx?: SxProps<Theme>
    topic?: PracticeTopicId | null

    The Practice topic whose cards it plays, or null for its own, when the host keeps it

    topics?: readonly PracticeTopic[]

    The topics a pointed game names (default: practiceTopics)