@truelab/truengine 0.0.1-0

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 (122) hide show
  1. package/dist/truengine.es.js +35354 -0
  2. package/dist/types/index.d.ts +2 -0
  3. package/dist/types/src/classes/assets.class.d.ts +89 -0
  4. package/dist/types/src/classes/bitmap.text.class.d.ts +77 -0
  5. package/dist/types/src/classes/borderview.class.d.ts +204 -0
  6. package/dist/types/src/classes/color.class.d.ts +72 -0
  7. package/dist/types/src/classes/container.class.d.ts +111 -0
  8. package/dist/types/src/classes/di.class.d.ts +110 -0
  9. package/dist/types/src/classes/emitter.class.d.ts +64 -0
  10. package/dist/types/src/classes/engine.class.d.ts +75 -0
  11. package/dist/types/src/classes/loaders.class.d.ts +28 -0
  12. package/dist/types/src/classes/preloader.class.d.ts +15 -0
  13. package/dist/types/src/classes/producer.class.d.ts +135 -0
  14. package/dist/types/src/classes/sequence.class.d.ts +30 -0
  15. package/dist/types/src/classes/skipable.class.d.ts +15 -0
  16. package/dist/types/src/classes/spine.assets.class.d.ts +42 -0
  17. package/dist/types/src/classes/tile.class.d.ts +38 -0
  18. package/dist/types/src/components/abstract.component.d.ts +52 -0
  19. package/dist/types/src/components/abstract.html.component.d.ts +43 -0
  20. package/dist/types/src/components/bigwin.component.d.ts +109 -0
  21. package/dist/types/src/components/blackout.component.d.ts +32 -0
  22. package/dist/types/src/components/button.component.d.ts +113 -0
  23. package/dist/types/src/components/button.faded.component.d.ts +29 -0
  24. package/dist/types/src/components/button.text.component.d.ts +49 -0
  25. package/dist/types/src/components/cheat.component.d.ts +63 -0
  26. package/dist/types/src/components/fillframe.component.d.ts +37 -0
  27. package/dist/types/src/components/fps.component.d.ts +39 -0
  28. package/dist/types/src/components/grid.component.d.ts +28 -0
  29. package/dist/types/src/components/link.component.d.ts +78 -0
  30. package/dist/types/src/components/particles.component.d.ts +30 -0
  31. package/dist/types/src/components/progress.component.d.ts +42 -0
  32. package/dist/types/src/components/slideshow/slides.reel.component.d.ts +65 -0
  33. package/dist/types/src/components/slideshow/slideshow.component.d.ts +27 -0
  34. package/dist/types/src/components/slideshow/slideshow.ui.component.d.ts +28 -0
  35. package/dist/types/src/components/slideshow/slideshow.ui.pagination.d.ts +30 -0
  36. package/dist/types/src/components/slot/coefficient/coefficient.component.d.ts +66 -0
  37. package/dist/types/src/components/slot/frames/frames.component.d.ts +39 -0
  38. package/dist/types/src/components/slot/frames/frames.sequence.component.d.ts +17 -0
  39. package/dist/types/src/components/slot/frames/frames.spine.component.d.ts +21 -0
  40. package/dist/types/src/components/slot/hints/hints.component.d.ts +102 -0
  41. package/dist/types/src/components/slot/intrigue/intrigue.component.d.ts +41 -0
  42. package/dist/types/src/components/slot/intrigue/intrigue.spine.component.d.ts +18 -0
  43. package/dist/types/src/components/slot/lines/lines.component.d.ts +29 -0
  44. package/dist/types/src/components/slot/lines/lines.static.component.d.ts +38 -0
  45. package/dist/types/src/components/slot/reel.component.d.ts +253 -0
  46. package/dist/types/src/components/slot/slot.cheats.d.ts +22 -0
  47. package/dist/types/src/components/slot/slot.component.d.ts +132 -0
  48. package/dist/types/src/components/slot/slot.config.d.ts +82 -0
  49. package/dist/types/src/components/slot/symbol/symbol.component.d.ts +84 -0
  50. package/dist/types/src/components/slot/symbol/symbol.sequence.component.d.ts +18 -0
  51. package/dist/types/src/components/slot/symbol/symbol.spine.component.d.ts +18 -0
  52. package/dist/types/src/components/switch.component.d.ts +62 -0
  53. package/dist/types/src/components/text.component.d.ts +101 -0
  54. package/dist/types/src/components/volatility/volatility.component.d.ts +55 -0
  55. package/dist/types/src/components/volatility/volatility.symbol.component.d.ts +20 -0
  56. package/dist/types/src/extends/enum.types.d.ts +36 -0
  57. package/dist/types/src/extends/interfaces.d.ts +74 -0
  58. package/dist/types/src/extends/javascript.d.ts +5 -0
  59. package/dist/types/src/extends/short.types.d.ts +68 -0
  60. package/dist/types/src/extends/struct.types.d.ts +260 -0
  61. package/dist/types/src/functions/agent.funcs.d.ts +84 -0
  62. package/dist/types/src/functions/animate/counter.func.d.ts +10 -0
  63. package/dist/types/src/functions/animate/fadein.func.d.ts +8 -0
  64. package/dist/types/src/functions/animate/fadeout.func.d.ts +8 -0
  65. package/dist/types/src/functions/animate/from.func.d.ts +10 -0
  66. package/dist/types/src/functions/animate/fromto.func.d.ts +11 -0
  67. package/dist/types/src/functions/animate/to.func.d.ts +10 -0
  68. package/dist/types/src/functions/array/indexofall.func.d.ts +2 -0
  69. package/dist/types/src/functions/array/position.func.d.ts +6 -0
  70. package/dist/types/src/functions/array/unique.func.d.ts +6 -0
  71. package/dist/types/src/functions/arraysintersect.func.d.ts +2 -0
  72. package/dist/types/src/functions/cache.funcs.d.ts +20 -0
  73. package/dist/types/src/functions/cheats.func.d.ts +2 -0
  74. package/dist/types/src/functions/convert/tofixed.func.d.ts +9 -0
  75. package/dist/types/src/functions/debug/container.func.d.ts +7 -0
  76. package/dist/types/src/functions/debug/line.func.d.ts +10 -0
  77. package/dist/types/src/functions/demotexture.func.d.ts +3 -0
  78. package/dist/types/src/functions/dom.funcs.d.ts +6 -0
  79. package/dist/types/src/functions/draw/canvasExtract.func.d.ts +16 -0
  80. package/dist/types/src/functions/draw/gradient.texture.func.d.ts +14 -0
  81. package/dist/types/src/functions/draw/radialGradient.func.d.ts +20 -0
  82. package/dist/types/src/functions/draw/rect.func.d.ts +12 -0
  83. package/dist/types/src/functions/draw/reel.func.d.ts +9 -0
  84. package/dist/types/src/functions/engine.funcs.d.ts +63 -0
  85. package/dist/types/src/functions/is.funcs.d.ts +16 -0
  86. package/dist/types/src/functions/math.funcs.d.ts +38 -0
  87. package/dist/types/src/functions/number/between.func.d.ts +7 -0
  88. package/dist/types/src/functions/object/deepMerge.d.ts +7 -0
  89. package/dist/types/src/functions/random/exclude.func.d.ts +6 -0
  90. package/dist/types/src/functions/random/inrange.func.d.ts +6 -0
  91. package/dist/types/src/functions/random/value.func.d.ts +10 -0
  92. package/dist/types/src/functions/range.func.d.ts +3 -0
  93. package/dist/types/src/functions/speed/duration.func.d.ts +6 -0
  94. package/dist/types/src/functions/speed/mode.func.d.ts +7 -0
  95. package/dist/types/src/functions/time/full.func.d.ts +4 -0
  96. package/dist/types/src/functions/time/nowfull.func.d.ts +4 -0
  97. package/dist/types/src/functions/time/nowshort.func.d.ts +5 -0
  98. package/dist/types/src/functions/time/short.func.d.ts +7 -0
  99. package/dist/types/src/functions/timeline/create.funcs.d.ts +8 -0
  100. package/dist/types/src/functions/timeline/taps.func.d.ts +4 -0
  101. package/dist/types/src/functions/window/add.func.d.ts +7 -0
  102. package/dist/types/src/functions/window/get.func.d.ts +6 -0
  103. package/dist/types/src/index.d.ts +62 -0
  104. package/dist/types/src/plugins/dragon.bones/functions.d.ts +18 -0
  105. package/dist/types/src/plugins/dragon.bones/library.d.ts +875 -0
  106. package/dist/types/src/plugins/gsap/custom.ease.plugin.d.ts +2 -0
  107. package/dist/types/src/plugins/gsap/motion.path.plugin.d.ts +2 -0
  108. package/dist/types/src/plugins/modernizr/modernizr-custom.d.ts +1 -0
  109. package/dist/types/src/references.d.ts +4 -0
  110. package/dist/types/src/scenes/abstract.scene.d.ts +73 -0
  111. package/dist/types/src/scenes/background.scene.d.ts +35 -0
  112. package/dist/types/src/scenes/masked.scene.d.ts +15 -0
  113. package/dist/types/src/services/focus.services.d.ts +17 -0
  114. package/dist/types/src/services/iframe.service.d.ts +27 -0
  115. package/dist/types/src/services/langs.service.d.ts +31 -0
  116. package/dist/types/src/services/registry.service.d.ts +29 -0
  117. package/dist/types/src/services/settings.service.d.ts +51 -0
  118. package/dist/types/src/services/skip.service.d.ts +51 -0
  119. package/dist/types/src/services/sounds/sounds.service.d.ts +111 -0
  120. package/dist/types/src/services/storage.service.d.ts +38 -0
  121. package/dist/types/vite.config.d.ts +2 -0
  122. package/package.json +33 -0
