react-native-games 0.3.0 → 0.5.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 (429) hide show
  1. package/README.md +134 -130
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +116 -343
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +182 -0
  5. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -0
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +123 -101
  7. package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -1
  8. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +119 -92
  9. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -1
  10. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +123 -113
  11. package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -1
  12. package/lib/module/games/balloon-blaster/components/GameArea.js +137 -23
  13. package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
  14. package/lib/module/games/balloon-blaster/components/GameBackground.js +8 -83
  15. package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -1
  16. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +15 -22
  17. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  18. package/lib/module/games/balloon-blaster/components/index.js +0 -4
  19. package/lib/module/games/balloon-blaster/components/index.js.map +1 -1
  20. package/lib/module/games/fruit-ninja/FruitNinja.js +143 -0
  21. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -0
  22. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +148 -0
  23. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -0
  24. package/lib/module/games/{fruit-slicer/FruitSlicerService.js → fruit-ninja/FruitNinjaService.js} +43 -21
  25. package/lib/module/games/fruit-ninja/FruitNinjaService.js.map +1 -0
  26. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +191 -0
  27. package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -0
  28. package/lib/module/games/{fruit-slicer → fruit-ninja}/components/FruitComponent.js +1 -1
  29. package/lib/module/games/fruit-ninja/components/FruitComponent.js.map +1 -0
  30. package/lib/module/games/fruit-ninja/components/GameArea.js +215 -0
  31. package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -0
  32. package/lib/module/games/{fruit-slicer → fruit-ninja}/components/GameBackground.js +250 -304
  33. package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -0
  34. package/lib/module/games/{fruit-slicer → fruit-ninja}/components/ScoreBoard.js +17 -47
  35. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -0
  36. package/lib/module/games/fruit-ninja/components/index.js +7 -0
  37. package/lib/module/games/fruit-ninja/components/index.js.map +1 -0
  38. package/lib/module/games/maze-runner/MazeRunner.js +184 -169
  39. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  40. package/lib/module/games/maze-runner/MazeRunnerConstants.js +100 -0
  41. package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -0
  42. package/lib/module/games/maze-runner/MazeRunnerService.js +37 -14
  43. package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -1
  44. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +5 -4
  45. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js.map +1 -1
  46. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +20 -15
  47. package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -1
  48. package/lib/module/games/maze-runner/components/GameBackground.js +151 -192
  49. package/lib/module/games/maze-runner/components/GameBackground.js.map +1 -1
  50. package/lib/module/games/maze-runner/components/ScoreBoard.js +15 -25
  51. package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -1
  52. package/lib/module/games/maze-runner/components/WallComponent.js +3 -2
  53. package/lib/module/games/maze-runner/components/WallComponent.js.map +1 -1
  54. package/lib/module/games/maze-runner/components/index.js +0 -2
  55. package/lib/module/games/maze-runner/components/index.js.map +1 -1
  56. package/lib/module/games/popit-fidget/PopitFidget.js +294 -0
  57. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -0
  58. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +113 -0
  59. package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -0
  60. package/lib/module/games/popit-fidget/PopitFidgetService.js +132 -0
  61. package/lib/module/games/popit-fidget/PopitFidgetService.js.map +1 -0
  62. package/lib/module/games/popit-fidget/PopitFidgetStore.js +163 -0
  63. package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -0
  64. package/lib/module/games/popit-fidget/components/BubbleComponent.js +198 -0
  65. package/lib/module/games/popit-fidget/components/BubbleComponent.js.map +1 -0
  66. package/lib/module/games/popit-fidget/components/FidgetGrid.js +165 -0
  67. package/lib/module/games/popit-fidget/components/FidgetGrid.js.map +1 -0
  68. package/lib/module/games/popit-fidget/components/GameBackground.js +177 -0
  69. package/lib/module/games/popit-fidget/components/GameBackground.js.map +1 -0
  70. package/lib/module/games/popit-fidget/components/ScoreBoard.js +75 -0
  71. package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -0
  72. package/lib/module/games/popit-fidget/components/index.js +7 -0
  73. package/lib/module/games/popit-fidget/components/index.js.map +1 -0
  74. package/lib/module/games/space-fighter/SpaceFighter.js +169 -0
  75. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -0
  76. package/lib/module/games/space-fighter/SpaceFighterConstants.js +108 -0
  77. package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -0
  78. package/lib/module/games/{space-traveller/SpaceTravellerService.js → space-fighter/SpaceFighterService.js} +48 -21
  79. package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -0
  80. package/lib/module/games/space-fighter/SpaceFighterStore.js +195 -0
  81. package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -0
  82. package/lib/module/games/{space-traveller → space-fighter}/components/AsteroidComponent.js +7 -5
  83. package/lib/module/games/space-fighter/components/AsteroidComponent.js.map +1 -0
  84. package/lib/module/games/space-fighter/components/GameArea.js +295 -0
  85. package/lib/module/games/space-fighter/components/GameArea.js.map +1 -0
  86. package/lib/module/games/{space-traveller → space-fighter}/components/GameBackground.js +10 -65
  87. package/lib/module/games/space-fighter/components/GameBackground.js.map +1 -0
  88. package/lib/module/games/{space-traveller → space-fighter}/components/ScoreBoard.js +20 -26
  89. package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -0
  90. package/lib/module/games/{space-traveller → space-fighter}/components/Spacecraft3D.js +72 -111
  91. package/lib/module/games/space-fighter/components/Spacecraft3D.js.map +1 -0
  92. package/lib/module/games/space-fighter/components/SpacecraftPath.js +52 -0
  93. package/lib/module/games/space-fighter/components/SpacecraftPath.js.map +1 -0
  94. package/lib/module/games/{space-traveller → space-fighter}/components/index.js +0 -4
  95. package/lib/module/games/space-fighter/components/index.js.map +1 -0
  96. package/lib/module/games/whack-a-mole/WhackAMole.js +263 -0
  97. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -0
  98. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +115 -0
  99. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -0
  100. package/lib/module/games/whack-a-mole/WhackAMoleService.js +120 -0
  101. package/lib/module/games/whack-a-mole/WhackAMoleService.js.map +1 -0
  102. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +172 -0
  103. package/lib/module/games/whack-a-mole/WhackAMoleStore.js.map +1 -0
  104. package/lib/module/games/{cat-popper → whack-a-mole}/components/GameBackground.js +31 -91
  105. package/lib/module/games/whack-a-mole/components/GameBackground.js.map +1 -0
  106. package/lib/module/games/whack-a-mole/components/GameGrid.js +97 -0
  107. package/lib/module/games/whack-a-mole/components/GameGrid.js.map +1 -0
  108. package/lib/module/games/{cat-popper → whack-a-mole}/components/GameHole.js +67 -54
  109. package/lib/module/games/whack-a-mole/components/GameHole.js.map +1 -0
  110. package/lib/module/games/{cat-popper/components/CatCharacter.js → whack-a-mole/components/MoleCharacter.js} +75 -115
  111. package/lib/module/games/whack-a-mole/components/MoleCharacter.js.map +1 -0
  112. package/lib/module/games/{cat-popper → whack-a-mole}/components/ScoreBoard.js +13 -17
  113. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -0
  114. package/lib/module/games/{cat-popper → whack-a-mole}/components/index.js +1 -3
  115. package/lib/module/games/whack-a-mole/components/index.js.map +1 -0
  116. package/lib/module/index.js +4 -3
  117. package/lib/module/index.js.map +1 -1
  118. package/lib/module/services/GamesConstants.js +41 -519
  119. package/lib/module/services/GamesConstants.js.map +1 -1
  120. package/lib/module/services/GamesService.js +35 -23
  121. package/lib/module/services/GamesService.js.map +1 -1
  122. package/lib/module/services/HapticsService.js +77 -0
  123. package/lib/module/services/HapticsService.js.map +1 -0
  124. package/lib/module/services/SoundsService.js +171 -0
  125. package/lib/module/services/SoundsService.js.map +1 -0
  126. package/lib/module/shared/helpers/AnimationFrame.js +120 -0
  127. package/lib/module/shared/helpers/AnimationFrame.js.map +1 -0
  128. package/lib/module/shared/helpers/AnimationTracker.js +89 -0
  129. package/lib/module/shared/helpers/AnimationTracker.js.map +1 -0
  130. package/lib/module/shared/helpers/ErrorHandler.js +269 -0
  131. package/lib/module/shared/helpers/ErrorHandler.js.map +1 -0
  132. package/lib/module/shared/helpers/GameControlButton.js +219 -0
  133. package/lib/module/shared/helpers/GameControlButton.js.map +1 -0
  134. package/lib/module/{games/balloon-blaster/components → shared/helpers}/GameOverModal.js +25 -17
  135. package/lib/module/shared/helpers/GameOverModal.js.map +1 -0
  136. package/lib/module/shared/helpers/GameSettingsModal.js +287 -0
  137. package/lib/module/shared/helpers/GameSettingsModal.js.map +1 -0
  138. package/lib/module/shared/helpers/ParticleBlast.js +133 -0
  139. package/lib/module/shared/helpers/ParticleBlast.js.map +1 -0
  140. package/lib/module/shared/helpers/ResponsiveScoreBoard.js +81 -0
  141. package/lib/module/shared/helpers/ResponsiveScoreBoard.js.map +1 -0
  142. package/lib/module/shared/helpers/index.js +12 -0
  143. package/lib/module/shared/helpers/index.js.map +1 -0
  144. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +2 -14
  145. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  146. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +144 -0
  147. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts.map +1 -0
  148. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +1 -1
  149. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -1
  150. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +12 -2
  151. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts.map +1 -1
  152. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts.map +1 -1
  153. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +1 -15
  154. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts.map +1 -1
  155. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -1
  156. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +1 -7
  157. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  158. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts +0 -4
  159. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -1
  160. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +4 -0
  161. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -0
  162. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +112 -0
  163. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts.map +1 -0
  164. package/lib/typescript/src/games/{fruit-slicer/FruitSlicerService.d.ts → fruit-ninja/FruitNinjaService.d.ts} +13 -5
  165. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts.map +1 -0
  166. package/lib/typescript/src/games/{fruit-slicer/FruitSlicerStore.d.ts → fruit-ninja/FruitNinjaStore.d.ts} +13 -4
  167. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts.map +1 -0
  168. package/lib/typescript/src/games/{fruit-slicer → fruit-ninja}/components/FruitComponent.d.ts +1 -1
  169. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts.map +1 -0
  170. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +3 -0
  171. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts.map +1 -0
  172. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -0
  173. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +3 -0
  174. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -0
  175. package/lib/typescript/src/games/fruit-ninja/components/index.d.ts +5 -0
  176. package/lib/typescript/src/games/fruit-ninja/components/index.d.ts.map +1 -0
  177. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +2 -16
  178. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  179. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +41 -0
  180. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts.map +1 -0
  181. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +4 -2
  182. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -1
  183. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts.map +1 -1
  184. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts.map +1 -1
  185. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts +2 -1
  186. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts.map +1 -1
  187. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -1
  188. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts.map +1 -1
  189. package/lib/typescript/src/games/maze-runner/components/index.d.ts +0 -2
  190. package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -1
  191. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +5 -0
  192. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -0
  193. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +45 -0
  194. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts.map +1 -0
  195. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +33 -0
  196. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts.map +1 -0
  197. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +36 -0
  198. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -0
  199. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +12 -0
  200. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts.map +1 -0
  201. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +12 -0
  202. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts.map +1 -0
  203. package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts +9 -0
  204. package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts.map +1 -0
  205. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +8 -0
  206. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts.map +1 -0
  207. package/lib/typescript/src/games/popit-fidget/components/index.d.ts +5 -0
  208. package/lib/typescript/src/games/popit-fidget/components/index.d.ts.map +1 -0
  209. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +4 -0
  210. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -0
  211. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +71 -0
  212. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts.map +1 -0
  213. package/lib/typescript/src/games/{space-traveller/SpaceTravellerService.d.ts → space-fighter/SpaceFighterService.d.ts} +7 -4
  214. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -0
  215. package/lib/typescript/src/games/{space-traveller/SpaceTravellerStore.d.ts → space-fighter/SpaceFighterStore.d.ts} +12 -4
  216. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -0
  217. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +8 -0
  218. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts.map +1 -0
  219. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +3 -0
  220. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -0
  221. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts.map +1 -0
  222. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +3 -0
  223. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -0
  224. package/lib/typescript/src/games/{space-traveller → space-fighter}/components/Spacecraft3D.d.ts +1 -1
  225. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts.map +1 -0
  226. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts.map +1 -0
  227. package/lib/typescript/src/games/{space-traveller → space-fighter}/components/index.d.ts +0 -4
  228. package/lib/typescript/src/games/space-fighter/components/index.d.ts.map +1 -0
  229. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +4 -0
  230. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -0
  231. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +79 -0
  232. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts.map +1 -0
  233. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +33 -0
  234. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts.map +1 -0
  235. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +41 -0
  236. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts.map +1 -0
  237. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts.map +1 -0
  238. package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/GameGrid.d.ts +2 -2
  239. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts.map +1 -0
  240. package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/GameHole.d.ts +3 -2
  241. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts.map +1 -0
  242. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +7 -0
  243. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts.map +1 -0
  244. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -0
  245. package/lib/typescript/src/games/whack-a-mole/components/index.d.ts +6 -0
  246. package/lib/typescript/src/games/whack-a-mole/components/index.d.ts.map +1 -0
  247. package/lib/typescript/src/index.d.ts +4 -3
  248. package/lib/typescript/src/index.d.ts.map +1 -1
  249. package/lib/typescript/src/services/GamesConstants.d.ts +61 -340
  250. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  251. package/lib/typescript/src/services/GamesService.d.ts +21 -3
  252. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  253. package/lib/typescript/src/services/HapticsService.d.ts +16 -0
  254. package/lib/typescript/src/services/HapticsService.d.ts.map +1 -0
  255. package/lib/typescript/src/services/SoundsService.d.ts +154 -0
  256. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -0
  257. package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts +41 -0
  258. package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts.map +1 -0
  259. package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts +45 -0
  260. package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts.map +1 -0
  261. package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts +124 -0
  262. package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts.map +1 -0
  263. package/lib/typescript/src/shared/helpers/GameControlButton.d.ts +17 -0
  264. package/lib/typescript/src/shared/helpers/GameControlButton.d.ts.map +1 -0
  265. package/lib/typescript/src/{games/cat-popper/components → shared/helpers}/GameOverModal.d.ts +5 -0
  266. package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +1 -0
  267. package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts +9 -0
  268. package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts.map +1 -0
  269. package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts +12 -0
  270. package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +1 -0
  271. package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts +42 -0
  272. package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts.map +1 -0
  273. package/lib/typescript/src/shared/helpers/index.d.ts +13 -0
  274. package/lib/typescript/src/shared/helpers/index.d.ts.map +1 -0
  275. package/package.json +9 -6
  276. package/lib/module/games/balloon-blaster/components/GameControls.js +0 -229
  277. package/lib/module/games/balloon-blaster/components/GameControls.js.map +0 -1
  278. package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +0 -1
  279. package/lib/module/games/balloon-blaster/components/ParticleSystem.js +0 -52
  280. package/lib/module/games/balloon-blaster/components/ParticleSystem.js.map +0 -1
  281. package/lib/module/games/balloon-blaster/components/SliceTrail.js +0 -58
  282. package/lib/module/games/balloon-blaster/components/SliceTrail.js.map +0 -1
  283. package/lib/module/games/cat-popper/CatPopper.js +0 -230
  284. package/lib/module/games/cat-popper/CatPopper.js.map +0 -1
  285. package/lib/module/games/cat-popper/CatPopperService.js +0 -100
  286. package/lib/module/games/cat-popper/CatPopperService.js.map +0 -1
  287. package/lib/module/games/cat-popper/CatPopperStore.js +0 -113
  288. package/lib/module/games/cat-popper/CatPopperStore.js.map +0 -1
  289. package/lib/module/games/cat-popper/components/CatCharacter.js.map +0 -1
  290. package/lib/module/games/cat-popper/components/GameBackground.js.map +0 -1
  291. package/lib/module/games/cat-popper/components/GameControls.js +0 -230
  292. package/lib/module/games/cat-popper/components/GameControls.js.map +0 -1
  293. package/lib/module/games/cat-popper/components/GameGrid.js +0 -66
  294. package/lib/module/games/cat-popper/components/GameGrid.js.map +0 -1
  295. package/lib/module/games/cat-popper/components/GameHole.js.map +0 -1
  296. package/lib/module/games/cat-popper/components/GameOverModal.js +0 -131
  297. package/lib/module/games/cat-popper/components/GameOverModal.js.map +0 -1
  298. package/lib/module/games/cat-popper/components/ScoreBoard.js.map +0 -1
  299. package/lib/module/games/cat-popper/components/index.js.map +0 -1
  300. package/lib/module/games/fruit-slicer/FruitSlicer.js +0 -411
  301. package/lib/module/games/fruit-slicer/FruitSlicer.js.map +0 -1
  302. package/lib/module/games/fruit-slicer/FruitSlicerService.js.map +0 -1
  303. package/lib/module/games/fruit-slicer/FruitSlicerStore.js +0 -156
  304. package/lib/module/games/fruit-slicer/FruitSlicerStore.js.map +0 -1
  305. package/lib/module/games/fruit-slicer/components/FruitComponent.js.map +0 -1
  306. package/lib/module/games/fruit-slicer/components/GameArea.js +0 -50
  307. package/lib/module/games/fruit-slicer/components/GameArea.js.map +0 -1
  308. package/lib/module/games/fruit-slicer/components/GameBackground.js.map +0 -1
  309. package/lib/module/games/fruit-slicer/components/GameControls.js +0 -230
  310. package/lib/module/games/fruit-slicer/components/GameControls.js.map +0 -1
  311. package/lib/module/games/fruit-slicer/components/GameOverModal.js +0 -189
  312. package/lib/module/games/fruit-slicer/components/GameOverModal.js.map +0 -1
  313. package/lib/module/games/fruit-slicer/components/ParticleSystem.js +0 -52
  314. package/lib/module/games/fruit-slicer/components/ParticleSystem.js.map +0 -1
  315. package/lib/module/games/fruit-slicer/components/ScoreBoard.js.map +0 -1
  316. package/lib/module/games/fruit-slicer/components/SliceTrail.js +0 -58
  317. package/lib/module/games/fruit-slicer/components/SliceTrail.js.map +0 -1
  318. package/lib/module/games/fruit-slicer/components/index.js +0 -11
  319. package/lib/module/games/fruit-slicer/components/index.js.map +0 -1
  320. package/lib/module/games/maze-runner/components/GameControls.js +0 -129
  321. package/lib/module/games/maze-runner/components/GameControls.js.map +0 -1
  322. package/lib/module/games/maze-runner/components/GameOverModal.js +0 -134
  323. package/lib/module/games/maze-runner/components/GameOverModal.js.map +0 -1
  324. package/lib/module/games/space-traveller/SpaceTraveller.js +0 -393
  325. package/lib/module/games/space-traveller/SpaceTraveller.js.map +0 -1
  326. package/lib/module/games/space-traveller/SpaceTravellerService.js.map +0 -1
  327. package/lib/module/games/space-traveller/SpaceTravellerStore.js +0 -139
  328. package/lib/module/games/space-traveller/SpaceTravellerStore.js.map +0 -1
  329. package/lib/module/games/space-traveller/components/AsteroidComponent.js.map +0 -1
  330. package/lib/module/games/space-traveller/components/GameArea.js +0 -75
  331. package/lib/module/games/space-traveller/components/GameArea.js.map +0 -1
  332. package/lib/module/games/space-traveller/components/GameBackground.js.map +0 -1
  333. package/lib/module/games/space-traveller/components/GameControls.js +0 -177
  334. package/lib/module/games/space-traveller/components/GameControls.js.map +0 -1
  335. package/lib/module/games/space-traveller/components/GameOverModal.js +0 -182
  336. package/lib/module/games/space-traveller/components/GameOverModal.js.map +0 -1
  337. package/lib/module/games/space-traveller/components/ParticleComponent.js +0 -34
  338. package/lib/module/games/space-traveller/components/ParticleComponent.js.map +0 -1
  339. package/lib/module/games/space-traveller/components/ScoreBoard.js.map +0 -1
  340. package/lib/module/games/space-traveller/components/SettingsModal.js +0 -222
  341. package/lib/module/games/space-traveller/components/SettingsModal.js.map +0 -1
  342. package/lib/module/games/space-traveller/components/Spacecraft3D.js.map +0 -1
  343. package/lib/module/games/space-traveller/components/SpacecraftPath.js +0 -37
  344. package/lib/module/games/space-traveller/components/SpacecraftPath.js.map +0 -1
  345. package/lib/module/games/space-traveller/components/index.js.map +0 -1
  346. package/lib/module/shared/settings/GameSettings.js +0 -295
  347. package/lib/module/shared/settings/GameSettings.js.map +0 -1
  348. package/lib/module/shared/settings/SettingsService.js +0 -119
  349. package/lib/module/shared/settings/SettingsService.js.map +0 -1
  350. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts +0 -10
  351. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts.map +0 -1
  352. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts +0 -9
  353. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts.map +0 -1
  354. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts +0 -8
  355. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts.map +0 -1
  356. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts +0 -11
  357. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts.map +0 -1
  358. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts +0 -13
  359. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts.map +0 -1
  360. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts +0 -32
  361. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts.map +0 -1
  362. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts +0 -21
  363. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts.map +0 -1
  364. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts +0 -7
  365. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts.map +0 -1
  366. package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts.map +0 -1
  367. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts +0 -10
  368. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts.map +0 -1
  369. package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts.map +0 -1
  370. package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts.map +0 -1
  371. package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts.map +0 -1
  372. package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts.map +0 -1
  373. package/lib/typescript/src/games/cat-popper/components/index.d.ts +0 -8
  374. package/lib/typescript/src/games/cat-popper/components/index.d.ts.map +0 -1
  375. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts +0 -16
  376. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts.map +0 -1
  377. package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts.map +0 -1
  378. package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts.map +0 -1
  379. package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts.map +0 -1
  380. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts +0 -17
  381. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts.map +0 -1
  382. package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts.map +0 -1
  383. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts +0 -10
  384. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts.map +0 -1
  385. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts +0 -9
  386. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts.map +0 -1
  387. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts +0 -8
  388. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts.map +0 -1
  389. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts +0 -9
  390. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts.map +0 -1
  391. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts +0 -11
  392. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts.map +0 -1
  393. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts +0 -9
  394. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts.map +0 -1
  395. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts +0 -10
  396. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts.map +0 -1
  397. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts +0 -11
  398. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts.map +0 -1
  399. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts +0 -17
  400. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts.map +0 -1
  401. package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts.map +0 -1
  402. package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts.map +0 -1
  403. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts +0 -9
  404. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts.map +0 -1
  405. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts +0 -17
  406. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts.map +0 -1
  407. package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts.map +0 -1
  408. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts +0 -10
  409. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts.map +0 -1
  410. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts +0 -9
  411. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts.map +0 -1
  412. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts +0 -8
  413. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts.map +0 -1
  414. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts +0 -8
  415. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts.map +0 -1
  416. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts +0 -9
  417. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts.map +0 -1
  418. package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts.map +0 -1
  419. package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts.map +0 -1
  420. package/lib/typescript/src/games/space-traveller/components/index.d.ts.map +0 -1
  421. package/lib/typescript/src/shared/settings/GameSettings.d.ts +0 -36
  422. package/lib/typescript/src/shared/settings/GameSettings.d.ts.map +0 -1
  423. package/lib/typescript/src/shared/settings/SettingsService.d.ts +0 -32
  424. package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +0 -1
  425. /package/lib/typescript/src/games/{cat-popper → fruit-ninja}/components/GameBackground.d.ts +0 -0
  426. /package/lib/typescript/src/games/{fruit-slicer → space-fighter}/components/GameBackground.d.ts +0 -0
  427. /package/lib/typescript/src/games/{space-traveller → space-fighter}/components/SpacecraftPath.d.ts +0 -0
  428. /package/lib/typescript/src/games/{space-traveller → whack-a-mole}/components/GameBackground.d.ts +0 -0
  429. /package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/ScoreBoard.d.ts +0 -0
