@nayan-ui/games 1.18.0 → 1.20.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 (1808) hide show
  1. package/README.md +53 -191
  2. package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
  3. package/lib/module/assets/models/explorer/explorer.glb +0 -0
  4. package/lib/module/assets/models/explorer/params.json +51 -0
  5. package/lib/module/assets/models/explorer/source.json +222 -0
  6. package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
  7. package/lib/module/assets/models/play-with-tua/sources.json +141 -0
  8. package/lib/module/assets/sfx/balloon_pop.wav +0 -0
  9. package/lib/module/assets/sfx/blocked.wav +0 -0
  10. package/lib/module/assets/sfx/boing.wav +0 -0
  11. package/lib/module/assets/sfx/bonus.wav +0 -0
  12. package/lib/module/assets/sfx/boom.wav +0 -0
  13. package/lib/module/assets/sfx/bump.wav +0 -0
  14. package/lib/module/assets/sfx/cannon.wav +0 -0
  15. package/lib/module/assets/sfx/capture.wav +0 -0
  16. package/lib/module/assets/sfx/card_flip.wav +0 -0
  17. package/lib/module/assets/sfx/card_place.wav +0 -0
  18. package/lib/module/assets/sfx/catch.wav +0 -0
  19. package/lib/module/assets/sfx/chime.wav +0 -0
  20. package/lib/module/assets/sfx/chomp.wav +0 -0
  21. package/lib/module/assets/sfx/chomp_alt.wav +0 -0
  22. package/lib/module/assets/sfx/clack.wav +0 -0
  23. package/lib/module/assets/sfx/clang.wav +0 -0
  24. package/lib/module/assets/sfx/clash.wav +0 -0
  25. package/lib/module/assets/sfx/click.wav +0 -0
  26. package/lib/module/assets/sfx/coin.wav +0 -0
  27. package/lib/module/assets/sfx/combo.wav +0 -0
  28. package/lib/module/assets/sfx/crash.wav +0 -0
  29. package/lib/module/assets/sfx/crunch.wav +0 -0
  30. package/lib/module/assets/sfx/dance.wav +0 -0
  31. package/lib/module/assets/sfx/deselect.wav +0 -0
  32. package/lib/module/assets/sfx/dice_roll.wav +0 -0
  33. package/lib/module/assets/sfx/die.wav +0 -0
  34. package/lib/module/assets/sfx/draw.wav +0 -0
  35. package/lib/module/assets/sfx/drop.wav +0 -0
  36. package/lib/module/assets/sfx/eat.wav +0 -0
  37. package/lib/module/assets/sfx/engine.wav +0 -0
  38. package/lib/module/assets/sfx/error.wav +0 -0
  39. package/lib/module/assets/sfx/flag.wav +0 -0
  40. package/lib/module/assets/sfx/flap.wav +0 -0
  41. package/lib/module/assets/sfx/flip_disc.wav +0 -0
  42. package/lib/module/assets/sfx/footstep_run.wav +0 -0
  43. package/lib/module/assets/sfx/footstep_walk.wav +0 -0
  44. package/lib/module/assets/sfx/game_over.wav +0 -0
  45. package/lib/module/assets/sfx/gate.wav +0 -0
  46. package/lib/module/assets/sfx/hit.wav +0 -0
  47. package/lib/module/assets/sfx/hop.wav +0 -0
  48. package/lib/module/assets/sfx/hurt.wav +0 -0
  49. package/lib/module/assets/sfx/invalid.wav +0 -0
  50. package/lib/module/assets/sfx/jump.wav +0 -0
  51. package/lib/module/assets/sfx/ladder.wav +0 -0
  52. package/lib/module/assets/sfx/land.wav +0 -0
  53. package/lib/module/assets/sfx/laugh.wav +0 -0
  54. package/lib/module/assets/sfx/lose.wav +0 -0
  55. package/lib/module/assets/sfx/merge.wav +0 -0
  56. package/lib/module/assets/sfx/miss.wav +0 -0
  57. package/lib/module/assets/sfx/nitro.wav +0 -0
  58. package/lib/module/assets/sfx/pew.wav +0 -0
  59. package/lib/module/assets/sfx/place.wav +0 -0
  60. package/lib/module/assets/sfx/pling.wav +0 -0
  61. package/lib/module/assets/sfx/point.wav +0 -0
  62. package/lib/module/assets/sfx/pop.wav +0 -0
  63. package/lib/module/assets/sfx/pop_soft.wav +0 -0
  64. package/lib/module/assets/sfx/power_up.wav +0 -0
  65. package/lib/module/assets/sfx/reveal.wav +0 -0
  66. package/lib/module/assets/sfx/robot.wav +0 -0
  67. package/lib/module/assets/sfx/rotate.wav +0 -0
  68. package/lib/module/assets/sfx/run_steps.wav +0 -0
  69. package/lib/module/assets/sfx/select.wav +0 -0
  70. package/lib/module/assets/sfx/shuffle.wav +0 -0
  71. package/lib/module/assets/sfx/six.wav +0 -0
  72. package/lib/module/assets/sfx/slice.wav +0 -0
  73. package/lib/module/assets/sfx/slide.wav +0 -0
  74. package/lib/module/assets/sfx/snake.wav +0 -0
  75. package/lib/module/assets/sfx/snap.wav +0 -0
  76. package/lib/module/assets/sfx/splash.wav +0 -0
  77. package/lib/module/assets/sfx/star.wav +0 -0
  78. package/lib/module/assets/sfx/start.wav +0 -0
  79. package/lib/module/assets/sfx/swoosh.wav +0 -0
  80. package/lib/module/assets/sfx/tap.wav +0 -0
  81. package/lib/module/assets/sfx/thud.wav +0 -0
  82. package/lib/module/assets/sfx/thunk.wav +0 -0
  83. package/lib/module/assets/sfx/tick.wav +0 -0
  84. package/lib/module/assets/sfx/time_up.wav +0 -0
  85. package/lib/module/assets/sfx/tock.wav +0 -0
  86. package/lib/module/assets/sfx/walk_steps.wav +0 -0
  87. package/lib/module/assets/sfx/warning.wav +0 -0
  88. package/lib/module/assets/sfx/whack.wav +0 -0
  89. package/lib/module/assets/sfx/whoosh.wav +0 -0
  90. package/lib/module/assets/sfx/win.wav +0 -0
  91. package/lib/module/assets/sfx/zap.wav +0 -0
  92. package/lib/module/assets/textures/ad_bolt.png +0 -0
  93. package/lib/module/assets/textures/ad_bubbles.png +0 -0
  94. package/lib/module/assets/textures/ad_chevrons.png +0 -0
  95. package/lib/module/assets/textures/asphalt.png +0 -0
  96. package/lib/module/assets/textures/bark.jpg +0 -0
  97. package/lib/module/assets/textures/explorer-atlas.png +0 -0
  98. package/lib/module/assets/textures/facade.png +0 -0
  99. package/lib/module/assets/textures/grass.png +0 -0
  100. package/lib/module/assets/textures/leaves.png +0 -0
  101. package/lib/module/assets/textures/limestone.jpg +0 -0
  102. package/lib/module/assets/textures/meadow.jpg +0 -0
  103. package/lib/module/assets/textures/nature-sources.json +87 -0
  104. package/lib/module/assets/textures/pine.png +0 -0
  105. package/lib/module/assets/textures/river.jpg +0 -0
  106. package/lib/module/assets/textures/soft_glow.png +0 -0
  107. package/lib/module/games/arrows/Arrows.js +1 -1
  108. package/lib/module/games/arrows/ArrowsConstants.js +1 -1
  109. package/lib/module/games/arrows/ArrowsGame.js +1 -0
  110. package/lib/module/games/arrows/ArrowsScene.js +1 -0
  111. package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
  112. package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
  113. package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
  114. package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
  115. package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
  116. package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
  117. package/lib/module/games/bike-racing/BikeRacing.js +1 -1
  118. package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
  119. package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
  120. package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
  121. package/lib/module/games/block-blast/BlockBlast.js +1 -1
  122. package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
  123. package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
  124. package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
  125. package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
  126. package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
  127. package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
  128. package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
  129. package/lib/module/games/bluk/Bluk.js +1 -1
  130. package/lib/module/games/bluk/BlukConstants.js +1 -1
  131. package/lib/module/games/bluk/BlukGame.js +1 -0
  132. package/lib/module/games/bluk/BlukRules.js +1 -0
  133. package/lib/module/games/bluk/BlukScene.js +1 -0
  134. package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
  135. package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
  136. package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
  137. package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
  138. package/lib/module/games/candy-crush/CandyCrush.js +1 -1
  139. package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
  140. package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
  141. package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
  142. package/lib/module/games/car-racing/CarMeshes.js +1 -0
  143. package/lib/module/games/car-racing/CarRacing.js +1 -1
  144. package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
  145. package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
  146. package/lib/module/games/car-racing/CarRacingGame.js +1 -0
  147. package/lib/module/games/car-racing/CarRacingScene.js +1 -0
  148. package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
  149. package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
  150. package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
  151. package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
  152. package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
  153. package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
  154. package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
  155. package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
  156. package/lib/module/games/checkers/Checkers.js +1 -1
  157. package/lib/module/games/checkers/CheckersAI.js +1 -0
  158. package/lib/module/games/checkers/CheckersConstants.js +1 -1
  159. package/lib/module/games/checkers/CheckersGame.js +1 -0
  160. package/lib/module/games/checkers/CheckersRules.js +1 -0
  161. package/lib/module/games/checkers/CheckersScene.js +1 -0
  162. package/lib/module/games/color-switch/ColorSwitch.js +1 -1
  163. package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
  164. package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
  165. package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
  166. package/lib/module/games/colors-sort/ColorsSort.js +1 -1
  167. package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
  168. package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
  169. package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
  170. package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
  171. package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
  172. package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
  173. package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
  174. package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
  175. package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
  176. package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
  177. package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
  178. package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
  179. package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
  180. package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
  181. package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
  182. package/lib/module/games/dino-jump/DinoJump.js +1 -1
  183. package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
  184. package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
  185. package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
  186. package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
  187. package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
  188. package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
  189. package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
  190. package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
  191. package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
  192. package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
  193. package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
  194. package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
  195. package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
  196. package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
  197. package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
  198. package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
  199. package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
  200. package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
  201. package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
  202. package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
  203. package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
  204. package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
  205. package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
  206. package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
  207. package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
  208. package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
  209. package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
  210. package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
  211. package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
  212. package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
  213. package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
  214. package/lib/module/games/game-2048/Game2048.js +1 -1
  215. package/lib/module/games/game-2048/Game2048Constants.js +1 -1
  216. package/lib/module/games/game-2048/Game2048Game.js +1 -0
  217. package/lib/module/games/game-2048/Game2048Rules.js +1 -0
  218. package/lib/module/games/game-2048/Game2048Scene.js +1 -0
  219. package/lib/module/games/knife-hit/KnifeHit.js +1 -1
  220. package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
  221. package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
  222. package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
  223. package/lib/module/games/ludo-king/LudoKing.js +1 -1
  224. package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
  225. package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
  226. package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
  227. package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
  228. package/lib/module/games/maze-runner/MazeRunner.js +1 -1
  229. package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
  230. package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
  231. package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
  232. package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
  233. package/lib/module/games/memory-match/MemoryMatch.js +1 -1
  234. package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
  235. package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
  236. package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
  237. package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
  238. package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
  239. package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
  240. package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
  241. package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
  242. package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
  243. package/lib/module/games/mob-control/MobControl.js +1 -1
  244. package/lib/module/games/mob-control/MobControlConstants.js +1 -1
  245. package/lib/module/games/mob-control/MobControlGame.js +1 -0
  246. package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
  247. package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
  248. package/lib/module/games/mob-control/MobControlRules.js +1 -0
  249. package/lib/module/games/mob-control/MobControlScene.js +1 -0
  250. package/lib/module/games/number-search/NumberSearch.js +1 -1
  251. package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
  252. package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
  253. package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
  254. package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
  255. package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
  256. package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
  257. package/lib/module/games/pac-man/PacMan.js +1 -1
  258. package/lib/module/games/pac-man/PacManConstants.js +1 -1
  259. package/lib/module/games/pac-man/PacManGame.js +1 -0
  260. package/lib/module/games/pac-man/PacManRules.js +1 -0
  261. package/lib/module/games/pac-man/PacManScene.js +1 -0
  262. package/lib/module/games/paper-io/PaperIo.js +1 -1
  263. package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
  264. package/lib/module/games/paper-io/PaperIoGame.js +1 -0
  265. package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
  266. package/lib/module/games/paper-io/PaperIoRules.js +1 -0
  267. package/lib/module/games/paper-io/PaperIoScene.js +1 -0
  268. package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
  269. package/lib/module/games/penguin-run/PenguinModel.js +1 -0
  270. package/lib/module/games/penguin-run/PenguinRun.js +1 -0
  271. package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
  272. package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
  273. package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
  274. package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
  275. package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
  276. package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
  277. package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
  278. package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
  279. package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
  280. package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
  281. package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
  282. package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
  283. package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
  284. package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
  285. package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
  286. package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
  287. package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
  288. package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
  289. package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
  290. package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
  291. package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
  292. package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
  293. package/lib/module/games/reversi/Reversi.js +1 -1
  294. package/lib/module/games/reversi/ReversiConstants.js +1 -1
  295. package/lib/module/games/reversi/ReversiGame.js +1 -0
  296. package/lib/module/games/reversi/ReversiRules.js +1 -0
  297. package/lib/module/games/reversi/ReversiScene.js +1 -0
  298. package/lib/module/games/search-grid/SearchGrid.js +1 -0
  299. package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
  300. package/lib/module/games/search-grid/SearchGridGame.js +1 -0
  301. package/lib/module/games/search-grid/SearchGridScene.js +1 -0
  302. package/lib/module/games/shared/BackdropCard.js +1 -0
  303. package/lib/module/games/shared/EngineBackdrop.js +1 -0
  304. package/lib/module/games/shared/EngineBlasts.js +1 -0
  305. package/lib/module/games/shared/EngineBlocks.js +1 -0
  306. package/lib/module/games/shared/EngineControlText.js +1 -0
  307. package/lib/module/games/shared/EngineDice.js +1 -0
  308. package/lib/module/games/shared/EngineFootprint.js +1 -0
  309. package/lib/module/games/shared/EngineFruits.js +1 -0
  310. package/lib/module/games/shared/EngineGameLoader.js +1 -0
  311. package/lib/module/games/shared/EngineGameScreen.js +1 -0
  312. package/lib/module/games/shared/EngineGameWidth.js +1 -0
  313. package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
  314. package/lib/module/games/shared/EngineGlyphs.js +1 -0
  315. package/lib/module/games/shared/EngineHud.js +1 -0
  316. package/lib/module/games/shared/EngineLoading.js +1 -0
  317. package/lib/module/games/shared/EngineMeadow.js +1 -0
  318. package/lib/module/games/shared/EngineMeshCache.js +1 -0
  319. package/lib/module/games/shared/EngineMeshes.js +1 -0
  320. package/lib/module/games/shared/EngineRacingChase.js +1 -0
  321. package/lib/module/games/shared/EngineRacingHandling.js +1 -0
  322. package/lib/module/games/shared/EngineReadyContext.js +1 -0
  323. package/lib/module/games/shared/EngineTilt.js +1 -0
  324. package/lib/module/games/shared/EngineTouchSurface.js +1 -0
  325. package/lib/module/games/shared/EngineUtils.js +1 -0
  326. package/lib/module/games/shared/GameActivity.js +1 -0
  327. package/lib/module/games/shared/GameLoading.js +1 -0
  328. package/lib/module/games/shared/GameLoadingTransition.js +1 -0
  329. package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
  330. package/lib/module/games/shared/useEngineGame.js +1 -0
  331. package/lib/module/games/shared/useGameResource.js +1 -0
  332. package/lib/module/games/shared/useLiveState.js +1 -0
  333. package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
  334. package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
  335. package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
  336. package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
  337. package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
  338. package/lib/module/games/snake-3d/Snake3D.js +1 -1
  339. package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
  340. package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
  341. package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
  342. package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
  343. package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
  344. package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
  345. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
  346. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
  347. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
  348. package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
  349. package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
  350. package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
  351. package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
  352. package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
  353. package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
  354. package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
  355. package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
  356. package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
  357. package/lib/module/games/stack-tower/StackTower.js +1 -1
  358. package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
  359. package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
  360. package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
  361. package/lib/module/games/sudoku/Sudoku.js +1 -1
  362. package/lib/module/games/sudoku/SudokuConstants.js +1 -1
  363. package/lib/module/games/sudoku/SudokuGame.js +1 -0
  364. package/lib/module/games/sudoku/SudokuRules.js +1 -0
  365. package/lib/module/games/sudoku/SudokuScene.js +1 -0
  366. package/lib/module/games/tangram/Tangram.js +1 -1
  367. package/lib/module/games/tangram/TangramConstants.js +1 -1
  368. package/lib/module/games/tangram/TangramGame.js +1 -0
  369. package/lib/module/games/tangram/TangramRules.js +1 -0
  370. package/lib/module/games/tangram/TangramScene.js +1 -0
  371. package/lib/module/games/tank-1990/Tank1990.js +1 -1
  372. package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
  373. package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
  374. package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
  375. package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
  376. package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
  377. package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
  378. package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
  379. package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
  380. package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
  381. package/lib/module/games/tile-home/TileHome.js +1 -1
  382. package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
  383. package/lib/module/games/tile-home/TileHomeGame.js +1 -0
  384. package/lib/module/games/tile-home/TileHomeScene.js +1 -0
  385. package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
  386. package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
  387. package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
  388. package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
  389. package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
  390. package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
  391. package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
  392. package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
  393. package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
  394. package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
  395. package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
  396. package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
  397. package/lib/module/games/word-search/WordSearch.js +1 -1
  398. package/lib/module/games/word-search/WordSearchWords.js +1 -0
  399. package/lib/module/helpers/GamePatternData.js +1 -0
  400. package/lib/module/helpers/GameSettingsModal.js +1 -1
  401. package/lib/module/helpers/GameTheme.js +1 -0
  402. package/lib/module/helpers/IconPaths.js +1 -0
  403. package/lib/module/helpers/index.js +1 -1
  404. package/lib/module/index.js +1 -1
  405. package/lib/module/services/GameAssetLoader.js +1 -0
  406. package/lib/module/services/GameAssets.js +1 -0
  407. package/lib/module/services/GameLoaders.js +1 -0
  408. package/lib/module/services/GamesConstants.js +1 -1
  409. package/lib/module/services/GamesMetadata.js +1 -1
  410. package/lib/module/services/GamesService.js +1 -1
  411. package/lib/module/services/HapticsService.js +1 -1
  412. package/lib/module/services/ScoringService.js +1 -1
  413. package/lib/module/services/SfxSources.js +1 -0
  414. package/lib/module/services/SoundsService.js +1 -1
  415. package/lib/module/services/ThemeService.js +1 -0
  416. package/lib/module/services/UtilsService.js +1 -1
  417. package/lib/module/services/index.js +1 -1
  418. package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
  419. package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
  420. package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
  421. package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
  422. package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
  423. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
  424. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
  425. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
  426. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
  427. package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
  428. package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
  429. package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
  430. package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
  431. package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
  432. package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
  433. package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
  434. package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
  435. package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
  436. package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
  437. package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
  438. package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
  439. package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
  440. package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
  441. package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
  442. package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
  443. package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
  444. package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
  445. package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
  446. package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
  447. package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
  448. package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
  449. package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
  450. package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
  451. package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
  452. package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
  453. package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
  454. package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
  455. package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
  456. package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
  457. package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
  458. package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
  459. package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
  460. package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
  461. package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
  462. package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
  463. package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
  464. package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
  465. package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
  466. package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
  467. package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
  468. package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
  469. package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
  470. package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
  471. package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
  472. package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
  473. package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
  474. package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
  475. package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
  476. package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
  477. package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
  478. package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
  479. package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
  480. package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
  481. package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
  482. package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
  483. package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
  484. package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
  485. package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
  486. package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
  487. package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
  488. package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
  489. package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
  490. package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
  491. package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
  492. package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
  493. package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
  494. package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
  495. package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
  496. package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
  497. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
  498. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
  499. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
  500. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
  501. package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
  502. package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
  503. package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
  504. package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
  505. package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
  506. package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
  507. package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
  508. package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
  509. package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
  510. package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
  511. package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
  512. package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
  513. package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
  514. package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
  515. package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
  516. package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
  517. package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
  518. package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
  519. package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
  520. package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
  521. package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
  522. package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
  523. package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
  524. package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
  525. package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
  526. package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
  527. package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
  528. package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
  529. package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
  530. package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
  531. package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
  532. package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
  533. package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
  534. package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
  535. package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
  536. package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
  537. package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
  538. package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
  539. package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
  540. package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
  541. package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
  542. package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
  543. package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
  544. package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
  545. package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
  546. package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
  547. package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
  548. package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
  549. package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
  550. package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
  551. package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
  552. package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
  553. package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
  554. package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
  555. package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
  556. package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
  557. package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
  558. package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
  559. package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
  560. package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
  561. package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
  562. package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
  563. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
  564. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
  565. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
  566. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
  567. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
  568. package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
  569. package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
  570. package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
  571. package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
  572. package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
  573. package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
  574. package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
  575. package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
  576. package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
  577. package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
  578. package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
  579. package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
  580. package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
  581. package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
  582. package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
  583. package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
  584. package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
  585. package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
  586. package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
  587. package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
  588. package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
  589. package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
  590. package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
  591. package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
  592. package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
  593. package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
  594. package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
  595. package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
  596. package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
  597. package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
  598. package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
  599. package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
  600. package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
  601. package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
  602. package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
  603. package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
  604. package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
  605. package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
  606. package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
  607. package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
  608. package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
  609. package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
  610. package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
  611. package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
  612. package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
  613. package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
  614. package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
  615. package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
  616. package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
  617. package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
  618. package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
  619. package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
  620. package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
  621. package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
  622. package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
  623. package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
  624. package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
  625. package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
  626. package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
  627. package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
  628. package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
  629. package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
  630. package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
  631. package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
  632. package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
  633. package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
  634. package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
  635. package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
  636. package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
  637. package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
  638. package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
  639. package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
  640. package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
  641. package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
  642. package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
  643. package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
  644. package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
  645. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
  646. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
  647. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
  648. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
  649. package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
  650. package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
  651. package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
  652. package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
  653. package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
  654. package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
  655. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
  656. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
  657. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
  658. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
  659. package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
  660. package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
  661. package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
  662. package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
  663. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
  664. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
  665. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
  666. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
  667. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
  668. package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
  669. package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
  670. package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
  671. package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
  672. package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
  673. package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
  674. package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
  675. package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
  676. package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
  677. package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
  678. package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
  679. package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
  680. package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
  681. package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
  682. package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
  683. package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
  684. package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
  685. package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
  686. package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
  687. package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
  688. package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
  689. package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
  690. package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
  691. package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
  692. package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
  693. package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
  694. package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
  695. package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
  696. package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
  697. package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
  698. package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
  699. package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
  700. package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
  701. package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
  702. package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
  703. package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
  704. package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
  705. package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
  706. package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
  707. package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
  708. package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
  709. package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
  710. package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
  711. package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
  712. package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
  713. package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
  714. package/lib/typescript/src/helpers/index.d.ts +1 -19
  715. package/lib/typescript/src/index.d.ts +3 -0
  716. package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
  717. package/lib/typescript/src/services/GameAssets.d.ts +11 -0
  718. package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
  719. package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
  720. package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
  721. package/lib/typescript/src/services/HapticsService.d.ts +1 -1
  722. package/lib/typescript/src/services/SfxSources.d.ts +79 -0
  723. package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
  724. package/lib/typescript/src/services/ThemeService.d.ts +117 -0
  725. package/lib/typescript/src/services/UtilsService.d.ts +20 -2
  726. package/lib/typescript/src/services/index.d.ts +3 -0
  727. package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
  728. package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
  729. package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
  730. package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
  731. package/lib/web/assets/0376bda32be3-robot.wav +0 -0
  732. package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
  733. package/lib/web/assets/0b21278bffba-boing.wav +0 -0
  734. package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
  735. package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
  736. package/lib/web/assets/177f00502e08-bonus.wav +0 -0
  737. package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
  738. package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
  739. package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
  740. package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
  741. package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
  742. package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
  743. package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
  744. package/lib/web/assets/2699065037ad-select.wav +0 -0
  745. package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
  746. package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
  747. package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
  748. package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
  749. package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
  750. package/lib/web/assets/336d63b739b5-combo.wav +0 -0
  751. package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
  752. package/lib/web/assets/3a816e20212f-capture.wav +0 -0
  753. package/lib/web/assets/40240217810a-nitro.wav +0 -0
  754. package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
  755. package/lib/web/assets/501994226995-coin.wav +0 -0
  756. package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
  757. package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
  758. package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
  759. package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
  760. package/lib/web/assets/6da3b101926d-merge.wav +0 -0
  761. package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
  762. package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
  763. package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
  764. package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
  765. package/lib/web/assets/7506e3efe264-catch.wav +0 -0
  766. package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
  767. package/lib/web/assets/793abe620201-card_place.wav +0 -0
  768. package/lib/web/assets/7da09c57f52d-facade.png +0 -0
  769. package/lib/web/assets/7e1a902176f6-pine.png +0 -0
  770. package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
  771. package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
  772. package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
  773. package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
  774. package/lib/web/assets/854b31683cb2-draw.wav +0 -0
  775. package/lib/web/assets/8616150393b7-error.wav +0 -0
  776. package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
  777. package/lib/web/assets/88755845922c-hop.wav +0 -0
  778. package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
  779. package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
  780. package/lib/web/assets/9210a24472d1-place.wav +0 -0
  781. package/lib/web/assets/930d833ebf89-splash.wav +0 -0
  782. package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
  783. package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
  784. package/lib/web/assets/9ab04403898b-clang.wav +0 -0
  785. package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
  786. package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
  787. package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
  788. package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
  789. package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
  790. package/lib/web/assets/a76940a48c68-hit.wav +0 -0
  791. package/lib/web/assets/a98ddb724460-leaves.png +0 -0
  792. package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
  793. package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
  794. package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
  795. package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
  796. package/lib/web/assets/ab37cd128509-click.wav +0 -0
  797. package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
  798. package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
  799. package/lib/web/assets/b3894545cf71-slice.wav +0 -0
  800. package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
  801. package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
  802. package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
  803. package/lib/web/assets/baff6feda846-lose.wav +0 -0
  804. package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
  805. package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
  806. package/lib/web/assets/c3a9edfad195-die.wav +0 -0
  807. package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
  808. package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
  809. package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
  810. package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
  811. package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
  812. package/lib/web/assets/d15591767778-tap.wav +0 -0
  813. package/lib/web/assets/d1781a52234f-slide.wav +0 -0
  814. package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
  815. package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
  816. package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
  817. package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
  818. package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
  819. package/lib/web/assets/e454e56df89a-clack.wav +0 -0
  820. package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
  821. package/lib/web/assets/ed6496b891fc-land.wav +0 -0
  822. package/lib/web/assets/f21920200a81-thunk.wav +0 -0
  823. package/lib/web/assets/f753b43be89d-whack.wav +0 -0
  824. package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
  825. package/lib/web/assets/fbe299716916-grass.png +0 -0
  826. package/lib/web/chunk-52ez2s9z.js +15 -0
  827. package/lib/web/chunk-8675t224.js +1 -0
  828. package/lib/web/index.js +2 -0
  829. package/lib/web/package.json +1 -0
  830. package/lib/web/services.js +2 -0
  831. package/package.json +94 -73
  832. package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
  833. package/src/assets/models/explorer/explorer.glb +0 -0
  834. package/src/assets/models/explorer/params.json +51 -0
  835. package/src/assets/models/explorer/source.json +222 -0
  836. package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
  837. package/src/assets/models/play-with-tua/sources.json +141 -0
  838. package/src/assets/sfx/balloon_pop.wav +0 -0
  839. package/src/assets/sfx/blocked.wav +0 -0
  840. package/src/assets/sfx/boing.wav +0 -0
  841. package/src/assets/sfx/bonus.wav +0 -0
  842. package/src/assets/sfx/boom.wav +0 -0
  843. package/src/assets/sfx/bump.wav +0 -0
  844. package/src/assets/sfx/cannon.wav +0 -0
  845. package/src/assets/sfx/capture.wav +0 -0
  846. package/src/assets/sfx/card_flip.wav +0 -0
  847. package/src/assets/sfx/card_place.wav +0 -0
  848. package/src/assets/sfx/catch.wav +0 -0
  849. package/src/assets/sfx/chime.wav +0 -0
  850. package/src/assets/sfx/chomp.wav +0 -0
  851. package/src/assets/sfx/chomp_alt.wav +0 -0
  852. package/src/assets/sfx/clack.wav +0 -0
  853. package/src/assets/sfx/clang.wav +0 -0
  854. package/src/assets/sfx/clash.wav +0 -0
  855. package/src/assets/sfx/click.wav +0 -0
  856. package/src/assets/sfx/coin.wav +0 -0
  857. package/src/assets/sfx/combo.wav +0 -0
  858. package/src/assets/sfx/crash.wav +0 -0
  859. package/src/assets/sfx/crunch.wav +0 -0
  860. package/src/assets/sfx/dance.wav +0 -0
  861. package/src/assets/sfx/deselect.wav +0 -0
  862. package/src/assets/sfx/dice_roll.wav +0 -0
  863. package/src/assets/sfx/die.wav +0 -0
  864. package/src/assets/sfx/draw.wav +0 -0
  865. package/src/assets/sfx/drop.wav +0 -0
  866. package/src/assets/sfx/eat.wav +0 -0
  867. package/src/assets/sfx/engine.wav +0 -0
  868. package/src/assets/sfx/error.wav +0 -0
  869. package/src/assets/sfx/flag.wav +0 -0
  870. package/src/assets/sfx/flap.wav +0 -0
  871. package/src/assets/sfx/flip_disc.wav +0 -0
  872. package/src/assets/sfx/footstep_run.wav +0 -0
  873. package/src/assets/sfx/footstep_walk.wav +0 -0
  874. package/src/assets/sfx/game_over.wav +0 -0
  875. package/src/assets/sfx/gate.wav +0 -0
  876. package/src/assets/sfx/hit.wav +0 -0
  877. package/src/assets/sfx/hop.wav +0 -0
  878. package/src/assets/sfx/hurt.wav +0 -0
  879. package/src/assets/sfx/invalid.wav +0 -0
  880. package/src/assets/sfx/jump.wav +0 -0
  881. package/src/assets/sfx/ladder.wav +0 -0
  882. package/src/assets/sfx/land.wav +0 -0
  883. package/src/assets/sfx/laugh.wav +0 -0
  884. package/src/assets/sfx/lose.wav +0 -0
  885. package/src/assets/sfx/merge.wav +0 -0
  886. package/src/assets/sfx/miss.wav +0 -0
  887. package/src/assets/sfx/nitro.wav +0 -0
  888. package/src/assets/sfx/pew.wav +0 -0
  889. package/src/assets/sfx/place.wav +0 -0
  890. package/src/assets/sfx/pling.wav +0 -0
  891. package/src/assets/sfx/point.wav +0 -0
  892. package/src/assets/sfx/pop.wav +0 -0
  893. package/src/assets/sfx/pop_soft.wav +0 -0
  894. package/src/assets/sfx/power_up.wav +0 -0
  895. package/src/assets/sfx/reveal.wav +0 -0
  896. package/src/assets/sfx/robot.wav +0 -0
  897. package/src/assets/sfx/rotate.wav +0 -0
  898. package/src/assets/sfx/run_steps.wav +0 -0
  899. package/src/assets/sfx/select.wav +0 -0
  900. package/src/assets/sfx/shuffle.wav +0 -0
  901. package/src/assets/sfx/six.wav +0 -0
  902. package/src/assets/sfx/slice.wav +0 -0
  903. package/src/assets/sfx/slide.wav +0 -0
  904. package/src/assets/sfx/snake.wav +0 -0
  905. package/src/assets/sfx/snap.wav +0 -0
  906. package/src/assets/sfx/splash.wav +0 -0
  907. package/src/assets/sfx/star.wav +0 -0
  908. package/src/assets/sfx/start.wav +0 -0
  909. package/src/assets/sfx/swoosh.wav +0 -0
  910. package/src/assets/sfx/tap.wav +0 -0
  911. package/src/assets/sfx/thud.wav +0 -0
  912. package/src/assets/sfx/thunk.wav +0 -0
  913. package/src/assets/sfx/tick.wav +0 -0
  914. package/src/assets/sfx/time_up.wav +0 -0
  915. package/src/assets/sfx/tock.wav +0 -0
  916. package/src/assets/sfx/walk_steps.wav +0 -0
  917. package/src/assets/sfx/warning.wav +0 -0
  918. package/src/assets/sfx/whack.wav +0 -0
  919. package/src/assets/sfx/whoosh.wav +0 -0
  920. package/src/assets/sfx/win.wav +0 -0
  921. package/src/assets/sfx/zap.wav +0 -0
  922. package/src/assets/textures/ad_bolt.png +0 -0
  923. package/src/assets/textures/ad_bubbles.png +0 -0
  924. package/src/assets/textures/ad_chevrons.png +0 -0
  925. package/src/assets/textures/asphalt.png +0 -0
  926. package/src/assets/textures/bark.jpg +0 -0
  927. package/src/assets/textures/explorer-atlas.png +0 -0
  928. package/src/assets/textures/facade.png +0 -0
  929. package/src/assets/textures/grass.png +0 -0
  930. package/src/assets/textures/leaves.png +0 -0
  931. package/src/assets/textures/limestone.jpg +0 -0
  932. package/src/assets/textures/meadow.jpg +0 -0
  933. package/src/assets/textures/nature-sources.json +87 -0
  934. package/src/assets/textures/pine.png +0 -0
  935. package/src/assets/textures/river.jpg +0 -0
  936. package/src/assets/textures/soft_glow.png +0 -0
  937. package/src/games/arrows/Arrows.tsx +69 -0
  938. package/src/games/arrows/ArrowsConstants.ts +107 -0
  939. package/src/games/arrows/ArrowsGame.ts +735 -0
  940. package/src/games/arrows/ArrowsScene.ts +395 -0
  941. package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
  942. package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
  943. package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
  944. package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
  945. package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
  946. package/src/games/bike-racing/BikeMeshes.ts +273 -0
  947. package/src/games/bike-racing/BikeRacing.tsx +211 -0
  948. package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
  949. package/src/games/bike-racing/BikeRacingGame.ts +557 -0
  950. package/src/games/bike-racing/BikeRacingScene.ts +119 -0
  951. package/src/games/block-blast/BlockBlast.tsx +73 -0
  952. package/src/games/block-blast/BlockBlastConstants.ts +179 -0
  953. package/src/games/block-blast/BlockBlastGame.ts +471 -0
  954. package/src/games/block-blast/BlockBlastScene.ts +156 -0
  955. package/src/games/block-breaker/BlockBreaker.tsx +79 -0
  956. package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
  957. package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
  958. package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
  959. package/src/games/bluk/Bluk.tsx +82 -0
  960. package/src/games/bluk/BlukConstants.ts +121 -0
  961. package/src/games/bluk/BlukGame.ts +323 -0
  962. package/src/games/bluk/BlukRules.ts +154 -0
  963. package/src/games/bluk/BlukScene.ts +514 -0
  964. package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
  965. package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
  966. package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
  967. package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
  968. package/src/games/candy-crush/CandyCrush.tsx +77 -0
  969. package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
  970. package/src/games/candy-crush/CandyCrushGame.ts +477 -0
  971. package/src/games/candy-crush/CandyCrushScene.ts +209 -0
  972. package/src/games/car-racing/CarMeshes.ts +440 -0
  973. package/src/games/car-racing/CarRacing.tsx +211 -0
  974. package/src/games/car-racing/CarRacingConstants.ts +167 -0
  975. package/src/games/car-racing/CarRacingFacade.ts +40 -0
  976. package/src/games/car-racing/CarRacingGame.ts +539 -0
  977. package/src/games/car-racing/CarRacingScene.ts +1026 -0
  978. package/src/games/car-racing/CarRacingScenery.ts +265 -0
  979. package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
  980. package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
  981. package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
  982. package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
  983. package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
  984. package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
  985. package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
  986. package/src/games/checkers/Checkers.tsx +83 -0
  987. package/src/games/checkers/CheckersAI.ts +255 -0
  988. package/src/games/checkers/CheckersConstants.ts +68 -0
  989. package/src/games/checkers/CheckersGame.ts +322 -0
  990. package/src/games/checkers/CheckersRules.ts +167 -0
  991. package/src/games/checkers/CheckersScene.ts +308 -0
  992. package/src/games/color-switch/ColorSwitch.tsx +75 -0
  993. package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
  994. package/src/games/color-switch/ColorSwitchGame.ts +329 -0
  995. package/src/games/color-switch/ColorSwitchScene.ts +220 -0
  996. package/src/games/colors-sort/ColorsSort.tsx +82 -0
  997. package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
  998. package/src/games/colors-sort/ColorsSortGame.ts +246 -0
  999. package/src/games/colors-sort/ColorsSortScene.ts +315 -0
  1000. package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
  1001. package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
  1002. package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
  1003. package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
  1004. package/src/games/crossy-road/CrossyRoad.tsx +74 -0
  1005. package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
  1006. package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
  1007. package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
  1008. package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
  1009. package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
  1010. package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
  1011. package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
  1012. package/src/games/dino-jump/DinoJump.tsx +77 -0
  1013. package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
  1014. package/src/games/dino-jump/DinoJumpGame.ts +344 -0
  1015. package/src/games/dino-jump/DinoJumpScene.ts +686 -0
  1016. package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
  1017. package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
  1018. package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
  1019. package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
  1020. package/src/games/falling-sticks/FallingSticks.tsx +72 -0
  1021. package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
  1022. package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
  1023. package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
  1024. package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
  1025. package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
  1026. package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
  1027. package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
  1028. package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
  1029. package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
  1030. package/src/games/flappy-bird/FlappyBird.tsx +73 -0
  1031. package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
  1032. package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
  1033. package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
  1034. package/src/games/fruit-merger/FruitMerger.tsx +73 -0
  1035. package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
  1036. package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
  1037. package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
  1038. package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
  1039. package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
  1040. package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
  1041. package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
  1042. package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
  1043. package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
  1044. package/src/games/game-2048/Game2048.tsx +84 -0
  1045. package/src/games/game-2048/Game2048Constants.ts +68 -0
  1046. package/src/games/game-2048/Game2048Game.ts +181 -0
  1047. package/src/games/game-2048/Game2048Rules.ts +101 -0
  1048. package/src/games/game-2048/Game2048Scene.ts +206 -0
  1049. package/src/games/knife-hit/KnifeHit.tsx +78 -0
  1050. package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
  1051. package/src/games/knife-hit/KnifeHitGame.ts +264 -0
  1052. package/src/games/knife-hit/KnifeHitScene.ts +360 -0
  1053. package/src/games/ludo-king/LudoKing.tsx +86 -0
  1054. package/src/games/ludo-king/LudoKingConstants.ts +212 -0
  1055. package/src/games/ludo-king/LudoKingGame.ts +326 -0
  1056. package/src/games/ludo-king/LudoKingRules.ts +143 -0
  1057. package/src/games/ludo-king/LudoKingScene.ts +397 -0
  1058. package/src/games/maze-runner/MazeRunner.tsx +88 -0
  1059. package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
  1060. package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
  1061. package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
  1062. package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
  1063. package/src/games/memory-match/MemoryMatch.tsx +77 -0
  1064. package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
  1065. package/src/games/memory-match/MemoryMatchGame.ts +222 -0
  1066. package/src/games/memory-match/MemoryMatchRules.ts +38 -0
  1067. package/src/games/memory-match/MemoryMatchScene.ts +268 -0
  1068. package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
  1069. package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
  1070. package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
  1071. package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
  1072. package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
  1073. package/src/games/mob-control/MobControl.tsx +73 -0
  1074. package/src/games/mob-control/MobControlConstants.ts +106 -0
  1075. package/src/games/mob-control/MobControlGame.ts +176 -0
  1076. package/src/games/mob-control/MobControlMeshes.ts +85 -0
  1077. package/src/games/mob-control/MobControlRenderer.ts +108 -0
  1078. package/src/games/mob-control/MobControlRules.ts +522 -0
  1079. package/src/games/mob-control/MobControlScene.ts +399 -0
  1080. package/src/games/number-search/NumberSearch.tsx +18 -0
  1081. package/src/games/number-search/NumberSearchNumbers.ts +623 -0
  1082. package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
  1083. package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
  1084. package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
  1085. package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
  1086. package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
  1087. package/src/games/pac-man/PacMan.tsx +86 -0
  1088. package/src/games/pac-man/PacManConstants.ts +169 -0
  1089. package/src/games/pac-man/PacManGame.ts +406 -0
  1090. package/src/games/pac-man/PacManRules.ts +255 -0
  1091. package/src/games/pac-man/PacManScene.ts +387 -0
  1092. package/src/games/paper-io/PaperIo.tsx +91 -0
  1093. package/src/games/paper-io/PaperIoConstants.ts +86 -0
  1094. package/src/games/paper-io/PaperIoGame.ts +193 -0
  1095. package/src/games/paper-io/PaperIoMeshes.ts +233 -0
  1096. package/src/games/paper-io/PaperIoRules.ts +315 -0
  1097. package/src/games/paper-io/PaperIoScene.ts +310 -0
  1098. package/src/games/penguin-run/PenguinMeshes.ts +269 -0
  1099. package/src/games/penguin-run/PenguinModel.ts +712 -0
  1100. package/src/games/penguin-run/PenguinRun.tsx +77 -0
  1101. package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
  1102. package/src/games/penguin-run/PenguinRunGame.ts +406 -0
  1103. package/src/games/penguin-run/PenguinRunScene.ts +949 -0
  1104. package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
  1105. package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
  1106. package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
  1107. package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
  1108. package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
  1109. package/src/games/pipe-connect/PipeConnect.tsx +69 -0
  1110. package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
  1111. package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
  1112. package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
  1113. package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
  1114. package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
  1115. package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
  1116. package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
  1117. package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
  1118. package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
  1119. package/src/games/popit-fidget/PopitFidget.tsx +72 -0
  1120. package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
  1121. package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
  1122. package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
  1123. package/src/games/reversi/Reversi.tsx +94 -0
  1124. package/src/games/reversi/ReversiConstants.ts +67 -0
  1125. package/src/games/reversi/ReversiGame.ts +266 -0
  1126. package/src/games/reversi/ReversiRules.ts +176 -0
  1127. package/src/games/reversi/ReversiScene.ts +240 -0
  1128. package/src/games/search-grid/SearchGrid.tsx +92 -0
  1129. package/src/games/search-grid/SearchGridConstants.ts +178 -0
  1130. package/src/games/search-grid/SearchGridGame.ts +209 -0
  1131. package/src/games/search-grid/SearchGridScene.ts +301 -0
  1132. package/src/games/shared/BackdropCard.tsx +54 -0
  1133. package/src/games/shared/EngineBackdrop.ts +300 -0
  1134. package/src/games/shared/EngineBlasts.ts +136 -0
  1135. package/src/games/shared/EngineBlocks.ts +91 -0
  1136. package/src/games/shared/EngineControlText.ts +17 -0
  1137. package/src/games/shared/EngineDice.ts +250 -0
  1138. package/src/games/shared/EngineFootprint.ts +35 -0
  1139. package/src/games/shared/EngineFruits.ts +1435 -0
  1140. package/src/games/shared/EngineGameLoader.tsx +88 -0
  1141. package/src/games/shared/EngineGameScreen.tsx +325 -0
  1142. package/src/games/shared/EngineGameWidth.ts +3 -0
  1143. package/src/games/shared/EngineGameWidth.web.ts +3 -0
  1144. package/src/games/shared/EngineGlyphs.ts +178 -0
  1145. package/src/games/shared/EngineHud.ts +815 -0
  1146. package/src/games/shared/EngineLoading.ts +477 -0
  1147. package/src/games/shared/EngineMeadow.ts +725 -0
  1148. package/src/games/shared/EngineMeshCache.ts +15 -0
  1149. package/src/games/shared/EngineMeshes.ts +10 -0
  1150. package/src/games/shared/EngineRacingChase.ts +21 -0
  1151. package/src/games/shared/EngineRacingHandling.ts +48 -0
  1152. package/src/games/shared/EngineReadyContext.ts +4 -0
  1153. package/src/games/shared/EngineTilt.ts +44 -0
  1154. package/src/games/shared/EngineTouchSurface.tsx +103 -0
  1155. package/src/games/shared/EngineUtils.ts +52 -0
  1156. package/src/games/shared/GameActivity.ts +13 -0
  1157. package/src/games/shared/GameLoading.tsx +202 -0
  1158. package/src/games/shared/GameLoadingTransition.tsx +61 -0
  1159. package/src/games/shared/ProceduralCacheVersion.ts +2 -0
  1160. package/src/games/shared/useEngineGame.ts +240 -0
  1161. package/src/games/shared/useGameResource.ts +21 -0
  1162. package/src/games/shared/useLiveState.ts +58 -0
  1163. package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
  1164. package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
  1165. package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
  1166. package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
  1167. package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
  1168. package/src/games/snake-3d/Snake3D.tsx +76 -0
  1169. package/src/games/snake-3d/Snake3DConstants.ts +61 -0
  1170. package/src/games/snake-3d/Snake3DGame.ts +192 -0
  1171. package/src/games/snake-3d/Snake3DMotion.ts +22 -0
  1172. package/src/games/snake-3d/Snake3DRules.ts +116 -0
  1173. package/src/games/snake-3d/Snake3DScene.ts +322 -0
  1174. package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
  1175. package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
  1176. package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
  1177. package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
  1178. package/src/games/space-fighter/SpaceFighter.tsx +74 -0
  1179. package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
  1180. package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
  1181. package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
  1182. package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
  1183. package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
  1184. package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
  1185. package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
  1186. package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
  1187. package/src/games/stack-tower/StackTower.tsx +76 -0
  1188. package/src/games/stack-tower/StackTowerConstants.ts +74 -0
  1189. package/src/games/stack-tower/StackTowerGame.ts +236 -0
  1190. package/src/games/stack-tower/StackTowerScene.ts +186 -0
  1191. package/src/games/sudoku/Sudoku.tsx +73 -0
  1192. package/src/games/sudoku/SudokuConstants.ts +127 -0
  1193. package/src/games/sudoku/SudokuGame.ts +250 -0
  1194. package/src/games/sudoku/SudokuRules.ts +125 -0
  1195. package/src/games/sudoku/SudokuScene.ts +304 -0
  1196. package/src/games/tangram/Tangram.tsx +79 -0
  1197. package/src/games/tangram/TangramConstants.ts +64 -0
  1198. package/src/games/tangram/TangramGame.ts +356 -0
  1199. package/src/games/tangram/TangramRules.ts +409 -0
  1200. package/src/games/tangram/TangramScene.ts +203 -0
  1201. package/src/games/tank-1990/Tank1990.tsx +78 -0
  1202. package/src/games/tank-1990/Tank1990Constants.ts +81 -0
  1203. package/src/games/tank-1990/Tank1990Game.ts +331 -0
  1204. package/src/games/tank-1990/Tank1990Rules.ts +390 -0
  1205. package/src/games/tank-1990/Tank1990Scene.ts +434 -0
  1206. package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
  1207. package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
  1208. package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
  1209. package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
  1210. package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
  1211. package/src/games/tile-home/TileHome.tsx +92 -0
  1212. package/src/games/tile-home/TileHomeConstants.ts +139 -0
  1213. package/src/games/tile-home/TileHomeGame.ts +435 -0
  1214. package/src/games/tile-home/TileHomeScene.ts +154 -0
  1215. package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
  1216. package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
  1217. package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
  1218. package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
  1219. package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
  1220. package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
  1221. package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
  1222. package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
  1223. package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
  1224. package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
  1225. package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
  1226. package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
  1227. package/src/games/word-search/WordSearch.tsx +18 -0
  1228. package/src/games/word-search/WordSearchWords.ts +1642 -0
  1229. package/src/helpers/GamePatternData.ts +120 -0
  1230. package/src/helpers/GameSettingsModal.tsx +384 -0
  1231. package/src/helpers/GameTheme.tsx +37 -0
  1232. package/src/helpers/IconPaths.ts +6 -0
  1233. package/src/helpers/index.ts +2 -0
  1234. package/src/index.tsx +60 -0
  1235. package/src/services/GameAssetLoader.ts +111 -0
  1236. package/src/services/GameAssets.ts +149 -0
  1237. package/src/services/GameLoaders.ts +93 -0
  1238. package/src/services/GamesConstants.ts +193 -0
  1239. package/src/services/GamesMetadata.ts +711 -0
  1240. package/src/services/GamesService.ts +116 -0
  1241. package/src/services/HapticsService.ts +48 -0
  1242. package/src/services/ScoringService.ts +19 -0
  1243. package/src/services/SfxSources.ts +81 -0
  1244. package/src/services/SoundsService.ts +582 -0
  1245. package/src/services/ThemeService.ts +281 -0
  1246. package/src/services/UtilsService.ts +134 -0
  1247. package/src/services/index.ts +6 -0
  1248. package/lib/module/games/arrows/ArrowsService.js +0 -1
  1249. package/lib/module/games/arrows/ArrowsStore.js +0 -1
  1250. package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
  1251. package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
  1252. package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
  1253. package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
  1254. package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
  1255. package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
  1256. package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
  1257. package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
  1258. package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
  1259. package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
  1260. package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
  1261. package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
  1262. package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
  1263. package/lib/module/games/block-blast/BlockBlastService.js +0 -1
  1264. package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
  1265. package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
  1266. package/lib/module/games/block-blast/components/GameArea.js +0 -1
  1267. package/lib/module/games/block-blast/components/GridComponent.js +0 -1
  1268. package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
  1269. package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
  1270. package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
  1271. package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
  1272. package/lib/module/games/block-breaker/components/GameArea.js +0 -1
  1273. package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
  1274. package/lib/module/games/bluk/BlukService.js +0 -1
  1275. package/lib/module/games/bluk/BlukStore.js +0 -1
  1276. package/lib/module/games/bluk/components/GameArea.js +0 -1
  1277. package/lib/module/games/bluk/components/GameBackground.js +0 -1
  1278. package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
  1279. package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
  1280. package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
  1281. package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
  1282. package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
  1283. package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
  1284. package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
  1285. package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
  1286. package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
  1287. package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
  1288. package/lib/module/games/car-racing/CarRacingService.js +0 -1
  1289. package/lib/module/games/car-racing/CarRacingStore.js +0 -1
  1290. package/lib/module/games/car-racing/components/CarComponent.js +0 -1
  1291. package/lib/module/games/car-racing/components/GameBackground.js +0 -1
  1292. package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
  1293. package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
  1294. package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
  1295. package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
  1296. package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
  1297. package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
  1298. package/lib/module/games/checkers/CheckersService.js +0 -1
  1299. package/lib/module/games/checkers/CheckersStore.js +0 -1
  1300. package/lib/module/games/checkers/components/GameBoard.js +0 -1
  1301. package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
  1302. package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
  1303. package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
  1304. package/lib/module/games/color-switch/components/GameArea.js +0 -1
  1305. package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
  1306. package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
  1307. package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
  1308. package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
  1309. package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
  1310. package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
  1311. package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
  1312. package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
  1313. package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
  1314. package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
  1315. package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
  1316. package/lib/module/games/crossy-road/components/GameArea.js +0 -1
  1317. package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
  1318. package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
  1319. package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
  1320. package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
  1321. package/lib/module/games/dino-jump/components/GameArea.js +0 -1
  1322. package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
  1323. package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
  1324. package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
  1325. package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
  1326. package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
  1327. package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
  1328. package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
  1329. package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
  1330. package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
  1331. package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
  1332. package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
  1333. package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
  1334. package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
  1335. package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
  1336. package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
  1337. package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
  1338. package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
  1339. package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
  1340. package/lib/module/games/flappy-bird/components/Bird.js +0 -1
  1341. package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
  1342. package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
  1343. package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
  1344. package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
  1345. package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
  1346. package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
  1347. package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
  1348. package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
  1349. package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
  1350. package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
  1351. package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
  1352. package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
  1353. package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
  1354. package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
  1355. package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
  1356. package/lib/module/games/game-2048/Game2048Service.js +0 -1
  1357. package/lib/module/games/game-2048/Game2048Store.js +0 -1
  1358. package/lib/module/games/game-2048/components/GameGrid.js +0 -1
  1359. package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
  1360. package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
  1361. package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
  1362. package/lib/module/games/knife-hit/components/GameArea.js +0 -1
  1363. package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
  1364. package/lib/module/games/ludo-king/LudoKingService.js +0 -1
  1365. package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
  1366. package/lib/module/games/ludo-king/components/Dice.js +0 -1
  1367. package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
  1368. package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
  1369. package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
  1370. package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
  1371. package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
  1372. package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
  1373. package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
  1374. package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
  1375. package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
  1376. package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
  1377. package/lib/module/games/memory-match/components/Card.js +0 -1
  1378. package/lib/module/games/memory-match/components/GameBoard.js +0 -1
  1379. package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
  1380. package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
  1381. package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
  1382. package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
  1383. package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
  1384. package/lib/module/games/mob-control/MobControlService.js +0 -1
  1385. package/lib/module/games/mob-control/MobControlStore.js +0 -1
  1386. package/lib/module/games/mob-control/components/GameArea.js +0 -1
  1387. package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
  1388. package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
  1389. package/lib/module/games/number-search/NumberSearchService.js +0 -1
  1390. package/lib/module/games/number-search/NumberSearchStore.js +0 -1
  1391. package/lib/module/games/number-search/components/GameBoard.js +0 -1
  1392. package/lib/module/games/number-search/components/NumberList.js +0 -1
  1393. package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
  1394. package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
  1395. package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
  1396. package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
  1397. package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
  1398. package/lib/module/games/pac-man/PacManService.js +0 -1
  1399. package/lib/module/games/pac-man/PacManStore.js +0 -1
  1400. package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
  1401. package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
  1402. package/lib/module/games/paper-io/PaperIoService.js +0 -1
  1403. package/lib/module/games/paper-io/PaperIoStore.js +0 -1
  1404. package/lib/module/games/paper-io/components/GameArea.js +0 -1
  1405. package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
  1406. package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
  1407. package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
  1408. package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
  1409. package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
  1410. package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
  1411. package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
  1412. package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
  1413. package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
  1414. package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
  1415. package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
  1416. package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
  1417. package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
  1418. package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
  1419. package/lib/module/games/reversi/ReversiStore.js +0 -1
  1420. package/lib/module/games/reversi/components/GameBoard.js +0 -1
  1421. package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
  1422. package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
  1423. package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
  1424. package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
  1425. package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
  1426. package/lib/module/games/snake-3d/Snake3DService.js +0 -1
  1427. package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
  1428. package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
  1429. package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
  1430. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
  1431. package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
  1432. package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
  1433. package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
  1434. package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
  1435. package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
  1436. package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
  1437. package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
  1438. package/lib/module/games/space-fighter/components/GameArea.js +0 -1
  1439. package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
  1440. package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
  1441. package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
  1442. package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
  1443. package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
  1444. package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
  1445. package/lib/module/games/spider-solitaire/components/Card.js +0 -1
  1446. package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
  1447. package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
  1448. package/lib/module/games/stack-tower/StackTowerService.js +0 -1
  1449. package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
  1450. package/lib/module/games/stack-tower/components/GameArea.js +0 -1
  1451. package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
  1452. package/lib/module/games/sudoku/SudokuService.js +0 -1
  1453. package/lib/module/games/sudoku/SudokuStore.js +0 -1
  1454. package/lib/module/games/sudoku/components/GameArea.js +0 -1
  1455. package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
  1456. package/lib/module/games/tangram/TangramService.js +0 -1
  1457. package/lib/module/games/tangram/TangramStore.js +0 -1
  1458. package/lib/module/games/tangram/components/GameBoard.js +0 -1
  1459. package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
  1460. package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
  1461. package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
  1462. package/lib/module/games/tank-1990/components/Controls.js +0 -1
  1463. package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
  1464. package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
  1465. package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
  1466. package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
  1467. package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
  1468. package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
  1469. package/lib/module/games/tile-home/TileHomeService.js +0 -1
  1470. package/lib/module/games/tile-home/TileHomeStore.js +0 -1
  1471. package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
  1472. package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
  1473. package/lib/module/games/tile-home/components/GameBoard.js +0 -1
  1474. package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
  1475. package/lib/module/games/tile-home/components/TileItem.js +0 -1
  1476. package/lib/module/games/tile-home/components/TileSlot.js +0 -1
  1477. package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
  1478. package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
  1479. package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
  1480. package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
  1481. package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
  1482. package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
  1483. package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
  1484. package/lib/module/games/word-search/WordSearchConstants.js +0 -1
  1485. package/lib/module/games/word-search/WordSearchService.js +0 -1
  1486. package/lib/module/games/word-search/WordSearchStore.js +0 -1
  1487. package/lib/module/games/word-search/components/GameBoard.js +0 -1
  1488. package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
  1489. package/lib/module/games/word-search/components/WordList.js +0 -1
  1490. package/lib/module/helpers/AnimatedScore.js +0 -1
  1491. package/lib/module/helpers/AnimationFrame.js +0 -1
  1492. package/lib/module/helpers/AnimationTracker.js +0 -1
  1493. package/lib/module/helpers/BlastAnimation.js +0 -1
  1494. package/lib/module/helpers/ErrorHandler.js +0 -1
  1495. package/lib/module/helpers/GameBackgroundPattern.js +0 -1
  1496. package/lib/module/helpers/GameControlButton.js +0 -1
  1497. package/lib/module/helpers/GameOverModal.js +0 -1
  1498. package/lib/module/helpers/GameTimer.js +0 -1
  1499. package/lib/module/helpers/Icons.js +0 -1
  1500. package/lib/module/helpers/ParticleBlast.js +0 -1
  1501. package/lib/module/helpers/ScoreBoardContainer.js +0 -1
  1502. package/lib/module/helpers/assets/apple-fruit.js +0 -1
  1503. package/lib/module/helpers/assets/avocado-item.js +0 -1
  1504. package/lib/module/helpers/assets/banana-fruit.js +0 -1
  1505. package/lib/module/helpers/assets/bomb-item.js +0 -1
  1506. package/lib/module/helpers/assets/broccoli-item.js +0 -1
  1507. package/lib/module/helpers/assets/cherries-fruit.js +0 -1
  1508. package/lib/module/helpers/assets/donut-item.js +0 -1
  1509. package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
  1510. package/lib/module/helpers/assets/fries-item.js +0 -1
  1511. package/lib/module/helpers/assets/fruit-helpers.js +0 -1
  1512. package/lib/module/helpers/assets/grapes-fruit.js +0 -1
  1513. package/lib/module/helpers/assets/icecream-item.js +0 -1
  1514. package/lib/module/helpers/assets/index.js +0 -1
  1515. package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
  1516. package/lib/module/helpers/assets/mango-fruit.js +0 -1
  1517. package/lib/module/helpers/assets/orange-fruit.js +0 -1
  1518. package/lib/module/helpers/assets/papaya-fruit.js +0 -1
  1519. package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
  1520. package/lib/module/helpers/assets/peach-fruit.js +0 -1
  1521. package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
  1522. package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
  1523. package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
  1524. package/lib/module/helpers/assets/raspberry-item.js +0 -1
  1525. package/lib/module/helpers/assets/star-item.js +0 -1
  1526. package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
  1527. package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
  1528. package/lib/module/types.d.js +0 -1
  1529. package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
  1530. package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
  1531. package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
  1532. package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
  1533. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
  1534. package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
  1535. package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
  1536. package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
  1537. package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
  1538. package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
  1539. package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
  1540. package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
  1541. package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
  1542. package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
  1543. package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
  1544. package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
  1545. package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
  1546. package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
  1547. package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
  1548. package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
  1549. package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
  1550. package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
  1551. package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
  1552. package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
  1553. package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
  1554. package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
  1555. package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
  1556. package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
  1557. package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
  1558. package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
  1559. package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
  1560. package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
  1561. package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
  1562. package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
  1563. package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
  1564. package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
  1565. package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
  1566. package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
  1567. package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
  1568. package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
  1569. package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
  1570. package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
  1571. package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
  1572. package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
  1573. package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
  1574. package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
  1575. package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
  1576. package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
  1577. package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
  1578. package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
  1579. package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
  1580. package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
  1581. package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
  1582. package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
  1583. package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
  1584. package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
  1585. package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
  1586. package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
  1587. package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
  1588. package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
  1589. package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
  1590. package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
  1591. package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
  1592. package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
  1593. package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
  1594. package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
  1595. package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
  1596. package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
  1597. package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
  1598. package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
  1599. package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
  1600. package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
  1601. package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
  1602. package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
  1603. package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
  1604. package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
  1605. package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
  1606. package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
  1607. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
  1608. package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
  1609. package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
  1610. package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
  1611. package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -38
  1612. package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
  1613. package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
  1614. package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
  1615. package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
  1616. package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
  1617. package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
  1618. package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
  1619. package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
  1620. package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
  1621. package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
  1622. package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
  1623. package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
  1624. package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
  1625. package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
  1626. package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
  1627. package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
  1628. package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
  1629. package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
  1630. package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
  1631. package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
  1632. package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
  1633. package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
  1634. package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
  1635. package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
  1636. package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
  1637. package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
  1638. package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
  1639. package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
  1640. package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
  1641. package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
  1642. package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
  1643. package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
  1644. package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
  1645. package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
  1646. package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
  1647. package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
  1648. package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
  1649. package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
  1650. package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
  1651. package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
  1652. package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
  1653. package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
  1654. package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
  1655. package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
  1656. package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
  1657. package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
  1658. package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
  1659. package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
  1660. package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
  1661. package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
  1662. package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
  1663. package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
  1664. package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
  1665. package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
  1666. package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
  1667. package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
  1668. package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
  1669. package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
  1670. package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
  1671. package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
  1672. package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
  1673. package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
  1674. package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
  1675. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
  1676. package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
  1677. package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
  1678. package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
  1679. package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
  1680. package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
  1681. package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
  1682. package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
  1683. package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
  1684. package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
  1685. package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
  1686. package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
  1687. package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
  1688. package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
  1689. package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
  1690. package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
  1691. package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
  1692. package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
  1693. package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
  1694. package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
  1695. package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
  1696. package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
  1697. package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
  1698. package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
  1699. package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
  1700. package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
  1701. package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
  1702. package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
  1703. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
  1704. package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
  1705. package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
  1706. package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
  1707. package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
  1708. package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
  1709. package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
  1710. package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
  1711. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
  1712. package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
  1713. package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
  1714. package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
  1715. package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
  1716. package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
  1717. package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
  1718. package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
  1719. package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
  1720. package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
  1721. package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
  1722. package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
  1723. package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
  1724. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
  1725. package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
  1726. package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
  1727. package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
  1728. package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
  1729. package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
  1730. package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
  1731. package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
  1732. package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
  1733. package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
  1734. package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
  1735. package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
  1736. package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
  1737. package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
  1738. package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
  1739. package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
  1740. package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
  1741. package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
  1742. package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
  1743. package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
  1744. package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
  1745. package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
  1746. package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
  1747. package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
  1748. package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
  1749. package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
  1750. package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
  1751. package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
  1752. package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
  1753. package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
  1754. package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
  1755. package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
  1756. package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
  1757. package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
  1758. package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
  1759. package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
  1760. package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
  1761. package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
  1762. package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
  1763. package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
  1764. package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
  1765. package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
  1766. package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
  1767. package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
  1768. package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
  1769. package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
  1770. package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
  1771. package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
  1772. package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
  1773. package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
  1774. package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
  1775. package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
  1776. package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
  1777. package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
  1778. package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
  1779. package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
  1780. package/lib/typescript/src/helpers/Icons.d.ts +0 -12
  1781. package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
  1782. package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
  1783. package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
  1784. package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
  1785. package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
  1786. package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
  1787. package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
  1788. package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
  1789. package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
  1790. package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
  1791. package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
  1792. package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
  1793. package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
  1794. package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
  1795. package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
  1796. package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
  1797. package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
  1798. package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
  1799. package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
  1800. package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
  1801. package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
  1802. package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
  1803. package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
  1804. package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
  1805. package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
  1806. package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
  1807. package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
  1808. package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
@@ -1 +1 @@
1
- "use strict";const _0x1d22d7=_0x52a4;!function(){const e=_0x52a4,t=_0x1e65();for(;;)try{if(441254==parseInt(e(516,"hTVF"))/1+parseInt(e(528,"gxXg"))/2*(parseInt(e(531,"yMSS"))/3)+-parseInt(e(510,"pg3D"))/4+-parseInt(e(521,"k3LD"))/5+-parseInt(e(543,"xW92"))/6+-parseInt(e(494,"!3a8"))/7+-parseInt(e(548,"ZdcX"))/8*(-parseInt(e(508,"K*D%"))/9))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x407212,{useEffect,useRef,useMemo,useCallback}from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useBalloonBlasterStore,useIsPlaying,useGameOver}from"./BalloonBlasterStore.js";import{BalloonBlasterService}from"./BalloonBlasterService.js";import{BALLOON_BLASTER_GAME_CONFIG}from"./BalloonBlasterConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";function _0x52a4(e,t){e-=453;const o=_0x1e65();let a=o[e];if(void 0===_0x52a4.cOGjbR){const e=function(e,t){let o,a,n=[],r=0,s="";for(e=function(e){let t="",o="";for(let o,a,n=0,r=0;a=e.charAt(r++);~a&&(o=n%4?64*o+a:a,n++%4)?t+=String.fromCharCode(255&o>>(-2*n&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let e=0,a=t.length;e<a;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),a=0;a<256;a++)n[a]=a;for(a=0;a<256;a++)r=(r+n[a]+t.charCodeAt(a%t.length))%256,o=n[a],n[a]=n[r],n[r]=o;a=0,r=0;for(let t=0;t<e.length;t++)a=(a+1)%256,r=(r+n[a])%256,o=n[a],n[a]=n[r],n[r]=o,s+=String.fromCharCode(e.charCodeAt(t)^n[(n[a]+n[r])%256]);return s};_0x52a4.dmJWPp=e,_0x52a4.UYjyKG={},_0x52a4.cOGjbR=!0}const n=o[0];_0x52a4.bdtXPp!==n&&(_0x52a4.UYjyKG={},_0x52a4.bdtXPp=n);const r=_0x52a4.UYjyKG[e];return void 0===r?(void 0===_0x52a4.tHCtpQ&&(_0x52a4.tHCtpQ=!0),a=_0x52a4.dmJWPp(a,t),_0x52a4.UYjyKG[e]=a):a=r,a}import{GameBackground}from"./components/GameBackground.js";import{GameControlButton,GameOverModal,useAnimationTrackers}from"../../helpers/index.js";import{GameSettingsModal}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0xf9a278,jsxs as _0x2bc427}from"react/jsx-runtime";export const BalloonBlaster=({settings:e,onSettingsChange:t,onEndGame:o,onReplayGame:a,onShare:n,onShareScreenshot:r,onShowLeaderboard:s,bannerAd:W})=>{const d="U1Du",l="oS(A",m="Fg!@",u=_0x52a4,i={eFbAD:u(500,"xW92"),mjMyx:u(504,"Fh73"),EsKeC:function(e,t){return e<=t},HWesi:function(e,t,o){return e(t,o)},ewnvU:u(489,"Lm*j"),qnhFz:u(520,"k3LD"),UjpZO:u(536,d),jsdps:function(e){return e()},cbZwx:function(e,t,o){return e(t,o)},ftJSF:function(e,t,o){return e(t,o)},IGZAx:function(e,t,o){return e(t,o)}},S=i[u(458,"EJGd")](useIsPlaying),k=useGameOver(),x=useRef(!1),f=useRef(o);f[u(524,l)]=o;const G=useRef(e);G[u(507,"3H!$")]=e;const p=e?.[u(459,"!3a8")]??!0,_=useCallback(e=>{const t=u;if(f[t(466,"8]RF")]&&!x[t(473,"TuMu")]){const o=useBalloonBlasterStore.getState()[t(463,"$hn!")];f.current({status:e,score:o[t(480,"kl%L")]()}),x[t(473,"TuMu")]=!0}},[]),{balloonAnimations:C,particleAnimations:O}=useAnimationTrackers([u(454,"]IAC"),u(505,"dNb2")]),h=useMemo(()=>new BalloonBlasterService(C,O),[C,O]);i[u(547,m)](useEffect,()=>{const e=u,t={};t[e(472,"eVk#")]=function(e,t){return e===t};const o=t;if(i[e(493,"9IXN")]===i.eFbAD)return()=>{const t=e;useBalloonBlasterStore.getState()[t(511,"hTVF")]&&!x.current&&_(t(515,"Fg!@"));try{if(o[t(470,"hTVF")](t(483,"*Ml6"),t(517,"kpG#")))h.cleanup();else{const e="3|4|1|2|0"[t(478,"14a!")]("|");let o=0;for(;;){switch(e[o++]){case"0":_0x3f9684(_0x8484db.BALLOON_BLASTER[t(522,"I22C")],_0x2a2ed5[t(507,"3H!$")]?.[t(518,"xs$K")]??!0);continue;case"1":_0x562c66.resetAnimations();continue;case"2":_0x53f749[t(542,"TuMu")]()[t(488,"pg3D")](_0x448daf[t(501,"VrK4")]);continue;case"3":_0xde17d6[t(465,"AnuK")]=!1;continue;case"4":_0xec812b[t(469,"k3LD")]();continue}break}}}catch{}try{useBalloonBlasterStore.getState()[t(476,"3m2E")]()}catch{}};_0x2faaf0(_0x1a774c[e(467,"Lm*j")],_0x565200),_0x2a87be(e(471,"8K5l"))},[]),i.cbZwx(useEffect,()=>{const e=u;if(k&&!S&&!x.current)if("cApvt"===i[e(538,"K*D%")])_0x5e5e53(_0x37fbf1[e(532,"EJGd")][e(519,"r2M(")],_0x45e211),_0x2444dc(e(537,"kpG#"));else{const{lives:t}=useBalloonBlasterStore.getState();i[e(534,"AnuK")](t,0)?(playSound(GAME_SOUNDS.BALLOON_BLASTER.GAME_OVER,p),_("lose")):(i.HWesi(playSound,GAME_SOUNDS[e(541,"8K5l")],p),_("win"))}!k&&(x[e(502,"G9Ch")]=!1)},[k,S,p]),useEffect(()=>{if(!S)return;const e=setGameInterval(()=>{useBalloonBlasterStore[_0x52a4(546,"qh[]")]().decrementTime()},1e3);return()=>clearGameInterval(e)},[S]),i[u(499,"r2M(")](useEffect,()=>{k&&h[u(498,"8K5l")]()},[k,h]);const B=i[u(492,"I22C")](useCallback,()=>{const e=u,t=e(487,"8]RF")[e(529,"os]$")]("|");let o=0;for(;;){switch(t[o++]){case"0":h.resetAnimations();continue;case"1":playSound(GAME_SOUNDS.BALLOON_BLASTER[e(464,"*Ml6")],G[e(473,"TuMu")]?.enableSounds??!0);continue;case"2":x[e(474,"dNb2")]=!1;continue;case"3":h.cleanup();continue;case"4":useBalloonBlasterStore[e(460,"xs$K")]()[e(485,"kpG#")](BALLOON_BLASTER_GAME_CONFIG[e(481,"Xj6j")]);continue}break}},[h]),A=i[u(545,"14a!")](useCallback,()=>{const e=u;_("cancel"),h[e(457,"@)sK")](),useBalloonBlasterStore.getState()[e(491,"$hn!")]()},[h]),L=useCallback(()=>{const e=u;a?.(),h[e(539,"kpG#")](),h.resetAnimations(),useBalloonBlasterStore.getState()[e(526,"kl%L")]()},[h,a]),P=useMemo(()=>({isPlaying:S,gameOver:k,onStartGame:B,onStopGame:A,onShare:n,onShowLeaderboard:s,startButtonSubtext:u(482,"14a!")}),[S,k,B,A,n,s]),g=useMemo(()=>{const e=u,t={score:0};t[e(477,"3m2E")]=3;const{score:o,lives:a}=k?useBalloonBlasterStore[e(453,"T^1c")]():t,n={};return n[e(475,"os]$")]=k,n[e(484,"gxXg")]=o,n.onPlayAgain=L,n.buttonText=e(535,"fhP$"),n[e(544,"xs$K")]=a>0?i[e(490,"os]$")]:i[e(530,"Fh73")],n[e(533,"Gfq7")]=a>0?i[e(497,"oS(A")]:e(455,"hTVF"),n},[k,L]),R=useMemo(()=>({gameId:GAME_IDS[u(523,"$)6m")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),b=e?.[u(506,d)]??0,N={};N[u(468,"G9Ch")]=h,N[u(513,"kl%L")]=e?.[u(525,l)],N[u(503,"NVpn")]=e?.[u(496,"*Ml6")];const v={...P},j={...g};j[u(462,m)]=r,j[u(456,"U1Du")]=W;const M={...R};return _0xf9a278(GestureHandlerRootView,{style:styles.container,children:_0x2bc427(GameBackground,{offset:b,children:[_0xf9a278(GameArea,N),_0xf9a278(ScoreBoard,{offset:b}),_0xf9a278(GameControlButton,v),_0xf9a278(GameOverModal,j),i.cbZwx(_0xf9a278,GameSettingsModal,M)]})})};const _0x1f21d0={};function _0x1e65(){const e=["oh7dQSkUxsy1W7K","ACkjW7P+lxiNW4Xw","uCkaqeZdISkeWOO","pN7dVSkbra","WRVdUWLxvG","WR8CpCk4d8o4WQO","W6G/W4ToW77dLmol","W4jUWO3dIa5bm8k/W6y","emo7WR/dPMbvfG","EhGxt2K2eG","W5VdQmkXW7ldMW","WQ/dHs4","lwW8hcK","WPzuWP1Za3qx","WO18WOBdJCkTW4BcSa","WQxdQ8kjvLHzW4PHra","W75qE8obf8ouW6hcMCkl","W6bCFSobea","ngBcHSk6WPm","C0GPWRaqqSkCW4CGWQpcONtdP0Pl","W5ldGCkMaIhcNZVcNG","WPDEx3S0x8oqomkMWQhdSmkcW7y","f3NcMSoZWOxdOCkTW5FcNNRdGgXucMP5u8kTDWxcUNC","WPZdOG9JEG","wvLTASog","W6GCWPJdLu94trjc","W7nhWQtdVa","WRK2WOPaWQVdHSklW4pdLq","WPRdMmo0W6lcOKJcUCkKW78","W4fIWOZdGxfqlmoq","WQNdR8kXsx4","p3JdOSkwvr3cKvPN","mY8aW5jY","WPjhWQ9DuG","W7pcK8kCFmo6wb5hd8kfcHpcTq","WRGTdmkIW4SLpSkmcI0NWQO","WO3dGsLNBSkSW6pdGwJdSgCLW5W","mCkyn8opja","WRVdGcxdMmk6WRb2","vNedkga","WP/dQKRdGSo3","umoNpvvyrtZdRSk8W4eoWQiW","amoRWR/dOMXybW","ymonWQBdUdXcWOGAFWldJWbU","W6/cISkormkC","WP5OWOBdI8kHW4VcQmkfpe7cO3ZcRhqUsgXI","rHfccSkJW54","tLHgs8k+W449","o8oEW6bKlNOQW6m","WQpdPSkvzLhdTmoPA8o4WOPP","W5JcMmkMWQldOZJdRSkBW5fqovRcOW","W4ddJ8kQW7JdTG5YWOldNa","gKavs8o0WPZcGrtdGcuQw8oy","W4pdGmkufd/cKWBcLGddJHFcNq","WQRdTmk6rW","xCkpFuFdJSkA","WPZcJSoiWQxcOuzDWO/dScT8WQy","W68LWR7dGum","oNxdV8kFrsisW7pcPhHCpW","D0qepNNcS8kwW4Ks","xfu/AYCmnf3dNG","ksvkgJ5YuNddGbVcLWiL","ktWBW4fE","zLWwwmkJWPOrWO3cRXSXW7NdKSo1W5a","b8khnCoNdGj8","aCkCjSo3bWLBWQ4bWPdcHCkX","W5tdI8kgeYFcSttcLba","aJrXtX/dJCoWW6qmW7ysW7pdPW","gWW6kCksiMqLF2pdRmoB","WR/dQmkZvL8","W4tcO8kPr8kJ","W5FdQtVcI2CFW7m","amoJWPhcV8olzCkqqYVdT21Hk8kQW7q","WQHCW4ldSr0mkq","WPKAbmkVkq","quy6W7S2v8ksW5SGW6y","BGvbgmkYWORdHtddPtGAxSowWO4","W7ChWORdGG","z8kmW5LZna","W7GeWPZdHLvkxa","WP/dGCk+aYVcSW8","WO/dQqZdTCklWOfjWP9h","WPjeWPTseNSxpG","W57cKXVcHCkaC8kDCmojWQTRmq","k3ldQSkrta","jhtcSmkKWP8","W6D7t8ocWOPWjmkC","DSk5DLFdGG","pYHuW5FdPNKXW5ddV8oFWPylwa","WQpdPSksqvddP8o4xa","WOuIW4DGpCopfsymvIadxsVcHmk7WOC","W7ddK8kpWRtdPrz1W4ZdLd9WW63dHColaxdcRIJdKvNcQa","sXzkf8kJW5JdTdS","W63cLSkihqaXAW","kmorWRNcG8o3","WQtdJ8ofk8kKchH7gmktjGG"];return(_0x1e65=function(){return e})()}_0x1f21d0[_0x1d22d7(486,"Lm*j")]=1,_0x1f21d0[_0x1d22d7(479,"fhP$")]=BACKGROUND_COLOR;const _0x1c3002={};_0x1c3002[_0x1d22d7(514,"os]$")]=1;const _0x5e4960={};_0x5e4960[_0x1d22d7(461,"K*D%")]=_0x1f21d0,_0x5e4960[_0x1d22d7(509,"T^1c")]=_0x1c3002;const styles=StyleSheet.create(_0x5e4960);
1
+ "use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,timerColumn}from"../shared/EngineHud.js";import{backgroundFor,lightFor}from"../shared/EngineMeadow.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,MAX_LIVES,TIME_LIMIT}from"./BalloonBlasterConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tick,touch}from"./BalloonBlasterGame.js";import{jsx as _0x52bd7c}from"react/jsx-runtime";const SFX=GAME_SOUNDS.BALLOON_BLASTER;export const BalloonBlaster=engineGame(GAME_IDS.BALLOON_BLASTER,e=>{const[o,t]=useLiveState(0),[s,r]=useLiveState(MAX_LIVES),[i,a]=useLiveState(TIME_LIMIT),{theme:n,status:m,screen:u,gameOver:S}=useEngineGame(e,{gameId:GAME_IDS.BALLOON_BLASTER,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,o,t)=>setLayout(e,getLayout(o,t)),drag:(e,{phase:o,x:t,y:s})=>{"start"===o&&touch(e,t,s)},sounds:SFX,onStart:e=>e(SFX.START),wire:(e,o)=>{e.onScore=t,e.onLives=r,e.onTime=a,e.onPop=()=>o(SFX.POP,HapticType.LIGHT),e.onBomb=()=>o(SFX.BOMB,HapticType.HEAVY),e.onWin=()=>o(GAME_SOUNDS.WELL_DONE),e.onLose=()=>o(SFX.GAME_OVER)}}),p=useMemo(()=>lightFor(n),[n]),E=useMemo(()=>backgroundFor(n),[n]);return _0x52bd7c(EngineGameScreen,{...u,light:p,background:E,columns:[scoreColumn(o),livesColumn(s,MAX_LIVES),timerColumn(i,n)],subtext:"Pop balloons to score!",gameOver:S({title:"win"===m?"TIME UP!":"GAME OVER",message:"win"===m?"Great popping!":"You ran out of lives!",scoreLabel:"Final Score",score:o,buttonText:"Pop Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x1d8765=_0x33cf;!function(){const x="iG##",_=_0x33cf,W=_0x4635();for(;;)try{if(163359==parseInt(_(317,x))/1*(-parseInt(_(394,"ayfW"))/2)+-parseInt(_(382,x))/3*(-parseInt(_(457,"LH1E"))/4)+parseInt(_(328,"X)HZ"))/5*(-parseInt(_(433,"h#Ba"))/6)+parseInt(_(435,"RIAG"))/7+parseInt(_(374,"W7x6"))/8+parseInt(_(454,"RIAG"))/9+-parseInt(_(362,"iG##"))/10)break;W.push(W.shift())}catch(x){W.push(W.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{isTablet}from"../../services/UtilsService.js";const _0x10d7ae={};_0x10d7ae[_0x1d8765(372,"qKk2")]=120,_0x10d7ae[_0x1d8765(337,"0(c6")]=3,_0x10d7ae[_0x1d8765(364,"TZnh")]=800,_0x10d7ae[_0x1d8765(321,"2MVl")]=2.5,_0x10d7ae[_0x1d8765(345,"SlZl")]=-.005,_0x10d7ae.INITIAL_VELOCITY_Y=-1.2,_0x10d7ae[_0x1d8765(327,"U5Fq")]=.5,_0x10d7ae[_0x1d8765(443,"T1Wl")]=.02,_0x10d7ae.BALLOON_SIZE=isTablet?92:60,_0x10d7ae[_0x1d8765(383,"dnBB")]=10,_0x10d7ae[_0x1d8765(425,"u^Gi")]=2e3,_0x10d7ae[_0x1d8765(455,"X4*3")]=4,_0x10d7ae[_0x1d8765(402,"RIAG")]=600;export const BALLOON_BLASTER_GAME_CONFIG=_0x10d7ae;const _0x2b1001={};_0x2b1001[_0x1d8765(318,"G8x8")]=30,_0x2b1001.stiffness=50;const _0x36b939={};_0x36b939[_0x1d8765(347,"h#Ba")]=20,_0x36b939.stiffness=300;const _0xdac50c={damping:25};_0xdac50c[_0x1d8765(344,"ayfW")]=400;const _0x2664ce={};_0x2664ce[_0x1d8765(406,"0(c6")]=200;const _0x570443={};_0x570443[_0x1d8765(405,"u^Gi")]=_0x2b1001,_0x570443.POP_SPRING=_0x36b939,_0x570443[_0x1d8765(355,"cV@f")]=_0xdac50c,_0x570443[_0x1d8765(329,"dnBB")]=_0x2664ce;export const BALLOON_BLASTER_ANIMATION_CONFIG=_0x570443;const _0x5aaab1={};_0x5aaab1.BACKGROUND=BACKGROUND_COLOR,_0x5aaab1.PRIMARY=PRIMARY_COLOR,_0x5aaab1.SCORE_BOARD="#1E90FF",_0x5aaab1[_0x1d8765(341,"SlZl")]="#FFD700",_0x5aaab1[_0x1d8765(352,"h#Ba")]=[_0x1d8765(463,"UcNh"),_0x1d8765(324,"6A9u"),_0x1d8765(388,"G8x8"),_0x1d8765(322,"bgQ7"),"#BF5AF2","#FF9500"],_0x5aaab1[_0x1d8765(414,"h#Ba")]="#FF4757",_0x5aaab1[_0x1d8765(424,"dnBB")]=_0x1d8765(403,"cV@f"),_0x5aaab1[_0x1d8765(361,"Loxl")]=_0x1d8765(393,"jhCf"),_0x5aaab1.UI=PRIMARY_COLOR,_0x5aaab1[_0x1d8765(320,"h#Ba")]=_0x1d8765(416,"CFNA"),_0x5aaab1[_0x1d8765(410,"80Rp")]=_0x1d8765(376,"W7x6"),_0x5aaab1.WHITE="#FFFFFF";export const BALLOON_BLASTER_COLORS=_0x5aaab1;const _0x247e18={};_0x247e18[_0x1d8765(381,"x2Q^")]="\ud83c\udf88",_0x247e18[_0x1d8765(331,"T1Wl")]=50,_0x247e18[_0x1d8765(342,"0(c6")]=_0x1d8765(409,"JeEP"),_0x247e18.color=_0x1d8765(367,"U5Fq"),_0x247e18[_0x1d8765(389,"EFbr")]=[_0x1d8765(427,"6A9u"),_0x1d8765(378,"%J6d")];const _0x21b506={};_0x21b506[_0x1d8765(349,"W7x6")]="\ud83c\udf88",_0x21b506[_0x1d8765(459,"SlZl")]=50,_0x21b506.name=_0x1d8765(418,"0(c6"),_0x21b506[_0x1d8765(419,"x2Q^")]=_0x1d8765(461,"hxx&"),_0x21b506[_0x1d8765(445,"YG1B")]=[_0x1d8765(363,"CFNA"),_0x1d8765(397,"CFNA")];const _0x55e73c={};_0x55e73c[_0x1d8765(338,"kav5")]="\ud83c\udf88",_0x55e73c[_0x1d8765(432,"x2Q^")]=75,_0x55e73c[_0x1d8765(326,"iJZC")]=_0x1d8765(395,"qKk2"),_0x55e73c[_0x1d8765(428,"ayfW")]=_0x1d8765(332,"iG##"),_0x55e73c[_0x1d8765(398,"kJl$")]=[_0x1d8765(437,"K&S*"),_0x1d8765(340,"xIWR")];const _0x51d676={};_0x51d676[_0x1d8765(379,"dnBB")]="\ud83c\udf88",_0x51d676[_0x1d8765(430,"m*w*")]=100,_0x51d676[_0x1d8765(365,"m*w*")]=_0x1d8765(464,"80Rp"),_0x51d676[_0x1d8765(391,"0(c6")]=_0x1d8765(399,"jhCf"),_0x51d676[_0x1d8765(441,"0(c6")]=[_0x1d8765(456,"By!B"),_0x1d8765(420,")9IV")];const _0x5722ec={};_0x5722ec[_0x1d8765(411,"T1Wl")]="\ud83c\udf88",_0x5722ec[_0x1d8765(358,"0(c6")]=125,_0x5722ec.name=_0x1d8765(350,"8y[m"),_0x5722ec[_0x1d8765(448,"m*w*")]=_0x1d8765(334,"7*J6"),_0x5722ec.gradient=[_0x1d8765(431,"(R(a"),_0x1d8765(366,"X)HZ")];const _0x3211fa={};_0x3211fa[_0x1d8765(438,"%J6d")]="\ud83c\udf88",_0x3211fa.points=75,_0x3211fa[_0x1d8765(326,"iJZC")]=_0x1d8765(333,"qQ97"),_0x3211fa[_0x1d8765(439,"X)HZ")]="#FF0080",_0x3211fa[_0x1d8765(434,"SlZl")]=[_0x1d8765(316,"By!B"),"#FF40A0"];const _0x58aa31={};function _0x4635(){const x=["W41ZW4b5AL8/","mmo2emoDWQnn","W7b4W4meW4ddTrrT","WQi9gCojWOFdSSokWPi","pmkdAmk7CmkiiJX2jCkiWQyH","W7ZcHSoYWRuaWQlcVCkN","bCoJW61aW7dcGSo0","W6/cNSowhSkX","WOO9W5TrBW","kCoXvtLWW5BdPW","W6tcGCowC3LMW6VdUW","xSosW75qW63dOrqe","WOTHW78bcuVcGCk5fge4W7JdSeTfmmk0WRddP8kS","WOq/g8kzWPG","nSoZc3XqhCoila","WO8ZgCkw","W4iumSk3W4BcU1O","WQnDjCokW44","j8oRgmoxWR5BWQRdOG","qCoxW4PGWQ7dL8kQCW","cSo+sCoZmuRdQmoW","EulcVSk6W6SuWQa","W7POW60cBtldVG","o8keBSk1CmkhrGzxgmkaWRq","W5GemIZcMGxcPCobqhSjW4JcNJ0","frtdQmozW4RcMLW","mCohcCozuSoSga0","BCkUcrSwWOtcTMSja8oXWO0","WRuGeCodWPRdPa","W4aTWOKekq","mKL1W7pdPbZdTW","WOaeWQnFA8oAiq","v8k3WP/dG1ubqW","BCkZabPyW4BcTwyjamoXWOZdMa","fwlcNSkVWRZcMLW","AwSFr8o1W7hdVqa","WPTkW7HxWOSotW","vv3cUCoXWQZdGa3cKCo0pSkOWO8","WP0nW4KEW5RdSXDXWOKOW57dOq","W4TFjmouW6xdLCkqWR4XWOFcImoDuJBcNLW6cG","c8oEW4P/iSomW4q","pc49W74","kd5zWOXsWQC8","FmkVW5ddLxfUxq","pmk4nLu","WQbYWPJcT0Lvb2iDW67dKSodWOdcPmorWRbZW6ZcSWxdUmoRex4","W5HIWOCoECkyqrdcTCo7","dmkLW5/dLaqboCk1FSoAW7za","a8ksW57cKmoH","WQLbW4iUkxe","CH8ksmkLWOpcRa","WQhcVmkqW6/dUCokFtSzWOGfWOW","t8kpiSoHW7K+oG","WOe5WPeNpxXzlGH4cNyqra","WOXrWR7cIwK","W47cSSoVsfXkW5pdIIa","fSkMmHVcOW","gSkqWQ9YW4ldGJW","BSk0cf7dKeBcOG","WPydmCoUWQVdImoWWRquEZu","W63cKSoACG","AgihWQbK","itS5W70pWQFdQSkZcG","WOiDoCo7WQFdG8o9","c8osWR4ojmomW4q","WQ0PW7W6W6ZdJsi","W6RcGmo1Eh1H","yCknuuJdVW","WQ9nWOBdGSoxcwtcJMFcMZldHeJdGq","WRWGWQ/cTCk6","WPKjW4mEW4ZdOaL9WPSQW4pdTmkmWPme","uaf5WPyxW55ajq","WQSNW7WO","WPxdT8oYWQ8mWRFcOmk3W6RdJWLLW5tcIsW","n8ktWOVcKCo8CmkwiG","keSTWOLqWQq+","W7pcNmoEEwrW","W6D/bCo9","pSkrW6VdRmkPbCoegw/cG8o1ws0","W5hdHIxdJmkJbSorgmk7rSoCW6ZcSW","zgX0pSkLWOBcRcddL38xWP8g","w1nqu8keEmk7","gexcTmocWPrRW55JW4VcNCk6W4CHkxCHW7Gkf8k5W7ddRW","WQ5tjmoa","W4OtWOCklCkozG","W4P6WPFdKZaGEW","B8kScHvF","BSk0ccVcOK3dKa","WPz3W51zBmkPv8k+nZJdJSoQCW","xGbAWP0qW45D","jSo5xLCEmuXLW5lcN8kuq8oP","ymospmoOlmolCgr+nSkVWP0SqJ8","nSoqbHVcOCoKW7WynSoXfqiF","ndqJzSo7","j8kMdMtcRSkAWO4","vbX0WP0m","WQNcTCo/qmoOWP5/","oSkeW7NdVsG","keSTWOSHWQq+","jCo0fSozWR4","ygT1nCkHWORdTJVdLheaWPO","dmkLW5/dLaqboCkUCSoAW7ryWP/cRCoiW70zoG","WRfzWPNdLW","wexcTCo6","W5SmW6NdMJCSF2KCW6pdKmoDWRm","CSohlcWntmks","W5XTW5nJW5vqga","WR4/WQhcU8k6WR/dLCoW","W5WBWQvHWQryga","W6dcNmoBEgi","Cx9GW50VW7NcVW","qSoKWPutW7D4WPhdHMFdRI7dVmkTxSotWQPVbf1LFW","zNHOW5G5WOBdTCklnq","gmoDF34UaJLvW7lcP8kXy8oizq","W5DLqColW4pcSZ1bW4mdm0O","w1DqkSkeEmk7","WOyGfCkxWPJdRGr3","e8kZW4C0WPLYWPq","l8kgW7/dUtuT","pcO/W7vjWQVdRSkSfCotW4ldPW","xCoYcCozc8o8xqfdg8kkWRCgErGmWR0","W6BdSmoMW40hW4lcRG","gSoMW5KaWRtcTeO","DtjuWR4XW7rGdHuavIpcQXC","W6FcHSofDMrQW6RdOq","eSomCMa","WQldHmobWP8SWPhcGSkg","FCoeWRZdUSo5u8kBdwRcNSoq","xSkepsTPWRxcKKqQiSoAWQldPgW","WRXdW4qQna","fdvEW4PoWO8E","W6tdQHJdSSkd","WOOhW5WiW4RdVbf9WPW9","BSoCn8oIma","wYuMlCoYEmk7","WQPylSkOWPRdNmky","W6hcN8ocCJbHW6tdOX/cJG4Z","i8o2fCoCWQu","q8ojWOlcUCoviSoo","eCoxENW1bG","frtdQmkNWRZdPcO","WPK9W55qACk7","e8kGW4ddKHiblSkZF8oCW6O","DdXvWRaXW6r6gaSvsZ/cSq","u0NcT8o1W6u","keSTW78MWQa+","msa8W7qB","ityLySoMW4a","WRbDimolW4HH"];return(_0x4635=function(){return x})()}_0x58aa31[_0x1d8765(368,"80Rp")]="\ud83c\udf88",_0x58aa31.points=150,_0x58aa31.name=_0x1d8765(335,"(R(a"),_0x58aa31[_0x1d8765(460,"L)3p")]=_0x1d8765(404,"Kw&l"),_0x58aa31[_0x1d8765(353,"u^Gi")]=[_0x1d8765(452,"TZnh"),_0x1d8765(412,"u^Gi")];const _0x161b55={};_0x161b55[_0x1d8765(444,"kJl$")]="\ud83c\udf88",_0x161b55[_0x1d8765(429,"iG##")]=125,_0x161b55[_0x1d8765(446,"kJl$")]=_0x1d8765(319,"By!B"),_0x161b55.color="#00FFFF",_0x161b55[_0x1d8765(449,"x2Q^")]=[_0x1d8765(339,"Kw&l"),"#40FFFF"];const _0x128357={};_0x128357[_0x1d8765(375,"iG##")]="\ud83c\udf88",_0x128357[_0x1d8765(400,"dnBB")]=175,_0x128357[_0x1d8765(323,"ayfW")]=_0x1d8765(373,"RIAG"),_0x128357[_0x1d8765(377,"u^Gi")]=_0x1d8765(417,"2MVl"),_0x128357[_0x1d8765(442,"Kw&l")]=["#FF00FF",_0x1d8765(462,"L)3p")];const _0x53dda1={};_0x53dda1[_0x1d8765(413,"Loxl")]="\ud83c\udf88",_0x53dda1.points=200,_0x53dda1.name=_0x1d8765(458,"80Rp"),_0x53dda1.color=_0x1d8765(453,"T1Wl"),_0x53dda1[_0x1d8765(450,"K&S*")]=[_0x1d8765(325,"dnBB"),_0x1d8765(447,"kJl$")];const _0x34ebd5={};function _0x33cf(x,_){x-=316;const W=_0x4635();let d=W[x];if(void 0===_0x33cf.HesZqd){const x=function(x,_){let W,d,o=[],a=0,e="";for(x=function(x){let _="",W="";for(let W,d,o=0,a=0;d=x.charAt(a++);~d&&(W=o%4?64*W+d:d,o++%4)?_+=String.fromCharCode(255&W>>(-2*o&6)):0)d="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(d);for(let x=0,d=_.length;x<d;x++)W+="%"+("00"+_.charCodeAt(x).toString(16)).slice(-2);return decodeURIComponent(W)}(x),d=0;d<256;d++)o[d]=d;for(d=0;d<256;d++)a=(a+o[d]+_.charCodeAt(d%_.length))%256,W=o[d],o[d]=o[a],o[a]=W;d=0,a=0;for(let _=0;_<x.length;_++)d=(d+1)%256,a=(a+o[d])%256,W=o[d],o[d]=o[a],o[a]=W,e+=String.fromCharCode(x.charCodeAt(_)^o[(o[d]+o[a])%256]);return e};_0x33cf.ZPABcs=x,_0x33cf.geLAMc={},_0x33cf.HesZqd=!0}const o=W[0];_0x33cf.lPFzyD!==o&&(_0x33cf.geLAMc={},_0x33cf.lPFzyD=o);const a=_0x33cf.geLAMc[x];return void 0===a?(void 0===_0x33cf.aGGbvc&&(_0x33cf.aGGbvc=!0),d=_0x33cf.ZPABcs(d,_),_0x33cf.geLAMc[x]=d):d=a,d}_0x34ebd5.emoji="\ud83c\udf88",_0x34ebd5.points=225,_0x34ebd5[_0x1d8765(384,"8y[m")]="rainbow balloon",_0x34ebd5[_0x1d8765(415,"RIAG")]="#FF0080",_0x34ebd5[_0x1d8765(451,"^D$W")]=[_0x1d8765(369,"xIWR"),_0x1d8765(346,"bgQ7"),_0x1d8765(422,"By!B"),_0x1d8765(390,"G8x8")];const _0x22b5ce={};_0x22b5ce[_0x1d8765(336,"U5Fq")]="\ud83c\udf88",_0x22b5ce[_0x1d8765(423,"X)HZ")]=250,_0x22b5ce[_0x1d8765(385,"By!B")]=_0x1d8765(401,"ayfW"),_0x22b5ce[_0x1d8765(330,")9IV")]=_0x1d8765(392,"ayfW"),_0x22b5ce[_0x1d8765(408,"cV@f")]=[_0x1d8765(440,"80Rp"),_0x1d8765(357,"6A9u")];export const BALLOON_TYPES=[_0x247e18,_0x21b506,_0x55e73c,_0x51d676,_0x5722ec,_0x3211fa,_0x58aa31,_0x161b55,_0x128357,_0x53dda1,_0x34ebd5,_0x22b5ce];const _0x3c56b2={};_0x3c56b2[_0x1d8765(351,"EFbr")]="\ud83d\udca3",_0x3c56b2[_0x1d8765(421,"qKk2")]=-250,_0x3c56b2[_0x1d8765(359,"2MVl")]=_0x1d8765(354,"h#Ba"),_0x3c56b2[_0x1d8765(348,"0(c6")]=!0,_0x3c56b2[_0x1d8765(343,"6A9u")]=_0x1d8765(387,"YG1B");const _0x5e5695={};_0x5e5695[_0x1d8765(426,"By!B")]="\u2b50",_0x5e5695[_0x1d8765(358,"0(c6")]=250,_0x5e5695[_0x1d8765(446,"kJl$")]=_0x1d8765(407,"qKk2"),_0x5e5695[_0x1d8765(371,"u^Gi")]=!0,_0x5e5695[_0x1d8765(419,"x2Q^")]=_0x1d8765(380,"6A9u");export const BALLOON_SPECIAL_ITEMS=[_0x3c56b2,_0x5e5695];
1
+ "use strict";import{isTablet}from"../../services/UtilsService.js";export const TIME_LIMIT=120;export const MAX_LIVES=3;export const POINTS_PER_BALLOON=100;export const SPECIAL_CHANCE=.2;export const BALLOON_COLORS=["#FF0040","#0080FF","#FFD700","#00FF80","#8000FF","#FF0080","#FF4000","#00FFFF","#FF00FF","#FFB000","#00FF00"];export const RAINBOW=["#FF0080","#8000FF","#0080FF","#00FF80","#FFD700","#FF4000"];export const FIRST_BALLOONS=3;export const FIRST_STAGGER=.1;export const SPAWN_INTERVAL=.8;export const FRAME_TIME=1/60;export const MAX_FRAMES=3;export const BALLOON_SIZE=isTablet?92:60;export const RISE_SPEED=-1.2;export const LIFT=-.005;export const DRIFT_RANGE=.5;export const SPIN_RANGE=.02;export const WALL_BOUNCE=.8;export const BALLOON_BOUNCE=.5;export const BALLOON_HIT=1.6;export const BALLOON_GAP=6;export const TOUCH_PAD=10;export const POP_TIME=.2;export const POP_SWELL=1.22;export const RIG={eyeHeight:1.6,horizon:.8,playDepth:5};export const MEADOW={sun:[.8,.18],clouds:[.14,.62],framingTrees:!1,foreground:!1,hotAirBalloons:3};export function getLayout(t,o){const e=BALLOON_SIZE,F=1.25*e;return{width:t,height:o,size:e,bodyHeight:F,totalHeight:F+Math.round(e/60*30)}}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{cameraFor,makeView,spawnWorld}from"../shared/EngineMeadow.js";import{BALLOON_COLORS,DRIFT_RANGE,FIRST_BALLOONS,FIRST_STAGGER,FRAME_TIME,LIFT,MAX_FRAMES,MAX_LIVES,MEADOW,POINTS_PER_BALLOON,RIG,RISE_SPEED,SPAWN_INTERVAL,SPECIAL_CHANCE,SPIN_RANGE,TIME_LIMIT,TOUCH_PAD,WALL_BOUNCE}from"./BalloonBlasterConstants.js";import{balloonBounds,findBalloonSpawn,separateBalloons}from"./BalloonBlasterPhysics.js";import{balloonMeshes,placeBalloon,popBalloon,spawnBalloon}from"./BalloonBlasterScene.js";const WORLD_CAPACITY=1100;export function createGame(o){const e=new World(1100),n={world:e,camera:{eye:[0,1.6,0],target:[0,1.6,-1],fov:.9},theme:o,layout:null,view:null,scenery:[],phase:"ready",get score(){return e.scoreboard.score},get lives(){return e.scoreboard.lives},won:!1,time:0,pending:0,balloons:[],onPhase:o=>{},onScore:o=>{},onLives:o=>{},onTime:o=>{},onPop:()=>{},onBomb:()=>{},onWin:()=>{},onLose:()=>{}};return e.scoreboard.reset(MAX_LIVES),e.scoreboard.handlers={onScore:o=>n.onScore(o),onLives:o=>n.onLives(o),onSecond:o=>"playing"===n.phase&&n.onTime(o),onTimeUp:()=>"playing"===n.phase&&end(n,!0),onLivesOut:()=>"playing"===n.phase&&end(n,!1)},n}const after=(o,e,n)=>o.world.after(e,n);export function setLayout(o,e){const n=o.world;clearBalloons(o);for(const e of o.scenery)n.despawn(e);o.pending=0,o.layout=e;const a=makeView(e.width,e.height,RIG);o.view=a;const r=cameraFor(a);o.camera.eye=r.eye,o.camera.target=r.target,o.camera.fov=r.fov,o.scenery=spawnWorld(n,a,o.theme,MEADOW),balloonMeshes()}export function setTheme(o,e){if(e===o.theme&&o.scenery.length)return;o.theme=e;const n=o.view;if(n&&!o.world.isDisposed){for(const e of o.scenery)o.world.despawn(e);o.scenery=spawnWorld(o.world,n,e,MEADOW)}}function clearBalloons(o){for(const e of o.balloons)o.world.despawn(e.root);o.balloons=[]}export function start(o){if("ready"===o.phase){o.phase="playing",o.world.scoreboard.startCountdown(TIME_LIMIT),o.onPhase("playing");for(let e=0;e<FIRST_BALLOONS;e++)after(o,e*FIRST_STAGGER,()=>release(o));after(o,SPAWN_INTERVAL,()=>spawnLoop(o))}}function spawnLoop(o){"playing"===o.phase&&(release(o),after(o,SPAWN_INTERVAL,()=>spawnLoop(o)))}function release(o){const e=o.layout,n=o.view;if(!e||!n||"playing"!==o.phase)return;const a=Math.random()<SPECIAL_CHANCE?Math.random()<.5?{kind:"bomb"}:{kind:"life"}:{kind:"balloon",color:BALLOON_COLORS[Math.floor(Math.random()*BALLOON_COLORS.length)]},r=e.height+e.size,s=findBalloonSpawn(o.balloons,e,r);if(null===s)return;const t=(Math.random()-.5)*SPIN_RANGE;o.balloons.push({what:a,x:s,y:r,vx:(Math.random()-.5)*DRIFT_RANGE,vy:RISE_SPEED,root:spawnBalloon(o.world,n,e,a,s+e.size/2,r+e.bodyHeight/2,t)})}export function reset(o){o.world.cancelTimers(),clearBalloons(o),o.world.scoreboard.reset(MAX_LIVES),o.won=!1,o.time=0,o.pending=0,o.phase="ready",o.onScore(0),o.onLives(MAX_LIVES),o.onTime(TIME_LIMIT),o.onPhase("ready")}export function dispose(o){o.world.cancelTimers(),o.world.dispose()}function end(o,e){o.world.cancelTimers(),o.world.scoreboard.stop(),clearBalloons(o),o.won=e,o.phase="over",e?o.onWin():o.onLose(),o.onPhase("over")}export function tick(o,e){if(o.world.isDisposed)return;const n=Math.max(0,Math.min(e,FRAME_TIME*MAX_FRAMES));o.time+=n;let a=!1;if("playing"===o.phase)for(o.pending=Math.min(o.pending+n,FRAME_TIME*MAX_FRAMES);o.pending+1e-9>=FRAME_TIME;)o.balloons.length&&(step(o,1),a=!0),o.pending=Math.max(0,o.pending-FRAME_TIME);if(a&&o.view&&o.layout){const e=o.world.transforms;for(const n of o.balloons)placeBalloon(o.world,o.view,n.root,n.what,n.x+o.layout.size/2,n.y+o.layout.bodyHeight/2,e);e.flush()}o.world.update(n)}function step(o,e){const n=o.layout,{left:a,right:r}=balloonBounds(n),s=o.balloons;let t=0;for(const l of o.balloons){l.vy+=LIFT*e;let i=l.x+l.vx*e;const d=l.y+l.vy*e;d<2*-n.size?o.world.despawn(l.root):(i<=a?(i=a,l.vx=Math.abs(l.vx)*WALL_BOUNCE):i>=r&&(i=r,l.vx=-Math.abs(l.vx)*WALL_BOUNCE),l.x=i,l.y=d,s[t++]=l)}s.length=t,separateBalloons(o.balloons,n)}export function touch(o,e,n){const a=o.layout,r=o.view;if(!a||!r||"playing"!==o.phase)return;let s=null,t=1/0;for(const r of o.balloons){if(e<r.x-TOUCH_PAD||e>r.x+a.size+TOUCH_PAD||n<r.y-TOUCH_PAD||n>r.y+a.totalHeight+TOUCH_PAD)continue;const o=(e-(r.x+a.size/2))**2+(n-(r.y+.625*a.size))**2,l="bomb"===r.what.kind,i="bomb"===s?.what.kind;(l&&!i||l===i&&o<t)&&(s=r,t=o)}if(!s)return;const l=s;if(o.balloons=o.balloons.filter(o=>o!==l),popBalloon(o.world,r,a,l.root,l.what,l.x+a.size/2,l.y+a.bodyHeight/2),"bomb"===l.what.kind)return o.onBomb(),void o.world.scoreboard.addLives(-1);o.onPop(),"life"===l.what.kind?o.world.scoreboard.lives<MAX_LIVES&&o.world.scoreboard.addLives(1):o.world.scoreboard.add(POINTS_PER_BALLOON)}
@@ -0,0 +1 @@
1
+ "use strict";import{BALLOON_BOUNCE,BALLOON_GAP,BALLOON_HIT}from"./BalloonBlasterConstants.js";export const balloonDistance=t=>t.size*BALLOON_HIT+BALLOON_GAP;export const balloonBounds=t=>{const o=(balloonDistance(t)-t.size)/2;return{left:o,right:Math.max(o,t.width-t.size-o)}};export function findBalloonSpawn(t,o,n,s=Math.random){const{left:a,right:e}=balloonBounds(o),l=balloonDistance(o)+.1;let r=[[a,e]];for(const o of t){const t=Math.abs(o.y-n);if(t>=l)continue;const s=Math.sqrt(l*l-t*t),a=o.x-s,e=o.x+s,i=[];for(const[t,o]of r)e<=t||a>=o?i.push([t,o]):(a>t&&i.push([t,a]),e<o&&i.push([e,o]));r=i}const i=r.reduce((t,[o,n])=>t+Math.max(0,n-o),0);if(i<.001)return null;let f=Math.max(0,Math.min(.999999,s()))*i;for(const[t,o]of r){if(f<=o-t)return t+f;f-=o-t}return null}export function separateBalloons(t,o){const{left:n,right:s}=balloonBounds(o),a=t=>Math.max(n,Math.min(s,t)),e=balloonDistance(o);for(const o of t)o.x=a(o.x);for(let o=0;o<12;o++){let o=0;for(let n=0;n<t.length;n++)for(let s=n+1;s<t.length;s++){const l=t[n],r=t[s],i=r.x-l.x,f=r.y-l.y;if(Math.abs(i)>=e||Math.abs(f)>=e)continue;const h=Math.hypot(i,f);if(h>=e)continue;o=Math.max(o,e-h);const x=h>.001?i/h:0,u=h>.001?f/h:1,M=(e-h+.01)/2;l.x=a(l.x-x*M),r.x=a(r.x+x*M),l.y-=u*M,r.y+=u*M;const y=(r.vx-l.vx)*x+(r.vy-l.vy)*u;if(y<0){const t=y*(1+BALLOON_BOUNCE)/2;l.vx+=t*x,r.vx-=t*x,l.vy+=t*u,r.vy-=t*u}}if(o<.01)return}const l=[...t].sort((t,o)=>t.y-o.y);for(let t=1;t<l.length;t++){const o=l[t];for(let n=0;n<t;n++){const t=l[n],s=o.x-t.x;Math.abs(s)>=e||(o.y=Math.max(o.y,t.y+Math.sqrt(e*e-s*s)+.01))}}}
@@ -0,0 +1 @@
1
+ "use strict";import{effects,extrude,lathe,merge,Path,quat,tube}from"@nayan-ui/engine";import{lighten}from"../../services/GamesConstants.js";import{at,facing,pointSize}from"../shared/EngineMeadow.js";import{createGameMesh as _0x1a71e2}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{BALLOON_COLORS,FRAME_TIME,POP_SWELL,POP_TIME,RAINBOW}from"./BalloonBlasterConstants.js";const PER_SECOND=1/FRAME_TIME,PROFILE=[[.001,-.6],[.07,-.57],[.17,-.5],[.3,-.36],[.42,-.17],[.49,.03],[.5,.18],[.47,.34],[.39,.48],[.26,.58],[.12,.622],[.001,.625]],KNOT=[[.001,-.68],[.06,-.66],[.045,-.62],[.02,-.59],[.001,-.585]];let meshes;export function balloonMeshes(){return meshes??={body:_0x1a71e2(merge([{geometry:lathe(PROFILE,{segments:28})},{geometry:lathe(KNOT,{segments:10})}]),{center:!1,shine:.75}),rainbow:_0x1a71e2(merge([{geometry:lathe(PROFILE,{segments:28,color:({v:e})=>{const o=toColor(RAINBOW[Math.min(RAINBOW.length-1,Math.floor(e*RAINBOW.length))]);return[o[0],o[1],o[2]]}})},{geometry:lathe(KNOT,{segments:10}),color:toColor(RAINBOW[0])}]),{center:!1,shine:.75}),string:_0x1a71e2(tube([[0,-.66,0],[.035,-.8,.01],[-.03,-.95,-.01],[.02,-1.08,0],[0,-1.16,0]],{radius:.008,sides:5,smoothness:4,color:[.92,.92,.9]}),{center:!1}),danger:_0x1a71e2(merge([{geometry:extrude((new Path).addCircle(0,0,.5),{depth:.04,color:[.95,.08,.08]})},{geometry:extrude((new Path).addRoundedRect(-.07,-.3,.14,.38,.06),{depth:.02,color:[1,1,1]}),position:[0,0,.03]},{geometry:extrude((new Path).addCircle(0,.24,.075),{depth:.02,color:[1,1,1]}),position:[0,0,.03]}]),{center:!1,shine:.3})},meshes}const colorOf=e=>toColor(e),BOMB=[.07,.07,.08,1],sparkOf=e=>{const[o,t,n]=e;return[Math.min(1,o+.35),Math.min(1,t+.35),Math.min(1,n+.35)]},BALLOON_SPARKS=new Map(BALLOON_COLORS.map(e=>[e,sparkOf(toColor(e))])),LIFE_SPARKS=[...RAINBOW,"#FFFFFF"].map(e=>toColor(e)),BOMB_BURST=["#1f2937","#374151","#f97316","#fde047"].map(e=>toColor(e)),ORANGE=toColor(lighten("#f97316",.2)),depthOf=(e,o)=>e.playDepth-("bomb"===o.kind?.08:0);export function spawnBalloon(e,o,t,n,s,a,i){const r=balloonMeshes(),l=t.size*pointSize(o,depthOf(o,n)),p=e.spawn({mesh:"none",position:at(o,s,a,depthOf(o,n)),rotation:facing(o,-.1),pickable:!1});e.animate(p,{rotation:facing(o,.1)},{duration:1.6+30*Math.abs(i),easing:"easeInOut",repeat:"forever",yoyo:!0});const m=(o,t,n=[0,0,0],s=l)=>e.spawn({mesh:o,parent:p,position:n,scale:s,color:t,pickable:!1});"life"===n.kind?m(r.rainbow,[1,1,1,1]):m(r.body,"balloon"===n.kind?colorOf(n.color):BOMB);const h=e.spawn({mesh:r.string,parent:p,scale:l,color:[1,1,1,1],rotation:quat.z(-.12),pickable:!1});return e.animate(h,{rotation:quat.z(.12)},{duration:1.1+.6*Math.random(),easing:"easeInOut",repeat:"forever",yoyo:!0}),"bomb"===n.kind&&m(r.danger,[1,1,1,1],[0,.05*l,.47*l],.34*l),p}export function placeBalloon(e,o,t,n,s,a,i){const r=at(o,s,a,depthOf(o,n));i?i.position(t,r[0],r[1],r[2]):e.set(t,{position:r})}export function popBalloon(e,o,t,n,s,a,i){const r=pointSize(o),l=t.size*r,p=at(o,a,i,depthOf(o,s)-.6*l);e.stopAnimation(n),e.set(n,{spin:[0,0,0]}),e.animate(n,[{scale:POP_SWELL,at:.3},{scale:0}],{duration:POP_TIME,easing:"linear"}).then(()=>e.despawn(n));const m=.12*PER_SECOND*PER_SECOND*r;if("bomb"===s.kind){effects.explosion(e,{position:p,count:16,size:.7*l,speed:2.6*l,lifetime:.6,gravity:.5*-m,debris:BOMB_BURST,smoke:[.35,.35,.38,.7],flash:!1});const o=e.spawn({mesh:"puff",position:p,scale:1.2*l,color:[2*ORANGE[0],2*ORANGE[1],2*ORANGE[2],.9],pickable:!1});return void e.animate(o,{scale:3.6*l,color:[2,.9,.2,0]},{duration:.35}).then(()=>e.despawn(o))}const h="life"===s.kind?LIFE_SPARKS:[colorOf(s.color),BALLOON_SPARKS.get(s.color)];"life"===s.kind?effects.sparkle(e,{position:p,count:18,size:.08*l,speed:5.5*l,lifetime:.6,gravity:.5*-m,colors:h}):effects.shatter(e,{position:p,count:10,mesh:"cube",size:.11*l,speed:5.5*l,lifetime:.6,gravity:-m,colors:h,dust:!1})}
@@ -0,0 +1 @@
1
+ "use strict";import{block,ellipsoid,lathe,loft,merge,quat,smoothCurve,tube}from"@nayan-ui/engine";import{AXLE_X,wheel}from"../car-racing/CarMeshes.js";import{cacheGameAsset,createGameMesh as _0xc488}from"../shared/EngineMeshes.js";const TAU=2*Math.PI,SMOKED=[.05,.065,.09],BLACK=[.02,.02,.022],SATIN=[.07,.07,.08],CARBON=[.055,.055,.065],ALUMINIUM=[.68,.7,.73],CHROME=[.82,.83,.86],GOLD=[.86,.62,.16],STEEL=[.55,.56,.58],TITANIUM=[.52,.54,.58],HEADLIGHT=[.95,.97,1],DRL=[1.4,1.4,1.45],TAIL_LIGHT=[.85,.04,.04],AMBER=[1,.55,.08],PLATE=[.9,.9,.88],SPRING=[.95,.75,.1],BURNT=[.3,.26,.3],WHEEL_R=.3,FRONT=-.72,REAR=.72,FAIRING=[{z:-.99,bottom:.64,top:.72,width:.04,square:2.4},{z:-.92,bottom:.6,top:.8,width:.15,square:2.8},{z:-.8,bottom:.63,top:.87,width:.22,square:3},{z:-.68,bottom:.66,top:.9,width:.26,square:3},{z:-.56,bottom:.6,top:.88,width:.27,square:3},{z:-.46,bottom:.47,top:.8,width:.26,square:3.2},{z:-.38,bottom:.26,top:.74,width:.25,square:3.4},{z:-.15,bottom:.21,top:.66,width:.22,square:3.4},{z:.04,bottom:.23,top:.62,width:.18,square:3.2},{z:.16,bottom:.32,top:.58,width:.12,square:3}],TANK=[{z:-.54,bottom:.78,top:.86,width:.1,square:3.4},{z:-.42,bottom:.72,top:.915,width:.16,square:3.6},{z:-.22,bottom:.68,top:.915,width:.17,square:3.6},{z:-.04,bottom:.68,top:.87,width:.13,square:3.4},{z:.1,bottom:.72,top:.83,width:.1,square:3}],TAIL=[{z:.02,bottom:.5,top:.79,width:.15,square:3.4},{z:.2,bottom:.56,top:.82,width:.145,square:3.4},{z:.4,bottom:.68,top:.85,width:.125,square:3.2},{z:.6,bottom:.77,top:.89,width:.1,square:3.2},{z:.85,bottom:.84,top:.925,width:.06,square:3},{z:.985,bottom:.875,top:.92,width:.02,square:2.6}],rod=(o,t,e,s,r=10)=>({geometry:tube([o,t],{radius:e,sides:r,smoothness:1}),color:s}),arc=(o,t,e,s,r,i,a=8)=>Array.from({length:a+1},(n,m)=>{const h=r+(i-r)*m/a;return[o,t+Math.sin(h)*s,e-Math.cos(h)*s]}),disc=(o,t=GOLD)=>lathe([[.001,.004],[o,.004],[o,-.004],[.001,-.004]],{segments:36,color:({u:e,position:[s,,r]})=>{const i=Math.hypot(s,r);return i<.55*o?Math.cos(e*TAU*6)>.3?t:BLACK:Math.cos(e*TAU*20)>.85&&i>.66*o&&i<.92*o?BLACK:STEEL}});export const BIKE_FOOTPRINT={length:2.04,halfWidth:smoothCurve([[-1.02,.06],[-.9,.15],[-.7,.26],[-.47,.34],[-.3,.28],[-.06,.3],[.13,.28],[.4,.17],[.7,.12],[1.02,.08]])};let bike=null;export function bikeMeshes(){return cacheGameAsset("bike-racing/BikeMeshes:bikeMeshes",()=>bikeMeshesUncached())}function bikeMeshesUncached(){if(bike)return bike;const o=_0xc488(merge([{geometry:loft(FAIRING,{around:40,smoothness:5})},{geometry:loft(TANK,{around:32,smoothness:4})},{geometry:loft(TAIL,{around:28,smoothness:4})}]),{center:!1,shine:.9}),t=_0xc488(merge([{geometry:ellipsoid([.17,.2,.016],SMOKED,24),position:[0,.93,-.66],rotation:quat.x(.95)}]),{center:!1,shine:.95}),e={rim:.74,spokes:5,rimColor:SATIN,spokeColor:SATIN,gapColor:BLACK},s=[{geometry:wheel(.3,.12,e),position:[0,.3,-.72],rotation:AXLE_X},{geometry:wheel(.3,.19,e),position:[0,.3,.72],rotation:AXLE_X},{geometry:disc(.15,STEEL),position:[.105,.3,.72],rotation:AXLE_X},{geometry:disc(.1,BLACK),position:[-.11,.3,.72],rotation:AXLE_X},{geometry:block(.07,.05,.04,6,BLACK),position:[0,.665,-.965]},{geometry:block(.18,.03,.12,6,ALUMINIUM),position:[0,.885,-.5]},{geometry:block(.26,.06,.4,5,BLACK),position:[0,.83,.25]},{geometry:block(.016,.26,.016,4,CARBON),position:[0,.7,.95]},{geometry:block(.16,.1,.012,6,PLATE),position:[0,.57,.96]},{geometry:block(.08,.025,.02,6,TAIL_LIGHT),position:[0,.895,.975]},{geometry:tube([[0,.42,.2],[0,.68,.12]],{radius:.038,sides:12,smoothness:1,color:({v:o})=>Math.sin(o*TAU*9)>0?SPRING:BLACK})},{geometry:tube(arc(0,.3,-.72,.335,.55,2.3,8),{radius:.06,shape:o=>.25+.75*Math.abs(Math.cos(o*TAU)),sides:12,smoothness:3}),color:CARBON},{geometry:tube(arc(0,.3,.72,.33,.6,1.6,6),{radius:.09,shape:o=>.22+.78*Math.abs(Math.cos(o*TAU)),sides:12,smoothness:3}),color:CARBON},rod([-.11,.37,.06],[-.11,.39,.72],.008,BLACK,6),rod([-.11,.25,.08],[-.11,.21,.72],.008,BLACK,6),{geometry:tube([[.05,.26,-.3],[.08,.25,0],[.12,.26,.2],[.16,.3,.34]],{radius:.025,sides:10,smoothness:4,color:BURNT})},{geometry:tube([[.16,.3,.34],[.185,.4,.52],[.2,.47,.66]],{radius:o=>.048+.008*o,sides:16,smoothness:3,color:TITANIUM,capColor:CARBON})}];for(const o of[-1,1])s.push({geometry:ellipsoid([.075,.016,.05],HEADLIGHT),position:[.07*o,.705,-.925],rotation:quat.y(.45*-o)},{geometry:block(.08,.008,.012,6,DRL),position:[.075*o,.726,-.915],rotation:quat.y(.45*-o)},rod([.085*o,.3,-.72],[.085*o,.56,-.62],.02,CHROME),rod([.085*o,.54,-.63],[.085*o,.9,-.48],.03,GOLD),{geometry:disc(.2),position:[.075*o,.3,-.72],rotation:AXLE_X},{geometry:block(.04,.13,.07,6,GOLD),position:[.11*o,.42,-.64],rotation:quat.x(.5)},...[.46,.52,.58].map(t=>({geometry:block(.012,.018,.16,6,BLACK),position:[.247*o,t,.5*(.52-t)-.33]})),{geometry:block(.03,.26,.24,5,ALUMINIUM),position:[.135*o,.5,.1],rotation:quat.x(-.25)},{geometry:tube([[.12*o,.42,.1],[.12*o,.37,.4],[.115*o,.3,.72]],{radius:.035,shape:o=>.6+.4*Math.abs(Math.sin(o*TAU)),sides:12,smoothness:3,color:ALUMINIUM})},rod([.08*o,.86,-.5],[.28*o,.79,-.47],.016,ALUMINIUM),rod([.27*o,.79,-.47],[.345*o,.785,-.465],.025,BLACK),rod([.14*o,.38,.12],[.27*o,.38,.12],.014,ALUMINIUM),{geometry:block(.01,.12,.09,6,ALUMINIUM),position:[.19*o,.42,.16]},rod([.2*o,.38,.1],[.21*o,.35,-.04],.008,ALUMINIUM,6),rod([.2*o,.84,-.7],[.26*o,.9,-.68],.01,BLACK),{geometry:ellipsoid([.055,.03,.03],BLACK),position:[.28*o,.91,-.68]},{geometry:ellipsoid([.02,.008,.01],AMBER),position:[.3*o,.905,-.7]},rod([0,.64,.95],[.1*o,.64,.95],.008,BLACK),{geometry:ellipsoid([.025,.012,.012],AMBER),position:[.11*o,.64,.95]});const r=_0xc488(merge(s),{center:!1,shine:.5});return bike={body:o,trim:r,glass:t},bike}
@@ -1 +1 @@
1
- "use strict";const _0x4ae340=_0x2d0e;function _0x3f89(){const e=["uMNdOCouWRbE","rCkoWOxcKNGjW5RcVJWctmoi","W6ZcQ2jja0LrWPNcIq","WPj4WRGVWOSwW54","W5TnWP4MaHXUrmo7W5yF","W5LMW7KUEq","WR4PWOWGaG","W6vLdLtcH8oYWPb1gmosuru","CCkcoLxdMSkeFmodW43cTCkCW7hcSq","W5vfWPSMaH14tSoMW5Sq","vCkvmuddI8ow","WRGUW4zuCa","W7ddLNBcM8oc","pYFcUKX0","W7j1g0XU","WPzLy8kLW41rWPC","ywNdVmofWQq","WRGEBmo1kaRdMXWuW5e","pYeG","aSoUW4ddNmkIW4BcH8oO","mdxcPK1EWQq","W5m8lCoRW6hdT2jbWQJdIHdcKG","mcBcRu9pWQ0","W65bW4uUrs3cOa","WQuXtItdNSkTW4L4gSoZFsVcJa","irxcQw1uW7/dSCoElW","W5/cUtxdT07dUIhdIq","B8k/W44","W7TVdhlcTSoYWP1UhmodBGNcPSoiWRhdUW","W4Pro1HV","W5ZdJxddQKW","WR/cUgpcSCkhW6HmsIeRW6uuja","psy2W7hcGL4","WQmLWOFcR8krWOVcI2TNW63dTq/cTW","rmkmWOBcL30cW4dcHGqwqmoD","W7nrW5GpW6JcTmkvmmkTcfO","W6POWPyiq23dVSkc","W4TlWPqNaGjUsCo3W4S","WQVdOaS","dZtcUfjMW5NdN8oIdCoNsG","WRvUBmk8WPy","W7FdKCouWPdcN2S","fSoyW5RdHaXcW5lcLq","W6zTWQFdJY0","ygpdVw9OWRjOW4ru","cmo7Dmk4W4uOWOq","W65kW7TSygq+WOGAW6VdUYXv","WRpdSHysW5RcJGpcM8o/","CmkBkCkseMW2WQu1W4uuACoTkmkpdfK+hxW","r8kjWOBcKYrjW5tcTtqS","W6nTW5pdV8os","W7pdM8ooWPi","xgNdVW","W7XSW4NdLmoT","W5hdHhldOmoLySkEW4NcQa","WQ/cJ3VdKCof","WObUA8klWQdcR3TU","W4xdHhldVmo3zCkzW4K","k8oHWPvVAfFcIGNdUW","WRvZWRT+WQ1ZWO0","xMBdMSohWRftnmky","thZcRY/cKKiG","WPtcT8oftuGO","WOr+BCkQWRhcOhS","WRStA8o8iZhdRH0","W5v9W6a+W4xcICkT","nCopW7RdRmkH","WOhdH2ddJSoImSoB","a8owW5BdHr5eW5BcHIyB","qWiYWONcNG","W5rjmvlcUComWR1ummo/Fq","WPPpWO5eWPW","W7uMxCktW6JcJSoWWO7cR8kaWR8","xgRcSI/cKG","W7PRWRSxpcDbySoa","W6iuF8kHxNRcRIn6lmoU","W7NcSgtcSmkiWR00","bSo+W4BdVCkZW4NcHW","v2tdOmoyWQC","WQRcUMpcQSkoW78","WOTQCCk9WOpcP2T/WQ4","WOvtWOPpWO1oWQO","xI8UW4xcPG","kXpcI3nqW6JdRa","lCk+zxeA","CWOqWQJdNSowzCkOWRK","c8k5qgK6","CSkykCkpcg05WQi/W5u","yIywWQxcVCkp","F8kZW5r9t0ZcNYy","WQjlW6u","W7RdSKZcUCoQ","W6yOy8kcW43cLCo/WPK","W5JdTCoWWRlcQfTJjsFcK8otvmoJ","WRDKWRPJWQrOWO1WvaOnwa","x8kdd1JdJ8oDA8oy","WPRcKCkHW4pdRXPh","W4BdOSkygLu0W4bYnZu","W75AW4aEW7BcPCkynSk7fu3dNNZcV8kQxZpcRYdcISoLW50m","W6hcSZtcHeJdUJVcJmoNW6ddN8kmW67cICkIWOxdHKGIWPu2","CWGwWO3dJq","WR15tCkwWQe","W5xcVtNdQfVdTta","WQ3cP0NcMSky","lWpcJvjbW6FdRmov","oXlcLNfYW6FdTCov","W5H5WPq3Ba","WOzBWQmHW6i","W7ZdGCopWOxcKNfc","vmkUjmknFIhdOSoPW6hdGq","WQxdTaeLW5NcHHi","zIWmWQC","CCkiaCk9sq","q8kYbSk/mKW","W6jVkwpcLmo3WPjW","bcFcT0rQW5hdKCo0hmoQ","qquVWRtcOq","W5hdLwNdN8oezCkaW4K","vSkZWOZcTSoHWP/dH8omf8oRfCoNW7a","WPZcHCkvW5tdNG","WPrYySk4W4rkWPFdK2S","WR4nWR0Rmdj8","g8oTpColW7RcOSkdW4NcGmo8","W78MsmkHW5BcMmoLWPy","u8ogpHbgW7PkzSkpWPjDW5Ss","eCkzAxiT","W6ZdP1ddGh1FWOldId0","WRuDWQy+psG","kWRcNgbBW7pdQa","W7eYqSkeW5RcKSoL","xmokBmkzW44mWOa","WRCrFCoRhG","WPOiW6nUpHdcJmoOWPFdQeHxqq","W7LAW4OdrWlcOcVcTmogjb4","iapcKgzDW7i","WQvJWR1CWQr8WObWydO","WOhcQMldR8oa","W6nPW57dPmosW7tdNKDR","x8oVW5W","WR5HWPWgWO3cNSoGWPy","W4TBWRqWBfRdLCowWOpdQgjCFSklW4q","z2hdSbCnW7P6W61wWP/cU8oo","WQhdPaC","WOxcU0tdQmoRW6es","WOboWOKXWOK","cdycW5tcVG","zCkuf8k7rapdLW","vmk5W6rDtW","WPpcP8oBwLKJW5C","AtynWRdcSmkvvW","dG8qW6pcHSk/W5G","fCkwovldImocAa","W4zwWQ3dQtdcR8oa","W4xdGgVdISouDSkmW5ZcRepcNa","WQKbWPPxg1xcHdBcL8o9caK","sgFdL8oWW7W","E8kJW5jCxKpcNW","WPDFW6ZdP2xcVCkfz8kT","cSoTW5ldVmkZW5m","W4aMu8ktWP/cVCo2WP/cTSklW6W","W4hdLhtdNCoMASkz","eCoGW5qAWQnABa"];return(_0x3f89=function(){return e})()}!function(){const e="IP7R",t=_0x2d0e,W=_0x3f89();for(;;)try{if(317006==parseInt(t(356,e))/1+-parseInt(t(249,"cr8v"))/2+-parseInt(t(378,"cr8v"))/3+parseInt(t(264,"cr8v"))/4*(-parseInt(t(259,e))/5)+parseInt(t(347,"L(HJ"))/6+parseInt(t(365,"Lblu"))/7*(-parseInt(t(248,"MMFZ"))/8)+parseInt(t(339,"jubZ"))/9)break;W.push(W.shift())}catch(e){W.push(W.shift())}}();import _0x2e4b1e,{useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureDetector,Gesture,GestureHandlerRootView}from"react-native-gesture-handler";import{useBikeRacingStore,useScore,useIsPlaying,useGameOver,useObstacles,usePlayerBike,useParticleEffects,useLives}from"./BikeRacingStore.js";import{BikeRacingService}from"./BikeRacingService.js";import{GameBackground}from"./components/GameBackground.js";import{BikeComponent}from"./components/BikeComponent.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,ParticleBlast}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";import{BIKE_RACING_COLORS,BIKE_RACING_GAME_CONFIG}from"./BikeRacingConstants.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x142886,jsxs as _0x35370e}from"react/jsx-runtime";const{width:width,height:height}=getGameDimensions(),PARTICLE_COLORS=["#ff6600","#ff8833",_0x4ae340(282,"H]dN"),_0x4ae340(291,"pVd5"),_0x4ae340(376,"%V!$"),_0x4ae340(366,"Lx%x")];export const BikeRacing=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:W,onReplayGame:o,onShare:n,onShareScreenshot:r,onShowLeaderboard:a,bannerAd:s})=>{const d=")Yiq",i="BxPh",u=_0x4ae340,S={CNxTx:u(235,"IP7R"),qCClg:function(e,t){return e!==t},wqKIs:function(e,t){return e-t},ZvRVY:function(e,t){return e-t},gdTuN:function(e,t,W){return e(t,W)},svgWg:function(e,t,W){return e(t,W)},VvfHB:u(242,"(p&Z"),LoDst:u(372,"aWs%"),qncQS:function(e,t){return e(t)},ResdB:function(e){return e()},KGOfd:function(e){return e?.()},Tkxhf:function(e,t){return e*t},ZOuan:function(e,t){return e/t},eaFeT:function(e,t){return e/t},Pasrq:function(e){return e()},kNJJD:function(e){return e()},iKVMZ:function(e,t,W){return e(t,W)},KFPvt:function(e,t,W){return e(t,W)},PDNcw:function(e,t,W){return e(t,W)}},x=e?.[u(348,"$T50")]??!0,m=e?.[u(246,"pVd5")]??!0,k=e?.[u(247,"nR&W")]??0,l=useScore(),R=useIsPlaying(),_=S.Pasrq(useGameOver),C=useLives(),f=S[u(301,"jubZ")](useObstacles),p=S[u(231,"&yRi")](usePlayerBike),G=useParticleEffects(),I=useRef(!1),O=useRef(W);O[u(367,"aWs%")]=W;const B=useRef(x);B[u(325,")Yiq")]=x;const g=useRef(m);g[u(344,"[tsp")]=m;const h=useCallback(e=>{const t=u,W={};W[t(383,"3$P3")]=S[t(258,"aWs%")];const o=W;if(O[t(380,"Ndxn")]&&!I[t(260,i)])if(S[t(321,"L(HJ")](t(228,"IP7R"),t(322,"imcy")))_0x374987(o.cQCyW);else{const W=useBikeRacingStore[t(319,"B^Se")]()[t(288,"!zQO")];O[t(260,i)]({status:e,score:W[t(329,"DzJ(")]()}),I[t(323,"g99z")]=!0}},[]),P=S[u(297,"Lblu")](useCallback,(e,t)=>useBikeRacingStore.getState()[u(352,"MMFZ")](e,t),[]),y=useCallback(()=>useBikeRacingStore[u(271,"5y$8")]()[u(320,"B^Se")](),[]),N=useCallback(()=>useBikeRacingStore[u(304,"(p&Z")]().resetGame(),[]),b=useCallback(e=>{const t=u;if(t(316,"5y$8")!==t(346,"BgVj"))useBikeRacingStore[t(241,"#DI9")]().removeParticleEffect(e);else if(_0x2b6d11[t(298,"B^Se")]&&!_0x220a3a[t(298,"B^Se")]){const e=_0x1555c0[t(272,"H]dN")]()[t(229,"Fbxa")];_0x2babe9.current({status:_0x2f0af5,score:e[t(307,"[tsp")]()}),_0x18944a[t(336,"3$P3")]=!0}},[]),T=_0x2e4b1e.useMemo(()=>new BikeRacingService(BIKE_RACING_GAME_CONFIG[u(302,"EE15")],BIKE_RACING_GAME_CONFIG[u(313,"#SmB")]),[]);_0x2e4b1e.useEffect(()=>{const e=u;useBikeRacingStore.getState()[e(269,"H]dN")](k);const t=S[e(318,"pVd5")](S[e(360,"nR&W")](height,BIKE_RACING_GAME_CONFIG[e(263,"EE15")]),BIKE_RACING_GAME_CONFIG.BIKE_HEIGHT);T[e(350,"bY9K")](t)},[k,T]),_0x2e4b1e[u(379,"mPaF")](()=>{T[u(384,"DzJ(")](()=>{const e=_0x2d0e;S[e(351,"[j0k")](playSound,GAME_SOUNDS[e(381,"EGFZ")].CRASH,B[e(375,"H]dN")]),playHaptic(HapticType[e(382,"$T50")],g.current)},()=>{const e=_0x2d0e;playSound(GAME_SOUNDS.BIKE_RACING.PASS,B[e(371,"(p&Z")]),S[e(315,"k)0R")](playHaptic,HapticType[e(286,"bY9K")],g[e(364,"QDW9")])})},[T]),_0x2e4b1e[u(262,")Yiq")](()=>{const e=u,t={};t.MIoRd=e(270,"[j0k");const W=t;if(!R)return;const o=setGameInterval(()=>{const t=e,o={};o[t(268,"MMFZ")]=t(266,"g99z");const n=o;if(t(284,"QDW9")!==W[t(299,"jubZ")]){if(_0x41f2e6&&!_0x257997[t(278,"5y$8")]){const e=_0x57a986>0?"win":n.lqvBK;_0xe4d02f(e)}!_0x38296f&&(_0x41bc7b[t(363,"%a4)")]=!1)}else useBikeRacingStore[t(234,"GIXn")]().decrementTime()},1e3);return()=>clearGameInterval(o)},[R]),_0x2e4b1e.useEffect(()=>{const e=u;if(_&&!I.current){const t=C>0?S.VvfHB:e(326,"QDW9");h(t)}!_&&(I[e(292,"GIXn")]=!1)},[_,C,h]),_0x2e4b1e.useEffect(()=>()=>{const e=_0x2d0e;useBikeRacingStore.getState().isPlaying&&!I[e(311,"xI7c")]&&h("cancel"),T[e(280,"#SmB")](),N()},[T]);const A=useCallback(()=>{const e=u,t=S[e(362,"(p&Z")][e(265,"MMFZ")]("|");let W=0;for(;;){switch(t[W++]){case"0":T[e(300,"k)0R")]();continue;case"1":playSound(GAME_SOUNDS[e(285,"DzJ(")].START,B.current);continue;case"2":I[e(358,"[j0k")]=!1;continue;case"3":P(BIKE_RACING_GAME_CONFIG[e(308,"g99z")],k);continue;case"4":playHaptic(HapticType[e(296,"bY9K")],g.current);continue}break}},[P,k,T]),E=useCallback(()=>{const e=u;S.qncQS(h,e(377,"&yRi")),S[e(255,"5y$8")](y),T[e(332,"H]dN")]()},[h,y,T]),M=useCallback(()=>{const e=u;S[e(244,"Fbxa")](o),N(),T[e(343,"B^Se")]()},[N,T,o]),H=useRef(new Map),K=useCallback(e=>{const t=u;let W=H[t(230,"1]LF")][t(357,")Yiq")](e);return!W&&(W=()=>{const W=t;b(e),H[W(323,"g99z")][W(277,"%a4)")](e)},H[t(274,"bY9K")].set(e,W)),W},[b]),Q=S[u(340,"jubZ")](useRef,1),v=useMemo(()=>{const e=u,t=S[e(388,"8j1g")](BIKE_RACING_GAME_CONFIG[e(330,"B^Se")],BIKE_RACING_GAME_CONFIG[e(324,"jd]4")]);return{roadStartX:S.ZOuan(width-t,2),laneWidth:BIKE_RACING_GAME_CONFIG[e(337,"fscj")],maxLane:BIKE_RACING_GAME_CONFIG[e(252,"EGFZ")]-1}},[]),L=S[u(315,"k)0R")](useMemo,()=>Gesture[u(305,"cHqy")]()[u(275,"&yRi")](e=>{const t=u;if(!useBikeRacingStore[t(319,"B^Se")]()[t(240,"B^Se")])return;const W=e[t(335,"1]LF")]-v[t(283,"cr8v")],o=Math[t(293,"&yRi")](S[t(334,"xI7c")](W,v[t(295,"5y$8")])),n=Math[t(253,d)](0,Math[t(353,"%V!$")](v[t(317,"#DI9")],o));S[t(359,"Ndxn")](n,Q[t(361,"jd]4")])&&(Q.current=n,playSound(GAME_SOUNDS.BIKE_RACING[t(386,"EGFZ")],B[t(325,d)]),playHaptic(HapticType[t(341,"7(pT")],g[t(276,"!zQO")])),T[t(243,"DzJ(")](n)})[u(238,"$T50")](!0),[v,T]),V=S.iKVMZ(useMemo,()=>({isPlaying:R,gameOver:_,onStartGame:A,onStopGame:E,onShare:n,onShowLeaderboard:a,startButtonSubtext:"Dodge traffic to score!"}),[R,_,A,E,n,a]),j=useMemo(()=>({isVisible:_,score:l,onPlayAgain:M,buttonText:u(374,"[tsp"),title:C>0?u(354,"imcy"):u(251,"L(HJ"),message:C>0?u(385,"Lx%x"):u(314,"#DI9")}),[_,l,M,C]),F={};F.width=width,F[u(338,"[tsp")]=width;const q=useMemo(()=>[styles[u(368,"H]dN")],F],[]),w=S[u(306,"OTar")](useMemo,()=>({gameId:GAME_IDS[u(250,"#SmB")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),Z={};Z.width=width,Z[u(256,"g99z")]=height;const D={};D[u(373,"GIXn")]=k;const U={};U.id=u(294,"pVd5"),U.x=p.x,U.y=p.y,U.width=p[u(327,"jd]4")],U[u(303,"QDW9")]=p[u(349,"B^Se")],U[u(389,"OTar")]=BIKE_RACING_COLORS[u(290,"u#r$")],U[u(310,"Lx%x")]=!0;const J={...V},z={...j};z.onShare=r,z[u(279,"BgVj")]=s;const Y={...w};return S[u(331,"QDW9")](_0x142886,GestureHandlerRootView,{style:styles.container,children:_0x35370e(View,{style:q,children:[_0x142886(View,{style:StyleSheet[u(309,"bY9K")],children:_0x142886(GameBackground,Z)}),_0x142886(ScoreBoard,D),_0x142886(GestureDetector,{gesture:L,children:_0x35370e(View,{style:styles[u(257,"cr8v")],children:[f[u(267,"&yRi")](e=>_0x142886(BikeComponent,{id:e.id,x:e.x,y:e.y,width:e[u(370,"ib8F")],height:e[u(342,"3$P3")],color:e[u(245,"7(pT")],isPlayer:!1},e.id)),S[u(281,"GIXn")](_0x142886,BikeComponent,U)]})}),G[u(233,"nR&W")](e=>_0x142886(ParticleBlast,{x:e.x,y:e.y,particleCount:5,colors:PARTICLE_COLORS,duration:600,onComplete:K(e.id)},e.id)),_0x142886(GameControlButton,J),_0x142886(GameOverModal,z),_0x142886(GameSettingsModal,Y)]})})};const _0x5e065b={flex:1};_0x5e065b[_0x4ae340(355,"L(HJ")]=BIKE_RACING_COLORS[_0x4ae340(254,"B^Se")],_0x5e065b[_0x4ae340(232,"BgVj")]=_0x4ae340(387,"Lx%x");const _0x5b9f21={flex:1};_0x5b9f21.alignSelf=_0x4ae340(328,"EE15");const _0x4457e9={};function _0x2d0e(e,t){e-=228;const W=_0x3f89();let o=W[e];if(void 0===_0x2d0e.VbWwdW){const e=function(e,t){let W,o,n=[],r=0,a="";for(e=function(e){let t="",W="";for(let W,o,n=0,r=0;o=e.charAt(r++);~o&&(W=n%4?64*W+o:o,n++%4)?t+=String.fromCharCode(255&W>>(-2*n&6)):0)o="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(o);for(let e=0,o=t.length;e<o;e++)W+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),o=0;o<256;o++)n[o]=o;for(o=0;o<256;o++)r=(r+n[o]+t.charCodeAt(o%t.length))%256,W=n[o],n[o]=n[r],n[r]=W;o=0,r=0;for(let t=0;t<e.length;t++)o=(o+1)%256,r=(r+n[o])%256,W=n[o],n[o]=n[r],n[r]=W,a+=String.fromCharCode(e.charCodeAt(t)^n[(n[o]+n[r])%256]);return a};_0x2d0e.VAQUem=e,_0x2d0e.ILgAzp={},_0x2d0e.VbWwdW=!0}const n=W[0];_0x2d0e.JyxxXl!==n&&(_0x2d0e.ILgAzp={},_0x2d0e.JyxxXl=n);const r=_0x2d0e.ILgAzp[e];return void 0===r?(void 0===_0x2d0e.XXSKfw&&(_0x2d0e.XXSKfw=!0),o=_0x2d0e.VAQUem(o,t),_0x2d0e.ILgAzp[e]=o):o=r,o}_0x4457e9.flex=1;const _0x2f5624={};_0x2f5624[_0x4ae340(289,"EGFZ")]=_0x5e065b,_0x2f5624[_0x4ae340(287,"[tsp")]=_0x5b9f21,_0x2f5624.gameArea=_0x4457e9;const styles=StyleSheet[_0x4ae340(237,"IP7R")](_0x2f5624);
1
+ "use strict";import _0x346788,{useCallback,useEffect,useRef,useState}from"react";import{haptics}from"@nayan-ui/engine";import{resolveGameTheme}from"../../services/ThemeService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{GameLoading}from"../shared/GameLoading.js";import{GameLoadingTransition}from"../shared/GameLoadingTransition.js";import{useGameResource}from"../shared/useGameResource.js";import{AUTOPLAY,DAY_LIGHT,EDGE,getCachedAssets,LIVES,loadAssets,NIGHT_LIGHT,NIGHT_SKY,SKY,STEER_WIDTH,TRACK_LENGTH}from"./BikeRacingConstants.js";import{createGame,dispose,setAudible,setNight,start,steer,tick}from"./BikeRacingGame.js";import{jsx as _0x1b3441}from"react/jsx-runtime";export{preloadBikeRacing}from"./BikeRacingConstants.js";const RESULTS_DELAY=1200,Run=_0x346788.memo(({assets:e,night:t,onRestart:s,settings:a,onSettingsChange:n,onEndGame:r,onReplayGame:o,onShare:i,onShareScreenshot:u,onShowLeaderboard:m,bannerAd:l})=>{const g=useRef(t),d=useGameResource(()=>createGame(e,g.current),e=>()=>{"playing"===e.phase&&L("cancel"),dispose(e)});useEffect(()=>{setNight(d,t)},[d,t]);const f=useRef(1),[S,G]=useState("ready"),[h,E]=useState(!1),[R,T]=useState(0),[p,A]=useState(LIVES),[C,b]=useState(TRACK_LENGTH),I=useRef(!1),_=useRef(r);_.current=r;const L=useCallback(e=>{_.current&&!I.current&&(I.current=!0,_.current({status:e,score:d.score.toString()}))},[d]);useEffect(()=>{haptics.enabled=a.enableHaptics},[a.enableHaptics]),useEffect(()=>{d.onPhase=G,d.onLives=A,d.onDistance=b,d.onScore=T},[d]),useEffect(()=>{if("over"!==S)return;L(d.lives>0?"win":"lose");const e=setTimeout(()=>E(!0),1200);return()=>clearTimeout(e)},[S,d,L]),useEffect(()=>{if(!AUTOPLAY||"playing"===S)return;const e=setTimeout("ready"===S?()=>start(d):s,"ready"===S?1500:3e3);return()=>clearTimeout(e)},[S,d,s]);const k=useCallback(e=>setAudible(d,e),[d]),H=useCallback(e=>tick(d,e),[d]),D=useCallback(({phase:e,dx:t})=>steer(d,e,t,2*EDGE/(STEER_WIDTH*f.current)),[d]),x=useCallback(()=>{I.current=!1,start(d)},[d]),N=useCallback(()=>{L("cancel"),s()},[L,s]),v=useCallback(()=>{o?.(),s()},[o,s]),j=p>0;return _0x1b3441(EngineGameScreen,{onAudioChange:k,gameId:GAME_IDS.BIKE_RACING,settings:a,onSettingsChange:n,onShare:u??i,onShowLeaderboard:m,bannerAd:l,source:d.world,feedback:d.hudFeedback,camera:d.camera,light:t?NIGHT_LIGHT:DAY_LIGHT,background:t?NIGHT_SKY:SKY,fog:.0075,onUpdate:H,onDrag:D,onResize:e=>{f.current=e},columns:[scoreColumn(R),livesColumn(p,LIVES),textColumn("TRACK",C+" m")],playing:"playing"===S,subtext:"Dodge traffic to score!",onStart:x,onStop:N,gameOver:h?{title:j?"FINISHED!":"CRASHED!",message:j?"You crossed the finish line! Great riding!":"Out of lives "+(TRACK_LENGTH-C)+" m into the "+TRACK_LENGTH+" m race.",scoreLabel:"Final Score",score:R,buttonText:"Race Again!",onPlayAgain:v,onShare:u}:null})});Run.displayName="BikeRacingRun";export const BikeRacing=engineGame(GAME_IDS.BIKE_RACING,e=>{const t=e.settings,s=resolveGameTheme(t.theme),[a,n]=useState(0),[r,o]=useState(getCachedAssets),[i,u]=useState(null);useEffect(()=>{if(r)return;let e=!0;return loadAssets().then(t=>e&&o(t)).catch(t=>e&&u(t.message)),()=>{e=!1}},[r]);const m=useCallback(()=>n(e=>e+1),[]),l=s.isDark;return _0x1b3441(GameLoadingTransition,{ready:!!r,loader:_0x1b3441(GameLoading,{gameId:GAME_IDS.BIKE_RACING,theme:t.theme,offset:t.offset,error:!!i,message:i??void 0}),children:r&&_0x1b3441(Run,{...e,settings:t,assets:r,night:l,onRestart:m},a)})});
@@ -1 +1 @@
1
- "use strict";function _0x345b(){const W=["l3FcOxiwWPfC","W6KfW5m2FSkrEK3cV8kJWRu","WRWZzmooutlcISoCW74LCq","BYzIwKNcSCoB","W6BcJ2K2W4hcVxTJW6GjCq","WRBcR8o5oqNcICoZF8kbFNi","WR9rWPTui8kAWQi","W7ZdL3bsW5TmmCkhEN0","oqbXWQBcISkKF8kZWP8","WR8fWPLri8onW7i","amkJW5XZWRVdGCoHWPi","WR9rWPTsjComW7q","W5OsW61DW67cLdpcPWWC","wcNcVL1zjSo9kYtdRa","WPdcQ8k9WQ1Auea","WR42ASolv13cRmoQW7mpx8kx","W4L2DmkAWOOmW44","WRr9WPyFmdj2yv3dVW","W4hdTSkPW7fF","Fmk+WPKLcSoVWPJdISk1cYpdKqedWR0","oSo3W5dcKmkDp0/dUmoLmW","huFcS8kYvCoiWOe","wNOfW5ldRmkGx8kwWOjPWQS","W7W0WRxdMxhdPmoHW7tcS2WWBa","d07cSCoJamoCWRufuSo5W4m","W4bYWQT8dvCOiwu","WOHhASofWPbMicK","W6SbW5u1Emoiu3/cRCkZWQj5","deZcVmoMa8kDWOClA8owW7X2","ySkClM8iW7/dH8kY","sIhdUMmf","d0RcSCoHcCoLWOO3r8o2W6C","WPvZWRfqd8k+u33cImkZWOLEFCkoaG","W7iLB8ooymk1y8k5vt5EFq","W5xdRsNcM8kzW6rd","c0qtpYZcImo5j8o2W5u","tHnzsXHiWPatW7tcKmk2W4xcMx4k","W67cKmoFW4RcKSk6D1hdSq","WPFdPhxdRJi","W7m3ASokWOb/iWOzWRC","W7GKhCknW6hdRmo8WP3cU13cPCkT","W6tdQJ0bhSknW6S","trbewGzCWPusW7/cMG","rmkfWQBdOSoXwgldQ8ofoead","xa7cLMfR","W5qkW6aHbtHLA1a","mCoKW5/cHSkrn0hdRSo0pL4","WRr4lmkwna","WPNcISkquXxcO8obWRC","dCojW4qKWPq","W780W4HTW5K","WQXGo8kCb1JdKa","WQpdRwVdTYm","Dw8cgXJcHmoO","W7SYWRldNxhcSCokW4pcVNKW"];return(_0x345b=function(){return W})()}const _0x401ac9=_0x2768;!function(){const W="J8Z9",o=_0x2768,_=_0x345b();for(;;)try{if(262331==-parseInt(o(220,"OeS]"))/1*(parseInt(o(214,"ni0&"))/2)+-parseInt(o(258,W))/3+-parseInt(o(264,"RIGL"))/4*(-parseInt(o(250,"B&pr"))/5)+parseInt(o(237,"B&pr"))/6*(-parseInt(o(225,"#Iwd"))/7)+parseInt(o(234,W))/8*(-parseInt(o(233,"0Yn5"))/9)+parseInt(o(223,"0Ax("))/10*(-parseInt(o(245,"7ulw"))/11)+-parseInt(o(259,"B)[)"))/12*(-parseInt(o(257,"E)D4"))/13))break;_.push(_.shift())}catch(W){_.push(_.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions}from"../../services/UtilsService.js";const SCALE=getGameDimensions()[_0x401ac9(230,"738q")]/360;export const BIKE_RACING_GAME_CONFIG={GAME_DURATION:120,BIKE_WIDTH:Math.round(40*SCALE),BIKE_HEIGHT:Math[_0x401ac9(218,"D2Z&")](70*SCALE),OBSTACLE_WIDTH:Math[_0x401ac9(227,"@s6Y")](40*SCALE),OBSTACLE_HEIGHT:Math[_0x401ac9(229,"P6yq")](70*SCALE),ROAD_LANES:3,LANE_WIDTH:Math[_0x401ac9(253,"2!8U")](90*SCALE),ROAD_SPEED:5,OBSTACLE_SPAWN_INTERVAL:2e3,COLLISION_TOLERANCE:Math.round(5*SCALE),POINTS_PER_OBSTACLE_PASSED:500,LANE_SWITCH_DURATION:150,PLAYER_BOTTOM_MARGIN:150};const _0x428fe7={};_0x428fe7[_0x401ac9(248,"N6$9")]=BACKGROUND_COLOR,_0x428fe7.PRIMARY=PRIMARY_COLOR,_0x428fe7[_0x401ac9(260,"wFN%")]=BACKGROUND_COLOR,_0x428fe7[_0x401ac9(247,"738q")]=_0x401ac9(249,"2!8U"),_0x428fe7[_0x401ac9(243,"E)D4")]=_0x401ac9(231,"B&pr"),_0x428fe7[_0x401ac9(226,"0Ax(")]=_0x401ac9(244,"vmSI"),_0x428fe7[_0x401ac9(215,"0Yn5")]=_0x401ac9(251,"r0)h"),_0x428fe7.SKY_BLUE=_0x401ac9(256,"B)[)"),_0x428fe7[_0x401ac9(239,"*N&]")]=_0x401ac9(246,"vmSI"),_0x428fe7[_0x401ac9(254,"A2od")]=_0x401ac9(238,"0Yn5"),_0x428fe7[_0x401ac9(212,"zwCO")]=_0x401ac9(235,"18*z"),_0x428fe7[_0x401ac9(216,"teE1")]=_0x401ac9(241,"vmSI"),_0x428fe7.UI=PRIMARY_COLOR;export const BIKE_RACING_COLORS=_0x428fe7;function _0x2768(W,o){W-=210;const _=_0x345b();let t=_[W];if(void 0===_0x2768.eWkqPq){const W=function(W,o){let _,t,e=[],x=0,n="";for(W=function(W){let o="",_="";for(let _,t,e=0,x=0;t=W.charAt(x++);~t&&(_=e%4?64*_+t:t,e++%4)?o+=String.fromCharCode(255&_>>(-2*e&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(let W=0,t=o.length;W<t;W++)_+="%"+("00"+o.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(_)}(W),t=0;t<256;t++)e[t]=t;for(t=0;t<256;t++)x=(x+e[t]+o.charCodeAt(t%o.length))%256,_=e[t],e[t]=e[x],e[x]=_;t=0,x=0;for(let o=0;o<W.length;o++)t=(t+1)%256,x=(x+e[t])%256,_=e[t],e[t]=e[x],e[x]=_,n+=String.fromCharCode(W.charCodeAt(o)^e[(e[t]+e[x])%256]);return n};_0x2768.FeYegG=W,_0x2768.bzubtJ={},_0x2768.eWkqPq=!0}const e=_[0];_0x2768.lqMgNM!==e&&(_0x2768.bzubtJ={},_0x2768.lqMgNM=e);const x=_0x2768.bzubtJ[W];return void 0===x?(void 0===_0x2768.YcwrrN&&(_0x2768.YcwrrN=!0),t=_0x2768.FeYegG(t,o),_0x2768.bzubtJ[W]=t):t=x,t}export const getLanePosition=(W,o)=>{const _=_0x401ac9,t={};t[_(210,"18*z")]=function(W,o){return W*o},t.xALZg=function(W,o){return W/o};const e=t,x=e[_(232,"D2Z&")](BIKE_RACING_GAME_CONFIG[_(222,"teE1")],BIKE_RACING_GAME_CONFIG[_(252,"#Iwd")]);return e.xALZg(o-x,2)+e[_(224,"N6$9")](W,BIKE_RACING_GAME_CONFIG[_(242,"W^c2")])+BIKE_RACING_GAME_CONFIG[_(255,"0Ax(")]/2-BIKE_RACING_GAME_CONFIG[_(219,"^lz8")]/2};
1
+ "use strict";import{loadAssets as _0x4361e2}from"../car-racing/CarRacingConstants.js";import{bikeMeshes}from"./BikeMeshes.js";export{AUTOPLAY,CAMERA_FOV,DAY_LIGHT,EDGE,FINISH_CLEAR,LANES,LATERAL_SPEED,NIGHT_LIGHT,NIGHT_SKY,ROAD_HALF,SKY,STEER_RESPONSE,STEER_WIDTH,TRACK_LENGTH,getRacingSounds}from"../car-racing/CarRacingConstants.js";export const LIVES=3;export const POINTS_PER_BIKE_PASSED=500;export const START_SPEED=30;export const TRAFFIC_SPEED=16;export const SPAWN_AHEAD=170;export const CRASH_SLOWDOWN=.5;export const INVULNERABLE=1.6;export const NEAR_MISS_GAP=1.3;export const LEAN=.045;export const MAX_LEAN=.5;export const PLAYER_PAINT=[1,.4,0];export const PAINTS=[[0,.4,1],[0,.85,.4],[1,0,1],[.95,.95,.97],[.12,.12,.14],[1,.82,.1]];export const SUIT=[.11,.12,.15];export const SUIT_TRIM=[.3,.32,.36];export const VISOR=[.05,.06,.09];let assets,cachedAssets=null;export const getCachedAssets=()=>cachedAssets;export function loadAssets(){return assets??=_0x4361e2().then(s=>{const{body:t,trim:e,glass:o}=bikeMeshes();return{...s,bike:{body:t,trim:e,glass:o,size:[Math.max(t.size[0],e.size[0]),Math.max(t.size[1],e.size[1]),Math.max(t.size[2],e.size[2])]}}}),assets.then(s=>{cachedAssets=s},()=>{}),assets.catch(()=>assets=void 0),assets}export function preloadBikeRacing(){loadAssets().catch(()=>{})}export function*warmAssets(){yield bikeMeshes,yield loadAssets}
@@ -0,0 +1 @@
1
+ "use strict";import{audio,effects,haptics,World}from"@nayan-ui/engine";import{playBankSound}from"../../services/SoundsService.js";import{buildHorizon,buildRoad,burn,burning,clamp,explode,forwardOf,newSample,orient,pick,placeAt,placeSegment,rand,recycleRoad,rightOf,setHorizonNight,spawnProps,spawnRaceMarkers,Track}from"../car-racing/CarRacingScene.js";import{frontHit,overlapAcross}from"../shared/EngineFootprint.js";import{createChase,updateChase}from"../shared/EngineRacingChase.js";import{sideImpactSpeed,smoothSteeringPose,stepSteering}from"../shared/EngineRacingHandling.js";import{BIKE_FOOTPRINT}from"./BikeMeshes.js";import{AUTOPLAY,CAMERA_FOV,CRASH_SLOWDOWN,EDGE,FINISH_CLEAR,getRacingSounds,INVULNERABLE,LANES,LATERAL_SPEED,LEAN,LIVES,MAX_LEAN,NEAR_MISS_GAP,PAINTS,PLAYER_PAINT,POINTS_PER_BIKE_PASSED,ROAD_HALF,SPAWN_AHEAD,START_SPEED,STEER_RESPONSE,TRACK_LENGTH,TRAFFIC_SPEED}from"./BikeRacingConstants.js";import{leanBike,setBikeNight,spawnBike}from"./BikeRacingScene.js";const WHEELIE=.38,WHEELIE_TIME=1.1,tmp=[0,0,0],driveRotation=[0,0,0,1],at=[0,0,0],sample=newSample(),look=newSample();export function createGame(e,a){const s=new World(2600),t={eye:[5,2.5,5],target:[0,.6,0],fov:CAMERA_FOV},n=buildRoad(s,e),o=buildHorizon(s,a),i=spawnBike(s,e,PLAYER_PAINT,[0,e.bike.size[1]/2,0],a);s.listener=i.root;const r={world:s,night:a,track:new Track,chase:createChase(),assets:e,camera:t,player:i,horizon:o,segments:n,traffic:[],burning:[],phase:"ready",time:0,s:0,d:0,target:0,dragX:0,speed:0,lateral:0,steeringGoal:0,steeringPose:{yaw:0,roll:0},spawnTimer:.5,invulnerable:0,scrape:0,orbit:0,wheelie:0,wobble:0,get score(){return s.scoreboard.score},get lives(){return s.scoreboard.lives},left:TRACK_LENGTH,shake:0,engine:null,audible:!0,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onDistance:e=>{},hudFeedback:{}};for(const e of n)placeSegment(r,e),spawnProps(r,e);return s.scoreboard.reset(LIVES),spawnRaceMarkers(s,r.track,0,TRACK_LENGTH,e.font),r}const ENGINE={volume:.3,loop:!0,pitch:1.45};export function start(e){if(!e.world.isDisposed&&"ready"===e.phase){e.phase="playing",e.speed=.55*START_SPEED,e.wheelie=1.1;for(let a=45;a<Math.min(SPAWN_AHEAD,TRACK_LENGTH-FINISH_CLEAR);a+=rand(16,24))spawnTraffic(e,a);e.engine=e.audible?getRacingSounds().play("engine",ENGINE):null,!e.engine&&getRacingSounds().ready.then(()=>{e.world.isDisposed||!e.audible||"playing"!==e.phase||e.engine||(e.engine=getRacingSounds().play("engine",ENGINE))}),e.onPhase("playing"),playBankSound(getRacingSounds(),"nitro",{volume:.6,pitch:1.2}),haptics.impact(.6,.4)}}export function setAudible(e,a){if(e.audible=a,!a)return audio.stop(e.engine),void(e.engine=null);if("playing"!==e.phase||e.engine||e.world.isDisposed)return;const s=()=>{e.world.isDisposed||!e.audible||"playing"!==e.phase||e.engine||(e.engine=getRacingSounds().play("engine",ENGINE))};s(),e.engine||getRacingSounds().ready.then(s)}export function setNight(e,a){if(!e.world.isDisposed&&e.night!==a){e.night=a,setHorizonNight(e.world,e.horizon,a),setBikeNight(e.world,e.player,a);for(const s of e.traffic)setBikeNight(e.world,s,a);for(const s of e.segments)for(const t of s.lights)e.world.set(t.entity,{color:a?t.night:t.day})}}export function steer(e,a,s,t){"playing"===e.phase&&("start"===a&&(e.dragX=0),"end"!==a&&(e.target=clamp(e.target+(s-e.dragX)*t,-EDGE-.6,EDGE+.6),e.dragX=s))}export function dispose(e){audio.stop(e.engine),e.world.dispose()}function drive(e,a,s,t,n,o=0){const i=e.track.sample(s,sample);placeAt(i,t,n,at),e.world.set(a,{position:at,velocity:[0,0,0],rotation:orient(i.heading,i.pitch,o,0,driveRotation)})}function crash(e,a,s=!0){a.crashed=!0,a.passed=!0;const t=e.track.sample(a.s,sample),n=rightOf(t.heading),o=Math.sign(a.d-e.d)||(Math.random()<.5?-1:1),i=e.assets.bike.size;e.world.set(a.root,{physics:{type:"dynamic",size:[.6,i[1]+.4,.95*i[2]],layer:8,mask:12,bounce:.3,friction:.5,density:.3},spin:[rand(-4,4),rand(-6,6),-o*rand(4,8)],impact:{sound:getRacingSounds().get("bump"),minSpeed:2,maxSpeed:14,volume:.7,haptic:.3},lifetime:3.4}),e.speed=s?Math.max(.55*START_SPEED,e.speed*CRASH_SLOWDOWN):.9*e.speed;const r=1.1*e.speed,l=e.track.sample(a.s,sample),p=l.x,d=l.z,h=e.track.sample(a.s+1,sample),g=Math.hypot(h.x-p,h.z-d)||1,u=[(h.x-p)/g,0,(h.z-d)/g];e.world.set(a.root,{velocity:[u[0]*r+n[0]*o*4,4.5,u[2]*r+n[2]*o*4]});const m=e.world.position(a.root);if(m&&explode(e.world,m),e.burning.push(burning(a.root,e.time+3)),e.shake=.45,e.wobble=.9,s&&e.onLives(e.world.scoreboard.addLives(-1)),e.hudFeedback.flash=!0,playBankSound(getRacingSounds(),"hit",{volume:1}),haptics.impact(1,.8),e.lives<=0)return e.burning.push(burning(e.player.root,1/0)),void end(e);e.invulnerable=INVULNERABLE}function sideswipe(e,a,s){const t=Math.cos(a.phase)*a.weave*a.weaveSpeed+a.vshove;if(sideImpactSpeed(e.lateral,t,a.d-e.d)>=2.5)return a.bumped=!0,e.lateral*=.55,void crash(e,a,!1);const n=Math.sign(a.d-e.d)||1;if(a.shove+=n*s*.7,e.d-=n*s*.3,a.vshove=n*(3+.7*Math.abs(e.lateral)),e.lateral=-n*Math.abs(e.lateral)*.3,a.bumped=!0,e.speed*=.98,e.wobble=Math.max(e.wobble,.35),e.shake=Math.max(e.shake,.12),a.bumpCooldown>0)return;a.bumpCooldown=.3;const o=e.track.sample((a.s+e.s)/2,sample);placeAt(o,(a.d+e.d)/2,.5,at),effects.sparks(e.world,{position:[at[0],at[1],at[2]],count:12,speed:6,size:.06,lifetime:.35,gravity:-9.81,colors:[[1,.9,.4],[1,.65,.2]]}),playBankSound(getRacingSounds(),"bump",{volume:.85}),haptics.impact(.55,.7)}function end(e){"playing"===e.phase&&(e.world.scoreboard.stop(),e.phase="over",audio.stop(e.engine),e.engine=null,e.lives>0?(playBankSound(getRacingSounds(),"win",{volume:.8}),haptics.notify("success")):(playBankSound(getRacingSounds(),"die",{volume:.8}),haptics.notify("error")),e.onPhase("over"))}export function tick(e,a){if(e.world.isDisposed)return;a=Math.max(0,Math.min(a,.05)),e.time+=a;const s="playing"===e.phase;s?(e.speed+=(START_SPEED-e.speed)*(1-Math.exp(1.4*-a)),e.invulnerable=Math.max(0,e.invulnerable-a),e.spawnTimer-=a,e.spawnTimer<=0&&(e.spawnTimer=Math.max(.35,.9-.018*(e.speed-START_SPEED))*rand(.8,1.2),spawnTraffic(e)),AUTOPLAY&&autopilot(e)):"over"===e.phase&&(e.speed=Math.max(0,e.speed-25*a));const t=clamp(e.target,-EDGE-.6,EDGE+.6);if(stepSteering(e,s?t:e.d,a,LATERAL_SPEED,STEER_RESPONSE,s),e.scrape-=a,Math.abs(e.d)>EDGE&&(e.d=Math.sign(e.d)*EDGE,Math.sign(e.lateral)===Math.sign(e.d)&&(e.lateral=0),s&&Math.abs(t)>EDGE+.2&&e.scrape<=0)){e.scrape=.06,e.speed*=.985;const a=e.track.sample(e.s+.8,sample);placeAt(a,Math.sign(e.d)*(ROAD_HALF+.9),.5,at),effects.sparks(e.world,{position:[at[0],at[1],at[2]],count:6,speed:6,size:.07,lifetime:.35,gravity:-9.81,colors:[[1,.85,.3],[1,.55,.1]],flash:!1}),haptics.impact(.25,1)}if(e.s+=e.speed*a,"playing"===e.phase){const a=Math.max(0,Math.ceil(TRACK_LENGTH-e.s));a!==e.left&&(e.left=a,e.onDistance(a)),e.s>=TRACK_LENGTH&&end(e)}const n=e.assets.bike.size;smoothSteeringPose(e.steeringPose,e.lateral,e.speed,a),drive(e,e.player.root,e.s,e.d,n[1]/2,e.steeringPose.yaw),e.wheelie=Math.max(0,e.wheelie-a),e.wobble=Math.max(0,e.wobble-a);const o=s&&e.wheelie>0?.38*Math.sin(e.wheelie/1.1*Math.PI):0,i=e.wobble>0?.18*Math.sin(30*e.time)*e.wobble:0;leanBike(e.world,e.player.lean,-n[1]/2,clamp(e.lateral*LEAN,-MAX_LEAN,MAX_LEAN)+i,o);for(let s=e.traffic.length-1;s>=0;s--){const t=e.traffic[s];if(t.crashed){e.world.has(t.root)||e.traffic.splice(s,1);continue}t.phase+=a*t.weaveSpeed,t.bumpCooldown-=a,t.shove+=t.vshove*a,t.vshove*=Math.exp(2.5*-a);const o=Math.cos(t.phase)*t.weave*t.weaveSpeed+t.vshove;t.s+=TRAFFIC_SPEED*a;let i=t.lane+Math.sin(t.phase)*t.weave+t.shove;Math.abs(i)>EDGE&&(t.shove-=i-Math.sign(i)*EDGE,t.vshove=.3*-t.vshove,i=Math.sign(i)*EDGE),t.d=i,drive(e,t.root,t.s,i,n[1]/2,.7*Math.atan2(o,TRAFFIC_SPEED)),leanBike(e.world,t.lean,-n[1]/2,clamp(o*LEAN*2,-.45,.45));const r=t.s-e.s,l=BIKE_FOOTPRINT.length,p=Math.abs(t.d-e.d);Math.abs(r)<l&&(t.closest=Math.min(t.closest,p));const d=overlapAcross(BIKE_FOOTPRINT,BIKE_FOOTPRINT,r,p);if("playing"===e.phase&&d>0)if(!t.touching&&frontHit(BIKE_FOOTPRINT,BIKE_FOOTPRINT,t.wasAhead,r,.35)&&(t.headOn=!0),t.touching=!0,t.headOn){if(e.invulnerable<=0){crash(e,t);continue}}else sideswipe(e,t,d);else t.touching=!1,t.headOn=!1;t.wasAhead=r,!t.passed&&"playing"===e.phase&&r<-l&&(t.passed=!0,e.onScore(e.world.scoreboard.add(POINTS_PER_BIKE_PASSED)),playBankSound(getRacingSounds(),"point",{volume:.5}),haptics.impact(.25,.9),t.closest<NEAR_MISS_GAP&&!t.bumped&&(e.hudFeedback.message="NEAR MISS!")),r<-30&&(e.world.despawn(t.root),e.traffic.splice(s,1))}burn(e.world,e.camera,e.burning,e.time,a),e.world.update(a),recycleRoad(e,e.segments,e.s),followCamera(e,a)}function followCamera(e,a){const s=e.world.worldPosition(e.player.root,tmp);if(!s)return;const t=e.track.sample(e.s,look),n=forwardOf(t.heading);if("ready"===e.phase){e.orbit+=.35*a;const t=e.orbit+.9;updateChase(e.chase,e.camera,s,[5*Math.sin(t),1.6,5*Math.cos(t)],[0,.35,0],a)}else updateChase(e.chase,e.camera,s,[5.4*-n[0],1.9+3*Math.max(0,-t.pitch),5.4*-n[2]],[12*n[0],.6+12*Math.tan(t.pitch),12*n[2]],a);e.camera.fov=CAMERA_FOV,e.shake*=Math.exp(6*-a),e.world.set(e.horizon,{position:[s[0],0,s[2]]})}const spawnSample=newSample(),spawnAt=[0,0,0];export function spawnTraffic(e,a=SPAWN_AHEAD){const s=e.s+a;if(s>TRACK_LENGTH-FINISH_CLEAR)return;const t=12+.32*e.speed,n=new Set;for(const a of e.traffic)!a.crashed&&Math.abs(a.s-s)<t&&n.add(a.laneIndex);const o=[0,1,2].filter(e=>!n.has(e));if(o.length<=1)return;const i=pick(o),r=LANES[i],l=e.track.sample(s,spawnSample);placeAt(l,r,e.assets.bike.size[1]/2,spawnAt);const{root:p,lean:d,lights:h}=spawnBike(e.world,e.assets,pick(PAINTS),[spawnAt[0],spawnAt[1],spawnAt[2]],e.night);e.world.set(p,{rotation:orient(l.heading,l.pitch)}),e.traffic.push({root:p,lean:d,lights:h,s:s,d:r,lane:r,laneIndex:i,weave:rand(.1,.35),weaveSpeed:rand(.6,1.2),phase:rand(0,2*Math.PI),shove:0,vshove:0,passed:!1,crashed:!1,bumped:!1,bumpCooldown:0,closest:1/0,wasAhead:a,touching:!1,headOn:!1})}export function autopilot(e){const a=[1/0,1/0,1/0];for(const s of e.traffic){if(s.crashed)continue;const t=s.s-e.s;t>-4&&(a[s.laneIndex]=Math.min(a[s.laneIndex],t))}let s=0;for(let a=1;a<3;a++)Math.abs(LANES[a]-e.d)<Math.abs(LANES[s]-e.d)&&(s=a);let t=s;if(a[s]<40)for(const e of[s-1,s+1])e>=0&&e<3&&a[e]>a[t]+6&&(t=e);e.target=LANES[t]}
@@ -0,0 +1 @@
1
+ "use strict";import{merge,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x521ef4}from"../shared/EngineMeshes.js";import{SUIT,SUIT_TRIM,VISOR}from"./BikeRacingConstants.js";let riderModel;function riderMesh(){return cacheGameAsset("bike-racing/BikeRacingScene:riderMesh",()=>riderMeshUncached())}function riderMeshUncached(){if(riderModel)return riderModel;const e=(e,o,s,t,i)=>({geometry:tube([e,o],{radius:e=>s+(t-s)*e,sides:12,smoothness:2,caps:!0}),color:i}),o=(e,o,s)=>({geometry:shapeGeometry("sphere"),position:e,scale:o,color:s}),s=[e([0,.86,.26],[0,1.05,-.12],.16,.14,SUIT),o([0,.86,.26],[.3,.26,.28],SUIT),o([0,1.04,-.11],[.32,.24,.24],SUIT),e([0,1.07,-.15],[0,1.1,-.21],.06,.06,SUIT),e([0,.98,.2],[0,1.17,-.08],.035,.03,SUIT_TRIM)];for(const t of[-1,1])s.push(o([.18*t,1.04,-.12],.13,SUIT)),s.push(e([.18*t,1.04,-.12],[.29*t,.93,-.3],.06,.055,SUIT)),s.push(o([.29*t,.93,-.3],.11,SUIT)),s.push(e([.29*t,.93,-.3],[.32*t,.79,-.46],.055,.045,SUIT)),s.push(o([.32*t,.785,-.465],.1,SUIT_TRIM)),s.push(e([.12*t,.84,.26],[.25*t,.78,-.06],.085,.07,SUIT)),s.push(o([.25*t,.78,-.06],.14,SUIT)),s.push(e([.25*t,.78,-.06],[.23*t,.4,.1],.065,.055,SUIT)),s.push(o([.23*t,.38,.13],[.09,.08,.2],SUIT_TRIM));return riderModel=_0x521ef4(merge(s),{center:!1,shine:.45}),riderModel}export function spawnBike(e,o,s,t,i){const n=o.bike,r=e.spawn({mesh:"none",position:t}),a=e.spawn({mesh:"none",parent:r,position:[0,-n.size[1]/2,0]}),h=o=>e.spawn({parent:a,pickable:!1,...o});h({mesh:n.body,color:s}),h({mesh:n.trim}),h({mesh:n.glass}),h({mesh:riderMesh()}),h({mesh:"sphere",position:[0,1.14,-.29],scale:[.29,.28,.32],color:s}),h({mesh:"sphere",position:[0,1.13,-.39],scale:[.24,.11,.15],color:VISOR});const l={root:r,lean:a,lights:[]};return setBikeNight(e,l,i),l}export function setBikeNight(e,o,s){for(const s of o.lights)e.despawn(s);o.lights.length=0,s&&e.has(o.root)&&o.lights.push(e.spawn({mesh:"sphere",parent:o.lean,pickable:!1,position:[0,.71,-.93],scale:[.24,.05,.05],color:[2,1.95,1.7]}),e.spawn({mesh:"cube",parent:o.lean,pickable:!1,position:[0,.895,.985],scale:[.09,.03,.02],color:[2,.16,.1]}))}const REAR_CONTACT=.73,leanRotation=[0,0,0,1],rollRotation=[0,0,0,1],wheelieRotation=[0,0,0,1],leanPosition=[0,0,0];export function leanBike(e,o,s,t,i=0){quat.multiply(quat.z(-t,rollRotation),quat.x(i,wheelieRotation),leanRotation),leanPosition[1]=s+.73*Math.sin(i),leanPosition[2]=.73*(1-Math.cos(i)),e.set(o,{rotation:leanRotation,position:leanPosition})}export function*warmAssets(){yield riderMesh}
@@ -1 +1 @@
1
- "use strict";const _0x17e8b1=_0x3373;!function(){const e=_0x3373,o=_0x2de4();for(;;)try{if(144622==parseInt(e(252,"g3Ug"))/1*(-parseInt(e(251,"L354"))/2)+-parseInt(e(338,"Uy]%"))/3*(-parseInt(e(254,"(Uac"))/4)+parseInt(e(320,"09S4"))/5*(-parseInt(e(280,"z6OX"))/6)+parseInt(e(328,"BeZ$"))/7*(-parseInt(e(213,"sF7V"))/8)+parseInt(e(208,"GKt4"))/9*(-parseInt(e(223,"P70C"))/10)+parseInt(e(257,"Nw[a"))/11+parseInt(e(294,"sF7V"))/12)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x4ff441 from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x3214b7}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useBlockBlastStore,useScore,useIsPlaying,useGameOver,useGameWon}from"./BlockBlastStore.js";import{BlockBlastService}from"./BlockBlastService.js";import{BLOCK_BLAST_GAME_CONFIG}from"./BlockBlastConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x1e2557,jsxs as _0x43428b}from"react/jsx-runtime";export const BlockBlast=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:a,onShowLeaderboard:n,bannerAd:s})=>{const d="Pkhn",S="IufJ",m=_0x3373,f={OsNub:function(e,o){return e===o},hlYvQ:function(e,o){return e>o},hQnNe:m(212,"LVbS"),PaQaf:function(e,o,t,W){return e(o,t,W)},gAWxN:function(e,o,t){return e(o,t)},ZBxeo:m(238,"KOGo"),RnEel:m(287,"gayg"),oViGR:m(207,"z6OX"),CRSDx:function(e){return e()},CKCFP:function(e,o){return e+o},rjVCk:function(e,o,t){return e(o,t)},MiKNr:function(e,o,t){return e(o,t)},EEdSj:function(e,o,t){return e(o,t)}},_=_0x4ff441[m(293,"Pkhn")](e?.enableSounds??!0),k=_0x4ff441.useRef(e?.enableHaptics??!0);_[m(306,"gIyC")]=e?.[m(237,"Nw[a")]??!0,k[m(197,"bz8H")]=e?.[m(265,"8eoy")]??!0;const i=e?.[m(337,"*4D5")]??0,C=useScore(),x=useIsPlaying(),u=f[m(256,"Sm4c")](useGameOver),l=useGameWon(),G=useBlockBlastStore(e=>e[m(270,"3zz)")]),O=_0x4ff441.useRef(!1),p=_0x4ff441[m(291,"8EL1")](t);p[m(262,d)]=t;const L=_0x4ff441[m(228,"2mY8")](e=>{const o=m;if(p[o(278,"BeZ$")]&&!O[o(306,"gIyC")]){const t=useBlockBlastStore[o(279,"8EL1")]()[o(339,"4w0P")];p.current({status:e,score:t[o(289,"2mY8")]()}),O[o(316,"z6OX")]=!0}},[]),B=_0x4ff441[m(304,"Zc)W")](()=>new BlockBlastService,[]);_0x4ff441[m(286,"2*l0")](()=>{const e=m,o=useBlockBlastStore.getState();!o[e(263,"IufJ")]&&o[e(324,"g3Ug")](BLOCK_BLAST_GAME_CONFIG.GRID_SIZE)},[]);const R=BLOCK_BLAST_GAME_CONFIG.CELL_GAP,I=BLOCK_BLAST_GAME_CONFIG.CELL_SIZE;_0x4ff441[m(330,"oz!n")](()=>{const e="IufJ",o="2mY8",t={gcWKf:function(e,o,t){return e(o,t)}};B[m(297,"z]]I")](e=>{const t=_0x3373,W={};W[t(284,"BeZ$")]=t(285,"BeZ$"),W[t(247,"z]]I")]=function(e,o){return e&&o};const r=W;if(f[t(210,"(Uac")](t(268,"2SyX"),t(219,"Zogw"))){if(f[t(300,"Nw[a")](e,0))if(f.hQnNe===t(201,o))f[t(249,"4w0P")](playSound,GAME_SOUNDS[t(319,"o^]@")][t(281,"8EL1")],_[t(203,"gayg")],!0),f.gAWxN(playHaptic,HapticType[t(276,"2mY8")],k[t(199,"4w0P")]);else{if((_0x3c6cf7||_0x94e914)&&!_0xdf0ea2[t(220,"0*k#")]){const e=_0x2ff84a?t(233,"LVbS"):r.qtMmp;_0x229083(e)}r[t(305,"ed7)")](!_0x5e18dd,!_0x5721a0)&&(_0x386554[t(215,"oz!n")]=!1)}}else _0x560db7(_0x4dc53f.BLOCK_BLAST.CLEAR,_0x52947e.current,!0),_0x465a64(_0x2be835[t(211,"4w0P")],_0x384010[t(317,o)])},()=>{const e=_0x3373;t[e(241,"*VSa")](playSound,GAME_SOUNDS.BLOCK_BLAST[e(295,"vZR#")],_[e(253,"vZR#")]),t.gcWKf(playHaptic,HapticType.LIGHT,k[e(231,"5dsU")])},()=>{const o=_0x3373;playSound(GAME_SOUNDS[o(308,"2mY8")][o(258,e)],_[o(202,"8EL1")]),playHaptic(HapticType[o(334,"E%$L")],k[o(326,e)])})},[B]),_0x4ff441[m(277,"LVbS")](()=>{const e=m;if((u||l)&&!O[e(224,"(Uac")]){const o=l?e(244,"2SyX"):f[e(206,"g3Ug")];L(o)}!u&&!l&&(O[e(267,"zeLH")]=!1)},[u,l,L]),_0x4ff441.useEffect(()=>()=>{const e=_0x3373;e(313,"sJ3i")!==f[e(318,"8EL1")]?_0x290042[e(272,"oHub")]=!1:(useBlockBlastStore[e(200,"*4D5")]()[e(217,"8eoy")]&&!O[e(197,"bz8H")]&&L(e(221,"CseR")),B[e(204,"%FVI")](),useBlockBlastStore[e(255,"Sm4c")]()[e(275,"sJ3i")]())},[B,L]),_0x4ff441[m(269,S)](()=>{if(!x)return;const e=setGameInterval(()=>{const e=_0x3373;"zDIDl"===e(227,"gIyC")?(UCRjkM.UQrvH(_0x1bfb8d,_0x196c6c.BLOCK_BLAST[e(261,"XzmX")],_0x3a70e6[e(302,"z]]I")]),_0x85b8a7(_0x1e9a80[e(274,"z6OX")],_0x54c080[e(216,"*4D5")])):useBlockBlastStore.getState()[e(271,"zeLH")]()},1e3);return()=>clearGameInterval(e)},[x]);const g=_0x4ff441.useCallback(()=>{const e=m;O[e(250,"09S4")]=!1,useBlockBlastStore[e(260,"z6OX")]()[e(218,"4w0P")](BLOCK_BLAST_GAME_CONFIG[e(205,"vfT6")],BLOCK_BLAST_GAME_CONFIG[e(226,"Nw[a")]),B[e(243,"LqQR")](BLOCK_BLAST_GAME_CONFIG.GRID_SIZE),playSound(GAME_SOUNDS.BLOCK_BLAST[e(232,"gIyC")],_[e(209,"CseR")]),playHaptic(HapticType[e(234,"Pkhn")],k[e(316,"z6OX")])},[B]),P=_0x4ff441[m(236,"oHub")](()=>{const e=m;L("cancel"),useBlockBlastStore[e(329,"oHub")]().resetGame(),B[e(198,"LVbS")]()},[L,B]),b=_0x4ff441[m(266,"vfT6")](()=>{const e=m;e(310,"oHub")!==f[e(333,"2*l0")]?(O.current=!1,W?.(),useBlockBlastStore[e(292,"Pkhn")]().resetGame(),B.resetGame()):_0x1238a4(e(321,"r$f7"))},[W,B]),y=_0x4ff441[m(309,"Zogw")](()=>{b()},[b]),h=_0x4ff441[m(301,"5dsU")](()=>({isPlaying:x,gameOver:u,onStartGame:g,onStopGame:P,onShare:r,onShowLeaderboard:n,startButtonSubtext:m(322,"%FVI")}),[x,u,g,P,r,n]),K=_0x4ff441[m(312,"gayg")](()=>({isVisible:u,score:C,onPlayAgain:y,buttonText:m(264,"KOGo"),title:l?m(283,"gIyC"):m(229,"8EL1"),message:l?"Time completed! Great job!":m(240,"KOGo")}),[u,C,y,l]),A={};A[m(323,"*VSa")]=0;const N={...h},E={...K};E[m(327,"3zz)")]=a,E[m(290,S)]=s;const M={};return M[m(246,"IufJ")]=GAME_IDS.BLOCK_BLAST,M[m(311,"*4D5")]=e||DEFAULT_GAME_SETTINGS,M[m(331,"Pkhn")]=o,_0x1e2557(GestureHandlerRootView,{style:styles[m(230,"gIyC")],children:f[m(248,"gIyC")](_0x43428b,_0x3214b7,{children:[f[m(239,"L354")](_0x1e2557,View,{style:[styles.scoreboardContainer,{top:f[m(259,"gIyC")](i,15)}],children:f[m(336,"oHub")](_0x1e2557,ScoreBoard,A)}),f[m(242,"z6OX")](_0x1e2557,GameArea,{gridSize:G,cellSize:I,cellGap:R,gameService:B,offset:i+15}),_0x1e2557(GameControlButton,N),_0x1e2557(GameOverModal,E),f[m(335,d)](_0x1e2557,GameSettingsModal,M)]})})};const _0x22f4d5={};_0x22f4d5[_0x17e8b1(196,"oHub")]=1,_0x22f4d5.backgroundColor=BACKGROUND_COLOR;const _0x5b9f10={};function _0x2de4(){const e=["WOK4lSkeW5u","W7CMsCkmWQ3dV8oD","yCoUk8kfW4FcHa","pcNcN2uew8k4umoX","WOShW7DEWRjdWRunxW","wW0gd8oiWRRcPG","nmoOpCkCW5tcHIW","WPCZWPNcKbNcTSoicW4kWRPFW50","cCo9W53cKmoG","uSoGW4XeDwqFhWZdVSkW","W5/cNCk8W6vmWRddIWZdHa","o8oFW7xcQmoNdNTaW7K","W7DZgSo6W6FcGSko","c8oKW5RcJSos","W5tcHaC","dmkteqnktr4","q8k2brj1W5pcOG","W7NdRSoYACoubYldVmkml3u","WRuCWRxcTYRcL8oonJOWWPDJ","n8k3Dfa","feXtdmkm","fCk3j1JdOCo3jbj5qSkpg3upWOi5W71cWO7cSwtcR8owWRi","WRRdKGToW4m","WOZcVCktWOqI","AN5uW6tcGKvSkmow","WQTzhq","WQdcHr/dUCov","ymofnCorW5ddLq","cCkjWPZdKSkh","p8oXW4ZcPmoi","WRPXj8keWPa","zSoaFXDBmSk0","r2v2e8kjyCoL","WPKGW5lcG8o3W5e1DCo7yXi","jmk7W6S+WRjrhW","cu5ns8kyW6lcKCkFrLeJyG","WQLdW6mMW7NdPM/dLq","WO10W4qXW7u","W6fgW6ldO3hdHSkTiaeFWOzeW6K","qmoLfCoXW4BdVNazia","g8o7W5JcMSow","WQBcSCkSWPKKe1TM","gaFcVfq6FCkaCmor","pmkZidjQCdK","BSoxcmoyW7JdIe8Yfq","c8k0zKZcRSoejLn9q8oy","WOpdSLdcLJldOmk9DflcUCkJW7mL","W449zaPPshFdQmkRW67cPq","W5eQuJxdOXNdGG","WQ5YjSo8WP8","CSoxpCoXW7/dL0m/bG","xSkAWPyfnmkcWOu8","W5y6qZxdOXRdK8kkxmkXW78KWPK","W6/dQmoLwmoqbtO","a8kXbW","WOtcHSkkWOuc","WQK+FmkjbJlcRsDR","DmogW6PeuvSG","W5BcNGZcOKejWO/dMYu","WQeOeSovW6yylq","W7/cUCkfW7myWP7dQsW","W7FcO8kuWQmMi2u","W5VcKmk0W6e+","W7HrW5SCW7VdLLe","aCo/W47dVmorkfSe","WRmPlCokW7m","WQ4Ye8oc","dmkWF8k7W5u5W4GjWQG","W7bSggai","ENHqW7FcGMC","u8o8W7PZzMeDgG","zCofnSoAW7ZdG2C4","W63cR8kuW7ijWPK","omkJjHn7FZNcNW","kSk1nXjQEa","WRWSWQVdVMdcLvGJt8kzWQWgwG","f8kcW5GpWPi","pItcGN4jr8kIua","eSkKWR/dOCkpW7PVWOKyD8kQW7O","WPKrmNy/W6WiWRe","WOSaW7eGW6GbW6WrCctdOSkvjq","WRGEWO3cOXC","W6f1dCofW6FcGCkv","aSk0WRNdKmklW7H3","WQG4ymkEfXFcOYT8z8oHqmoJcSooW7LfW77dOq","WRRdJeT6W5dcHCko","WPJdGwScW5u","o8ofW6NcRSoJcwe","Ax7dHIvsamkZuCoBEMNdSG","zCoFW6zex1CXmsZdJSkp","WO4jhSkvW4ddUcGEeIhdVG","W63dQmopFCoI","WPFdSmoKqSkWW7pdJIO","W51wdLGyW7ip","WOmsFmkzbW","ASoRn33dO8oZkfD1","W7SsWQDdWR/dHe3dP3mYCW","WQlcOCkQWRG1hfS","rmoMW5T1Cwyh","W4RcSSk0W4ua","W5unWP3cVtxdJrhdJSkGWOKA","mSkco1uiACkmWPBcLCo9WPHS","aemaW7OCWRe","WRa9W6jiiveCpYhdHCoPWQ7cVMldLZxdSxzDWOJdICkAWQ3dS0m8e3q","WRldLZP2W4ddJW","W4v6WOVdGCkSW7mps8o5sdC0W67cTq","WQj4W6tdIuNcPgVdMSkyWOKhWQuZ","zmorkSogW7ZdN1i","vSkgWQWjbSkzWPO","W7nPoCoeW4efmvi","W6VdUmoJECobcJRdUW","BMrJvmo/W7qssmoP","mmkOasv7AItcLaGrtJifW4NdIGu","W4/cIa/cKW","fSkvC8k5W6e","WOlcLHRdJSoj","gSkdnHnL","W77dT8obACoE","WOVdS8o2rCk8W6K","W4jUWOaCCNhcMG","WPLZgCkxWPm","W6RdSCoYuG","W6pcLCkeWOhdSCkfW5C","W5hcIbRcGLmOWOVdLtq","WOLLbmkxWPpcOSks","WOpdSmoKzCkTW7ZdNtW","DSosW75eqW","W7VcQCkdW5ijWPhdQq","W4TqgwCyW7eu","WOm9W6zkkGqo","W7WCsa1xD1ldKmkp","W7zwWPRdKmkQ","WPhcPSkHWROD","tSoTtKqlW6/cPfGaW4ddTa","yCo6n8kuW4FcHIe","DWS6cmop","WRLfnCkMWRpcN8k1","W7lcRd7cPha","WR8TWQRdVwdcKquFBSkOWQOD","wHfxWQHmWQVdOmoqWPpdVmom","Egj0y8o8W7Wd","WOFdOmoIrmk8W7pdNq","WO/dR2hcMd/dVmkCE0u","WPLKf8kxWOlcI8khmaq"];return(_0x2de4=function(){return e})()}_0x5b9f10.position=_0x17e8b1(296,"XzmX"),_0x5b9f10[_0x17e8b1(332,"LVbS")]=0,_0x5b9f10.right=0,_0x5b9f10[_0x17e8b1(273,"GKt4")]=0,_0x5b9f10.zIndex=10;const _0x54e75a={};function _0x3373(e,o){e-=196;const t=_0x2de4();let W=t[e];if(void 0===_0x3373.YvaGWM){const e=function(e,o){let t,W,r=[],a=0,n="";for(e=function(e){let o="",t="";for(let t,W,r=0,a=0;W=e.charAt(a++);~W&&(t=r%4?64*t+W:W,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=o.length;e<W;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),W=0;W<256;W++)r[W]=W;for(W=0;W<256;W++)a=(a+r[W]+o.charCodeAt(W%o.length))%256,t=r[W],r[W]=r[a],r[a]=t;W=0,a=0;for(let o=0;o<e.length;o++)W=(W+1)%256,a=(a+r[W])%256,t=r[W],r[W]=r[a],r[a]=t,n+=String.fromCharCode(e.charCodeAt(o)^r[(r[W]+r[a])%256]);return n};_0x3373.OUamsh=e,_0x3373.fgtMdt={},_0x3373.YvaGWM=!0}const r=t[0];_0x3373.DEMeml!==r&&(_0x3373.fgtMdt={},_0x3373.DEMeml=r);const a=_0x3373.fgtMdt[e];return void 0===a?(void 0===_0x3373.rJMXdR&&(_0x3373.rJMXdR=!0),W=_0x3373.OUamsh(W,o),_0x3373.fgtMdt[e]=W):W=a,W}_0x54e75a[_0x17e8b1(222,"XzmX")]=_0x22f4d5,_0x54e75a[_0x17e8b1(303,"sJ3i")]=_0x5b9f10;const styles=StyleSheet[_0x17e8b1(288,"LqQR")](_0x54e75a);
1
+ "use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{GAME_DURATION,getLayout,LIGHT}from"./BlockBlastConstants.js";import{createGame,dispose,dragEnd,dragMove,dragStart,reset,setLayout,setTheme,start,tick}from"./BlockBlastGame.js";import{jsx as _0x4c11d9}from"react/jsx-runtime";const SFX=GAME_SOUNDS.BLOCK_BLAST;export const BlockBlast=engineGame(GAME_IDS.BLOCK_BLAST,e=>{const[t,r]=useLiveState(0),[s,a]=useLiveState(GAME_DURATION),{theme:o,status:i,screen:n,gameOver:m}=useEngineGame(e,{gameId:GAME_IDS.BLOCK_BLAST,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,s)=>{const a=getLayout(t,r,s);return setLayout(e,a),a.boardSize},drag:(e,{phase:t,x:r,y:s})=>{"start"===t?dragStart(e,r,s):"move"===t?dragMove(e,r,s):dragEnd(e)},onStart:e=>e(SFX.START,HapticType.SUCCESS),onOver:(e,t)=>{"win"===t&&e(SFX.WIN,HapticType.SUCCESS)},wire:(e,t)=>{e.onScore=r,e.onTime=a,e.onPick=()=>t(SFX.PICK,HapticType.LIGHT),e.onInvalid=()=>t(SFX.INVALID,HapticType.WARNING),e.onPlace=()=>t(SFX.PLACE,HapticType.LIGHT),e.onClear=()=>t(SFX.CLEAR,HapticType.SUCCESS),e.onGameOver=()=>t(SFX.GAME_OVER,HapticType.ERROR)}});return _0x4c11d9(EngineGameScreen,{...n,light:LIGHT,columns:[scoreColumn(t),timerColumn(s,o)],subtext:"Place blocks, clear lines!",gameOver:m({title:"win"===i?"YOU WON!":"GAME OVER",message:"win"===i?"Time completed! Great job!":"No more moves available!",scoreLabel:"Final Score",score:t,buttonText:"Play Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x23c1fd=_0x3875;function _0x3875(W,o){W-=374;const d=_0x315d();let _=d[W];if(void 0===_0x3875.ZHoyfH){const W=function(W,o){let d,_,t=[],x=0,n="";for(W=function(W){let o="",d="";for(let d,_,t=0,x=0;_=W.charAt(x++);~_&&(d=t%4?64*d+_:_,t++%4)?o+=String.fromCharCode(255&d>>(-2*t&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=o.length;W<_;W++)d+="%"+("00"+o.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(d)}(W),_=0;_<256;_++)t[_]=_;for(_=0;_<256;_++)x=(x+t[_]+o.charCodeAt(_%o.length))%256,d=t[_],t[_]=t[x],t[x]=d;_=0,x=0;for(let o=0;o<W.length;o++)_=(_+1)%256,x=(x+t[_])%256,d=t[_],t[_]=t[x],t[x]=d,n+=String.fromCharCode(W.charCodeAt(o)^t[(t[_]+t[x])%256]);return n};_0x3875.KzfJzd=W,_0x3875.bKeiRA={},_0x3875.ZHoyfH=!0}const t=d[0];_0x3875.IYFQlj!==t&&(_0x3875.bKeiRA={},_0x3875.IYFQlj=t);const x=_0x3875.bKeiRA[W];return void 0===x?(void 0===_0x3875.voSPHx&&(_0x3875.voSPHx=!0),_=_0x3875.KzfJzd(_,o),_0x3875.bKeiRA[W]=_):_=x,_}function _0x315d(){const W=["CHldTtuJW6m","A8oInmkSnMKXcKdcJcJdOW","WP5QWPCeWOa","WRPCdCkuWOjeW7BcLWWhWQFcJHBcQrRcPq","nKf5W6ndW6ldL3JcN8k9aLSRW4HHpqtcMweyAcSzoKC","W4n2WOlcRCkNWOJcLWdcLN4nba","jmkUW5n6srabW61mWOK5","W7ldQCoCcmokBqG8WOZcRq","W6b4WOyBWPVdHcq","rCkGW5OmqWL0","W6eyWPqMWOxdOYpcOa","W4X+bmovWRunW6y","W65FW4RcR2vqW5ddK2PyW5xcRW","BN7cTHRdOW","WRFcRmk+W4FdNmotFmk8WRJcQ8krWQG","pCkcomoNW57dQGaU","W6pdMNDblW","mIxdSWqAW7VdTG","omkLW6/dL8ocW55pjCk2nq","lcX1WOWCWPLm","WRzMimoMt8owW4CgW7O2W6bruW","n8oeW45Whc4zs0S","WQ1ulCoYW4LIWOBcS3tcVbBcHq","qSkyWR9bWOBcJCkZW5Kuqe/cNwldQq","fsJdLZrDW7KlW48","yhBcGbpdPqrTW5FdOa","a8knxZpcTCkdlCkeWPZdMchcTq","W7FdPmoEdSoEDH8IWPJcVmksWOn0","a8ovDqymWR3cJHBdGKC","rmoTghRcNvhcI8omWQukW6/cTrbt","mmoQW4O6W6NdQSokWRSP","A8oInmkSnMK6cKG","DmkqWPreF1rEoI8iWQvuWRO5v3dcNaddNmk3cWVdQCkTfa","tsz8W7WvW7vxWQVdJghdJSoX","n8o9W4CXW7hdSmonWQyZrKlcLKRdP8kYWPNdRCkUjLK","W6lcNSkDW4u6W47cRvOdW4JdS2i","a8oOW7RdMv90WQu","gCoLWORdUSonue3dMJddN29rW6C","eCoQWRVdKuecW6up","W5eqWRJcICoNoW","ivPlWRxcGCkHimoUgSomWQaQW6q","nSkvBa/dOJRdTSkHWPeiW6lcQZDruWK","WQhdJmkqhKddQmkAg8k2WO8yWRW","W6VcLCogW7mIW63cNgW7pmkZW4K","WO/dHSknDc/cKW","WRrpW7KVW79OpmoCWQejW6tcH0W","jgK8W6HuW5KWdSoIWOJdQZaNW7yi","amo0WQtdNIWAW5W","pmoLW6dcHcFcKwNcIq","W5xdPf14fmkMWRn2W5jzh8o6qmoNWRJcMmoZcWe","W4H2W4ddU8oeW6pcNWS","WQbpWOaQWQldNa","y8oVW7/cUbOwCSoiW7FdQgWSFa","uqjdWPO4WQK6g8oXWRxdQYG","mCoJW4K1W73dPSotWRq+rKFcLG","wxb0DCoYWQFcOmoWja"];return(_0x315d=function(){return W})()}!function(){const W="jBYQ",o=_0x3875,d=_0x315d();for(;;)try{if(553739==-parseInt(o(387,W))/1*(-parseInt(o(414,"%(NW"))/2)+parseInt(o(422,"]Jy^"))/3*(-parseInt(o(427,"b%jq"))/4)+-parseInt(o(416,"NRId"))/5+parseInt(o(400,"seXO"))/6*(parseInt(o(376,"F0e("))/7)+parseInt(o(391,"vQ5X"))/8*(-parseInt(o(389,W))/9)+parseInt(o(424,"y*dS"))/10*(-parseInt(o(403,"4BY$"))/11)+parseInt(o(408,"s#x^"))/12)break;d.push(d.shift())}catch(W){d.push(d.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions}from"../../services/UtilsService.js";const GRID_SIZE=9,CELL_GAP=2,{width:GAME_WIDTH}=getGameDimensions(),CELL_SIZE=(GAME_WIDTH-20)/9,_0x4995ab={GRID_SIZE:9};_0x4995ab[_0x23c1fd(409,"IDz$")]=CELL_SIZE,_0x4995ab[_0x23c1fd(394,"kI$x")]=2,_0x4995ab.NEXT_PIECES_COUNT=3,_0x4995ab[_0x23c1fd(382,"Vf^5")]=50,_0x4995ab.POINTS_PER_LINE=500,_0x4995ab[_0x23c1fd(420,"s#x^")]=1.5,_0x4995ab[_0x23c1fd(428,"!3IK")]=.7,_0x4995ab[_0x23c1fd(413,"IDz$")]=1,_0x4995ab[_0x23c1fd(375,"cF&5")]=50,_0x4995ab[_0x23c1fd(406,"ovH*")]=300;export const BLOCK_BLAST_GAME_CONFIG=_0x4995ab;const _0x563579={};_0x563579[_0x23c1fd(407,"2Nss")]=BACKGROUND_COLOR,_0x563579.PRIMARY=PRIMARY_COLOR,_0x563579[_0x23c1fd(425,"F0e(")]=_0x23c1fd(411,"seXO"),_0x563579.EMPTY_CELL=_0x23c1fd(383,"1At4"),_0x563579[_0x23c1fd(378,"NYBy")]="rgba(255, 255, 255, 0.35)",_0x563579[_0x23c1fd(410,"8MAt")]=_0x23c1fd(398,"$NSa"),_0x563579.BLOCK_GREEN=_0x23c1fd(415,"HfUV"),_0x563579[_0x23c1fd(380,"8MAt")]=_0x23c1fd(426,"PYae"),_0x563579[_0x23c1fd(397,"3u(A")]="#4DA6FF",_0x563579[_0x23c1fd(377,"IDz$")]=_0x23c1fd(388,"gf%1"),_0x563579[_0x23c1fd(405,"0*p^")]="#FF9500",_0x563579.COMBO_TEXT=_0x23c1fd(390,")%Nx"),_0x563579.UI=PRIMARY_COLOR,_0x563579.HEART=PRIMARY_COLOR;export const BLOCK_BLAST_COLORS=_0x563579;export const BLOCK_SHAPES=[[[1]],[[1,1]],[[1],[1]],[[1,1,1]],[[1],[1],[1]],[[1,1],[1,0]],[[1,1],[0,1]],[[1,0],[1,1]],[[0,1],[1,1]],[[1,1,1,1]],[[1],[1],[1],[1]],[[1,1],[1,1]],[[1,1,1],[0,1,0]],[[0,1,0],[1,1,1]],[[0,1,1],[1,1,0]],[[1,1,0],[0,1,1]],[[1,1,1],[1,0,0]],[[0,0,1],[1,1,1]],[[1,0,0],[1,1,1]],[[1,1,1],[0,0,1]]];export const getRandomBlockShape=()=>{const W=_0x23c1fd,o={};o[W(392,"yQiT")]=function(W,o){return W*o};const d=o,_=Math.floor(d[W(381,"jBYQ")](Math[W(374,"jBYQ")](),BLOCK_SHAPES[W(418,"ZTsq")]));return BLOCK_SHAPES[_]};export const getRandomBlockColor=()=>{const W=_0x23c1fd,o=[BLOCK_BLAST_COLORS[W(404,"yQiT")],BLOCK_BLAST_COLORS[W(385,"gf%1")],BLOCK_BLAST_COLORS[W(412,"$NSa")],BLOCK_BLAST_COLORS[W(386,"ovH*")],BLOCK_BLAST_COLORS[W(401,")%Nx")],BLOCK_BLAST_COLORS[W(393,"cHb(")]];return o[Math[W(395,"!3IK")](Math[W(379,"GBdH")]()*o[W(423,"I[Hp")])]};
1
+ "use strict";import{getSceneInputInsets}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export{toColor}from"../shared/EngineUtils.js";export const GRID_SIZE=9;export const NEXT_PIECES_COUNT=3;export const POINTS_PER_BLOCK=50;export const POINTS_PER_LINE=500;export const GAME_DURATION=300;export const BLOCK_COLORS=["#FF3B3B","#32CD32","#FFD700","#4DA6FF","#BF5AF2","#FF9500"];export const BLOCK_SHAPES=[[[1]],[[1,1]],[[1],[1]],[[1,1,1]],[[1],[1],[1]],[[1,1],[1,0]],[[1,1],[0,1]],[[1,0],[1,1]],[[0,1],[1,1]],[[1,1,1,1]],[[1],[1],[1],[1]],[[1,1],[1,1]],[[1,1,1],[0,1,0]],[[0,1,0],[1,1,1]],[[0,1,1],[1,1,0]],[[1,1,0],[0,1,1]],[[1,1,1],[1,0,0]],[[0,0,1],[1,1,1]],[[1,0,0],[1,1,1]],[[1,1,1],[0,0,1]]];export const TRAY_SCALE=.7;export const DRAG_LIFT=50;export const LIFT_TIME=.14;export const RETURN_TIME=.18;export const DEAL_TIME=.24;export const FLASH_TIME=.26;export const FLASH_AMOUNT=.55;export const CLEAR_TIME=.5;export const CLEAR_RIPPLE=.025;export const PICKUP_SPRING={stiffness:320,damping:18,mass:.6};export const CELL_GAP=2;const TRAY_HEIGHT=120,CONTROLS_HEIGHT=110,GRID_TRAY_GAP=30,GRID_TOP_PADDING=20,TRAY_PADDING=20,TRAY_SPACING=30;export function getLayout(t,o,e){const n=getSceneInputInsets(e).top,r=o-n-110,s=Math.min(120,Math.max(48,.2*r)),p=Math.max(96,Math.min(gameWidthFor(t),r-s-30-20)),I=(p-20)/9,_=I+2,x=9*_+2,i=p>400?20:0,E=x+i+30+s,T=Math.max(n+(r-E)/2,n+10),a=T+x+i+30,A=(t-p)/2+20,L=(p-40-60)/3;return{width:t,height:o,cell:I,step:_,boardLeft:(t-x)/2,boardTop:T+20,boardSize:x,slots:Array.from({length:3},(t,o)=>[A+o*(L+30)+L/2,a+s/2]),slotWidth:L+30,trayTop:a,trayHeight:s,depth:.5*I}}export const LIGHT=frontLight([0,0,1],.45);export function flat([t,o,e,n=1]){const r=Math.max(t,o,e);if(r<=0)return[0,0,0,n];const s=2/r;return[t*s,o*s,e*s,n]}export function tint([t,o,e],n){return[t+(1-t)*n,o+(1-o)*n,e+(1-e)*n,1]}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{setBackdropTheme}from"../shared/EngineBackdrop.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{BLOCK_COLORS,BLOCK_SHAPES,CELL_GAP,CLEAR_RIPPLE,CLEAR_TIME,DEAL_TIME,DRAG_LIFT,FLASH_AMOUNT,FLASH_TIME,flat,GAME_DURATION,GRID_SIZE,LIFT_TIME,NEXT_PIECES_COUNT,PICKUP_SPRING,POINTS_PER_BLOCK,POINTS_PER_LINE,RETURN_TIME,tint,toColor,TRAY_SCALE}from"./BlockBlastConstants.js";import{blockBurst,blockScale,buildBoard,colorBoard,dragZ,setOverlay,spawnBlock,spawnPiece,toWorld,trayZ}from"./BlockBlastScene.js";const CELLS=GRID_SIZE*GRID_SIZE,WORLD_CAPACITY=1600,randomPiece=()=>{const o=BLOCK_SHAPES[Math.floor(Math.random()*BLOCK_SHAPES.length)],r=BLOCK_COLORS[Math.floor(Math.random()*BLOCK_COLORS.length)];return{shape:o,css:r,color:toColor(r),root:null}},easeOutCubic=o=>1-Math.pow(1-o,3);export function createGame(o){const r=new World(1600),l={world:r,camera:{eye:[0,0,200],target:[0,0,0],fov:1,ortho:1},colors:o.BOARD,theme:o,layout:null,board:null,phase:"ready",time:0,get score(){return r.scoreboard.score},get timeLeft(){return r.scoreboard.shownSeconds},won:!1,grid:new Array(CELLS).fill(null),gridColors:new Array(CELLS).fill(null),blocks:new Array(CELLS).fill(null),pieces:Array.from({length:NEXT_PIECES_COUNT},randomPiece),drag:null,ghostShown:new Array(CELLS).fill(null),previewColors:new Map,highlightShown:new Array(CELLS).fill(!1),onPhase:o=>{},onScore:o=>{},onTime:o=>{},onPick:()=>{},onInvalid:()=>{},onPlace:()=>{},onClear:o=>{},onGameOver:()=>{}};return r.scoreboard.reset(0,GAME_DURATION),r.scoreboard.handlers={onSecond:o=>l.onTime(o),onTimeUp:()=>"playing"===l.phase&&end(l,!0)},l}export function setLayout(o,r){const l=o.world;if(cancelDrag(o),o.board){const r=o.board;for(const o of[r.backdrop,r.rim,r.panel,...r.empties,...r.highlights,...r.ghosts])l.despawn(o)}for(let e=0;e<CELLS;e++){null!=o.blocks[e]&&l.despawn(o.blocks[e]);const t=o.gridColors[e];o.blocks[e]=t?spawnBlock(l,r,Math.floor(e/GRID_SIZE),e%GRID_SIZE,t):null}o.layout=r,o.camera.ortho=r.height/2,o.board=buildBoard(l,r,o.colors,o.theme),o.ghostShown.fill(null),o.highlightShown.fill(!1),o.pieces.forEach((r,l)=>placeInTray(o,r,l,!1))}export function setTheme(o,r){o.colors=r.BOARD,o.theme=r,o.board&&(colorBoard(o.world,o.board,o.colors),setBackdropTheme(o.world,o.board.backdrop,r))}function placeInTray(o,r,l,e){const t=o.layout;t&&(null!=r.root&&o.world.despawn(r.root),r.root=spawnPiece(o.world,t,r.shape,r.color,t.slots[l],e?0:TRAY_SCALE),e&&o.world.animate(r.root,{scale:TRAY_SCALE},{duration:DEAL_TIME,easing:"back"}))}export function start(o){"ready"===o.phase&&(o.phase="playing",o.world.scoreboard.startCountdown(GAME_DURATION),o.onPhase("playing"))}export function reset(o){cancelDrag(o);for(let r=0;r<CELLS;r++)null!=o.blocks[r]&&o.world.despawn(o.blocks[r]),o.blocks[r]=null,o.grid[r]=null,o.gridColors[r]=null;for(const r of o.pieces)null!=r.root&&o.world.despawn(r.root);o.pieces=Array.from({length:NEXT_PIECES_COUNT},randomPiece),o.pieces.forEach((r,l)=>placeInTray(o,r,l,!0)),o.world.scoreboard.reset(0,GAME_DURATION),o.won=!1,o.phase="ready",o.onScore(0),o.onTime(GAME_DURATION),o.onPhase("ready")}export function dispose(o){o.world.dispose()}function end(o,r){o.world.scoreboard.stop(),cancelDrag(o),o.won=r,o.phase="over",r||o.onGameOver(),o.onPhase("over")}export function tick(o,r){if(o.world.isDisposed)return;o.time+=r;const l=o.drag,e=o.layout,t=l?o.pieces[l.slot]?.root:null;if(l&&e&&null!=t&&!l.returning){const r=DRAG_LIFT*easeOutCubic(Math.min(1,(o.time-l.liftedAt)/LIFT_TIME)),n=l.x-l.offsetX,s=l.y-l.offsetY-r;(n!==l.drawnX||s!==l.drawnY)&&(l.drawnX=n,l.drawnY=s,o.world.set(t,{position:toWorld(e,n,s,dragZ)}))}o.world.update(r)}function fits(o,r,l,e){for(let t=0;t<r.length;t++){const n=r[t];for(let r=0;r<n.length;r++){if(1!==n[r])continue;const s=l+t,a=e+r;if(s<0||s>=GRID_SIZE||a<0||a>=GRID_SIZE||null!==o.grid[s*GRID_SIZE+a])return!1}}return!0}function anyMoveLeft(o){for(const r of o.pieces)for(let l=0;l<GRID_SIZE;l++)for(let e=0;e<GRID_SIZE;e++)if(fits(o,r.shape,l,e))return!0;return!1}function fullLines(o,r){const l=l=>null!==o.grid[l]||!!r?.has(l),e=[],t=[];for(let o=0;o<GRID_SIZE;o++){let r=!0,n=!0;for(let e=0;e<GRID_SIZE&&(r||n);e++)r&&!l(o*GRID_SIZE+e)&&(r=!1),n&&!l(e*GRID_SIZE+o)&&(n=!1);r&&e.push(o),n&&t.push(o)}return{rows:e,cols:t}}function cellsOf(o,r,l){const e=[];return o.forEach((o,t)=>o.forEach((o,n)=>1===o&&e.push((r+t)*GRID_SIZE+l+n))),e}function place(o,r,l,e){const t=o.layout,n=o.world,s=o.pieces[r],a=cellsOf(s.shape,l,e),i=[];for(const r of a){o.grid[r]=s.css,o.gridColors[r]=s.color;const l=spawnBlock(n,t,Math.floor(r/GRID_SIZE),r%GRID_SIZE,tint(s.color,FLASH_AMOUNT));o.blocks[r]=l,i.push(l)}n.animate(i,{color:s.color},{duration:FLASH_TIME}),o.world.scoreboard.add(a.length*POINTS_PER_BLOCK),null!=s.root&&n.despawn(s.root),o.pieces[r]=randomPiece(),placeInTray(o,o.pieces[r],r,!0),o.onPlace();const{rows:d,cols:h}=fullLines(o),u=d.length+h.length;if(u>0){const r=new Set;for(const o of d)for(let l=0;l<GRID_SIZE;l++)r.add(o*GRID_SIZE+l);for(const o of h)for(let l=0;l<GRID_SIZE;l++)r.add(l*GRID_SIZE+o);const l=a.reduce((o,r)=>o+Math.floor(r/GRID_SIZE),0)/a.length,e=a.reduce((o,r)=>o+r%GRID_SIZE,0)/a.length;for(const s of r){const r=Math.floor(s/GRID_SIZE),a=s%GRID_SIZE,i=Math.hypot(r-l,a-e)*CLEAR_RIPPLE,d=o.gridColors[s],h=o.blocks[s];null!=h&&d&&popAndBurst(n,h,{scale:blockScale(t),color:d,delay:i,duration:CLEAR_TIME},blockBurst(t,r,a,d)).then(()=>n.despawn(h)),o.blocks[s]=null,o.grid[s]=null,o.gridColors[s]=null}o.world.scoreboard.add(u*POINTS_PER_LINE),o.onClear(u)}o.onScore(o.score),anyMoveLeft(o)||end(o,!1)}export function dragStart(o,r,l){const e=o.layout;if(!e||"playing"!==o.phase||o.drag)return;if(l<e.trayTop-20||l>e.trayTop+e.trayHeight+20)return;const t=e.slots.findIndex(([o])=>Math.abs(r-o)<=e.slotWidth/2),n=t>=0?o.pieces[t]?.root:null;if(null==n)return;const[s,a]=e.slots[t];o.onPick(),o.drag={slot:t,offsetX:r-s,offsetY:l-a,x:r,y:l,liftedAt:o.time,row:null,col:null,valid:!1,returning:!1},o.world.stopAnimation(n),o.world.animate(n,{scale:1},{spring:PICKUP_SPRING})}export function dragMove(o,r,l){const e=o.drag,t=o.layout;if(!e||!t||e.returning)return;e.x=r,e.y=l;const n=o.pieces[e.slot].shape,s=n.length,a=n[0]?.length??0,i=r-e.offsetX,d=l-e.offsetY-DRAG_LIFT,h=t.step/2,u=i>t.boardLeft-h&&i<t.boardLeft+t.boardSize+h&&d>t.boardTop-h&&d<t.boardTop+t.boardSize+h,f=u?Math.round((i-a*t.step/2-CELL_GAP/2-t.boardLeft)/t.step):null,p=u?Math.round((d-s*t.step/2-CELL_GAP/2-t.boardTop)/t.step):null;p===e.row&&f===e.col||(e.row=p,e.col=f,e.valid=null!==p&&null!==f&&fits(o,n,p,f),showPreview(o))}export function dragEnd(o){const r=o.drag,l=o.layout;if(!r||!l||r.returning)return;if(r.valid&&null!==r.row&&null!==r.col&&"playing"===o.phase)return o.drag=null,clearPreview(o),void place(o,r.slot,r.row,r.col);"playing"===o.phase&&null!==r.row&&null!==r.col&&o.onInvalid(),r.returning=!0,clearPreview(o);const e=o.pieces[r.slot]?.root;if(null==e)return void(o.drag=null);const[t,n]=l.slots[r.slot];o.world.animate(e,{position:toWorld(l,t,n,trayZ(l)),scale:TRAY_SCALE},{duration:RETURN_TIME}).then(()=>{o.drag===r&&(o.drag=null)})}function cancelDrag(o){const r=o.drag;if(!r)return;o.drag=null,clearPreview(o);const l=o.layout,e=o.pieces[r.slot]?.root;if(!l||null==e)return;const[t,n]=l.slots[r.slot];o.world.stopAnimation(e),o.world.set(e,{position:toWorld(l,t,n,trayZ(l)),scale:TRAY_SCALE})}const ghosts=new Array(CELLS),highlights=new Array(CELLS);function showPreview(o){const r=o.drag;if(ghosts.fill(null),highlights.fill(!1),r&&null!==r.row&&null!==r.col){const l=o.pieces[r.slot],e=r.valid?l.css:o.colors.CELL_INVALID,t=e+":"+r.valid;let n=o.previewColors.get(t);!n&&(n=flat(toColor(e,r.valid?.5:.3)),o.previewColors.set(t,n));const s=new Set;if(l.shape.forEach((o,l)=>o.forEach((o,e)=>{const t=r.row+l,a=r.col+e;1!==o||t<0||t>=GRID_SIZE||a<0||a>=GRID_SIZE||(ghosts[t*GRID_SIZE+a]=n,s.add(t*GRID_SIZE+a))})),r.valid){const{rows:r,cols:l}=fullLines(o,s);for(const o of r)for(let r=0;r<GRID_SIZE;r++)highlights[o*GRID_SIZE+r]=!0;for(const o of l)for(let r=0;r<GRID_SIZE;r++)highlights[r*GRID_SIZE+o]=!0}}applyPreview(o)}function clearPreview(o){ghosts.fill(null),highlights.fill(!1),applyPreview(o)}function applyPreview(o){const r=o.board;if(!r)return;const l=flat(toColor(o.colors.CELL_HIGHLIGHT));for(let e=0;e<CELLS;e++)ghosts[e]!==o.ghostShown[e]&&(o.ghostShown[e]=ghosts[e],setOverlay(o.world,r.ghosts[e],ghosts[e])),highlights[e]!==o.highlightShown[e]&&(o.highlightShown[e]=highlights[e],setOverlay(o.world,r.highlights[e],highlights[e]?l:null))}
@@ -0,0 +1 @@
1
+ "use strict";import{extrude,Path}from"@nayan-ui/engine";import{spawnBackdrop}from"../shared/EngineBackdrop.js";import{raisedBlockScale,spawnRaisedBlock}from"../shared/EngineBlocks.js";import{createGameMesh as _0x354555}from"../shared/EngineMeshes.js";import{CELL_GAP,flat,GRID_SIZE,toColor}from"./BlockBlastConstants.js";const Z_BACKDROP=-20,Z_BOARD=0,Z_EMPTY=1.2,Z_TRAY=2,Z_DRAG=80;export const toWorld=(o,e,t,l=0)=>[e-o.width/2,o.height/2-t,l];export const cellCenter=(o,e,t)=>[o.boardLeft+CELL_GAP+t*o.step+o.cell/2,o.boardTop+CELL_GAP+e*o.step+o.cell/2];const blockZ=o=>1.2+o.depth/2+.4,highlightZ=o=>1.2+o.depth+2,ghostZ=o=>1.2+o.depth+3;export const trayZ=o=>2+o.depth/2;export const dragZ=80;const HIDDEN=0,SHOWN=1,BOARD_RADIUS=8,CELL_RADIUS=4,RIM_WIDTH=1,panels=new Map;function roundedPanel(o,e,t=0){const l=o+":"+e+":"+t;let r=panels.get(l);if(!r){const n=(new Path).addRoundedRect(0,0,o,o,e);t>0&&n.addRoundedRect(t,t,o-2*t,o-2*t,e-t),r=_0x354555(extrude(n,{depth:0,fillRule:"evenodd"})),panels.set(l,r)}return r}export function buildBoard(o,e,t,l){const r=toWorld(e,e.boardLeft+e.boardSize/2,e.boardTop+e.boardSize/2),n=roundedPanel(e.cell,4),s=(e,t)=>o.spawn({mesh:n,position:e,scale:t,color:[1,1,1,0],pickable:!1}),a=o.spawn({mesh:roundedPanel(e.boardSize,8),position:[r[0],r[1],0],pickable:!1}),p=o.spawn({mesh:roundedPanel(e.boardSize,8,1),position:[r[0],r[1],.5],pickable:!1}),i=[],d=[],h=[];for(let o=0;o<GRID_SIZE;o++)for(let t=0;t<GRID_SIZE;t++){const[l,r]=cellCenter(e,o,t);i.push(s(toWorld(e,l,r,1.2),1)),d.push(s(toWorld(e,l,r,highlightZ(e)),0)),h.push(s(toWorld(e,l,r,ghostZ(e)),0))}const u={backdrop:spawnBackdrop(o,e.width,e.height,-20,l),rim:p,panel:a,empties:i,highlights:d,ghosts:h};return colorBoard(o,u,t),u}export function colorBoard(o,e,t){o.set(e.rim,{color:flat(toColor(t.BORDER))}),o.set(e.panel,{color:flat(toColor(t.SURFACE))});const l=flat(toColor(t.CELL_EMPTY));for(const t of e.empties)o.set(t,{color:l})}export function setOverlay(o,e,t){o.set(e,t?{scale:1,color:t}:{scale:0})}const blockSize=o=>[o.cell,o.cell,o.depth],spawnBlockAt=(o,e,t,l,r)=>spawnRaisedBlock(o,{position:t,size:blockSize(e),color:l,parent:r,shadow:!1});export function spawnBlock(o,e,t,l,r){const[n,s]=cellCenter(e,t,l);return spawnBlockAt(o,e,toWorld(e,n,s,blockZ(e)),r)}export function spawnPiece(o,e,t,l,r,n){const s=t.length,a=t[0]?.length??0,p=o.spawn({mesh:"none",position:toWorld(e,r[0],r[1],trayZ(e)),scale:n,pickable:!1});for(let r=0;r<s;r++)for(let n=0;n<a;n++)1===t[r]?.[n]&&spawnBlockAt(o,e,[(n-(a-1)/2)*e.step,-(r-(s-1)/2)*e.step,0],l,p);return p}export const blockScale=o=>raisedBlockScale(blockSize(o));export function blockBurst(o,e,t,l){const[r,n]=cellCenter(o,e,t),s=toWorld(o,r,n,blockZ(o));return{position:[s[0],s[1],s[2]+2*o.depth],size:o.cell,color:l,glowZ:1.5}}
@@ -1 +1 @@
1
- "use strict";const _0xa4576d=_0x21b0;function _0x49b9(){const e=["hSkDxaPAWQpcSSon","W6VcHCoSguDwoq","ntujjsJdQ8oKWO3dGa","WP4eWOhcTKHHW5vxWPWDoa","WPP9nLBdK8k4wZTDnmkunCkx","W5BcLczoWPFcMSouW5i","eqjiWO1DWQW","CJLsWPOrWONdSa","ze52CComW7qB","fuGfnSkgqCkXiXxcS3W","jZFcNmoXW7FcTCo+W5/cRmowla","yeDvESk+wv/cHq5F","hgFcTr7dIbHEvHC","WPJdM8oglmohW5T6CgNcM8kKW5eD","W4/cLSkeBCkxWOq+","W5XRuX7cNmogCW82W7n9q8kj","W57cHSkfESkgWQ0RuwS","W4lcHtnVWPFcVmobW5O7","WO3cVfLbWPpcPmk4e24ACdqR","WQNdI8kwD8oz","WRjsWPVdSsVcLgHaea","WPJdRYtcIwbjW5KkaG","bWFcQ8o1W5pcI8oi","ws/cVmkvnCkUWR4","mmkChtD/FmkCehOEWRNcR1HzW4lcSCk9qSkGtSkl","uWbVWQS/WRJdHSoLx8keWQPREG","g8o/W7bJfSkBWPK","W67cR8k5xmk5WRuiBKVcVSkzW4iC","W6hcT8oMa8kAWRZdOGldGSopW5W","WQ8YWRFcOxTcW6a","uCoTzZNcKGieW4ZdJJ/cJMldPa","WRaGomoBW5enWR7cISowW7WuqCk9","CSo0WOv4WP8","eejBbmoM","WQKfWOhcLeiTW7HsWPWxpCk+","W6RdTGldHsm","qmobqcyRFCk8ivW9W6S","dmkEAGy","kSk/W7/dOSkG","h8kbAJ1jWQBcSmoiWPWSdq","WPzMWQtdHM7cTuO","lhO1o8kKzq","gb3cU8oZW4NcLmosW5BcNW","WONdICkceSo7WOddPxe","WPb9WRFdLMFcVM1Qn8oWztW","lSk2p8oaDCkGW50BwCkiowu","iqaagmkRCq","pWTdWR1p","dSkhcSorqa","px7cLs7dHa","sXhdQXpcM8oTCSkSW6mDWOm","xaLKWQeHWQO","nWeak8k6CG","W7ZdIg9qWPBcR8kaeW","WRrjW6xcHmofjNS","W6hcNSo3h0TziwldK17dSwBcKCoheh0","W5iYt8oBrSk+naZcOHlcNCkwEW","q35xv8o7W5u2","WRBcNmkvW6lcTqmD","W6hcLvRcVuRdMx0","gCoTiuCvWPpdNmkIW6hcKuJcNYy","ECkYW4xdNSkG","W7ZdPspdMdddNXy","ntWHamkS","WQJcLwjrWQZcMSkoja","kmk+qd1JWPxcNSo4WRGolsOm","pCoKD8oesaJdVSk4ia","BujrF8o9jxVcSb1+FCo8","nYFcMSoeW7pcTSoV","WR5vh3FdJCky","d2i6v8omW4xdG8ocq8opW5RdPmkL","W7NcT8oxfSoy","W63cJNVcP07dHwW","W4TvxYZcTa","lWXfWO9N","WP/dUtlcOxfJW5C","WQBdShldJJ3cICoFW5WDWQZdKa","pCkGaCk+WOxdVmoR","W5JcGGjXWOlcGSojW5K5","g8kAW4/dUmkOwbK","W6pdRSofrSorW4X/W5r3","WQRcLCkHWRddPW","W6NcNN3cHL/dIMZcMa","b14ujSkttmkPja","BSkYW4BdQCkfWQKGpXi","wCknW6ZdR8kOWPahdInvWQFcUmkl","WPW0xg8gB8oPjCk4","W5RcSmoAmmoAWR3dGSkAamkKW7m","xY55fSkqWPpcHW","oCk0WPusW6mAh1xdRSkWWOCXWQSz","j8kzgeNdRgX2W5ldRbRcS3hdPq","ohezbCkS","pCoKD8octWldT8k5nCkwdq","mSk8WPbdWQuJWOFdTa","W5ZcJNnnWP9a","WQWDyeK5D8okgSkyW5aowfe","WOpdK8kuCCoPWPZdUa","WRFdO8kJyCoyWQ7dNZu","W6tcUfjjWQ9Gba","WRGIWQFcTMXEW6O","pSk8jCo3DCkLW58CsG","WR0Mrweh","WPTNpNddOmkXwJHvoCkw","WRpdS8kLqmojWQhdNW","kmkEyb1dWOJcRSopWPWKaX0","lSosc0e4WQRdU8ktW5a","WRBcVvDhWQ0","hmkzpmkpWQVdJCoDWQ3cM1ZdVXpdUW","bmkjCCkuWRqyWOdcQq","W7fDqmkNWOK","pSkMoCoXCCkIW4u","agv3lSoNW70u","omk9kSoHEmkPW7KysmkFo3xdIa","xCoYW7zhWOS","Amo2W5vxWRzmxa","W6ukWQBdGCkxEJ9xW4S+WP0xWQi","BGLEamkr","ySoXWPTJWO4zWOK","eCkAdmolqa","WReVomoFW58hWR7cMCo0W4CIr8kE","eL4temktASk8lbe","WPXve1BdMa","WONdVYxcNNfGW4W","W7DLBmkVWODtW6lcVSoXW7aE","psZcKYRdSmoEf8kvWOm","CKHHqmoiW7yduSk4hcG","fmkiBmkwWPyxWPK","cMFcGJNdMW","W4ZcOSoremoEWR0","nCoRWP5REG","CfjQ","h8kkW4NdMCk5vXLa","dg90pmoSW7W","tLVdQv3cMmowcCkvWOqIW5S","o8onWQLWrW","nJpcHSoyW7pcQSoAW7q","W4tcKSk5ACkG","crNcSr/dQmoWlmk1","W6fJE8kEWOnrW7O","W7BdVJJdNJZdKa7dVSknCI8dwKiLoG","WRZcH8koW6tcUqWfW7/dR8kHkmkxW7hdNunr","W7mFBSo7Amkn","W6FdNSovWQFdOfvEWQxdNmk1c8kjW57dRG","bCkzmSoZxW","wqv0","W7lcVKv2WQ9JhW","W6tcSSoNaSoCWOhdJr/dISoS","W6ZcMMRcVKZdMxFcIbVcI8oIaN/cJaK","W4ZcTSonaCoEWR/dMG","DILuWRSaWOBdSmos","WObGWRpdPM7cVq","W6NcT8oJb8kFW73dQsRdMConW40m","emkLm2VdK1zGW6NdHd7cQLhdMMRcMCoaWRBdPK0"];return(_0x49b9=function(){return e})()}!function(){const e=_0x21b0,o=_0x49b9();for(;;)try{if(473029==-parseInt(e(535,"lhxG"))/1*(parseInt(e(648,"aWx&"))/2)+-parseInt(e(622,"xG$#"))/3+-parseInt(e(586,"FrM5"))/4+-parseInt(e(521,"FrM5"))/5+-parseInt(e(585,"&Gmg"))/6+-parseInt(e(591,"j58v"))/7*(-parseInt(e(548,"8jWf"))/8)+parseInt(e(644,"XULM"))/9)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x59fbd8 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x21851d}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useBlockBreakerStore,useScore,useIsPlaying,useGameOver,useGameWon}from"./BlockBreakerStore.js";import{BlockBreakerService}from"./BlockBreakerService.js";import{BLOCK_BREAKER_TIME_LIMIT}from"./BlockBreakerConstants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x13bfaa,jsxs as _0x1eed2c}from"react/jsx-runtime";const BlockBreakerComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:a,onShare:W,onShareScreenshot:r,onShowLeaderboard:n,bannerAd:d})=>{const S="FrM5",s=_0x21b0,k={euUTp:function(e,o){return e===o},yMAEu:function(e,o,t){return e(o,t)},Vthec:function(e,o,t){return e(o,t)},sKIKo:function(e,o,t){return e(o,t)},EHKLU:"lose",RlBCo:function(e,o){return e&&o},hqOvR:function(e,o){return e<=o},aODJb:function(e,o,t){return e(o,t)},rAHeY:function(e,o,t){return e(o,t)},UrCqc:s(605,"lhxG"),RPBhm:function(e,o){return e(o)},tDEbE:function(e,o,t){return e(o,t)},aGPcQ:function(e){return e?.()},cLOyG:function(e){return e()},bsfrC:function(e,o,t){return e(o,t)},RRUdd:function(e,o){return e||o}},x=e?.[s(599,"(FI5")]??!0,i=e?.[s(514,"%SqA")]??!0,u=e?.[s(534,"0cO7")]??0,l=_0x59fbd8.useRef(x);l[s(578,"Sr@@")]=x;const m=_0x59fbd8.useRef(i);m.current=i;const f=_0x59fbd8[s(552,"(FI5")](t);f.current=t;const p=k[s(602,"bGDE")](useScore),b=useIsPlaying(),_=useGameOver(),G=useGameWon(),C=_0x59fbd8[s(601,"xG$#")](!1),R=_0x59fbd8.useRef(!0),O=_0x59fbd8[s(631,"w53K")](e=>{const o=s;if(f[o(563,"3)DO")]&&!C[o(562,"FYG7")]){const t=useBlockBreakerStore[o(638,"3Rt6")]().score;f.current({status:e,score:t[o(555,"79I0")]()}),C[o(519,"aWx&")]=!0}},[]),B=_0x59fbd8[s(500,"!dvp")](()=>new BlockBreakerService,[]),E=_0x59fbd8.useCallback(()=>{const e=s;k[e(529,"7l1q")](e(531,"#2b@"),e(503,"]gxg"))?_0x4844f8[e(610,"#NLg")]():(playSound(GAME_SOUNDS[e(615,"]q4h")][e(546,"FYG7")],l.current),k[e(508,"*J!w")](playHaptic,HapticType[e(520,"%SqA")],m[e(581,"@6CC")]))},[]),h=_0x59fbd8[s(525,S)](()=>{const e=s;playSound(GAME_SOUNDS[e(640,"PjE3")][e(584,"wq5&")],l[e(512,"%SqA")]),k.Vthec(playHaptic,HapticType.MEDIUM,m[e(540,"FrM5")])},[]),y=_0x59fbd8[s(525,S)](()=>{const e=s;playSound(GAME_SOUNDS[e(497,"]gxg")][e(624,"KS9&")],l.current),playHaptic(HapticType.LIGHT,m[e(613,"L[lm")])},[]),M=_0x59fbd8.useCallback(()=>{const e=s;playSound(GAME_SOUNDS.BLOCK_BREAKER[e(597,"xIx9")],l[e(643,"5!Sf")]),playHaptic(HapticType.ERROR,m[e(556,"#NLg")])},[]),I=_0x59fbd8.useCallback(()=>{const e=s;k[e(626,"Ea[(")](playSound,GAME_SOUNDS[e(620,"79I0")].WIN,l[e(595,"(FI5")]),playHaptic(HapticType[e(498,"8jWf")],m[e(519,"aWx&")])},[]),N=_0x59fbd8[s(558,"wq5&")](()=>{const e=s;k[e(511,"FrM5")](playSound,GAME_SOUNDS.BLOCK_BREAKER.POWER_UP,l.current),k[e(588,"0cO7")](playHaptic,HapticType[e(577,"xIx9")],m[e(524,"MDXe")])},[]),g=_0x59fbd8[s(527,"3)DO")](()=>{const e=s;playSound(GAME_SOUNDS[e(573,"*J!w")].WALL,l[e(563,"3)DO")]),playHaptic(HapticType.LIGHT,m[e(581,"@6CC")])},[]),H=_0x59fbd8[s(504,"KS9&")](()=>{const e=s;playSound(GAME_SOUNDS[e(645,"&Gmg")].GAME_OVER,l[e(516,"XULM")]),playHaptic(HapticType.ERROR,m[e(556,"#NLg")])},[]),P=_0x59fbd8[s(647,"iLhQ")](()=>{const e=s;playSound(GAME_SOUNDS[e(580,"FYG7")][e(596,"3Rt6")],l.current),playHaptic(HapticType.LIGHT,m[e(547,"!dvp")])},[]),D=_0x59fbd8.useCallback(()=>{const e=s;playSound(GAME_SOUNDS[e(570,"D&[t")][e(636,"cT[J")],l[e(519,"aWx&")]),k[e(574,"8jWf")](playHaptic,HapticType[e(496,"!dvp")],m[e(569,"%hy7")])},[]);_0x59fbd8.useEffect(()=>{B[s(600,"%SqA")](E,h,y,g,M,H,I,N,P,D)},[B,E,h,y,g,M,H,I,N,P,D]),_0x59fbd8[s(621,"iLhQ")](()=>useBlockBreakerStore[s(567,"7l1q")](e=>e.isPlaying,e=>{B.setPlaying(e)}),[B]),_0x59fbd8[s(557,"&fuY")](()=>{const e=s;if((_||G)&&!C[e(623,"xIx9")]){const o=G?e(532,"3)DO"):k.EHKLU;O(o)}k[e(604,"7l1q")](!_,!G)&&(C[e(556,"#NLg")]=!1)},[_,G,O]),_0x59fbd8[s(639,"PjE3")](()=>{B[s(541,"CHI$")]()},[B]),_0x59fbd8[s(507,"]q4h")](()=>(R.current=!0,()=>{const e=_0x21b0;R[e(524,"MDXe")]=!1,useBlockBreakerStore[e(637,"a7sk")]()[e(633,"M3qk")]&&!C[e(623,"xIx9")]&&O(e(530,"Ea[(")),useBlockBreakerStore[e(551,"FYG7")]()[e(510,"P6bk")](),B.cleanup(),useBlockBreakerStore.getState().resetGame()}),[B]),_0x59fbd8.useEffect(()=>{if(!b)return;const e=k.sKIKo(setGameInterval,()=>{const o=_0x21b0;if(o(543,"Fuqu"),!k[o(529,"7l1q")](o(545,"%SqA"),o(646,"3Rt6"))){const e={_0x1313c0:617,_0x4c737a:"CHI$",_0x5bc146:627,_0x12f40c:571,_0x52d33b:"%hy7"};return _0x4fa071[o(634,"1*)0")]=!0,()=>{const t=o;_0x52e2f2[t(e._0x1313c0,e._0x4c737a)]=!1,_0x552383.getState().isPlaying&&!_0x382d40[t(e._0x5bc146,"a7sk")]&&RbrLnF.aSpKK(_0x131341,RbrLnF[t(590,"CHI$")]),_0x184cfa[t(560,"M3qk")]()[t(539,"lhxG")](),_0x35f89a[t(513,"0cO7")](),_0x5b6bad.getState()[t(e._0x12f40c,e._0x52d33b)]()}}{if(!R[o(632,"e(gQ")])return void clearGameInterval(e);const t=useBlockBreakerStore.getState()[o(559,"KS9&")];k[o(538,"%hy7")](t,0)?(useBlockBreakerStore[o(619,"*J!w")]()[o(565,"xIx9")](),k[o(618,"xG$#")](playSound,GAME_SOUNDS.BLOCK_BREAKER[o(635,"WqBh")],l[o(528,"P6bk")]),k[o(629,"bGDE")](playHaptic,HapticType[o(536,"#2b@")],m[o(609,"2DNb")]),clearGameInterval(e)):useBlockBreakerStore[o(638,"3Rt6")]()[o(554,"&Gmg")](-1)}},1e3);return()=>clearGameInterval(e)},[b]);const A=_0x59fbd8.useCallback(()=>{const e=s;C.current=!1,useBlockBreakerStore[e(499,"8jWf")]().startGame(BLOCK_BREAKER_TIME_LIMIT),B.setPlaying(!0),B[e(572,"M3qk")](),playSound(GAME_SOUNDS[e(611,"Fuqu")][e(603,"%SqA")],l[e(550,"Ea[(")]),k[e(523,"KS9&")](playHaptic,HapticType[e(501,"wq5&")],m.current)},[B]),L=_0x59fbd8[s(642,"Ea[(")](()=>{const e=s,o=k[e(628,"D&[t")][e(587,"aWx&")]("|");let t=0;for(;;){switch(o[t++]){case"0":B[e(542,"L[lm")]();continue;case"1":k[e(593,"1*)0")](O,"cancel");continue;case"2":useBlockBreakerStore[e(560,"M3qk")]()[e(641,"]gxg")]();continue;case"3":B[e(522,"3Rt6")]();continue;case"4":playHaptic(HapticType[e(561,"bGDE")],m[e(563,"3)DO")]);continue;case"5":playSound(GAME_SOUNDS[e(509,"e(gQ")][e(526,"lhxG")],l[e(505,"8jWf")]);continue}break}},[B,O]),v=_0x59fbd8[s(594,"79I0")](()=>{const e=s;"NZVxu"===e(515,"XULM")?(k.tDEbE(_0x3b41fa,_0x5f4bb8[e(573,"*J!w")][e(612,"3)DO")],_0x36bb22[e(512,"%SqA")]),_0x36c168(_0x2a4516[e(606,"FYG7")],_0x196e54.current)):(k.aGPcQ(a),B[e(576,"MDXe")](),useBlockBreakerStore[e(533,"1*)0")]().resetGame(),B.initializeBricks())},[B,a]),T=_0x59fbd8[s(564,"3Rt6")](()=>{v()},[v]),q={..._0x59fbd8[s(500,"!dvp")](()=>({isPlaying:b,gameOver:_,onStartGame:A,onStopGame:L,onShare:W,onShowLeaderboard:n,startButtonSubtext:"Break all bricks!"}),[b,_,A,L,W,n])},K={..._0x59fbd8[s(630,"MDXe")](()=>({isVisible:_,score:p,onPlayAgain:T,buttonText:s(589,"wq5&"),title:G?s(598,"8jWf"):s(575,"(FI5"),message:G?s(579,"j58v"):"Great breaking!"}),[_,p,T,G])};return K[s(614,"a7sk")]=r,K[s(537,"xIx9")]=d,_0x13bfaa(GestureHandlerRootView,{style:styles.container,children:_0x1eed2c(_0x21851d,{offset:u,children:[_0x13bfaa(GameArea,{gameService:B,offset:u}),k.Vthec(_0x13bfaa,ScoreBoard,{offset:u}),k[s(616,"PjE3")](_0x13bfaa,GameControlButton,q),_0x13bfaa(GameOverModal,K),_0x13bfaa(GameSettingsModal,{gameId:GAME_IDS[s(582,"%hy7")],settings:k[s(518,"5!Sf")](e,DEFAULT_GAME_SETTINGS),onSettingsChange:o})]})})},_0x500bd5={};_0x500bd5[_0xa4576d(592,"79I0")]=1,_0x500bd5[_0xa4576d(549,"a7sk")]=BACKGROUND_COLOR;const _0x294678={flex:1},_0x6bdbba={};function _0x21b0(e,o){e-=496;const t=_0x49b9();let a=t[e];if(void 0===_0x21b0.zHvNyW){const e=function(e,o){let t,a,W=[],r=0,n="";for(e=function(e){let o="",t="";for(let t,a,W=0,r=0;a=e.charAt(r++);~a&&(t=W%4?64*t+a:a,W++%4)?o+=String.fromCharCode(255&t>>(-2*W&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let e=0,a=o.length;e<a;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),a=0;a<256;a++)W[a]=a;for(a=0;a<256;a++)r=(r+W[a]+o.charCodeAt(a%o.length))%256,t=W[a],W[a]=W[r],W[r]=t;a=0,r=0;for(let o=0;o<e.length;o++)a=(a+1)%256,r=(r+W[a])%256,t=W[a],W[a]=W[r],W[r]=t,n+=String.fromCharCode(e.charCodeAt(o)^W[(W[a]+W[r])%256]);return n};_0x21b0.lTiVpJ=e,_0x21b0.ssfWgG={},_0x21b0.zHvNyW=!0}const W=t[0];_0x21b0.rTXUSL!==W&&(_0x21b0.ssfWgG={},_0x21b0.rTXUSL=W);const r=_0x21b0.ssfWgG[e];return void 0===r?(void 0===_0x21b0.jfuUDc&&(_0x21b0.jfuUDc=!0),a=_0x21b0.lTiVpJ(a,o),_0x21b0.ssfWgG[e]=a):a=r,a}_0x6bdbba[_0xa4576d(502,"%SqA")]=_0x500bd5,_0x6bdbba.gestureRoot=_0x294678;const styles=StyleSheet[_0xa4576d(607,"xG$#")](_0x6bdbba);export const BlockBreaker=BlockBreakerComponent;BlockBreaker.displayName=_0xa4576d(506,"79I0");
1
+ "use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,LIVES,TIME_LIMIT}from"./BlockBreakerConstants.js";import{createGame,dispose,dragMove,dragStart,reset,setLayout,setTheme,start,tick}from"./BlockBreakerGame.js";import{jsx as _0x5156cb}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.BLOCK_BREAKER;export const BlockBreaker=engineGame(GAME_IDS.BLOCK_BREAKER,e=>{const[t,r]=useLiveState(0),[s,a]=useLiveState(LIVES),[o,i]=useLiveState(TIME_LIMIT),{theme:S,status:n,screen:m,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.BLOCK_BREAKER,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,s)=>{const a=getLayout(t,r,s);return setLayout(e,a),a.boardWidth},drag:(e,{phase:t,dx:r})=>{"start"===t?dragStart(e):"move"===t&&dragMove(e,r)},sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=r,e.onLives=a,e.onTime=i,e.onWall=()=>t(SOUNDS.WALL,HapticType.LIGHT),e.onPaddle=()=>t(SOUNDS.PADDLE,HapticType.LIGHT),e.onBrickHit=()=>t(SOUNDS.HIT,HapticType.LIGHT),e.onBrickBreak=()=>t(SOUNDS.DESTROY,HapticType.MEDIUM),e.onCombo=()=>t(SOUNDS.COMBO,HapticType.MEDIUM),e.onPowerUp=()=>t(SOUNDS.POWER_UP,HapticType.SUCCESS),e.onLaunch=()=>t(SOUNDS.LAUNCH,HapticType.LIGHT),e.onLoseLife=()=>t(SOUNDS.LOSE_LIFE,HapticType.ERROR),e.onWin=()=>t(SOUNDS.WIN,HapticType.SUCCESS),e.onLose=()=>t(SOUNDS.GAME_OVER,HapticType.ERROR)}});return _0x5156cb(EngineGameScreen,{...m,light:LIGHT,columns:[scoreColumn(t),livesColumn(s,LIVES),timerColumn(o,S)],subtext:"Break all bricks!",gameOver:p({title:"win"===n?"YOU WON!":"GAME OVER",message:"win"===n?"All bricks destroyed!":"Great breaking!",scoreLabel:"Final Score",score:t,buttonText:"Break Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x5e947c=_0xf589;!function(){const W=_0xf589,o=_0x33f0();for(;;)try{if(236721==parseInt(W(361,"(r!N"))/1*(parseInt(W(418,"(()s"))/2)+-parseInt(W(388,"rQGV"))/3+parseInt(W(357,"GaQA"))/4+parseInt(W(391,"syQ)"))/5+parseInt(W(387,"7M7T"))/6+parseInt(W(397,"JGbQ"))/7*(parseInt(W(358,"q&CM"))/8)+parseInt(W(365,"BAxm"))/9*(-parseInt(W(374,"#hW*"))/10))break;o.push(o.shift())}catch(W){o.push(o.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const GAME_WIDTH=getGameDimensions()[_0x5e947c(406,"@Kb6")],BRICK_COLS=8,BRICK_ROWS=5,BRICK_PADDING=3,BRICK_WIDTH=Math[_0x5e947c(395,"loyt")]((GAME_WIDTH-27)/8),BRICK_HEIGHT=isTablet?22:18,GRID_TOP=5,PADDLE_WIDTH=isTablet?100:80,PADDLE_HEIGHT=isTablet?14:12,BALL_RADIUS=isTablet?8:7,BALL_SPEED=isTablet?5:4;export const GRID_HEIGHT=isTablet?650:500;const _0x4829bc={};function _0xf589(W,o){W-=355;const x=_0x33f0();let _=x[W];if(void 0===_0xf589.xcTXup){const W=function(W,o){let x,_,e=[],t=0,C="";for(W=function(W){let o="",x="";for(let x,_,e=0,t=0;_=W.charAt(t++);~_&&(x=e%4?64*x+_:_,e++%4)?o+=String.fromCharCode(255&x>>(-2*e&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=o.length;W<_;W++)x+="%"+("00"+o.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(x)}(W),_=0;_<256;_++)e[_]=_;for(_=0;_<256;_++)t=(t+e[_]+o.charCodeAt(_%o.length))%256,x=e[_],e[_]=e[t],e[t]=x;_=0,t=0;for(let o=0;o<W.length;o++)_=(_+1)%256,t=(t+e[_])%256,x=e[_],e[_]=e[t],e[t]=x,C+=String.fromCharCode(W.charCodeAt(o)^e[(e[_]+e[t])%256]);return C};_0xf589.qhtYDe=W,_0xf589.NIKpHW={},_0xf589.xcTXup=!0}const e=x[0];_0xf589.WNnzma!==e&&(_0xf589.NIKpHW={},_0xf589.WNnzma=e);const t=_0xf589.NIKpHW[W];return void 0===t?(void 0===_0xf589.REsrjF&&(_0xf589.REsrjF=!0),_=_0xf589.qhtYDe(_,o),_0xf589.NIKpHW[W]=_):_=t,_}function _0x33f0(){const W=["FmoPuf/dKxFcL2NcGCkGW7uz","W6qaWQf1efBdHmkve1i+WO7cUq","fmksW7lcVmkDdSoU","FSkWutKfDmoC","n8kZWONdKSoI","WPLZWOuWW6JcOSkpWRzUemoS","D8kpWQqDvtVdHq","z8krr8onvq","amk0W4OxmuOwWPfvWQZcRLpcGW","rSkxDmoeWQ3cMYRdLHVdJmosWRxdO8kaW6KiFXddTSk3","WPeUkhhdIa","pmkHlCoEWQxcPCkbWPWUW6PUW5NcGCovaSkoW4aUW6VdOxHaWP96W6W","s8kPFMldLCovlCkJWOBdNCkyqSkxuCkM","CmkEB8oJuSox","j8oRcSk8W4ddUctdLd/dQCoBWP4","W55CW4v+p8kdlCo1WP3dQY9d","gv9cW41KW6Hv","dCk3uZL+aCkZW6lcUNvHca/dV8kfasbVWRlcQa","W59RW5FcT8kaxWFdM2DFWOu","W48+AmkKFSoVuq","xSoxFCoRWOZcNSkfsSoYpgy","WR5zWRGbW4lcOSk0WPzmiq","W6RdTmoQlmojidbBW7zIWOC1fCoNW6NcHW","omowWOL/idldP8korSkcWRS","WR/cV8k4m8kUWOSoW7NcG8oGF8oL","jKbtWPbWW4FdVXi0WRhdTG/cPq","omkaWOJdJ8oi","WO/cJCoDW4zyWOtdVCkwaIldPKe","yCo9we/dLg3cIN/cHmkO","gMRcQSo9AHqw","W4JdJCoftCobW6CYW7VcMCoA","cXBcKJ7cRSo2WRxcJCkv","W7ZcV3vCW5lcUCkSjf1xk19x","W5NdSINcSSopjwLCgmkKW6GN","qmkNW6Knrq","d8oWfCkyr29U","D8kwB8oIqCocAr3cII7cRq","yCkBW5m8FW/dGCkPFmkE","gXRcSCkyyG","WQVdOSkRrLbaWO/dIa","EmkkvwVcRqFcHrBdGSoEbrm","W7jnW54Zk8oQpcddPqD/WQO5WQ7cUxS+CrZcH8kVuCk8xG","gCo2nrJdHMJcGrtdVmoLgJpcSa","FmkrBSkwqG4f","DCkrW7JdHq","h8k3wZfTfSkTW6tcVhrM","h8k3wZfTf8k8W6xcSgu","ACoWqeNdNg3cHhFcJSkH","nCoOdComWR/dSe0","jblcNCk1F8oTW7JcQa","W7JdQCoQiCowld9kW7D0WPe5aa","W69mW5/cUmku","W5FcJmolraakACkcW50","WRX0W5BcHq1yjCogfmoKjSkPW64","gSooxgpdT1FcLCklW54Eo8kJ","W75no8keWPxcO2btBmooE13dTdDKW7LxWPtcGx1lESk+FG","k8ohW4eSW5ldV8o8DIFdQSkjsWHv","W7NdSJqmqCodWOFcOSoujmkzWRqk","wdldIuldSrCpW7ZcJ8oeW7Xc","FxjsW71mW7HyA8oXu8kYW70fsG","d8kCufRcQ3tcJG","FaZdR27dIa","hCoWfCkwtwjLW7a3W4y","D0nbAmkBW5bxsa","WQrqW7qGcvhdHCovBqHNW5tdVSoTWPxdJsDxASkoW4vMWRie","ASo/jbNcOWFdPa","WQpcTKddH8kB","xmkHW6Gnra/dTSkyt8kLWRTbpa"];return(_0x33f0=function(){return W})()}_0x4829bc.BRICK_COLS=8,_0x4829bc[_0x5e947c(396,"UPE#")]=5,_0x4829bc[_0x5e947c(384,"Dm[3")]=3,_0x4829bc[_0x5e947c(407,"Y6ww")]=BRICK_WIDTH,_0x4829bc[_0x5e947c(392,"loyt")]=BRICK_HEIGHT,_0x4829bc[_0x5e947c(383,"Q1o$")]=5,_0x4829bc[_0x5e947c(402,"1671")]=PADDLE_WIDTH,_0x4829bc[_0x5e947c(359,"7Sa*")]=PADDLE_HEIGHT,_0x4829bc[_0x5e947c(419,"[#ss")]=isTablet?30:20,_0x4829bc[_0x5e947c(379,"[#ss")]=BALL_RADIUS,_0x4829bc[_0x5e947c(380,"[#ss")]=BALL_SPEED,_0x4829bc[_0x5e947c(356,"Dm[3")]=200,_0x4829bc[_0x5e947c(411,"!T9L")]=150,_0x4829bc[_0x5e947c(368,"GaQA")]=3,_0x4829bc.POWER_UP_CHANCE=.15,_0x4829bc[_0x5e947c(393,"(()s")]=2,_0x4829bc[_0x5e947c(410,"qMLX")]=isTablet?18:14;export const BLOCK_BREAKER_GAME_CONFIG=_0x4829bc;export const BRICK_COLORS=["#FF3B3B",_0x5e947c(399,"#hW*"),_0x5e947c(377,"UPE#"),_0x5e947c(394,"1671"),_0x5e947c(404,"DH%v"),_0x5e947c(421,"Z(xS")];export let PowerUpType=function(W){const o="1671",x=_0x5e947c,_={};_[x(360,"@Kb6")]=x(370,"YXJr"),_[x(385,"*QQd")]=x(362,o),_[x(400,"SLmE")]=x(355,"Y6ww");const e=_;return W[e[x(372,"Q1o$")]]=x(420,"*QQd"),W[e[x(409,"YXJr")]]=x(371,"GaQA"),W[x(381,o)]=e[x(412,"1pD*")],W}({});export const BLOCK_BREAKER_TIME_LIMIT=300;const _0x406fb5={};_0x406fb5.BACKGROUND=BACKGROUND_COLOR,_0x406fb5[_0x5e947c(369,"UPE#")]=PRIMARY_COLOR,_0x406fb5[_0x5e947c(415,"YXJr")]=_0x5e947c(408,"GPtA"),_0x406fb5[_0x5e947c(422,"mUAF")]=_0x5e947c(375,"8CuA"),_0x406fb5[_0x5e947c(378,"DH%v")]=_0x5e947c(408,"GPtA"),_0x406fb5[_0x5e947c(364,"q&CM")]=_0x5e947c(389,"q49V"),_0x406fb5.UI=PRIMARY_COLOR,_0x406fb5[_0x5e947c(366,"nJAy")]=_0x5e947c(413,"u)LN"),_0x406fb5[_0x5e947c(414,"5tMG")]=_0x5e947c(398,"WCUl"),_0x406fb5[_0x5e947c(401,"GaQA")]=_0x5e947c(382,"!T9L"),_0x406fb5[_0x5e947c(390,"@p9O")]=_0x5e947c(363,"!YXU"),_0x406fb5[_0x5e947c(376,"#hW*")]=_0x5e947c(405,"[#ss");export const BLOCK_BREAKER_COLORS=_0x406fb5;
1
+ "use strict";import{isTablet}from"../../services/UtilsService.js";import{getSceneInputInsets}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const BRICK_COLS=8;export const BRICK_ROWS=5;export const LIVES=3;export const TIME_LIMIT=300;export const POINTS_PER_BRICK=200;export const POINTS_PER_COMBO=150;export const COMBO_CALLOUT=3;export let PowerUpType=function(t){return t.WIDE_PADDLE="wide_paddle",t.MULTI_BALL="multi_ball",t.EXTRA_LIFE="extra_life",t}({});export const POWER_UP_TYPES=[PowerUpType.WIDE_PADDLE,PowerUpType.MULTI_BALL,PowerUpType.EXTRA_LIFE];export const POWER_UP_CHANCE=.15;export const MAX_BALLS=5;export const WIDE_FACTOR=1.3;export const WIDE_MAX=1.5;export const WIDE_TIME=10;export const FRAME_TIME=1/60;export const MAX_FRAMES=2;export const BALL_SPEED=isTablet?5:4;export const BALL_RADIUS=isTablet?8:7;export const LAUNCH_SPREAD=Math.PI/3;export const PADDLE_BOUNCE=Math.PI/3;export const POWER_UP_SPEED=2;export const POWER_UP_SIZE=isTablet?18:14;export const RELAUNCH_DELAY=.5;export const PADDLE_WIDTH_TIME=.22;export const BUMP_TIME=.06;export const BUMP_SPRING={damping:8,stiffness:320};export const BALL_SPAWN_SPRING={damping:10,stiffness:300};export const BRICK_DROP=18;export const BRICK_INTRO_SPRING={damping:11,stiffness:190};export const BRICK_ROW_STAGGER=.07;export const BRICK_COL_STAGGER=.018;export const PULSE_TIME=.52;export const TRAIL=[{k:1.6,r:.8,o:.32},{k:3.2,r:.62,o:.18},{k:4.8,r:.45,o:.08}];export const LIGHT=frontLight([-.3,.7,1],.5);export const BRICK_COLORS=["#FF3B3B","#FFD700","#32CD32","#4DA6FF","#BF5AF2","#FF9500"];export const POWER_UP_COLORS={[PowerUpType.WIDE_PADDLE]:"#00FF88",[PowerUpType.MULTI_BALL]:"#FF6B9D",[PowerUpType.EXTRA_LIFE]:"#FFD700"};export const PADDLE_COLOR="#ffffff";export const BALL_COLOR="#e0e0e0";export const TRAIL_COLOR="#ffffff";export const CLASSIC_BOARD="rgba(255, 255, 255, 0.25)";export const CLASSIC_BORDER="rgba(255, 255, 255, 0.5)";export const CLASSIC_RADIUS=16;export const THEMED_RADIUS=8;const BRICK_PADDING=3,GRID_TOP=5;export function getLayout(t,o,e){const r=gameWidthFor(t),s=getSceneInputInsets(e),p=s.top+4,n=Math.max(1,o-p-s.bottom-10),_=Math.min(isTablet?650:500,n),L=Math.floor((r-27)/8),I=isTablet?22:18,E=isTablet?14:12;return{width:t,height:o,boardLeft:(t-r)/2,boardTop:p+(n-_)/2,boardWidth:r,boardHeight:_,brickWidth:L,brickHeight:I,bricksLeft:(r-(8*L+21))/2,bricksTop:5,brickStepX:L+3,brickStepY:I+3,paddleWidth:isTablet?100:80,paddleHeight:E,paddleTop:_-(isTablet?30:20)-E/2,minX:BALL_RADIUS,maxX:r-BALL_RADIUS,lostY:_-BALL_RADIUS}}
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{introPlayed}from"../shared/EngineUtils.js";import{BALL_RADIUS,BALL_SPEED,BRICK_COL_STAGGER,BRICK_COLS,BRICK_ROW_STAGGER,BRICK_ROWS,COMBO_CALLOUT,FRAME_TIME,LAUNCH_SPREAD,LIVES,MAX_BALLS,MAX_FRAMES,PADDLE_BOUNCE,POINTS_PER_BRICK,POINTS_PER_COMBO,POWER_UP_CHANCE,POWER_UP_SPEED,POWER_UP_TYPES,PowerUpType,RELAUNCH_DELAY,TIME_LIMIT,WIDE_FACTOR,WIDE_MAX,WIDE_TIME}from"./BlockBreakerConstants.js";import{breakBrick,buildScenery,bumpPaddle,colorBall,hitBrick,pieceColors,placeBall,placePaddle,placePowerUp,removeBall,removeScenery,setPaddleWidth,setSceneryTheme,spawnBall,spawnBrick,spawnPaddle,spawnPowerUp}from"./BlockBreakerScene.js";const WORLD_CAPACITY=500,newBricks=()=>Array.from({length:BRICK_ROWS*BRICK_COLS},(e,o)=>({row:Math.floor(o/BRICK_COLS),col:o%BRICK_COLS,hits:1,entity:null}));export function createGame(e){const o=new World(500),l={world:o,camera:{eye:[0,0,400],target:[0,0,0],fov:1,ortho:1},theme:e,colors:pieceColors(e),layout:null,scenery:null,phase:"ready",get score(){return o.scoreboard.score},get lives(){return o.scoreboard.lives},get timeLeft(){return o.scoreboard.shownSeconds},won:!1,time:0,bricks:newBricks(),balls:[],powerUps:[],combo:0,paddle:null,paddleX:0,paddleWidth:0,dragFrom:0,intro:!0,introAge:-1,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onTime:e=>{},onWall:()=>{},onPaddle:()=>{},onBrickHit:()=>{},onBrickBreak:()=>{},onCombo:()=>{},onPowerUp:()=>{},onLaunch:()=>{},onLoseLife:()=>{},onWin:()=>{},onLose:()=>{}};return o.scoreboard.reset(LIVES,TIME_LIMIT),o.scoreboard.handlers={onSecond:e=>l.onTime(e),onTimeUp:()=>"playing"===l.phase&&end(l,!1)},l}const after=(e,o,l)=>e.world.after(o,l),brickX=(e,o)=>e.bricksLeft+o.col*e.brickStepX,brickY=(e,o)=>e.bricksTop+o.row*e.brickStepY;export function setLayout(e,o){const l=e.world,d=e.layout;e.scenery&&removeScenery(l,e.scenery),e.paddle&&l.despawn(e.paddle.root),clearPieces(e);for(const o of e.bricks)null!=o.entity&&l.despawn(o.entity);e.layout=o,e.camera.ortho=o.height/2,e.scenery=buildScenery(l,o,e.theme),e.paddleX=d?e.paddleX/d.boardWidth*o.boardWidth:o.boardWidth/2,d&&0!==e.paddleWidth||(e.paddleWidth=o.paddleWidth),e.paddle=spawnPaddle(l,o,e.paddleX,e.paddleWidth,e.colors.paddle),spawnBricks(e),d&&"playing"===e.phase&&after(e,RELAUNCH_DELAY,()=>relaunch(e))}export function setTheme(e,o){if(e.theme=o,e.colors=pieceColors(o),e.layout&&e.scenery&&!e.world.isDisposed){setSceneryTheme(e.world,e.layout,e.scenery,o),e.paddle&&e.world.set(e.paddle.body,{color:e.colors.paddle});for(const o of e.balls)o.view&&colorBall(e.world,o.view,e.colors)}}function spawnBricks(e){const o=e.layout;if(!o)return;const l=e.intro;l&&(e.introAge=0);for(const d of e.bricks)d.hits<=0||(d.entity=spawnBrick(e.world,o,brickX(o,d),brickY(o,d),d.row,l?d.row*BRICK_ROW_STAGGER+d.col*BRICK_COL_STAGGER:null))}function clearPieces(e){for(const o of e.balls)o.view&&removeBall(e.world,o.view);for(const o of e.powerUps)null!=o.entity&&e.world.despawn(o.entity);e.balls=[],e.powerUps=[]}function launch(e,o){const l=e.layout;if(!l)return;const d=(Math.random()-.5)*LAUNCH_SPREAD,t=l.paddleTop-BALL_RADIUS-2;e.balls.push({x:o,y:t,vx:Math.sin(d)*BALL_SPEED,vy:-Math.abs(Math.cos(d)*BALL_SPEED),view:spawnBall(e.world,l,o,t,e.colors)}),e.combo=0,e.onLaunch()}function relaunch(e){"playing"!==e.phase||e.balls.length||launch(e,e.paddleX)}export function start(e){const o=e.layout;"ready"===e.phase&&o&&(e.bricks.some(e=>e.hits>0)||newWall(e),e.paddleX=o.boardWidth/2,e.paddleWidth=o.paddleWidth,e.paddle&&(placePaddle(e.world,o,e.paddle,e.paddleX),setPaddleWidth(e.world,o,e.paddle,e.paddleWidth,!1)),e.phase="playing",e.world.scoreboard.startCountdown(TIME_LIMIT),e.onPhase("playing"),launch(e,e.paddleX))}function newWall(e){for(const o of e.bricks)null!=o.entity&&e.world.despawn(o.entity);e.bricks=newBricks(),e.intro=!0,spawnBricks(e)}export function reset(e){e.world.cancelTimers(),clearPieces(e),newWall(e);const o=e.layout;o&&e.paddle&&(e.paddleX=o.boardWidth/2,e.paddleWidth=o.paddleWidth,placePaddle(e.world,o,e.paddle,e.paddleX),setPaddleWidth(e.world,o,e.paddle,e.paddleWidth,!1)),e.combo=0,e.world.scoreboard.reset(LIVES,TIME_LIMIT),e.won=!1,e.phase="ready",e.onScore(0),e.onLives(LIVES),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.cancelTimers(),e.world.dispose()}function end(e,o){e.world.scoreboard.stop(),e.world.cancelTimers(),e.won=o,e.phase="over",o?e.onWin():e.onLose(),e.onPhase("over")}export function tick(e,o){e.world.isDisposed||(introPlayed(e,o),e.time+=o,"playing"===e.phase&&e.balls.length&&step(e,Math.min(o/FRAME_TIME,MAX_FRAMES)),e.world.update(o))}export function dragStart(e){e.dragFrom=e.paddleX}export function dragMove(e,o){const l=e.layout;if(!l||!e.paddle||"playing"!==e.phase)return;const d=e.paddleWidth/2;e.paddleX=Math.max(d,Math.min(l.boardWidth-d,e.dragFrom+o)),placePaddle(e.world,l,e.paddle,e.paddleX)}function step(e,o){const l=e.layout,d=e.world,t=e.paddleWidth/2,a=e.paddleX;let r=0,n=0,i=0,s=!1,p=!1,h=0,L=!1;const w=e.balls;let y=0;for(const _ of e.balls){let A=_.x+_.vx*o,b=_.y+_.vy*o,{vx:u,vy:f}=_,B=!1;if(A<=l.minX?(A=l.minX,u=Math.abs(u),B=!0):A>=l.maxX&&(A=l.maxX,u=-Math.abs(u),B=!0),b-BALL_RADIUS<=0&&(b=BALL_RADIUS,f=Math.abs(f),B=!0),B&&r++,b+BALL_RADIUS>l.lostY)L=!0,_.view&&removeBall(d,_.view);else{if(f>0&&b+BALL_RADIUS>=l.paddleTop&&b+BALL_RADIUS<=l.paddleTop+l.paddleHeight+5&&A>=a-t-BALL_RADIUS&&A<=a+t+BALL_RADIUS){const o=(A-a)/t*PADDLE_BOUNCE,r=Math.hypot(u,f);u=Math.sin(o)*r,f=-Math.abs(Math.cos(o)*r),b=l.paddleTop-BALL_RADIUS-1,n++,e.paddle&&bumpPaddle(d,e.paddle,1),e.combo=0}for(const o of e.bricks){if(o.hits<=0)continue;const t=brickX(l,o),a=brickY(l,o);if(!(A+BALL_RADIUS<=t||A-BALL_RADIUS>=t+l.brickWidth||b+BALL_RADIUS<=a||b-BALL_RADIUS>=a+l.brickHeight)){if(Math.min(A+BALL_RADIUS-t,t+l.brickWidth-(A-BALL_RADIUS))<Math.min(b+BALL_RADIUS-a,a+l.brickHeight-(b-BALL_RADIUS))?u=-u:f=-f,o.hits-=1,o.hits<=0){if(null!=o.entity&&breakBrick(d,l,o.entity,t,a,o.row),o.entity=null,s=!0,e.combo++,e.combo>=COMBO_CALLOUT&&i++,Math.random()<POWER_UP_CHANCE){const o=POWER_UP_TYPES[Math.floor(Math.random()*POWER_UP_TYPES.length)],r=t+l.brickWidth/2,n=a+l.brickHeight/2;e.powerUps.push({type:o,x:r,y:n,entity:spawnPowerUp(d,l,o,r,n)})}}else null!=o.entity&&hitBrick(d,o.entity),p=!0;h+=POINTS_PER_BRICK+e.combo*POINTS_PER_COMBO;break}}_.x=A,_.y=b,_.vx=u,_.vy=f,_.view&&placeBall(d,l,_.view,A,b,u,f),w[y++]=_}}w.length=y;const _=[];e.powerUps=e.powerUps.filter(e=>{e.y+=POWER_UP_SPEED*o;const r=e.y>=l.paddleTop&&e.y<=l.paddleTop+l.paddleHeight+10&&e.x>=a-t-10&&e.x<=a+t+10;return r&&_.push(e.type),r||e.y>l.boardHeight?(null!=e.entity&&d.despawn(e.entity),!1):(null!=e.entity&&placePowerUp(d,l,e.entity,e.x,e.y),!0)});for(const o of _)collect(e,o);for(let o=0;o<r;o++)e.onWall();for(let o=0;o<n;o++)e.onPaddle();for(let o=0;o<i;o++)e.onCombo();h>0&&e.onScore(e.world.scoreboard.add(h)),s?e.onBrickBreak():p&&e.onBrickHit();for(let o=0;o<_.length;o++)e.onPowerUp();if(L&&!e.balls.length){if(e.onLives(e.world.scoreboard.addLives(-1)),e.onLoseLife(),e.lives<=0)return void end(e,!1);after(e,RELAUNCH_DELAY,()=>relaunch(e))}e.bricks.some(e=>e.hits>0)||end(e,!0)}function collect(e,o){const l=e.layout;if(o===PowerUpType.WIDE_PADDLE)e.paddleWidth=Math.min(l.paddleWidth*WIDE_MAX,e.paddleWidth*WIDE_FACTOR),e.paddle&&setPaddleWidth(e.world,l,e.paddle,e.paddleWidth,!0),after(e,WIDE_TIME,()=>{e.paddleWidth=l.paddleWidth,e.paddle&&e.layout===l&&setPaddleWidth(e.world,l,e.paddle,e.paddleWidth,!0)});else if(o===PowerUpType.MULTI_BALL){const o=e.balls[0];if(o&&e.balls.length<MAX_BALLS){const d=.7*Math.hypot(o.vx,o.vy);for(const t of[-d,d])e.balls.push({x:o.x,y:o.y,vx:t,vy:-d,view:spawnBall(e.world,l,o.x,o.y,e.colors)})}}else e.world.scoreboard.setLives(Math.min(e.lives+1,LIVES)),e.onLives(e.lives);e.paddle&&bumpPaddle(e.world,e.paddle,1.4)}
@@ -0,0 +1 @@
1
+ "use strict";import{extrude,Path}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{raisedBlockScale,spawnRaisedBlock}from"../shared/EngineBlocks.js";import{cacheGameAsset,createGameMesh as _0x29fada}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{BALL_COLOR,BALL_RADIUS,BALL_SPAWN_SPRING,BRICK_COLORS,BRICK_DROP,BRICK_INTRO_SPRING,BUMP_SPRING,BUMP_TIME,CLASSIC_BOARD,CLASSIC_BORDER,CLASSIC_RADIUS,PADDLE_COLOR,PADDLE_WIDTH_TIME,POWER_UP_COLORS,POWER_UP_SIZE,PULSE_TIME,THEMED_RADIUS,TRAIL,TRAIL_COLOR}from"./BlockBreakerConstants.js";const Z_BACKDROP=-20,Z_BOARD=0,Z_RIM=.2,Z_TRAIL=1,HIDDEN=0;export const toWorld=(e,o,t,r=0)=>[e.boardLeft+o-e.width/2,e.height/2-(e.boardTop+t),r];const brickDepth=e=>.7*e.brickHeight,brickZ=e=>.2+brickDepth(e)/2+1,brickSize=e=>[e.brickWidth,e.brickHeight,brickDepth(e)],brickScale=e=>raisedBlockScale(brickSize(e)),paddleDepth=e=>.9*e.paddleHeight,paddleZ=e=>.2+paddleDepth(e)/2+1,powerUpZ=()=>POWER_UP_SIZE+2,ballZ=()=>BALL_RADIUS+POWER_UP_SIZE+4,meshes=new Map,mesh=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("block-breaker/BlockBreakerScene:"+e,o),meshes.set(e,t)),t},discMesh=()=>mesh("disc",()=>_0x29fada(extrude((new Path).addCircle(0,0,.5),{depth:0}))),panelMesh=(e,o,t,r=0)=>mesh("panel:"+e+":"+o+":"+t+":"+r,()=>{const a=(new Path).addRoundedRect(0,0,e,o,t);return r>0&&a.addRoundedRect(r,r,e-2*r,o-2*r,t-r),_0x29fada(extrude(a,{depth:0,fillRule:"evenodd"}),{center:!1})}),BRICKS=BRICK_COLORS.map(e=>toColor(e));export const brickColor=e=>BRICKS[e%BRICKS.length];export function pieceColors(e){if("light"===e.mode){const o=toColor(e.TEXT);return{ball:o,trail:o,paddle:o}}return{ball:toColor(BALL_COLOR),trail:toColor(TRAIL_COLOR),paddle:toColor(PADDLE_COLOR)}}function spawnBoard(e,o,t){const r="classic"===t.mode,a=r?CLASSIC_RADIUS:THEMED_RADIUS;return[e.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,a),position:toWorld(o,0,0,0),color:toColor(r?CLASSIC_BOARD:t.BOARD.SURFACE),pickable:!1}),e.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,a,1.5),position:toWorld(o,0,0,.2),color:toColor(r?CLASSIC_BORDER:t.BOARD.BORDER),pickable:!1})]}export function buildScenery(e,o,t){return{backdrop:spawnBackdrop(e,o.width,o.height,-20,t),parts:spawnBoard(e,o,t)}}export function removeScenery(e,o){e.despawn(o.backdrop);for(const t of o.parts)e.despawn(t)}export function setSceneryTheme(e,o,t,r){setBackdropTheme(e,t.backdrop,r);for(const o of t.parts)e.despawn(o);t.parts=spawnBoard(e,o,r)}export function spawnBrick(e,o,t,r,a,i){const n=t+o.brickWidth/2,l=r+o.brickHeight/2,s=brickScale(o),p=spawnRaisedBlock(e,{position:toWorld(o,n,null===i?l:l-BRICK_DROP,brickZ(o)),size:brickSize(o),color:brickColor(a),grow:null===i?1:0});return null!==i&&(e.animate(p,{position:toWorld(o,n,l,brickZ(o))},{spring:BRICK_INTRO_SPRING,delay:i}),e.animate(p,{scale:s},{duration:.15,delay:i})),p}export function breakBrick(e,o,t,r,a,i){const n=toWorld(o,r+o.brickWidth/2,a+o.brickHeight/2,brickZ(o));popAndBurst(e,t,{scale:brickScale(o),color:brickColor(i),duration:.45},{position:[n[0],n[1],n[2]+brickDepth(o)],size:1.6*o.brickHeight,color:brickColor(i),glowZ:.5}).then(()=>{e.despawn(t)})}export function hitBrick(e,o){e.animate(o,{shake:2},{duration:.15})}export function spawnPaddle(e,o,t,r,a){const i=e.spawn({mesh:"none",position:toWorld(o,t,o.paddleTop+o.paddleHeight/2,paddleZ(o)),pickable:!1});return{root:i,body:e.spawn({mesh:"roundedBox",parent:i,scale:[r,o.paddleHeight,paddleDepth(o)],color:a,pickable:!1})}}export function placePaddle(e,o,t,r){e.set(t.root,{position:toWorld(o,r,o.paddleTop+o.paddleHeight/2,paddleZ(o))})}export function setPaddleWidth(e,o,t,r,a){const i=[r,o.paddleHeight,paddleDepth(o)];a?e.animate(t.body,{scale:i},{duration:PADDLE_WIDTH_TIME}):(e.stopAnimation(t.body),e.set(t.body,{scale:i}))}export function bumpPaddle(e,o,t){e.animate(o.root,{scale:[1+.06*t,1-.22*t,1]},{duration:BUMP_TIME,easing:"linear"}).then(()=>{e.animate(o.root,{scale:1},{spring:BUMP_SPRING})})}export function spawnBall(e,o,t,r,a){const i=e.spawn({mesh:"sphere",position:toWorld(o,t,r,ballZ()),scale:0,color:a.ball,pickable:!1});return e.animate(i,{scale:2*BALL_RADIUS},{spring:BALL_SPAWN_SPRING}),{ball:i,trail:TRAIL.map(i=>e.spawn({mesh:discMesh(),position:toWorld(o,t,r,1),scale:2*BALL_RADIUS*i.r,color:withAlpha(a.trail,i.o),pickable:!1}))}}const withAlpha=(e,o)=>[e[0],e[1],e[2],o];export function placeBall(e,o,t,r,a,i,n){e.set(t.ball,{position:toWorld(o,r,a,ballZ())}),t.trail.forEach((t,l)=>e.set(t,{position:toWorld(o,r-i*TRAIL[l].k,a-n*TRAIL[l].k,1)}))}export function colorBall(e,o,t){e.set(o.ball,{color:t.ball}),o.trail.forEach((o,r)=>e.set(o,{color:withAlpha(t.trail,TRAIL[r].o)}))}export function removeBall(e,o){e.despawn(o.ball);for(const t of o.trail)e.despawn(t)}export function spawnPowerUp(e,o,t,r,a){const i=toColor(POWER_UP_COLORS[t]),n=e.spawn({mesh:"none",position:toWorld(o,r,a,powerUpZ()),scale:0,pickable:!1});e.animate(n,{scale:1},{spring:BALL_SPAWN_SPRING}),e.spawn({mesh:"sphere",parent:n,scale:1.4*POWER_UP_SIZE,color:i,pickable:!1});const l=e.spawn({mesh:discMesh(),parent:n,position:[0,0,-POWER_UP_SIZE],scale:1.8*POWER_UP_SIZE,color:[i[0],i[1],i[2],.25],pickable:!1});return e.animate(l,{scale:2.3*POWER_UP_SIZE},{duration:PULSE_TIME,easing:"easeInOut",repeat:"forever",yoyo:!0}),n}export function placePowerUp(e,o,t,r,a){e.set(t,{position:toWorld(o,r,a,powerUpZ())})}
@@ -1 +1 @@
1
- "use strict";const _0x3326bb=_0x36b1;function _0x36b1(e,o){e-=180;const W=_0x1e6d();let t=W[e];if(void 0===_0x36b1.APQYyw){const e=function(e,o){let W,t,r=[],n=0,a="";for(e=function(e){let o="",W="";for(let W,t,r=0,n=0;t=e.charAt(n++);~t&&(W=r%4?64*W+t:t,r++%4)?o+=String.fromCharCode(255&W>>(-2*r&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(let e=0,t=o.length;e<t;e++)W+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),t=0;t<256;t++)r[t]=t;for(t=0;t<256;t++)n=(n+r[t]+o.charCodeAt(t%o.length))%256,W=r[t],r[t]=r[n],r[n]=W;t=0,n=0;for(let o=0;o<e.length;o++)t=(t+1)%256,n=(n+r[t])%256,W=r[t],r[t]=r[n],r[n]=W,a+=String.fromCharCode(e.charCodeAt(o)^r[(r[t]+r[n])%256]);return a};_0x36b1.jHiQjb=e,_0x36b1.ZygLGF={},_0x36b1.APQYyw=!0}const r=W[0];_0x36b1.gGamhm!==r&&(_0x36b1.ZygLGF={},_0x36b1.gGamhm=r);const n=_0x36b1.ZygLGF[e];return void 0===n?(void 0===_0x36b1.ndlmmz&&(_0x36b1.ndlmmz=!0),t=_0x36b1.jHiQjb(t,o),_0x36b1.ZygLGF[e]=t):t=n,t}!function(){const e=_0x36b1,o=_0x1e6d();for(;;)try{if(812018==parseInt(e(211,"fgNH"))/1*(parseInt(e(279,"sB5i"))/2)+-parseInt(e(259,"&0pp"))/3+parseInt(e(317,"NXQ0"))/4+-parseInt(e(240,"fd)&"))/5+parseInt(e(241,"B5i7"))/6*(parseInt(e(205,"n5KX"))/7)+-parseInt(e(290,"!5pB"))/8+-parseInt(e(197,"%d9G"))/9*(-parseInt(e(280,"G#ZY"))/10))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import _0x200c45 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useSharedValue}from"react-native-reanimated";import{GameControlButton,GameOverModal,GameSettingsModal}from"../../helpers/index.js";import{GameBackground}from"./components/GameBackground.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useBlukStore,useGameOver,useGameWon,useIsPlaying}from"./BlukStore.js";import{BlukService}from"./BlukService.js";import{ScoreBoard}from"./components/ScoreBoard.js";function _0x1e6d(){const e=["jmkKnSoDWQrFpvddHCoHWPi","vNdcI8kBkG","W6JcMGfAvG","WQLNwXuLzXjGC8owrCk/WQG","eCkLW6SzzexcUeRcImoLWP8yW5m","W6NcQmkjW6mGW5e9","emokWQxdU3BdQJbzw31DteW","WQ3cJmkbWO0MzmkUjq","WQxdUmkmt17cSq","W73dRmkDWPO","WRDTW4idWR3dNmo3W5JcLG","rvRcQSkZcZi","W5NdJmkTWQK","yuzhWQBdUa","WQ5OwrWUCdv0BCogB8kZWRDDva","srO+WQBcVCknW40","W5OXWPBdJSkY","WQBdVCo+WRVcICoLsx3dLXRdP0S","arNcNCk5btjnWOy","DmoHAfy8zq","r8o5WQ9EpbBdT3pcRmoFWRy","W5PGaCoDWRRcO0C","WOShahC","EIVdIcL2","WRZcJM7dPZ5A","W68bA8k+dcNdMW","WOCgW4tcJmkMW6JdHW","W5FdKSkwW7fYaMCnW5hdT8oSrq","ymkxzmo1WPpcRN/cLam2jmohWOjt","DMOyW57cR8oiW4jvxG","nmoQs8oqWOtcR8oYvgm","WOZcU0hdLG8","fmkfaCorWPC","nSodiSkvW57dVt7dHW","WPCwW4lcRSkVW6FdIHv8va","bxFdTmo3eSktW4JdL1ZcI8k8","tmkqWPWEFSkKWONdGCoA","WQRdSCkDtq","W6NdVmoMj2a","W5hdICkfW6f7cua","W7NcHmkBW7ZdRa","W4FdJ8ksW4f7aq","WOxdJNWNW61yWQa","AxNdJZ3cSSksW43cUW","WPq2jGNdUSkbgGtdIW","WQDSW5edWQZdTCoI","W6WXBYTMWRhcOa","WRRcRJaQW6W","puhdLCo9jSkY","FSkkDW","xSkMWRmSDG","k8o4sCo5WRC","kdRcKxJdHSocWPBcH8keW6NdPSo6WOe","nmoOhCkZW7S","qmkPW6FcJGu","WRdcG8kuEd58WOxdVHbQW5OfWOi","WO5LtXW","CttdO8orWPZdGLmNuW","WQVdLY7dG3xdHK7dVW","i3D3tLhdNG","WPNdV8kyW5JdHXddSse","WO5mW64H","CWO1rCoCoCk0jG","WOjGwrjPAc9SC8olqSk7W7O","WONdQ8kGBhi","W7xcRCkHW6hdNmkJqh0","nCoQtmoYWPhcHCo2BMLW","WO/cQreo","WQn8W5CIWR3dUSoIW5a","WR/dQ8ozWPb1WO0xWPiTW5RcRq","uCo1WQ9ljdddR1dcQa","qmoLWQ5CnrNdUG","qWBdI8orW5RdQ2abDq","WQNdRCooWQfXWO8p","W4KNtCk4lXZdRu0M","u1ZcVCktcZP9","vKZcK2POx8oY","i8kYimo7WRf0mf/dGq","WPJcJ8kHDCkhW4LrDmoRymkbW7y","sCkDWOqq","W6FdMSoel2eOW6ddIazDW4S/","WRqgW7P9W4emCmkZvSoyW4O","W5FcIJ9HWRGcWPWEWPhcOmoIW64","uSkUWRJcJdTzWPW","WQldImkLDIVcVudcGGBdHuW","W7RdQmkyWOCs","mSoXpbpdKxartSoc","BaCpqmoP","W6ZdJCkEWQK1BmkfaCo+W5DM","ECo1gCkFomo3W6y","renzWO7dKa","WQ13W4OfWQddUSo6W5ZcICkH","yN4wW5JcTCouW4C","WOdcSXazW7nMW5a","d2TNpeFdJvP2WO8WWPeAWQhdHSorarCbFJGoW5JdVa","WR8bldldIW","WPhcOXeoW6jpW4v5lW","i3D3x1xdLerIWOCLWP8","g8kchSoo","DXOZzmonnSk0","W747c0f4mM05tmohASk3WOfJ","mSoHkJtdM28DFSocW7hdMHRdLCkwEYu","uL4NW6NcLCoPW6a","AmkJWRq6vCko","W5u2CWbZ","sxGWW7xcVG","zMbNWRVdU8oVha","WOFdJvbIWQScpIu","W4RcQmkwW6ZdGrxdGGi","rmkzWP3dMmoapY8","W7VcQmoUWOT/WOC/WR0","W6hdGCoxp2GJW4C","WQG6W7hcTSkx","WPa8pc7dR8kjaaq","emkdW7lcUYRcReu","mSkIiCoSWQbDjq","uSkFWORdUmoanW","iSoXlbldL2Wm","W5xdMCkdW4bQbKah","rCk0WPNcIIXEWOzb","e8oQa8kn","W4xcPJXyvX/cPa","WO/dNgeAW4O","W6lcV8kQW4RdN8k3zhRdPq","DCoTA1C9","WR0idh/dPW","W77dM8kpWRKGyCkDbG","amoseIFdVa","iMTbAeBdKuzN","WQ7cUmkhECk0","WRZcMNldTJ5yoq","q8k+WRNcMYPWWOLlvW","mSotjmk0W4/dSJ4","vrtdGmo3W5NdOq","W7KVWRFdHa","WQy/W6pcTq","WQtdU8kguem","W5P6hCoBWR7cPf1EAa","q0RcOmktcW","WRVcJIDuimoGWRXC","sKJdSGVcSmkWW7q","WOWBbKRdKG","jSoHkJpdHMmmsq","WOPGgSojFKJcUeqwWRPafbS","m3hcSLWoFSkgWQnmbahcUse","e3hdO8ogfSkrW5a","rfGWW5JcKCoRW7HYBqNcSW","WOBcGsCDW7e","W6JcNW9Kza","WQpdQ8oSWR91WPGsWP4R","B8orWPjQ","W5ZdNCk6W4Dl","kmkYwSoBBmkPWQxdGIxdNuBdPsZcTW","wLFcSNbSq8oJ","hfT+W6ddR8orWONcKICwW5jWWR4","WOm5W4P1","DtZdJmoqW6K","wSorxM0mrSk9","cmoTnHddKa","zSkfF8kDfZW","WPqSoG/dVSkgaa","WP3dR8kEW7NdLH/dSq","y8oIzmkPW7ebz0xdOCovWRxcUSo8","WQNcPSkaFq","qHZdG8oXW67dQgGdAflcQSknWPe"];return(_0x1e6d=function(){return e})()}import{GameArea}from"./components/GameArea.js";import{jsx as _0x545048,jsxs as _0x2a40d3}from"react/jsx-runtime";const BlukComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:W,onReplayGame:t,onShare:r,onShareScreenshot:n,onShowLeaderboard:a,bannerAd:d})=>{const s="sB5i",m=_0x36b1,u={aRtAB:function(e,o,W){return e(o,W)},eNKuQ:function(e,o,W){return e(o,W)},NLANV:m(264,"Y!q!"),AVLGN:function(e){return e()},aVhjy:m(233,"X1a#"),dSRof:m(311,"oZDQ"),xSenN:function(e,o){return e!==o},Iihpb:m(219,"^vb8"),xkLAI:m(222,"bHp4"),nHTsU:function(e,o){return e||o},PUmel:function(e,o,W){return e(o,W)},fYDzD:function(e,o,W){return e(o,W)},xhNVA:function(e,o,W){return e(o,W)},HXdOP:function(e,o){return e||o}},S=_0x200c45[m(273,"G#ZY")](e?.[m(342,"NXQ0")]??!0);S[m(277,"s63z")]=e?.[m(289,"^$#v")]??!0;const x=_0x200c45[m(213,"CW&9")](e?.enableHaptics??!0);x[m(186,"&Ex9")]=e?.[m(265,"%d9G")]??!0;const k=e?.[m(256,"oZDQ")]??0,i=_0x200c45[m(321,"R2&O")](W);i[m(288,"lsuY")]=W;const p=_0x200c45.useRef(t);p[m(254,"aJ%[")]=t;const l=useGameOver(),G=u.AVLGN(useGameWon),_=u[m(224,"wwg$")](useIsPlaying),f=u[m(302,s)](l,G),R=_0x200c45.useRef(!1),C=_0x200c45.useCallback(e=>{const o=m;if(i[o(258,"n5KX")]&&!R.current){const W=useBlukStore.getState().score;i[o(242,"T))W")]({status:e,score:W[o(225,"R2&O")]()}),R[o(257,"Ixbv")]=!0}},[]),b=useSharedValue(0),O=_0x200c45.useMemo(()=>new BlukService,[]),B=_0x200c45[m(185,"3q8V")](()=>{const e=m;playSound(GAME_SOUNDS[e(232,"lsuY")][e(323,"(D6o")],S.current),playHaptic(HapticType[e(209,"lsuY")],x[e(227,"5FZ&")])},[]),N=_0x200c45[m(343,"qb%W")](()=>{const e=m;u.aRtAB(playSound,GAME_SOUNDS[e(231,"pAM]")][e(247,"WrV7")],S[e(199,"%]Go")]),playHaptic(HapticType[e(270,"X1a#")],x.current)},[]),Q=_0x200c45.useCallback(()=>{const e=m;playSound(GAME_SOUNDS[e(341,"jY7K")][e(237,"pRE1")],S[e(301,"^$#v")]),u[e(316,"fgNH")](playHaptic,HapticType[e(189,"%]Go")],x[e(180,"2gvm")])},[]),h=_0x200c45[m(194,"R2&O")](()=>{const e=m;playSound(GAME_SOUNDS[e(271,"T*@n")].FALL,S.current),u.aRtAB(playHaptic,HapticType[e(294,"&0pp")],x[e(203,"XDB[")])},[]),g=_0x200c45[m(194,"R2&O")](()=>{const e=m;playSound(GAME_SOUNDS[e(217,"!5pB")][e(298,"jY7K")],S[e(190,"$RH5")]),u[e(315,"!5pB")](playHaptic,HapticType[e(226,"6Ltz")],x[e(180,"2gvm")])},[]);_0x200c45[m(220,"sB5i")](()=>{O[m(340,"6Ltz")](B,N,Q,h,g)},[O,B,N,Q,h,g]);const I=_0x200c45[m(303,"^$#v")](null);_0x200c45.useEffect(()=>{const e=m,o={cVcmF:function(e,o){return e!==o},UwbwW:u[e(245,"Y!q!")],eGEvg:e(300,"NXQ0"),QdBsy:function(o){return u[e(187,"XDB[")](o)},CIbDU:function(e,o){return e(o)}};if(e(309,"$RH5")!==u[e(326,"X1a#")]){const W=useBlukStore[e(183,"wwg$")](e=>e.isPlaying,o=>{const W=e;O[W(296,"lsuY")](o),o?(I[W(212,"&0pp")]&&clearInterval(I[W(196,"!qIp")]),I[W(199,"%]Go")]=setInterval(()=>{const e=W,o=useBlukStore[e(324,"!qIp")]()[e(261,"7Y&W")];o<=1?e(201,"N*2k")!==e(238,"bHp4")?(useBlukStore[e(204,"aaqh")]().setTimeRemaining(0),useBlukStore.getState()[e(328,"E]OX")]()):(_0x37f66c(e(286,"5FZ&")),_0x37aff3(_0x175946[e(260,"6Ltz")].GAME_OVER,_0x2dd3b3[e(335,"kSme")]),_0x49e2b0(_0x9d020c[e(310,"T))W")],_0x52c1b2.current),_0x3ec76a[e(295,"!5pB")]().resetGame(),_0x5c094a.resetGame()):useBlukStore[e(322,"n5KX")]()[e(198,"wwg$")](o-1)},1e3)):I.current&&(clearInterval(I[W(304,"^vb8")]),I[W(218,"Y!q!")]=null)});return()=>{const t=e;o[t(182,"3q8V")](o[t(312,"jY7K")],o[t(244,"$RH5")])?(o.QdBsy(W),I[t(208,"NXQ0")]&&o[t(253,"7Y&W")](clearInterval,I[t(333,"WrV7")])):(_0x31e8f6(_0x5f22c8.BLUK[t(195,"&0pp")],_0x56348a[t(229,"!5pB")]),rKfwDG[t(248,"^$#v")](_0x473938,_0x171b17[t(221,"aJ%[")],_0x4aa477.current))}}_0x483dc9.current&&(_0x27f973(_0x455815.current),_0x398155[e(333,"WrV7")]=null)},[O]),_0x200c45[m(334,"7Y&W")](()=>{const e=m;G&&!R[e(206,"CW&9")]&&C(u[e(275,"XDB[")])},[G,C]),_0x200c45[m(336,"fd)&")](()=>{const e=m;l&&!R[e(333,"WrV7")]&&C(e(329,"$RH5")),!l&&(R[e(180,"2gvm")]=!1)},[l,G,f,C]),_0x200c45.useEffect(()=>{O[m(188,"(D6o")]()},[O]),_0x200c45.useEffect(()=>{const e=m,o={mwqLG:function(e,o){return e(o)},IpEqC:e(230,"7Y&W")};return()=>{const W=e;useBlukStore[W(236,"MDMb")]()[W(246,"kSme")]&&!R.current&&o[W(313,"E]OX")](C,o.IpEqC),useBlukStore[W(239,"wwg$")]()[W(305,"pRE1")](),O.cleanup(),useBlukStore[W(330,"(D6o")]()[W(193,"$RH5")]()}},[O,C]);const P=_0x200c45[m(243,"%]Go")](()=>{const e=m;R[e(196,"!qIp")]=!1,O.isDirty()&&(useBlukStore.getState().resetGame(),O[e(228,"2gvm")]()),useBlukStore[e(223,"3q8V")]()[e(272,"(D6o")](),O.setPlaying(!0),O.startGame(),u[e(278,"pAM]")](playSound,GAME_SOUNDS[e(299,"X1a#")][e(293,"5FZ&")],S[e(250,"H!NW")]),playHaptic(HapticType[e(287,"fd)&")],x[e(283,"[e(W")])},[O]),y=_0x200c45[m(331,"kSme")](()=>{const e=m;C("cancel"),u.eNKuQ(playSound,GAME_SOUNDS[e(252,"qb%W")][e(291,"%]Go")],S[e(308,"N*2k")]),playHaptic(HapticType[e(281,"aJ%[")],x[e(307,"(D6o")]),useBlukStore[e(215,"^$#v")]()[e(332,"WrV7")](),O[e(292,"E]OX")]()},[O,C]),H=_0x200c45[m(297,"T))W")](()=>{const e=m;if(u[e(202,"%]Go")](u[e(255,"wwg$")],u[e(285,"B5i7")]))p.current?.(),R[e(214,"wwg$")]=!1,useBlukStore[e(210,"Ixbv")]().resetGame(),O[e(339,"&0pp")]();else if(_0x209326[e(337,"G#ZY")]&&!_0x441ea3.current){const o=_0x74b93e.getState().score;_0xd9df10[e(250,"H!NW")]({status:_0x50c1b1,score:o[e(216,"2gvm")]()}),_0x38951a[e(307,"(D6o")]=!0}},[O]),v=_0x200c45[m(262,"&0pp")](()=>{H()},[H]),D={..._0x200c45.useMemo(()=>({isPlaying:!f&&_,gameOver:l,onStartGame:P,onStopGame:y,onShare:r,onShowLeaderboard:a,startButtonSubtext:"Drag to aim, release to jump!"}),[f,_,l,P,y,r,a])},q={..._0x200c45.useMemo(()=>({isVisible:f,score:f?useBlukStore[m(320,"o[R@")]()[m(235,"G#ZY")]:0,onPlayAgain:v,buttonText:m(181,"X1a#"),title:G?"YOU WIN!":m(319,"7Y&W"),message:G?m(191,"R2&O"):m(325,"%d9G")}),[f,G,v])};return q[m(338,"H!NW")]=n,q[m(327,s)]=d,_0x545048(GestureHandlerRootView,{style:styles[m(306,"Ixbv")],children:_0x2a40d3(GameBackground,{offset:k,cameraX:b,children:[u.PUmel(_0x545048,GameArea,{gameService:O,offset:k,cameraX:b}),_0x545048(ScoreBoard,{offset:k}),_0x545048(GameControlButton,D),u[m(263,"G#ZY")](_0x545048,GameOverModal,q),u[m(184,"!qIp")](_0x545048,GameSettingsModal,{gameId:GAME_IDS.BLUK,settings:u[m(192,"Ixbv")](e,DEFAULT_GAME_SETTINGS),onSettingsChange:o})]})})},_0x52fe2e={};_0x52fe2e[_0x3326bb(274,"T*@n")]=1,_0x52fe2e[_0x3326bb(276,"%d9G")]=_0x3326bb(267,"kSme");const _0x4c215e={};_0x4c215e[_0x3326bb(284,"bHp4")]=1;const _0x4f9958={};_0x4f9958[_0x3326bb(234,"[e(W")]=_0x52fe2e,_0x4f9958.gestureRoot=_0x4c215e;const styles=StyleSheet[_0x3326bb(200,"jY7K")](_0x4f9958);export const Bluk=BlukComponent;Bluk[_0x3326bb(282,"WrV7")]=_0x3326bb(318,"%d9G");
1
+ "use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS,isTablet}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{GAME_DURATION,getConfig,LIGHT}from"./BlukConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./BlukGame.js";import{skyFor}from"./BlukScene.js";import{jsx as _0x1a46e8}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.BLUK,FEEDBACK={jump:{sound:SOUNDS.JUMP,haptic:HapticType.LIGHT},land:{sound:SOUNDS.LAND,haptic:HapticType.MEDIUM},perfect:{sound:SOUNDS.PERFECT,haptic:HapticType.SUCCESS},fall:{sound:SOUNDS.FALL,haptic:HapticType.ERROR},gameOver:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const Bluk=engineGame(GAME_IDS.BLUK,e=>{const[t,s]=useLiveState(0),[r,i]=useLiveState(GAME_DURATION),{theme:o,status:a,screen:n,gameOver:m}=useEngineGame(e,{gameId:GAME_IDS.BLUK,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s)=>setLayout(e,getConfig(t,s,isTablet)),drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),onOver:(e,t)=>{"win"===t&&e(SOUNDS.WIN,HapticType.SUCCESS)},wire:(e,t)=>{e.onScore=s,e.onTime=i,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),S=skyFor(o).stops[0],p=useMemo(()=>toRgb(S),[S]);return _0x1a46e8(EngineGameScreen,{...n,light:LIGHT,background:p,columns:[scoreColumn(t),timerColumn(r,o)],subtext:"Drag, release and jump!",gameOver:m({title:"win"===a?"YOU WIN!":"GAME OVER",message:"win"===a?"You survived 2 minutes!":"Nice jumping!",scoreLabel:"Final Score",score:t,buttonText:"Jump Again!"})})});
@@ -1 +1 @@
1
- "use strict";const _0x399bd2=_0x4cfe;function _0x2b78(){const _=["n8kxW6qsWQdcNZxcGCoJW7i","W5tdThxdUCkgqaFcKCkdcmkIWOL5W7tdULf2WRVdG8kajq","g8oiWOtdU8oYumoLrKxcVYhcP0DMi3xcOWBcT1FdS8oF","zhhdPb1hA1bGW5iAEmoTWPa+wSkAxCkPW5JdKSo4efZdT8kA","thhcPcZcGSk7WPxcNmogWPqQeSkvW5K","aaZdKJmvW4hdTmokW4rQWQLvWPGLWRPYASk0aHm","cSkefhVdJq","w8oDi1BdQ8oNW6q","lCkGW79/W77cGZK5vSobDG","W7mRW6tcSeXrW7n6vrtcMmkh","WRK0cSkpWOuAD8kWxCoHimov","WQVcMd0lWOmbimk6gfW","vmoAF8o6WOmHW7u","W5tdThxdUCkgqaFcKCkdca","WPDuaNhcKM1vWPDwua","kIZdSG","uxhdL3avdCoBWOBcTHadW4q+xSk7WQFcVSoxqG","W4rcWOuSFu96cmkJzmkIW7aX","hSogq27cOCkZtYDiEYS","WQPsW4xdPmkLW7hcRSk0aSonWRqDWP7dV8oXvSocW6RdNaG","W67dOSk7WOBdU2q+","WP3cHIv0erZdVmoEu8ouFfxcQSkg","W5VcMmkCW6TJWQxcPW","WO3dR8oIWOxcGwDIWPrxWQ7cUgPLdw7dSSo+ec/cU1a1lcddIq","uSo0WOlcJMv/FbRdJmkCFcBcSJO2","A8klW68feexcMa","FSoYqq","WQZdN8ofWQhdVqKbW7q0W5RdLqKqyGVcK8ky","WQqMp8oHWPxcVZm","W5bfWOaTF019","ymomCN7cKYmr","WQJcHCoNWQpdRKeoz8kt","W4/cP8oQqri","vmo0WOVcLxrICqpdKSkjyIpcVdCSWOa","W67cJc19eGJcLG","CwBdVmoJW5LBmCoWCHKxBmkvWOHO","WP5kWO4pW57cVfRdLhm/e8kTWQ8Dt8k4","W6GOW6dcTJ5BW48","Df/dSuv1ySkKW67dLhvTWR9nm8okW5e","WQrst8krW6tcUdm","WOuZgs4tW7ldOG","n8onrLfI","q8ozW7ebz8o+kG","Fmk7pXddL8klyZ5gFcW","rKtdJZeUcda","W5xcQWlcMmotW6SDkg1Ve1r3W5G9W6a","lmk5if/dRmktWOFcTWJcHmkZWQmCWRec","hSogq27cOCkZtYDiEYS5axFcPmoS","ahXqghtdUuxcRmkJWONcNSky","WORdVmkSg0aqr3NdLmoApmoCW60","iSkiWObQC8kAEMOOlSoqxd8JW7ddPW","weBcHK15cSo6F2xdMG","iCkVfSkvW79rWP/dNgdcKMpcMSo9","oSoqW55sqG","WQZcGmoMW53cRaqRu8kIBftdUW","lIdcSu1CAbe9WRjtj8ky","dmodqghcQ8k+vdfrAYy","WPi7bt0FW6NdS8oSBG7dUJW","WPi7bt0FW6NdS8oUErhdOcaaWRrLbCok","W4NdVuL2WRWjkSkVjL3dGmkreWW3","CmkrcG80lNTUWP7cMsKPaSou","W78TW7n9WRRcR0JdSgO5cG","WPTuWP/dJt4XW5rAxtRcSmkzW6auWQZcHNK","q8osy8oPWO8YW7ldMxNcRNpcJmoYW6hcUmow","W7vZA8k0WOJcUdtdJbZcGCobA3OhW6ZcGCkWW5JdM8oxWQP1bq","W4ZcVSo2WQFdOHaBW4G","W4xdR3/dV8kzqaFcImkwgq","W65BWO18W4JdLuS","hmooWPFdQSoOumo7w1VcOIBcVfr/i3u","WRuKmCoIWPddHKdcJwBdS8k1","WOXpWPldLZy3W5i","WRiGoSoTWPpcUedcVgtdLmkfiW","WOetW4lcTSkBW5DDW4m","W57cHw7dHmopt8kAo8oc","W4ZdLmoMf1VcTCoEW6OMWRxdT8kqrG","WPSwoSkOW6HHd8opomkCvmkHWOGsWPNcL2ncWPpcRCkn","WQ/dGComWQJdQaqnW7a0W57dLryuEq"];return(_0x2b78=function(){return _})()}!function(){const _=_0x4cfe,W=_0x2b78();for(;;)try{if(872492==-parseInt(_(395,"rqVC"))/1+-parseInt(_(394,"9p60"))/2+-parseInt(_(383,"B5YJ"))/3*(parseInt(_(413,"[UqB"))/4)+-parseInt(_(401,"wOBg"))/5*(parseInt(_(391,"4j9i"))/6)+-parseInt(_(389,"DWES"))/7+parseInt(_(392,"8@r0"))/8*(-parseInt(_(405,"oimt"))/9)+parseInt(_(400,"@@lA"))/10)break;W.push(W.shift())}catch(_){W.push(W.shift())}}();import{PRIMARY_COLOR,BACKGROUND_COLOR,lighten as _0x27699b,darken as _0x41a4c8}from"../../services/GamesConstants.js";import{getGameDimensions,isTablet}from"../../services/UtilsService.js";const{screenWidth:screenWidth}=getGameDimensions(),SCREEN_HEIGHT=getGameDimensions().height,BLOCK_SIZE=isTablet?56:44,PILLAR_MIN_WIDTH=isTablet?68:50,PILLAR_MAX_WIDTH=isTablet?96:68,PILLAR_TOP_MIN=Math[_0x399bd2(393,"QVwV")](.44*SCREEN_HEIGHT),PILLAR_TOP_MAX=Math.round(.68*SCREEN_HEIGHT),PILLAR_DEPTH=isTablet?16:12,BLOCK_DEPTH=isTablet?10:7,VIEWPORT_MARGIN=isTablet?16:12,ANCHOR_X=Math[_0x399bd2(381,"@@lA")](.18*screenWidth),GAP_ROOM=screenWidth-VIEWPORT_MARGIN-PILLAR_DEPTH-1.5*PILLAR_MAX_WIDTH-ANCHOR_X,GAP_MIN=Math[_0x399bd2(449,"DWES")](Math[_0x399bd2(443,"8@r0")](.3*screenWidth,.9*GAP_ROOM)),GAP_MAX=Math[_0x399bd2(423,"#u&m")](GAP_ROOM),GAP_GROWTH_PER_SCORE=isTablet?1:.8,GAP_GROWTH_MAX=isTablet?60:36,WIDTH_SHRINK_PER_SCORE=isTablet?.7:.5,WIDTH_SHRINK_MAX=isTablet?28:18,GRAVITY=.62,POWER_MULTIPLIER=.16,MIN_LAUNCH_SPEED=6,MAX_LAUNCH_SPEED=isTablet?26:22,SWEET_SPOT_WIDTH=BLOCK_SIZE,POINTS_PER_LAND=1e3,PERFECT_BONUS=500,FALL_THRESHOLD_Y=SCREEN_HEIGHT+120,TRAJECTORY_DOTS=16,TRAJECTORY_STEP=3,_0x3b3735={};_0x3b3735[_0x399bd2(406,"%1[$")]=BLOCK_SIZE,_0x3b3735[_0x399bd2(403,"8@r0")]=PILLAR_MIN_WIDTH,_0x3b3735[_0x399bd2(450,"r]vp")]=PILLAR_MAX_WIDTH,_0x3b3735[_0x399bd2(438,"891l")]=PILLAR_TOP_MIN,_0x3b3735[_0x399bd2(416,"oimt")]=PILLAR_TOP_MAX,_0x3b3735[_0x399bd2(397,"2DH2")]=PILLAR_DEPTH,_0x3b3735[_0x399bd2(396,"B5YJ")]=BLOCK_DEPTH,_0x3b3735[_0x399bd2(380,"2DH2")]=GAP_MIN,_0x3b3735[_0x399bd2(429,"8@r0")]=GAP_MAX,_0x3b3735[_0x399bd2(422,"J8PG")]=GAP_GROWTH_PER_SCORE,_0x3b3735[_0x399bd2(421,"H1SG")]=GAP_GROWTH_MAX,_0x3b3735[_0x399bd2(419,")6%L")]=WIDTH_SHRINK_PER_SCORE,_0x3b3735[_0x399bd2(378,"DKS0")]=WIDTH_SHRINK_MAX,_0x3b3735[_0x399bd2(441,"r]vp")]=VIEWPORT_MARGIN,_0x3b3735.ANCHOR_X=ANCHOR_X,_0x3b3735[_0x399bd2(410,"KNcN")]=.62,_0x3b3735[_0x399bd2(408,")6%L")]=.16,_0x3b3735[_0x399bd2(390,"2x8B")]=6,_0x3b3735.MAX_LAUNCH_SPEED=MAX_LAUNCH_SPEED,_0x3b3735[_0x399bd2(453,"wOBg")]=SWEET_SPOT_WIDTH,_0x3b3735[_0x399bd2(452,"CCQ!")]=1e3,_0x3b3735.PERFECT_BONUS=500,_0x3b3735[_0x399bd2(385,")jVy")]=FALL_THRESHOLD_Y,_0x3b3735.TRAJECTORY_DOTS=16,_0x3b3735[_0x399bd2(386,"#u&m")]=3,_0x3b3735[_0x399bd2(414,"crPM")]=SCREEN_HEIGHT,_0x3b3735.SCREEN_WIDTH=screenWidth;export const BLUK_GAME_CONFIG=_0x3b3735;export const BLOCK_COLORS=[_0x399bd2(407,"wOBg"),_0x399bd2(382,"sDf&"),_0x399bd2(439,"buUi"),_0x399bd2(424,"#u&m"),_0x399bd2(442,"QVwV"),"#FF6FB5","#A66CFF",_0x399bd2(447,"!CW5")];export const BLOCK_3D_CACHE=BLOCK_COLORS[_0x399bd2(432,"J8PG")](_=>({frontTop:_0x27699b(_,.42),front:_,frontBottom:_0x41a4c8(_,.28),topLight:_0x27699b(_,.65),top:_0x27699b(_,.38),right:_0x41a4c8(_,.48)}));function _0x4cfe(_,W){_-=378;const d=_0x2b78();let x=d[_];if(void 0===_0x4cfe.fSiaOe){const _=function(_,W){let d,x,o=[],t=0,b="";for(_=function(_){let W="",d="";for(let d,x,o=0,t=0;x=_.charAt(t++);~x&&(d=o%4?64*d+x:x,o++%4)?W+=String.fromCharCode(255&d>>(-2*o&6)):0)x="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(x);for(let _=0,x=W.length;_<x;_++)d+="%"+("00"+W.charCodeAt(_).toString(16)).slice(-2);return decodeURIComponent(d)}(_),x=0;x<256;x++)o[x]=x;for(x=0;x<256;x++)t=(t+o[x]+W.charCodeAt(x%W.length))%256,d=o[x],o[x]=o[t],o[t]=d;x=0,t=0;for(let W=0;W<_.length;W++)x=(x+1)%256,t=(t+o[x])%256,d=o[x],o[x]=o[t],o[t]=d,b+=String.fromCharCode(_.charCodeAt(W)^o[(o[x]+o[t])%256]);return b};_0x4cfe.ZARytu=_,_0x4cfe.NIwOJD={},_0x4cfe.fSiaOe=!0}const o=d[0];_0x4cfe.uDfWnW!==o&&(_0x4cfe.NIwOJD={},_0x4cfe.uDfWnW=o);const t=_0x4cfe.NIwOJD[_];return void 0===t?(void 0===_0x4cfe.FFimzG&&(_0x4cfe.FFimzG=!0),x=_0x4cfe.ZARytu(x,W),_0x4cfe.NIwOJD[_]=x):x=t,x}const _0x1129ac={};_0x1129ac[_0x399bd2(431,"wtHw")]=BACKGROUND_COLOR,_0x1129ac[_0x399bd2(384,"rqVC")]=PRIMARY_COLOR,_0x1129ac.UI=PRIMARY_COLOR,_0x1129ac[_0x399bd2(417,"Zr0k")]="#84AFC0",_0x1129ac[_0x399bd2(436,"ObQW")]=_0x399bd2(451,"891l"),_0x1129ac[_0x399bd2(388,"yu#z")]=_0x399bd2(454,"KNcN"),_0x1129ac.PILLAR_FRONT_MID=_0x399bd2(446,"0%y["),_0x1129ac[_0x399bd2(398,"2DH2")]=_0x399bd2(437,"Y8KT"),_0x1129ac[_0x399bd2(435,"B5YJ")]=_0x399bd2(445,"[vAX"),_0x1129ac[_0x399bd2(387,"B5YJ")]="#0D181E",_0x1129ac[_0x399bd2(402,"KNcN")]=_0x399bd2(420,"rqVC"),_0x1129ac[_0x399bd2(425,"VZkK")]=_0x399bd2(433,"DKS0"),_0x1129ac[_0x399bd2(444,"oimt")]=_0x399bd2(415,"^sYd"),_0x1129ac[_0x399bd2(430,"%1[$")]=_0x399bd2(379,"[vAX"),_0x1129ac[_0x399bd2(399,"aKxy")]="rgba(255, 210, 30, 0.6)",_0x1129ac[_0x399bd2(418,"%1[$")]=_0x399bd2(404,"[vAX"),_0x1129ac.TRAJECTORY_DOT=_0x399bd2(440,"oimt"),_0x1129ac[_0x399bd2(427,"^sYd")]="#FFD700";export const BLUK_COLORS=_0x1129ac;
1
+ "use strict";import{frontLight}from"../shared/EngineUtils.js";export const GAME_DURATION=120;export const POINTS_PER_LAND=1e3;export const PERFECT_BONUS=500;export const LOOKAHEAD=4;export const PERFECT_SHOW=.6;export const FALL_DELAY=.25;export const GRAVITY=.62;export const POWER_MULTIPLIER=.16;export const MIN_LAUNCH_SPEED=6;export const STEP_MS=1e3/60;export const STEP_TOLERANCE_MS=2;export const MAX_PENDING_MS=34;export const TRAJECTORY_DOTS=16;export const TRAJECTORY_STEP=3;export function getConfig(t,o,r){const e=r?56:44,E=r?68:50,n=r?96:68,s=r?16:12,p=r?16:12,A=Math.round(.18*t),S=t-p-s-1.5*n-A;return{width:t,height:o,blockSize:e,pillarMinWidth:E,pillarMaxWidth:n,pillarTopMin:Math.round(.44*o),pillarTopMax:Math.round(.68*o),pillarDepth:s,gapMin:Math.round(Math.min(.3*t,.9*S)),gapMax:Math.round(S),gapGrowthPerScore:r?1:.8,gapGrowthMax:r?60:36,widthShrinkPerScore:r?.7:.5,widthShrinkMax:r?28:18,viewportMargin:p,anchorX:A,maxLaunchSpeed:r?26:22,sweetSpotWidth:e,fallThresholdY:o+120}}export const BLOCK_COLORS=["#FF6B6B","#4ECDC4","#FFD93D","#6BCB77","#4D96FF","#FF6FB5","#A66CFF","#FF9F45"];export const START_COLOR=2;export const COLORS={PILLAR:"#537A8D",PILLAR_TOP:"#84AFC0",PILLAR_EDGE:"#CDEBF5",PILLAR_BAND:"#365463",ROCK:"#7C8A93",GRASS:"#5DAE4A",GRASS_DARK:"#3E8A35",MOSS:"#4A7A3A",SWEET_RECESS:"#0C1B22",SWEET_SPOT:"#FFDD22",TRAJECTORY:"#64D2FF",SKIN:"#F5C99A",PUPIL:"#2C2C2C",SMILE:"#C0785A",PERFECT:"#FFD700"};export const SKIES={classic:{stops:["#05040F","#0C0A22","#150F35","#1E1548","#140D31","#070413"],stars:!0,tower:"#2A2150"},dark:{stops:["#17122B","#1C1634","#241D40","#3D3659","#2A2442","#17122B"],stars:!0,tower:"#3A3062"},light:{stops:["#C0B9DB","#C8C2E0","#E2DFF0","#EEECF7","#E2DFF0","#C8C2E0"],stars:!1,tower:"#A99FCB"}};export const SKY_POSITIONS=[0,.16,.36,.55,.78,1];export const PITCH=.3;export const YAW=.42;export const LIGHT=frontLight([-.45,.7,.6],.5);
@@ -0,0 +1 @@
1
+ "use strict";import{World}from"@nayan-ui/engine";import{FALL_DELAY,GAME_DURATION,MAX_PENDING_MS,START_COLOR,STEP_MS,STEP_TOLERANCE_MS}from"./BlukConstants.js";import{landingPoints,landOn,launchVelocity,newCourse,stepFlight,targetsAhead,tiltFor,trajectory}from"./BlukRules.js";import{buildScene,fall,frame,hideArc,land,placeBlock,relax,removeScene,resetBlock,showArc,squash,stretch,syncPillars}from"./BlukScene.js";const WORLD_CAPACITY=600,CAMERA_TIME=.3;export function createGame(e){const o=new World(600),n={world:o,camera:{eye:[0,0,300],target:[0,0,0],fov:1,ortho:1},theme:e,config:null,scene:null,phase:"ready",course:null,block:"resting",flight:{x:0,y:0,vx:0,vy:0},targets:[],tilt:0,dirty:!1,get score(){return o.scoreboard.score},combo:0,colorIndex:START_COLOR,won:!1,get timeLeft(){return o.scoreboard.shownSeconds},camX:0,camMove:null,aiming:!1,pending:0,clock:0,onPhase:e=>{},onScore:e=>{},onCombo:e=>{},onTime:e=>{},hudFeedback:{},onEvent:e=>{}};return o.scoreboard.reset(0,GAME_DURATION),o.scoreboard.handlers={onSecond:e=>n.onTime(e),onTimeUp:()=>"playing"===n.phase&&"dead"!==n.block&&end(n,!0)},n}export function setLayout(e,o){const n=!e.config||e.config.width!==o.width||e.config.height!==o.height;e.config=o,!e.course||n&&!e.dirty&&"ready"===e.phase?deal(e):rebuild(e)}export function setTheme(e,o){e.theme=o,e.config&&e.scene&&rebuild(e)}function rebuild(e){const{config:o,course:n}=e;o&&n&&(e.scene&&removeScene(e.world,e.scene),e.scene=buildScene(e.world,o,e.theme,n.pillars,[e.flight.x,e.flight.y],e.colorIndex),placeBlock(e.world,e.scene,e.flight.x,e.flight.y,e.tilt),frame(e.world,o,e.scene,e.camera,e.camX))}function deal(e){const o=e.config;if(!o)return;e.course=newCourse(o);const n=e.course.pillars[0];e.flight={x:n.worldX,y:n.topY-o.blockSize/2,vx:0,vy:0},e.block="resting",e.tilt=0,e.dirty=!1,e.colorIndex=START_COLOR,e.camX=0,e.camMove=null,e.pending=0,e.world.cancelTimers(),rebuild(e),e.scene&&resetBlock(e.world,o,e.scene,e.colorIndex)}export function start(e){"playing"!==e.phase&&e.config&&((e.dirty||"over"===e.phase)&&deal(e),e.world.scoreboard.reset(),e.world.scoreboard.startCountdown(GAME_DURATION),e.combo=0,e.won=!1,e.colorIndex=START_COLOR,e.phase="playing",e.onScore(0),e.onCombo(0),e.onTime(GAME_DURATION),e.hudFeedback.message=void 0,e.onPhase("playing"))}export function reset(e){e.world.scoreboard.reset(0,GAME_DURATION),e.combo=0,e.won=!1,e.phase="ready",deal(e),e.onScore(0),e.onCombo(0),e.onTime(GAME_DURATION),e.hudFeedback.message=void 0,e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){if(e.world.isDisposed)return;if(e.clock+=Math.min(o,.25),"playing"===e.phase&&"flying"===e.block){let n=Math.min(e.pending+1e3*o,MAX_PENDING_MS);for(;"flying"===e.block&&n>=STEP_MS-STEP_TOLERANCE_MS;)n-=STEP_MS,step(e);e.pending=n,"flying"===e.block&&e.scene&&placeBlock(e.world,e.scene,e.flight.x,e.flight.y,e.tilt)}const n=e.camMove;if(n){const o=Math.min(1,(e.clock-n.at)/.3);e.camX=n.from+(n.to-n.from)*(1-(1-o)**3),o>=1&&(e.camMove=null)}e.config&&e.scene&&frame(e.world,e.config,e.scene,e.camera,e.camX),e.world.update(o)}function end(e,o){e.world.scoreboard.stop(),e.won=o,e.phase="over",e.config&&e.scene&&hideArc(e.world,e.config,e.scene),e.onPhase("over")}function step(e){const o=e.config,n=e.course,{landed:r,fell:t}=stepFlight(o,e.flight,e.targets);if(e.tilt=tiltFor(e.flight.vy),r>=0)return arrive(e,n.current+1+r);t&&(e.block="dead",e.world.scoreboard.stop(),e.scene&&fall(e.world,e.scene,e.tilt,e.colorIndex),e.onEvent("fall"),e.world.after(FALL_DELAY,()=>{"playing"===e.phase&&(e.onEvent("gameOver"),end(e,!1))}))}function arrive(e,o){const n=e.config,r=e.course,t=r.pillars[o],l=e.flight.x,{perfect:i,points:a,combo:s}=landingPoints(n,t,l,e.combo),d=e.tilt;e.block="resting",e.flight.vx=0,e.flight.vy=0,e.tilt=0,e.world.scoreboard.add(a),e.combo=s,e.colorIndex=t.colorIndex,landOn(n,r,o);const{scene:f}=e;f&&(placeBlock(e.world,f,l,e.flight.y,d),land(e.world,n,f,l,t.topY,i,e.colorIndex),syncPillars(e.world,n,f,r.pillars)),e.camMove={from:e.camX,to:t.worldX-n.anchorX,at:e.clock},e.onScore(e.score),e.onCombo(e.combo),i?(e.hudFeedback.message="PERFECT!",e.onEvent("perfect")):e.onEvent("land")}const PAN_SLOP=10,aimable=e=>"playing"===e.phase&&"resting"===e.block&&!!e.config&&!!e.course;export function drag(e,{phase:o,dx:n,dy:r,cancelled:t}){const{config:l,scene:i}=e;if(!l||!i)return;if("start"===o)return void(e.aiming=!1);if(!e.aiming&&Math.hypot(n,r)>=10&&(e.aiming=!0),!e.aiming)return;if("end"===o&&(e.aiming=!1),!aimable(e))return void hideArc(e.world,l,i);const a=launchVelocity(l,n,r);if("move"===o)return a?(showArc(e.world,l,i,trajectory(l,a,e.flight.x,e.flight.y,targetsAhead(e.course))),void squash(e.world,l,i,-.16*Math.hypot(a.vx,a.vy)/l.maxLaunchSpeed)):(hideArc(e.world,l,i),void squash(e.world,l,i,0));hideArc(e.world,l,i),a&&!t?launch(e,a.vx,a.vy):relax(e.world,l,i)}export function launch(e,o,n){const r=e.config;r&&aimable(e)&&(e.flight.vx=o,e.flight.vy=n,e.targets=targetsAhead(e.course),e.block="flying",e.dirty=!0,e.pending=0,e.scene&&stretch(e.world,r,e.scene),e.onEvent("jump"))}