@rb-games/core 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 (388) hide show
  1. package/README.md +488 -0
  2. package/dist/devtools/DraggableController.d.ts +10 -0
  3. package/dist/devtools/DraggableController.d.ts.map +1 -0
  4. package/dist/devtools/ResizableController.d.ts +19 -0
  5. package/dist/devtools/ResizableController.d.ts.map +1 -0
  6. package/dist/devtools/index.d.ts +7 -0
  7. package/dist/devtools/index.d.ts.map +1 -0
  8. package/dist/devtools/index.js +884 -0
  9. package/dist/devtools/index.js.map +1 -0
  10. package/dist/devtools/overlayPlugin.d.ts +3 -0
  11. package/dist/devtools/overlayPlugin.d.ts.map +1 -0
  12. package/dist/devtools/spinePropertiesPlugin.d.ts +3 -0
  13. package/dist/devtools/spinePropertiesPlugin.d.ts.map +1 -0
  14. package/dist/devtools/spriteTextPropertiesPlugin.d.ts +3 -0
  15. package/dist/devtools/spriteTextPropertiesPlugin.d.ts.map +1 -0
  16. package/dist/devtools/treePlugin.d.ts +7 -0
  17. package/dist/devtools/treePlugin.d.ts.map +1 -0
  18. package/dist/engine/PixiEngine.d.ts +404 -0
  19. package/dist/engine/PixiEngine.d.ts.map +1 -0
  20. package/dist/engine/index.d.ts +2 -0
  21. package/dist/engine/index.d.ts.map +1 -0
  22. package/dist/engine/index.js +1818 -0
  23. package/dist/engine/index.js.map +1 -0
  24. package/dist/filters/ChromaKeyFilter.d.ts +64 -0
  25. package/dist/filters/ChromaKeyFilter.d.ts.map +1 -0
  26. package/dist/filters/index.d.ts +2 -0
  27. package/dist/filters/index.d.ts.map +1 -0
  28. package/dist/filters/index.js +248 -0
  29. package/dist/filters/index.js.map +1 -0
  30. package/dist/helpers/AssetHelper.d.ts +117 -0
  31. package/dist/helpers/AssetHelper.d.ts.map +1 -0
  32. package/dist/helpers/SVGAssetHelper.d.ts +397 -0
  33. package/dist/helpers/SVGAssetHelper.d.ts.map +1 -0
  34. package/dist/helpers/SVGLoader.d.ts +46 -0
  35. package/dist/helpers/SVGLoader.d.ts.map +1 -0
  36. package/dist/helpers/SVGParser.d.ts +121 -0
  37. package/dist/helpers/SVGParser.d.ts.map +1 -0
  38. package/dist/helpers/eventBridge.d.ts +150 -0
  39. package/dist/helpers/eventBridge.d.ts.map +1 -0
  40. package/dist/helpers/index.d.ts +8 -0
  41. package/dist/helpers/index.d.ts.map +1 -0
  42. package/dist/helpers/index.js +702 -0
  43. package/dist/helpers/index.js.map +1 -0
  44. package/dist/helpers/mergeUtils.d.ts +21 -0
  45. package/dist/helpers/mergeUtils.d.ts.map +1 -0
  46. package/dist/helpers/resolvePublicPath.d.ts +6 -0
  47. package/dist/helpers/resolvePublicPath.d.ts.map +1 -0
  48. package/dist/i18n/index.d.ts +2 -0
  49. package/dist/i18n/index.d.ts.map +1 -0
  50. package/dist/i18n/index.js +527 -0
  51. package/dist/i18n/index.js.map +1 -0
  52. package/dist/i18n/sharedI18n.d.ts +11 -0
  53. package/dist/i18n/sharedI18n.d.ts.map +1 -0
  54. package/dist/layout/Align.d.ts +126 -0
  55. package/dist/layout/Align.d.ts.map +1 -0
  56. package/dist/layout/Bounds.d.ts +120 -0
  57. package/dist/layout/Bounds.d.ts.map +1 -0
  58. package/dist/layout/Distribute.d.ts +103 -0
  59. package/dist/layout/Distribute.d.ts.map +1 -0
  60. package/dist/layout/Flow.d.ts +213 -0
  61. package/dist/layout/Flow.d.ts.map +1 -0
  62. package/dist/layout/PositionUtils.d.ts +57 -0
  63. package/dist/layout/PositionUtils.d.ts.map +1 -0
  64. package/dist/layout/index.d.ts +6 -0
  65. package/dist/layout/index.d.ts.map +1 -0
  66. package/dist/layout/index.js +673 -0
  67. package/dist/layout/index.js.map +1 -0
  68. package/dist/particle/Emitter.d.ts +290 -0
  69. package/dist/particle/Emitter.d.ts.map +1 -0
  70. package/dist/particle/EmitterConfig.d.ts +228 -0
  71. package/dist/particle/EmitterConfig.d.ts.map +1 -0
  72. package/dist/particle/LinkedListContainer.d.ts +7 -0
  73. package/dist/particle/LinkedListContainer.d.ts.map +1 -0
  74. package/dist/particle/Particle.d.ts +63 -0
  75. package/dist/particle/Particle.d.ts.map +1 -0
  76. package/dist/particle/ParticleUtils.d.ts +97 -0
  77. package/dist/particle/ParticleUtils.d.ts.map +1 -0
  78. package/dist/particle/PropertyList.d.ts +40 -0
  79. package/dist/particle/PropertyList.d.ts.map +1 -0
  80. package/dist/particle/PropertyNode.d.ts +74 -0
  81. package/dist/particle/PropertyNode.d.ts.map +1 -0
  82. package/dist/particle/SpineEmitter.d.ts +55 -0
  83. package/dist/particle/SpineEmitter.d.ts.map +1 -0
  84. package/dist/particle/SpineParticle.d.ts +74 -0
  85. package/dist/particle/SpineParticle.d.ts.map +1 -0
  86. package/dist/particle/behaviors/AccelerationMovement.d.ts +62 -0
  87. package/dist/particle/behaviors/AccelerationMovement.d.ts.map +1 -0
  88. package/dist/particle/behaviors/Alpha.d.ts +60 -0
  89. package/dist/particle/behaviors/Alpha.d.ts.map +1 -0
  90. package/dist/particle/behaviors/AnimatedTexture.d.ts +111 -0
  91. package/dist/particle/behaviors/AnimatedTexture.d.ts.map +1 -0
  92. package/dist/particle/behaviors/Behaviors.d.ts +71 -0
  93. package/dist/particle/behaviors/Behaviors.d.ts.map +1 -0
  94. package/dist/particle/behaviors/BlendMode.d.ts +31 -0
  95. package/dist/particle/behaviors/BlendMode.d.ts.map +1 -0
  96. package/dist/particle/behaviors/BurstSpawn.d.ts +43 -0
  97. package/dist/particle/behaviors/BurstSpawn.d.ts.map +1 -0
  98. package/dist/particle/behaviors/Color.d.ts +60 -0
  99. package/dist/particle/behaviors/Color.d.ts.map +1 -0
  100. package/dist/particle/behaviors/MultiStateAnimatedTexture.d.ts +99 -0
  101. package/dist/particle/behaviors/MultiStateAnimatedTexture.d.ts.map +1 -0
  102. package/dist/particle/behaviors/OrderedTexture.d.ts +33 -0
  103. package/dist/particle/behaviors/OrderedTexture.d.ts.map +1 -0
  104. package/dist/particle/behaviors/PathMovement.d.ts +68 -0
  105. package/dist/particle/behaviors/PathMovement.d.ts.map +1 -0
  106. package/dist/particle/behaviors/PointSpawn.d.ts +21 -0
  107. package/dist/particle/behaviors/PointSpawn.d.ts.map +1 -0
  108. package/dist/particle/behaviors/RandomColor.d.ts +17 -0
  109. package/dist/particle/behaviors/RandomColor.d.ts.map +1 -0
  110. package/dist/particle/behaviors/RandomTexture.d.ts +32 -0
  111. package/dist/particle/behaviors/RandomTexture.d.ts.map +1 -0
  112. package/dist/particle/behaviors/Rotation.d.ts +114 -0
  113. package/dist/particle/behaviors/Rotation.d.ts.map +1 -0
  114. package/dist/particle/behaviors/Scale.d.ts +74 -0
  115. package/dist/particle/behaviors/Scale.d.ts.map +1 -0
  116. package/dist/particle/behaviors/ShapeSpawn.d.ts +58 -0
  117. package/dist/particle/behaviors/ShapeSpawn.d.ts.map +1 -0
  118. package/dist/particle/behaviors/SingleTexture.d.ts +32 -0
  119. package/dist/particle/behaviors/SingleTexture.d.ts.map +1 -0
  120. package/dist/particle/behaviors/SpeedMovement.d.ts +76 -0
  121. package/dist/particle/behaviors/SpeedMovement.d.ts.map +1 -0
  122. package/dist/particle/behaviors/SpineTexture.d.ts +173 -0
  123. package/dist/particle/behaviors/SpineTexture.d.ts.map +1 -0
  124. package/dist/particle/behaviors/ZindexBehavior.d.ts +16 -0
  125. package/dist/particle/behaviors/ZindexBehavior.d.ts.map +1 -0
  126. package/dist/particle/behaviors/editor/Types.d.ts +104 -0
  127. package/dist/particle/behaviors/editor/Types.d.ts.map +1 -0
  128. package/dist/particle/behaviors/editor/behaviors/AccelerationMovement.d.ts +2 -0
  129. package/dist/particle/behaviors/editor/behaviors/AccelerationMovement.d.ts.map +1 -0
  130. package/dist/particle/behaviors/editor/behaviors/Alpha.d.ts +2 -0
  131. package/dist/particle/behaviors/editor/behaviors/Alpha.d.ts.map +1 -0
  132. package/dist/particle/behaviors/editor/behaviors/AnimatedTexture.d.ts +2 -0
  133. package/dist/particle/behaviors/editor/behaviors/AnimatedTexture.d.ts.map +1 -0
  134. package/dist/particle/behaviors/editor/behaviors/BlendMode.d.ts +2 -0
  135. package/dist/particle/behaviors/editor/behaviors/BlendMode.d.ts.map +1 -0
  136. package/dist/particle/behaviors/editor/behaviors/BurstSpawn.d.ts +2 -0
  137. package/dist/particle/behaviors/editor/behaviors/BurstSpawn.d.ts.map +1 -0
  138. package/dist/particle/behaviors/editor/behaviors/Color.d.ts +2 -0
  139. package/dist/particle/behaviors/editor/behaviors/Color.d.ts.map +1 -0
  140. package/dist/particle/behaviors/editor/behaviors/OrderedTexture.d.ts +2 -0
  141. package/dist/particle/behaviors/editor/behaviors/OrderedTexture.d.ts.map +1 -0
  142. package/dist/particle/behaviors/editor/behaviors/PathMovement.d.ts +2 -0
  143. package/dist/particle/behaviors/editor/behaviors/PathMovement.d.ts.map +1 -0
  144. package/dist/particle/behaviors/editor/behaviors/PointSpawn.d.ts +2 -0
  145. package/dist/particle/behaviors/editor/behaviors/PointSpawn.d.ts.map +1 -0
  146. package/dist/particle/behaviors/editor/behaviors/RandomTexture.d.ts +2 -0
  147. package/dist/particle/behaviors/editor/behaviors/RandomTexture.d.ts.map +1 -0
  148. package/dist/particle/behaviors/editor/behaviors/Rotation.d.ts +2 -0
  149. package/dist/particle/behaviors/editor/behaviors/Rotation.d.ts.map +1 -0
  150. package/dist/particle/behaviors/editor/behaviors/Scale.d.ts +2 -0
  151. package/dist/particle/behaviors/editor/behaviors/Scale.d.ts.map +1 -0
  152. package/dist/particle/behaviors/editor/behaviors/ShapeSpawn.d.ts +2 -0
  153. package/dist/particle/behaviors/editor/behaviors/ShapeSpawn.d.ts.map +1 -0
  154. package/dist/particle/behaviors/editor/behaviors/SingleTexture.d.ts +2 -0
  155. package/dist/particle/behaviors/editor/behaviors/SingleTexture.d.ts.map +1 -0
  156. package/dist/particle/behaviors/editor/behaviors/SpeedMovement.d.ts +2 -0
  157. package/dist/particle/behaviors/editor/behaviors/SpeedMovement.d.ts.map +1 -0
  158. package/dist/particle/behaviors/editor/behaviors/index.d.ts +15 -0
  159. package/dist/particle/behaviors/editor/behaviors/index.d.ts.map +1 -0
  160. package/dist/particle/behaviors/editor/index.d.ts +5 -0
  161. package/dist/particle/behaviors/editor/index.d.ts.map +1 -0
  162. package/dist/particle/behaviors/editor/shapes/PolygonalChain.d.ts +2 -0
  163. package/dist/particle/behaviors/editor/shapes/PolygonalChain.d.ts.map +1 -0
  164. package/dist/particle/behaviors/editor/shapes/Rectangle.d.ts +2 -0
  165. package/dist/particle/behaviors/editor/shapes/Rectangle.d.ts.map +1 -0
  166. package/dist/particle/behaviors/editor/shapes/Torus.d.ts +2 -0
  167. package/dist/particle/behaviors/editor/shapes/Torus.d.ts.map +1 -0
  168. package/dist/particle/behaviors/index.d.ts +25 -0
  169. package/dist/particle/behaviors/index.d.ts.map +1 -0
  170. package/dist/particle/behaviors/shapes/PolygonalChain.d.ts +57 -0
  171. package/dist/particle/behaviors/shapes/PolygonalChain.d.ts.map +1 -0
  172. package/dist/particle/behaviors/shapes/Rectangle.d.ts +59 -0
  173. package/dist/particle/behaviors/shapes/Rectangle.d.ts.map +1 -0
  174. package/dist/particle/behaviors/shapes/SpawnShape.d.ts +32 -0
  175. package/dist/particle/behaviors/shapes/SpawnShape.d.ts.map +1 -0
  176. package/dist/particle/behaviors/shapes/Torus.d.ts +71 -0
  177. package/dist/particle/behaviors/shapes/Torus.d.ts.map +1 -0
  178. package/dist/particle/behaviors/shapes/index.d.ts +5 -0
  179. package/dist/particle/behaviors/shapes/index.d.ts.map +1 -0
  180. package/dist/particle/index.d.ts +11 -0
  181. package/dist/particle/index.d.ts.map +1 -0
  182. package/dist/particle/index.js +2845 -0
  183. package/dist/particle/index.js.map +1 -0
  184. package/dist/plugins/Plugin.types.d.ts +80 -0
  185. package/dist/plugins/Plugin.types.d.ts.map +1 -0
  186. package/dist/plugins/device/DeviceOptimizerPlugin.d.ts +187 -0
  187. package/dist/plugins/device/DeviceOptimizerPlugin.d.ts.map +1 -0
  188. package/dist/plugins/device/DeviceOptimizerPlugin.types.d.ts +134 -0
  189. package/dist/plugins/device/DeviceOptimizerPlugin.types.d.ts.map +1 -0
  190. package/dist/plugins/device/index.d.ts +3 -0
  191. package/dist/plugins/device/index.d.ts.map +1 -0
  192. package/dist/plugins/display/DisplayPlugin.d.ts +208 -0
  193. package/dist/plugins/display/DisplayPlugin.d.ts.map +1 -0
  194. package/dist/plugins/display/DisplayPlugin.types.d.ts +174 -0
  195. package/dist/plugins/display/DisplayPlugin.types.d.ts.map +1 -0
  196. package/dist/plugins/display/displayViewport.d.ts +10 -0
  197. package/dist/plugins/display/displayViewport.d.ts.map +1 -0
  198. package/dist/plugins/display/index.d.ts +4 -0
  199. package/dist/plugins/display/index.d.ts.map +1 -0
  200. package/dist/plugins/eventbus/EventBusPlugin.d.ts +21 -0
  201. package/dist/plugins/eventbus/EventBusPlugin.d.ts.map +1 -0
  202. package/dist/plugins/eventbus/EventBusPlugin.types.d.ts +24 -0
  203. package/dist/plugins/eventbus/EventBusPlugin.types.d.ts.map +1 -0
  204. package/dist/plugins/eventbus/index.d.ts +3 -0
  205. package/dist/plugins/eventbus/index.d.ts.map +1 -0
  206. package/dist/plugins/gsap/GsapPlugin.d.ts +307 -0
  207. package/dist/plugins/gsap/GsapPlugin.d.ts.map +1 -0
  208. package/dist/plugins/gsap/index.d.ts +2 -0
  209. package/dist/plugins/gsap/index.d.ts.map +1 -0
  210. package/dist/plugins/index.d.ts +13 -0
  211. package/dist/plugins/index.d.ts.map +1 -0
  212. package/dist/plugins/index.js +12806 -0
  213. package/dist/plugins/index.js.map +1 -0
  214. package/dist/plugins/input/InputPlugin.const.d.ts +80 -0
  215. package/dist/plugins/input/InputPlugin.const.d.ts.map +1 -0
  216. package/dist/plugins/input/InputPlugin.d.ts +141 -0
  217. package/dist/plugins/input/InputPlugin.d.ts.map +1 -0
  218. package/dist/plugins/input/InputPlugin.types.d.ts +41 -0
  219. package/dist/plugins/input/InputPlugin.types.d.ts.map +1 -0
  220. package/dist/plugins/input/KeyboardManager.d.ts +139 -0
  221. package/dist/plugins/input/KeyboardManager.d.ts.map +1 -0
  222. package/dist/plugins/input/KeyboardManager.types.d.ts +27 -0
  223. package/dist/plugins/input/KeyboardManager.types.d.ts.map +1 -0
  224. package/dist/plugins/input/index.d.ts +4 -0
  225. package/dist/plugins/input/index.d.ts.map +1 -0
  226. package/dist/plugins/language/I18NextPlugin.d.ts +30 -0
  227. package/dist/plugins/language/I18NextPlugin.d.ts.map +1 -0
  228. package/dist/plugins/language/I18NextPlugin.types.d.ts +29 -0
  229. package/dist/plugins/language/I18NextPlugin.types.d.ts.map +1 -0
  230. package/dist/plugins/language/index.d.ts +3 -0
  231. package/dist/plugins/language/index.d.ts.map +1 -0
  232. package/dist/plugins/resource/ResourcePlugin.d.ts +189 -0
  233. package/dist/plugins/resource/ResourcePlugin.d.ts.map +1 -0
  234. package/dist/plugins/resource/ResourcePlugin.types.d.ts +153 -0
  235. package/dist/plugins/resource/ResourcePlugin.types.d.ts.map +1 -0
  236. package/dist/plugins/resource/index.d.ts +3 -0
  237. package/dist/plugins/resource/index.d.ts.map +1 -0
  238. package/dist/plugins/scene/Scene.d.ts +203 -0
  239. package/dist/plugins/scene/Scene.d.ts.map +1 -0
  240. package/dist/plugins/scene/ScenePlugin.d.ts +162 -0
  241. package/dist/plugins/scene/ScenePlugin.d.ts.map +1 -0
  242. package/dist/plugins/scene/ScenePlugin.types.d.ts +35 -0
  243. package/dist/plugins/scene/ScenePlugin.types.d.ts.map +1 -0
  244. package/dist/plugins/scene/index.d.ts +4 -0
  245. package/dist/plugins/scene/index.d.ts.map +1 -0
  246. package/dist/plugins/sentry/SentryPlugin.d.ts +66 -0
  247. package/dist/plugins/sentry/SentryPlugin.d.ts.map +1 -0
  248. package/dist/plugins/sentry/SentryPlugin.types.d.ts +8 -0
  249. package/dist/plugins/sentry/SentryPlugin.types.d.ts.map +1 -0
  250. package/dist/plugins/sentry/index.d.ts +3 -0
  251. package/dist/plugins/sentry/index.d.ts.map +1 -0
  252. package/dist/plugins/service/ServiceAdapter.d.ts +88 -0
  253. package/dist/plugins/service/ServiceAdapter.d.ts.map +1 -0
  254. package/dist/plugins/service/ServiceEventHelper.d.ts +6 -0
  255. package/dist/plugins/service/ServiceEventHelper.d.ts.map +1 -0
  256. package/dist/plugins/service/ServicePlugin.d.ts +135 -0
  257. package/dist/plugins/service/ServicePlugin.d.ts.map +1 -0
  258. package/dist/plugins/service/ServicePlugin.types.d.ts +14 -0
  259. package/dist/plugins/service/ServicePlugin.types.d.ts.map +1 -0
  260. package/dist/plugins/service/adapters/DevAuthAdapter.d.ts +56 -0
  261. package/dist/plugins/service/adapters/DevAuthAdapter.d.ts.map +1 -0
  262. package/dist/plugins/service/adapters/RGSAdapter.d.ts +82 -0
  263. package/dist/plugins/service/adapters/RGSAdapter.d.ts.map +1 -0
  264. package/dist/plugins/service/adapters/index.d.ts +7 -0
  265. package/dist/plugins/service/adapters/index.d.ts.map +1 -0
  266. package/dist/plugins/service/adapters/resolvePublicIp.d.ts +10 -0
  267. package/dist/plugins/service/adapters/resolvePublicIp.d.ts.map +1 -0
  268. package/dist/plugins/service/index.d.ts +10 -0
  269. package/dist/plugins/service/index.d.ts.map +1 -0
  270. package/dist/plugins/service/types/api.types.d.ts +299 -0
  271. package/dist/plugins/service/types/api.types.d.ts.map +1 -0
  272. package/dist/plugins/service/types/index.d.ts +6 -0
  273. package/dist/plugins/service/types/index.d.ts.map +1 -0
  274. package/dist/plugins/skin/ISkin.d.ts +62 -0
  275. package/dist/plugins/skin/ISkin.d.ts.map +1 -0
  276. package/dist/plugins/skin/Skin.d.ts +155 -0
  277. package/dist/plugins/skin/Skin.d.ts.map +1 -0
  278. package/dist/plugins/skin/SkinPlugin.d.ts +285 -0
  279. package/dist/plugins/skin/SkinPlugin.d.ts.map +1 -0
  280. package/dist/plugins/skin/SkinPlugin.types.d.ts +56 -0
  281. package/dist/plugins/skin/SkinPlugin.types.d.ts.map +1 -0
  282. package/dist/plugins/skin/index.d.ts +5 -0
  283. package/dist/plugins/skin/index.d.ts.map +1 -0
  284. package/dist/plugins/sound/SoundPlugin.d.ts +319 -0
  285. package/dist/plugins/sound/SoundPlugin.d.ts.map +1 -0
  286. package/dist/plugins/sound/SoundPlugin.types.d.ts +102 -0
  287. package/dist/plugins/sound/SoundPlugin.types.d.ts.map +1 -0
  288. package/dist/plugins/sound/SoundTestGUI.d.ts +42 -0
  289. package/dist/plugins/sound/SoundTestGUI.d.ts.map +1 -0
  290. package/dist/plugins/sound/index.d.ts +4 -0
  291. package/dist/plugins/sound/index.d.ts.map +1 -0
  292. package/dist/state-machine/ConfigBuilder.d.ts +239 -0
  293. package/dist/state-machine/ConfigBuilder.d.ts.map +1 -0
  294. package/dist/state-machine/StateMachine.d.ts +251 -0
  295. package/dist/state-machine/StateMachine.d.ts.map +1 -0
  296. package/dist/state-machine/guards.d.ts +151 -0
  297. package/dist/state-machine/guards.d.ts.map +1 -0
  298. package/dist/state-machine/index.d.ts +5 -0
  299. package/dist/state-machine/index.d.ts.map +1 -0
  300. package/dist/state-machine/index.js +954 -0
  301. package/dist/state-machine/index.js.map +1 -0
  302. package/dist/state-machine/types.d.ts +65 -0
  303. package/dist/state-machine/types.d.ts.map +1 -0
  304. package/dist/store/DataStore.d.ts +167 -0
  305. package/dist/store/DataStore.d.ts.map +1 -0
  306. package/dist/store/index.d.ts +3 -0
  307. package/dist/store/index.d.ts.map +1 -0
  308. package/dist/store/index.js +197 -0
  309. package/dist/store/index.js.map +1 -0
  310. package/dist/ui/behaviors/ButtonBehavior.d.ts +245 -0
  311. package/dist/ui/behaviors/ButtonBehavior.d.ts.map +1 -0
  312. package/dist/ui/behaviors/InputBehavior.d.ts +169 -0
  313. package/dist/ui/behaviors/InputBehavior.d.ts.map +1 -0
  314. package/dist/ui/behaviors/ScrollbarBehavior.d.ts +371 -0
  315. package/dist/ui/behaviors/ScrollbarBehavior.d.ts.map +1 -0
  316. package/dist/ui/behaviors/index.d.ts +4 -0
  317. package/dist/ui/behaviors/index.d.ts.map +1 -0
  318. package/dist/ui/components/ButtonComp.d.ts +138 -0
  319. package/dist/ui/components/ButtonComp.d.ts.map +1 -0
  320. package/dist/ui/components/Comp.utils.d.ts +390 -0
  321. package/dist/ui/components/Comp.utils.d.ts.map +1 -0
  322. package/dist/ui/components/Component.types.d.ts +41 -0
  323. package/dist/ui/components/Component.types.d.ts.map +1 -0
  324. package/dist/ui/components/InputComp.d.ts +43 -0
  325. package/dist/ui/components/InputComp.d.ts.map +1 -0
  326. package/dist/ui/components/LabelBox.d.ts +49 -0
  327. package/dist/ui/components/LabelBox.d.ts.map +1 -0
  328. package/dist/ui/components/ListTableComp.d.ts +106 -0
  329. package/dist/ui/components/ListTableComp.d.ts.map +1 -0
  330. package/dist/ui/components/Skinable.d.ts +261 -0
  331. package/dist/ui/components/Skinable.d.ts.map +1 -0
  332. package/dist/ui/components/SliderComp.d.ts +60 -0
  333. package/dist/ui/components/SliderComp.d.ts.map +1 -0
  334. package/dist/ui/components/SpriteTextBBCode.d.ts +16 -0
  335. package/dist/ui/components/SpriteTextBBCode.d.ts.map +1 -0
  336. package/dist/ui/components/StepperComp.d.ts +89 -0
  337. package/dist/ui/components/StepperComp.d.ts.map +1 -0
  338. package/dist/ui/components/index.d.ts +12 -0
  339. package/dist/ui/components/index.d.ts.map +1 -0
  340. package/dist/ui/components/spriteText/SpriteText.d.ts +114 -0
  341. package/dist/ui/components/spriteText/SpriteText.d.ts.map +1 -0
  342. package/dist/ui/components/spriteText/SpriteText.types.d.ts +109 -0
  343. package/dist/ui/components/spriteText/SpriteText.types.d.ts.map +1 -0
  344. package/dist/ui/components/spriteText/SpriteTextAlignment.d.ts +25 -0
  345. package/dist/ui/components/spriteText/SpriteTextAlignment.d.ts.map +1 -0
  346. package/dist/ui/components/spriteText/SpriteTextBezier.d.ts +20 -0
  347. package/dist/ui/components/spriteText/SpriteTextBezier.d.ts.map +1 -0
  348. package/dist/ui/components/spriteText/SpriteTextCurve.d.ts +4 -0
  349. package/dist/ui/components/spriteText/SpriteTextCurve.d.ts.map +1 -0
  350. package/dist/ui/components/spriteText/SpriteTextKerning.d.ts +7 -0
  351. package/dist/ui/components/spriteText/SpriteTextKerning.d.ts.map +1 -0
  352. package/dist/ui/components/spriteText/SpriteTextTexture.d.ts +16 -0
  353. package/dist/ui/components/spriteText/SpriteTextTexture.d.ts.map +1 -0
  354. package/dist/ui/components/spriteText/SpriteTextWrap.d.ts +19 -0
  355. package/dist/ui/components/spriteText/SpriteTextWrap.d.ts.map +1 -0
  356. package/dist/ui/components/spriteText/index.d.ts +3 -0
  357. package/dist/ui/components/spriteText/index.d.ts.map +1 -0
  358. package/dist/ui/index.d.ts +3 -0
  359. package/dist/ui/index.d.ts.map +1 -0
  360. package/dist/ui/index.js +4778 -0
  361. package/dist/ui/index.js.map +1 -0
  362. package/dist/utils/ArrayUtils.d.ts +24 -0
  363. package/dist/utils/ArrayUtils.d.ts.map +1 -0
  364. package/dist/utils/ColorUtils.d.ts +34 -0
  365. package/dist/utils/ColorUtils.d.ts.map +1 -0
  366. package/dist/utils/DataInjector.d.ts +67 -0
  367. package/dist/utils/DataInjector.d.ts.map +1 -0
  368. package/dist/utils/Logger.d.ts +332 -0
  369. package/dist/utils/Logger.d.ts.map +1 -0
  370. package/dist/utils/NumberFormatter.d.ts +126 -0
  371. package/dist/utils/NumberFormatter.d.ts.map +1 -0
  372. package/dist/utils/ObjectUtils.d.ts +64 -0
  373. package/dist/utils/ObjectUtils.d.ts.map +1 -0
  374. package/dist/utils/PixiUtils.d.ts +118 -0
  375. package/dist/utils/PixiUtils.d.ts.map +1 -0
  376. package/dist/utils/Throttle.d.ts +103 -0
  377. package/dist/utils/Throttle.d.ts.map +1 -0
  378. package/dist/utils/index.d.ts +9 -0
  379. package/dist/utils/index.d.ts.map +1 -0
  380. package/dist/utils/index.js +899 -0
  381. package/dist/utils/index.js.map +1 -0
  382. package/dist/vite/index.d.ts +3 -0
  383. package/dist/vite/index.d.ts.map +1 -0
  384. package/dist/vite/index.js +126 -0
  385. package/dist/vite/index.js.map +1 -0
  386. package/dist/vite/mergeLocalesPlugin.d.ts +22 -0
  387. package/dist/vite/mergeLocalesPlugin.d.ts.map +1 -0
  388. package/package.json +143 -0
