react-native-games 0.3.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 (269) hide show
  1. package/LICENSE +66 -0
  2. package/README.md +269 -0
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js +391 -0
  4. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -0
  5. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +293 -0
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -0
  7. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +156 -0
  8. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -0
  9. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +227 -0
  10. package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -0
  11. package/lib/module/games/balloon-blaster/components/GameArea.js +42 -0
  12. package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -0
  13. package/lib/module/games/balloon-blaster/components/GameBackground.js +544 -0
  14. package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -0
  15. package/lib/module/games/balloon-blaster/components/GameControls.js +229 -0
  16. package/lib/module/games/balloon-blaster/components/GameControls.js.map +1 -0
  17. package/lib/module/games/balloon-blaster/components/GameOverModal.js +133 -0
  18. package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +1 -0
  19. package/lib/module/games/balloon-blaster/components/ParticleSystem.js +52 -0
  20. package/lib/module/games/balloon-blaster/components/ParticleSystem.js.map +1 -0
  21. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +119 -0
  22. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -0
  23. package/lib/module/games/balloon-blaster/components/SliceTrail.js +58 -0
  24. package/lib/module/games/balloon-blaster/components/SliceTrail.js.map +1 -0
  25. package/lib/module/games/balloon-blaster/components/index.js +11 -0
  26. package/lib/module/games/balloon-blaster/components/index.js.map +1 -0
  27. package/lib/module/games/cat-popper/CatPopper.js +230 -0
  28. package/lib/module/games/cat-popper/CatPopper.js.map +1 -0
  29. package/lib/module/games/cat-popper/CatPopperService.js +100 -0
  30. package/lib/module/games/cat-popper/CatPopperService.js.map +1 -0
  31. package/lib/module/games/cat-popper/CatPopperStore.js +113 -0
  32. package/lib/module/games/cat-popper/CatPopperStore.js.map +1 -0
  33. package/lib/module/games/cat-popper/components/CatCharacter.js +281 -0
  34. package/lib/module/games/cat-popper/components/CatCharacter.js.map +1 -0
  35. package/lib/module/games/cat-popper/components/GameBackground.js +531 -0
  36. package/lib/module/games/cat-popper/components/GameBackground.js.map +1 -0
  37. package/lib/module/games/cat-popper/components/GameControls.js +230 -0
  38. package/lib/module/games/cat-popper/components/GameControls.js.map +1 -0
  39. package/lib/module/games/cat-popper/components/GameGrid.js +66 -0
  40. package/lib/module/games/cat-popper/components/GameGrid.js.map +1 -0
  41. package/lib/module/games/cat-popper/components/GameHole.js +183 -0
  42. package/lib/module/games/cat-popper/components/GameHole.js.map +1 -0
  43. package/lib/module/games/cat-popper/components/GameOverModal.js +131 -0
  44. package/lib/module/games/cat-popper/components/GameOverModal.js.map +1 -0
  45. package/lib/module/games/cat-popper/components/ScoreBoard.js +77 -0
  46. package/lib/module/games/cat-popper/components/ScoreBoard.js.map +1 -0
  47. package/lib/module/games/cat-popper/components/index.js +10 -0
  48. package/lib/module/games/cat-popper/components/index.js.map +1 -0
  49. package/lib/module/games/fruit-slicer/FruitSlicer.js +411 -0
  50. package/lib/module/games/fruit-slicer/FruitSlicer.js.map +1 -0
  51. package/lib/module/games/fruit-slicer/FruitSlicerService.js +293 -0
  52. package/lib/module/games/fruit-slicer/FruitSlicerService.js.map +1 -0
  53. package/lib/module/games/fruit-slicer/FruitSlicerStore.js +156 -0
  54. package/lib/module/games/fruit-slicer/FruitSlicerStore.js.map +1 -0
  55. package/lib/module/games/fruit-slicer/components/FruitComponent.js +99 -0
  56. package/lib/module/games/fruit-slicer/components/FruitComponent.js.map +1 -0
  57. package/lib/module/games/fruit-slicer/components/GameArea.js +50 -0
  58. package/lib/module/games/fruit-slicer/components/GameArea.js.map +1 -0
  59. package/lib/module/games/fruit-slicer/components/GameBackground.js +1296 -0
  60. package/lib/module/games/fruit-slicer/components/GameBackground.js.map +1 -0
  61. package/lib/module/games/fruit-slicer/components/GameControls.js +230 -0
  62. package/lib/module/games/fruit-slicer/components/GameControls.js.map +1 -0
  63. package/lib/module/games/fruit-slicer/components/GameOverModal.js +189 -0
  64. package/lib/module/games/fruit-slicer/components/GameOverModal.js.map +1 -0
  65. package/lib/module/games/fruit-slicer/components/ParticleSystem.js +52 -0
  66. package/lib/module/games/fruit-slicer/components/ParticleSystem.js.map +1 -0
  67. package/lib/module/games/fruit-slicer/components/ScoreBoard.js +121 -0
  68. package/lib/module/games/fruit-slicer/components/ScoreBoard.js.map +1 -0
  69. package/lib/module/games/fruit-slicer/components/SliceTrail.js +58 -0
  70. package/lib/module/games/fruit-slicer/components/SliceTrail.js.map +1 -0
  71. package/lib/module/games/fruit-slicer/components/index.js +11 -0
  72. package/lib/module/games/fruit-slicer/components/index.js.map +1 -0
  73. package/lib/module/games/maze-runner/MazeRunner.js +242 -0
  74. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -0
  75. package/lib/module/games/maze-runner/MazeRunnerService.js +560 -0
  76. package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -0
  77. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +149 -0
  78. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js.map +1 -0
  79. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +357 -0
  80. package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -0
  81. package/lib/module/games/maze-runner/components/GameBackground.js +216 -0
  82. package/lib/module/games/maze-runner/components/GameBackground.js.map +1 -0
  83. package/lib/module/games/maze-runner/components/GameControls.js +129 -0
  84. package/lib/module/games/maze-runner/components/GameControls.js.map +1 -0
  85. package/lib/module/games/maze-runner/components/GameOverModal.js +134 -0
  86. package/lib/module/games/maze-runner/components/GameOverModal.js.map +1 -0
  87. package/lib/module/games/maze-runner/components/ScoreBoard.js +81 -0
  88. package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -0
  89. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +209 -0
  90. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js.map +1 -0
  91. package/lib/module/games/maze-runner/components/StaticGameBackground.js +169 -0
  92. package/lib/module/games/maze-runner/components/StaticGameBackground.js.map +1 -0
  93. package/lib/module/games/maze-runner/components/WallComponent.js +90 -0
  94. package/lib/module/games/maze-runner/components/WallComponent.js.map +1 -0
  95. package/lib/module/games/maze-runner/components/index.js +10 -0
  96. package/lib/module/games/maze-runner/components/index.js.map +1 -0
  97. package/lib/module/games/space-traveller/SpaceTraveller.js +393 -0
  98. package/lib/module/games/space-traveller/SpaceTraveller.js.map +1 -0
  99. package/lib/module/games/space-traveller/SpaceTravellerService.js +298 -0
  100. package/lib/module/games/space-traveller/SpaceTravellerService.js.map +1 -0
  101. package/lib/module/games/space-traveller/SpaceTravellerStore.js +139 -0
  102. package/lib/module/games/space-traveller/SpaceTravellerStore.js.map +1 -0
  103. package/lib/module/games/space-traveller/components/AsteroidComponent.js +111 -0
  104. package/lib/module/games/space-traveller/components/AsteroidComponent.js.map +1 -0
  105. package/lib/module/games/space-traveller/components/GameArea.js +75 -0
  106. package/lib/module/games/space-traveller/components/GameArea.js.map +1 -0
  107. package/lib/module/games/space-traveller/components/GameBackground.js +294 -0
  108. package/lib/module/games/space-traveller/components/GameBackground.js.map +1 -0
  109. package/lib/module/games/space-traveller/components/GameControls.js +177 -0
  110. package/lib/module/games/space-traveller/components/GameControls.js.map +1 -0
  111. package/lib/module/games/space-traveller/components/GameOverModal.js +182 -0
  112. package/lib/module/games/space-traveller/components/GameOverModal.js.map +1 -0
  113. package/lib/module/games/space-traveller/components/ParticleComponent.js +34 -0
  114. package/lib/module/games/space-traveller/components/ParticleComponent.js.map +1 -0
  115. package/lib/module/games/space-traveller/components/ScoreBoard.js +143 -0
  116. package/lib/module/games/space-traveller/components/ScoreBoard.js.map +1 -0
  117. package/lib/module/games/space-traveller/components/SettingsModal.js +222 -0
  118. package/lib/module/games/space-traveller/components/SettingsModal.js.map +1 -0
  119. package/lib/module/games/space-traveller/components/Spacecraft3D.js +362 -0
  120. package/lib/module/games/space-traveller/components/Spacecraft3D.js.map +1 -0
  121. package/lib/module/games/space-traveller/components/SpacecraftPath.js +37 -0
  122. package/lib/module/games/space-traveller/components/SpacecraftPath.js.map +1 -0
  123. package/lib/module/games/space-traveller/components/index.js +13 -0
  124. package/lib/module/games/space-traveller/components/index.js.map +1 -0
  125. package/lib/module/index.js +12 -0
  126. package/lib/module/index.js.map +1 -0
  127. package/lib/module/package.json +1 -0
  128. package/lib/module/services/GamesConstants.js +561 -0
  129. package/lib/module/services/GamesConstants.js.map +1 -0
  130. package/lib/module/services/GamesService.js +34 -0
  131. package/lib/module/services/GamesService.js.map +1 -0
  132. package/lib/module/shared/settings/GameSettings.js +295 -0
  133. package/lib/module/shared/settings/GameSettings.js.map +1 -0
  134. package/lib/module/shared/settings/SettingsService.js +119 -0
  135. package/lib/module/shared/settings/SettingsService.js.map +1 -0
  136. package/lib/typescript/package.json +1 -0
  137. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +16 -0
  138. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -0
  139. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +66 -0
  140. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -0
  141. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +37 -0
  142. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts.map +1 -0
  143. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +10 -0
  144. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts.map +1 -0
  145. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +17 -0
  146. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts.map +1 -0
  147. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +7 -0
  148. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -0
  149. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts +10 -0
  150. package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts.map +1 -0
  151. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts +9 -0
  152. package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts.map +1 -0
  153. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts +8 -0
  154. package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts.map +1 -0
  155. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +9 -0
  156. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -0
  157. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts +11 -0
  158. package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts.map +1 -0
  159. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts +9 -0
  160. package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -0
  161. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts +13 -0
  162. package/lib/typescript/src/games/cat-popper/CatPopper.d.ts.map +1 -0
  163. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts +32 -0
  164. package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts.map +1 -0
  165. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts +21 -0
  166. package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts.map +1 -0
  167. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts +7 -0
  168. package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts.map +1 -0
  169. package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts +7 -0
  170. package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts.map +1 -0
  171. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts +10 -0
  172. package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts.map +1 -0
  173. package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts +13 -0
  174. package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts.map +1 -0
  175. package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts +12 -0
  176. package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts.map +1 -0
  177. package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts +9 -0
  178. package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts.map +1 -0
  179. package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts +8 -0
  180. package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts.map +1 -0
  181. package/lib/typescript/src/games/cat-popper/components/index.d.ts +8 -0
  182. package/lib/typescript/src/games/cat-popper/components/index.d.ts.map +1 -0
  183. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts +16 -0
  184. package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts.map +1 -0
  185. package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts +67 -0
  186. package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts.map +1 -0
  187. package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts +37 -0
  188. package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts.map +1 -0
  189. package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts +10 -0
  190. package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts.map +1 -0
  191. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts +17 -0
  192. package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts.map +1 -0
  193. package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts +7 -0
  194. package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts.map +1 -0
  195. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts +10 -0
  196. package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts.map +1 -0
  197. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts +9 -0
  198. package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts.map +1 -0
  199. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts +8 -0
  200. package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts.map +1 -0
  201. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts +9 -0
  202. package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts.map +1 -0
  203. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts +11 -0
  204. package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts.map +1 -0
  205. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts +9 -0
  206. package/lib/typescript/src/games/fruit-slicer/components/index.d.ts.map +1 -0
  207. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +18 -0
  208. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -0
  209. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +82 -0
  210. package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -0
  211. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +11 -0
  212. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts.map +1 -0
  213. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +12 -0
  214. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts.map +1 -0
  215. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts +7 -0
  216. package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts.map +1 -0
  217. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts +10 -0
  218. package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts.map +1 -0
  219. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts +11 -0
  220. package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts.map +1 -0
  221. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +8 -0
  222. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -0
  223. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +25 -0
  224. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts.map +1 -0
  225. package/lib/typescript/src/games/maze-runner/components/StaticGameBackground.d.ts +7 -0
  226. package/lib/typescript/src/games/maze-runner/components/StaticGameBackground.d.ts.map +1 -0
  227. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +10 -0
  228. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts.map +1 -0
  229. package/lib/typescript/src/games/maze-runner/components/index.d.ts +8 -0
  230. package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -0
  231. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts +17 -0
  232. package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts.map +1 -0
  233. package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts +65 -0
  234. package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts.map +1 -0
  235. package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts +35 -0
  236. package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts.map +1 -0
  237. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts +9 -0
  238. package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts.map +1 -0
  239. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts +17 -0
  240. package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts.map +1 -0
  241. package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts +7 -0
  242. package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts.map +1 -0
  243. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts +10 -0
  244. package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts.map +1 -0
  245. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts +9 -0
  246. package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts.map +1 -0
  247. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts +8 -0
  248. package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts.map +1 -0
  249. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts +8 -0
  250. package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts.map +1 -0
  251. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts +9 -0
  252. package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts.map +1 -0
  253. package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts +9 -0
  254. package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts.map +1 -0
  255. package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts +10 -0
  256. package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts.map +1 -0
  257. package/lib/typescript/src/games/space-traveller/components/index.d.ts +11 -0
  258. package/lib/typescript/src/games/space-traveller/components/index.d.ts.map +1 -0
  259. package/lib/typescript/src/index.d.ts +7 -0
  260. package/lib/typescript/src/index.d.ts.map +1 -0
  261. package/lib/typescript/src/services/GamesConstants.d.ts +372 -0
  262. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -0
  263. package/lib/typescript/src/services/GamesService.d.ts +8 -0
  264. package/lib/typescript/src/services/GamesService.d.ts.map +1 -0
  265. package/lib/typescript/src/shared/settings/GameSettings.d.ts +36 -0
  266. package/lib/typescript/src/shared/settings/GameSettings.d.ts.map +1 -0
  267. package/lib/typescript/src/shared/settings/SettingsService.d.ts +32 -0
  268. package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +1 -0
  269. package/package.json +125 -0
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect } from 'react';
4
+ import { TouchableOpacity } from 'react-native';
5
+ import { Canvas, LinearGradient, vec, Path, Skia, Oval, Circle } from '@shopify/react-native-skia';
6
+ import Animated, { useSharedValue, useAnimatedStyle, withSpring, withTiming } from 'react-native-reanimated';
7
+ import { GAME_CONFIG, ANIMATION_CONFIG } from "../BalloonBlasterService.js";
8
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export const BalloonComponent = ({
10
+ balloon,
11
+ onPop
12
+ }) => {
13
+ // Animated values for smooth movement
14
+ const translateX = useSharedValue(balloon.position.x);
15
+ const translateY = useSharedValue(balloon.position.y);
16
+ const rotation = useSharedValue(balloon.rotation);
17
+ const scale = useSharedValue(balloon.isPopped ? 0 : 1);
18
+ const opacity = useSharedValue(balloon.isPopped ? 0 : 1);
19
+
20
+ // Update animated values when balloon properties change
21
+ useEffect(() => {
22
+ translateX.value = withSpring(balloon.position.x, ANIMATION_CONFIG.BALLOON_SPRING);
23
+ translateY.value = withSpring(balloon.position.y, ANIMATION_CONFIG.BALLOON_SPRING);
24
+ rotation.value = withSpring(balloon.rotation, ANIMATION_CONFIG.BALLOON_SPRING);
25
+ }, [balloon.position.x, balloon.position.y, balloon.rotation]);
26
+
27
+ // Handle popped state with animation
28
+ useEffect(() => {
29
+ if (balloon.isPopped) {
30
+ scale.value = withTiming(0, ANIMATION_CONFIG.SLICE_TIMING);
31
+ opacity.value = withTiming(0, ANIMATION_CONFIG.SLICE_TIMING);
32
+ } else {
33
+ scale.value = withSpring(1, ANIMATION_CONFIG.BALLOON_SPRING);
34
+ opacity.value = withSpring(1, ANIMATION_CONFIG.BALLOON_SPRING);
35
+ }
36
+ }, [balloon.isPopped]);
37
+
38
+ // Animated style
39
+ const animatedStyle = useAnimatedStyle(() => {
40
+ return {
41
+ transform: [{
42
+ translateX: translateX.value
43
+ }, {
44
+ translateY: translateY.value
45
+ }, {
46
+ rotate: `${rotation.value}rad`
47
+ }, {
48
+ scale: scale.value
49
+ }],
50
+ opacity: opacity.value
51
+ };
52
+ });
53
+ const containerStyle = {
54
+ position: 'absolute',
55
+ width: GAME_CONFIG.BALLOON_SIZE,
56
+ height: GAME_CONFIG.BALLOON_SIZE,
57
+ zIndex: balloon.isBomb ? 10 : 5
58
+ };
59
+ const getBalloonColors = () => {
60
+ if (balloon.isBomb) {
61
+ // Black bomb balloons with danger symbol
62
+ return {
63
+ primary: '#1a1a1a',
64
+ // Dark black
65
+ secondary: '#333333',
66
+ // Slightly lighter black
67
+ highlight: '#555555',
68
+ // Gray highlight
69
+ shadow: '#000000' // Pure black shadow (won't be used)
70
+ };
71
+ }
72
+ if (balloon.isBonus) return {
73
+ primary: '#FFD700',
74
+ secondary: '#FFEB3B',
75
+ highlight: '#FFF59D',
76
+ shadow: '#CC8800'
77
+ };
78
+
79
+ // Use balloon's vibrant colors with enhanced gradients
80
+ const baseColor = balloon.type.color || '#FF0080';
81
+ return {
82
+ primary: baseColor,
83
+ secondary: lightenColor(baseColor, 0.3),
84
+ highlight: lightenColor(baseColor, 0.5),
85
+ shadow: darkenColor(baseColor, 0.3)
86
+ };
87
+ };
88
+
89
+ // Helper functions for color manipulation
90
+ const lightenColor = (color, amount) => {
91
+ const hex = color.replace('#', '');
92
+ const r = Math.min(255, parseInt(hex.substr(0, 2), 16) + Math.round(255 * amount));
93
+ const g = Math.min(255, parseInt(hex.substr(2, 2), 16) + Math.round(255 * amount));
94
+ const b = Math.min(255, parseInt(hex.substr(4, 2), 16) + Math.round(255 * amount));
95
+ return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
96
+ };
97
+ const darkenColor = (color, amount) => {
98
+ const hex = color.replace('#', '');
99
+ const r = Math.max(0, parseInt(hex.substr(0, 2), 16) - Math.round(255 * amount));
100
+ const g = Math.max(0, parseInt(hex.substr(2, 2), 16) - Math.round(255 * amount));
101
+ const b = Math.max(0, parseInt(hex.substr(4, 2), 16) - Math.round(255 * amount));
102
+ return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
103
+ };
104
+ const colors = getBalloonColors();
105
+ const balloonWidth = GAME_CONFIG.BALLOON_SIZE;
106
+ const balloonHeight = GAME_CONFIG.BALLOON_SIZE * 1.2; // Make it oval - taller than wide
107
+ const stringLength = 25; // Length of balloon string
108
+ const totalHeight = balloonHeight + stringLength; // Total height including string
109
+ const center = vec(balloonWidth / 2, balloonHeight / 2);
110
+
111
+ // Generate a unique curved string path for each balloon
112
+ const generateCurvedStringPath = () => {
113
+ const path = Skia.Path.Make();
114
+ const startX = center.x;
115
+ const startY = balloonHeight - 2;
116
+
117
+ // Create a seed based on balloon ID for consistent random curves per balloon
118
+ const seed = balloon.id.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);
119
+ const random = index => (seed + index * 17) % 100 / 100;
120
+ path.moveTo(startX, startY);
121
+
122
+ // Create curved string with multiple control points
123
+ const segments = 4; // Number of curve segments
124
+ const segmentHeight = stringLength / segments;
125
+ for (let i = 1; i <= segments; i++) {
126
+ const y = startY + segmentHeight * i;
127
+ const waveAmplitude = 3 + random(i) * 4; // Random wave amplitude 3-7px
128
+ const waveOffset = (random(i + 10) - 0.5) * waveAmplitude * 2; // Random offset
129
+ const x = startX + waveOffset;
130
+
131
+ // Add some curve variation
132
+ const controlX1 = startX + (random(i + 20) - 0.5) * waveAmplitude;
133
+ const controlY1 = y - segmentHeight * 0.3;
134
+ const controlX2 = x + (random(i + 30) - 0.5) * waveAmplitude * 0.5;
135
+ const controlY2 = y - segmentHeight * 0.1;
136
+ path.cubicTo(controlX1, controlY1, controlX2, controlY2, x, y);
137
+ }
138
+ return path;
139
+ };
140
+ return /*#__PURE__*/_jsx(Animated.View, {
141
+ style: [containerStyle, animatedStyle],
142
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
143
+ onPress: () => {
144
+ console.log('Balloon tapped:', balloon.id);
145
+ onPop?.(balloon.id);
146
+ },
147
+ activeOpacity: 0.8,
148
+ style: {
149
+ width: balloonWidth,
150
+ height: totalHeight
151
+ },
152
+ children: /*#__PURE__*/_jsxs(Canvas, {
153
+ style: {
154
+ width: balloonWidth,
155
+ height: totalHeight
156
+ },
157
+ pointerEvents: "none",
158
+ children: [!balloon.isBomb && /*#__PURE__*/_jsx(Oval, {
159
+ x: 2,
160
+ y: 2,
161
+ width: balloonWidth - 4,
162
+ height: balloonHeight - 4,
163
+ color: colors.shadow,
164
+ opacity: 0.2
165
+ }), /*#__PURE__*/_jsx(Oval, {
166
+ x: 0,
167
+ y: 0,
168
+ width: balloonWidth,
169
+ height: balloonHeight,
170
+ opacity: 0.7,
171
+ children: /*#__PURE__*/_jsx(LinearGradient, {
172
+ start: vec(0, 0),
173
+ end: vec(balloonWidth, balloonHeight),
174
+ colors: [colors.highlight, colors.primary, colors.shadow]
175
+ })
176
+ }), /*#__PURE__*/_jsx(Oval, {
177
+ x: balloonWidth * 0.15,
178
+ y: balloonHeight * 0.1,
179
+ width: balloonWidth * 0.4,
180
+ height: balloonHeight * 0.3,
181
+ color: colors.highlight,
182
+ opacity: 0.4
183
+ }), /*#__PURE__*/_jsx(Oval, {
184
+ x: balloonWidth * 0.2,
185
+ y: balloonHeight * 0.15,
186
+ width: balloonWidth * 0.2,
187
+ height: balloonHeight * 0.15,
188
+ color: "#FFFFFF",
189
+ opacity: 0.6
190
+ }), balloon.isBomb && /*#__PURE__*/_jsxs(_Fragment, {
191
+ children: [/*#__PURE__*/_jsx(Path, {
192
+ path: Skia.Path.Make().moveTo(center.x, center.y - 10).lineTo(center.x - 8, center.y + 6).lineTo(center.x + 8, center.y + 6).close(),
193
+ color: "#FF0000",
194
+ opacity: 0.9
195
+ }), /*#__PURE__*/_jsx(Path, {
196
+ path: Skia.Path.Make().moveTo(center.x, center.y - 6).lineTo(center.x, center.y + 1),
197
+ color: "#FFFFFF",
198
+ style: "stroke",
199
+ strokeWidth: 2,
200
+ strokeCap: "round"
201
+ }), /*#__PURE__*/_jsx(Circle, {
202
+ cx: center.x,
203
+ cy: center.y + 4,
204
+ r: 1.5,
205
+ color: "#FFFFFF"
206
+ })]
207
+ }), !balloon.isBonus && /*#__PURE__*/_jsx(Path, {
208
+ path: generateCurvedStringPath(),
209
+ color: "#8B4513" // Regular brown string for all balloons including bombs
210
+ ,
211
+ style: "stroke",
212
+ strokeWidth: 1.5,
213
+ strokeCap: "round",
214
+ strokeJoin: "round"
215
+ }), balloon.isBonus && /*#__PURE__*/_jsx(Oval, {
216
+ x: -5,
217
+ y: -5,
218
+ width: balloonWidth + 10,
219
+ height: balloonHeight + 10,
220
+ color: "#FFD700",
221
+ opacity: 0.2
222
+ })]
223
+ })
224
+ })
225
+ });
226
+ };
227
+ //# sourceMappingURL=BalloonComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","TouchableOpacity","Canvas","LinearGradient","vec","Path","Skia","Oval","Circle","Animated","useSharedValue","useAnimatedStyle","withSpring","withTiming","GAME_CONFIG","ANIMATION_CONFIG","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BalloonComponent","balloon","onPop","translateX","position","x","translateY","y","rotation","scale","isPopped","opacity","value","BALLOON_SPRING","SLICE_TIMING","animatedStyle","transform","rotate","containerStyle","width","BALLOON_SIZE","height","zIndex","isBomb","getBalloonColors","primary","secondary","highlight","shadow","isBonus","baseColor","type","color","lightenColor","darkenColor","amount","hex","replace","r","Math","min","parseInt","substr","round","g","b","toString","padStart","max","colors","balloonWidth","balloonHeight","stringLength","totalHeight","center","generateCurvedStringPath","path","Make","startX","startY","seed","id","split","reduce","acc","char","charCodeAt","random","index","moveTo","segments","segmentHeight","i","waveAmplitude","waveOffset","controlX1","controlY1","controlX2","controlY2","cubicTo","View","style","children","onPress","console","log","activeOpacity","pointerEvents","start","end","lineTo","close","strokeWidth","strokeCap","cx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AACjD,CAAC,EAAEiD,MAAM,CAAC/C,CAAC,GAAG,CAAC,CAAE;YAClCyB,KAAK,EAAC,SAAS;YACfiD,KAAK,EAAC,QAAQ;YACdW,WAAW,EAAE,CAAE;YACfC,SAAS,EAAC;UAAO,CAClB,CAAC,eAGFlG,IAAA,CAACT,MAAM;YACL4G,EAAE,EAAExC,MAAM,CAACjD,CAAE;YACb0F,EAAE,EAAEzC,MAAM,CAAC/C,CAAC,GAAG,CAAE;YACjB+B,CAAC,EAAE,GAAI;YACPN,KAAK,EAAC;UAAS,CAChB,CAAC;QAAA,CACF,CACH,EAGA,CAAC/B,OAAO,CAAC4B,OAAO,iBACflC,IAAA,CAACZ,IAAI;UACHyE,IAAI,EAAED,wBAAwB,CAAC,CAAE;UACjCvB,KAAK,EAAC,SAAS,CAAC;UAAA;UAChBiD,KAAK,EAAC,QAAQ;UACdW,WAAW,EAAE,GAAI;UACjBC,SAAS,EAAC,OAAO;UACjBG,UAAU,EAAC;QAAO,CACnB,CACF,EAGA/F,OAAO,CAAC4B,OAAO,iBACdlC,IAAA,CAACV,IAAI;UACHoB,CAAC,EAAE,CAAC,CAAE;UACNE,CAAC,EAAE,CAAC,CAAE;UACNY,KAAK,EAAE+B,YAAY,GAAG,EAAG;UACzB7B,MAAM,EAAE8B,aAAa,GAAG,EAAG;UAC3BnB,KAAK,EAAC,SAAS;UACfrB,OAAO,EAAE;QAAI,CACd,CACF;MAAA,CACK;IAAC,CAEO;EAAC,CACN,CAAC;AAEpB,CAAC","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { BalloonComponent } from "./BalloonComponent.js";
6
+ import { SliceTrail } from "./SliceTrail.js";
7
+ import { ParticleSystem } from "./ParticleSystem.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export const GameArea = ({
10
+ balloons,
11
+ balloonAnimations,
12
+ slicePath,
13
+ isSlicing,
14
+ particles,
15
+ onBalloonPop,
16
+ children
17
+ }) => {
18
+ return /*#__PURE__*/_jsxs(View, {
19
+ style: styles.gameArea,
20
+ children: [balloons.map(balloon => {
21
+ const animation = balloonAnimations.get(balloon.id);
22
+ return /*#__PURE__*/_jsx(BalloonComponent, {
23
+ balloon: balloon,
24
+ animation: animation,
25
+ onPop: onBalloonPop
26
+ }, balloon.id);
27
+ }), /*#__PURE__*/_jsx(SliceTrail, {
28
+ path: slicePath,
29
+ isVisible: isSlicing
30
+ }), /*#__PURE__*/_jsx(ParticleSystem, {
31
+ particles: particles
32
+ }), children]
33
+ });
34
+ };
35
+ const styles = StyleSheet.create({
36
+ gameArea: {
37
+ flex: 1,
38
+ position: 'relative',
39
+ overflow: 'hidden'
40
+ }
41
+ });
42
+ //# sourceMappingURL=GameArea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","BalloonComponent","SliceTrail","ParticleSystem","jsx","_jsx","jsxs","_jsxs","GameArea","balloons","balloonAnimations","slicePath","isSlicing","particles","onBalloonPop","children","style","styles","gameArea","map","balloon","animation","get","id","onPop","path","isVisible","create","flex","position","overflow"],"sourceRoot":"../../../../../src","sources":["games/balloon-blaster/components/GameArea.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,cAAc,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAYlD,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,iBAAiB;EAAEC,SAAS;EAAEC,SAAS;EAAEC,SAAS;EAAEC,YAAY;EAAEC;AAAS,CAAC,KAAK;EAC7I,oBACER,KAAA,CAACR,IAAI;IAACiB,KAAK,EAAEC,MAAM,CAACC,QAAS;IAAAH,QAAA,GAE1BN,QAAQ,CAACU,GAAG,CAACC,OAAO,IAAI;MACvB,MAAMC,SAAS,GAAGX,iBAAiB,CAACY,GAAG,CAACF,OAAO,CAACG,EAAE,CAAC;MAEnD,oBAAOlB,IAAA,CAACJ,gBAAgB;QAAkBmB,OAAO,EAAEA,OAAQ;QAACC,SAAS,EAAEA,SAAU;QAACG,KAAK,EAAEV;MAAa,GAAxEM,OAAO,CAACG,EAAkE,CAAC;IAC3G,CAAC,CAAC,eAGFlB,IAAA,CAACH,UAAU;MAACuB,IAAI,EAAEd,SAAU;MAACe,SAAS,EAAEd;IAAU,CAAE,CAAC,eAGrDP,IAAA,CAACF,cAAc;MAACU,SAAS,EAAEA;IAAU,CAAE,CAAC,EAGvCE,QAAQ;EAAA,CACL,CAAC;AAEX,CAAC;AAED,MAAME,MAAM,GAAGjB,UAAU,CAAC2B,MAAM,CAAC;EAC/BT,QAAQ,EAAE;IACRU,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}