@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,189 @@
1
+ import { PixiEngine } from '../../engine/PixiEngine';
2
+ import type { EnginePlugin } from '../Plugin.types';
3
+ import '@esotericsoftware/spine-pixi-v8';
4
+ import type { ResourcePluginConfig, LoadingProgress } from './ResourcePlugin.types';
5
+ /**
6
+ * Asset loading and management plugin for PixiJS games.
7
+ *
8
+ * ResourcePlugin manages game assets with automatic resolution selection,
9
+ * platform-specific loading, and priority-based strategies. It uses PixiJS
10
+ * native features (isMobile, detectWebp) for device detection.
11
+ *
12
+ * ## Features
13
+ *
14
+ * - **Automatic Resolution Selection**: Based on devicePixelRatio
15
+ * - **Platform-Specific Assets**: Desktop vs mobile asset variants
16
+ * - **Priority-Based Loading**: Critical, high, medium, low priority bundles
17
+ * - **Lazy Loading**: Load assets on-demand
18
+ * - **WebP Support**: Automatic WebP format detection
19
+ * - **Font Loading**: Integrated font asset management
20
+ * - **Progress Tracking**: Per-bundle loading progress callbacks
21
+ *
22
+ * ## Asset Resolution Strategy
23
+ *
24
+ * Assets are organized in directories with resolution variants:
25
+ * ```
26
+ * /assets/graphics/
27
+ * package-name/
28
+ * package-name-0@0.25x.webp.json // Low quality
29
+ * package-name-0@0.5x.webp.json // Medium quality
30
+ * package-name-0@1x.webp.json // High quality
31
+ * package-name-0@2x.webp.json // Ultra quality
32
+ * ```
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * const resourcePlugin = new ResourcePlugin({
37
+ * basePath: '/assets/graphics/',
38
+ * devicePixelRatio: window.devicePixelRatio,
39
+ * bundles: [
40
+ * {
41
+ * name: 'ui',
42
+ * packages: ['buttons', 'icons'],
43
+ * priority: 0 // Critical
44
+ * },
45
+ * {
46
+ * name: 'game',
47
+ * packages: ['symbols', 'backgrounds'],
48
+ * priority: 1, // High
49
+ * isLazy: false
50
+ * }
51
+ * ]
52
+ * });
53
+ *
54
+ * engine.registerPlugin(resourcePlugin);
55
+ * await engine.initialize();
56
+ *
57
+ * // Load critical assets
58
+ * await resourcePlugin.loadCriticalAssets();
59
+ *
60
+ * // Load all non-lazy bundles
61
+ * await resourcePlugin.preloadAssets();
62
+ * ```
63
+ *
64
+ * @category Plugins
65
+ * @public
66
+ */
67
+ export declare class ResourcePlugin implements EnginePlugin {
68
+ name: string;
69
+ priority: number;
70
+ dependencies: string[];
71
+ private config;
72
+ private engine;
73
+ private isInitialized;
74
+ private bundleStates;
75
+ private manifest;
76
+ private resolution;
77
+ private resolutionSuffix;
78
+ private textureFormat;
79
+ /** Sound alias -> channel mapping collected from bundle configs */
80
+ private _soundChannelMappings;
81
+ constructor(config: ResourcePluginConfig);
82
+ initialize(engine: PixiEngine): Promise<void>;
83
+ onReady(engine: PixiEngine): void;
84
+ /**
85
+ * Calculates optimal asset resolution based on device screen size and DPR.
86
+ * Uses diagonal ratio between device physical resolution and design resolution (1920x1080).
87
+ *
88
+ * Formula: requiredScale = deviceDiagonal / designDiagonal
89
+ *
90
+ * Strategy:
91
+ * - Mobile: Round DOWN to nearest available resolution (performance priority)
92
+ * - Desktop: Round UP to nearest available resolution (quality priority)
93
+ *
94
+ * @param dpr - Device pixel ratio
95
+ * @param platform - 'mobile' or 'desktop'
96
+ * @param forceResolution - Optional forced scale value (bypasses diagonal calculation)
97
+ */
98
+ private calculateOptimalResolution;
99
+ isReady(): boolean;
100
+ cleanup(): void;
101
+ /**
102
+ * Check if a package config is a Spine package
103
+ */
104
+ private isSpinePackage;
105
+ /**
106
+ * Check if a package config is a Sound package
107
+ */
108
+ private isSoundPackage;
109
+ private generateManifest;
110
+ /**
111
+ * Check if a package should be loaded on current platform
112
+ */
113
+ private shouldLoadPackage;
114
+ /**
115
+ * Generate asset URL based on resolution support and texture format.
116
+ */
117
+ private generateAssetURL;
118
+ /**
119
+ * Generate Spine asset URLs (skeleton + atlas) with resolution support.
120
+ *
121
+ * @param pkg - Spine package configuration
122
+ * @returns Array of AssetItems for skeleton and atlas, or null if platform doesn't match
123
+ */
124
+ private generateSpineAssets;
125
+ /**
126
+ * Generate Sound asset URL with format fallback support.
127
+ *
128
+ * @param pkg - Sound package configuration
129
+ * @returns AssetItem for the sound, or null if platform doesn't match
130
+ */
131
+ private generateSoundAsset;
132
+ /**
133
+ * Returns sound alias -> channel mappings collected from bundle configs.
134
+ */
135
+ get soundChannelMappings(): ReadonlyMap<string, string>;
136
+ private initializePixiAssets;
137
+ /**
138
+ * Loads a specific asset bundle.
139
+ *
140
+ * @param bundleName - Name of the bundle to load
141
+ * @param onProgress - Optional progress callback
142
+ * @throws Error if bundle not found
143
+ *
144
+ * @example
145
+ * ```typescript
146
+ * await resourcePlugin.loadBundle('ui', (progress) => {
147
+ * console.log(`Loading: ${progress.percentage}%`);
148
+ * });
149
+ * ```
150
+ */
151
+ loadBundle(bundleName: string, onProgress?: (progress: LoadingProgress) => void, globalContext?: {
152
+ bundleIndex: number;
153
+ totalBundles: number;
154
+ }): Promise<void>;
155
+ /**
156
+ * Loads all critical priority assets (priority 0).
157
+ *
158
+ * Should be called during initial loading screen before game starts.
159
+ *
160
+ * @param onProgress - Optional progress callback
161
+ */
162
+ loadCriticalAssets(onProgress?: (progress: LoadingProgress) => void): Promise<void>;
163
+ /**
164
+ * Preloads all non-lazy bundles.
165
+ *
166
+ * Loads all bundles that are not marked as lazy, typically called
167
+ * after critical assets are loaded.
168
+ *
169
+ * @param onProgress - Optional progress callback
170
+ */
171
+ preloadAssets(onProgress?: (progress: LoadingProgress) => void): Promise<void>;
172
+ /**
173
+ * Checks if a bundle has been loaded.
174
+ *
175
+ * @param bundleName - Name of the bundle
176
+ * @returns True if loaded, false otherwise
177
+ */
178
+ isBundleLoaded(bundleName: string): boolean;
179
+ /**
180
+ * Returns the count of critical bundles (priority 0).
181
+ */
182
+ getCriticalBundleCount(): number;
183
+ /**
184
+ * Returns the count of non-lazy bundles to preload.
185
+ */
186
+ getPreloadBundleCount(): number;
187
+ [key: symbol]: any;
188
+ }
189
+ //# sourceMappingURL=ResourcePlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourcePlugin.d.ts","sourceRoot":"","sources":["../../../plugins/resource/ResourcePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,OAAO,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,oBAAoB,EAGpB,eAAe,EAKhB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,cAAe,YAAW,YAAY;IAC1C,IAAI,EAAE,MAAM,CAAoB;IAChC,QAAQ,EAAE,MAAM,CAAM;IACtB,YAAY,EAAE,MAAM,EAAE,CAAM;IAEnC,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAAS;IAG9B,OAAO,CAAC,YAAY,CAA4C;IAChE,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,gBAAgB,CAAU;IAClC,OAAO,CAAC,aAAa,CAAwB;IAE7C,mEAAmE;IACnE,OAAO,CAAC,qBAAqB,CAAkC;gBAEnD,MAAM,EAAE,oBAAoB;IAW3B,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BnD,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAIxC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,0BAA0B;IAqD3B,OAAO,IAAI,OAAO;IAIlB,OAAO,IAAI,IAAI;IAQtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,gBAAgB;IA6ExB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAoC3B;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IA+B1B;;OAEG;IACH,IAAW,oBAAoB,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAE7D;IAED,OAAO,CAAC,oBAAoB;IAoB5B;;;;;;;;;;;;;OAaG;IACU,UAAU,CACrB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,EAChD,aAAa,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAC5D,OAAO,CAAC,IAAI,CAAC;IA+ChB;;;;;;OAMG;IACU,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAWhG;;;;;;;OAOG;IACU,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAW3F;;;;;OAKG;IACI,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAKlD;;OAEG;IACI,sBAAsB,IAAI,MAAM;IAKvC;;OAEG;IACI,qBAAqB,IAAI,MAAM;IAKtC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -0,0 +1,153 @@
1
+ import type { PluginConfig } from '../Plugin.types';
2
+ /**
3
+ * Supported texture formats for asset loading.
4
+ */
5
+ export type TextureFormat = 'png' | 'webp' | 'avif';
6
+ /**
7
+ * Configuration for an asset package within a bundle.
8
+ *
9
+ * Allows fine-grained control over package loading behavior including
10
+ * resolution support and platform targeting.
11
+ *
12
+ * @public
13
+ */
14
+ export interface PackageConfig {
15
+ /** Package name (must match directory name) */
16
+ name: string;
17
+ /** Whether package has resolution variants (default: true) */
18
+ hasResolutions?: boolean;
19
+ /** Optional alias override for asset loading */
20
+ alias?: string;
21
+ /** Target platform for this package (default: 'both') */
22
+ platform?: 'desktop' | 'mobile' | 'both';
23
+ }
24
+ /**
25
+ * Sound channel types for audio categorization.
26
+ *
27
+ * @public
28
+ */
29
+ export type SoundChannel = 'music' | 'voice' | 'sfx' | 'ui';
30
+ /**
31
+ * Configuration for a sound package.
32
+ *
33
+ * @public
34
+ */
35
+ export interface SoundPackageConfig {
36
+ /** Sound file name (without extension) */
37
+ name: string;
38
+ /** Must be 'sound' to identify as sound package */
39
+ type: 'sound';
40
+ /** Optional alias override for asset loading */
41
+ alias?: string;
42
+ /** Direct source path with format pattern e.g. 'ambiance.{ogg,mp3}' */
43
+ src?: string;
44
+ /** Channel assignment for SoundPlugin */
45
+ channel?: SoundChannel;
46
+ /** Target platform for this package (default: 'both') */
47
+ platform?: 'desktop' | 'mobile' | 'both';
48
+ }
49
+ /**
50
+ * Configuration for a Spine animation package.
51
+ *
52
+ * @public
53
+ */
54
+ export interface SpinePackageConfig {
55
+ /** Package name (must match Spine export name) */
56
+ name: string;
57
+ /** Must be 'spine' to identify as Spine package */
58
+ type: 'spine';
59
+ /** Optional alias override for asset loading */
60
+ alias?: string;
61
+ /** Whether package has resolution variants (default: true) */
62
+ hasResolutions?: boolean;
63
+ /** Skeleton file format: 'skel' (binary) or 'json' (default: 'skel') */
64
+ skeletonFormat?: 'skel' | 'json';
65
+ /** Target platform for this package (default: 'both') */
66
+ platform?: 'desktop' | 'mobile' | 'both';
67
+ }
68
+ /**
69
+ * Asset bundle configuration.
70
+ *
71
+ * Bundles group related assets together for efficient loading.
72
+ * Supports priority-based loading and lazy loading.
73
+ *
74
+ * @public
75
+ */
76
+ export interface AssetBundle {
77
+ name: string;
78
+ packages: (string | PackageConfig | SpinePackageConfig | SoundPackageConfig)[];
79
+ path?: string;
80
+ priority?: number;
81
+ isLazy?: boolean;
82
+ }
83
+ export interface AssetPackage {
84
+ type: 'spritesheet' | 'spine-skel' | 'spine-data' | 'spine-atlas' | 'font';
85
+ name: string;
86
+ alias?: string;
87
+ }
88
+ export interface AssetItem {
89
+ alias: string;
90
+ src: string;
91
+ data?: any;
92
+ preferred?: number;
93
+ }
94
+ export interface AssetManifestEntry {
95
+ name: string;
96
+ assets: AssetItem[];
97
+ priority?: number;
98
+ }
99
+ /**
100
+ * Configuration for ResourcePlugin.
101
+ *
102
+ * Defines asset bundles and loading strategies. ResourcePlugin automatically
103
+ * detects device capabilities using PixiJS native features (isMobile, detectWebp)
104
+ * and calculates optimal asset resolution based on devicePixelRatio.
105
+ *
106
+ * @public
107
+ */
108
+ export interface ResourcePluginConfig extends PluginConfig {
109
+ /** Base path for asset loading (default: '/assets/graphics/') */
110
+ basePath?: string;
111
+ /** Base path for Spine assets (default: '/assets/spine/') */
112
+ spineBasePath?: string;
113
+ /** Base path for sound assets (default: '/assets/sounds/') */
114
+ audioBasePath?: string;
115
+ /** Asset bundles to load */
116
+ bundles: AssetBundle[];
117
+ /** Available resolution scales for assets (default: [0.25, 0.5, 1.0, 2.0]) */
118
+ availableResolutions?: number[];
119
+ /** Force specific resolution, bypassing automatic calculation */
120
+ forceResolution?: number;
121
+ /** Available texture formats in the game (default: ['png', 'webp']) */
122
+ availableTextureFormats?: TextureFormat[];
123
+ /** Font assets to load */
124
+ fonts?: FontAsset[];
125
+ }
126
+ export interface LoadingProgress {
127
+ bundleName: string;
128
+ loaded: number;
129
+ total: number;
130
+ percentage: number;
131
+ globalPercentage: number;
132
+ bundleIndex: number;
133
+ totalBundles: number;
134
+ }
135
+ export interface AssetBundleState {
136
+ name: string;
137
+ status: 'pending' | 'loading' | 'loaded' | 'error';
138
+ priority: number;
139
+ assets: AssetItem[];
140
+ error?: Error;
141
+ }
142
+ export type LoadPriority = 0 | 1 | 2 | 3;
143
+ export interface FontAsset {
144
+ alias: string;
145
+ src: string;
146
+ data?: {
147
+ family: string;
148
+ weights?: string[];
149
+ style?: string;
150
+ display?: string;
151
+ };
152
+ }
153
+ //# sourceMappingURL=ResourcePlugin.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourcePlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/resource/ResourcePlugin.types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export { ResourcePlugin } from './ResourcePlugin';
2
+ export type { ResourcePluginConfig, AssetBundle, AssetPackage, AssetItem, AssetManifestEntry, AssetBundleState, LoadingProgress, LoadPriority } from './ResourcePlugin.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/resource/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACf,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,203 @@
1
+ import { Container } from 'pixi.js';
2
+ import { PixiEngine } from '../../engine';
3
+ /**
4
+ * Abstract base class for all game scenes.
5
+ *
6
+ * Scene provides a structured lifecycle for game screens (menus, gameplay, etc.).
7
+ * Extends PixiJS Container, so all display objects can be added as children.
8
+ *
9
+ * ## Lifecycle Methods
10
+ *
11
+ * 1. **onInitialize()** - Called once when scene is first entered
12
+ * 2. **onEnter()** - Called every time scene becomes active (async, for animations)
13
+ * 3. **update()** - Called every frame while scene is active
14
+ * 4. **onResize()** - Called when window is resized
15
+ * 5. **onExit()** - Called when leaving scene (async, for exit animations)
16
+ * 6. **cleanup()** - Called after exit for resource cleanup
17
+ *
18
+ * ## Usage Pattern
19
+ *
20
+ * 1. Create a class extending Scene
21
+ * 2. Override lifecycle methods as needed
22
+ * 3. Register scene with ScenePlugin
23
+ * 4. Switch to scene using ScenePlugin.switchScene()
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * class MainMenuScene extends Scene {
28
+ * private logo: Sprite;
29
+ *
30
+ * constructor() {
31
+ * super('MainMenu');
32
+ * }
33
+ *
34
+ * protected onInitialize(): void {
35
+ * // Create UI elements
36
+ * this.logo = new Sprite(texture);
37
+ * this.addChild(this.logo);
38
+ * }
39
+ *
40
+ * protected async onEnter(): Promise<void> {
41
+ * // Fade in animation
42
+ * await gsap.to(this, { alpha: 1, duration: 0.5 });
43
+ * }
44
+ *
45
+ * public update(deltaTime: number): void {
46
+ * // Update logic
47
+ * this.logo.rotation += deltaTime * 0.001;
48
+ * }
49
+ *
50
+ * protected async onExit(): Promise<void> {
51
+ * // Fade out animation
52
+ * await gsap.to(this, { alpha: 0, duration: 0.3 });
53
+ * }
54
+ *
55
+ * protected cleanup(): void {
56
+ * // Clean up resources
57
+ * this.logo.destroy();
58
+ * }
59
+ * }
60
+ * ```
61
+ *
62
+ * @public
63
+ */
64
+ export declare abstract class Scene extends Container {
65
+ sceneName: string;
66
+ protected engine: PixiEngine;
67
+ constructor(sceneName: string);
68
+ /**
69
+ * Sets the engine reference.
70
+ *
71
+ * Called automatically by ScenePlugin when scene is registered.
72
+ *
73
+ * @param engine - PixiEngine instance
74
+ * @internal
75
+ */
76
+ setEngine(engine: PixiEngine): void;
77
+ /**
78
+ * Enters the scene.
79
+ *
80
+ * Calls onInitialize() and onEnter() in sequence.
81
+ * Called automatically by ScenePlugin when switching to this scene.
82
+ *
83
+ * @param params - Optional parameters passed from switchScene()
84
+ * @internal
85
+ */
86
+ enter(params?: unknown): Promise<void>;
87
+ /**
88
+ * Exits the scene.
89
+ *
90
+ * Calls onExit() and cleanup() in sequence.
91
+ * Called automatically by ScenePlugin when switching away from this scene.
92
+ *
93
+ * @internal
94
+ */
95
+ exit(): Promise<void>;
96
+ /**
97
+ * Initializes the scene.
98
+ *
99
+ * Called once when the scene is first entered.
100
+ * Override to create UI elements and set up initial state.
101
+ *
102
+ * @example
103
+ * ```typescript
104
+ * protected onInitialize(): void {
105
+ * this.background = new Sprite(bgTexture);
106
+ * this.addChild(this.background);
107
+ * }
108
+ * ```
109
+ */
110
+ protected onInitialize(): Promise<void>;
111
+ /**
112
+ * Called when the scene becomes active.
113
+ *
114
+ * Override to implement entry animations.
115
+ * This method is async, so you can await animations.
116
+ *
117
+ * @param _params - Optional parameters passed from switchScene()
118
+ *
119
+ * @example
120
+ * ```typescript
121
+ * protected async onEnter(params?: { level: number }): Promise<void> {
122
+ * this.alpha = 0;
123
+ * if (params) {
124
+ * this.level = params.level;
125
+ * }
126
+ * await gsap.to(this, { alpha: 1, duration: 0.5 });
127
+ * }
128
+ * ```
129
+ */
130
+ protected onEnter(_params?: unknown): Promise<void>;
131
+ /**
132
+ * Called when leaving the scene.
133
+ *
134
+ * Override to implement exit animations.
135
+ * This method is async, so you can await animations.
136
+ *
137
+ * @example
138
+ * ```typescript
139
+ * protected async onExit(): Promise<void> {
140
+ * await gsap.to(this, { alpha: 0, duration: 0.3 });
141
+ * }
142
+ * ```
143
+ */
144
+ protected onExit(): Promise<void>;
145
+ /**
146
+ * Cleans up scene resources.
147
+ *
148
+ * Called after onExit() when the scene is removed.
149
+ * Override to destroy textures, remove event listeners, etc.
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * protected cleanup(): void {
154
+ * this.background.destroy();
155
+ * this.removeAllListeners();
156
+ * }
157
+ * ```
158
+ */
159
+ protected cleanup(): void;
160
+ /**
161
+ * Updates the scene every frame.
162
+ *
163
+ * Override to implement per-frame logic like animations,
164
+ * physics, or input handling.
165
+ *
166
+ * @param _deltaTime - Time elapsed since last frame in milliseconds
167
+ *
168
+ * @example
169
+ * ```typescript
170
+ * public update(deltaTime: number): void {
171
+ * this.player.x += this.velocity * deltaTime;
172
+ * this.checkCollisions();
173
+ * }
174
+ * ```
175
+ */
176
+ update(_deltaTime: number): void;
177
+ /**
178
+ * Called when the window is resized.
179
+ *
180
+ * Override to reposition or scale UI elements.
181
+ *
182
+ * @param _width - New window width
183
+ * @param _height - New window height
184
+ *
185
+ * @example
186
+ * ```typescript
187
+ * public onResize(width: number, height: number): void {
188
+ * this.background.width = width;
189
+ * this.background.height = height;
190
+ * this.centerLogo(width, height);
191
+ * }
192
+ * ```
193
+ */
194
+ onResize(_width: number, _height: number): void;
195
+ /**
196
+ * Get the stage (root container) by traversing up the parent chain.
197
+ * Useful for attaching global event listeners.
198
+ *
199
+ * @returns The stage container or null if not attached to stage
200
+ */
201
+ getStage(): Container | null;
202
+ }
203
+ //# sourceMappingURL=Scene.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../../plugins/scene/Scene.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,8BAAsB,KAAM,SAAQ,SAAS;IAGxB,SAAS,EAAE,MAAM;IAFpC,SAAS,CAAC,MAAM,EAAG,UAAU,CAAC;gBAEX,SAAS,EAAE,MAAM;IAMpC;;;;;;;OAOG;IACI,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAI1C;;;;;;;;OAQG;IACU,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD;;;;;;;OAOG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC;;;;;;;;;;;;;OAaG;cACa,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7C;;;;;;;;;;;;;;;;;;OAkBG;cACa,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzD;;;;;;;;;;;;OAYG;cACa,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvC;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,OAAO,IAAI,IAAI;IAIzB;;;;;;;;;;;;;;;OAeG;IACI,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAMvC;;;;;;;;;;;;;;;;OAgBG;IACI,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAKtD;;;;;OAKG;IACI,QAAQ,IAAI,SAAS,GAAG,IAAI;CASpC"}