@@ -0,0 +1,74 @@
1
+ import { IEmitter } from '../classes/emitter.class';
2
+ import { IProducer } from '../classes/producer.class';
3
+ import { SettingsService } from '../services/settings.service';
4
+ import { TCallbackVoid, TMixedObject, TSupportContainer, TSupportMask } from './short.types';
5
+ import * as PIXI from 'pixi.js';
6
+ export type INamed = {
7
+ name: string;
8
+ };
9
+ export type IContainer = {
10
+ scaleX: number;
11
+ scaleY: number;
12
+ link(to: unknown, properties: string[], methods?: string[]): void;
13
+ disabled(to: unknown, onDisabled: TCallbackVoid, onEnabled: TCallbackVoid): void;
14
+ hide(): IContainer;
15
+ show(): IContainer;
16
+ setMask(graphics: TSupportMask): TSupportMask;
17
+ removeMask(): IContainer;
18
+ setBackground(sprite: PIXI.Sprite, offsetX?: number, offsetY?: number, angle?: number): IContainer;
19
+ setCenterPivot(): IContainer;
20
+ setPivot(xPos: number, yPos: number): IContainer;
21
+ centeredTo(toContainer: IContainer, offsetX: number, offsetY: number): IContainer;
22
+ centered(): IContainer;
23
+ } & INamed & PIXI.Container;
24
+ export type IScene = {
25
+ instance: IContainer;
26
+ producer: IProducer;
27
+ alpha: number;
28
+ destroyed: boolean;
29
+ hidden: boolean;
30
+ create(): Promise<boolean>;
31
+ destroy(): Promise<boolean>;
32
+ processing?(response: TMixedObject, isLast: boolean): Promise<TMixedObject>;
33
+ adaptive?(modeChanged?: boolean): Promise<void>;
34
+ show(): Promise<void>;
35
+ hide(): Promise<void>;
36
+ } & INamed & IEmitter;
37
+ export type IComponent = {
38
+ instance: TSupportContainer;
39
+ width: number;
40
+ height: number;
41
+ alpha: number;
42
+ rotation: number;
43
+ position: PIXI.IPoint;
44
+ x: number;
45
+ y: number;
46
+ scale: PIXI.IPoint;
47
+ scaleX: number;
48
+ scaleY: number;
49
+ created: boolean;
50
+ disabled?: boolean;
51
+ create(instance?: TSupportContainer): Promise<IComponent>;
52
+ destroy(): Promise<IComponent>;
53
+ draw(modeChanged?: boolean): Promise<IComponent>;
54
+ show(): Promise<void>;
55
+ hide(): Promise<void>;
56
+ } & INamed;
57
+ export type IComponentHTML = {
58
+ instance: null;
59
+ element: HTMLElement;
60
+ created: boolean;
61
+ create(): Promise<IComponentHTML>;
62
+ destroy(): Promise<IComponentHTML>;
63
+ draw(modeChanged?: boolean): Promise<IComponentHTML>;
64
+ show(): Promise<void>;
65
+ hide(): Promise<void>;
66
+ } & INamed;
67
+ export type IPixiEngine = {
68
+ name: string;
69
+ start(): PIXI.Application;
70
+ stop(): PIXI.Application;
71
+ get<T = string>(name: string, def: T): T;
72
+ set(name: string, value: unknown): SettingsService;
73
+ };
74
+ export type IService = NonNullable<unknown>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Если шрифт языка не поддерживает верхний регистр, то вызовите эту функцию.
3
+ * Тогда .toUppercase() не сломает переводы.
4
+ */
5
+ export declare const langDoesNotSupportUppercase: () => void;
@@ -0,0 +1,68 @@
1
+ import { EDevice, EOrientation } from '../classes/borderview.class';
2
+ import { IComponent, IComponentHTML, IContainer, IPixiEngine, IService } from './interfaces';
3
+ import * as PIXI from 'pixi.js';
4
+ /**
5
+ * @rules
6
+ * - файл для наших типов и их сокращений
7
+ * - если тип используется всего один раз его не нужно объявлять
8
+ * - если тип используется несколько раз - выносим его сюда
9
+ * - имя типа всегда делаем с большой буквы T для удобства в подсказках
10
+ * - если вы видите что уже есть подходящий тип но назначение иное - лучше создайте еще один тип для своего кода
11
+ */
12
+ /** @aliases */
13
+ export type TEngine = IPixiEngine;
14
+ export type TComponents = IComponent | IComponentHTML;
15
+ export type TSupportContainer = IContainer & PIXI.Container;
16
+ export type TSupportAnimate = IContainer & PIXI.Container & PIXI.Sprite;
17
+ export type TSupportMask = PIXI.Graphics | PIXI.Sprite;
18
+ /** @callbacks */
19
+ export type TCallbackVoid = (...args: any[]) => void;
20
+ export type TCallbackAsync<T = void> = (...args: any[]) => Promise<T>;
21
+ export type TCallbackService = () => IService;
22
+ /** @functions */
23
+ export type TResolve = (value?: void | PromiseLike<void>) => void;
24
+ /** @arrays */
25
+ export type TStringArray = string[];
26
+ export type TNumberArray = number[];
27
+ export type TNumberArrays = TNumberArray[];
28
+ /** @objects */
29
+ export type TGenericObject<T> = Record<string, T>;
30
+ export type TMixedObject = Record<string, any>;
31
+ export type TNumericObject = Record<string, number>;
32
+ export type TLangsReplace = Record<string, string>;
33
+ export type TScenePayload = {
34
+ scene: string;
35
+ payload: TMixedObject;
36
+ };
37
+ export type TSceneResponse = TScenePayload[];
38
+ /** @pixi @shorttypes */
39
+ export type TPixiPoint = PIXI.Point;
40
+ export type TPixiEvent = PIXI.InteractionEvent;
41
+ export type TPixiSprite = PIXI.Sprite;
42
+ export type TPixiTexture = PIXI.Texture;
43
+ export type TPixiTextures = PIXI.Texture[];
44
+ export type TPixiText = PIXI.Text;
45
+ export type TPixiTextStyle = PIXI.TextStyle;
46
+ export type TPixiBitmapText = PIXI.BitmapText;
47
+ export type TPixiSpritesheet = PIXI.Spritesheet;
48
+ export type TPixiAnimatedSprite = PIXI.AnimatedSprite;
49
+ export type TPixiDisplayObject = PIXI.DisplayObject;
50
+ export type TPixiFrameObject = PIXI.FrameObject;
51
+ export type TPixiAnimations = TPixiFrameObject[];
52
+ export type TPixiFill = string | number | string[] | number[] | CanvasGradient | CanvasPattern;
53
+ /** @calculated */
54
+ export type TInterval = ReturnType<typeof setInterval>;
55
+ export type TTimeout = ReturnType<typeof setTimeout>;
56
+ /** @gsap @shorttypes */
57
+ export type TGsapTween = gsap.core.Tween;
58
+ export type TGsapTimeline = gsap.core.Timeline;
59
+ export type TDeviceConfig<T> = {
60
+ [key in EDevice]?: T;
61
+ };
62
+ export type TOrientationConfig<T> = {
63
+ [key in EOrientation]?: T;
64
+ };
65
+ export type TDeviceOrientationConfig<T> = TDeviceConfig<TOrientationConfig<T>>;
66
+ export type TConstructor<T> = new (...args: any[]) => T;
67
+ export type TGsapEase = string | gsap.EaseFunction;
68
+ export type TTimeScale = [number, number];
@@ -0,0 +1,260 @@
1
+ import { TCheat } from '../components/cheat.component';
2
+ import { EPromoType } from './enum.types';
3
+ import { TGenericObject, TMixedObject, TResolve } from './short.types';
4
+ import * as PIXI from 'pixi.js';
5
+ export type TAnimateOptions = {
6
+ duration: number;
7
+ ease?: string;
8
+ delay?: number;
9
+ yoyo?: boolean;
10
+ repeat?: number;
11
+ onComplete?: TResolve;
12
+ };
13
+ export type TComponentProperties = {
14
+ width: number;
15
+ height: number;
16
+ alpha: number;
17
+ position: PIXI.IPoint;
18
+ x: number;
19
+ y: number;
20
+ rotation: number;
21
+ scale: PIXI.IPoint;
22
+ scaleX: number;
23
+ scaleY: number;
24
+ };
25
+ export type TButtonTexturesNames = {
26
+ disable: string;
27
+ origin: string;
28
+ hover: string;
29
+ click: string;
30
+ };
31
+ export type TAutoButtonTexturesNames = {
32
+ disable: string;
33
+ origin: string;
34
+ hover: string;
35
+ click: string;
36
+ icon: string;
37
+ countdown: string;
38
+ };
39
+ export type TButtonTexturesPair = {
40
+ on: TButtonTexturesNames;
41
+ off: TButtonTexturesNames;
42
+ };
43
+ export type TPosition = {
44
+ x: number;
45
+ y: number;
46
+ };
47
+ export type TPromo = {
48
+ type: EPromoType;
49
+ issued: number;
50
+ count: number;
51
+ totalWon: number;
52
+ failed?: boolean;
53
+ };
54
+ export type TBetPublic = {
55
+ uuid: string;
56
+ balance: number;
57
+ coinValue: number;
58
+ amount: number;
59
+ currency: string;
60
+ session: string;
61
+ won: number;
62
+ coefficients: number;
63
+ gameResponse: TMixedObject;
64
+ status: number;
65
+ };
66
+ export type TRollResponse = {
67
+ status: boolean;
68
+ balance?: number;
69
+ bet?: TBetPublic;
70
+ replay?: {
71
+ betIndex: number;
72
+ balance: number;
73
+ };
74
+ promotools?: TPromo[];
75
+ code?: number;
76
+ message?: string;
77
+ custom?: TMixedObject;
78
+ };
79
+ export type TResponse = {
80
+ gameResponse: TMixedObject;
81
+ win: number;
82
+ balance?: number;
83
+ };
84
+ export type TEngineSettings = {
85
+ [key: string]: unknown;
86
+ win?: number;
87
+ balance?: number;
88
+ currency?: string;
89
+ coinLevel?: number;
90
+ coinValues?: string[];
91
+ cashBets?: number[];
92
+ debug?: boolean;
93
+ cheat?: TCheat;
94
+ localization?: string;
95
+ commit?: string;
96
+ rulesVersion?: string;
97
+ rulesDate?: string;
98
+ rtp?: string;
99
+ limitBets?: number;
100
+ limitWin?: number;
101
+ session?: string;
102
+ casinoUrl?: string;
103
+ returnUrl?: string;
104
+ demo?: boolean;
105
+ sounds?: boolean;
106
+ soundsAmbience?: boolean;
107
+ soundsEffects?: boolean;
108
+ soundsVolume?: number;
109
+ welcomeModalSupported?: boolean;
110
+ welcomeModalEnabled?: boolean;
111
+ skipSupported?: boolean;
112
+ skipActive?: boolean;
113
+ fastPlaySupported?: boolean;
114
+ fastPlayEnabled?: boolean;
115
+ };
116
+ export type TConfigResponse = {
117
+ settings: TEngineSettings;
118
+ langs: TGenericObject<string>;
119
+ status: boolean;
120
+ message?: string;
121
+ };
122
+ export type TPoint = {
123
+ x: number;
124
+ y: number;
125
+ };
126
+ export type TTextParams = {
127
+ x: number;
128
+ y: number;
129
+ text: string;
130
+ slug?: string;
131
+ style?: PIXI.TextStyle;
132
+ pivot?: [number, number];
133
+ maxWidth?: number;
134
+ };
135
+ export type TBitmapStyle = {
136
+ fontName: string;
137
+ fontSize?: number;
138
+ align?: string;
139
+ tint?: number;
140
+ letterSpacing?: number;
141
+ maxWidth?: number;
142
+ };
143
+ export type TSymbolsPayoutBase = {
144
+ /** Symbol code, e. g. `11 - wild`, `2 - low#2 (blue gem)` */
145
+ symbol: number;
146
+ /** Winning for the symbol combination in coins by pay table */
147
+ coins: number;
148
+ /** Line/way length or cluster size */
149
+ length: number;
150
+ /** Positions on the field which cause the winning combination */
151
+ positions: number[];
152
+ };
153
+ export type TSymbolMoveBase = {
154
+ /** Position where from symbol should move */
155
+ from: number;
156
+ /** Destination position */
157
+ to: number;
158
+ };
159
+ export type TSymbolPositionsBase = {
160
+ /** Positions of gaps which appeared after disappearance of winning symbols of previous field and moving of hanging symbols */
161
+ in?: number[];
162
+ /** All positions which should be disappeared */
163
+ out?: number[];
164
+ /** Set of moves of hanging symbols */
165
+ move?: TSymbolMoveBase[];
166
+ };
167
+ export type TSymbolsBase = {
168
+ /** Total win amount for all symbols in coins */
169
+ coins: number;
170
+ /** Original symbols codes appeared on the field. Index of array is position */
171
+ original: number[];
172
+ /** Final symbol codes after applying all features (`sticky`, `mystery`, etc.) */
173
+ final: number[];
174
+ /** Information about symbols movements */
175
+ positions?: TSymbolPositionsBase;
176
+ /** Describes winnings of final symbols by pay table (using classic mechanics - `lines`, `ways`, `clusters`) */
177
+ payouts: TSymbolsPayoutBase[];
178
+ };
179
+ export type TFeaturePayoutBase = {
180
+ /** Win amount in coins */
181
+ coins: number;
182
+ };
183
+ export type TFeatureBase<TValue = number, TPayout = TFeaturePayoutBase> = {
184
+ /** Positions are used for features which affect symbols on the playground */
185
+ positions: number[];
186
+ /** New symbols affected by the feature */
187
+ previousPositions: number[];
188
+ /** Previous positions of movable symbols affected by the feature */
189
+ newPositions: number[];
190
+ /** Some values provided by feature. (multipliers, cumulative things, gameplay information, etc.) */
191
+ values: TValue[];
192
+ /** New values for dynamic count */
193
+ newValues: TValue[];
194
+ /** Previous values of dynamic feature */
195
+ previousValues: TValue[];
196
+ /** Describe additional winnings of the feature (wheel, total multiplier, etc.) */
197
+ payouts: TPayout[];
198
+ };
199
+ export type TFieldBase = {
200
+ /** Total win amount in coins - sum of wins for all symbols and features */
201
+ coins: number;
202
+ /** Information about symbols positions and its payouts */
203
+ symbols: TSymbolsBase;
204
+ /** Information about all features on the field */
205
+ features: Record<string, Partial<TFeatureBase>>;
206
+ };
207
+ export type TSpinBase = {
208
+ /** Total win amount in coins - sum of wins of fields */
209
+ coins: number;
210
+ /** Single field for non-cluster games or list of cascading fields */
211
+ fields: TFieldBase[];
212
+ added?: number | number[];
213
+ addedType?: string | string[];
214
+ };
215
+ export type TGameBase = {
216
+ /** Type of game, e.g. "regular", "respins", "freespinsSticky", "freespinsRandom" */
217
+ type: string;
218
+ /** Total win amount in coins - sum of wins of spins of the game */
219
+ coins: number;
220
+ /** List of spins of the game */
221
+ spins: TSpinBase[];
222
+ };
223
+ export type TStepBase = {
224
+ /** List of games of the step */
225
+ games: TGameBase[];
226
+ /** Final result information */
227
+ totalResults: {
228
+ /** Total win amount in coins - sum of wins of all spins */
229
+ coins: number;
230
+ /** `true` if max win amount was reached */
231
+ hasMaxWin: boolean;
232
+ };
233
+ };
234
+ export type TMetaBase = {
235
+ /** Service end-to-end data for additional calculations */
236
+ private: TMixedObject;
237
+ /** Cumulative progress or state between bets */
238
+ public: TMixedObject;
239
+ };
240
+ export type TRngBase = {
241
+ value: number;
242
+ };
243
+ export type TResponseBase = {
244
+ step: TStepBase;
245
+ rng: TRngBase[];
246
+ };
247
+ export type TSymbolsPayoutLinesBase = TSymbolsPayoutBase & {
248
+ /** Positions of full payline */
249
+ line: number[];
250
+ };
251
+ export type TSymbolsPayoutWaysBase = TSymbolsPayoutBase & {
252
+ /** Count of ways for the symbol code */
253
+ ways: number;
254
+ };
255
+ export type TSymbolsPayoutClustersBase = TSymbolsPayoutBase & TMixedObject;
256
+ export type TSymbolsPayoutDynamicBase = TSymbolsPayoutBase & TMixedObject;
257
+ export type TFieldDynamicBase = TFieldBase & {
258
+ /** Symbols positions presented as matrix - `[iRow, iReel]` */
259
+ grid: [number, number][];
260
+ };
@@ -0,0 +1,84 @@
1
+ /**
2
+ * getUserAgent
3
+ */
4
+ export declare function getUserAgent(): string;
5
+ /**
6
+ * isMobile
7
+ */
8
+ export declare function isMobile(): boolean;
9
+ /**
10
+ * isDesktop
11
+ */
12
+ export declare function isDesktop(): boolean;
13
+ /**
14
+ * isIEMobile
15
+ */
16
+ export declare function isIEMobile(): boolean;
17
+ /**
18
+ * isTablet
19
+ */
20
+ export declare function isTablet(): boolean;
21
+ /**
22
+ * isFirefox
23
+ */
24
+ export declare function isFirefox(): boolean;
25
+ /**
26
+ * isEdge
27
+ */
28
+ export declare function isEdge(): boolean;
29
+ /**
30
+ * isSafari
31
+ */
32
+ export declare function isSafari(): boolean;
33
+ /**
34
+ * isIOS
35
+ */
36
+ export declare function isIOS(): boolean;
37
+ /**
38
+ * isMac
39
+ */
40
+ export declare function isMac(): boolean;
41
+ /**
42
+ * isIPhone
43
+ */
44
+ export declare function isIPhone(): boolean;
45
+ /**
46
+ * isAndroid
47
+ */
48
+ export declare function isAndroid(): boolean;
49
+ /**
50
+ * isAndroidTablet
51
+ */
52
+ export declare function isAndroidTablet(): boolean;
53
+ /**
54
+ * isNativeApp
55
+ */
56
+ export declare function isNativeApp(): boolean;
57
+ /**
58
+ * isPortraitMode
59
+ */
60
+ export declare function isPortraitMode(): boolean;
61
+ /**
62
+ * isLandscapeMode
63
+ */
64
+ export declare function isLandscapeMode(): boolean;
65
+ /** Для определения ориентации платформы (есть проблема на Windows в режиме эмуляции mobile) */
66
+ export declare function isPlatformPortraitMode(): boolean;
67
+ /** Для определения ориентации платформы */
68
+ export declare function isPlatformLandscapeMode(): boolean;
69
+ /**
70
+ * isSmallScreenSize
71
+ */
72
+ export declare function isSmallScreenSize(): boolean;
73
+ /**
74
+ * isRetina
75
+ */
76
+ export declare function isRetina(): boolean;
77
+ /**
78
+ * inIframe
79
+ */
80
+ export declare function inIframe(): boolean;
81
+ /** isWebpSupported */
82
+ export declare function isWebpSupported(): boolean;
83
+ /** isFullscreenSupported */
84
+ export declare function isFullscreenSupported(): boolean;
@@ -0,0 +1,10 @@
1
+ import { TGsapTween } from '../../extends/short.types';
2
+ /**
3
+ * Анимация цифр
4
+ * @param from от значения
5
+ * @param to к значению
6
+ * @param onUpdate передаем промежуточное значение
7
+ * @param duration продолжительность счетчика
8
+ * @refactoring избавиться от умножения/деления на k
9
+ */
10
+ export declare function animateCounter(from: number, to: number, onUpdate?: (counter: number) => void, duration?: number): TGsapTween;
@@ -0,0 +1,8 @@
1
+ import { IContainer } from '../../extends/interfaces';
2
+ import { TGsapTween } from '../../extends/short.types';
3
+ /**
4
+ * Показать контейнер (fade in)
5
+ * @param container
6
+ * @param duration
7
+ */
8
+ export declare function animateFadeIn(container: IContainer, duration?: number): TGsapTween;
@@ -0,0 +1,8 @@
1
+ import { IContainer } from '../../extends/interfaces';
2
+ import { TGsapTween } from '../../extends/short.types';
3
+ /**
4
+ * Скрыть контейнер (fade out)
5
+ * @param container
6
+ * @param duration
7
+ */
8
+ export declare function animateFadeOut(container: IContainer, duration?: number): TGsapTween;
@@ -0,0 +1,10 @@
1
+ import { TGsapTween, TMixedObject } from '../../extends/short.types';
2
+ import { TAnimateOptions } from '../../extends/struct.types';
3
+ /**
4
+ * Обратный аниматор состояния от указанных свойств до текущего
5
+ * @param target - анимируемый элемент
6
+ * @param vars - объект опций начальных значений анимации
7
+ * @param kill - указать {false}, если нужно параллельно запустить анимацию
8
+ * на том же объекте, {true} - убивать предыдущий твин на target
9
+ */
10
+ export declare function animateFrom(target: gsap.TweenTarget, vars: TAnimateOptions | TMixedObject, kill?: boolean): TGsapTween;
@@ -0,0 +1,11 @@
1
+ import { TGsapTween, TMixedObject } from '../../extends/short.types';
2
+ import { TAnimateOptions } from '../../extends/struct.types';
3
+ /**
4
+ * Аниматор с возможностью указать стартовые и конечные свойства
5
+ * @param target - анимируемый элемент
6
+ * @param fromVars - объект опций начальных значений анимации
7
+ * @param toVars - объект опций конечных значений анимации
8
+ * @param kill - указать {false}, если нужно параллельно запустить анимацию
9
+ * на том же объекте, {true} - убивать предыдущий твин на target
10
+ */
11
+ export declare function animateFromTo(target: gsap.TweenTarget, fromVars: TMixedObject, toVars: TAnimateOptions | TMixedObject, kill?: boolean): TGsapTween;
@@ -0,0 +1,10 @@
1
+ import { TGsapTween, TMixedObject } from '../../extends/short.types';
2
+ import { TAnimateOptions } from '../../extends/struct.types';
3
+ /**
4
+ * Аниматор от текущего состояния до указанных свойств
5
+ * @param target - анимируемый элемент
6
+ * @param vars - объект опций конечных значений анимации
7
+ * @param kill - указать {false}, если нужно параллельно запустить анимацию
8
+ * на том же объекте, {true} - убивать предыдущий твин на target
9
+ */
10
+ export declare function animateTo(target: gsap.TweenTarget, vars: TAnimateOptions | TMixedObject, kill?: boolean): TGsapTween;
@@ -0,0 +1,2 @@
1
+ /** */
2
+ export declare function arrayIndexOfAll<T>(array: T[], value: unknown): number[];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Вычисляет позицию в распределении и возвращает элемент из массива
3
+ * @param value любое число диапазона
4
+ * @param array элементы распределенные по диапазону
5
+ */
6
+ export declare function arrayPosition<T = string>(input: number, total: number, array: T[]): T;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Вернет массив с уникальными значениями, без повторяющихся
3
+ * @param values
4
+ * @returns
5
+ */
6
+ export declare function arrayUnique<T = number>(values: T[]): T[];
@@ -0,0 +1,2 @@
1
+ /** */
2
+ export declare function arraysIntersect(array1: unknown[], array2: unknown[]): boolean;
@@ -0,0 +1,20 @@
1
+ export type TDebounce = {
2
+ call: () => void;
3
+ cancel: () => void;
4
+ };
5
+ /**
6
+ * Закешировать результаты колбека
7
+ * @param key
8
+ * @param callback
9
+ */
10
+ export declare function once<T = string>(key: string, callback: () => T): T;
11
+ /**
12
+ * Очистить закешированные результаты колбеков
13
+ */
14
+ export declare function clear(key: string): void;
15
+ /**
16
+ * @description Ограничить количество вызовов функции за период времени
17
+ * @_callback {CallableFunction} исполняемая функция
18
+ * @duration {number} - время в ms, вызывать @callback не чаще чем 1 раз за время @duration
19
+ */
20
+ export declare function debounce(callback: CallableFunction, duration: number): TDebounce;
@@ -0,0 +1,2 @@
1
+ /** */
2
+ export declare const isCheatsAvailable: () => boolean;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Приводит входное значение к нормальному округленному числу с нужным количеством знаков после точки.
3
+ * Если длина вещественной части числа больше 6 символов, то лишние нули справа обрезаются.
4
+ * + toFixed() 0.00000200
5
+ * + replace() 0.000002
6
+ * @param value значение для приведения к нормальному виду
7
+ * @param decimals длина хвоста
8
+ */
9
+ export declare function convertToFixed(value: number, decimals: number): string;
@@ -0,0 +1,7 @@
1
+ import { TSupportContainer } from '../../extends/short.types';
2
+ import * as PIXI from 'pixi.js';
3
+ /**
4
+ * Контейнер
5
+ * @param instance
6
+ */
7
+ export declare function debugContainer(instance: TSupportContainer): PIXI.Graphics;
@@ -0,0 +1,10 @@
1
+ import { IContainer } from '../../extends/interfaces';
2
+ import { TPosition } from '../../extends/struct.types';
3
+ import * as PIXI from 'pixi.js';
4
+ /**
5
+ * Линия
6
+ * @param from
7
+ * @param to
8
+ * @param instance
9
+ */
10
+ export declare function debugLine(from: TPosition, to: TPosition, instance?: IContainer): PIXI.Graphics;
@@ -0,0 +1,3 @@
1
+ import { TPixiTexture } from '../extends/short.types';
2
+ /** Demo symbol texture */
3
+ export declare function demoTexture(code: number, height?: number, color?: number, isMotion?: boolean): TPixiTexture;
@@ -0,0 +1,6 @@
1
+ /** */
2
+ export declare const loadResources: (href: string | string[], rel?: string, as?: string, type?: string) => void;
3
+ /** */
4
+ export declare function loadCSS(href: string): Promise<Event>;
5
+ /** */
6
+ export declare function loadJS(src: string): Promise<Event>;
@@ -0,0 +1,16 @@
1
+ import * as PIXI from 'pixi.js';
2
+ /** Экспортирует DisplayObject как изображение
3
+ * @param displayObject - элемент
4
+ * @returns Тег <img ... />
5
+ */
6
+ export declare function displayObjectToImage(displayObject: PIXI.DisplayObject): HTMLImageElement;
7
+ /** Экспортирует DisplayObject в base64
8
+ * @param displayObject - элемент
9
+ * @returns base64
10
+ */
11
+ export declare function displayObjectToBase64(displayObject: PIXI.DisplayObject): string;
12
+ /** Экспортирует DisplayObject в base64
13
+ * @param displayObject - элемент
14
+ * @returns PIXI.Texture
15
+ */
16
+ export declare function displayObjectToTexture(displayObject: PIXI.DisplayObject, options: PIXI.IGenerateTextureOptions): PIXI.RenderTexture;