pixi-rainman-game-engine 0.2.2 → 0.2.4
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/ComponentRegistry/ComponentRegistry.d.ts +0 -17
- package/dist/ComponentRegistry/ComponentRegistry.js +0 -17
- package/dist/ComponentRegistry/types.d.ts +1 -1
- package/dist/Money/MoneyText.d.ts +0 -2
- package/dist/Money/MoneyText.js +0 -2
- package/dist/Rainman/Rainman.d.ts +0 -2
- package/dist/Rainman/Rainman.js +0 -2
- package/dist/Rainman/appConfig.d.ts +0 -1
- package/dist/Rainman/appConfig.js +1 -1
- package/dist/Rainman/types.d.ts +1 -0
- package/dist/application/ApiConfig/ApiConfig.d.ts +25 -43
- package/dist/application/ApiConfig/ApiConfig.js +25 -43
- package/dist/application/ApiConfig/SymbolId.d.ts +0 -5
- package/dist/application/ApiConfig/TransformationTypesId.d.ts +0 -4
- package/dist/application/ApiConfig/WinTypeId.d.ts +0 -4
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +11 -32
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +11 -32
- package/dist/application/SoundManager/SoundManager.d.ts +8 -18
- package/dist/application/SoundManager/SoundManager.js +8 -18
- package/dist/application/SoundManager/types.d.ts +2 -4
- package/dist/application/SoundManager/types.js +1 -2
- package/dist/application/SpeedState/SpeedLevelHandler.d.ts +2 -8
- package/dist/application/SpeedState/SpeedLevelHandler.js +2 -8
- package/dist/application/SpinLogic/SpinLogic.d.ts +0 -2
- package/dist/application/SpinLogic/SpinLogic.js +0 -2
- package/dist/application/SpinLogic/SpinLogicDTO.d.ts +4 -9
- package/dist/application/SpinLogic/SpinLogicDTO.js +4 -9
- package/dist/application/SpinLogic/WinScenarios.d.ts +1 -1
- package/dist/application/SpinLogic/WinScenarios.js +1 -1
- package/dist/application/SpinLogic/util.d.ts +13 -18
- package/dist/application/SpinLogic/util.js +13 -20
- package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.d.ts +1 -3
- package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.js +1 -3
- package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +19 -22
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +19 -22
- package/dist/components/GambleGame/GambleGame.d.ts +1 -3
- package/dist/components/GambleGame/GambleGame.js +1 -3
- package/dist/components/buttons/BaseButton/BaseButton.d.ts +1 -3
- package/dist/components/buttons/BaseButton/BaseButton.js +1 -3
- package/dist/components/buttons/BaseButton/ButtonState.d.ts +1 -1
- package/dist/components/buttons/BaseButton/ButtonState.js +1 -1
- package/dist/components/buttons/buttonGroups/LeftButtons.d.ts +1 -3
- package/dist/components/buttons/buttonGroups/LeftButtons.js +1 -3
- package/dist/components/buttons/buttonGroups/MiddleButtons.d.ts +0 -1
- package/dist/components/buttons/buttonGroups/MiddleButtons.js +0 -1
- package/dist/components/buttons/buttonGroups/RightButtons.d.ts +2 -3
- package/dist/components/buttons/buttonGroups/RightButtons.js +2 -3
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.d.ts +1 -1
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.js +1 -1
- package/dist/components/buttons/default/AutoplayButton.d.ts +2 -3
- package/dist/components/buttons/default/AutoplayButton.js +2 -3
- package/dist/components/buttons/default/BlackButton.d.ts +1 -2
- package/dist/components/buttons/default/BlackButton.js +1 -2
- package/dist/components/buttons/default/CollectButton.d.ts +2 -3
- package/dist/components/buttons/default/CollectButton.js +2 -3
- package/dist/components/buttons/default/InfoButton.d.ts +1 -1
- package/dist/components/buttons/default/InfoButton.js +1 -1
- package/dist/components/buttons/default/MoreButton.d.ts +1 -1
- package/dist/components/buttons/default/MoreButton.js +1 -1
- package/dist/components/buttons/default/NegButton.d.ts +1 -1
- package/dist/components/buttons/default/NegButton.js +1 -1
- package/dist/components/buttons/default/PlusButton.d.ts +1 -1
- package/dist/components/buttons/default/PlusButton.js +1 -1
- package/dist/components/buttons/default/RedButton.d.ts +1 -1
- package/dist/components/buttons/default/RedButton.js +1 -1
- package/dist/components/buttons/default/RefreshButton.d.ts +2 -1
- package/dist/components/buttons/default/RefreshButton.js +2 -1
- package/dist/components/buttons/default/SpeedControlButton.d.ts +1 -1
- package/dist/components/buttons/default/SpeedControlButton.js +1 -1
- package/dist/components/buttons/default/SpinConfirmationButton.d.ts +1 -0
- package/dist/components/buttons/default/SpinConfirmationButton.js +1 -0
- package/dist/components/buttons/default/VolumeButton.d.ts +1 -1
- package/dist/components/buttons/default/VolumeButton.js +1 -1
- package/dist/components/common/AnimatedBackground.d.ts +1 -5
- package/dist/components/common/AnimatedBackground.js +1 -5
- package/dist/components/common/Background.d.ts +3 -5
- package/dist/components/common/Background.js +3 -5
- package/dist/components/common/FreeSpinButton.d.ts +1 -3
- package/dist/components/common/FreeSpinButton.js +1 -3
- package/dist/components/common/Logo.d.ts +1 -3
- package/dist/components/common/Logo.js +1 -3
- package/dist/components/common/LogoStatic.d.ts +1 -3
- package/dist/components/common/LogoStatic.js +1 -3
- package/dist/components/common/ResumableContainers.d.ts +6 -6
- package/dist/components/common/ResumableContainers.js +6 -6
- package/dist/components/frame/AbstractColumnsContainer.d.ts +3 -9
- package/dist/components/frame/AbstractColumnsContainer.js +3 -9
- package/dist/components/frame/AbstractFrame.d.ts +6 -12
- package/dist/components/frame/AbstractFrame.js +6 -12
- package/dist/components/frame/AbstractInnerFrame.d.ts +1 -3
- package/dist/components/frame/AbstractInnerFrame.js +1 -3
- package/dist/components/frame/WinLineAnimation.d.ts +1 -3
- package/dist/components/frame/WinLineAnimation.js +1 -3
- package/dist/components/frame/constants.d.ts +7 -0
- package/dist/components/frame/constants.js +3 -0
- package/dist/components/frame/types.d.ts +4 -0
- package/dist/components/messageBox/MessageBox.d.ts +1 -3
- package/dist/components/messageBox/MessageBox.js +1 -3
- package/dist/components/symbols/AbstractSymbolBase.d.ts +1 -2
- package/dist/components/symbols/AbstractSymbolBase.js +1 -2
- package/dist/components/symbols/AbstractSymbolsColumn.d.ts +1 -3
- package/dist/components/symbols/AbstractSymbolsColumn.js +4 -5
- package/dist/components/symbols/DroppableSymbol.d.ts +0 -2
- package/dist/components/symbols/DroppableSymbol.js +0 -2
- package/dist/components/symbols/DroppableSymbolsColumn.d.ts +0 -2
- package/dist/components/symbols/DroppableSymbolsColumn.js +0 -2
- package/dist/components/symbols/types.d.ts +0 -1
- package/dist/components/symbols/types.js +0 -1
- package/dist/components/updatable/UpdatableTextComponent.d.ts +1 -3
- package/dist/components/updatable/UpdatableTextComponent.js +1 -3
- package/dist/components/updatable/UpdatableValueComponent.d.ts +1 -3
- package/dist/components/updatable/UpdatableValueComponent.js +1 -3
- package/dist/components/winLineIndicator/WinLineIndicator.d.ts +1 -3
- package/dist/components/winLineIndicator/WinLineIndicator.js +1 -3
- package/dist/connectivity/ConnectionWrapper.d.ts +1 -4
- package/dist/connectivity/ConnectionWrapper.js +1 -4
- package/dist/connectivity/LocalConnectionWrapper.d.ts +1 -1
- package/dist/connectivity/LocalConnectionWrapper.js +1 -1
- package/dist/connectivity/apiQueue.d.ts +2 -3
- package/dist/connectivity/apiQueue.js +2 -3
- package/dist/connectivity/wins.d.ts +0 -9
- package/dist/controllers/AbstractController.d.ts +27 -40
- package/dist/controllers/AbstractController.js +30 -41
- package/dist/controllers/QuickStopController.d.ts +1 -1
- package/dist/controllers/QuickStopController.js +1 -1
- package/dist/controllers/UiController.d.ts +2 -4
- package/dist/controllers/UiController.js +2 -4
- package/dist/loading/AbstractLoadingContainer.d.ts +1 -3
- package/dist/loading/AbstractLoadingContainer.js +1 -3
- package/dist/loading/ProgressiveLoader.d.ts +0 -2
- package/dist/loading/SpriteLoadingContainer.d.ts +1 -4
- package/dist/loading/SpriteLoadingContainer.js +1 -4
- package/dist/localStorage/localStorage.d.ts +0 -2
- package/dist/localStorage/localStorage.js +0 -2
- package/dist/stores/SettingsStore.d.ts +5 -10
- package/dist/stores/SettingsStore.js +5 -10
- package/dist/utils/assets/assetGetter.d.ts +10 -18
- package/dist/utils/assets/assetGetter.js +10 -18
- package/dist/utils/common/deviceOrientation.d.ts +1 -2
- package/dist/utils/common/deviceOrientation.js +1 -2
- package/dist/utils/common/functions.d.ts +7 -7
- package/dist/utils/common/functions.js +7 -7
- package/dist/utils/common/placementHelpers.d.ts +2 -3
- package/dist/utils/common/placementHelpers.js +4 -5
- package/dist/winComponents/AnimableParticlesEmitter.d.ts +1 -4
- package/dist/winComponents/AnimableParticlesEmitter.js +1 -4
- package/dist/winComponents/PositioningFrame.d.ts +1 -3
- package/dist/winComponents/PositioningFrame.js +1 -3
- package/dist/winComponents/UpdatableSpineContainer.d.ts +1 -3
- package/dist/winComponents/UpdatableSpineContainer.js +1 -3
- package/dist/winComponents/winFactory.d.ts +8 -9
- package/dist/winComponents/winFactory.js +8 -9
- package/package.json +3 -1
|
@@ -3,8 +3,6 @@ import { SpeedLevel } from "../application";
|
|
|
3
3
|
import { RegistryMap } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* Class for managing components in game
|
|
6
|
-
*
|
|
7
|
-
* @exports
|
|
8
6
|
* @class ComponentRegistry
|
|
9
7
|
*/
|
|
10
8
|
export declare class ComponentRegistry {
|
|
@@ -15,53 +13,45 @@ export declare class ComponentRegistry {
|
|
|
15
13
|
constructor(app: Application);
|
|
16
14
|
/**
|
|
17
15
|
* Method for changing temporarily speed for turbo spin
|
|
18
|
-
*
|
|
19
16
|
* @public
|
|
20
17
|
* @param {SpeedLevel} newSpeedLevel
|
|
21
18
|
*/
|
|
22
19
|
setTemporarySpeedLevel(newSpeedLevel: SpeedLevel): void;
|
|
23
20
|
/**
|
|
24
21
|
* Method for reverting speed level for turbo spin
|
|
25
|
-
*
|
|
26
22
|
* @public
|
|
27
23
|
*/
|
|
28
24
|
revertTemporarySpeedLevel(): void;
|
|
29
25
|
/**
|
|
30
26
|
* Setter fo speed level
|
|
31
|
-
*
|
|
32
27
|
* @public
|
|
33
28
|
* @param {SpeedLevel} newSpeedLevel
|
|
34
29
|
*/
|
|
35
30
|
setSpeedLevel(newSpeedLevel: SpeedLevel): void;
|
|
36
31
|
/**
|
|
37
32
|
* Setting the next available speed level
|
|
38
|
-
*
|
|
39
33
|
* @public
|
|
40
34
|
*/
|
|
41
35
|
nextSpeedLevel(): void;
|
|
42
36
|
/**
|
|
43
37
|
* Getter for current speed level
|
|
44
|
-
*
|
|
45
38
|
* @public
|
|
46
39
|
* @returns {SpeedLevel}
|
|
47
40
|
*/
|
|
48
41
|
getSpeedLevel(): SpeedLevel;
|
|
49
42
|
/**
|
|
50
43
|
* Setter for user activity time
|
|
51
|
-
*
|
|
52
44
|
* @public
|
|
53
45
|
*/
|
|
54
46
|
setUserActivityTime(): void;
|
|
55
47
|
/**
|
|
56
48
|
* Function for adding components into ComponentRegistry
|
|
57
|
-
*
|
|
58
49
|
* @public
|
|
59
50
|
* @param {Container} component
|
|
60
51
|
*/
|
|
61
52
|
add(component: Container): void;
|
|
62
53
|
/**
|
|
63
54
|
* Function for updating component that are in ComponentRegistry
|
|
64
|
-
*
|
|
65
55
|
* @public
|
|
66
56
|
* @param {Container} oldComponent
|
|
67
57
|
* @param {Container} newComponent
|
|
@@ -69,14 +59,12 @@ export declare class ComponentRegistry {
|
|
|
69
59
|
update(oldComponent: Container, newComponent: Container): void;
|
|
70
60
|
/**
|
|
71
61
|
* Function for removing components from Component Registry
|
|
72
|
-
*
|
|
73
62
|
* @public
|
|
74
63
|
* @param {Container} component
|
|
75
64
|
*/
|
|
76
65
|
remove(component: Container): void;
|
|
77
66
|
/**
|
|
78
67
|
* Function that adapt speed of all components
|
|
79
|
-
*
|
|
80
68
|
* @public
|
|
81
69
|
* @param {SpeedLevel} speedLevel
|
|
82
70
|
*/
|
|
@@ -84,7 +72,6 @@ export declare class ComponentRegistry {
|
|
|
84
72
|
/**
|
|
85
73
|
* Getter for components that are in ComponentRegistry
|
|
86
74
|
* Throws error if component is not present
|
|
87
|
-
*
|
|
88
75
|
* @public
|
|
89
76
|
* @template {keyof RegistryMap} T
|
|
90
77
|
* @param {T} componentName
|
|
@@ -93,7 +80,6 @@ export declare class ComponentRegistry {
|
|
|
93
80
|
get<T extends keyof RegistryMap>(componentName: T): RegistryMap[T];
|
|
94
81
|
/**
|
|
95
82
|
* Getter for existing components that are in ComponentRegistry
|
|
96
|
-
*
|
|
97
83
|
* @public
|
|
98
84
|
* @template {keyof RegistryMap} T
|
|
99
85
|
* @param {T} componentName
|
|
@@ -102,7 +88,6 @@ export declare class ComponentRegistry {
|
|
|
102
88
|
getIfExists<T extends keyof RegistryMap>(componentName: T): RegistryMap[T];
|
|
103
89
|
/**
|
|
104
90
|
* Helper function to check if the component is present in ComponentRegistry
|
|
105
|
-
*
|
|
106
91
|
* @public
|
|
107
92
|
* @template {keyof RegistryMap} T
|
|
108
93
|
* @param {T} componentName
|
|
@@ -111,14 +96,12 @@ export declare class ComponentRegistry {
|
|
|
111
96
|
has<T extends keyof RegistryMap>(componentName: T): boolean;
|
|
112
97
|
/**
|
|
113
98
|
* Function for adding components
|
|
114
|
-
*
|
|
115
99
|
* @public
|
|
116
100
|
* @param {Container[]} components
|
|
117
101
|
*/
|
|
118
102
|
addMany(components: Container[]): void;
|
|
119
103
|
/**
|
|
120
104
|
* Function for removing components
|
|
121
|
-
*
|
|
122
105
|
* @public
|
|
123
106
|
* @param {Container[]} components
|
|
124
107
|
*/
|
|
@@ -4,8 +4,6 @@ import { RainMan } from "../Rainman";
|
|
|
4
4
|
import { openFullscreen } from "../utils";
|
|
5
5
|
/**
|
|
6
6
|
* Class for managing components in game
|
|
7
|
-
*
|
|
8
|
-
* @exports
|
|
9
7
|
* @class ComponentRegistry
|
|
10
8
|
*/
|
|
11
9
|
export class ComponentRegistry {
|
|
@@ -22,7 +20,6 @@ export class ComponentRegistry {
|
|
|
22
20
|
}
|
|
23
21
|
/**
|
|
24
22
|
* Method for changing temporarily speed for turbo spin
|
|
25
|
-
*
|
|
26
23
|
* @public
|
|
27
24
|
* @param {SpeedLevel} newSpeedLevel
|
|
28
25
|
*/
|
|
@@ -32,7 +29,6 @@ export class ComponentRegistry {
|
|
|
32
29
|
}
|
|
33
30
|
/**
|
|
34
31
|
* Method for reverting speed level for turbo spin
|
|
35
|
-
*
|
|
36
32
|
* @public
|
|
37
33
|
*/
|
|
38
34
|
revertTemporarySpeedLevel() {
|
|
@@ -41,7 +37,6 @@ export class ComponentRegistry {
|
|
|
41
37
|
}
|
|
42
38
|
/**
|
|
43
39
|
* Setter fo speed level
|
|
44
|
-
*
|
|
45
40
|
* @public
|
|
46
41
|
* @param {SpeedLevel} newSpeedLevel
|
|
47
42
|
*/
|
|
@@ -53,7 +48,6 @@ export class ComponentRegistry {
|
|
|
53
48
|
}
|
|
54
49
|
/**
|
|
55
50
|
* Setting the next available speed level
|
|
56
|
-
*
|
|
57
51
|
* @public
|
|
58
52
|
*/
|
|
59
53
|
nextSpeedLevel() {
|
|
@@ -64,7 +58,6 @@ export class ComponentRegistry {
|
|
|
64
58
|
}
|
|
65
59
|
/**
|
|
66
60
|
* Getter for current speed level
|
|
67
|
-
*
|
|
68
61
|
* @public
|
|
69
62
|
* @returns {SpeedLevel}
|
|
70
63
|
*/
|
|
@@ -73,7 +66,6 @@ export class ComponentRegistry {
|
|
|
73
66
|
}
|
|
74
67
|
/**
|
|
75
68
|
* Setter for user activity time
|
|
76
|
-
*
|
|
77
69
|
* @public
|
|
78
70
|
*/
|
|
79
71
|
setUserActivityTime() {
|
|
@@ -81,7 +73,6 @@ export class ComponentRegistry {
|
|
|
81
73
|
}
|
|
82
74
|
/**
|
|
83
75
|
* Function for adding components into ComponentRegistry
|
|
84
|
-
*
|
|
85
76
|
* @public
|
|
86
77
|
* @param {Container} component
|
|
87
78
|
*/
|
|
@@ -103,7 +94,6 @@ export class ComponentRegistry {
|
|
|
103
94
|
}
|
|
104
95
|
/**
|
|
105
96
|
* Function for updating component that are in ComponentRegistry
|
|
106
|
-
*
|
|
107
97
|
* @public
|
|
108
98
|
* @param {Container} oldComponent
|
|
109
99
|
* @param {Container} newComponent
|
|
@@ -123,7 +113,6 @@ export class ComponentRegistry {
|
|
|
123
113
|
}
|
|
124
114
|
/**
|
|
125
115
|
* Function for removing components from Component Registry
|
|
126
|
-
*
|
|
127
116
|
* @public
|
|
128
117
|
* @param {Container} component
|
|
129
118
|
*/
|
|
@@ -133,7 +122,6 @@ export class ComponentRegistry {
|
|
|
133
122
|
}
|
|
134
123
|
/**
|
|
135
124
|
* Function that adapt speed of all components
|
|
136
|
-
*
|
|
137
125
|
* @public
|
|
138
126
|
* @param {SpeedLevel} speedLevel
|
|
139
127
|
*/
|
|
@@ -145,7 +133,6 @@ export class ComponentRegistry {
|
|
|
145
133
|
/**
|
|
146
134
|
* Getter for components that are in ComponentRegistry
|
|
147
135
|
* Throws error if component is not present
|
|
148
|
-
*
|
|
149
136
|
* @public
|
|
150
137
|
* @template {keyof RegistryMap} T
|
|
151
138
|
* @param {T} componentName
|
|
@@ -160,7 +147,6 @@ export class ComponentRegistry {
|
|
|
160
147
|
}
|
|
161
148
|
/**
|
|
162
149
|
* Getter for existing components that are in ComponentRegistry
|
|
163
|
-
*
|
|
164
150
|
* @public
|
|
165
151
|
* @template {keyof RegistryMap} T
|
|
166
152
|
* @param {T} componentName
|
|
@@ -172,7 +158,6 @@ export class ComponentRegistry {
|
|
|
172
158
|
}
|
|
173
159
|
/**
|
|
174
160
|
* Helper function to check if the component is present in ComponentRegistry
|
|
175
|
-
*
|
|
176
161
|
* @public
|
|
177
162
|
* @template {keyof RegistryMap} T
|
|
178
163
|
* @param {T} componentName
|
|
@@ -183,7 +168,6 @@ export class ComponentRegistry {
|
|
|
183
168
|
}
|
|
184
169
|
/**
|
|
185
170
|
* Function for adding components
|
|
186
|
-
*
|
|
187
171
|
* @public
|
|
188
172
|
* @param {Container[]} components
|
|
189
173
|
*/
|
|
@@ -194,7 +178,6 @@ export class ComponentRegistry {
|
|
|
194
178
|
}
|
|
195
179
|
/**
|
|
196
180
|
* Function for removing components
|
|
197
|
-
*
|
|
198
181
|
* @public
|
|
199
182
|
* @param {Container[]} components
|
|
200
183
|
*/
|
|
@@ -3,7 +3,7 @@ import { AbstractColumnsContainer, AbstractFrame, AbstractInnerFrame, AutoplayBu
|
|
|
3
3
|
* RegistryMap is a map of all components that are registered in the ComponentRegistry.
|
|
4
4
|
* It is used to type-check the components that are registered in the ComponentRegistry.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
*/
|
|
8
8
|
export interface RegistryMap {
|
|
9
9
|
[MessageBox.autoSpinTextRegistryName]: UpdatableValueComponent;
|
package/dist/Money/MoneyText.js
CHANGED
|
@@ -10,8 +10,6 @@ import { AppConfig, Globals, OptionalAppConfig, RequiredAppConfig } from "./type
|
|
|
10
10
|
* - {@link RequiredAppConfig} and {@link OptionalAppConfig}
|
|
11
11
|
* - {@link SymbolIds} present in `gameEngineConfig`
|
|
12
12
|
* - {@link WinTypeIds} present in `gameEngineConfig`
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
13
|
* @class RainMan
|
|
16
14
|
*/
|
|
17
15
|
export declare class RainMan {
|
package/dist/Rainman/Rainman.js
CHANGED
|
@@ -10,8 +10,6 @@ import { defaultAppConfig } from "./appConfig";
|
|
|
10
10
|
* - {@link RequiredAppConfig} and {@link OptionalAppConfig}
|
|
11
11
|
* - {@link SymbolIds} present in `gameEngineConfig`
|
|
12
12
|
* - {@link WinTypeIds} present in `gameEngineConfig`
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
13
|
* @class RainMan
|
|
16
14
|
*/
|
|
17
15
|
export class RainMan {
|
|
@@ -2,7 +2,6 @@ import { OptionalAppConfig } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* This object represents default object for pixi application
|
|
4
4
|
* Here you can specify the default font, color of text etc.
|
|
5
|
-
*
|
|
6
5
|
* @type {OptionalAppConfig}
|
|
7
6
|
*/
|
|
8
7
|
export declare const defaultAppConfig: OptionalAppConfig;
|
|
@@ -2,7 +2,6 @@ import { Color } from "pixi.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* This object represents default object for pixi application
|
|
4
4
|
* Here you can specify the default font, color of text etc.
|
|
5
|
-
*
|
|
6
5
|
* @type {OptionalAppConfig}
|
|
7
6
|
*/
|
|
8
7
|
export const defaultAppConfig = {
|
|
@@ -11,6 +10,7 @@ export const defaultAppConfig = {
|
|
|
11
10
|
idleTimeout: 10000,
|
|
12
11
|
fontSize: 35,
|
|
13
12
|
mobileFontSize: 45,
|
|
13
|
+
shouldSpeedUpMobileReels: false,
|
|
14
14
|
updatableSpineContainerFontSize: 50,
|
|
15
15
|
updatableTextValueColor: new Color(0xffffff).toHex(),
|
|
16
16
|
autoplayGlowColor: new Color(0xff3000).toNumber(),
|
package/dist/Rainman/types.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ import { TransformationTypeId } from "./TransformationTypesId";
|
|
|
5
5
|
import { WinTypeId } from "./WinTypeId";
|
|
6
6
|
/**
|
|
7
7
|
* Class representing config for connection to API
|
|
8
|
-
*
|
|
9
|
-
* @export
|
|
10
8
|
* @class ApiConfig
|
|
11
9
|
* @typedef {ApiConfig}
|
|
12
10
|
*/
|
|
@@ -20,126 +18,110 @@ export declare class ApiConfig {
|
|
|
20
18
|
extraData: InitExtraData;
|
|
21
19
|
/**
|
|
22
20
|
* Create instance of ApiConfig, requires InitDataInterface
|
|
23
|
-
*
|
|
24
|
-
* @param {InitDataInterface} data
|
|
21
|
+
* @param {InitDataInterface} data - initail data from backend
|
|
25
22
|
*/
|
|
26
23
|
constructor(data: InitDataInterface);
|
|
27
24
|
/**
|
|
28
25
|
* Function to generate metadata for a particular spin
|
|
29
|
-
*
|
|
30
26
|
* @public
|
|
31
|
-
* @param {SpinDataInterface} spinLogicResponse
|
|
32
|
-
* @returns AdaptedSpinResponse without results and standalone results, these should be created in each game
|
|
27
|
+
* @param {SpinDataInterface} spinLogicResponse - initial data from backend
|
|
28
|
+
* @returns {Omit<AdaptedSpinResponse, "results" | "standaloneTransformations">} AdaptedSpinResponse without results and standalone results, these should be created in each game
|
|
33
29
|
*/
|
|
34
30
|
generateMetadata(spinLogicResponse: SpinDataInterface): Omit<AdaptedSpinResponse, "results" | "standaloneTransformations">;
|
|
35
31
|
/**
|
|
36
32
|
* Getter for win line number
|
|
37
|
-
*
|
|
38
33
|
* @public
|
|
39
|
-
* @param winLineAnimationName
|
|
40
|
-
* @param defaultNumber
|
|
41
|
-
* @returns {string | number}
|
|
34
|
+
* @param {string} winLineAnimationName - name of win line
|
|
35
|
+
* @param {string} defaultNumber - default number if not found
|
|
36
|
+
* @returns {string | number} - number of win line
|
|
42
37
|
*/
|
|
43
38
|
getWinLineNumber(winLineAnimationName: string, defaultNumber?: string): number | string;
|
|
44
39
|
/**
|
|
45
40
|
* Function for getting next bet from config
|
|
46
|
-
*
|
|
47
41
|
* @public
|
|
48
42
|
* @param {number} currentBet current bet
|
|
49
|
-
* @returns {number}
|
|
43
|
+
* @returns {number} - next bet
|
|
50
44
|
*/
|
|
51
45
|
getNextBet(currentBet: number): number;
|
|
52
46
|
/**
|
|
53
47
|
* Function for getting previous bet from config
|
|
54
|
-
*
|
|
55
48
|
* @public
|
|
56
49
|
* @param {number} currentBet current bet
|
|
57
|
-
* @returns {number}
|
|
50
|
+
* @returns {number} - previous bet
|
|
58
51
|
*/
|
|
59
52
|
getPreviousBet(currentBet: number): number;
|
|
60
53
|
/**
|
|
61
54
|
* Getting first bet from config
|
|
62
55
|
* This functions is use for mechanic that getting the first available bet
|
|
63
|
-
*
|
|
64
56
|
* @public
|
|
65
|
-
* @returns {number}
|
|
57
|
+
* @returns {number} - first bet
|
|
66
58
|
*/
|
|
67
59
|
getFirstBet(): number;
|
|
68
60
|
/**
|
|
69
61
|
* Getting highest bet in config
|
|
70
|
-
*
|
|
71
62
|
* @public
|
|
72
|
-
* @param {number} [limit
|
|
73
|
-
* @returns {number}
|
|
63
|
+
* @param {number} [limit] limit for the biggest available bet
|
|
64
|
+
* @returns {number} - highest bet
|
|
74
65
|
*/
|
|
75
66
|
getHighestBet(limit?: number): number;
|
|
76
67
|
/**
|
|
77
68
|
* Mapper for symbolIds present in the game
|
|
78
|
-
*
|
|
79
69
|
* @public
|
|
80
70
|
* @param {number} backendSymbolId id from backend to map
|
|
81
|
-
* @returns {SymbolId}
|
|
71
|
+
* @returns {SymbolId} - symbol name
|
|
82
72
|
*/
|
|
83
73
|
getSymbolId(backendSymbolId: number): SymbolId;
|
|
84
74
|
/**
|
|
85
75
|
* Function that maps backend win id into more readable one
|
|
86
|
-
*
|
|
87
76
|
* @public
|
|
88
|
-
* @param {number} backendWinId
|
|
89
|
-
* @returns {WinTypeId}
|
|
77
|
+
* @param {number} backendWinId - win id from backend
|
|
78
|
+
* @returns {WinTypeId} - win type name
|
|
90
79
|
*/
|
|
91
80
|
getWinId(backendWinId: number): WinTypeId;
|
|
92
81
|
/**
|
|
93
82
|
* Function that maps backend win id into more readable one
|
|
94
|
-
*
|
|
95
83
|
* @public
|
|
96
|
-
* @param {number} transformationBackendId
|
|
97
|
-
* @returns {TransformationTypeId}
|
|
84
|
+
* @param {number} transformationBackendId - transformation id from backend
|
|
85
|
+
* @returns {TransformationTypeId} - transformation type name
|
|
98
86
|
*/
|
|
99
87
|
getTransformationById(transformationBackendId: number): TransformationTypeId;
|
|
100
88
|
/**
|
|
101
89
|
* Mapper for symbol ids into symbol names
|
|
102
|
-
*
|
|
103
90
|
* @public
|
|
104
|
-
* @param {number[][]} symbols_on_reels
|
|
105
|
-
* @returns {SymbolId[][]}
|
|
91
|
+
* @param {number[][]} symbols_on_reels - symbols on reels
|
|
92
|
+
* @returns {SymbolId[][]} - symbols on reels
|
|
106
93
|
*/
|
|
107
94
|
mapSymbolIdsToSymbolNames(symbols_on_reels: number[][]): SymbolId[][];
|
|
108
95
|
/**
|
|
109
96
|
* Getter for bet that placed in current position
|
|
110
|
-
*
|
|
111
97
|
* @private
|
|
112
|
-
* @param {number} primaryPosition
|
|
113
|
-
* @param {number} fallbackPosition
|
|
114
|
-
* @returns {number}
|
|
98
|
+
* @param {number} primaryPosition - primary position
|
|
99
|
+
* @param {number} fallbackPosition - fallback position
|
|
100
|
+
* @returns {number} - bet
|
|
115
101
|
*/
|
|
116
102
|
private getBetAtPosition;
|
|
117
103
|
/**
|
|
118
104
|
* Method for initializing symbol map in game
|
|
119
|
-
*
|
|
120
105
|
* @private
|
|
121
|
-
* @param {InitDataInterface} data
|
|
106
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
122
107
|
*/
|
|
123
108
|
private initSymbolMap;
|
|
124
109
|
/**
|
|
125
110
|
* Method for initializing streak map in game
|
|
126
|
-
*
|
|
127
111
|
* @private
|
|
128
|
-
* @param {InitDataInterface} data
|
|
112
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
129
113
|
*/
|
|
130
114
|
private initStreakMap;
|
|
131
115
|
/**
|
|
132
116
|
* Method for initializing win map in game
|
|
133
|
-
*
|
|
134
117
|
* @private
|
|
135
|
-
* @param {InitDataInterface} data
|
|
118
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
136
119
|
*/
|
|
137
120
|
private initWinMap;
|
|
138
121
|
/**
|
|
139
122
|
* Method for initializing transformation map in game
|
|
140
|
-
*
|
|
141
123
|
* @private
|
|
142
|
-
* @param {InitDataInterface} data
|
|
124
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
143
125
|
*/
|
|
144
126
|
private initTransformationMap;
|
|
145
127
|
}
|
|
@@ -3,8 +3,6 @@ import { logError } from "../../utils";
|
|
|
3
3
|
import { isBlindsConfiguredByTransformations } from "../SpinLogic";
|
|
4
4
|
/**
|
|
5
5
|
* Class representing config for connection to API
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
6
|
* @class ApiConfig
|
|
9
7
|
* @typedef {ApiConfig}
|
|
10
8
|
*/
|
|
@@ -18,8 +16,7 @@ export class ApiConfig {
|
|
|
18
16
|
extraData;
|
|
19
17
|
/**
|
|
20
18
|
* Create instance of ApiConfig, requires InitDataInterface
|
|
21
|
-
*
|
|
22
|
-
* @param {InitDataInterface} data
|
|
19
|
+
* @param {InitDataInterface} data - initail data from backend
|
|
23
20
|
*/
|
|
24
21
|
constructor(data) {
|
|
25
22
|
if (data.action !== "init") {
|
|
@@ -35,10 +32,9 @@ export class ApiConfig {
|
|
|
35
32
|
}
|
|
36
33
|
/**
|
|
37
34
|
* Function to generate metadata for a particular spin
|
|
38
|
-
*
|
|
39
35
|
* @public
|
|
40
|
-
* @param {SpinDataInterface} spinLogicResponse
|
|
41
|
-
* @returns AdaptedSpinResponse without results and standalone results, these should be created in each game
|
|
36
|
+
* @param {SpinDataInterface} spinLogicResponse - initial data from backend
|
|
37
|
+
* @returns {Omit<AdaptedSpinResponse, "results" | "standaloneTransformations">} AdaptedSpinResponse without results and standalone results, these should be created in each game
|
|
42
38
|
*/
|
|
43
39
|
generateMetadata(spinLogicResponse) {
|
|
44
40
|
const blindsConfiguredByResponse = this.mapSymbolIdsToSymbolNames(spinLogicResponse.symbols_on_reels);
|
|
@@ -58,21 +54,19 @@ export class ApiConfig {
|
|
|
58
54
|
}
|
|
59
55
|
/**
|
|
60
56
|
* Getter for win line number
|
|
61
|
-
*
|
|
62
57
|
* @public
|
|
63
|
-
* @param winLineAnimationName
|
|
64
|
-
* @param defaultNumber
|
|
65
|
-
* @returns {string | number}
|
|
58
|
+
* @param {string} winLineAnimationName - name of win line
|
|
59
|
+
* @param {string} defaultNumber - default number if not found
|
|
60
|
+
* @returns {string | number} - number of win line
|
|
66
61
|
*/
|
|
67
62
|
getWinLineNumber(winLineAnimationName, defaultNumber = "") {
|
|
68
63
|
return this.streakMap.get(winLineAnimationName) ?? defaultNumber;
|
|
69
64
|
}
|
|
70
65
|
/**
|
|
71
66
|
* Function for getting next bet from config
|
|
72
|
-
*
|
|
73
67
|
* @public
|
|
74
68
|
* @param {number} currentBet current bet
|
|
75
|
-
* @returns {number}
|
|
69
|
+
* @returns {number} - next bet
|
|
76
70
|
*/
|
|
77
71
|
getNextBet(currentBet) {
|
|
78
72
|
const currentBetPosition = this.bets.indexOf(currentBet);
|
|
@@ -80,10 +74,9 @@ export class ApiConfig {
|
|
|
80
74
|
}
|
|
81
75
|
/**
|
|
82
76
|
* Function for getting previous bet from config
|
|
83
|
-
*
|
|
84
77
|
* @public
|
|
85
78
|
* @param {number} currentBet current bet
|
|
86
|
-
* @returns {number}
|
|
79
|
+
* @returns {number} - previous bet
|
|
87
80
|
*/
|
|
88
81
|
getPreviousBet(currentBet) {
|
|
89
82
|
const currentBetPosition = this.bets.indexOf(currentBet);
|
|
@@ -92,19 +85,17 @@ export class ApiConfig {
|
|
|
92
85
|
/**
|
|
93
86
|
* Getting first bet from config
|
|
94
87
|
* This functions is use for mechanic that getting the first available bet
|
|
95
|
-
*
|
|
96
88
|
* @public
|
|
97
|
-
* @returns {number}
|
|
89
|
+
* @returns {number} - first bet
|
|
98
90
|
*/
|
|
99
91
|
getFirstBet() {
|
|
100
92
|
return this.getBetAtPosition(0, 0);
|
|
101
93
|
}
|
|
102
94
|
/**
|
|
103
95
|
* Getting highest bet in config
|
|
104
|
-
*
|
|
105
96
|
* @public
|
|
106
|
-
* @param {number} [limit
|
|
107
|
-
* @returns {number}
|
|
97
|
+
* @param {number} [limit] limit for the biggest available bet
|
|
98
|
+
* @returns {number} - highest bet
|
|
108
99
|
*/
|
|
109
100
|
getHighestBet(limit = Number.POSITIVE_INFINITY) {
|
|
110
101
|
const bet = [...this.bets].reverse().find((bet) => bet <= limit);
|
|
@@ -114,10 +105,9 @@ export class ApiConfig {
|
|
|
114
105
|
}
|
|
115
106
|
/**
|
|
116
107
|
* Mapper for symbolIds present in the game
|
|
117
|
-
*
|
|
118
108
|
* @public
|
|
119
109
|
* @param {number} backendSymbolId id from backend to map
|
|
120
|
-
* @returns {SymbolId}
|
|
110
|
+
* @returns {SymbolId} - symbol name
|
|
121
111
|
*/
|
|
122
112
|
getSymbolId(backendSymbolId) {
|
|
123
113
|
if (!this.symbolMap.has(backendSymbolId)) {
|
|
@@ -127,10 +117,9 @@ export class ApiConfig {
|
|
|
127
117
|
}
|
|
128
118
|
/**
|
|
129
119
|
* Function that maps backend win id into more readable one
|
|
130
|
-
*
|
|
131
120
|
* @public
|
|
132
|
-
* @param {number} backendWinId
|
|
133
|
-
* @returns {WinTypeId}
|
|
121
|
+
* @param {number} backendWinId - win id from backend
|
|
122
|
+
* @returns {WinTypeId} - win type name
|
|
134
123
|
*/
|
|
135
124
|
getWinId(backendWinId) {
|
|
136
125
|
if (!this.winMap.has(backendWinId)) {
|
|
@@ -140,10 +129,9 @@ export class ApiConfig {
|
|
|
140
129
|
}
|
|
141
130
|
/**
|
|
142
131
|
* Function that maps backend win id into more readable one
|
|
143
|
-
*
|
|
144
132
|
* @public
|
|
145
|
-
* @param {number} transformationBackendId
|
|
146
|
-
* @returns {TransformationTypeId}
|
|
133
|
+
* @param {number} transformationBackendId - transformation id from backend
|
|
134
|
+
* @returns {TransformationTypeId} - transformation type name
|
|
147
135
|
*/
|
|
148
136
|
getTransformationById(transformationBackendId) {
|
|
149
137
|
if (!this.transformationMap.has(transformationBackendId)) {
|
|
@@ -153,10 +141,9 @@ export class ApiConfig {
|
|
|
153
141
|
}
|
|
154
142
|
/**
|
|
155
143
|
* Mapper for symbol ids into symbol names
|
|
156
|
-
*
|
|
157
144
|
* @public
|
|
158
|
-
* @param {number[][]} symbols_on_reels
|
|
159
|
-
* @returns {SymbolId[][]}
|
|
145
|
+
* @param {number[][]} symbols_on_reels - symbols on reels
|
|
146
|
+
* @returns {SymbolId[][]} - symbols on reels
|
|
160
147
|
*/
|
|
161
148
|
mapSymbolIdsToSymbolNames(symbols_on_reels) {
|
|
162
149
|
return symbols_on_reels.map((reel) => {
|
|
@@ -165,11 +152,10 @@ export class ApiConfig {
|
|
|
165
152
|
}
|
|
166
153
|
/**
|
|
167
154
|
* Getter for bet that placed in current position
|
|
168
|
-
*
|
|
169
155
|
* @private
|
|
170
|
-
* @param {number} primaryPosition
|
|
171
|
-
* @param {number} fallbackPosition
|
|
172
|
-
* @returns {number}
|
|
156
|
+
* @param {number} primaryPosition - primary position
|
|
157
|
+
* @param {number} fallbackPosition - fallback position
|
|
158
|
+
* @returns {number} - bet
|
|
173
159
|
*/
|
|
174
160
|
getBetAtPosition(primaryPosition, fallbackPosition) {
|
|
175
161
|
if (typeof this.bets[primaryPosition] == "undefined") {
|
|
@@ -179,9 +165,8 @@ export class ApiConfig {
|
|
|
179
165
|
}
|
|
180
166
|
/**
|
|
181
167
|
* Method for initializing symbol map in game
|
|
182
|
-
*
|
|
183
168
|
* @private
|
|
184
|
-
* @param {InitDataInterface} data
|
|
169
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
185
170
|
*/
|
|
186
171
|
initSymbolMap(data) {
|
|
187
172
|
if (Object.keys(RainMan.symbolIds).length !== data.symbols.length) {
|
|
@@ -200,9 +185,8 @@ export class ApiConfig {
|
|
|
200
185
|
}
|
|
201
186
|
/**
|
|
202
187
|
* Method for initializing streak map in game
|
|
203
|
-
*
|
|
204
188
|
* @private
|
|
205
|
-
* @param {InitDataInterface} data
|
|
189
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
206
190
|
*/
|
|
207
191
|
initStreakMap(data) {
|
|
208
192
|
for (const [lineNumber, positions] of data.streaks.entries()) {
|
|
@@ -212,9 +196,8 @@ export class ApiConfig {
|
|
|
212
196
|
}
|
|
213
197
|
/**
|
|
214
198
|
* Method for initializing win map in game
|
|
215
|
-
*
|
|
216
199
|
* @private
|
|
217
|
-
* @param {InitDataInterface} data
|
|
200
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
218
201
|
*/
|
|
219
202
|
initWinMap(data) {
|
|
220
203
|
for (const [key, name] of data.wins_names.entries()) {
|
|
@@ -227,9 +210,8 @@ export class ApiConfig {
|
|
|
227
210
|
}
|
|
228
211
|
/**
|
|
229
212
|
* Method for initializing transformation map in game
|
|
230
|
-
*
|
|
231
213
|
* @private
|
|
232
|
-
* @param {InitDataInterface} data
|
|
214
|
+
* @param {InitDataInterface} data - initial data from backend
|
|
233
215
|
*/
|
|
234
216
|
initTransformationMap(data) {
|
|
235
217
|
for (const [key, name] of data.transformations_names.entries()) {
|