react-native-games 1.1.0 → 1.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 (419) hide show
  1. package/README.md +101 -30
  2. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
  3. package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
  4. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
  5. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
  6. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
  7. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
  8. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
  9. package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
  10. package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
  11. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
  12. package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
  13. package/lib/module/games/balloon-blaster/components/index.js +1 -7
  14. package/lib/module/games/bike-racing/BikeRacing.js +1 -0
  15. package/lib/module/games/bike-racing/BikeRacing.js.map +1 -0
  16. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -0
  17. package/lib/module/games/bike-racing/BikeRacingConstants.js.map +1 -0
  18. package/lib/module/games/bike-racing/BikeRacingService.js +1 -0
  19. package/lib/module/games/bike-racing/BikeRacingService.js.map +1 -0
  20. package/lib/module/games/bike-racing/BikeRacingStore.js +1 -0
  21. package/lib/module/games/bike-racing/BikeRacingStore.js.map +1 -0
  22. package/lib/module/games/bike-racing/components/BikeComponent.js +1 -0
  23. package/lib/module/games/bike-racing/components/BikeComponent.js.map +1 -0
  24. package/lib/module/games/bike-racing/components/GameBackground.js +1 -0
  25. package/lib/module/games/bike-racing/components/GameBackground.js.map +1 -0
  26. package/lib/module/games/bike-racing/components/ScoreBoard.js +1 -0
  27. package/lib/module/games/bike-racing/components/ScoreBoard.js.map +1 -0
  28. package/lib/module/games/bike-racing/components/index.js +1 -0
  29. package/lib/module/games/bike-racing/components/index.js.map +1 -0
  30. package/lib/module/games/bike-racing/index.js +1 -0
  31. package/lib/module/games/bike-racing/index.js.map +1 -0
  32. package/lib/module/games/block-blast/BlockBlast.js +1 -0
  33. package/lib/module/games/block-blast/BlockBlast.js.map +1 -0
  34. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -0
  35. package/lib/module/games/block-blast/BlockBlastConstants.js.map +1 -0
  36. package/lib/module/games/block-blast/BlockBlastService.js +1 -0
  37. package/lib/module/games/block-blast/BlockBlastService.js.map +1 -0
  38. package/lib/module/games/block-blast/BlockBlastStore.js +1 -0
  39. package/lib/module/games/block-blast/BlockBlastStore.js.map +1 -0
  40. package/lib/module/games/block-blast/components/BlockPieceComponent.js +1 -0
  41. package/lib/module/games/block-blast/components/BlockPieceComponent.js.map +1 -0
  42. package/lib/module/games/block-blast/components/GameArea.js +1 -0
  43. package/lib/module/games/block-blast/components/GameArea.js.map +1 -0
  44. package/lib/module/games/block-blast/components/GameBackground.js +1 -0
  45. package/lib/module/games/block-blast/components/GameBackground.js.map +1 -0
  46. package/lib/module/games/block-blast/components/GridComponent.js +1 -0
  47. package/lib/module/games/block-blast/components/GridComponent.js.map +1 -0
  48. package/lib/module/games/block-blast/components/ScoreBoard.js +1 -0
  49. package/lib/module/games/block-blast/components/ScoreBoard.js.map +1 -0
  50. package/lib/module/games/block-blast/components/index.js +1 -0
  51. package/lib/module/games/block-blast/components/index.js.map +1 -0
  52. package/lib/module/games/block-blast/index.js +1 -0
  53. package/lib/module/games/block-blast/index.js.map +1 -0
  54. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -0
  55. package/lib/module/games/bubble-shooter/BubbleShooter.js.map +1 -0
  56. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -0
  57. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js.map +1 -0
  58. package/lib/module/games/bubble-shooter/BubbleShooterService.js +1 -0
  59. package/lib/module/games/bubble-shooter/BubbleShooterService.js.map +1 -0
  60. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +1 -0
  61. package/lib/module/games/bubble-shooter/BubbleShooterStore.js.map +1 -0
  62. package/lib/module/games/bubble-shooter/components/GameArea.js +1 -0
  63. package/lib/module/games/bubble-shooter/components/GameArea.js.map +1 -0
  64. package/lib/module/games/bubble-shooter/components/GameBackground.js +1 -0
  65. package/lib/module/games/bubble-shooter/components/GameBackground.js.map +1 -0
  66. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +1 -0
  67. package/lib/module/games/bubble-shooter/components/ScoreBoard.js.map +1 -0
  68. package/lib/module/games/bubble-shooter/components/index.js +1 -0
  69. package/lib/module/games/bubble-shooter/components/index.js.map +1 -0
  70. package/lib/module/games/bubble-shooter/index.js +1 -0
  71. package/lib/module/games/bubble-shooter/index.js.map +1 -0
  72. package/lib/module/games/candy-crush/CandyCrush.js +1 -131
  73. package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
  74. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
  75. package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
  76. package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
  77. package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
  78. package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
  79. package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
  80. package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
  81. package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
  82. package/lib/module/games/candy-crush/components/index.js +1 -7
  83. package/lib/module/games/candy-crush/index.js +1 -6
  84. package/lib/module/games/car-racing/CarRacing.js +1 -0
  85. package/lib/module/games/car-racing/CarRacing.js.map +1 -0
  86. package/lib/module/games/car-racing/CarRacingConstants.js +1 -0
  87. package/lib/module/games/car-racing/CarRacingConstants.js.map +1 -0
  88. package/lib/module/games/car-racing/CarRacingService.js +1 -0
  89. package/lib/module/games/car-racing/CarRacingService.js.map +1 -0
  90. package/lib/module/games/car-racing/CarRacingStore.js +1 -0
  91. package/lib/module/games/car-racing/CarRacingStore.js.map +1 -0
  92. package/lib/module/games/car-racing/components/CarComponent.js +1 -0
  93. package/lib/module/games/car-racing/components/CarComponent.js.map +1 -0
  94. package/lib/module/games/car-racing/components/GameBackground.js +1 -0
  95. package/lib/module/games/car-racing/components/GameBackground.js.map +1 -0
  96. package/lib/module/games/car-racing/components/ScoreBoard.js +1 -0
  97. package/lib/module/games/car-racing/components/ScoreBoard.js.map +1 -0
  98. package/lib/module/games/car-racing/components/index.js +1 -0
  99. package/lib/module/games/car-racing/components/index.js.map +1 -0
  100. package/lib/module/games/colors-sort/ColorsSort.js +1 -143
  101. package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
  102. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
  103. package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
  104. package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
  105. package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
  106. package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
  107. package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
  108. package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
  109. package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
  110. package/lib/module/games/colors-sort/components/index.js +1 -6
  111. package/lib/module/games/dino-jump/DinoJump.js +1 -209
  112. package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
  113. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
  114. package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
  115. package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
  116. package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
  117. package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
  118. package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
  119. package/lib/module/games/dino-jump/components/GameArea.js +1 -68
  120. package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
  121. package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
  122. package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
  123. package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
  124. package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
  125. package/lib/module/games/dino-jump/components/index.js +1 -9
  126. package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
  127. package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
  128. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
  129. package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
  130. package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
  131. package/lib/module/games/flappy-bird/components/Bird.js +1 -87
  132. package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
  133. package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
  134. package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
  135. package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
  136. package/lib/module/games/flappy-bird/components/index.js +1 -8
  137. package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
  138. package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
  139. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
  140. package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
  141. package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
  142. package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
  143. package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
  144. package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
  145. package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
  146. package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
  147. package/lib/module/games/fruit-merger/components/index.js +1 -7
  148. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
  149. package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
  150. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
  151. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
  152. package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
  153. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
  154. package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
  155. package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
  156. package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
  157. package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
  158. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
  159. package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
  160. package/lib/module/games/fruit-ninja/components/index.js +1 -7
  161. package/lib/module/games/game-2048/Game2048.js +1 -149
  162. package/lib/module/games/game-2048/Game2048.js.map +1 -1
  163. package/lib/module/games/game-2048/Game2048Constants.js +1 -263
  164. package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
  165. package/lib/module/games/game-2048/Game2048Service.js +1 -457
  166. package/lib/module/games/game-2048/Game2048Store.js +1 -236
  167. package/lib/module/games/game-2048/components/GameBackground.js +1 -247
  168. package/lib/module/games/game-2048/components/GameGrid.js +1 -139
  169. package/lib/module/games/game-2048/components/GameTile.js +1 -72
  170. package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
  171. package/lib/module/games/game-2048/components/index.js +1 -7
  172. package/lib/module/games/maze-runner/MazeRunner.js +1 -267
  173. package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
  174. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
  175. package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
  176. package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
  177. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
  178. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
  179. package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
  180. package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
  181. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
  182. package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
  183. package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
  184. package/lib/module/games/maze-runner/components/index.js +1 -8
  185. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -0
  186. package/lib/module/games/perfect-circle/PerfectCircle.js.map +1 -0
  187. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -0
  188. package/lib/module/games/perfect-circle/PerfectCircleConstants.js.map +1 -0
  189. package/lib/module/games/perfect-circle/PerfectCircleService.js +1 -0
  190. package/lib/module/games/perfect-circle/PerfectCircleService.js.map +1 -0
  191. package/lib/module/games/perfect-circle/PerfectCircleStore.js +1 -0
  192. package/lib/module/games/perfect-circle/PerfectCircleStore.js.map +1 -0
  193. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +1 -0
  194. package/lib/module/games/perfect-circle/components/DrawingCanvas.js.map +1 -0
  195. package/lib/module/games/perfect-circle/components/GameBackground.js +1 -0
  196. package/lib/module/games/perfect-circle/components/GameBackground.js.map +1 -0
  197. package/lib/module/games/perfect-circle/components/ScoreBoard.js +1 -0
  198. package/lib/module/games/perfect-circle/components/ScoreBoard.js.map +1 -0
  199. package/lib/module/games/perfect-circle/index.js +1 -0
  200. package/lib/module/games/perfect-circle/index.js.map +1 -0
  201. package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
  202. package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
  203. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
  204. package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
  205. package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
  206. package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
  207. package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
  208. package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
  209. package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
  210. package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
  211. package/lib/module/games/popit-fidget/components/index.js +1 -7
  212. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
  213. package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
  214. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
  215. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
  216. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
  217. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
  218. package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
  219. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
  220. package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
  221. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
  222. package/lib/module/games/sliding-numbers/components/index.js +1 -7
  223. package/lib/module/games/snake/Snake.js +1 -189
  224. package/lib/module/games/snake/Snake.js.map +1 -1
  225. package/lib/module/games/snake/SnakeConstants.js +1 -138
  226. package/lib/module/games/snake/SnakeConstants.js.map +1 -1
  227. package/lib/module/games/snake/SnakeService.js +1 -148
  228. package/lib/module/games/snake/SnakeStore.js +1 -182
  229. package/lib/module/games/snake/SnakeStore.js.map +1 -1
  230. package/lib/module/games/snake/components/GameBackground.js +1 -221
  231. package/lib/module/games/snake/components/GameGrid.js +1 -153
  232. package/lib/module/games/snake/components/ScoreBoard.js +1 -51
  233. package/lib/module/games/snake/components/ScoreBoard.js.map +1 -1
  234. package/lib/module/games/snake/components/index.js +1 -6
  235. package/lib/module/games/snake/index.js +1 -6
  236. package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
  237. package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
  238. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
  239. package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
  240. package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
  241. package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
  242. package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
  243. package/lib/module/games/space-fighter/components/GameArea.js +1 -289
  244. package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
  245. package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
  246. package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
  247. package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
  248. package/lib/module/games/space-fighter/components/index.js +1 -9
  249. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
  250. package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
  251. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
  252. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
  253. package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
  254. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
  255. package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
  256. package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
  257. package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
  258. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
  259. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
  260. package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
  261. package/lib/module/games/whack-a-mole/components/index.js +1 -8
  262. package/lib/module/helpers/AnimationFrame.js +1 -120
  263. package/lib/module/helpers/AnimationTracker.js +1 -89
  264. package/lib/module/helpers/ErrorHandler.js +1 -269
  265. package/lib/module/helpers/GameControlButton.js +1 -219
  266. package/lib/module/helpers/GameOverModal.js +1 -144
  267. package/lib/module/helpers/GameOverModal.js.map +1 -1
  268. package/lib/module/helpers/GameSettingsModal.js +1 -287
  269. package/lib/module/helpers/GameSettingsModal.js.map +1 -1
  270. package/lib/module/helpers/ParticleBlast.js +1 -134
  271. package/lib/module/helpers/ScoreBoardContainer.js +1 -34
  272. package/lib/module/helpers/ScoreBoardContainer.js.map +1 -1
  273. package/lib/module/helpers/index.js +1 -12
  274. package/lib/module/index.js +1 -22
  275. package/lib/module/index.js.map +1 -1
  276. package/lib/module/services/GamesConstants.js +1 -178
  277. package/lib/module/services/GamesConstants.js.map +1 -1
  278. package/lib/module/services/GamesService.js +1 -112
  279. package/lib/module/services/GamesService.js.map +1 -1
  280. package/lib/module/services/HapticsService.js +1 -77
  281. package/lib/module/services/ScoringService.js +1 -0
  282. package/lib/module/services/ScoringService.js.map +1 -0
  283. package/lib/module/services/SoundsService.js +1 -302
  284. package/lib/module/services/SoundsService.js.map +1 -1
  285. package/lib/module/services/UtilsService.js +1 -32
  286. package/lib/module/services/UtilsService.js.map +1 -1
  287. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
  288. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
  289. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
  290. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +4 -0
  291. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts.map +1 -0
  292. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +76 -0
  293. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts.map +1 -0
  294. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +22 -0
  295. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts.map +1 -0
  296. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +72 -0
  297. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts.map +1 -0
  298. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +12 -0
  299. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts.map +1 -0
  300. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +9 -0
  301. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts.map +1 -0
  302. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +7 -0
  303. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts.map +1 -0
  304. package/lib/typescript/src/games/bike-racing/components/index.d.ts +4 -0
  305. package/lib/typescript/src/games/bike-racing/components/index.d.ts.map +1 -0
  306. package/lib/typescript/src/games/bike-racing/index.d.ts +5 -0
  307. package/lib/typescript/src/games/bike-racing/index.d.ts.map +1 -0
  308. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +4 -0
  309. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts.map +1 -0
  310. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +82 -0
  311. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts.map +1 -0
  312. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +17 -0
  313. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts.map +1 -0
  314. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +62 -0
  315. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts.map +1 -0
  316. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +14 -0
  317. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts.map +1 -0
  318. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +12 -0
  319. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts.map +1 -0
  320. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts +7 -0
  321. package/lib/typescript/src/games/block-blast/components/GameBackground.d.ts.map +1 -0
  322. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +17 -0
  323. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts.map +1 -0
  324. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +7 -0
  325. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts.map +1 -0
  326. package/lib/typescript/src/games/block-blast/components/index.d.ts +6 -0
  327. package/lib/typescript/src/games/block-blast/components/index.d.ts.map +1 -0
  328. package/lib/typescript/src/games/block-blast/index.d.ts +5 -0
  329. package/lib/typescript/src/games/block-blast/index.d.ts.map +1 -0
  330. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +4 -0
  331. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts.map +1 -0
  332. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +61 -0
  333. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts.map +1 -0
  334. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +26 -0
  335. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts.map +1 -0
  336. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +62 -0
  337. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts.map +1 -0
  338. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +9 -0
  339. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts.map +1 -0
  340. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts +8 -0
  341. package/lib/typescript/src/games/bubble-shooter/components/GameBackground.d.ts.map +1 -0
  342. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +7 -0
  343. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts.map +1 -0
  344. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts +4 -0
  345. package/lib/typescript/src/games/bubble-shooter/components/index.d.ts.map +1 -0
  346. package/lib/typescript/src/games/bubble-shooter/index.d.ts +3 -0
  347. package/lib/typescript/src/games/bubble-shooter/index.d.ts.map +1 -0
  348. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts.map +1 -1
  349. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
  350. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +4 -0
  351. package/lib/typescript/src/games/car-racing/CarRacing.d.ts.map +1 -0
  352. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +76 -0
  353. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts.map +1 -0
  354. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +22 -0
  355. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts.map +1 -0
  356. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +72 -0
  357. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts.map +1 -0
  358. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +13 -0
  359. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts.map +1 -0
  360. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +9 -0
  361. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts.map +1 -0
  362. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +7 -0
  363. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts.map +1 -0
  364. package/lib/typescript/src/games/car-racing/components/index.d.ts +4 -0
  365. package/lib/typescript/src/games/car-racing/components/index.d.ts.map +1 -0
  366. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
  367. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
  368. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
  369. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
  370. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
  371. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
  372. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
  373. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
  374. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
  375. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
  376. package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
  377. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
  378. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +4 -0
  379. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts.map +1 -0
  380. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +81 -0
  381. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts.map +1 -0
  382. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +14 -0
  383. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts.map +1 -0
  384. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +40 -0
  385. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts.map +1 -0
  386. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +9 -0
  387. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts.map +1 -0
  388. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts +8 -0
  389. package/lib/typescript/src/games/perfect-circle/components/GameBackground.d.ts.map +1 -0
  390. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +7 -0
  391. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts.map +1 -0
  392. package/lib/typescript/src/games/perfect-circle/index.d.ts +3 -0
  393. package/lib/typescript/src/games/perfect-circle/index.d.ts.map +1 -0
  394. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
  395. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
  396. package/lib/typescript/src/games/snake/Snake.d.ts.map +1 -1
  397. package/lib/typescript/src/games/snake/SnakeStore.d.ts +4 -0
  398. package/lib/typescript/src/games/snake/SnakeStore.d.ts.map +1 -1
  399. package/lib/typescript/src/games/snake/components/ScoreBoard.d.ts.map +1 -1
  400. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
  401. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
  402. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +1 -1
  403. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
  404. package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
  405. package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
  406. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts.map +1 -1
  407. package/lib/typescript/src/index.d.ts +6 -1
  408. package/lib/typescript/src/index.d.ts.map +1 -1
  409. package/lib/typescript/src/services/GamesConstants.d.ts +57 -7
  410. package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
  411. package/lib/typescript/src/services/GamesService.d.ts +2 -1
  412. package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
  413. package/lib/typescript/src/services/ScoringService.d.ts +2 -0
  414. package/lib/typescript/src/services/ScoringService.d.ts.map +1 -0
  415. package/lib/typescript/src/services/SoundsService.d.ts +88 -0
  416. package/lib/typescript/src/services/SoundsService.d.ts.map +1 -1
  417. package/lib/typescript/src/services/UtilsService.d.ts +12 -1
  418. package/lib/typescript/src/services/UtilsService.d.ts.map +1 -1
  419. package/package.json +2 -2
