@betorigami/games 0.7.7 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +9 -11
- package/dist/index.mjs +360 -349
- package/package.json +10 -3
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare class OrigamiElement extends LitElement {
|
|
|
29
29
|
emit<T extends string & keyof EventTypesWithoutRequiredDetail>(name: EventTypeDoesNotRequireDetail<T>, options?: SlEventInit<T> | undefined): GetCustomEventType<T>;
|
|
30
30
|
emit<T extends string & keyof EventTypesWithRequiredDetail>(name: EventTypeRequiresDetail<T>, options: SlEventInit<T>): GetCustomEventType<T>;
|
|
31
31
|
}
|
|
32
|
+
export type BaseSound = "bet" | "click" | "dice-roll" | "dice-tick" | "half-double" | "keno-clear" | "keno-gem" | "limbo-tick" | "mines-bomb" | "mines-gem" | "secondary" | "toggle" | "win";
|
|
32
33
|
export interface GameHost {
|
|
33
34
|
gameData: gameContextType;
|
|
34
35
|
addController(controller: any): void;
|
|
@@ -36,12 +37,11 @@ export interface GameHost {
|
|
|
36
37
|
declare class SoundController {
|
|
37
38
|
private host;
|
|
38
39
|
private muted;
|
|
39
|
-
private
|
|
40
|
+
private audioCtx;
|
|
41
|
+
private buffer;
|
|
40
42
|
constructor(host: GameHost);
|
|
41
|
-
preload(
|
|
42
|
-
play(
|
|
43
|
-
stop(): void;
|
|
44
|
-
pause(): void;
|
|
43
|
+
preload(_file: string): void;
|
|
44
|
+
play(soundKey: BaseSound, muted?: boolean, pitch?: number, volume?: number, onEndCallback?: () => void): Promise<AudioBufferSourceNode | void>;
|
|
45
45
|
}
|
|
46
46
|
export type gameContextType = {
|
|
47
47
|
amount: string;
|
|
@@ -57,6 +57,8 @@ export type gameContextType = {
|
|
|
57
57
|
hotkeysOpenEnabled: boolean;
|
|
58
58
|
volume: number;
|
|
59
59
|
instantBetEnabled: boolean;
|
|
60
|
+
mainWidth: number;
|
|
61
|
+
updateMainWidth: (width: number) => void;
|
|
60
62
|
updateHotkeysOpenEnabled: (enabled: boolean) => void;
|
|
61
63
|
updateVolume: (volume: number) => void;
|
|
62
64
|
updateInstantBetEnabled: (enabled: boolean) => void;
|
|
@@ -81,8 +83,8 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
81
83
|
private hotkeysOpenEnabled;
|
|
82
84
|
private volume;
|
|
83
85
|
private instantBetEnabled;
|
|
86
|
+
private mainWidth;
|
|
84
87
|
private _soundController;
|
|
85
|
-
firstUpdated(): void;
|
|
86
88
|
protected _gameProvider: ContextProvider<typeof gameContext>;
|
|
87
89
|
connectedCallback(): void;
|
|
88
90
|
updated(changedProperties: PropertyValues): void;
|
|
@@ -92,6 +94,7 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
92
94
|
updateVolume(volume: number): void;
|
|
93
95
|
updateInstantBetEnabled(enabled: boolean): void;
|
|
94
96
|
updateAutobetNumberOfBets(numberOfBets: number): void;
|
|
97
|
+
updateMainWidth(width: number): void;
|
|
95
98
|
updateBalance(newAmount: BigNumber): void;
|
|
96
99
|
render(): import("lit-html").TemplateResult<1>;
|
|
97
100
|
}
|
|
@@ -540,7 +543,6 @@ declare class MockDiceApi {
|
|
|
540
543
|
}>;
|
|
541
544
|
}
|
|
542
545
|
export declare class DiceGame extends GameComponent {
|
|
543
|
-
static soundsToPreload: string[];
|
|
544
546
|
private diceDirection;
|
|
545
547
|
private selectedValue;
|
|
546
548
|
private isManualPlaying;
|
|
@@ -578,7 +580,6 @@ declare class MockKenoApi {
|
|
|
578
580
|
}>;
|
|
579
581
|
}
|
|
580
582
|
export declare class KenoGame extends GameComponent {
|
|
581
|
-
static soundsToPreload: string[];
|
|
582
583
|
private isManualPlaying;
|
|
583
584
|
private history;
|
|
584
585
|
private selectedTiles;
|
|
@@ -621,7 +622,6 @@ declare class MockLimboApi {
|
|
|
621
622
|
}>;
|
|
622
623
|
}
|
|
623
624
|
export declare class LimboGame extends GameComponent {
|
|
624
|
-
static soundsToPreload: string[];
|
|
625
625
|
private targetMultiplier;
|
|
626
626
|
private resultMultiplier;
|
|
627
627
|
private isManualPlaying;
|
|
@@ -634,7 +634,6 @@ export declare class LimboGame extends GameComponent {
|
|
|
634
634
|
get isToggleDisabled(): boolean;
|
|
635
635
|
get areInputsDisabled(): boolean;
|
|
636
636
|
get limboApi(): LimboApi | MockLimboApi;
|
|
637
|
-
firstUpdated(): void;
|
|
638
637
|
limboPlay(): Promise<void>;
|
|
639
638
|
private handleBetExecution;
|
|
640
639
|
private isSpacebarDisabled;
|
|
@@ -697,7 +696,6 @@ declare class MockMinesApi {
|
|
|
697
696
|
}>;
|
|
698
697
|
}
|
|
699
698
|
export declare class MinesGame extends GameComponent {
|
|
700
|
-
static soundsToPreload: string[];
|
|
701
699
|
private minesCount;
|
|
702
700
|
private autobetSelectedTiles;
|
|
703
701
|
private minesData;
|