pixi-rainman-game-engine 0.3.0 → 0.3.2

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.
Files changed (186) hide show
  1. package/dist/ComponentRegistry/ComponentRegistry.d.ts +23 -9
  2. package/dist/ComponentRegistry/ComponentRegistry.js +25 -10
  3. package/dist/ComponentRegistry/types.d.ts +3 -4
  4. package/dist/DescribedPlayableAction/DescribedPlayableAction.d.ts +2 -0
  5. package/dist/DescribedPlayableAction/DescribedPlayableAction.js +2 -0
  6. package/dist/Money/MoneyText.d.ts +5 -0
  7. package/dist/Money/MoneyText.js +5 -0
  8. package/dist/Rainman/appConfig.js +1 -0
  9. package/dist/Rainman/types.d.ts +1 -0
  10. package/dist/SettingsUI/hooks/useBuyFreeSpins/useBuyFreeSpins.d.ts +4 -0
  11. package/dist/SettingsUI/hooks/useBuyFreeSpins/useBuyFreeSpins.js +4 -0
  12. package/dist/SettingsUI/hooks/useDeviceOrientations.d.ts +4 -0
  13. package/dist/SettingsUI/hooks/useDeviceOrientations.js +4 -0
  14. package/dist/application/ApiConfig/ApiConfig.d.ts +2 -1
  15. package/dist/application/ApiConfig/ApiConfig.js +3 -2
  16. package/dist/application/ApiConfig/SymbolId.d.ts +1 -1
  17. package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +42 -5
  18. package/dist/application/ButtonsEventManager/ButtonsEventManager.js +51 -9
  19. package/dist/application/SoundManager/SoundManager.d.ts +26 -1
  20. package/dist/application/SoundManager/SoundManager.js +30 -2
  21. package/dist/application/SpeedState/SpeedAdapter.d.ts +9 -0
  22. package/dist/application/SpeedState/SpeedAdapter.js +9 -0
  23. package/dist/application/SpeedState/SpeedLevel.d.ts +42 -0
  24. package/dist/application/SpeedState/SpeedLevel.js +30 -0
  25. package/dist/application/SpeedState/SpeedLevelHandler.d.ts +7 -0
  26. package/dist/application/SpeedState/SpeedLevelHandler.js +7 -0
  27. package/dist/application/SpinLogic/SpinLogic.d.ts +58 -0
  28. package/dist/application/SpinLogic/SpinLogic.js +58 -0
  29. package/dist/application/SpinLogic/SpinLogicDTO.d.ts +70 -0
  30. package/dist/application/SpinLogic/SpinLogicDTO.js +70 -0
  31. package/dist/application/SpinLogic/WinScenarios.d.ts +12 -0
  32. package/dist/application/SpinLogic/WinScenarios.js +12 -0
  33. package/dist/application/SpinLogic/types.d.ts +10 -0
  34. package/dist/application/TimedActions/IncentiveComponent.d.ts +10 -0
  35. package/dist/application/TimedActions/IncentiveComponent.js +9 -1
  36. package/dist/application/TimedActions/TimedIncentiveController.d.ts +37 -0
  37. package/dist/application/TimedActions/TimedIncentiveController.js +37 -0
  38. package/dist/application/setup.d.ts +0 -1
  39. package/dist/application/setup.js +0 -1
  40. package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.d.ts +36 -1
  41. package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.js +25 -0
  42. package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +83 -2
  43. package/dist/components/AbstractMainContainer/AbstractMainContainer.js +97 -11
  44. package/dist/components/DoubleBorderText/DoubleBorderText.d.ts +10 -0
  45. package/dist/components/DoubleBorderText/DoubleBorderText.js +24 -0
  46. package/dist/components/DoubleBorderText/index.d.ts +1 -0
  47. package/dist/components/DoubleBorderText/index.js +1 -0
  48. package/dist/components/GambleGame/GambleGame.d.ts +39 -0
  49. package/dist/components/GambleGame/GambleGame.js +44 -3
  50. package/dist/components/GambleGame/types.d.ts +5 -0
  51. package/dist/components/buttons/BaseButton/BaseButton.d.ts +73 -2
  52. package/dist/components/buttons/BaseButton/BaseButton.js +73 -2
  53. package/dist/components/buttons/BaseButton/types.d.ts +5 -0
  54. package/dist/components/buttons/buttonGroups/LeftButtons.d.ts +11 -0
  55. package/dist/components/buttons/buttonGroups/LeftButtons.js +11 -0
  56. package/dist/components/buttons/buttonGroups/LeftButtonsLandscape.d.ts +13 -1
  57. package/dist/components/buttons/buttonGroups/LeftButtonsLandscape.js +13 -1
  58. package/dist/components/buttons/buttonGroups/LeftButtonsMobile.d.ts +19 -1
  59. package/dist/components/buttons/buttonGroups/LeftButtonsMobile.js +19 -1
  60. package/dist/components/buttons/buttonGroups/MiddleButtons.d.ts +27 -2
  61. package/dist/components/buttons/buttonGroups/MiddleButtons.js +46 -3
  62. package/dist/components/buttons/buttonGroups/RightButtons.d.ts +19 -3
  63. package/dist/components/buttons/buttonGroups/RightButtons.js +29 -1
  64. package/dist/components/buttons/buttonGroups/RightButtonsLandscape.d.ts +11 -0
  65. package/dist/components/buttons/buttonGroups/RightButtonsLandscape.js +11 -0
  66. package/dist/components/buttons/buttonGroups/RightButtonsMobile.d.ts +17 -0
  67. package/dist/components/buttons/buttonGroups/RightButtonsMobile.js +17 -0
  68. package/dist/components/buttons/default/AutoplayButton.d.ts +6 -0
  69. package/dist/components/buttons/default/AutoplayButton.js +8 -1
  70. package/dist/components/buttons/default/GambleButton.d.ts +13 -0
  71. package/dist/components/buttons/default/GambleButton.js +43 -0
  72. package/dist/components/buttons/default/RefreshButton.d.ts +30 -0
  73. package/dist/components/buttons/default/RefreshButton.js +36 -3
  74. package/dist/components/buttons/default/SpeedControlButton.d.ts +2 -0
  75. package/dist/components/buttons/default/SpeedControlButton.js +2 -0
  76. package/dist/components/buttons/default/TakeButton.d.ts +13 -0
  77. package/dist/components/buttons/default/TakeButton.js +37 -0
  78. package/dist/components/buttons/default/VolumeButton.d.ts +2 -0
  79. package/dist/components/buttons/default/VolumeButton.js +2 -0
  80. package/dist/components/buttons/default/index.d.ts +2 -0
  81. package/dist/components/buttons/default/index.js +2 -0
  82. package/dist/components/buttons/registrynames.d.ts +2 -0
  83. package/dist/components/buttons/registrynames.js +3 -1
  84. package/dist/components/common/AnimatedBackground.d.ts +22 -0
  85. package/dist/components/common/AnimatedBackground.js +22 -0
  86. package/dist/components/common/AnimatedNumber.d.ts +36 -0
  87. package/dist/components/common/AnimatedNumber.js +36 -0
  88. package/dist/components/common/Background.d.ts +20 -0
  89. package/dist/components/common/Background.js +22 -1
  90. package/dist/components/common/FreeSpinButton.d.ts +33 -1
  91. package/dist/components/common/FreeSpinButton.js +37 -4
  92. package/dist/components/common/IResizableContainer.d.ts +4 -0
  93. package/dist/components/common/Logo.d.ts +21 -0
  94. package/dist/components/common/Logo.js +21 -0
  95. package/dist/components/common/LogoStatic.d.ts +10 -0
  96. package/dist/components/common/LogoStatic.js +10 -0
  97. package/dist/components/common/ResponsiveComponent.d.ts +22 -0
  98. package/dist/components/common/ResponsiveComponent.js +10 -0
  99. package/dist/components/common/ResumableContainers.d.ts +6 -0
  100. package/dist/components/common/ResumableContainers.js +6 -0
  101. package/dist/components/common/ScalableSpine.d.ts +11 -0
  102. package/dist/components/common/ScalableSpine.js +11 -0
  103. package/dist/components/frame/AbstractColumnsContainer.d.ts +20 -6
  104. package/dist/components/frame/AbstractColumnsContainer.js +18 -4
  105. package/dist/components/frame/AbstractFrame.d.ts +115 -0
  106. package/dist/components/frame/AbstractFrame.js +97 -2
  107. package/dist/components/frame/AbstractInnerFrame.d.ts +5 -0
  108. package/dist/components/frame/AbstractInnerFrame.js +5 -0
  109. package/dist/components/frame/WinLineAnimation.d.ts +10 -0
  110. package/dist/components/frame/WinLineAnimation.js +12 -1
  111. package/dist/components/frame/constants.d.ts +7 -0
  112. package/dist/components/frame/constants.js +3 -0
  113. package/dist/components/index.d.ts +1 -0
  114. package/dist/components/index.js +1 -0
  115. package/dist/components/messageBox/MessageBox.d.ts +33 -0
  116. package/dist/components/messageBox/MessageBox.js +34 -1
  117. package/dist/components/symbols/AbstractSymbolBase.d.ts +146 -2
  118. package/dist/components/symbols/AbstractSymbolBase.js +137 -14
  119. package/dist/components/symbols/AbstractSymbolsColumn.d.ts +233 -3
  120. package/dist/components/symbols/AbstractSymbolsColumn.js +220 -10
  121. package/dist/components/symbols/DroppableSymbol.d.ts +16 -0
  122. package/dist/components/symbols/DroppableSymbol.js +16 -0
  123. package/dist/components/symbols/DroppableSymbolsColumn.d.ts +51 -0
  124. package/dist/components/symbols/DroppableSymbolsColumn.js +57 -3
  125. package/dist/components/symbols/types.d.ts +8 -0
  126. package/dist/components/symbols/types.js +4 -0
  127. package/dist/components/updatable/GambleUpdatableText.d.ts +5 -0
  128. package/dist/components/updatable/GambleUpdatableText.js +5 -0
  129. package/dist/components/updatable/StylefulUpdatableText.d.ts +23 -0
  130. package/dist/components/updatable/StylefulUpdatableText.js +25 -1
  131. package/dist/components/updatable/UpdatableValueComponent.d.ts +71 -0
  132. package/dist/components/updatable/UpdatableValueComponent.js +77 -4
  133. package/dist/connectivity/ConnectionWrapper.d.ts +20 -1
  134. package/dist/connectivity/ConnectionWrapper.js +23 -3
  135. package/dist/connectivity/LocalConnectionWrapper.d.ts +2 -2
  136. package/dist/connectivity/LocalConnectionWrapper.js +2 -2
  137. package/dist/connectivity/serverConnection.d.ts +59 -0
  138. package/dist/connectivity/serverData.d.ts +3 -1
  139. package/dist/connectivity/spinData.d.ts +15 -0
  140. package/dist/connectivity/spinData.js +15 -0
  141. package/dist/constants/gamePhase.d.ts +4 -0
  142. package/dist/controllers/AbstractController.d.ts +114 -5
  143. package/dist/controllers/AbstractController.js +180 -37
  144. package/dist/controllers/QuickStopController.d.ts +3 -0
  145. package/dist/controllers/QuickStopController.js +3 -0
  146. package/dist/controllers/UiController.d.ts +163 -1
  147. package/dist/controllers/UiController.js +170 -5
  148. package/dist/errors/LanguageNotDefinedError.d.ts +4 -0
  149. package/dist/errors/LanguageNotDefinedError.js +4 -0
  150. package/dist/errors/SpineDataNotFound.d.ts +4 -0
  151. package/dist/errors/SpineDataNotFound.js +4 -0
  152. package/dist/errors/TextureNotFound.d.ts +4 -0
  153. package/dist/errors/TextureNotFound.js +4 -0
  154. package/dist/loading/AbstractLoadingContainer.d.ts +16 -0
  155. package/dist/loading/AbstractLoadingContainer.js +16 -0
  156. package/dist/loading/SpriteLoadingContainer.d.ts +18 -0
  157. package/dist/loading/SpriteLoadingContainer.js +18 -0
  158. package/dist/localStorage/localStorage.d.ts +23 -0
  159. package/dist/localStorage/localStorage.js +19 -0
  160. package/dist/stores/SettingsStore.d.ts +276 -4
  161. package/dist/stores/SettingsStore.js +309 -14
  162. package/dist/stores/types.d.ts +4 -0
  163. package/dist/utils/assets/assetGetter.js +6 -3
  164. package/dist/utils/common/deviceOrientation.js +2 -1
  165. package/dist/utils/common/functions.d.ts +57 -1
  166. package/dist/utils/common/functions.js +63 -4
  167. package/dist/utils/common/logger.js +4 -2
  168. package/dist/utils/common/placementHelpers.d.ts +14 -0
  169. package/dist/utils/common/placementHelpers.js +20 -1
  170. package/dist/utils/common/screenHelpers.d.ts +28 -0
  171. package/dist/utils/common/screenHelpers.js +34 -3
  172. package/dist/utils/common/sound.d.ts +1 -0
  173. package/dist/utils/common/sound.js +2 -0
  174. package/dist/utils/common/stats.d.ts +1 -0
  175. package/dist/utils/common/stats.js +2 -0
  176. package/dist/winComponents/AnimableParticlesEmitter.d.ts +6 -0
  177. package/dist/winComponents/AnimableParticlesEmitter.js +6 -0
  178. package/dist/winComponents/BaseWinContainer.d.ts +64 -0
  179. package/dist/winComponents/BaseWinContainer.js +66 -1
  180. package/dist/winComponents/PositioningFrame.d.ts +7 -0
  181. package/dist/winComponents/PositioningFrame.js +7 -0
  182. package/dist/winComponents/TexturedText.d.ts +23 -0
  183. package/dist/winComponents/TexturedText.js +23 -0
  184. package/dist/winComponents/UpdatableSpineContainer.d.ts +25 -0
  185. package/dist/winComponents/UpdatableSpineContainer.js +25 -0
  186. package/package.json +1 -1