@@ -1,175 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { StyleSheet, View } from 'react-native';
5
- import { Canvas, LinearGradient, Rect, Circle, vec } from '@shopify/react-native-skia';
6
- import { MAZE_ADVENTURE_COLORS } from "../MazeRunnerConstants.js";
7
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
8
- export const GameBackground = ({
9
- width,
10
- height
11
- }) => {
12
- // Generate static colorful floating adventure decorations
13
- const generateFloatingElements = React.useMemo(() => {
14
- const elements = [];
15
- const elementCount = 12; // Reduced count for better performance
16
-
17
- for (let i = 0; i < elementCount; i++) {
18
- const baseX = width / elementCount * i;
19
- const baseY = height / elementCount * i;
20
-
21
- // Add subtle positioning variations for natural look
22
- const x = baseX + Math.sin(i * 0.5) * 40 + i % 3 * 20;
23
- const y = baseY + Math.cos(i * 0.7) * 50 + i % 4 * 25;
24
- const radius = 10 + i % 8 + Math.sin(i) * 5;
25
- const colorIndex = i % MAZE_ADVENTURE_COLORS.length;
26
- const opacity = 0.25 + Math.sin(i * 0.3) * 0.1; // Subtle opacity variation
27
-
28
- elements.push(/*#__PURE__*/_jsx(Circle, {
29
- cx: Math.max(radius, Math.min(width - radius, x)),
30
- cy: Math.max(radius, Math.min(height - radius, y)),
31
- r: radius,
32
- color: `${MAZE_ADVENTURE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2, '0')}`
33
- }, `floating-element-${i}`));
34
- }
35
- return elements;
36
- }, [width, height]);
37
- return /*#__PURE__*/_jsx(_Fragment, {
38
- children: /*#__PURE__*/_jsx(View, {
39
- style: StyleSheet.absoluteFillObject,
40
- children: /*#__PURE__*/_jsxs(Canvas, {
41
- style: {
42
- width,
43
- height
44
- },
45
- children: [/*#__PURE__*/_jsx(Rect, {
46
- x: 0,
47
- y: 0,
48
- width: width,
49
- height: height,
50
- children: /*#__PURE__*/_jsx(LinearGradient, {
51
- start: vec(0, 0),
52
- end: vec(width, height),
53
- colors: [`${MAZE_ADVENTURE_COLORS[0]}40`,
54
- // Vibrant coral red
55
- `${MAZE_ADVENTURE_COLORS[2]}35`,
56
- // Vibrant sky blue
57
- `${MAZE_ADVENTURE_COLORS[4]}40`,
58
- // Vibrant golden yellow
59
- `${MAZE_ADVENTURE_COLORS[6]}35`,
60
- // Vibrant seafoam
61
- `${MAZE_ADVENTURE_COLORS[8]}40`,
62
- // Vibrant lavender
63
- `${MAZE_ADVENTURE_COLORS[10]}35`,
64
- // Vibrant light green
65
- `${MAZE_ADVENTURE_COLORS[12]}40`,
66
- // Vibrant light purple
67
- `${MAZE_ADVENTURE_COLORS[14]}35` // Vibrant cream
68
- ]
69
- })
70
- }), /*#__PURE__*/_jsx(Rect, {
71
- x: 0,
72
- y: 0,
73
- width: width,
74
- height: height,
75
- children: /*#__PURE__*/_jsx(LinearGradient, {
76
- start: vec(0, 0),
77
- end: vec(width / 2, height / 2),
78
- colors: [`${MAZE_ADVENTURE_COLORS[1]}25`,
79
- // Vibrant teal
80
- 'transparent', `${MAZE_ADVENTURE_COLORS[5]}25`,
81
- // Vibrant plum
82
- 'transparent', `${MAZE_ADVENTURE_COLORS[9]}25`,
83
- // Vibrant light blue
84
- 'transparent', `${MAZE_ADVENTURE_COLORS[13]}25`,
85
- // Vibrant pale green
86
- 'transparent']
87
- })
88
- }), /*#__PURE__*/_jsx(Rect, {
89
- x: 0,
90
- y: 0,
91
- width: width,
92
- height: height,
93
- children: /*#__PURE__*/_jsx(LinearGradient, {
94
- start: vec(width, 0),
95
- end: vec(0, height),
96
- colors: [`${MAZE_ADVENTURE_COLORS[3]}20`,
97
- // Vibrant mint green
98
- 'transparent', `${MAZE_ADVENTURE_COLORS[7]}20`,
99
- // Vibrant lemon
100
- 'transparent', `${MAZE_ADVENTURE_COLORS[11]}20`,
101
- // Vibrant peach
102
- 'transparent']
103
- })
104
- }), generateFloatingElements, /*#__PURE__*/_jsx(Circle, {
105
- cx: width * 0.1,
106
- cy: height * 0.15,
107
- r: 40,
108
- color: `${MAZE_ADVENTURE_COLORS[0]}30` // Vibrant coral red
109
- }), /*#__PURE__*/_jsx(Circle, {
110
- cx: width * 0.9,
111
- cy: height * 0.85,
112
- r: 35,
113
- color: `${MAZE_ADVENTURE_COLORS[3]}30` // Vibrant mint green
114
- }), /*#__PURE__*/_jsx(Circle, {
115
- cx: width * 0.85,
116
- cy: height * 0.2,
117
- r: 30,
118
- color: `${MAZE_ADVENTURE_COLORS[8]}30` // Vibrant lavender
119
- }), /*#__PURE__*/_jsx(Circle, {
120
- cx: width * 0.15,
121
- cy: height * 0.8,
122
- r: 45,
123
- color: `${MAZE_ADVENTURE_COLORS[12]}30` // Vibrant light purple
124
- }), /*#__PURE__*/_jsx(Circle, {
125
- cx: width * 0.5,
126
- cy: height * 0.1,
127
- r: 25,
128
- color: `${MAZE_ADVENTURE_COLORS[14]}30` // Vibrant cream
129
- }), /*#__PURE__*/_jsx(Circle, {
130
- cx: width * 0.2,
131
- cy: height * 0.5,
132
- r: 32,
133
- color: `${MAZE_ADVENTURE_COLORS[6]}30` // Vibrant seafoam
134
- }), /*#__PURE__*/_jsx(Circle, {
135
- cx: width * 0.8,
136
- cy: height * 0.6,
137
- r: 28,
138
- color: `${MAZE_ADVENTURE_COLORS[10]}30` // Vibrant light green
139
- }), /*#__PURE__*/_jsx(Circle, {
140
- cx: width * 0.6,
141
- cy: height * 0.9,
142
- r: 20,
143
- color: `${MAZE_ADVENTURE_COLORS[1]}30` // Vibrant teal
144
- }), /*#__PURE__*/_jsx(Circle, {
145
- cx: width * 0.3,
146
- cy: height * 0.25,
147
- r: 24,
148
- color: `${MAZE_ADVENTURE_COLORS[4]}30` // Vibrant golden yellow
149
- }), /*#__PURE__*/_jsx(Circle, {
150
- cx: width * 0.7,
151
- cy: height * 0.35,
152
- r: 26,
153
- color: `${MAZE_ADVENTURE_COLORS[9]}30` // Vibrant light blue
154
- }), Array.from({
155
- length: Math.floor(width / 40)
156
- }, (_, i) => /*#__PURE__*/_jsx(Rect, {
157
- x: i * 40,
158
- y: 0,
159
- width: 1,
160
- height: height,
161
- color: "rgba(0, 0, 0, 0.02)"
162
- }, `grid-v-${i}`)), Array.from({
163
- length: Math.floor(height / 40)
164
- }, (_, i) => /*#__PURE__*/_jsx(Rect, {
165
- x: 0,
166
- y: i * 40,
167
- width: width,
168
- height: 1,
169
- color: "rgba(0, 0, 0, 0.02)"
170
- }, `grid-h-${i}`))]
171
- })
172
- })
173
- });
174
- };
175
- //# sourceMappingURL=GameBackground.js.map
1
+ "use strict";import React from 'react';import{StyleSheet,View}from 'react-native';import{Canvas,LinearGradient,Rect,Circle,vec}from '@shopify/react-native-skia';import{MAZE_ADVENTURE_COLORS}from "../MazeRunnerConstants.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from "react/jsx-runtime";export const GameBackground =({width,height})=>{const generateFloatingElements = React.useMemo(()=>{const elements = [];const elementCount = 12;for(let i = 0;i < elementCount;i++){const baseX = width / elementCount * i;const baseY = height / elementCount * i;const x = baseX + Math.sin(i * 0.5)* 40 + i % 3 * 20;const y = baseY + Math.cos(i * 0.7)* 50 + i % 4 * 25;const radius = 10 + i % 8 + Math.sin(i)* 5;const colorIndex = i % MAZE_ADVENTURE_COLORS.length;const opacity = 0.25 + Math.sin(i * 0.3)* 0.1;elements.push(_jsx(Circle,{cx:Math.max(radius,Math.min(width - radius,x)),cy:Math.max(radius,Math.min(height - radius,y)),r:radius,color:`${MAZE_ADVENTURE_COLORS[colorIndex]}${Math.floor(opacity * 255).toString(16).padStart(2,'0')}`},`floating-element-${i}`));}return elements;},[width,height]);return _jsx(_Fragment,{children:_jsx(View,{style:StyleSheet.absoluteFillObject,children:_jsxs(Canvas,{style:{width,height},children:[_jsx(Rect,{x:0,y:0,width:width,height:height,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(width,height),colors:[`${MAZE_ADVENTURE_COLORS[0]}40`,`${MAZE_ADVENTURE_COLORS[2]}35`,`${MAZE_ADVENTURE_COLORS[4]}40`,`${MAZE_ADVENTURE_COLORS[6]}35`,`${MAZE_ADVENTURE_COLORS[8]}40`,`${MAZE_ADVENTURE_COLORS[10]}35`,`${MAZE_ADVENTURE_COLORS[12]}40`,`${MAZE_ADVENTURE_COLORS[14]}35` ]})}),_jsx(Rect,{x:0,y:0,width:width,height:height,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(width / 2,height / 2),colors:[`${MAZE_ADVENTURE_COLORS[1]}25`,'transparent',`${MAZE_ADVENTURE_COLORS[5]}25`,'transparent',`${MAZE_ADVENTURE_COLORS[9]}25`,'transparent',`${MAZE_ADVENTURE_COLORS[13]}25`,'transparent']})}),_jsx(Rect,{x:0,y:0,width:width,height:height,children:_jsx(LinearGradient,{start:vec(width,0),end:vec(0,height),colors:[`${MAZE_ADVENTURE_COLORS[3]}20`,'transparent',`${MAZE_ADVENTURE_COLORS[7]}20`,'transparent',`${MAZE_ADVENTURE_COLORS[11]}20`,'transparent']})}),generateFloatingElements,_jsx(Circle,{cx:width * 0.1,cy:height * 0.15,r:40,color:`${MAZE_ADVENTURE_COLORS[0]}30`}),_jsx(Circle,{cx:width * 0.9,cy:height * 0.85,r:35,color:`${MAZE_ADVENTURE_COLORS[3]}30`}),_jsx(Circle,{cx:width * 0.85,cy:height * 0.2,r:30,color:`${MAZE_ADVENTURE_COLORS[8]}30`}),_jsx(Circle,{cx:width * 0.15,cy:height * 0.8,r:45,color:`${MAZE_ADVENTURE_COLORS[12]}30`}),_jsx(Circle,{cx:width * 0.5,cy:height * 0.1,r:25,color:`${MAZE_ADVENTURE_COLORS[14]}30`}),_jsx(Circle,{cx:width * 0.2,cy:height * 0.5,r:32,color:`${MAZE_ADVENTURE_COLORS[6]}30`}),_jsx(Circle,{cx:width * 0.8,cy:height * 0.6,r:28,color:`${MAZE_ADVENTURE_COLORS[10]}30`}),_jsx(Circle,{cx:width * 0.6,cy:height * 0.9,r:20,color:`${MAZE_ADVENTURE_COLORS[1]}30`}),_jsx(Circle,{cx:width * 0.3,cy:height * 0.25,r:24,color:`${MAZE_ADVENTURE_COLORS[4]}30`}),_jsx(Circle,{cx:width * 0.7,cy:height * 0.35,r:26,color:`${MAZE_ADVENTURE_COLORS[9]}30`}),Array.from({length:Math.floor(width / 40)},(_,i)=> _jsx(Rect,{x:i * 40,y:0,width:1,height:height,color:"rgba(0,0,0,0.02)"},`grid-v-${i}`)),Array.from({length:Math.floor(height / 40)},(_,i)=> _jsx(Rect,{x:0,y:i * 40,width:width,height:1,color:"rgba(0,0,0,0.02)"},`grid-h-${i}`))]})})});};
@@ -1,61 +1 @@
1
- "use strict";
2
-
3
- import React, { useMemo } from 'react';
4
- import { View, Text, StyleSheet } from 'react-native';
5
- import { MazeRunnerService } from "../MazeRunnerService.js";
6
- import { ScoreBoardContainer } from "../../../helpers/index.js";
7
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- // Memoized ScoreBoard component to prevent unnecessary re-renders
9
- export const ScoreBoard = /*#__PURE__*/React.memo(({
10
- gameState,
11
- offset = 0
12
- }) => {
13
- // Create service instance for formatting (memoized to avoid recreation)
14
- const gameService = useMemo(() => new MazeRunnerService(10, 400, 400, 120), []);
15
- const formattedTime = useMemo(() => gameService.formatTime(gameState.timeElapsed), [gameService, gameState.timeElapsed]);
16
- return /*#__PURE__*/_jsx(ScoreBoardContainer, {
17
- offset: offset,
18
- backgroundColor: "rgba(139, 69, 19, 0.4)",
19
- borderColor: "rgba(255, 255, 255, 0.3)",
20
- children: /*#__PURE__*/_jsx(View, {
21
- style: styles.scoreBoard,
22
- children: /*#__PURE__*/_jsxs(View, {
23
- style: styles.scoreSection,
24
- children: [/*#__PURE__*/_jsx(Text, {
25
- style: styles.scoreLabel,
26
- children: "Time Elapsed"
27
- }), /*#__PURE__*/_jsx(Text, {
28
- style: styles.timeValue,
29
- children: formattedTime
30
- })]
31
- })
32
- })
33
- });
34
- });
35
- const styles = StyleSheet.create({
36
- scoreBoard: {
37
- flexDirection: 'row',
38
- justifyContent: 'center',
39
- alignItems: 'center'
40
- },
41
- scoreSection: {
42
- alignItems: 'center'
43
- },
44
- scoreLabel: {
45
- fontSize: 18,
46
- fontWeight: 'bold',
47
- color: '#ffffff',
48
- marginBottom: 4
49
- },
50
- scoreValue: {
51
- fontSize: 30,
52
- fontWeight: 'bold',
53
- color: '#92400e' // Brown color for score value
54
- },
55
- timeValue: {
56
- fontSize: 30,
57
- fontWeight: 'bold',
58
- color: '#ffffff' // White color for time value
59
- }
60
- });
61
- //# sourceMappingURL=ScoreBoard.js.map
1
+ "use strict";import React,{useMemo}from 'react';import{View,Text,StyleSheet}from 'react-native';import{MazeRunnerService}from "../MazeRunnerService.js";import{ScoreBoardContainer}from "../../../helpers/index.js";import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";export const ScoreBoard = React.memo(({gameState,offset = 0})=>{const gameService = useMemo(()=> new MazeRunnerService(10,400,400,120),[]);const formattedTime = useMemo(()=> gameService.formatTime(gameState.timeElapsed),[gameService,gameState.timeElapsed]);return _jsx(ScoreBoardContainer,{offset:offset,backgroundColor:"rgba(139,69,19,0.4)",borderColor:"rgba(255,255,255,0.3)",children:_jsx(View,{style:styles.scoreBoard,children:_jsxs(View,{style:styles.scoreSection,children:[_jsx(Text,{style:styles.scoreLabel,children:"Time Elapsed"}),_jsx(Text,{style:styles.timeValue,children:formattedTime})]})})});});const styles = StyleSheet.create({scoreBoard:{flexDirection:'row',justifyContent:'center',alignItems:'center'},scoreSection:{alignItems:'center'},scoreLabel:{fontSize:16,fontWeight:'bold',color:'#ffffff',marginBottom:4},scoreValue:{fontSize:25,fontWeight:'bold',color:'#92400e'},timeValue:{fontSize:25,fontWeight:'bold',color:'#ffffff'}});
@@ -1,209 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { Canvas, Path, Circle, LinearGradient, vec, Shadow } from '@shopify/react-native-skia';
5
- // PipeSegment type not exported from MazeRunnerService
6
- // Using inline type definition
7
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
8
- export const SkiaPipeComponent = ({
9
- segment,
10
- pipeWidth
11
- }) => {
12
- const canvasWidth = Math.abs(segment.end.x - segment.start.x) + pipeWidth * 2;
13
- const canvasHeight = Math.abs(segment.end.y - segment.start.y) + pipeWidth * 2;
14
- const canvasSize = Math.max(canvasWidth, canvasHeight, pipeWidth * 3);
15
- const renderStraightPipe = () => {
16
- const {
17
- start,
18
- end
19
- } = segment;
20
- const centerX = canvasSize / 2;
21
- const centerY = canvasSize / 2;
22
- if (segment.direction === 'horizontal') {
23
- const length = Math.abs(end.x - start.x);
24
- const pipeLeft = centerX - length / 2;
25
- const pipeRight = centerX + length / 2;
26
- const pipeTop = centerY - pipeWidth / 2;
27
- const pipeBottom = centerY + pipeWidth / 2;
28
- return /*#__PURE__*/_jsxs(_Fragment, {
29
- children: [/*#__PURE__*/_jsxs(Path, {
30
- path: `M ${pipeLeft} ${pipeTop} L ${pipeRight} ${pipeTop} L ${pipeRight} ${pipeBottom} L ${pipeLeft} ${pipeBottom} Z`,
31
- children: [/*#__PURE__*/_jsx(LinearGradient, {
32
- start: vec(centerX, pipeTop),
33
- end: vec(centerX, pipeBottom),
34
- colors: ['#8B4513', '#A0522D', '#654321', '#4A4A4A', '#2F2F2F']
35
- }), /*#__PURE__*/_jsx(Shadow, {
36
- dx: 0,
37
- dy: 2,
38
- blur: 4,
39
- color: "rgba(0,0,0,0.4)"
40
- })]
41
- }), /*#__PURE__*/_jsx(Path, {
42
- path: `M ${pipeLeft} ${pipeTop} L ${pipeRight} ${pipeTop} L ${pipeRight} ${pipeTop + 2} L ${pipeLeft} ${pipeTop + 2} Z`,
43
- color: "rgba(160, 82, 45, 0.8)"
44
- }), /*#__PURE__*/_jsx(Path, {
45
- path: `M ${pipeLeft} ${pipeBottom - 2} L ${pipeRight} ${pipeBottom - 2} L ${pipeRight} ${pipeBottom} L ${pipeLeft} ${pipeBottom} Z`,
46
- color: "rgba(47, 47, 47, 0.8)"
47
- }), /*#__PURE__*/_jsx(Circle, {
48
- cx: pipeLeft,
49
- cy: centerY,
50
- r: pipeWidth / 2,
51
- children: /*#__PURE__*/_jsx(LinearGradient, {
52
- start: vec(pipeLeft - pipeWidth / 4, centerY - pipeWidth / 4),
53
- end: vec(pipeLeft + pipeWidth / 4, centerY + pipeWidth / 4),
54
- colors: ['#A0522D', '#8B4513', '#654321']
55
- })
56
- }), /*#__PURE__*/_jsx(Circle, {
57
- cx: pipeRight,
58
- cy: centerY,
59
- r: pipeWidth / 2,
60
- children: /*#__PURE__*/_jsx(LinearGradient, {
61
- start: vec(pipeRight - pipeWidth / 4, centerY - pipeWidth / 4),
62
- end: vec(pipeRight + pipeWidth / 4, centerY + pipeWidth / 4),
63
- colors: ['#A0522D', '#8B4513', '#654321']
64
- })
65
- })]
66
- });
67
- } else {
68
- // Vertical pipe
69
- const length = Math.abs(end.y - start.y);
70
- const pipeTop = centerY - length / 2;
71
- const pipeBottom = centerY + length / 2;
72
- const pipeLeft = centerX - pipeWidth / 2;
73
- const pipeRight = centerX + pipeWidth / 2;
74
- return /*#__PURE__*/_jsxs(_Fragment, {
75
- children: [/*#__PURE__*/_jsxs(Path, {
76
- path: `M ${pipeLeft} ${pipeTop} L ${pipeRight} ${pipeTop} L ${pipeRight} ${pipeBottom} L ${pipeLeft} ${pipeBottom} Z`,
77
- children: [/*#__PURE__*/_jsx(LinearGradient, {
78
- start: vec(pipeLeft, centerY),
79
- end: vec(pipeRight, centerY),
80
- colors: ['#8B4513', '#A0522D', '#654321', '#4A4A4A', '#2F2F2F']
81
- }), /*#__PURE__*/_jsx(Shadow, {
82
- dx: 2,
83
- dy: 0,
84
- blur: 4,
85
- color: "rgba(0,0,0,0.4)"
86
- })]
87
- }), /*#__PURE__*/_jsx(Path, {
88
- path: `M ${pipeLeft} ${pipeTop} L ${pipeLeft + 2} ${pipeTop} L ${pipeLeft + 2} ${pipeBottom} L ${pipeLeft} ${pipeBottom} Z`,
89
- color: "rgba(160, 82, 45, 0.8)"
90
- }), /*#__PURE__*/_jsx(Path, {
91
- path: `M ${pipeRight - 2} ${pipeTop} L ${pipeRight} ${pipeTop} L ${pipeRight} ${pipeBottom} L ${pipeRight - 2} ${pipeBottom} Z`,
92
- color: "rgba(47, 47, 47, 0.8)"
93
- }), /*#__PURE__*/_jsx(Circle, {
94
- cx: centerX,
95
- cy: pipeTop,
96
- r: pipeWidth / 2,
97
- children: /*#__PURE__*/_jsx(LinearGradient, {
98
- start: vec(centerX - pipeWidth / 4, pipeTop - pipeWidth / 4),
99
- end: vec(centerX + pipeWidth / 4, pipeTop + pipeWidth / 4),
100
- colors: ['#A0522D', '#8B4513', '#654321']
101
- })
102
- }), /*#__PURE__*/_jsx(Circle, {
103
- cx: centerX,
104
- cy: pipeBottom,
105
- r: pipeWidth / 2,
106
- children: /*#__PURE__*/_jsx(LinearGradient, {
107
- start: vec(centerX - pipeWidth / 4, pipeBottom - pipeWidth / 4),
108
- end: vec(centerX + pipeWidth / 4, pipeBottom + pipeWidth / 4),
109
- colors: ['#A0522D', '#8B4513', '#654321']
110
- })
111
- })]
112
- });
113
- }
114
- };
115
- const renderCornerPipe = () => {
116
- const centerX = canvasSize / 2;
117
- const centerY = canvasSize / 2;
118
- const radius = pipeWidth * 1.5;
119
- const {
120
- cornerType
121
- } = segment;
122
- let startAngle = 0;
123
- let endAngle = 90;
124
- let sweepAngle = 90;
125
- switch (cornerType) {
126
- case 'top-right':
127
- startAngle = 0;
128
- endAngle = 90;
129
- break;
130
- case 'bottom-right':
131
- startAngle = 270;
132
- endAngle = 360;
133
- break;
134
- case 'bottom-left':
135
- startAngle = 180;
136
- endAngle = 270;
137
- break;
138
- case 'top-left':
139
- startAngle = 90;
140
- endAngle = 180;
141
- break;
142
- }
143
- const startAngleRad = startAngle * Math.PI / 180;
144
- const endAngleRad = endAngle * Math.PI / 180;
145
- const innerRadius = radius - pipeWidth / 2;
146
- const outerRadius = radius + pipeWidth / 2;
147
-
148
- // Calculate arc points
149
- const innerStartX = centerX + innerRadius * Math.cos(startAngleRad);
150
- const innerStartY = centerY + innerRadius * Math.sin(startAngleRad);
151
- const innerEndX = centerX + innerRadius * Math.cos(endAngleRad);
152
- const innerEndY = centerY + innerRadius * Math.sin(endAngleRad);
153
- const outerStartX = centerX + outerRadius * Math.cos(startAngleRad);
154
- const outerStartY = centerY + outerRadius * Math.sin(startAngleRad);
155
- const outerEndX = centerX + outerRadius * Math.cos(endAngleRad);
156
- const outerEndY = centerY + outerRadius * Math.sin(endAngleRad);
157
- const largeArcFlag = sweepAngle > 180 ? 1 : 0;
158
- return /*#__PURE__*/_jsxs(_Fragment, {
159
- children: [/*#__PURE__*/_jsxs(Path, {
160
- path: `
161
- M ${innerStartX} ${innerStartY}
162
- A ${innerRadius} ${innerRadius} 0 ${largeArcFlag} 1 ${innerEndX} ${innerEndY}
163
- L ${outerEndX} ${outerEndY}
164
- A ${outerRadius} ${outerRadius} 0 ${largeArcFlag} 0 ${outerStartX} ${outerStartY}
165
- Z
166
- `,
167
- children: [/*#__PURE__*/_jsx(LinearGradient, {
168
- start: vec(centerX - radius, centerY - radius),
169
- end: vec(centerX + radius, centerY + radius),
170
- colors: ['#8B4513', '#A0522D', '#654321', '#4A4A4A', '#2F2F2F']
171
- }), /*#__PURE__*/_jsx(Shadow, {
172
- dx: 2,
173
- dy: 2,
174
- blur: 4,
175
- color: "rgba(0,0,0,0.4)"
176
- })]
177
- }), /*#__PURE__*/_jsx(Path, {
178
- path: `
179
- M ${innerStartX} ${innerStartY}
180
- A ${innerRadius} ${innerRadius} 0 ${largeArcFlag} 1 ${innerEndX} ${innerEndY}
181
- L ${centerX + (innerRadius + 2) * Math.cos(endAngleRad)} ${centerY + (innerRadius + 2) * Math.sin(endAngleRad)}
182
- A ${innerRadius + 2} ${innerRadius + 2} 0 ${largeArcFlag} 0 ${centerX + (innerRadius + 2) * Math.cos(startAngleRad)} ${centerY + (innerRadius + 2) * Math.sin(startAngleRad)}
183
- Z
184
- `,
185
- color: "rgba(160, 82, 45, 0.6)"
186
- }), /*#__PURE__*/_jsx(Circle, {
187
- cx: centerX,
188
- cy: centerY,
189
- r: pipeWidth / 3,
190
- children: /*#__PURE__*/_jsx(LinearGradient, {
191
- start: vec(centerX - pipeWidth / 6, centerY - pipeWidth / 6),
192
- end: vec(centerX + pipeWidth / 6, centerY + pipeWidth / 6),
193
- colors: ['#A0522D', '#8B4513', '#654321']
194
- })
195
- })]
196
- });
197
- };
198
- return /*#__PURE__*/_jsx(Canvas, {
199
- style: {
200
- position: 'absolute',
201
- left: segment.start.x - canvasSize / 2,
202
- top: segment.start.y - canvasSize / 2,
203
- width: canvasSize,
204
- height: canvasSize
205
- },
206
- children: segment.type === 'straight' ? renderStraightPipe() : renderCornerPipe()
207
- });
208
- };
209
- //# sourceMappingURL=SkiaPipeComponent.js.map
1
+ "use strict";import React from 'react';import{Canvas,Path,Circle,LinearGradient,vec,Shadow}from '@shopify/react-native-skia';import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from "react/jsx-runtime";export const SkiaPipeComponent =({segment,pipeWidth})=>{const canvasWidth = Math.abs(segment.end.x - segment.start.x)+ pipeWidth * 2;const canvasHeight = Math.abs(segment.end.y - segment.start.y)+ pipeWidth * 2;const canvasSize = Math.max(canvasWidth,canvasHeight,pipeWidth * 3);const renderStraightPipe =()=>{const{start,end}= segment;const centerX = canvasSize / 2;const centerY = canvasSize / 2;if(segment.direction === 'horizontal'){const length = Math.abs(end.x - start.x);const pipeLeft = centerX - length / 2;const pipeRight = centerX + length / 2;const pipeTop = centerY - pipeWidth / 2;const pipeBottom = centerY + pipeWidth / 2;return _jsxs(_Fragment,{children:[_jsxs(Path,{path:`M ${pipeLeft}${pipeTop}L ${pipeRight}${pipeTop}L ${pipeRight}${pipeBottom}L ${pipeLeft}${pipeBottom}Z`,children:[_jsx(LinearGradient,{start:vec(centerX,pipeTop),end:vec(centerX,pipeBottom),colors:['#8B4513','#A0522D','#654321','#4A4A4A','#2F2F2F']}),_jsx(Shadow,{dx:0,dy:2,blur:4,color:"rgba(0,0,0,0.4)"})]}),_jsx(Path,{path:`M ${pipeLeft}${pipeTop}L ${pipeRight}${pipeTop}L ${pipeRight}${pipeTop + 2}L ${pipeLeft}${pipeTop + 2}Z`,color:"rgba(160,82,45,0.8)"}),_jsx(Path,{path:`M ${pipeLeft}${pipeBottom - 2}L ${pipeRight}${pipeBottom - 2}L ${pipeRight}${pipeBottom}L ${pipeLeft}${pipeBottom}Z`,color:"rgba(47,47,47,0.8)"}),_jsx(Circle,{cx:pipeLeft,cy:centerY,r:pipeWidth / 2,children:_jsx(LinearGradient,{start:vec(pipeLeft - pipeWidth / 4,centerY - pipeWidth / 4),end:vec(pipeLeft + pipeWidth / 4,centerY + pipeWidth / 4),colors:['#A0522D','#8B4513','#654321']})}),_jsx(Circle,{cx:pipeRight,cy:centerY,r:pipeWidth / 2,children:_jsx(LinearGradient,{start:vec(pipeRight - pipeWidth / 4,centerY - pipeWidth / 4),end:vec(pipeRight + pipeWidth / 4,centerY + pipeWidth / 4),colors:['#A0522D','#8B4513','#654321']})})]});}else{const length = Math.abs(end.y - start.y);const pipeTop = centerY - length / 2;const pipeBottom = centerY + length / 2;const pipeLeft = centerX - pipeWidth / 2;const pipeRight = centerX + pipeWidth / 2;return _jsxs(_Fragment,{children:[_jsxs(Path,{path:`M ${pipeLeft}${pipeTop}L ${pipeRight}${pipeTop}L ${pipeRight}${pipeBottom}L ${pipeLeft}${pipeBottom}Z`,children:[_jsx(LinearGradient,{start:vec(pipeLeft,centerY),end:vec(pipeRight,centerY),colors:['#8B4513','#A0522D','#654321','#4A4A4A','#2F2F2F']}),_jsx(Shadow,{dx:2,dy:0,blur:4,color:"rgba(0,0,0,0.4)"})]}),_jsx(Path,{path:`M ${pipeLeft}${pipeTop}L ${pipeLeft + 2}${pipeTop}L ${pipeLeft + 2}${pipeBottom}L ${pipeLeft}${pipeBottom}Z`,color:"rgba(160,82,45,0.8)"}),_jsx(Path,{path:`M ${pipeRight - 2}${pipeTop}L ${pipeRight}${pipeTop}L ${pipeRight}${pipeBottom}L ${pipeRight - 2}${pipeBottom}Z`,color:"rgba(47,47,47,0.8)"}),_jsx(Circle,{cx:centerX,cy:pipeTop,r:pipeWidth / 2,children:_jsx(LinearGradient,{start:vec(centerX - pipeWidth / 4,pipeTop - pipeWidth / 4),end:vec(centerX + pipeWidth / 4,pipeTop + pipeWidth / 4),colors:['#A0522D','#8B4513','#654321']})}),_jsx(Circle,{cx:centerX,cy:pipeBottom,r:pipeWidth / 2,children:_jsx(LinearGradient,{start:vec(centerX - pipeWidth / 4,pipeBottom - pipeWidth / 4),end:vec(centerX + pipeWidth / 4,pipeBottom + pipeWidth / 4),colors:['#A0522D','#8B4513','#654321']})})]});}};const renderCornerPipe =()=>{const centerX = canvasSize / 2;const centerY = canvasSize / 2;const radius = pipeWidth * 1.5;const{cornerType}= segment;let startAngle = 0;let endAngle = 90;let sweepAngle = 90;switch(cornerType){case 'top-right':startAngle = 0;endAngle = 90;break;case 'bottom-right':startAngle = 270;endAngle = 360;break;case 'bottom-left':startAngle = 180;endAngle = 270;break;case 'top-left':startAngle = 90;endAngle = 180;break;}const startAngleRad = startAngle * Math.PI / 180;const endAngleRad = endAngle * Math.PI / 180;const innerRadius = radius - pipeWidth / 2;const outerRadius = radius + pipeWidth / 2;const innerStartX = centerX + innerRadius * Math.cos(startAngleRad);const innerStartY = centerY + innerRadius * Math.sin(startAngleRad);const innerEndX = centerX + innerRadius * Math.cos(endAngleRad);const innerEndY = centerY + innerRadius * Math.sin(endAngleRad);const outerStartX = centerX + outerRadius * Math.cos(startAngleRad);const outerStartY = centerY + outerRadius * Math.sin(startAngleRad);const outerEndX = centerX + outerRadius * Math.cos(endAngleRad);const outerEndY = centerY + outerRadius * Math.sin(endAngleRad);const largeArcFlag = sweepAngle > 180 ? 1:0;return _jsxs(_Fragment,{children:[_jsxs(Path,{path:` M ${innerStartX}${innerStartY}A ${innerRadius}${innerRadius}0 ${largeArcFlag}1 ${innerEndX}${innerEndY}L ${outerEndX}${outerEndY}A ${outerRadius}${outerRadius}0 ${largeArcFlag}0 ${outerStartX}${outerStartY}Z `,children:[_jsx(LinearGradient,{start:vec(centerX - radius,centerY - radius),end:vec(centerX + radius,centerY + radius),colors:['#8B4513','#A0522D','#654321','#4A4A4A','#2F2F2F']}),_jsx(Shadow,{dx:2,dy:2,blur:4,color:"rgba(0,0,0,0.4)"})]}),_jsx(Path,{path:` M ${innerStartX}${innerStartY}A ${innerRadius}${innerRadius}0 ${largeArcFlag}1 ${innerEndX}${innerEndY}L ${centerX +(innerRadius + 2)* Math.cos(endAngleRad)}${centerY +(innerRadius + 2)* Math.sin(endAngleRad)}A ${innerRadius + 2}${innerRadius + 2}0 ${largeArcFlag}0 ${centerX +(innerRadius + 2)* Math.cos(startAngleRad)}${centerY +(innerRadius + 2)* Math.sin(startAngleRad)}Z `,color:"rgba(160,82,45,0.6)"}),_jsx(Circle,{cx:centerX,cy:centerY,r:pipeWidth / 3,children:_jsx(LinearGradient,{start:vec(centerX - pipeWidth / 6,centerY - pipeWidth / 6),end:vec(centerX + pipeWidth / 6,centerY + pipeWidth / 6),colors:['#A0522D','#8B4513','#654321']})})]});};return _jsx(Canvas,{style:{position:'absolute',left:segment.start.x - canvasSize / 2,top:segment.start.y - canvasSize / 2,width:canvasSize,height:canvasSize},children:segment.type === 'straight' ? renderStraightPipe():renderCornerPipe()});};
@@ -1,169 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { Canvas, LinearGradient, vec, Circle, Path, Shadow } from '@shopify/react-native-skia';
5
- import Animated from 'react-native-reanimated';
6
- import { Dimensions } from 'react-native';
7
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
8
- const {
9
- width: screenWidth,
10
- height: screenHeight
11
- } = Dimensions.get('window');
12
- export const GameBackground = ({
13
- children
14
- }) => {
15
- // Static background with no animations or changing elements
16
- const staticStyle = {
17
- position: 'absolute',
18
- top: 0,
19
- left: 0,
20
- right: 0,
21
- bottom: 0,
22
- zIndex: -1
23
- };
24
-
25
- // Pre-calculated static maze pattern - no Math.random() or changing values
26
- const staticMazePattern = React.useMemo(() => {
27
- const gridSize = 20;
28
- const cellSize = screenWidth / gridSize;
29
- const elements = [];
30
-
31
- // Create completely static maze pattern
32
- for (let i = 0; i < gridSize; i++) {
33
- for (let j = 0; j < gridSize; j++) {
34
- const x = i * cellSize;
35
- const y = j * cellSize;
36
- // Fixed deterministic opacity based on position
37
- const seed = (i * 31 + j * 17) % 100;
38
- const opacity = seed > 70 ? 0.08 : 0.04;
39
-
40
- // Fixed vertical lines pattern
41
- if ((i + j * 2) % 5 > 2) {
42
- elements.push(/*#__PURE__*/_jsx(Path, {
43
- path: `M ${x} ${y} L ${x} ${y + cellSize}`,
44
- style: "stroke",
45
- strokeWidth: 1,
46
- color: `rgba(139, 69, 19, ${opacity})`
47
- }, `v-${i}-${j}`));
48
- }
49
-
50
- // Fixed horizontal lines pattern
51
- if ((i * 2 + j) % 5 > 2) {
52
- elements.push(/*#__PURE__*/_jsx(Path, {
53
- path: `M ${x} ${y} L ${x + cellSize} ${y}`,
54
- style: "stroke",
55
- strokeWidth: 1,
56
- color: `rgba(139, 69, 19, ${opacity})`
57
- }, `h-${i}-${j}`));
58
- }
59
- }
60
- }
61
- return elements;
62
- }, []);
63
-
64
- // Static floating elements - no animations
65
- const staticFloatingElements = React.useMemo(() => {
66
- const elements = [];
67
-
68
- // Static maze pieces with fixed positioning
69
- for (let i = 0; i < 6; i++) {
70
- const seed = i * 37;
71
- const x = screenWidth / 6 * i + seed % 40;
72
- const y = screenHeight / 3 * (i % 3) + seed * 2 % 80;
73
- const size = 12 + seed * 3 % 8;
74
- elements.push(/*#__PURE__*/_jsx(Circle, {
75
- cx: x,
76
- cy: y,
77
- r: size,
78
- opacity: 0.1,
79
- color: "rgba(139, 69, 19, 0.2)",
80
- children: /*#__PURE__*/_jsx(Shadow, {
81
- dx: 1,
82
- dy: 1,
83
- blur: 2,
84
- color: "rgba(0,0,0,0.1)"
85
- })
86
- }, `maze-piece-${i}`));
87
- }
88
-
89
- // Static corner accents
90
- const cornerSize = 30;
91
- elements.push(
92
- /*#__PURE__*/
93
- // Top-left corner
94
- _jsx(Path, {
95
- path: `M 15 15 L ${cornerSize + 15} 15 L ${cornerSize + 15} 30 L 30 30 L 30 ${cornerSize + 15} L 15 ${cornerSize + 15} Z`,
96
- color: "rgba(139, 69, 19, 0.15)",
97
- opacity: 0.5,
98
- children: /*#__PURE__*/_jsx(Shadow, {
99
- dx: 1,
100
- dy: 1,
101
- blur: 2,
102
- color: "rgba(0,0,0,0.05)"
103
- })
104
- }, "corner-tl"),
105
- /*#__PURE__*/
106
- // Top-right corner
107
- _jsx(Path, {
108
- path: `M ${screenWidth - cornerSize - 15} 15 L ${screenWidth - 15} 15 L ${screenWidth - 15} ${cornerSize + 15} L ${screenWidth - 30} ${cornerSize + 15} L ${screenWidth - 30} 30 L ${screenWidth - cornerSize - 15} 30 Z`,
109
- color: "rgba(139, 69, 19, 0.15)",
110
- opacity: 0.5,
111
- children: /*#__PURE__*/_jsx(Shadow, {
112
- dx: -1,
113
- dy: 1,
114
- blur: 2,
115
- color: "rgba(0,0,0,0.05)"
116
- })
117
- }, "corner-tr"));
118
- return elements;
119
- }, []);
120
-
121
- // Static particles - no animations
122
- const staticParticles = React.useMemo(() => {
123
- const particles = [];
124
- for (let i = 0; i < 12; i++) {
125
- const seed = i * 43;
126
- const x = seed % screenWidth;
127
- const y = seed * 7 % screenHeight;
128
- const size = 1.5 + seed * 3 % 2;
129
- const opacity = 0.08 + seed * 5 % 15 / 100;
130
- particles.push(/*#__PURE__*/_jsx(Circle, {
131
- cx: x,
132
- cy: y,
133
- r: size,
134
- color: `rgba(160, 82, 45, ${opacity})`
135
- }, `particle-${i}`));
136
- }
137
- return particles;
138
- }, []);
139
- return /*#__PURE__*/_jsxs(_Fragment, {
140
- children: [/*#__PURE__*/_jsx(Animated.View, {
141
- style: staticStyle,
142
- children: /*#__PURE__*/_jsxs(Canvas, {
143
- style: {
144
- width: screenWidth,
145
- height: screenHeight
146
- },
147
- children: [/*#__PURE__*/_jsx(Path, {
148
- path: `M 0 0 L ${screenWidth} 0 L ${screenWidth} ${screenHeight} L 0 ${screenHeight} Z`,
149
- children: /*#__PURE__*/_jsx(LinearGradient, {
150
- start: vec(0, 0),
151
- end: vec(0, screenHeight),
152
- colors: ['#f8f4e6',
153
- // Light cream
154
- '#f0e6d2',
155
- // Warm beige
156
- '#e8d5b7',
157
- // Light brown
158
- '#d4c4a8' // Medium beige
159
- ]
160
- })
161
- }), staticMazePattern, staticFloatingElements, staticParticles, /*#__PURE__*/_jsx(Path, {
162
- path: `M 0 0 L ${screenWidth} 0 L ${screenWidth} ${screenHeight} L 0 ${screenHeight} Z`,
163
- color: "rgba(139, 69, 19, 0.02)"
164
- })]
165
- })
166
- }), children]
167
- });
168
- };
169
- //# sourceMappingURL=StaticGameBackground.js.map
1
+ "use strict";import React from 'react';import{Canvas,LinearGradient,vec,Circle,Path,Shadow}from '@shopify/react-native-skia';import Animated from 'react-native-reanimated';import{Dimensions}from 'react-native';import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from "react/jsx-runtime";const{width:screenWidth,height:screenHeight}= Dimensions.get('window');export const GameBackground =({children})=>{const staticStyle ={position:'absolute',top:0,left:0,right:0,bottom:0,zIndex:-1};const staticMazePattern = React.useMemo(()=>{const gridSize = 20;const cellSize = screenWidth / gridSize;const elements = [];for(let i = 0;i < gridSize;i++){for(let j = 0;j < gridSize;j++){const x = i * cellSize;const y = j * cellSize;const seed =(i * 31 + j * 17)% 100;const opacity = seed > 70 ? 0.08:0.04;if((i + j * 2)% 5 > 2){elements.push(_jsx(Path,{path:`M ${x}${y}L ${x}${y + cellSize}`,style:"stroke",strokeWidth:1,color:`rgba(139,69,19,${opacity})`},`v-${i}-${j}`));}if((i * 2 + j)% 5 > 2){elements.push(_jsx(Path,{path:`M ${x}${y}L ${x + cellSize}${y}`,style:"stroke",strokeWidth:1,color:`rgba(139,69,19,${opacity})`},`h-${i}-${j}`));}}}return elements;},[]);const staticFloatingElements = React.useMemo(()=>{const elements = [];for(let i = 0;i < 6;i++){const seed = i * 37;const x = screenWidth / 6 * i + seed % 40;const y = screenHeight / 3 *(i % 3)+ seed * 2 % 80;const size = 12 + seed * 3 % 8;elements.push(_jsx(Circle,{cx:x,cy:y,r:size,opacity:0.1,color:"rgba(139,69,19,0.2)",children:_jsx(Shadow,{dx:1,dy:1,blur:2,color:"rgba(0,0,0,0.1)"})},`maze-piece-${i}`));}const cornerSize = 30;elements.push(_jsx(Path,{path:`M 15 15 L ${cornerSize + 15}15 L ${cornerSize + 15}30 L 30 30 L 30 ${cornerSize + 15}L 15 ${cornerSize + 15}Z`,color:"rgba(139,69,19,0.15)",opacity:0.5,children:_jsx(Shadow,{dx:1,dy:1,blur:2,color:"rgba(0,0,0,0.05)"})},"corner-tl"),_jsx(Path,{path:`M ${screenWidth - cornerSize - 15}15 L ${screenWidth - 15}15 L ${screenWidth - 15}${cornerSize + 15}L ${screenWidth - 30}${cornerSize + 15}L ${screenWidth - 30}30 L ${screenWidth - cornerSize - 15}30 Z`,color:"rgba(139,69,19,0.15)",opacity:0.5,children:_jsx(Shadow,{dx:-1,dy:1,blur:2,color:"rgba(0,0,0,0.05)"})},"corner-tr"));return elements;},[]);const staticParticles = React.useMemo(()=>{const particles = [];for(let i = 0;i < 12;i++){const seed = i * 43;const x = seed % screenWidth;const y = seed * 7 % screenHeight;const size = 1.5 + seed * 3 % 2;const opacity = 0.08 + seed * 5 % 15 / 100;particles.push(_jsx(Circle,{cx:x,cy:y,r:size,color:`rgba(160,82,45,${opacity})`},`particle-${i}`));}return particles;},[]);return _jsxs(_Fragment,{children:[_jsx(Animated.View,{style:staticStyle,children:_jsxs(Canvas,{style:{width:screenWidth,height:screenHeight},children:[_jsx(Path,{path:`M 0 0 L ${screenWidth}0 L ${screenWidth}${screenHeight}L 0 ${screenHeight}Z`,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(0,screenHeight),colors:['#f8f4e6','#f0e6d2','#e8d5b7','#d4c4a8' ]})}),staticMazePattern,staticFloatingElements,staticParticles,_jsx(Path,{path:`M 0 0 L ${screenWidth}0 L ${screenWidth}${screenHeight}L 0 ${screenHeight}Z`,color:"rgba(139,69,19,0.02)"})]})}),children]});};