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,172 +1 @@
1
- "use strict";
2
-
3
- import { create } from 'zustand';
4
- import { subscribeWithSelector } from 'zustand/middleware';
5
- import { GAME_CONFIG } from "./WhackAMoleService.js";
6
- import { immerMiddleware } from "../../services/UtilsService.js";
7
- const createInitialHoles = (gridSize = GAME_CONFIG.GRID_SIZE) => {
8
- const totalHoles = gridSize * gridSize;
9
- return Array.from({
10
- length: totalHoles
11
- }, (_, i) => ({
12
- id: i,
13
- isActive: false,
14
- position: {
15
- x: (i % gridSize - 1) * (GAME_CONFIG.HOLE_SIZE + 20),
16
- y: Math.floor(i / gridSize - 1) * (GAME_CONFIG.HOLE_SIZE + 20),
17
- z: 0
18
- }
19
- }));
20
- };
21
-
22
- // Optimized store with selective subscriptions for low-end devices
23
- export const useWhackAMoleStore = create()(subscribeWithSelector(immerMiddleware((set, get) => ({
24
- // Initial state
25
- score: 0,
26
- timeLeft: GAME_CONFIG.GAME_DURATION,
27
- // Fixed duration regardless of difficulty
28
- isPlaying: false,
29
- gameOver: false,
30
- holes: createInitialHoles(),
31
- // Actions
32
- startGame: (_gameDuration, gridSize) => {
33
- // Always use fixed duration regardless of difficulty or passed duration
34
- const duration = GAME_CONFIG.GAME_DURATION;
35
- const grid = gridSize || GAME_CONFIG.GRID_SIZE;
36
- set(draft => {
37
- draft.score = 0;
38
- draft.timeLeft = duration;
39
- draft.isPlaying = true;
40
- draft.gameOver = false;
41
- draft.holes = createInitialHoles(grid);
42
- });
43
- },
44
- stopGame: () => {
45
- set(draft => {
46
- draft.score = 0;
47
- draft.timeLeft = GAME_CONFIG.GAME_DURATION; // Use constant for consistency
48
- draft.isPlaying = false;
49
- draft.gameOver = false;
50
- });
51
- },
52
- resetGame: () => {
53
- set(draft => {
54
- draft.score = 0;
55
- draft.timeLeft = GAME_CONFIG.GAME_DURATION; // Use constant for consistency
56
- draft.isPlaying = false;
57
- draft.gameOver = false;
58
- draft.holes = createInitialHoles();
59
- });
60
- },
61
- whackMole: (holeId, points = 1) => {
62
- const {
63
- holes,
64
- isPlaying
65
- } = get();
66
- if (!isPlaying) return;
67
-
68
- // Optimized: Use direct array access instead of find for better performance
69
- if (holeId < 0 || holeId >= holes.length || !holes[holeId] || !holes[holeId].isActive) return;
70
- set(draft => {
71
- draft.score = draft.score + points;
72
- // Optimized: Direct array access instead of find
73
- if (draft.holes[holeId]) {
74
- draft.holes[holeId].isActive = false;
75
- }
76
- });
77
- },
78
- updateScore: points => {
79
- set(draft => {
80
- draft.score = draft.score + points;
81
- });
82
- },
83
- decrementTime: () => {
84
- const currentState = get();
85
- if (currentState.timeLeft <= 1) {
86
- // Batch final state update to prevent multiple re-renders
87
- set(draft => {
88
- draft.timeLeft = 0;
89
- draft.isPlaying = false;
90
- draft.gameOver = true;
91
- // Deactivate all holes when game ends
92
- draft.holes.forEach(hole => {
93
- hole.isActive = false;
94
- });
95
- });
96
- } else {
97
- // Only update time to minimize re-renders
98
- set(draft => {
99
- draft.timeLeft = currentState.timeLeft - 1;
100
- });
101
- }
102
- },
103
- setHoles: holes => {
104
- set(draft => {
105
- draft.holes = holes;
106
- });
107
- },
108
- activateHole: holeId => {
109
- // Optimized hole activation with direct array access
110
- const state = get();
111
- if (holeId >= 0 && holeId < state.holes.length && !state.holes[holeId].isActive) {
112
- set(draft => {
113
- if (draft.holes[holeId]) {
114
- draft.holes[holeId].isActive = true;
115
- }
116
- });
117
- }
118
- },
119
- deactivateHole: holeId => {
120
- // Optimized hole deactivation with direct array access
121
- const state = get();
122
- if (holeId >= 0 && holeId < state.holes.length && state.holes[holeId].isActive) {
123
- set(draft => {
124
- if (draft.holes[holeId]) {
125
- draft.holes[holeId].isActive = false;
126
- }
127
- });
128
- }
129
- },
130
- // Batch operations for better performance
131
- batchUpdateHoles: updates => {
132
- const state = get();
133
- const hasChanges = updates.some(update => update.holeId >= 0 && update.holeId < state.holes.length && state.holes[update.holeId].isActive !== update.isActive);
134
- if (hasChanges) {
135
- set(draft => {
136
- updates.forEach(({
137
- holeId,
138
- isActive
139
- }) => {
140
- if (holeId >= 0 && holeId < draft.holes.length) {
141
- if (draft.holes[holeId]) {
142
- draft.holes[holeId].isActive = isActive;
143
- }
144
- }
145
- });
146
- });
147
- }
148
- }
149
- }))));
150
-
151
- // Optimized selectors for low-end devices - prevent unnecessary re-renders
152
- export const useGameState = () => useWhackAMoleStore(state => ({
153
- isPlaying: state.isPlaying,
154
- gameOver: state.gameOver
155
- }));
156
- export const useScore = () => useWhackAMoleStore(state => state.score);
157
- export const useTimeLeft = () => useWhackAMoleStore(state => state.timeLeft);
158
-
159
- // Memoized active holes selector for better performance
160
- export const useActiveHoles = () => useWhackAMoleStore(state => {
161
- const activeHoles = [];
162
- for (let i = 0; i < state.holes.length; i++) {
163
- if (state.holes[i] && state.holes[i].isActive) {
164
- activeHoles.push(state.holes[i]);
165
- }
166
- }
167
- return activeHoles;
168
- });
169
-
170
- // Optimized hole selector with direct array access
171
- export const useHoleById = holeId => useWhackAMoleStore(state => holeId >= 0 && holeId < state.holes.length ? state.holes[holeId] : undefined);
172
- //# sourceMappingURL=WhackAMoleStore.js.map
1
+ "use strict";import{create}from 'zustand';import{subscribeWithSelector}from 'zustand/middleware';import{GAME_CONFIG}from "./WhackAMoleService.js";import{immerMiddleware}from "../../services/UtilsService.js";const createInitialHoles =(gridSize = GAME_CONFIG.GRID_SIZE)=>{const totalHoles = gridSize * gridSize;return Array.from({length:totalHoles},(_,i)=>({id:i,isActive:false,position:{x:(i % gridSize - 1)*(GAME_CONFIG.HOLE_SIZE + 20),y:Math.floor(i / gridSize - 1)*(GAME_CONFIG.HOLE_SIZE + 20),z:0}}));};export const useWhackAMoleStore = create()(subscribeWithSelector(immerMiddleware((set,get)=>({score:0,timeLeft:GAME_CONFIG.GAME_DURATION,isPlaying:false,gameOver:false,holes:createInitialHoles(),startGame:(_gameDuration,gridSize)=>{const duration = GAME_CONFIG.GAME_DURATION;const grid = gridSize || GAME_CONFIG.GRID_SIZE;set(draft =>{draft.score = 0;draft.timeLeft = duration;draft.isPlaying = true;draft.gameOver = false;draft.holes = createInitialHoles(grid);});},stopGame:()=>{set(draft =>{draft.score = 0;draft.timeLeft = GAME_CONFIG.GAME_DURATION;draft.isPlaying = false;draft.gameOver = false;});},resetGame:()=>{set(draft =>{draft.score = 0;draft.timeLeft = GAME_CONFIG.GAME_DURATION;draft.isPlaying = false;draft.gameOver = false;draft.holes = createInitialHoles();});},whackMole:(holeId,points = 1)=>{const{holes,isPlaying}= get();if(!isPlaying)return;if(holeId < 0 || holeId >= holes.length || !holes[holeId] || !holes[holeId].isActive)return;set(draft =>{draft.score = draft.score + points;if(draft.holes[holeId]){draft.holes[holeId].isActive = false;}});},updateScore:points =>{set(draft =>{draft.score = draft.score + points;});},decrementTime:()=>{const currentState = get();if(currentState.timeLeft <= 1){set(draft =>{draft.timeLeft = 0;draft.isPlaying = false;draft.gameOver = true;draft.holes.forEach(hole =>{hole.isActive = false;});});}else{set(draft =>{draft.timeLeft = currentState.timeLeft - 1;});}},setHoles:holes =>{set(draft =>{draft.holes = holes;});},activateHole:holeId =>{const state = get();if(holeId >= 0 && holeId < state.holes.length && !state.holes[holeId].isActive){set(draft =>{if(draft.holes[holeId]){draft.holes[holeId].isActive = true;}});}},deactivateHole:holeId =>{const state = get();if(holeId >= 0 && holeId < state.holes.length && state.holes[holeId].isActive){set(draft =>{if(draft.holes[holeId]){draft.holes[holeId].isActive = false;}});}},batchUpdateHoles:updates =>{const state = get();const hasChanges = updates.some(update => update.holeId >= 0 && update.holeId < state.holes.length && state.holes[update.holeId].isActive !== update.isActive);if(hasChanges){set(draft =>{updates.forEach(({holeId,isActive})=>{if(holeId >= 0 && holeId < draft.holes.length){if(draft.holes[holeId]){draft.holes[holeId].isActive = isActive;}}});});}}}))));export const useGameState =()=> useWhackAMoleStore(state =>({isPlaying:state.isPlaying,gameOver:state.gameOver}));export const useScore =()=> useWhackAMoleStore(state => state.score);export const useTimeLeft =()=> useWhackAMoleStore(state => state.timeLeft);export const useActiveHoles =()=> useWhackAMoleStore(state =>{const activeHoles = [];for(let i = 0;i < state.holes.length;i++){if(state.holes[i] && state.holes[i].isActive){activeHoles.push(state.holes[i]);}}return activeHoles;});export const useHoleById = holeId => useWhackAMoleStore(state => holeId >= 0 && holeId < state.holes.length ? state.holes[holeId]:undefined);
@@ -1,477 +1 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { View, Dimensions } from 'react-native';
5
- import { Canvas, LinearGradient, Rect, Circle, Path, Skia, vec, Group, Shadow } from '@shopify/react-native-skia';
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- const {
8
- width,
9
- height
10
- } = Dimensions.get('window');
11
- export const GameBackground = /*#__PURE__*/React.memo(({
12
- children,
13
- offset = 0
14
- }) => {
15
- // Adjust sun and cloud positions based on offset
16
- const sunY = height * 0.15 + offset * 0.9;
17
- const cloud1Y = height * 0.24 + offset * 0.8;
18
- const cloud2Y = height * 0.27 + offset * 0.8;
19
- const cloud3Y = height * 0.19 + offset * 0.8;
20
-
21
- // Create grass path - ground height area (dynamic based on offset)
22
- const buttonAreaHeight = offset > 0 ? 150 : 250; // Height for ground area
23
- const grassStartY = height - buttonAreaHeight;
24
- const createGrassPath = (startX, segments = 8) => {
25
- const path = Skia.Path.Make();
26
- const segmentWidth = width / segments;
27
- path.moveTo(startX, grassStartY);
28
- for (let i = 0; i < segments; i++) {
29
- const x = startX + i * segmentWidth;
30
- const y = grassStartY + Math.sin(i * 0.5) * 8; // Reduced wave amplitude
31
- const controlX = x + segmentWidth / 2;
32
- const controlY = y + Math.cos(i * 0.3) * 6; // Reduced wave amplitude
33
-
34
- path.quadTo(controlX, controlY, x + segmentWidth, y);
35
- }
36
- path.lineTo(width, height);
37
- path.lineTo(startX, height);
38
- path.close();
39
- return path;
40
- };
41
- const grassPath = createGrassPath(0);
42
- return /*#__PURE__*/_jsxs(View, {
43
- style: {
44
- flex: 1
45
- },
46
- children: [/*#__PURE__*/_jsxs(Canvas, {
47
- style: {
48
- position: 'absolute',
49
- width,
50
- height
51
- },
52
- children: [/*#__PURE__*/_jsx(Rect, {
53
- x: 0,
54
- y: 0,
55
- width: width,
56
- height: grassStartY,
57
- children: /*#__PURE__*/_jsx(LinearGradient, {
58
- start: vec(0, 0),
59
- end: vec(0, grassStartY),
60
- colors: ['#87CEEB', '#98D8E8', '#B0E0E6']
61
- })
62
- }), /*#__PURE__*/_jsxs(Group, {
63
- children: [/*#__PURE__*/_jsxs(Circle, {
64
- cx: width * 0.8,
65
- cy: sunY,
66
- r: 40,
67
- children: [/*#__PURE__*/_jsx(LinearGradient, {
68
- start: vec(-40, -40),
69
- end: vec(40, 40),
70
- colors: ['#FFFF99', '#FFD700', '#FFA500', '#FF8C00']
71
- }), /*#__PURE__*/_jsx(Shadow, {
72
- dx: 0,
73
- dy: 0,
74
- blur: 30,
75
- color: "#FFD700"
76
- })]
77
- }), /*#__PURE__*/_jsx(Circle, {
78
- cx: width * 0.8 - 8,
79
- cy: sunY - 8,
80
- r: 15,
81
- children: /*#__PURE__*/_jsx(LinearGradient, {
82
- start: vec(-15, -15),
83
- end: vec(15, 15),
84
- colors: ['#FFFFFF', '#FFFF99']
85
- })
86
- }), Array.from({
87
- length: 16
88
- }, (_, index) => {
89
- const angle = 360 / 16 * index;
90
- const radian = angle * Math.PI / 180;
91
- const isLongRay = index % 2 === 0;
92
- const rayLength = isLongRay ? 25 : 15;
93
- const rayWidth = isLongRay ? 4 : 2;
94
- const startDistance = 45;
95
- const startX = width * 0.8 + Math.cos(radian) * startDistance;
96
- const startY = sunY + Math.sin(radian) * startDistance;
97
- const endX = width * 0.8 + Math.cos(radian) * (startDistance + rayLength);
98
- const endY = sunY + Math.sin(radian) * (startDistance + rayLength);
99
- const rayPath = Skia.Path.Make();
100
- rayPath.moveTo(startX, startY);
101
- rayPath.lineTo(endX, endY);
102
- return /*#__PURE__*/_jsx(Path, {
103
- path: rayPath,
104
- style: "stroke",
105
- strokeWidth: rayWidth,
106
- color: "#FFD700",
107
- opacity: 0.7
108
- }, index);
109
- }), /*#__PURE__*/_jsx(Circle, {
110
- cx: width * 0.8,
111
- cy: sunY,
112
- r: 60,
113
- opacity: 0.1,
114
- children: /*#__PURE__*/_jsx(LinearGradient, {
115
- start: vec(-60, -60),
116
- end: vec(60, 60),
117
- colors: ['#FFD700', 'transparent']
118
- })
119
- })]
120
- }), /*#__PURE__*/_jsxs(Group, {
121
- children: [/*#__PURE__*/_jsxs(Group, {
122
- children: [/*#__PURE__*/_jsx(Circle, {
123
- cx: width * 0.12,
124
- cy: cloud1Y,
125
- r: 16,
126
- color: "#F0F8FF",
127
- opacity: 0.35,
128
- children: /*#__PURE__*/_jsx(Shadow, {
129
- dx: 1,
130
- dy: 2,
131
- blur: 12,
132
- color: "rgba(0,0,0,0.05)"
133
- })
134
- }), /*#__PURE__*/_jsx(Circle, {
135
- cx: width * 0.18,
136
- cy: cloud1Y - (height * 0.24 - height * 0.21),
137
- r: 22,
138
- color: "#FFFFFF",
139
- opacity: 0.45,
140
- children: /*#__PURE__*/_jsx(Shadow, {
141
- dx: 1,
142
- dy: 2,
143
- blur: 12,
144
- color: "rgba(0,0,0,0.05)"
145
- })
146
- }), /*#__PURE__*/_jsx(Circle, {
147
- cx: width * 0.25,
148
- cy: cloud1Y - (height * 0.24 - height * 0.19),
149
- r: 26,
150
- color: "#F8F8FF",
151
- opacity: 0.55,
152
- children: /*#__PURE__*/_jsx(Shadow, {
153
- dx: 2,
154
- dy: 3,
155
- blur: 12,
156
- color: "rgba(0,0,0,0.06)"
157
- })
158
- }), /*#__PURE__*/_jsx(Circle, {
159
- cx: width * 0.32,
160
- cy: cloud1Y - (height * 0.24 - height * 0.21),
161
- r: 20,
162
- color: "#FFFFFF",
163
- opacity: 0.50,
164
- children: /*#__PURE__*/_jsx(Shadow, {
165
- dx: 1,
166
- dy: 2,
167
- blur: 12,
168
- color: "rgba(0,0,0,0.05)"
169
- })
170
- }), /*#__PURE__*/_jsx(Circle, {
171
- cx: width * 0.37,
172
- cy: cloud1Y,
173
- r: 14,
174
- color: "#F0F8FF",
175
- opacity: 0.40,
176
- children: /*#__PURE__*/_jsx(Shadow, {
177
- dx: 1,
178
- dy: 2,
179
- blur: 12,
180
- color: "rgba(0,0,0,0.04)"
181
- })
182
- }), /*#__PURE__*/_jsx(Circle, {
183
- cx: width * 0.15,
184
- cy: cloud1Y + (height * 0.26 - height * 0.24),
185
- r: 8,
186
- color: "#F8F8FF",
187
- opacity: 0.25
188
- }), /*#__PURE__*/_jsx(Circle, {
189
- cx: width * 0.35,
190
- cy: cloud1Y - (height * 0.24 - height * 0.18),
191
- r: 6,
192
- color: "#FFFFFF",
193
- opacity: 0.30
194
- }), /*#__PURE__*/_jsx(Circle, {
195
- cx: width * 0.40,
196
- cy: cloud1Y - (height * 0.24 - height * 0.22),
197
- r: 5,
198
- color: "#F0F8FF",
199
- opacity: 0.20
200
- }), /*#__PURE__*/_jsx(Circle, {
201
- cx: width * 0.22,
202
- cy: cloud1Y - (height * 0.24 - height * 0.18),
203
- r: 7,
204
- color: "#FFFFFF",
205
- opacity: 0.35
206
- }), /*#__PURE__*/_jsx(Circle, {
207
- cx: width * 0.28,
208
- cy: cloud1Y - (height * 0.24 - height * 0.20),
209
- r: 5,
210
- color: "#FFFFFF",
211
- opacity: 0.25
212
- })]
213
- }), /*#__PURE__*/_jsxs(Group, {
214
- children: [/*#__PURE__*/_jsx(Circle, {
215
- cx: width * 0.62,
216
- cy: cloud2Y,
217
- r: 15,
218
- color: "#F0F8FF",
219
- opacity: 0.40,
220
- children: /*#__PURE__*/_jsx(Shadow, {
221
- dx: 1,
222
- dy: 2,
223
- blur: 10,
224
- color: "rgba(0,0,0,0.04)"
225
- })
226
- }), /*#__PURE__*/_jsx(Circle, {
227
- cx: width * 0.69,
228
- cy: cloud2Y - (height * 0.27 - height * 0.24),
229
- r: 19,
230
- color: "#FFFFFF",
231
- opacity: 0.50,
232
- children: /*#__PURE__*/_jsx(Shadow, {
233
- dx: 1,
234
- dy: 2,
235
- blur: 10,
236
- color: "rgba(0,0,0,0.05)"
237
- })
238
- }), /*#__PURE__*/_jsx(Circle, {
239
- cx: width * 0.76,
240
- cy: cloud2Y - (height * 0.27 - height * 0.26),
241
- r: 13,
242
- color: "#F8F8FF",
243
- opacity: 0.45,
244
- children: /*#__PURE__*/_jsx(Shadow, {
245
- dx: 1,
246
- dy: 2,
247
- blur: 10,
248
- color: "rgba(0,0,0,0.04)"
249
- })
250
- }), /*#__PURE__*/_jsx(Circle, {
251
- cx: width * 0.81,
252
- cy: cloud2Y + (height * 0.28 - height * 0.27),
253
- r: 9,
254
- color: "#F0F8FF",
255
- opacity: 0.35,
256
- children: /*#__PURE__*/_jsx(Shadow, {
257
- dx: 1,
258
- dy: 1,
259
- blur: 8,
260
- color: "rgba(0,0,0,0.03)"
261
- })
262
- }), /*#__PURE__*/_jsx(Circle, {
263
- cx: width * 0.65,
264
- cy: cloud2Y + (height * 0.29 - height * 0.27),
265
- r: 6,
266
- color: "#F8F8FF",
267
- opacity: 0.20
268
- }), /*#__PURE__*/_jsx(Circle, {
269
- cx: width * 0.78,
270
- cy: cloud2Y - (height * 0.27 - height * 0.23),
271
- r: 4,
272
- color: "#FFFFFF",
273
- opacity: 0.25
274
- }), /*#__PURE__*/_jsx(Circle, {
275
- cx: width * 0.67,
276
- cy: cloud2Y - (height * 0.27 - height * 0.23),
277
- r: 5,
278
- color: "#FFFFFF",
279
- opacity: 0.30
280
- })]
281
- }), /*#__PURE__*/_jsxs(Group, {
282
- children: [/*#__PURE__*/_jsx(Circle, {
283
- cx: width * 0.84,
284
- cy: cloud3Y,
285
- r: 10,
286
- color: "#F0F8FF",
287
- opacity: 0.35,
288
- children: /*#__PURE__*/_jsx(Shadow, {
289
- dx: 0,
290
- dy: 1,
291
- blur: 6,
292
- color: "rgba(0,0,0,0.03)"
293
- })
294
- }), /*#__PURE__*/_jsx(Circle, {
295
- cx: width * 0.89,
296
- cy: cloud3Y - (height * 0.19 - height * 0.17),
297
- r: 12,
298
- color: "#FFFFFF",
299
- opacity: 0.40,
300
- children: /*#__PURE__*/_jsx(Shadow, {
301
- dx: 0,
302
- dy: 1,
303
- blur: 6,
304
- color: "rgba(0,0,0,0.03)"
305
- })
306
- }), /*#__PURE__*/_jsx(Circle, {
307
- cx: width * 0.93,
308
- cy: cloud3Y,
309
- r: 8,
310
- color: "#F8F8FF",
311
- opacity: 0.30,
312
- children: /*#__PURE__*/_jsx(Shadow, {
313
- dx: 0,
314
- dy: 1,
315
- blur: 6,
316
- color: "rgba(0,0,0,0.02)"
317
- })
318
- }), /*#__PURE__*/_jsx(Circle, {
319
- cx: width * 0.96,
320
- cy: cloud3Y - (height * 0.19 - height * 0.18),
321
- r: 4,
322
- color: "#F0F8FF",
323
- opacity: 0.15
324
- }), /*#__PURE__*/_jsx(Circle, {
325
- cx: width * 0.86,
326
- cy: cloud3Y + (height * 0.21 - height * 0.19),
327
- r: 3,
328
- color: "#FFFFFF",
329
- opacity: 0.20
330
- })]
331
- }), /*#__PURE__*/_jsxs(Group, {
332
- children: [/*#__PURE__*/_jsx(Circle, {
333
- cx: width * 0.45,
334
- cy: height * 0.15,
335
- r: 8,
336
- color: "#F8F8FF",
337
- opacity: 0.25,
338
- children: /*#__PURE__*/_jsx(Shadow, {
339
- dx: 0,
340
- dy: 1,
341
- blur: 4,
342
- color: "rgba(0,0,0,0.02)"
343
- })
344
- }), /*#__PURE__*/_jsx(Circle, {
345
- cx: width * 0.50,
346
- cy: height * 0.13,
347
- r: 10,
348
- color: "#FFFFFF",
349
- opacity: 0.30,
350
- children: /*#__PURE__*/_jsx(Shadow, {
351
- dx: 0,
352
- dy: 1,
353
- blur: 4,
354
- color: "rgba(0,0,0,0.02)"
355
- })
356
- }), /*#__PURE__*/_jsx(Circle, {
357
- cx: width * 0.54,
358
- cy: height * 0.15,
359
- r: 6,
360
- color: "#F0F8FF",
361
- opacity: 0.20,
362
- children: /*#__PURE__*/_jsx(Shadow, {
363
- dx: 0,
364
- dy: 1,
365
- blur: 4,
366
- color: "rgba(0,0,0,0.01)"
367
- })
368
- })]
369
- })]
370
- }), /*#__PURE__*/_jsx(Rect, {
371
- x: 0,
372
- y: grassStartY,
373
- width: width,
374
- height: buttonAreaHeight,
375
- children: /*#__PURE__*/_jsx(LinearGradient, {
376
- start: vec(0, grassStartY),
377
- end: vec(0, height),
378
- colors: ['#8B4513', '#A0522D', '#654321']
379
- })
380
- }), /*#__PURE__*/_jsxs(Path, {
381
- path: grassPath,
382
- children: [/*#__PURE__*/_jsx(LinearGradient, {
383
- start: vec(0, grassStartY - 20),
384
- end: vec(0, grassStartY + 20),
385
- colors: ['#32CD32', '#228B22', '#006400']
386
- }), /*#__PURE__*/_jsx(Shadow, {
387
- dx: 0,
388
- dy: -2,
389
- blur: 4,
390
- color: "rgba(0,0,0,0.2)"
391
- })]
392
- }), Array.from({
393
- length: 50
394
- }, (_, i) => {
395
- const x = width / 50 * i + Math.random() * 15;
396
- const grassHeight = 12 + Math.random() * 18;
397
- const grassType = Math.random();
398
- const bladePath = Skia.Path.Make();
399
- bladePath.moveTo(x, grassStartY);
400
- if (grassType < 0.4) {
401
- // Tall thin grass with slight curve - STATIC
402
- bladePath.quadTo(x + 1, grassStartY - grassHeight * 0.6, x + Math.random() * 2 - 1, grassStartY - grassHeight);
403
- return /*#__PURE__*/_jsx(Path, {
404
- path: bladePath,
405
- style: "stroke",
406
- strokeWidth: 1.5,
407
- color: "#16a34a",
408
- opacity: 0.8 + Math.random() * 0.2
409
- }, `grass-${i}`);
410
- } else if (grassType < 0.7) {
411
- // Medium curved grass - STATIC
412
- bladePath.quadTo(x + 2, grassStartY - grassHeight * 0.4, x + 3, grassStartY - grassHeight);
413
- return /*#__PURE__*/_jsx(Path, {
414
- path: bladePath,
415
- style: "stroke",
416
- strokeWidth: 2,
417
- color: "#15803d",
418
- opacity: 0.7 + Math.random() * 0.3
419
- }, `grass-${i}`);
420
- } else {
421
- // Short wide grass with multiple segments - STATIC
422
- const midHeight = grassHeight * 0.5;
423
- bladePath.quadTo(x + 1, grassStartY - midHeight, x + 2, grassStartY - grassHeight);
424
- return /*#__PURE__*/_jsxs(Group, {
425
- children: [/*#__PURE__*/_jsx(Path, {
426
- path: bladePath,
427
- style: "stroke",
428
- strokeWidth: 2.5,
429
- color: "#166534",
430
- opacity: 0.6 + Math.random() * 0.4
431
- }), Math.random() < 0.3 && /*#__PURE__*/_jsx(Circle, {
432
- cx: x + 2,
433
- cy: grassStartY - grassHeight,
434
- r: 0.8,
435
- color: "#22c55e",
436
- opacity: 0.8
437
- })]
438
- }, `grass-group-${i}`);
439
- }
440
- }), Array.from({
441
- length: 30
442
- }, (_, i) => {
443
- const x = Math.random() * width;
444
- const y = grassStartY - 10 + Math.random() * 20; // Position around grass line
445
- const grassClusterHeight = 8 + Math.random() * 6;
446
- const clusterPath = Skia.Path.Make();
447
- clusterPath.moveTo(x, y);
448
- clusterPath.lineTo(x + Math.random() * 2 - 1, y - grassClusterHeight);
449
- clusterPath.moveTo(x + 2, y);
450
- clusterPath.lineTo(x + 2 + Math.random() * 2 - 1, y - grassClusterHeight * 0.8);
451
- clusterPath.moveTo(x + 4, y);
452
- clusterPath.lineTo(x + 4 + Math.random() * 2 - 1, y - grassClusterHeight * 0.6);
453
- return /*#__PURE__*/_jsx(Path, {
454
- path: clusterPath,
455
- style: "stroke",
456
- strokeWidth: 1,
457
- color: "#22c55e",
458
- opacity: 0.4
459
- }, `cluster-${i}`);
460
- }), Array.from({
461
- length: 15
462
- }, (_, i) => {
463
- const x = Math.random() * width;
464
- const y = grassStartY + 20 + Math.random() * (buttonAreaHeight - 40); // Keep within button area
465
- const size = 2 + Math.random() * 3;
466
- return /*#__PURE__*/_jsx(Circle, {
467
- cx: x,
468
- cy: y,
469
- r: size,
470
- color: "#8B4513",
471
- opacity: 0.6
472
- }, i);
473
- })]
474
- }), children]
475
- });
476
- });
477
- //# sourceMappingURL=GameBackground.js.map
1
+ "use strict";import React from 'react';import{View,Dimensions}from 'react-native';import{Canvas,LinearGradient,Rect,Circle,Path,Skia,vec,Group,Shadow}from '@shopify/react-native-skia';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";const{width,height}= Dimensions.get('window');export const GameBackground = React.memo(({children,offset = 0})=>{const sunY = height * 0.15 + offset * 0.9;const cloud1Y = height * 0.24 + offset * 0.8;const cloud2Y = height * 0.27 + offset * 0.8;const cloud3Y = height * 0.19 + offset * 0.8;const buttonAreaHeight = offset > 0 ? 150:250;const grassStartY = height - buttonAreaHeight;const createGrassPath =(startX,segments = 8)=>{const path = Skia.Path.Make();const segmentWidth = width / segments;path.moveTo(startX,grassStartY);for(let i = 0;i < segments;i++){const x = startX + i * segmentWidth;const y = grassStartY + Math.sin(i * 0.5)* 8;const controlX = x + segmentWidth / 2;const controlY = y + Math.cos(i * 0.3)* 6;path.quadTo(controlX,controlY,x + segmentWidth,y);}path.lineTo(width,height);path.lineTo(startX,height);path.close();return path;};const grassPath = createGrassPath(0);return _jsxs(View,{style:{flex:1},children:[_jsxs(Canvas,{style:{position:'absolute',width,height},children:[_jsx(Rect,{x:0,y:0,width:width,height:grassStartY,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(0,grassStartY),colors:['#87CEEB','#98D8E8','#B0E0E6']})}),_jsxs(Group,{children:[_jsxs(Circle,{cx:width * 0.8,cy:sunY,r:40,children:[_jsx(LinearGradient,{start:vec(-40,-40),end:vec(40,40),colors:['#FFFF99','#FFD700','#FFA500','#FF8C00']}),_jsx(Shadow,{dx:0,dy:0,blur:30,color:"#FFD700"})]}),_jsx(Circle,{cx:width * 0.8 - 8,cy:sunY - 8,r:15,children:_jsx(LinearGradient,{start:vec(-15,-15),end:vec(15,15),colors:['#FFFFFF','#FFFF99']})}),Array.from({length:16},(_,index)=>{const angle = 360 / 16 * index;const radian = angle * Math.PI / 180;const isLongRay = index % 2 === 0;const rayLength = isLongRay ? 25:15;const rayWidth = isLongRay ? 4:2;const startDistance = 45;const startX = width * 0.8 + Math.cos(radian)* startDistance;const startY = sunY + Math.sin(radian)* startDistance;const endX = width * 0.8 + Math.cos(radian)*(startDistance + rayLength);const endY = sunY + Math.sin(radian)*(startDistance + rayLength);const rayPath = Skia.Path.Make();rayPath.moveTo(startX,startY);rayPath.lineTo(endX,endY);return _jsx(Path,{path:rayPath,style:"stroke",strokeWidth:rayWidth,color:"#FFD700",opacity:0.7},index);}),_jsx(Circle,{cx:width * 0.8,cy:sunY,r:60,opacity:0.1,children:_jsx(LinearGradient,{start:vec(-60,-60),end:vec(60,60),colors:['#FFD700','transparent']})})]}),_jsxs(Group,{children:[_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.12,cy:cloud1Y,r:16,color:"#F0F8FF",opacity:0.35,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.18,cy:cloud1Y -(height * 0.24 - height * 0.21),r:22,color:"#FFFFFF",opacity:0.45,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.25,cy:cloud1Y -(height * 0.24 - height * 0.19),r:26,color:"#F8F8FF",opacity:0.55,children:_jsx(Shadow,{dx:2,dy:3,blur:12,color:"rgba(0,0,0,0.06)"})}),_jsx(Circle,{cx:width * 0.32,cy:cloud1Y -(height * 0.24 - height * 0.21),r:20,color:"#FFFFFF",opacity:0.50,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.37,cy:cloud1Y,r:14,color:"#F0F8FF",opacity:0.40,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.04)"})}),_jsx(Circle,{cx:width * 0.15,cy:cloud1Y +(height * 0.26 - height * 0.24),r:8,color:"#F8F8FF",opacity:0.25}),_jsx(Circle,{cx:width * 0.35,cy:cloud1Y -(height * 0.24 - height * 0.18),r:6,color:"#FFFFFF",opacity:0.30}),_jsx(Circle,{cx:width * 0.40,cy:cloud1Y -(height * 0.24 - height * 0.22),r:5,color:"#F0F8FF",opacity:0.20}),_jsx(Circle,{cx:width * 0.22,cy:cloud1Y -(height * 0.24 - height * 0.18),r:7,color:"#FFFFFF",opacity:0.35}),_jsx(Circle,{cx:width * 0.28,cy:cloud1Y -(height * 0.24 - height * 0.20),r:5,color:"#FFFFFF",opacity:0.25})]}),_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.62,cy:cloud2Y,r:15,color:"#F0F8FF",opacity:0.40,children:_jsx(Shadow,{dx:1,dy:2,blur:10,color:"rgba(0,0,0,0.04)"})}),_jsx(Circle,{cx:width * 0.69,cy:cloud2Y -(height * 0.27 - height * 0.24),r:19,color:"#FFFFFF",opacity:0.50,children:_jsx(Shadow,{dx:1,dy:2,blur:10,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.76,cy:cloud2Y -(height * 0.27 - height * 0.26),r:13,color:"#F8F8FF",opacity:0.45,children:_jsx(Shadow,{dx:1,dy:2,blur:10,color:"rgba(0,0,0,0.04)"})}),_jsx(Circle,{cx:width * 0.81,cy:cloud2Y +(height * 0.28 - height * 0.27),r:9,color:"#F0F8FF",opacity:0.35,children:_jsx(Shadow,{dx:1,dy:1,blur:8,color:"rgba(0,0,0,0.03)"})}),_jsx(Circle,{cx:width * 0.65,cy:cloud2Y +(height * 0.29 - height * 0.27),r:6,color:"#F8F8FF",opacity:0.20}),_jsx(Circle,{cx:width * 0.78,cy:cloud2Y -(height * 0.27 - height * 0.23),r:4,color:"#FFFFFF",opacity:0.25}),_jsx(Circle,{cx:width * 0.67,cy:cloud2Y -(height * 0.27 - height * 0.23),r:5,color:"#FFFFFF",opacity:0.30})]}),_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.84,cy:cloud3Y,r:10,color:"#F0F8FF",opacity:0.35,children:_jsx(Shadow,{dx:0,dy:1,blur:6,color:"rgba(0,0,0,0.03)"})}),_jsx(Circle,{cx:width * 0.89,cy:cloud3Y -(height * 0.19 - height * 0.17),r:12,color:"#FFFFFF",opacity:0.40,children:_jsx(Shadow,{dx:0,dy:1,blur:6,color:"rgba(0,0,0,0.03)"})}),_jsx(Circle,{cx:width * 0.93,cy:cloud3Y,r:8,color:"#F8F8FF",opacity:0.30,children:_jsx(Shadow,{dx:0,dy:1,blur:6,color:"rgba(0,0,0,0.02)"})}),_jsx(Circle,{cx:width * 0.96,cy:cloud3Y -(height * 0.19 - height * 0.18),r:4,color:"#F0F8FF",opacity:0.15}),_jsx(Circle,{cx:width * 0.86,cy:cloud3Y +(height * 0.21 - height * 0.19),r:3,color:"#FFFFFF",opacity:0.20})]}),_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.45,cy:height * 0.15,r:8,color:"#F8F8FF",opacity:0.25,children:_jsx(Shadow,{dx:0,dy:1,blur:4,color:"rgba(0,0,0,0.02)"})}),_jsx(Circle,{cx:width * 0.50,cy:height * 0.13,r:10,color:"#FFFFFF",opacity:0.30,children:_jsx(Shadow,{dx:0,dy:1,blur:4,color:"rgba(0,0,0,0.02)"})}),_jsx(Circle,{cx:width * 0.54,cy:height * 0.15,r:6,color:"#F0F8FF",opacity:0.20,children:_jsx(Shadow,{dx:0,dy:1,blur:4,color:"rgba(0,0,0,0.01)"})})]})]}),_jsx(Rect,{x:0,y:grassStartY,width:width,height:buttonAreaHeight,children:_jsx(LinearGradient,{start:vec(0,grassStartY),end:vec(0,height),colors:['#8B4513','#A0522D','#654321']})}),_jsxs(Path,{path:grassPath,children:[_jsx(LinearGradient,{start:vec(0,grassStartY - 20),end:vec(0,grassStartY + 20),colors:['#32CD32','#228B22','#006400']}),_jsx(Shadow,{dx:0,dy:-2,blur:4,color:"rgba(0,0,0,0.2)"})]}),Array.from({length:50},(_,i)=>{const x = width / 50 * i + Math.random()* 15;const grassHeight = 12 + Math.random()* 18;const grassType = Math.random();const bladePath = Skia.Path.Make();bladePath.moveTo(x,grassStartY);if(grassType < 0.4){bladePath.quadTo(x + 1,grassStartY - grassHeight * 0.6,x + Math.random()* 2 - 1,grassStartY - grassHeight);return _jsx(Path,{path:bladePath,style:"stroke",strokeWidth:1.5,color:"#16a34a",opacity:0.8 + Math.random()* 0.2},`grass-${i}`);}else if(grassType < 0.7){bladePath.quadTo(x + 2,grassStartY - grassHeight * 0.4,x + 3,grassStartY - grassHeight);return _jsx(Path,{path:bladePath,style:"stroke",strokeWidth:2,color:"#15803d",opacity:0.7 + Math.random()* 0.3},`grass-${i}`);}else{const midHeight = grassHeight * 0.5;bladePath.quadTo(x + 1,grassStartY - midHeight,x + 2,grassStartY - grassHeight);return _jsxs(Group,{children:[_jsx(Path,{path:bladePath,style:"stroke",strokeWidth:2.5,color:"#166534",opacity:0.6 + Math.random()* 0.4}),Math.random()< 0.3 && _jsx(Circle,{cx:x + 2,cy:grassStartY - grassHeight,r:0.8,color:"#22c55e",opacity:0.8})]},`grass-group-${i}`);}}),Array.from({length:30},(_,i)=>{const x = Math.random()* width;const y = grassStartY - 10 + Math.random()* 20;const grassClusterHeight = 8 + Math.random()* 6;const clusterPath = Skia.Path.Make();clusterPath.moveTo(x,y);clusterPath.lineTo(x + Math.random()* 2 - 1,y - grassClusterHeight);clusterPath.moveTo(x + 2,y);clusterPath.lineTo(x + 2 + Math.random()* 2 - 1,y - grassClusterHeight * 0.8);clusterPath.moveTo(x + 4,y);clusterPath.lineTo(x + 4 + Math.random()* 2 - 1,y - grassClusterHeight * 0.6);return _jsx(Path,{path:clusterPath,style:"stroke",strokeWidth:1,color:"#22c55e",opacity:0.4},`cluster-${i}`);}),Array.from({length:15},(_,i)=>{const x = Math.random()* width;const y = grassStartY + 20 + Math.random()*(buttonAreaHeight - 40);const size = 2 + Math.random()* 3;return _jsx(Circle,{cx:x,cy:y,r:size,color:"#8B4513",opacity:0.6},i);})]}),children]});});