@betorigami/games 1.22.6 → 1.22.8
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 +85 -40
- package/dist/index.mjs +729 -758
- package/package.json +2 -4
package/dist/index.d.ts
CHANGED
|
@@ -5669,14 +5669,20 @@ export declare const translations: {
|
|
|
5669
5669
|
};
|
|
5670
5670
|
export declare function getTranslation(key: TranslationKey, language?: Language, defaultValue?: string): string;
|
|
5671
5671
|
export interface GameHost {
|
|
5672
|
-
addController(controller:
|
|
5672
|
+
addController(controller: unknown): void;
|
|
5673
5673
|
}
|
|
5674
|
-
declare class
|
|
5675
|
-
private
|
|
5674
|
+
declare class HapticsController {
|
|
5675
|
+
private destroyed;
|
|
5676
|
+
private haptics;
|
|
5676
5677
|
constructor(host: GameHost);
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5678
|
+
private createHaptics;
|
|
5679
|
+
private trigger;
|
|
5680
|
+
destroy(): void;
|
|
5681
|
+
tap(): void;
|
|
5682
|
+
gemReveal(pitch: number): void;
|
|
5683
|
+
minesGemReveal(pitch: number): void;
|
|
5684
|
+
bombImpact(): void;
|
|
5685
|
+
winCelebration(): void;
|
|
5680
5686
|
}
|
|
5681
5687
|
declare enum WheelRiskLevel {
|
|
5682
5688
|
LOW_RISK = "LOW_RISK",
|
|
@@ -6005,19 +6011,66 @@ declare class HistoryController extends EventTarget {
|
|
|
6005
6011
|
loadClientSeed(): Promise<void>;
|
|
6006
6012
|
updateClientSeed(newSeed: string): void;
|
|
6007
6013
|
}
|
|
6008
|
-
export type
|
|
6014
|
+
export type SoundWaveform = "sine" | "triangle" | "sawtooth" | "square";
|
|
6015
|
+
export type SoundFilterType = "bandpass" | "lowpass" | "highpass";
|
|
6016
|
+
export type ToneGainDef = {
|
|
6017
|
+
envelope: "peak-decay";
|
|
6018
|
+
peak: number;
|
|
6019
|
+
decayTime: number;
|
|
6020
|
+
} | {
|
|
6021
|
+
envelope: "attack-decay";
|
|
6022
|
+
attackTime: number;
|
|
6023
|
+
peak: number;
|
|
6024
|
+
decayTime: number;
|
|
6025
|
+
} | {
|
|
6026
|
+
envelope: "delayed-attack-decay";
|
|
6027
|
+
holdTime: number;
|
|
6028
|
+
attackEndTime: number;
|
|
6029
|
+
peak: number;
|
|
6030
|
+
decayTime: number;
|
|
6031
|
+
};
|
|
6032
|
+
export type NoiseLayerDef = {
|
|
6033
|
+
kind: "noise";
|
|
6034
|
+
duration: number;
|
|
6035
|
+
decay: number;
|
|
6036
|
+
filterType: SoundFilterType;
|
|
6037
|
+
filterFreq: number;
|
|
6038
|
+
filterQ: number;
|
|
6039
|
+
gain: number;
|
|
6040
|
+
randomization: number;
|
|
6041
|
+
filterFreqEnd?: number;
|
|
6042
|
+
filterFreqRampTime?: number;
|
|
6043
|
+
};
|
|
6044
|
+
export type ToneLayerDef = {
|
|
6045
|
+
kind: "tone";
|
|
6046
|
+
waveform: SoundWaveform;
|
|
6047
|
+
frequency: number;
|
|
6048
|
+
frequencyEnd?: number;
|
|
6049
|
+
frequencyRampTime?: number;
|
|
6050
|
+
duration: number;
|
|
6051
|
+
gain: ToneGainDef;
|
|
6052
|
+
startOffset?: number;
|
|
6053
|
+
};
|
|
6054
|
+
export type SoundLayerDef = NoiseLayerDef | ToneLayerDef;
|
|
6055
|
+
export interface ResolvedSound {
|
|
6056
|
+
readonly layers: readonly SoundLayerDef[];
|
|
6057
|
+
readonly gainScale: number;
|
|
6058
|
+
}
|
|
6009
6059
|
interface GameHost$2 {
|
|
6010
|
-
|
|
6011
|
-
addController(controller: any): void;
|
|
6060
|
+
addController(controller: unknown): void;
|
|
6012
6061
|
}
|
|
6013
|
-
declare class
|
|
6014
|
-
private
|
|
6015
|
-
private muted;
|
|
6062
|
+
declare class SoundEffectsController {
|
|
6063
|
+
private destroyed;
|
|
6016
6064
|
private audioCtx;
|
|
6017
|
-
private
|
|
6018
|
-
private spriteMap;
|
|
6065
|
+
private volume;
|
|
6019
6066
|
constructor(host: GameHost$2);
|
|
6020
|
-
|
|
6067
|
+
setVolume(normalizedVolume: number): void;
|
|
6068
|
+
destroy(): void;
|
|
6069
|
+
play(sound: ResolvedSound): void;
|
|
6070
|
+
private ensureAudio;
|
|
6071
|
+
private renderLayers;
|
|
6072
|
+
private renderNoiseLayer;
|
|
6073
|
+
private renderToneLayer;
|
|
6021
6074
|
}
|
|
6022
6075
|
export type gameContextType = {
|
|
6023
6076
|
betAmount: string;
|
|
@@ -6045,9 +6098,9 @@ export type gameContextType = {
|
|
|
6045
6098
|
seasonTheme: SeasonTheme;
|
|
6046
6099
|
autobetNumberOfBets: number;
|
|
6047
6100
|
updateAutobetNumberOfBets: (numberOfBets: number) => void;
|
|
6048
|
-
|
|
6101
|
+
soundEffects?: SoundEffectsController;
|
|
6049
6102
|
historyController?: HistoryController;
|
|
6050
|
-
|
|
6103
|
+
haptics?: HapticsController;
|
|
6051
6104
|
lobbyUrl: string;
|
|
6052
6105
|
depositUrl?: string;
|
|
6053
6106
|
hasLoadedBalance: boolean;
|
|
@@ -6166,9 +6219,9 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
6166
6219
|
private publicKey;
|
|
6167
6220
|
private scale;
|
|
6168
6221
|
language: Language;
|
|
6169
|
-
private
|
|
6222
|
+
private _soundEffects;
|
|
6170
6223
|
private _historyController;
|
|
6171
|
-
private
|
|
6224
|
+
private _haptics;
|
|
6172
6225
|
private _resizeObserver;
|
|
6173
6226
|
private hasLoadedBalance;
|
|
6174
6227
|
protected _gameProvider: ContextProvider<typeof gameContext>;
|
|
@@ -6269,7 +6322,6 @@ declare abstract class GameComponent extends OrigamiElement {
|
|
|
6269
6322
|
protected hasPendingBet: boolean;
|
|
6270
6323
|
protected autobetInProgress: boolean;
|
|
6271
6324
|
protected autobetStopping: boolean;
|
|
6272
|
-
static soundsToPreload: string[];
|
|
6273
6325
|
static styles: import("lit").CSSResult[];
|
|
6274
6326
|
protected onBetAmountChange: (_oldBetAmount: string, _newBetAmount: string) => void;
|
|
6275
6327
|
private gameConsumer;
|
|
@@ -6292,7 +6344,7 @@ declare abstract class GameComponent extends OrigamiElement {
|
|
|
6292
6344
|
protected isPnLWithinLimits(autobetSettings: AutobetSettingsWithId, totalPnL: Big$1): boolean;
|
|
6293
6345
|
protected updateHistoryWithBet(betResult: BetResult): void;
|
|
6294
6346
|
protected showError(message: string): void;
|
|
6295
|
-
protected
|
|
6347
|
+
protected playWinFeedback(): void;
|
|
6296
6348
|
}
|
|
6297
6349
|
export interface DiceStartArgs extends BaseStartArgs {
|
|
6298
6350
|
language: Language;
|
|
@@ -6391,29 +6443,32 @@ export declare class KenoGame extends GameComponent {
|
|
|
6391
6443
|
private gameOver;
|
|
6392
6444
|
private payout;
|
|
6393
6445
|
private kenoRisk;
|
|
6394
|
-
private autoselectRunning;
|
|
6395
6446
|
private multiplier;
|
|
6396
|
-
private hadTilesBeforeAutopick;
|
|
6397
6447
|
private betId;
|
|
6398
6448
|
private showResetAnimation;
|
|
6399
6449
|
private _kenoManualEl?;
|
|
6400
6450
|
private _kenoAutoEl?;
|
|
6451
|
+
private get kenoEdge();
|
|
6401
6452
|
private getDisplayMultiplier;
|
|
6402
6453
|
get isToggleDisabled(): boolean;
|
|
6403
6454
|
get areInputsDisabled(): boolean;
|
|
6404
6455
|
get kenoApi(): KenoApi | MockKenoApi;
|
|
6405
6456
|
private _getGemPitchFromHits;
|
|
6457
|
+
private playGemRevealFeedback;
|
|
6458
|
+
private playLossGemRevealFeedback;
|
|
6459
|
+
private playAnimatedRevealFeedback;
|
|
6406
6460
|
kenoPlay(): Promise<void>;
|
|
6407
6461
|
private handleBetExecution;
|
|
6408
6462
|
addToHistory(multiplier: number, won: boolean, id: string): void;
|
|
6409
6463
|
protected executeAutobet(autobetSettings: AutobetSettingsWithId, currentBetAmount: string): Promise<GameBetResult>;
|
|
6410
6464
|
handleTileClick: (e: KenoTileClickEvent) => void;
|
|
6411
6465
|
handleRiskChange: (e: KenoRiskChangeEvent) => void;
|
|
6412
|
-
autoPick: () =>
|
|
6466
|
+
autoPick: () => void;
|
|
6413
6467
|
clearTable: () => void;
|
|
6414
6468
|
newGame: () => void;
|
|
6415
6469
|
render(): import("lit-html").TemplateResult<1>;
|
|
6416
6470
|
private getButton;
|
|
6471
|
+
private clickButton;
|
|
6417
6472
|
private isButtonDisabled;
|
|
6418
6473
|
private handleSpacebar;
|
|
6419
6474
|
private handleAutoPick;
|
|
@@ -6473,6 +6528,8 @@ export declare class LimboGame extends GameComponent {
|
|
|
6473
6528
|
private _limboAutoEl?;
|
|
6474
6529
|
get isToggleDisabled(): boolean;
|
|
6475
6530
|
get areInputsDisabled(): boolean;
|
|
6531
|
+
private getManualButton;
|
|
6532
|
+
private getAutobetButton;
|
|
6476
6533
|
get limboApi(): LimboApi | MockLimboApi;
|
|
6477
6534
|
limboPlay(): Promise<void>;
|
|
6478
6535
|
private handleBetExecution;
|
|
@@ -6621,10 +6678,11 @@ export declare class MinesGame extends GameComponent {
|
|
|
6621
6678
|
static styles: import("lit").CSSResult[];
|
|
6622
6679
|
private _minesManualEl?;
|
|
6623
6680
|
private _minesAutoEl?;
|
|
6681
|
+
private getButton;
|
|
6682
|
+
private clickButton;
|
|
6624
6683
|
private _playSound;
|
|
6625
6684
|
private _getGemPitchFromHits;
|
|
6626
|
-
private
|
|
6627
|
-
private _playBomb;
|
|
6685
|
+
private _playGem;
|
|
6628
6686
|
private authTokenWatcher;
|
|
6629
6687
|
get isToggleDisabled(): boolean;
|
|
6630
6688
|
get areInputsDisabled(): boolean;
|
|
@@ -6749,6 +6807,7 @@ export declare class PlinkoGame extends GameComponent {
|
|
|
6749
6807
|
private riskLevel;
|
|
6750
6808
|
private rowCount;
|
|
6751
6809
|
private ballsInFlight;
|
|
6810
|
+
private lastSubBassTime;
|
|
6752
6811
|
private pendingResultsByBetId;
|
|
6753
6812
|
private betQueue;
|
|
6754
6813
|
private _plinkoManualEl?;
|
|
@@ -6756,20 +6815,6 @@ export declare class PlinkoGame extends GameComponent {
|
|
|
6756
6815
|
private _plinkoContentEl?;
|
|
6757
6816
|
get isGameInProgress(): boolean;
|
|
6758
6817
|
get plinkoApi(): PlinkoApi | MockPlinkoApi;
|
|
6759
|
-
/**
|
|
6760
|
-
* Triggers haptic feedback with intensity proportional to the multiplier.
|
|
6761
|
-
*
|
|
6762
|
-
* The logic normalizes the multiplier to a 0-1 scale based on:
|
|
6763
|
-
* - Minimum: 1x (base multiplier, no win)
|
|
6764
|
-
* - Maximum: highest possible payout for current risk level
|
|
6765
|
-
*
|
|
6766
|
-
* This normalized value is then mapped to a haptic duration between:
|
|
6767
|
-
* - 40ms (weak, for low multipliers)
|
|
6768
|
-
* - 180ms (strong, for max multiplier)
|
|
6769
|
-
*
|
|
6770
|
-
* Result: Higher multipliers produce stronger/longer haptic feedback.
|
|
6771
|
-
*/
|
|
6772
|
-
private triggerBinHaptic;
|
|
6773
6818
|
constructor();
|
|
6774
6819
|
private get customBinColors();
|
|
6775
6820
|
get binMultipliers(): number[];
|