@@ -4,6 +4,11 @@ import { getSpineData } from "../../utils";
4
4
  /**
5
5
  * Class representing animated number, based on spine animation.
6
6
  * Animation names should be exact the same as a represented symbol.
7
+ * This class is used in games like: LDE, LP, POBJ, POBWW, 5CC, 20CC and RC5.
8
+ * This represents the value of wins in this games in e.g. super bonus game (LDE, LP)
9
+ * and total win in free spin game (5CC, 20CC, RC5).
10
+ * @class AnimatedNumber
11
+ * @augments {Container}
7
12
  */
8
13
  export class AnimatedNumber extends Container {
9
14
  spineName;
@@ -15,6 +20,11 @@ export class AnimatedNumber extends Container {
15
20
  this.number = number;
16
21
  this.setDigits();
17
22
  }
23
+ /**
24
+ * Function for setting position of digits in row
25
+ * @private
26
+ * @returns {void}
27
+ */
18
28
  setDigits() {
19
29
  this.removeDigits();
20
30
  Array.from(this.number.toString()).forEach((digit) => {
@@ -31,6 +41,11 @@ export class AnimatedNumber extends Container {
31
41
  });
32
42
  this.pivot.set(this.width / 2, this.height / 2);
33
43
  }
44
+ /**
45
+ * Function for setting move animation for digits.
46
+ * @public
47
+ * @returns {void}
48
+ */
34
49
  setMoveAnimation() {
35
50
  this.removeDigits();
36
51
  Array.from(this.number.toString()).forEach((digit) => {
@@ -47,17 +62,38 @@ export class AnimatedNumber extends Container {
47
62
  });
48
63
  this.pivot.set(this.width / 2, this.height / 2);
49
64
  }
65
+ /**
66
+ * Function for removing digits from the display.
67
+ * @public
68
+ * @returns {void}
69
+ */
50
70
  removeDigits() {
51
71
  this.digits.forEach((digit) => this.removeChild(digit));
52
72
  this.digits = [];
53
73
  }
74
+ /**
75
+ * Getter for displayed value
76
+ * @public
77
+ * @returns {number | string} current displayed value
78
+ */
54
79
  get value() {
55
80
  return this.number;
56
81
  }
82
+ /**
83
+ * Setter for displayed value
84
+ * @public
85
+ * @param {number | string} value new displayed value
86
+ * @returns {void}
87
+ */
57
88
  set value(value) {
58
89
  this.number = value;
59
90
  this.setDigits();
60
91
  }
92
+ /**
93
+ * Function for playing the animation.
94
+ * @public
95
+ * @returns {void}
96
+ */
61
97
  play() {
62
98
  this.digits.forEach((digit) => (digit.state.timeScale = 1));
63
99
  }
@@ -13,8 +13,28 @@ export declare class Background extends Sprite {
13
13
  static readonly registryName = "background";
14
14
  private lastDeviceOrientation?;
15
15
  constructor(backgroundDesktop: string, backgroundMobile: string);
16
+ /**
17
+ * Function for resizing the background.
18
+ * @public
19
+ * @returns {void}
20
+ */
16
21
  resize(): void;
22
+ /**
23
+ * Function for setting texture for background on desktop
24
+ * @private
25
+ * @returns {void}
26
+ */
17
27
  private setDesktopBackground;
28
+ /**
29
+ * Function for setting texture for background on mobile
30
+ * @private
31
+ * @returns {void}
32
+ */
18
33
  private setMobileBackground;
34
+ /**
35
+ * Function for changing the background based on device orientation
36
+ * @private
37
+ * @returns {void}
38
+ */
19
39
  private changeSpineForOrientation;
20
40
  }
@@ -26,22 +26,43 @@ export class Background extends Sprite {
26
26
  this.anchor.set(0, 0);
27
27
  this.resize();
28
28
  }
29
+ /**
30
+ * Function for resizing the background.
31
+ * @public
32
+ * @returns {void}
33
+ */
29
34
  resize() {
30
35
  this.changeSpineForOrientation();
31
36
  const backgroundOffset = 10;
32
37
  this.width = RainMan.app.screen.width + backgroundOffset;
33
38
  this.height = RainMan.app.screen.height + backgroundOffset;
34
39
  }
40
+ /**
41
+ * Function for setting texture for background on desktop
42
+ * @private
43
+ * @returns {void}
44
+ */
35
45
  setDesktopBackground() {
36
46
  this.texture = getTexture(this.backgroundDesktop);
37
47
  }
48
+ /**
49
+ * Function for setting texture for background on mobile
50
+ * @private
51
+ * @returns {void}
52
+ */
38
53
  setMobileBackground() {
39
54
  this.texture = getTexture(this.backgroundMobile);
40
55
  }
56
+ /**
57
+ * Function for changing the background based on device orientation
58
+ * @private
59
+ * @returns {void}
60
+ */
41
61
  changeSpineForOrientation() {
42
62
  const deviceOrientation = getDeviceOrientation();
43
- if (deviceOrientation === this.lastDeviceOrientation)
63
+ if (deviceOrientation === this.lastDeviceOrientation) {
44
64
  return;
65
+ }
45
66
  this.lastDeviceOrientation = deviceOrientation;
46
67
  deviceOrientation === "mobile-portrait" ? this.setMobileBackground() : this.setDesktopBackground();
47
68
  }
@@ -13,10 +13,42 @@ export declare class FreeSpinButton extends ResumableContainer {
13
13
  private spine;
14
14
  private lastDeviceOrientation?;
15
15
  constructor(spineName: string, animationName: string, mobileSpineName?: string);
16
+ /**
17
+ * Setter for onClick callback
18
+ * @public
19
+ * @param {() => void} onClick callback for onclick
20
+ * @returns {void}
21
+ */
16
22
  setOnClick(onClick: () => void): void;
17
- setInteractivity(newValue: boolean): void;
23
+ /**
24
+ * Setter for interactivity
25
+ * @public
26
+ * @param {boolean} shouldBeInteractive flag for setting interactivity
27
+ * @returns {void}
28
+ */
29
+ setInteractivity(shouldBeInteractive: boolean): void;
30
+ /**
31
+ * Function for resizing the button.
32
+ * @public
33
+ * @returns {void}
34
+ */
18
35
  resize(): void;
36
+ /**
37
+ * Function for setting the spine for desktop
38
+ * @private
39
+ * @returns {void}
40
+ */
19
41
  private setDesktopSpine;
42
+ /**
43
+ * Function for setting the spine for mobile
44
+ * @private
45
+ * @returns {void}
46
+ */
20
47
  private setMobileSpine;
48
+ /**
49
+ * Function for changing the spine based on device orientation
50
+ * @private
51
+ * @returns {void}
52
+ */
21
53
  private changeSpineForOrientation;
22
54
  }
@@ -32,27 +32,60 @@ export class FreeSpinButton extends ResumableContainer {
32
32
  this.y = 0;
33
33
  this.resize();
34
34
  }
35
+ /**
36
+ * Setter for onClick callback
37
+ * @public
38
+ * @param {() => void} onClick callback for onclick
39
+ * @returns {void}
40
+ */
35
41
  setOnClick(onClick) {
36
42
  this.addListener("pointerdown", onClick);
37
43
  }
38
- setInteractivity(newValue) {
39
- this.eventMode = newValue ? "static" : "auto";
40
- this.spine.tint = new Color(newValue ? TINT_ENABLED : TINT_DISABLED).toNumber();
44
+ /**
45
+ * Setter for interactivity
46
+ * @public
47
+ * @param {boolean} shouldBeInteractive flag for setting interactivity
48
+ * @returns {void}
49
+ */
50
+ setInteractivity(shouldBeInteractive) {
51
+ this.eventMode = shouldBeInteractive ? "static" : "auto";
52
+ this.spine.tint = new Color(shouldBeInteractive ? TINT_ENABLED : TINT_DISABLED).toNumber();
41
53
  }
54
+ /**
55
+ * Function for resizing the button.
56
+ * @public
57
+ * @returns {void}
58
+ */
42
59
  resize() {
43
60
  this.changeSpineForOrientation();
44
61
  }
62
+ /**
63
+ * Function for setting the spine for desktop
64
+ * @private
65
+ * @returns {void}
66
+ */
45
67
  setDesktopSpine() {
46
68
  this.spine = new Spine(getSpineData(this.spineName));
47
69
  this.spine.state.setAnimation(0, this.animationName, true);
48
70
  }
71
+ /**
72
+ * Function for setting the spine for mobile
73
+ * @private
74
+ * @returns {void}
75
+ */
49
76
  setMobileSpine() {
50
77
  this.spine = new Spine(getSpineData(this.mobileSpineName));
51
78
  this.spine.state.setAnimation(0, this.animationName, true);
52
79
  }
80
+ /**
81
+ * Function for changing the spine based on device orientation
82
+ * @private
83
+ * @returns {void}
84
+ */
53
85
  changeSpineForOrientation() {
54
- if (getDeviceOrientation() === this.lastDeviceOrientation)
86
+ if (getDeviceOrientation() === this.lastDeviceOrientation) {
55
87
  return;
88
+ }
56
89
  this.lastDeviceOrientation = getDeviceOrientation();
57
90
  this.removeChildren();
58
91
  getDeviceOrientation() === "mobile-portrait" ? this.setMobileSpine() : this.setDesktopSpine();
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Interface for resizable containers.
3
+ * @typedef {IResizableContainer}
4
+ */
1
5
  export interface IResizableContainer {
2
6
  resize(): void;
3
7
  }
@@ -13,8 +13,29 @@ export declare class Logo extends ResumableContainer {
13
13
  static readonly registryName = "logo";
14
14
  protected spine: Spine;
15
15
  constructor(desktopSpineName: string, animationName: string, mobileSpineName?: string);
16
+ /**
17
+ * Function for resizing the logo.
18
+ * @public
19
+ * @returns {void}
20
+ */
16
21
  resize(): void;
22
+ /**
23
+ * Function for repositioning the logo.
24
+ * @private
25
+ * @returns {void}
26
+ */
17
27
  private reposition;
28
+ /**
29
+ * Function for setting the spine
30
+ * @private
31
+ * @param {string} spineName spine name
32
+ * @returns {void}
33
+ */
18
34
  private setSpine;
35
+ /**
36
+ * Function for changing the spine based on device orientation
37
+ * @private
38
+ * @returns {void}
39
+ */
19
40
  private changeSpineForOrientation;
20
41
  }
@@ -25,6 +25,11 @@ export class Logo extends ResumableContainer {
25
25
  this.setSpine(this.desktopSpineName);
26
26
  this.resize();
27
27
  }
28
+ /**
29
+ * Function for resizing the logo.
30
+ * @public
31
+ * @returns {void}
32
+ */
28
33
  resize() {
29
34
  this.changeSpineForOrientation();
30
35
  this.y = 0; // reset position
@@ -32,15 +37,31 @@ export class Logo extends ResumableContainer {
32
37
  this.scale.set(Math.min(1.5, globalMinRatio()));
33
38
  this.reposition();
34
39
  }
40
+ /**
41
+ * Function for repositioning the logo.
42
+ * @private
43
+ * @returns {void}
44
+ */
35
45
  reposition() {
36
46
  this.y = this.spine.getBounds().height / 2;
37
47
  this.x = RainMan.app.screen.width / 2;
38
48
  }
49
+ /**
50
+ * Function for setting the spine
51
+ * @private
52
+ * @param {string} spineName spine name
53
+ * @returns {void}
54
+ */
39
55
  setSpine(spineName) {
40
56
  this.spine = new Spine(getSpineData(spineName));
41
57
  this.spine.state.setAnimation(0, this.animationName, true);
42
58
  this.spine.visible = true;
43
59
  }
60
+ /**
61
+ * Function for changing the spine based on device orientation
62
+ * @private
63
+ * @returns {void}
64
+ */
44
65
  changeSpineForOrientation() {
45
66
  this.removeChildren();
46
67
  getDeviceOrientation() === "mobile-portrait"
@@ -8,6 +8,16 @@ import { Sprite } from "pixi.js";
8
8
  export declare class LogoStatic extends Sprite {
9
9
  private maxScale;
10
10
  constructor(textureName: string, maxScale?: number);
11
+ /**
12
+ * Function for resizing the logo.
13
+ * @public
14
+ * @returns {void}
15
+ */
11
16
  resize(): void;
17
+ /**
18
+ * Function for repositioning the logo.
19
+ * @private
20
+ * @returns {void}
21
+ */
12
22
  private reposition;
13
23
  }
@@ -17,10 +17,20 @@ export class LogoStatic extends Sprite {
17
17
  this.name = "logo";
18
18
  this.anchor.x = 0.5;
19
19
  }
20
+ /**
21
+ * Function for resizing the logo.
22
+ * @public
23
+ * @returns {void}
24
+ */
20
25
  resize() {
21
26
  this.scale.set(Math.min(this.maxScale, globalMinRatio()));
22
27
  this.reposition();
23
28
  }
29
+ /**
30
+ * Function for repositioning the logo.
31
+ * @private
32
+ * @returns {void}
33
+ */
24
34
  reposition() {
25
35
  this.x = RainMan.app.screen.width / 2;
26
36
  }
@@ -1,8 +1,30 @@
1
1
  import { Container } from "pixi.js";
2
+ /**
3
+ * Abstract class for responsive containers.
4
+ * @class ResponsiveContainer
5
+ * @augments {Container}
6
+ */
2
7
  export declare abstract class ResponsiveContainer extends Container {
3
8
  protected scaleMultiplier: number;
4
9
  protected constructor(scaleMultiplier?: number);
10
+ /**
11
+ * Function for resizing the container.
12
+ * @public
13
+ * @returns {void}
14
+ */
5
15
  resize(): void;
16
+ /**
17
+ * Function for repositioning the container.
18
+ * @protected
19
+ * @abstract
20
+ * @returns {void}
21
+ */
6
22
  protected abstract reposition(): void;
23
+ /**
24
+ * Function for removing children from the registry.
25
+ * @public
26
+ * @abstract
27
+ * @returns {void}
28
+ */
7
29
  abstract removeChildrenFromRegistry(): void;
8
30
  }
@@ -1,11 +1,21 @@
1
1
  import { Container } from "pixi.js";
2
2
  import { globalMinRatio } from "../../utils";
3
+ /**
4
+ * Abstract class for responsive containers.
5
+ * @class ResponsiveContainer
6
+ * @augments {Container}
7
+ */
3
8
  export class ResponsiveContainer extends Container {
4
9
  scaleMultiplier;
5
10
  constructor(scaleMultiplier = 1) {
6
11
  super();
7
12
  this.scaleMultiplier = scaleMultiplier;
8
13
  }
14
+ /**
15
+ * Function for resizing the container.
16
+ * @public
17
+ * @returns {void}
18
+ */
9
19
  resize() {
10
20
  this.y = 0;
11
21
  this.x = 0;
@@ -9,7 +9,9 @@ export declare abstract class SpineWithResumableContainer extends Spine {
9
9
  protected allSpines: Spine[];
10
10
  /**
11
11
  * Sets animation timescale for all spines
12
+ * @public
12
13
  * @param {boolean} flag - flag to set timescale
14
+ * @returns {void}
13
15
  */
14
16
  setAnimationTimescale(flag: boolean): void;
15
17
  }
@@ -22,7 +24,9 @@ export declare abstract class ResumableContainer extends Container {
22
24
  protected allSpines: Spine[];
23
25
  /**
24
26
  * Sets animation timescale for all spines
27
+ * @public
25
28
  * @param {boolean} flag - flag to set timescale
29
+ * @returns {void}
26
30
  */
27
31
  setAnimationTimescale(flag: boolean): void;
28
32
  }
@@ -35,7 +39,9 @@ export declare abstract class SpriteWithResumableContainer extends Sprite {
35
39
  protected allSpines: Spine[];
36
40
  /**
37
41
  * Sets animation timescale for all spines
42
+ * @public
38
43
  * @param {boolean} flag - flag to set timescale
44
+ * @returns {void}
39
45
  */
40
46
  setAnimationTimescale(flag: boolean): void;
41
47
  }
@@ -10,7 +10,9 @@ export class SpineWithResumableContainer extends Spine {
10
10
  allSpines = [];
11
11
  /**
12
12
  * Sets animation timescale for all spines
13
+ * @public
13
14
  * @param {boolean} flag - flag to set timescale
15
+ * @returns {void}
14
16
  */
15
17
  setAnimationTimescale(flag) {
16
18
  this.allSpines.forEach((spine) => setTimeScale(spine, flag));
@@ -25,7 +27,9 @@ export class ResumableContainer extends Container {
25
27
  allSpines = [];
26
28
  /**
27
29
  * Sets animation timescale for all spines
30
+ * @public
28
31
  * @param {boolean} flag - flag to set timescale
32
+ * @returns {void}
29
33
  */
30
34
  setAnimationTimescale(flag) {
31
35
  this.allSpines.forEach((spine) => setTimeScale(spine, flag));
@@ -40,7 +44,9 @@ export class SpriteWithResumableContainer extends Sprite {
40
44
  allSpines = [];
41
45
  /**
42
46
  * Sets animation timescale for all spines
47
+ * @public
43
48
  * @param {boolean} flag - flag to set timescale
49
+ * @returns {void}
44
50
  */
45
51
  setAnimationTimescale(flag) {
46
52
  this.allSpines.forEach((spine) => setTimeScale(spine, flag));
@@ -1,5 +1,16 @@
1
1
  import { Spine } from "pixi-spine";
2
+ /**
3
+ * Class representing a scalable spine.
4
+ * @class ScalableSpine
5
+ * @augments {Spine}
6
+ */
2
7
  export declare class ScalableSpine extends Spine {
3
8
  constructor(spineName: string, animationName: string);
9
+ /**
10
+ * Function for setting the scale
11
+ * @public
12
+ * @param {number} scale scale value to set
13
+ * @returns {void}
14
+ */
4
15
  setScale(scale: number): void;
5
16
  }
@@ -1,5 +1,10 @@
1
1
  import { Spine } from "pixi-spine";
2
2
  import { getSpineData } from "../../utils";
3
+ /**
4
+ * Class representing a scalable spine.
5
+ * @class ScalableSpine
6
+ * @augments {Spine}
7
+ */
3
8
  export class ScalableSpine extends Spine {
4
9
  constructor(spineName, animationName) {
5
10
  super(getSpineData(spineName));
@@ -11,6 +16,12 @@ export class ScalableSpine extends Spine {
11
16
  this.x = 0;
12
17
  this.y = 0;
13
18
  }
19
+ /**
20
+ * Function for setting the scale
21
+ * @public
22
+ * @param {number} scale scale value to set
23
+ * @returns {void}
24
+ */
14
25
  setScale(scale) {
15
26
  this.scale.set(scale);
16
27
  }
@@ -40,12 +40,15 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
40
40
  /**
41
41
  * Function for resolving changing symbols in columns
42
42
  * This is used in games i.e. BoW and MB
43
+ * @public
44
+ * @returns {void}
43
45
  */
44
46
  resolveMysterySpeedUp(): void;
45
47
  /**
46
48
  * Method for adapting to speed level
47
- * @param {SpeedLevel} speedLevel new speed level
48
49
  * @public
50
+ * @param {SpeedLevel} speedLevel new speed level
51
+ * @returns {void}
49
52
  */
50
53
  adaptToSpeed(speedLevel: SpeedLevel): void;
51
54
  /**
@@ -57,11 +60,13 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
57
60
  /**
58
61
  * Function for clearing quick reels stop
59
62
  * @public
63
+ * @returns {void}
60
64
  */
61
65
  clearQuickReelsStop(): void;
62
66
  /**
63
67
  * Function for blind spinning all columns
64
68
  * @public
69
+ * @returns {void}
65
70
  */
66
71
  blindSpin(): void;
67
72
  /**
@@ -75,11 +80,11 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
75
80
  configBlindSpin(finalSymbolReels: SymbolReels, afterSpinResolver: (value: void | PromiseLike<void>) => void, indexesOfReelsToExtendSpinningTime: number[]): Promise<void>;
76
81
  /**
77
82
  * Function for playing all streaks
83
+ * @public
78
84
  * @param {StreakReelsIndexes[]} streaks - The streaks to play
79
85
  * @param {number} amount - The amount to play
80
86
  * @param {SymbolId[]} allSymbols - All symbols to consider
81
87
  * @returns {Promise<void>} - A promise that resolves when all streaks are played
82
- * @public
83
88
  */
84
89
  playAllStreaks(streaks: StreakReelsIndexes[], amount: number, allSymbols?: SymbolId[]): Promise<void>;
85
90
  /**
@@ -90,12 +95,18 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
90
95
  resetPlayedSounds(): void;
91
96
  /**
92
97
  * Function for playing sound depending on the amount
93
- * @public
98
+ * @protected
94
99
  * @param {number} amount - The amount to check
95
100
  * @param {SymbolId[]} _allSymbols - All symbols to consider
96
101
  * @returns {void}
97
102
  */
98
103
  protected playSoundDependingOnAmount(amount: number, _allSymbols?: SymbolId[]): void;
104
+ /**
105
+ * Function for playing streak sounds
106
+ * @protected
107
+ * @param {SymbolId[]} symbols symbols of the streak
108
+ * @returns {void}
109
+ */
99
110
  protected playStreakSound(symbols: SymbolId[]): void;
100
111
  /**
101
112
  * Function for playing animation of streak
@@ -123,10 +134,10 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
123
134
  animate(delta: number): void;
124
135
  /**
125
136
  * Function for getting column at specific position
126
- * @param {number} column index of column
127
- * @returns {AbstractSymbolsColumn} column at specific position
128
137
  * @public
129
138
  * @abstract
139
+ * @param {number} column index of column
140
+ * @returns {AbstractSymbolsColumn} column at specific position
130
141
  */
131
142
  abstract getColumnAtPosition(column: number): AbstractSymbolsColumn;
132
143
  /**
@@ -143,13 +154,14 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
143
154
  stopPlayingSymbolsTransformationInColumns(): void;
144
155
  /**
145
156
  * Function for setting interactivity for all symbols in columns
146
- * @param {boolean} flag - flag for setting interactivity
147
157
  * @public
158
+ * @param {boolean} flag - flag for setting interactivity
148
159
  * @returns {void}
149
160
  */
150
161
  setInteractivityForSymbols(flag: boolean): void;
151
162
  /**
152
163
  * Function for handling multiple symbol transformations
164
+ * @public
153
165
  * @param {DropTransformationDetails} transformations - array of transformations to apply
154
166
  * @param {boolean} skipAnimations - flag for skipping animations
155
167
  * @param {boolean} isStandalone - flag for standalone mode
@@ -166,10 +178,12 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
166
178
  /**
167
179
  * Function for fixing symbols columns position
168
180
  * @public
181
+ * @returns {void}
169
182
  */
170
183
  fixSymbolsColumnsPosition(): void;
171
184
  /**
172
185
  * Function for preparing configuring reels end
186
+ * @protected
173
187
  * @param {SymbolReels} finalSymbolReels - final symbol reels
174
188
  * @returns {PlayableAction[]} - array of playable actions
175
189
  */