@@ -1,93 +1,59 @@
1
1
  "use strict";
2
2
 
3
- import React, { useEffect } from 'react';
3
+ import React, { useEffect, useMemo } from 'react';
4
4
  import { Canvas, Circle, Path, Skia, vec, Group, Shadow, LinearGradient, RadialGradient } from '@shopify/react-native-skia';
5
- import { useSharedValue, useAnimatedStyle, withRepeat, withTiming, withSequence, interpolate, Extrapolation } from 'react-native-reanimated';
5
+ import { useSharedValue, useAnimatedStyle, withRepeat, withTiming } from 'react-native-reanimated';
6
6
  import Animated from 'react-native-reanimated';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- export const Spacecraft3D = ({
8
+ // Highly optimized Spacecraft3D component with minimal animation overhead
9
+ export const Spacecraft3D = /*#__PURE__*/React.memo(({
9
10
  spacecraft,
10
11
  isControlled
11
12
  }) => {
12
13
  const size = spacecraft.size;
13
14
  const canvasSize = size * 2.5; // Larger canvas for 3D effects
14
15
 
15
- // Animations
16
+ // Reduced to essential animations only for better performance
16
17
  const engineGlow = useSharedValue(0);
17
- const thrusterPulse = useSharedValue(1);
18
- const hoverFloat = useSharedValue(0);
19
18
  const energyField = useSharedValue(0);
20
- const plasmaEffect = useSharedValue(0);
21
- useEffect(() => {
22
- // Engine glow animation - more dynamic
23
- engineGlow.value = withRepeat(withSequence(withTiming(1, {
24
- duration: 600
25
- }), withTiming(0.4, {
26
- duration: 400
27
- }), withTiming(0.8, {
28
- duration: 300
29
- }), withTiming(0.2, {
30
- duration: 500
31
- })), -1, false);
32
-
33
- // Energy field animation
34
- energyField.value = withRepeat(withSequence(withTiming(1, {
35
- duration: 1200
36
- }), withTiming(0, {
37
- duration: 800
38
- })), -1, false);
39
19
 
40
- // Plasma effect animation
41
- plasmaEffect.value = withRepeat(withSequence(withTiming(1, {
42
- duration: 400
43
- }), withTiming(0.3, {
44
- duration: 600
45
- }), withTiming(0.9, {
46
- duration: 300
47
- }), withTiming(0.1, {
48
- duration: 700
49
- })), -1, false);
20
+ // Memoize static values to prevent recalculation
21
+ const animationConfig = useMemo(() => ({
22
+ engineDuration: 1200,
23
+ // Slower for less CPU usage
24
+ energyDuration: 1500,
25
+ // Slower for less CPU usage
26
+ transitionDuration: 300
27
+ }), []);
28
+ useEffect(() => {
29
+ // Single essential engine glow animation - optimized timing
30
+ engineGlow.value = withRepeat(withTiming(1, {
31
+ duration: animationConfig.engineDuration
32
+ }), -1, true);
50
33
 
51
- // Thruster pulse when controlled - more intense
34
+ // Conditional energy field animation - only when controlled
52
35
  if (isControlled) {
53
- thrusterPulse.value = withRepeat(withSequence(withTiming(1.5, {
54
- duration: 150
55
- }), withTiming(0.8, {
56
- duration: 100
57
- }), withTiming(1.2, {
58
- duration: 150
59
- })), -1, false);
36
+ energyField.value = withRepeat(withTiming(1, {
37
+ duration: animationConfig.energyDuration
38
+ }), -1, true);
60
39
  } else {
61
- thrusterPulse.value = withTiming(1, {
62
- duration: 300
40
+ energyField.value = withTiming(0, {
41
+ duration: animationConfig.transitionDuration
63
42
  });
64
43
  }
44
+ }, [isControlled, animationConfig]);
65
45
 
66
- // More dynamic hover float
67
- hoverFloat.value = withRepeat(withSequence(withTiming(1, {
68
- duration: 1500
69
- }), withTiming(-0.5, {
70
- duration: 1000
71
- }), withTiming(0.5, {
72
- duration: 800
73
- }), withTiming(-1, {
74
- duration: 1200
75
- })), -1, false);
76
- }, [isControlled]);
46
+ // Simplified animated style - removed hover float for better performance
77
47
  const animatedStyle = useAnimatedStyle(() => {
78
- const scale = isControlled ? 1.1 : 1;
79
- const floatY = interpolate(hoverFloat.value, [-1, 1], [-2, 2], Extrapolation.CLAMP);
80
48
  return {
81
49
  transform: [{
82
- scale
83
- }, {
84
- translateY: floatY
50
+ scale: isControlled ? 1.1 : 1
85
51
  }]
86
52
  };
87
- });
53
+ }, [isControlled]);
88
54
 
89
- // Create spacecraft body path
90
- const createSpacecraftBody = () => {
55
+ // Memoized spacecraft body path for performance
56
+ const spacecraftBodyPath = useMemo(() => {
91
57
  const path = Skia.Path.Make();
92
58
  const centerX = canvasSize / 2;
93
59
  const centerY = canvasSize / 2;
@@ -102,10 +68,10 @@ export const Spacecraft3D = ({
102
68
  height: bodyHeight
103
69
  });
104
70
  return path;
105
- };
71
+ }, [canvasSize, size]);
106
72
 
107
- // Create wing paths
108
- const createWings = () => {
73
+ // Memoized wing paths for performance
74
+ const wingPaths = useMemo(() => {
109
75
  const leftWing = Skia.Path.Make();
110
76
  const rightWing = Skia.Path.Make();
111
77
  const centerX = canvasSize / 2;
@@ -128,10 +94,10 @@ export const Spacecraft3D = ({
128
94
  leftWing,
129
95
  rightWing
130
96
  };
131
- };
97
+ }, [canvasSize, size]);
132
98
 
133
- // Create cockpit path
134
- const createCockpit = () => {
99
+ // Memoized cockpit path for performance
100
+ const cockpitPath = useMemo(() => {
135
101
  const path = Skia.Path.Make();
136
102
  const centerX = canvasSize / 2;
137
103
  const centerY = canvasSize / 2;
@@ -143,15 +109,17 @@ export const Spacecraft3D = ({
143
109
  height: cockpitSize * 0.8
144
110
  });
145
111
  return path;
146
- };
147
- const spacecraftBody = createSpacecraftBody();
112
+ }, [canvasSize, size]);
113
+
114
+ // Memoized center coordinates for performance
115
+ const centerCoords = useMemo(() => ({
116
+ centerX: canvasSize / 2,
117
+ centerY: canvasSize / 2
118
+ }), [canvasSize]);
148
119
  const {
149
- leftWing,
150
- rightWing
151
- } = createWings();
152
- const cockpit = createCockpit();
153
- const centerX = canvasSize / 2;
154
- const centerY = canvasSize / 2;
120
+ centerX,
121
+ centerY
122
+ } = centerCoords;
155
123
  return /*#__PURE__*/_jsx(Animated.View, {
156
124
  style: [{
157
125
  position: 'absolute',
@@ -173,13 +141,13 @@ export const Spacecraft3D = ({
173
141
  blur: 6,
174
142
  color: "rgba(0,0,0,0.4)"
175
143
  }), /*#__PURE__*/_jsx(Path, {
176
- path: leftWing,
144
+ path: wingPaths.leftWing,
177
145
  color: "rgba(0,100,200,0.6)"
178
146
  }), /*#__PURE__*/_jsx(Path, {
179
- path: rightWing,
147
+ path: wingPaths.rightWing,
180
148
  color: "rgba(0,100,200,0.6)"
181
149
  }), /*#__PURE__*/_jsx(Path, {
182
- path: spacecraftBody,
150
+ path: spacecraftBodyPath,
183
151
  color: "rgba(0,150,255,0.7)"
184
152
  })]
185
153
  }), /*#__PURE__*/_jsx(Circle, {
@@ -193,49 +161,42 @@ export const Spacecraft3D = ({
193
161
  r: size * 0.6,
194
162
  color: `rgba(100, 200, 255, ${0.15 + energyField.value * 0.25})`
195
163
  }), /*#__PURE__*/_jsx(Path, {
196
- path: spacecraftBody,
164
+ path: spacecraftBodyPath,
197
165
  children: /*#__PURE__*/_jsx(LinearGradient, {
198
166
  start: vec(centerX - size * 0.4, centerY - size * 0.6),
199
167
  end: vec(centerX + size * 0.4, centerY + size * 0.6),
200
168
  colors: ['#00ffff', '#00d4ff', '#0099ff', '#0066cc', '#003399']
201
169
  })
202
170
  }), /*#__PURE__*/_jsx(Path, {
203
- path: spacecraftBody,
204
- children: /*#__PURE__*/_jsx(RadialGradient, {
205
- c: vec(centerX, centerY - size * 0.2),
206
- r: size * 0.5,
207
- colors: [`rgba(255, 100, 255, ${plasmaEffect.value * 0.4})`, `rgba(100, 255, 255, ${plasmaEffect.value * 0.2})`, 'rgba(0, 0, 0, 0)']
208
- })
209
- }), /*#__PURE__*/_jsx(Path, {
210
- path: leftWing,
171
+ path: wingPaths.leftWing,
211
172
  children: /*#__PURE__*/_jsx(LinearGradient, {
212
173
  start: vec(centerX - size * 0.8, centerY - size * 0.2),
213
174
  end: vec(centerX - size * 0.2, centerY + size * 0.2),
214
175
  colors: ['#00ccff', '#0099cc', '#006699', '#003366', '#001133']
215
176
  })
216
177
  }), /*#__PURE__*/_jsx(Path, {
217
- path: rightWing,
178
+ path: wingPaths.rightWing,
218
179
  children: /*#__PURE__*/_jsx(LinearGradient, {
219
180
  start: vec(centerX + size * 0.2, centerY - size * 0.2),
220
181
  end: vec(centerX + size * 0.8, centerY + size * 0.2),
221
182
  colors: ['#00ccff', '#0099cc', '#006699', '#003366', '#001133']
222
183
  })
223
184
  }), /*#__PURE__*/_jsx(Path, {
224
- path: leftWing,
185
+ path: wingPaths.leftWing,
225
186
  children: /*#__PURE__*/_jsx(LinearGradient, {
226
187
  start: vec(centerX - size * 0.6, centerY),
227
188
  end: vec(centerX - size * 0.9, centerY),
228
189
  colors: ['rgba(0, 255, 255, 0)', `rgba(0, 255, 255, ${energyField.value * 0.6})`, `rgba(255, 100, 255, ${energyField.value * 0.4})`]
229
190
  })
230
191
  }), /*#__PURE__*/_jsx(Path, {
231
- path: rightWing,
192
+ path: wingPaths.rightWing,
232
193
  children: /*#__PURE__*/_jsx(LinearGradient, {
233
194
  start: vec(centerX + size * 0.6, centerY),
234
195
  end: vec(centerX + size * 0.9, centerY),
235
196
  colors: ['rgba(0, 255, 255, 0)', `rgba(0, 255, 255, ${energyField.value * 0.6})`, `rgba(255, 100, 255, ${energyField.value * 0.4})`]
236
197
  })
237
198
  }), /*#__PURE__*/_jsx(Path, {
238
- path: cockpit,
199
+ path: cockpitPath,
239
200
  children: /*#__PURE__*/_jsx(RadialGradient, {
240
201
  c: vec(centerX, centerY - size * 0.4),
241
202
  r: size * 0.3,
@@ -283,56 +244,56 @@ export const Spacecraft3D = ({
283
244
  children: [/*#__PURE__*/_jsx(Circle, {
284
245
  cx: centerX - size * 0.15,
285
246
  cy: centerY + size * 0.65,
286
- r: size * 0.12 * thrusterPulse.value,
287
- color: `rgba(255, 50, 0, ${0.6 + plasmaEffect.value * 0.3})`
247
+ r: size * 0.12 * (isControlled ? 1.2 : 1),
248
+ color: `rgba(255, 50, 0, ${0.6 + (isControlled ? energyField.value : 0) * 0.3})`
288
249
  }), /*#__PURE__*/_jsx(Circle, {
289
250
  cx: centerX + size * 0.15,
290
251
  cy: centerY + size * 0.65,
291
- r: size * 0.12 * thrusterPulse.value,
292
- color: `rgba(255, 50, 0, ${0.6 + plasmaEffect.value * 0.3})`
252
+ r: size * 0.12 * (isControlled ? 1.2 : 1),
253
+ color: `rgba(255, 50, 0, ${0.6 + (isControlled ? energyField.value : 0) * 0.3})`
293
254
  }), /*#__PURE__*/_jsx(Circle, {
294
255
  cx: centerX - size * 0.15,
295
256
  cy: centerY + size * 0.8,
296
- r: size * 0.08 * thrusterPulse.value,
257
+ r: size * 0.08 * (isControlled ? 1.2 : 1),
297
258
  color: `rgba(255, 150, 0, ${0.4 + engineGlow.value * 0.3})`
298
259
  }), /*#__PURE__*/_jsx(Circle, {
299
260
  cx: centerX + size * 0.15,
300
261
  cy: centerY + size * 0.8,
301
- r: size * 0.08 * thrusterPulse.value,
262
+ r: size * 0.08 * (isControlled ? 1.2 : 1),
302
263
  color: `rgba(255, 150, 0, ${0.4 + engineGlow.value * 0.3})`
303
264
  })]
304
265
  }), /*#__PURE__*/_jsx(Circle, {
305
266
  cx: centerX - size * 0.8,
306
267
  cy: centerY,
307
- r: size * 0.06 * (1 + plasmaEffect.value * 0.3),
268
+ r: size * 0.06 * (1 + (isControlled ? energyField.value : 0) * 0.3),
308
269
  color: `rgba(0, 255, 0, ${0.8 + energyField.value * 0.2})`
309
270
  }), /*#__PURE__*/_jsx(Circle, {
310
271
  cx: centerX - size * 0.8,
311
272
  cy: centerY,
312
- r: size * 0.12 * (1 + plasmaEffect.value * 0.2),
273
+ r: size * 0.12 * (1 + (isControlled ? energyField.value : 0) * 0.2),
313
274
  color: `rgba(0, 255, 0, ${0.3 + energyField.value * 0.3})`
314
275
  }), /*#__PURE__*/_jsx(Circle, {
315
276
  cx: centerX + size * 0.8,
316
277
  cy: centerY,
317
- r: size * 0.06 * (1 + plasmaEffect.value * 0.3),
278
+ r: size * 0.06 * (1 + (isControlled ? energyField.value : 0) * 0.3),
318
279
  color: `rgba(255, 0, 0, ${0.8 + energyField.value * 0.2})`
319
280
  }), /*#__PURE__*/_jsx(Circle, {
320
281
  cx: centerX + size * 0.8,
321
282
  cy: centerY,
322
- r: size * 0.12 * (1 + plasmaEffect.value * 0.2),
283
+ r: size * 0.12 * (1 + (isControlled ? energyField.value : 0) * 0.2),
323
284
  color: `rgba(255, 0, 0, ${0.3 + energyField.value * 0.3})`
324
285
  }), /*#__PURE__*/_jsx(Path, {
325
- path: spacecraftBody,
286
+ path: spacecraftBodyPath,
326
287
  children: /*#__PURE__*/_jsx(LinearGradient, {
327
288
  start: vec(centerX - size * 0.3, centerY - size * 0.5),
328
289
  end: vec(centerX - size * 0.1, centerY - size * 0.3),
329
- colors: [`rgba(255,255,255,${0.6 + plasmaEffect.value * 0.2})`, `rgba(100,255,255,${0.3 + energyField.value * 0.2})`, 'rgba(255,255,255,0)']
290
+ colors: [`rgba(255,255,255,${0.6 + (isControlled ? energyField.value : 0) * 0.2})`, `rgba(100,255,255,${0.3 + energyField.value * 0.2})`, 'rgba(255,255,255,0)']
330
291
  })
331
292
  }), /*#__PURE__*/_jsx(Circle, {
332
293
  cx: centerX - size * 0.1,
333
294
  cy: centerY - size * 0.45,
334
- r: size * 0.08 * (1 + hoverFloat.value * 0.1),
335
- color: `rgba(255,255,255,${0.8 + plasmaEffect.value * 0.2})`
295
+ r: size * 0.08 * (1 + 0 * 0.1),
296
+ color: `rgba(255,255,255,${0.8 + (isControlled ? energyField.value : 0) * 0.2})`
336
297
  }), /*#__PURE__*/_jsx(Circle, {
337
298
  cx: centerX + size * 0.05,
338
299
  cy: centerY - size * 0.35,
@@ -345,7 +306,7 @@ export const Spacecraft3D = ({
345
306
  children: /*#__PURE__*/_jsx(RadialGradient, {
346
307
  c: vec(centerX, centerY),
347
308
  r: size * 0.08,
348
- colors: [`rgba(255, 255, 255, ${0.9 + plasmaEffect.value * 0.1})`, `rgba(0, 255, 255, ${0.7 + energyField.value * 0.2})`, `rgba(0, 100, 255, ${0.5 + plasmaEffect.value * 0.3})`, 'rgba(0, 0, 0, 0)']
309
+ colors: [`rgba(255, 255, 255, ${0.9 + (isControlled ? energyField.value : 0) * 0.1})`, `rgba(0, 255, 255, ${0.7 + energyField.value * 0.2})`, `rgba(0, 100, 255, ${0.5 + (isControlled ? energyField.value : 0) * 0.3})`, 'rgba(0, 0, 0, 0)']
349
310
  })
350
311
  }), Array.from({
351
312
  length: 8
@@ -353,10 +314,10 @@ export const Spacecraft3D = ({
353
314
  cx: centerX + Math.cos(i * Math.PI / 4) * size * 0.3,
354
315
  cy: centerY + Math.sin(i * Math.PI / 4) * size * 0.3,
355
316
  r: size * 0.02 * (1 + Math.sin(energyField.value * Math.PI + i) * 0.5),
356
- color: `rgba(0, 255, 255, ${0.3 + Math.abs(Math.sin(plasmaEffect.value * Math.PI + i)) * 0.4})`
317
+ color: `rgba(0, 255, 255, ${0.3 + Math.abs(Math.sin((isControlled ? energyField.value : 0) * Math.PI + i)) * 0.4})`
357
318
  }, i))]
358
319
  })
359
320
  })
360
321
  });
361
- };
322
+ });
362
323
  //# sourceMappingURL=Spacecraft3D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useMemo","Canvas","Circle","Path","Skia","vec","Group","Shadow","LinearGradient","RadialGradient","useSharedValue","useAnimatedStyle","withRepeat","withTiming","Animated","jsx","_jsx","jsxs","_jsxs","Spacecraft3D","memo","spacecraft","isControlled","size","canvasSize","engineGlow","energyField","animationConfig","engineDuration","energyDuration","transitionDuration","value","duration","animatedStyle","transform","scale","spacecraftBodyPath","path","Make","centerX","centerY","bodyWidth","bodyHeight","addOval","x","y","width","height","wingPaths","leftWing","rightWing","wingWidth","wingHeight","moveTo","lineTo","close","cockpitPath","cockpitSize","centerCoords","View","style","position","left","top","children","dx","dy","blur","color","cx","cy","r","start","end","colors","c","Array","from","length","_","i","Math","cos","PI","sin","abs"],"sourceRoot":"../../../../../src","sources":["games/space-fighter/components/Spacecraft3D.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACjD,SACEC,MAAM,EACNC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,GAAG,EACHC,KAAK,EACLC,MAAM,EACNC,cAAc,EACdC,cAAc,QACT,4BAA4B;AACnC,SACEC,cAAc,EACdC,gBAAgB,EAChBC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,OAAOC,QAAQ,MAAM,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ/C;AACA,OAAO,MAAMC,YAAyC,gBAAGrB,KAAK,CAACsB,IAAI,CAAC,CAAC;EAAEC,UAAU;EAAEC;AAAa,CAAC,KAAK;EACpG,MAAMC,IAAI,GAAGF,UAAU,CAACE,IAAI;EAC5B,MAAMC,UAAU,GAAGD,IAAI,GAAG,GAAG,CAAC,CAAC;;EAE/B;EACA,MAAME,UAAU,GAAGf,cAAc,CAAC,CAAC,CAAC;EACpC,MAAMgB,WAAW,GAAGhB,cAAc,CAAC,CAAC,CAAC;;EAErC;EACA,MAAMiB,eAAe,GAAG3B,OAAO,CAAC,OAAO;IACrC4B,cAAc,EAAE,IAAI;IAAE;IACtBC,cAAc,EAAE,IAAI;IAAG;IACvBC,kBAAkB,EAAE;EACtB,CAAC,CAAC,EAAE,EAAE,CAAC;EAEP/B,SAA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CAACK,KAAK,GAAG,CAAC,IAAIkD,IAAI,CAACE,EAAE,GAAGH,CAAC,CAAC,CAAC,GAAG,GAAG;QAAI,GAJ/GA,CAKN,CACF,CAAC;MAAA,CACG;IAAC,CACF;EAAC,CACI,CAAC;AAEpB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ import React, { useMemo } from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { COLORS } from "../SpaceFighterService.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ // Optimized SpacecraftPath with performance improvements
8
+ export const SpacecraftPath = /*#__PURE__*/React.memo(({
9
+ path
10
+ }) => {
11
+ // Early return for performance
12
+ if (path.length < 2) return null;
13
+
14
+ // Memoize path points to prevent recalculation on every render
15
+ const pathPoints = useMemo(() => {
16
+ return path.slice(1).map((point, index) => ({
17
+ key: `path-${index}`,
18
+ x: point.x - 2,
19
+ y: point.y - 2,
20
+ opacity: (index + 1) / path.length * 0.5
21
+ }));
22
+ }, [path]);
23
+ return /*#__PURE__*/_jsx(View, {
24
+ style: styles.container,
25
+ children: pathPoints.map(point => /*#__PURE__*/_jsx(View, {
26
+ style: [styles.pathPoint, {
27
+ left: point.x,
28
+ top: point.y,
29
+ opacity: point.opacity
30
+ }]
31
+ }, point.key))
32
+ });
33
+ });
34
+
35
+ // Optimized styles using StyleSheet
36
+ const styles = StyleSheet.create({
37
+ container: {
38
+ position: 'absolute',
39
+ top: 0,
40
+ left: 0,
41
+ right: 0,
42
+ bottom: 0
43
+ },
44
+ pathPoint: {
45
+ position: 'absolute',
46
+ width: 4,
47
+ height: 4,
48
+ borderRadius: 2,
49
+ backgroundColor: COLORS.SPACECRAFT
50
+ }
51
+ });
52
+ //# sourceMappingURL=SpacecraftPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","View","StyleSheet","COLORS","jsx","_jsx","SpacecraftPath","memo","path","length","pathPoints","slice","map","point","index","key","x","y","opacity","style","styles","container","children","pathPoint","left","top","create","position","right","bottom","width","height","borderRadius","backgroundColor","SPACECRAFT"],"sourceRoot":"../../../../../src","sources":["games/space-fighter/components/SpacecraftPath.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMhD;AACA,OAAO,MAAMC,cAA6C,gBAAGP,KAAK,CAACQ,IAAI,CAAC,CAAC;EAAEC;AAAK,CAAC,KAAK;EACpF;EACA,IAAIA,IAAI,CAACC,MAAM,GAAG,CAAC,EAAE,OAAO,IAAI;;EAEhC;EACA,MAAMC,UAAU,GAAGV,OAAO,CAAC,MAAM;IAC/B,OAAOQ,IAAI,CAACG,KAAK,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,MAAM;MAC1CC,GAAG,EAAE,QAAQD,KAAK,EAAE;MACpBE,CAAC,EAAEH,KAAK,CAACG,CAAC,GAAG,CAAC;MACdC,CAAC,EAAEJ,KAAK,CAACI,CAAC,GAAG,CAAC;MACdC,OAAO,EAAG,CAACJ,KAAK,GAAG,CAAC,IAAIN,IAAI,CAACC,MAAM,GAAI;IACzC,CAAC,CAAC,CAAC;EACL,CAAC,EAAE,CAACD,IAAI,CAAC,CAAC;EAEV,oBACEH,IAAA,CAACJ,IAAI;IAACkB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BZ,UAAU,CAACE,GAAG,CAAEC,KAAK,iBACpBR,IAAA,CAACJ,IAAI;MAEHkB,KAAK,EAAE,CACLC,MAAM,CAACG,SAAS,EAChB;QACEC,IAAI,EAAEX,KAAK,CAACG,CAAC;QACbS,GAAG,EAAEZ,KAAK,CAACI,CAAC;QACZC,OAAO,EAAEL,KAAK,CAACK;MACjB,CAAC;IACD,GARGL,KAAK,CAACE,GASZ,CACF;EAAC,CACE,CAAC;AAEX,CAAC,CAAC;;AAEF;AACA,MAAMK,MAAM,GAAGlB,UAAU,CAACwB,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,QAAQ,EAAE,UAAU;IACpBF,GAAG,EAAE,CAAC;IACND,IAAI,EAAE,CAAC;IACPI,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACV,CAAC;EACDN,SAAS,EAAE;IACTI,QAAQ,EAAE,UAAU;IACpBG,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAE9B,MAAM,CAAC+B;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
@@ -3,11 +3,7 @@
3
3
  export { ScoreBoard } from "./ScoreBoard.js";
4
4
  export { AsteroidComponent } from "./AsteroidComponent.js";
5
5
  export { Spacecraft3D } from "./Spacecraft3D.js";
6
- export { ParticleComponent } from "./ParticleComponent.js";
7
6
  export { SpacecraftPath } from "./SpacecraftPath.js";
8
7
  export { GameArea } from "./GameArea.js";
9
- export { GameControls } from "./GameControls.js";
10
- export { GameOverModal } from "./GameOverModal.js";
11
- export { SettingsModal } from "./SettingsModal.js";
12
8
  export { GameBackground } from "./GameBackground.js";
13
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ScoreBoard","AsteroidComponent","Spacecraft3D","SpacecraftPath","GameArea","GameBackground"],"sourceRoot":"../../../../../src","sources":["games/space-fighter/components/index.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc;AACzC,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,cAAc,QAAQ,qBAAkB","ignoreList":[]}