@@ -0,0 +1,162 @@
1
+ import { PixiEngine } from '../../engine/PixiEngine';
2
+ import type { ScenePluginConfig } from './ScenePlugin.types';
3
+ import type { EnginePlugin } from '../Plugin.types';
4
+ import { Scene } from './Scene';
5
+ /**
6
+ * Scene management plugin for PixiJS games.
7
+ *
8
+ * ScenePlugin provides a structured way to manage different game screens
9
+ * (menus, gameplay, loading screens, etc.) with smooth transitions and
10
+ * lifecycle management.
11
+ *
12
+ * ## Features
13
+ *
14
+ * - **Scene Registration**: Register multiple scenes
15
+ * - **Smooth Transitions**: Async scene switching with animations
16
+ * - **Lifecycle Management**: Automatic enter/exit/update calls
17
+ * - **Transition Safety**: Prevents overlapping transitions
18
+ * - **Default Scene**: Auto-load initial scene
19
+ * - **Custom Root**: Use custom container for scenes
20
+ *
21
+ * ## Usage Pattern
22
+ *
23
+ * 1. Create scenes extending Scene base class
24
+ * 2. Register scenes with ScenePlugin
25
+ * 3. Switch between scenes using switchScene()
26
+ * 4. Plugin handles lifecycle automatically
27
+ *
28
+ * ## Scene Lifecycle
29
+ *
30
+ * When switching from SceneA to SceneB:
31
+ * 1. SceneA.onExit() - Exit animation
32
+ * 2. SceneA.cleanup() - Resource cleanup
33
+ * 3. SceneA removed from stage
34
+ * 4. SceneB added to stage
35
+ * 5. SceneB.onInitialize() - First time only
36
+ * 6. SceneB.onEnter() - Entry animation
37
+ * 7. SceneB.update() - Called every frame
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * // Create scenes
42
+ * const mainMenu = new MainMenuScene();
43
+ * const gameplay = new GameplayScene();
44
+ *
45
+ * // Create and configure plugin
46
+ * const scenePlugin = new ScenePlugin({
47
+ * defaultScene: 'MainMenu'
48
+ * });
49
+ *
50
+ * // Register scenes
51
+ * scenePlugin.registerScene('MainMenu', mainMenu);
52
+ * scenePlugin.registerScene('Gameplay', gameplay);
53
+ *
54
+ * // Register plugin
55
+ * engine.registerPlugin(scenePlugin);
56
+ * await engine.initialize();
57
+ *
58
+ * // Switch scenes
59
+ * await scenePlugin.switchScene('Gameplay');
60
+ * ```
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * // Scene with transitions
65
+ * class MenuScene extends Scene {
66
+ * protected async onEnter(): Promise<void> {
67
+ * this.alpha = 0;
68
+ * await gsap.to(this, { alpha: 1, duration: 0.5 });
69
+ * }
70
+ *
71
+ * protected async onExit(): Promise<void> {
72
+ * await gsap.to(this, { alpha: 0, duration: 0.3 });
73
+ * }
74
+ * }
75
+ * ```
76
+ *
77
+ * @category Plugins
78
+ * @public
79
+ */
80
+ export declare class ScenePlugin implements EnginePlugin {
81
+ name: string;
82
+ priority: number;
83
+ dependencies: string[];
84
+ private engine;
85
+ private currentScene;
86
+ private scenes;
87
+ private isTransitioning;
88
+ private config;
89
+ private root;
90
+ constructor(config?: ScenePluginConfig);
91
+ /**
92
+ * Initialize the scene plugin
93
+ */
94
+ initialize(engine: PixiEngine): Promise<void>;
95
+ /**
96
+ * Called when plugin is ready and can safely use other plugins
97
+ */
98
+ onReady(engine: PixiEngine): Promise<void>;
99
+ /**
100
+ * Registers a scene with the plugin.
101
+ *
102
+ * Scenes must be registered before they can be switched to.
103
+ * If the engine is already initialized, the scene will receive
104
+ * the engine reference immediately.
105
+ *
106
+ * @param name - Unique name for the scene
107
+ * @param scene - Scene instance to register
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * const mainMenu = new MainMenuScene();
112
+ * scenePlugin.registerScene('MainMenu', mainMenu);
113
+ * ```
114
+ */
115
+ registerScene(name: string, scene: Scene): void;
116
+ /**
117
+ * Switches to a different scene.
118
+ *
119
+ * Handles the complete transition:
120
+ * - Exits current scene (with animation)
121
+ * - Removes current scene from stage
122
+ * - Adds new scene to stage
123
+ * - Enters new scene (with animation)
124
+ *
125
+ * Prevents overlapping transitions.
126
+ *
127
+ * @param name - Name of the scene to switch to
128
+ * @param params - Optional parameters to pass to the scene's onEnter() method
129
+ * @throws Error if scene is not registered
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * await scenePlugin.switchScene('Gameplay');
134
+ * // With parameters
135
+ * await scenePlugin.switchScene('Gameplay', { level: 5, mode: 'bonus' });
136
+ * ```
137
+ */
138
+ switchScene(name: string, params?: unknown): Promise<void>;
139
+ /**
140
+ * Gets the currently active scene.
141
+ *
142
+ * @returns Current scene instance or null if no scene is active
143
+ *
144
+ * @example
145
+ * ```typescript
146
+ * const current = scenePlugin.getCurrentScene();
147
+ * if (current?.sceneName === 'Gameplay') {
148
+ * // Do something
149
+ * }
150
+ * ```
151
+ */
152
+ getCurrentScene(): Scene | null;
153
+ /**
154
+ * Updates the current scene
155
+ * @param deltaTime The time elapsed since the last update
156
+ */
157
+ onUpdate(deltaTime: number): boolean;
158
+ [key: symbol]: any;
159
+ cleanup(): void;
160
+ }
161
+ export type { ScenePluginConfig } from './ScenePlugin.types';
162
+ //# sourceMappingURL=ScenePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScenePlugin.d.ts","sourceRoot":"","sources":["../../../plugins/scene/ScenePlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AACH,qBAAa,WAAY,YAAW,YAAY;IACvC,IAAI,EAAE,MAAM,CAAiB;IAC7B,QAAQ,EAAE,MAAM,CAAM;IACtB,YAAY,EAAE,MAAM,EAAE,CAAM;IAEnC,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,YAAY,CAAsB;IAC1C,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,IAAI,CAA0B;gBAE1B,MAAM,GAAE,iBAAsB;IA4B1C;;OAEG;IACU,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB1D;;OAEG;IACU,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAUvD;;;;;;;;;;;;;;;OAeG;IACI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAmBtD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAkDvE;;;;;;;;;;;;OAYG;IACI,eAAe,IAAI,KAAK,GAAG,IAAI;IAItC;;;OAGG;IACI,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAoB3C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAEZ,OAAO,IAAI,IAAI;CAYvB;AAGD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { PluginConfig } from '../Plugin.types';
2
+ /**
3
+ * Configuration for ScenePlugin.
4
+ *
5
+ * Controls scene management behavior including the root container
6
+ * and default initial scene.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * const config: ScenePluginConfig = {
11
+ * root: customContainer,
12
+ * defaultScene: 'MainMenu',
13
+ * debug: true
14
+ * };
15
+ * ```
16
+ *
17
+ * @public
18
+ */
19
+ export interface ScenePluginConfig extends PluginConfig {
20
+ /**
21
+ * Root container where scenes will be added.
22
+ *
23
+ * If not specified, uses engine.pixiApp.stage as the root.
24
+ * Useful for adding scenes to a specific container layer.
25
+ */
26
+ root?: import('pixi.js').Container;
27
+ /**
28
+ * Default initial scene name.
29
+ *
30
+ * If specified, automatically switches to this scene when the plugin is ready.
31
+ * The scene must be registered before initialization.
32
+ */
33
+ defaultScene?: string;
34
+ }
35
+ //# sourceMappingURL=ScenePlugin.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScenePlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/scene/ScenePlugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,SAAS,CAAC;IAEnC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,4 @@
1
+ export * from './ScenePlugin';
2
+ export type { ScenePluginConfig } from './ScenePlugin.types';
3
+ export * from './Scene';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/scene/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,cAAc,SAAS,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { PixiEngine } from '../../engine';
2
+ import type { EnginePlugin } from '../Plugin.types';
3
+ import * as Sentry from '@sentry/browser';
4
+ import { SentryPluginConfig } from './SentryPlugin.types';
5
+ /**
6
+ * Error tracking and monitoring plugin using Sentry.
7
+ *
8
+ * @category Plugins
9
+ * @public
10
+ */
11
+ export declare class SentryPlugin implements EnginePlugin {
12
+ name: string;
13
+ priority: number;
14
+ /**
15
+ * No dependencies - this should be the first plugin to initialize
16
+ */
17
+ dependencies: string[];
18
+ private _engine;
19
+ private config;
20
+ private isInitialized;
21
+ constructor(config: SentryPluginConfig);
22
+ /**
23
+ * Initialize Sentry plugin
24
+ * @param engine PixiEngine instance
25
+ */
26
+ initialize(engine: PixiEngine): void;
27
+ /**
28
+ * Plugin is ready immediately after initialization
29
+ */
30
+ onReady(engine: PixiEngine): void;
31
+ /**
32
+ * Check if plugin is ready for use
33
+ */
34
+ isReady(): boolean;
35
+ /**
36
+ * Report an error to Sentry
37
+ * @param error Error to report
38
+ * @param extra Additional context
39
+ */
40
+ captureError(error: Error, extra?: Record<string, any>): void;
41
+ /**
42
+ * Report a message to Sentry
43
+ * @param message Message to report
44
+ * @param level Message level
45
+ * @param extra Additional context
46
+ */
47
+ captureMessage(message: string, level?: Sentry.SeverityLevel, extra?: Record<string, any>): void;
48
+ /**
49
+ * Add breadcrumb to Sentry
50
+ * @param message Breadcrumb message
51
+ * @param category Category
52
+ * @param level Level
53
+ */
54
+ addBreadcrumb(message: string, category?: string, level?: Sentry.SeverityLevel): void;
55
+ /**
56
+ * Plugin update process
57
+ */
58
+ onUpdate(_deltaTime: number): boolean;
59
+ /**
60
+ * Cleanup the plugin
61
+ */
62
+ cleanup(): void;
63
+ [key: symbol]: any;
64
+ }
65
+ export type { SentryPluginConfig } from './SentryPlugin.types';
66
+ //# sourceMappingURL=SentryPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SentryPlugin.d.ts","sourceRoot":"","sources":["../../../plugins/sentry/SentryPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;AACH,qBAAa,YAAa,YAAW,YAAY;IACxC,IAAI,EAAE,MAAM,CAAkB;IAC9B,QAAQ,EAAE,MAAM,CAAM;IAE7B;;OAEG;IACI,YAAY,EAAE,MAAM,EAAE,CAAM;IAEnC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,aAAa,CAAS;gBAElB,MAAM,EAAE,kBAAkB;IAsBtC;;;OAGG;IACI,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IA0C3C;;OAEG;IACI,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAwBxC;;OAEG;IACI,OAAO,IAAI,OAAO;IAIzB;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAcpE;;;;;OAKG;IACI,cAAc,CACnB,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAM,CAAC,aAAsB,EACpC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,IAAI;IAcP;;;;;OAKG;IACI,aAAa,CAClB,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,MAAiB,EAC3B,KAAK,GAAE,MAAM,CAAC,aAAsB,GACnC,IAAI;IAaP;;OAEG;IAEI,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAK5C;;OAEG;IACI,OAAO,IAAI,IAAI;IAOtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { PluginConfig } from "../Plugin.types";
2
+ /**
3
+ * Specific configuration for SentryPlugin
4
+ */
5
+ export interface SentryPluginConfig extends PluginConfig {
6
+ dsn: string;
7
+ }
8
+ //# sourceMappingURL=SentryPlugin.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SentryPlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/sentry/SentryPlugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACpD,GAAG,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,3 @@
1
+ export * from './SentryPlugin';
2
+ export type { SentryPluginConfig } from './SentryPlugin.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/sentry/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Abstract service adapter for backend API communication
3
+ * @module ServicePlugin
4
+ */
5
+ import { EventEmitter } from 'pixi.js';
6
+ import type { SessionResponse, GameplayRequest, GameplayResponse, HistoryEntry, HistoryResponse, PlatformResponse, ServiceActions } from './types';
7
+ /**
8
+ * Abstract base class for service adapters
9
+ *
10
+ * Service adapters handle the low-level communication with the backend API.
11
+ * Different adapters can be implemented for different environments
12
+ * (RGSAdapter for production, OfflineAdapter for development).
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * class CustomAdapter extends ServiceAdapter {
17
+ * async getSession(): Promise<SessionResponse> {
18
+ * // Fetch session and game config
19
+ * }
20
+ *
21
+ * async spin(request: GameplayRequest): Promise<GameplayResponse> {
22
+ * // Execute spin action
23
+ * }
24
+ * }
25
+ * ```
26
+ */
27
+ export declare abstract class ServiceAdapter extends EventEmitter {
28
+ /**
29
+ * Session ID for the current game session
30
+ */
31
+ abstract get sessionId(): string;
32
+ /**
33
+ * Get session info and game configuration
34
+ * GET /session
35
+ *
36
+ * @returns Promise resolving to session response with gameConfig
37
+ */
38
+ abstract getSession(): Promise<SessionResponse>;
39
+ /**
40
+ * Execute a gameplay action (spin)
41
+ * POST /gameplay
42
+ *
43
+ * @param request - Gameplay request with action and optional clientSeed
44
+ * @returns Promise resolving to gameplay response
45
+ */
46
+ abstract spin(request: GameplayRequest): Promise<GameplayResponse>;
47
+ /**
48
+ * Get game history
49
+ * GET /session/{sessionId}/history
50
+ *
51
+ * @param limit - Maximum number of entries to return
52
+ * @param pointer - Pagination pointer for next page
53
+ * @returns Promise resolving to history response
54
+ */
55
+ abstract getHistory(limit?: number, pointer?: number): Promise<HistoryResponse>;
56
+ /**
57
+ * Get a single round summary by round ID
58
+ * GET /session/{sessionId}/round/{roundId}
59
+ *
60
+ * @param roundId - Round identifier
61
+ * @returns Promise resolving to history entry (single or range)
62
+ */
63
+ abstract getRound(roundId: string): Promise<HistoryEntry>;
64
+ /**
65
+ * Get player balance
66
+ * GET /session/{sessionId}/balance
67
+ *
68
+ * @returns Promise resolving to platform response with balance
69
+ */
70
+ abstract getBalance(): Promise<PlatformResponse>;
71
+ /**
72
+ * Replay a completed spin by nonce
73
+ * GET /session/{sessionId}/replay/{nonce}
74
+ *
75
+ * @param nonce - The nonce of the spin to replay
76
+ * @returns Promise resolving to gameplay response
77
+ */
78
+ abstract replay(nonce: number): Promise<GameplayResponse>;
79
+ /**
80
+ * Emit a service action event
81
+ *
82
+ * @param action - Service action type
83
+ * @param data - Event data
84
+ * @protected
85
+ */
86
+ protected emitAction(action: ServiceActions, data: unknown): void;
87
+ }
88
+ //# sourceMappingURL=ServiceAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceAdapter.d.ts","sourceRoot":"","sources":["../../../plugins/service/ServiceAdapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8BAAsB,cAAe,SAAQ,YAAY;IACvD;;OAEG;IACH,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC;IAEjC;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC;IAE/C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAElE;;;;;;;OAOG;IACH,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAE/E;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAEzD;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAEhD;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAEzD;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;CAGlE"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Service Event Helper Utility
3
+ * @deprecated This file uses old event-based types. Use new API types instead.
4
+ * @module ServicePlugin/Helpers
5
+ */
6
+ //# sourceMappingURL=ServiceEventHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceEventHelper.d.ts","sourceRoot":"","sources":["../../../plugins/service/ServiceEventHelper.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Service plugin for backend API communication
3
+ * @module ServicePlugin
4
+ */
5
+ import { EventEmitter } from 'pixi.js';
6
+ import type { PixiEngine } from '../../engine/PixiEngine';
7
+ import type { EnginePlugin } from '../Plugin.types';
8
+ import type { ServicePluginConfig } from './ServicePlugin.types';
9
+ import type { ServiceAdapter } from './ServiceAdapter';
10
+ import { type SessionResponse, type GameplayResponse, type HistoryEntry, type HistoryResponse, type PlatformResponse, type GameConfig } from './types';
11
+ /**
12
+ * Service plugin for managing backend API communication
13
+ *
14
+ * This plugin provides a unified interface for all game-server communication including:
15
+ * - Session management and game configuration
16
+ * - Spin requests
17
+ * - Game history
18
+ *
19
+ * The plugin uses an adapter pattern to support different environments
20
+ * (RGSAdapter for production, OfflineAdapter for development).
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * // Create adapter
25
+ * const adapter = new RGSAdapter({
26
+ * baseUrl: 'http://localhost:3000',
27
+ * sessionId: 'test-session-123',
28
+ * });
29
+ *
30
+ * // Create plugin
31
+ * const servicePlugin = new ServicePlugin({
32
+ * adapter,
33
+ * debug: true,
34
+ * });
35
+ *
36
+ * // Register with engine
37
+ * engine.registerPlugin(servicePlugin);
38
+ * await engine.initialize();
39
+ *
40
+ * // Use in GameLogic
41
+ * const servicePlugin = engine.getPluginThrow<ServicePlugin>('servicePlugin');
42
+ * const session = await servicePlugin.getSession();
43
+ * const response = await servicePlugin.spin(2000);
44
+ * ```
45
+ */
46
+ export declare class ServicePlugin extends EventEmitter implements EnginePlugin {
47
+ name: string;
48
+ priority: number;
49
+ dependencies: string[];
50
+ [key: symbol]: unknown;
51
+ private engine;
52
+ private adapter;
53
+ private config;
54
+ /** Cached session response */
55
+ private _session;
56
+ /** Cached game config */
57
+ private _gameConfig;
58
+ constructor(config: ServicePluginConfig);
59
+ /**
60
+ * Initialize the plugin
61
+ */
62
+ initialize(engine: PixiEngine): Promise<void>;
63
+ /**
64
+ * Called when plugin is ready
65
+ */
66
+ onReady(_engine: PixiEngine): Promise<void>;
67
+ /**
68
+ * Cleanup plugin resources
69
+ */
70
+ cleanup(): void;
71
+ /**
72
+ * Handle adapter events
73
+ */
74
+ private onAdapterEvent;
75
+ /**
76
+ * Get session info and game configuration
77
+ * Fetches from backend and caches the result
78
+ *
79
+ * @returns Promise resolving to session response with gameConfig
80
+ */
81
+ getSession(): Promise<SessionResponse>;
82
+ /**
83
+ * Execute a spin action
84
+ *
85
+ * @param totalBet - Total bet amount
86
+ * @param clientSeed - Optional client seed for provably fair
87
+ * @returns Promise resolving to gameplay response
88
+ */
89
+ spin(action: string, totalBet: number, clientSeed?: string): Promise<GameplayResponse>;
90
+ /**
91
+ * Get game history
92
+ *
93
+ * @param limit - Maximum number of entries to return
94
+ * @param pointer - Pagination pointer for next page
95
+ * @returns Promise resolving to history response
96
+ */
97
+ getHistory(limit?: number, pointer?: number): Promise<HistoryResponse>;
98
+ /**
99
+ * Get a single round summary by round ID
100
+ *
101
+ * @param roundId - Round identifier
102
+ * @returns Promise resolving to history entry (single or range)
103
+ */
104
+ getRound(roundId: string): Promise<HistoryEntry>;
105
+ /**
106
+ * Get player balance
107
+ *
108
+ * @returns Promise resolving to platform response with balance
109
+ */
110
+ getBalance(): Promise<PlatformResponse>;
111
+ /**
112
+ * Replay a completed spin by nonce
113
+ *
114
+ * @param nonce - The nonce of the spin to replay
115
+ * @returns Promise resolving to gameplay response
116
+ */
117
+ replay(nonce: number): Promise<GameplayResponse>;
118
+ /**
119
+ * Get session ID from adapter
120
+ */
121
+ get sessionId(): string;
122
+ /**
123
+ * Get cached session response
124
+ */
125
+ get session(): SessionResponse | null;
126
+ /**
127
+ * Get cached game config
128
+ */
129
+ get gameConfig(): GameConfig | null;
130
+ /**
131
+ * Get the adapter instance
132
+ */
133
+ get serviceAdapter(): ServiceAdapter;
134
+ }
135
+ //# sourceMappingURL=ServicePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServicePlugin.d.ts","sourceRoot":"","sources":["../../../plugins/service/ServicePlugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EAErB,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAAa,aAAc,SAAQ,YAAa,YAAW,YAAY;IAC9D,IAAI,SAAmB;IACvB,QAAQ,SAAM;IACd,YAAY,WAAsB;IAGzC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAsB;IAEpC,8BAA8B;IAC9B,OAAO,CAAC,QAAQ,CAAgC;IAEhD,yBAAyB;IACzB,OAAO,CAAC,WAAW,CAA2B;gBAElC,MAAM,EAAE,mBAAmB;IAyBvC;;OAEG;IACU,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1D;;OAEG;IACU,OAAO,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD;;OAEG;IACI,OAAO,IAAI,IAAI;IAStB;;OAEG;IACH,OAAO,CAAC,cAAc;IAgBtB;;;;;OAKG;IACU,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC;IAmBnD;;;;;;OAMG;IACU,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAanG;;;;;;OAMG;IACU,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAcnF;;;;;OAKG;IACU,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAa7D;;;;OAIG;IACU,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAcpD;;;;;OAKG;IACU,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkB7D;;OAEG;IACH,IAAW,SAAS,IAAI,MAAM,CAE7B;IAED;;OAEG;IACH,IAAW,OAAO,IAAI,eAAe,GAAG,IAAI,CAE3C;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,UAAU,GAAG,IAAI,CAEzC;IAED;;OAEG;IACH,IAAW,cAAc,IAAI,cAAc,CAE1C;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * ServicePlugin configuration and types
3
+ * @module ServicePlugin
4
+ */
5
+ import type { PluginConfig } from '../Plugin.types';
6
+ import type { ServiceAdapter } from './ServiceAdapter';
7
+ /**
8
+ * ServicePlugin configuration
9
+ */
10
+ export interface ServicePluginConfig extends PluginConfig {
11
+ /** Service adapter instance */
12
+ adapter: ServiceAdapter;
13
+ }
14
+ //# sourceMappingURL=ServicePlugin.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServicePlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/service/ServicePlugin.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,+BAA+B;IAC/B,OAAO,EAAE,cAAc,CAAC;CACzB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Development adapter that creates session via POST /session
3
+ * Use this in development to auto-create sessions
4
+ * @module ServicePlugin/Adapters
5
+ */
6
+ import { RGSAdapter, type RGSAdapterConfig } from './RGSAdapter';
7
+ import type { SessionResponse } from '../types';
8
+ /**
9
+ * Development adapter configuration
10
+ */
11
+ export interface DevAdapterConfig extends Omit<RGSAdapterConfig, 'sessionId'> {
12
+ /** Operator ID (UUID) */
13
+ operatorId?: string;
14
+ /** Player ID */
15
+ playerId?: string;
16
+ /** Game ID (UUID) */
17
+ gameId?: string;
18
+ /** Currency code */
19
+ currency?: string;
20
+ /** Optional public IP override (also overridable via ?clientIP= or ?ip=) */
21
+ ip?: string;
22
+ }
23
+ /**
24
+ * Development adapter that auto-creates sessions
25
+ *
26
+ * This adapter calls POST /session to create a new session,
27
+ * then uses the returned sessionId for subsequent requests.
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const adapter = new DevAdapter({
32
+ * baseUrl: 'http://localhost:3000',
33
+ * debug: true,
34
+ * });
35
+ *
36
+ * // Creates session and returns session info
37
+ * const session = await adapter.getSession();
38
+ * console.log('Session ID:', adapter.sessionId);
39
+ * ```
40
+ */
41
+ export declare class DevAdapter extends RGSAdapter {
42
+ private createSessionData;
43
+ private configIp?;
44
+ private queryParams;
45
+ private _sessionCreated;
46
+ constructor(config: DevAdapterConfig);
47
+ /**
48
+ * Get session - creates session if not exists, then fetches session info
49
+ */
50
+ getSession(): Promise<SessionResponse>;
51
+ /**
52
+ * Create a new session via POST /session
53
+ */
54
+ private createSession;
55
+ }
56
+ //# sourceMappingURL=DevAuthAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevAuthAdapter.d.ts","sourceRoot":"","sources":["../../../../plugins/service/adapters/DevAuthAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAehD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC;IAC3E,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,iBAAiB,CAAmC;IAC5D,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,eAAe,CAAS;gBAEpB,MAAM,EAAE,gBAAgB;IA2BpC;;OAEG;IACmB,UAAU,IAAI,OAAO,CAAC,eAAe,CAAC;IAU5D;;OAEG;YACW,aAAa;CAkE5B"}