@nayan-ui/games 1.19.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.
- package/README.md +53 -191
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/assets/models/explorer/explorer.glb +0 -0
- package/lib/module/assets/models/explorer/params.json +51 -0
- package/lib/module/assets/models/explorer/source.json +222 -0
- package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/lib/module/assets/models/play-with-tua/sources.json +141 -0
- package/lib/module/assets/sfx/balloon_pop.wav +0 -0
- package/lib/module/assets/sfx/blocked.wav +0 -0
- package/lib/module/assets/sfx/boing.wav +0 -0
- package/lib/module/assets/sfx/bonus.wav +0 -0
- package/lib/module/assets/sfx/boom.wav +0 -0
- package/lib/module/assets/sfx/bump.wav +0 -0
- package/lib/module/assets/sfx/cannon.wav +0 -0
- package/lib/module/assets/sfx/capture.wav +0 -0
- package/lib/module/assets/sfx/card_flip.wav +0 -0
- package/lib/module/assets/sfx/card_place.wav +0 -0
- package/lib/module/assets/sfx/catch.wav +0 -0
- package/lib/module/assets/sfx/chime.wav +0 -0
- package/lib/module/assets/sfx/chomp.wav +0 -0
- package/lib/module/assets/sfx/chomp_alt.wav +0 -0
- package/lib/module/assets/sfx/clack.wav +0 -0
- package/lib/module/assets/sfx/clang.wav +0 -0
- package/lib/module/assets/sfx/clash.wav +0 -0
- package/lib/module/assets/sfx/click.wav +0 -0
- package/lib/module/assets/sfx/coin.wav +0 -0
- package/lib/module/assets/sfx/combo.wav +0 -0
- package/lib/module/assets/sfx/crash.wav +0 -0
- package/lib/module/assets/sfx/crunch.wav +0 -0
- package/lib/module/assets/sfx/dance.wav +0 -0
- package/lib/module/assets/sfx/deselect.wav +0 -0
- package/lib/module/assets/sfx/dice_roll.wav +0 -0
- package/lib/module/assets/sfx/die.wav +0 -0
- package/lib/module/assets/sfx/draw.wav +0 -0
- package/lib/module/assets/sfx/drop.wav +0 -0
- package/lib/module/assets/sfx/eat.wav +0 -0
- package/lib/module/assets/sfx/engine.wav +0 -0
- package/lib/module/assets/sfx/error.wav +0 -0
- package/lib/module/assets/sfx/flag.wav +0 -0
- package/lib/module/assets/sfx/flap.wav +0 -0
- package/lib/module/assets/sfx/flip_disc.wav +0 -0
- package/lib/module/assets/sfx/footstep_run.wav +0 -0
- package/lib/module/assets/sfx/footstep_walk.wav +0 -0
- package/lib/module/assets/sfx/game_over.wav +0 -0
- package/lib/module/assets/sfx/gate.wav +0 -0
- package/lib/module/assets/sfx/hit.wav +0 -0
- package/lib/module/assets/sfx/hop.wav +0 -0
- package/lib/module/assets/sfx/hurt.wav +0 -0
- package/lib/module/assets/sfx/invalid.wav +0 -0
- package/lib/module/assets/sfx/jump.wav +0 -0
- package/lib/module/assets/sfx/ladder.wav +0 -0
- package/lib/module/assets/sfx/land.wav +0 -0
- package/lib/module/assets/sfx/laugh.wav +0 -0
- package/lib/module/assets/sfx/lose.wav +0 -0
- package/lib/module/assets/sfx/merge.wav +0 -0
- package/lib/module/assets/sfx/miss.wav +0 -0
- package/lib/module/assets/sfx/nitro.wav +0 -0
- package/lib/module/assets/sfx/pew.wav +0 -0
- package/lib/module/assets/sfx/place.wav +0 -0
- package/lib/module/assets/sfx/pling.wav +0 -0
- package/lib/module/assets/sfx/point.wav +0 -0
- package/lib/module/assets/sfx/pop.wav +0 -0
- package/lib/module/assets/sfx/pop_soft.wav +0 -0
- package/lib/module/assets/sfx/power_up.wav +0 -0
- package/lib/module/assets/sfx/reveal.wav +0 -0
- package/lib/module/assets/sfx/robot.wav +0 -0
- package/lib/module/assets/sfx/rotate.wav +0 -0
- package/lib/module/assets/sfx/run_steps.wav +0 -0
- package/lib/module/assets/sfx/select.wav +0 -0
- package/lib/module/assets/sfx/shuffle.wav +0 -0
- package/lib/module/assets/sfx/six.wav +0 -0
- package/lib/module/assets/sfx/slice.wav +0 -0
- package/lib/module/assets/sfx/slide.wav +0 -0
- package/lib/module/assets/sfx/snake.wav +0 -0
- package/lib/module/assets/sfx/snap.wav +0 -0
- package/lib/module/assets/sfx/splash.wav +0 -0
- package/lib/module/assets/sfx/star.wav +0 -0
- package/lib/module/assets/sfx/start.wav +0 -0
- package/lib/module/assets/sfx/swoosh.wav +0 -0
- package/lib/module/assets/sfx/tap.wav +0 -0
- package/lib/module/assets/sfx/thud.wav +0 -0
- package/lib/module/assets/sfx/thunk.wav +0 -0
- package/lib/module/assets/sfx/tick.wav +0 -0
- package/lib/module/assets/sfx/time_up.wav +0 -0
- package/lib/module/assets/sfx/tock.wav +0 -0
- package/lib/module/assets/sfx/walk_steps.wav +0 -0
- package/lib/module/assets/sfx/warning.wav +0 -0
- package/lib/module/assets/sfx/whack.wav +0 -0
- package/lib/module/assets/sfx/whoosh.wav +0 -0
- package/lib/module/assets/sfx/win.wav +0 -0
- package/lib/module/assets/sfx/zap.wav +0 -0
- package/lib/module/assets/textures/ad_bolt.png +0 -0
- package/lib/module/assets/textures/ad_bubbles.png +0 -0
- package/lib/module/assets/textures/ad_chevrons.png +0 -0
- package/lib/module/assets/textures/asphalt.png +0 -0
- package/lib/module/assets/textures/bark.jpg +0 -0
- package/lib/module/assets/textures/explorer-atlas.png +0 -0
- package/lib/module/assets/textures/facade.png +0 -0
- package/lib/module/assets/textures/grass.png +0 -0
- package/lib/module/assets/textures/leaves.png +0 -0
- package/lib/module/assets/textures/limestone.jpg +0 -0
- package/lib/module/assets/textures/meadow.jpg +0 -0
- package/lib/module/assets/textures/nature-sources.json +87 -0
- package/lib/module/assets/textures/pine.png +0 -0
- package/lib/module/assets/textures/river.jpg +0 -0
- package/lib/module/assets/textures/soft_glow.png +0 -0
- package/lib/module/games/arrows/Arrows.js +1 -1
- package/lib/module/games/arrows/ArrowsConstants.js +1 -1
- package/lib/module/games/arrows/ArrowsGame.js +1 -0
- package/lib/module/games/arrows/ArrowsScene.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
- package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -1
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
- package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
- package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
- package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
- package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
- package/lib/module/games/bluk/Bluk.js +1 -1
- package/lib/module/games/bluk/BlukConstants.js +1 -1
- package/lib/module/games/bluk/BlukGame.js +1 -0
- package/lib/module/games/bluk/BlukRules.js +1 -0
- package/lib/module/games/bluk/BlukScene.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
- package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
- package/lib/module/games/car-racing/CarMeshes.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js +1 -1
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
- package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
- package/lib/module/games/car-racing/CarRacingGame.js +1 -0
- package/lib/module/games/car-racing/CarRacingScene.js +1 -0
- package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
- package/lib/module/games/checkers/Checkers.js +1 -1
- package/lib/module/games/checkers/CheckersAI.js +1 -0
- package/lib/module/games/checkers/CheckersConstants.js +1 -1
- package/lib/module/games/checkers/CheckersGame.js +1 -0
- package/lib/module/games/checkers/CheckersRules.js +1 -0
- package/lib/module/games/checkers/CheckersScene.js +1 -0
- package/lib/module/games/color-switch/ColorSwitch.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
- package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
- package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
- package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
- package/lib/module/games/game-2048/Game2048.js +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -1
- package/lib/module/games/game-2048/Game2048Game.js +1 -0
- package/lib/module/games/game-2048/Game2048Rules.js +1 -0
- package/lib/module/games/game-2048/Game2048Scene.js +1 -0
- package/lib/module/games/knife-hit/KnifeHit.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
- package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
- package/lib/module/games/ludo-king/LudoKing.js +1 -1
- package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
- package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
- package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
- package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
- package/lib/module/games/memory-match/MemoryMatch.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
- package/lib/module/games/mob-control/MobControl.js +1 -1
- package/lib/module/games/mob-control/MobControlConstants.js +1 -1
- package/lib/module/games/mob-control/MobControlGame.js +1 -0
- package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
- package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
- package/lib/module/games/mob-control/MobControlRules.js +1 -0
- package/lib/module/games/mob-control/MobControlScene.js +1 -0
- package/lib/module/games/number-search/NumberSearch.js +1 -1
- package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
- package/lib/module/games/pac-man/PacMan.js +1 -1
- package/lib/module/games/pac-man/PacManConstants.js +1 -1
- package/lib/module/games/pac-man/PacManGame.js +1 -0
- package/lib/module/games/pac-man/PacManRules.js +1 -0
- package/lib/module/games/pac-man/PacManScene.js +1 -0
- package/lib/module/games/paper-io/PaperIo.js +1 -1
- package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
- package/lib/module/games/paper-io/PaperIoGame.js +1 -0
- package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
- package/lib/module/games/paper-io/PaperIoRules.js +1 -0
- package/lib/module/games/paper-io/PaperIoScene.js +1 -0
- package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
- package/lib/module/games/penguin-run/PenguinModel.js +1 -0
- package/lib/module/games/penguin-run/PenguinRun.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
- package/lib/module/games/reversi/Reversi.js +1 -1
- package/lib/module/games/reversi/ReversiConstants.js +1 -1
- package/lib/module/games/reversi/ReversiGame.js +1 -0
- package/lib/module/games/reversi/ReversiRules.js +1 -0
- package/lib/module/games/reversi/ReversiScene.js +1 -0
- package/lib/module/games/search-grid/SearchGrid.js +1 -0
- package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
- package/lib/module/games/search-grid/SearchGridGame.js +1 -0
- package/lib/module/games/search-grid/SearchGridScene.js +1 -0
- package/lib/module/games/shared/BackdropCard.js +1 -0
- package/lib/module/games/shared/EngineBackdrop.js +1 -0
- package/lib/module/games/shared/EngineBlasts.js +1 -0
- package/lib/module/games/shared/EngineBlocks.js +1 -0
- package/lib/module/games/shared/EngineControlText.js +1 -0
- package/lib/module/games/shared/EngineDice.js +1 -0
- package/lib/module/games/shared/EngineFootprint.js +1 -0
- package/lib/module/games/shared/EngineFruits.js +1 -0
- package/lib/module/games/shared/EngineGameLoader.js +1 -0
- package/lib/module/games/shared/EngineGameScreen.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
- package/lib/module/games/shared/EngineGlyphs.js +1 -0
- package/lib/module/games/shared/EngineHud.js +1 -0
- package/lib/module/games/shared/EngineLoading.js +1 -0
- package/lib/module/games/shared/EngineMeadow.js +1 -0
- package/lib/module/games/shared/EngineMeshCache.js +1 -0
- package/lib/module/games/shared/EngineMeshes.js +1 -0
- package/lib/module/games/shared/EngineRacingChase.js +1 -0
- package/lib/module/games/shared/EngineRacingHandling.js +1 -0
- package/lib/module/games/shared/EngineReadyContext.js +1 -0
- package/lib/module/games/shared/EngineTilt.js +1 -0
- package/lib/module/games/shared/EngineTouchSurface.js +1 -0
- package/lib/module/games/shared/EngineUtils.js +1 -0
- package/lib/module/games/shared/GameActivity.js +1 -0
- package/lib/module/games/shared/GameLoading.js +1 -0
- package/lib/module/games/shared/GameLoadingTransition.js +1 -0
- package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
- package/lib/module/games/shared/useEngineGame.js +1 -0
- package/lib/module/games/shared/useGameResource.js +1 -0
- package/lib/module/games/shared/useLiveState.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
- package/lib/module/games/snake-3d/Snake3D.js +1 -1
- package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
- package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
- package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
- package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
- package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
- package/lib/module/games/stack-tower/StackTower.js +1 -1
- package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
- package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
- package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
- package/lib/module/games/sudoku/Sudoku.js +1 -1
- package/lib/module/games/sudoku/SudokuConstants.js +1 -1
- package/lib/module/games/sudoku/SudokuGame.js +1 -0
- package/lib/module/games/sudoku/SudokuRules.js +1 -0
- package/lib/module/games/sudoku/SudokuScene.js +1 -0
- package/lib/module/games/tangram/Tangram.js +1 -1
- package/lib/module/games/tangram/TangramConstants.js +1 -1
- package/lib/module/games/tangram/TangramGame.js +1 -0
- package/lib/module/games/tangram/TangramRules.js +1 -0
- package/lib/module/games/tangram/TangramScene.js +1 -0
- package/lib/module/games/tank-1990/Tank1990.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
- package/lib/module/games/tile-home/TileHome.js +1 -1
- package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
- package/lib/module/games/tile-home/TileHomeGame.js +1 -0
- package/lib/module/games/tile-home/TileHomeScene.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
- package/lib/module/games/word-search/WordSearch.js +1 -1
- package/lib/module/games/word-search/WordSearchWords.js +1 -0
- package/lib/module/helpers/GamePatternData.js +1 -0
- package/lib/module/helpers/GameSettingsModal.js +1 -1
- package/lib/module/helpers/GameTheme.js +1 -0
- package/lib/module/helpers/IconPaths.js +1 -0
- package/lib/module/helpers/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/GameAssetLoader.js +1 -0
- package/lib/module/services/GameAssets.js +1 -0
- package/lib/module/services/GameLoaders.js +1 -0
- package/lib/module/services/GamesConstants.js +1 -1
- package/lib/module/services/GamesMetadata.js +1 -1
- package/lib/module/services/GamesService.js +1 -1
- package/lib/module/services/HapticsService.js +1 -1
- package/lib/module/services/ScoringService.js +1 -1
- package/lib/module/services/SfxSources.js +1 -0
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/ThemeService.js +1 -0
- package/lib/module/services/UtilsService.js +1 -1
- package/lib/module/services/index.js +1 -1
- package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
- package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
- package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
- package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
- package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
- package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
- package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
- package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
- package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
- package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
- package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
- package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
- package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
- package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
- package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
- package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
- package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
- package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
- package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
- package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
- package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
- package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
- package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
- package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
- package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
- package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
- package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
- package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
- package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
- package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
- package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
- package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
- package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
- package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
- package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
- package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
- package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
- package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
- package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
- package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
- package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
- package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
- package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
- package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
- package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
- package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
- package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
- package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
- package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
- package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
- package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
- package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
- package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
- package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
- package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
- package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
- package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
- package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
- package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
- package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
- package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
- package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
- package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
- package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
- package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
- package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
- package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
- package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
- package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
- package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
- package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
- package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
- package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
- package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
- package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
- package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
- package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
- package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
- package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
- package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
- package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
- package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
- package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
- package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
- package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
- package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
- package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
- package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
- package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
- package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
- package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
- package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
- package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
- package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
- package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
- package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
- package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
- package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
- package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
- package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
- package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
- package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
- package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
- package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
- package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
- package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
- package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
- package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
- package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
- package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
- package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
- package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
- package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
- package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
- package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
- package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
- package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
- package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
- package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
- package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
- package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
- package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
- package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
- package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
- package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
- package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
- package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
- package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
- package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
- package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
- package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
- package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
- package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
- package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
- package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
- package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
- package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
- package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
- package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
- package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
- package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
- package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
- package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
- package/lib/typescript/src/helpers/index.d.ts +1 -19
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
- package/lib/typescript/src/services/GameAssets.d.ts +11 -0
- package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
- package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
- package/lib/typescript/src/services/HapticsService.d.ts +1 -1
- package/lib/typescript/src/services/SfxSources.d.ts +79 -0
- package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
- package/lib/typescript/src/services/ThemeService.d.ts +117 -0
- package/lib/typescript/src/services/UtilsService.d.ts +20 -2
- package/lib/typescript/src/services/index.d.ts +3 -0
- package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
- package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
- package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
- package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
- package/lib/web/assets/0376bda32be3-robot.wav +0 -0
- package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
- package/lib/web/assets/0b21278bffba-boing.wav +0 -0
- package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
- package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
- package/lib/web/assets/177f00502e08-bonus.wav +0 -0
- package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
- package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
- package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
- package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
- package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
- package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
- package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
- package/lib/web/assets/2699065037ad-select.wav +0 -0
- package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
- package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
- package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
- package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
- package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
- package/lib/web/assets/336d63b739b5-combo.wav +0 -0
- package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
- package/lib/web/assets/3a816e20212f-capture.wav +0 -0
- package/lib/web/assets/40240217810a-nitro.wav +0 -0
- package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
- package/lib/web/assets/501994226995-coin.wav +0 -0
- package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
- package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
- package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
- package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
- package/lib/web/assets/6da3b101926d-merge.wav +0 -0
- package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
- package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
- package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
- package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
- package/lib/web/assets/7506e3efe264-catch.wav +0 -0
- package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
- package/lib/web/assets/793abe620201-card_place.wav +0 -0
- package/lib/web/assets/7da09c57f52d-facade.png +0 -0
- package/lib/web/assets/7e1a902176f6-pine.png +0 -0
- package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
- package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
- package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
- package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
- package/lib/web/assets/854b31683cb2-draw.wav +0 -0
- package/lib/web/assets/8616150393b7-error.wav +0 -0
- package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
- package/lib/web/assets/88755845922c-hop.wav +0 -0
- package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
- package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
- package/lib/web/assets/9210a24472d1-place.wav +0 -0
- package/lib/web/assets/930d833ebf89-splash.wav +0 -0
- package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
- package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
- package/lib/web/assets/9ab04403898b-clang.wav +0 -0
- package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
- package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
- package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
- package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
- package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
- package/lib/web/assets/a76940a48c68-hit.wav +0 -0
- package/lib/web/assets/a98ddb724460-leaves.png +0 -0
- package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
- package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
- package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
- package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
- package/lib/web/assets/ab37cd128509-click.wav +0 -0
- package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
- package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
- package/lib/web/assets/b3894545cf71-slice.wav +0 -0
- package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
- package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
- package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
- package/lib/web/assets/baff6feda846-lose.wav +0 -0
- package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
- package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
- package/lib/web/assets/c3a9edfad195-die.wav +0 -0
- package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
- package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
- package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
- package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
- package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
- package/lib/web/assets/d15591767778-tap.wav +0 -0
- package/lib/web/assets/d1781a52234f-slide.wav +0 -0
- package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
- package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
- package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
- package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
- package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
- package/lib/web/assets/e454e56df89a-clack.wav +0 -0
- package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
- package/lib/web/assets/ed6496b891fc-land.wav +0 -0
- package/lib/web/assets/f21920200a81-thunk.wav +0 -0
- package/lib/web/assets/f753b43be89d-whack.wav +0 -0
- package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
- package/lib/web/assets/fbe299716916-grass.png +0 -0
- package/lib/web/chunk-52ez2s9z.js +15 -0
- package/lib/web/chunk-8675t224.js +1 -0
- package/lib/web/index.js +2 -0
- package/lib/web/package.json +1 -0
- package/lib/web/services.js +2 -0
- package/package.json +94 -73
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/models/explorer/explorer.glb +0 -0
- package/src/assets/models/explorer/params.json +51 -0
- package/src/assets/models/explorer/source.json +222 -0
- package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/src/assets/models/play-with-tua/sources.json +141 -0
- package/src/assets/sfx/balloon_pop.wav +0 -0
- package/src/assets/sfx/blocked.wav +0 -0
- package/src/assets/sfx/boing.wav +0 -0
- package/src/assets/sfx/bonus.wav +0 -0
- package/src/assets/sfx/boom.wav +0 -0
- package/src/assets/sfx/bump.wav +0 -0
- package/src/assets/sfx/cannon.wav +0 -0
- package/src/assets/sfx/capture.wav +0 -0
- package/src/assets/sfx/card_flip.wav +0 -0
- package/src/assets/sfx/card_place.wav +0 -0
- package/src/assets/sfx/catch.wav +0 -0
- package/src/assets/sfx/chime.wav +0 -0
- package/src/assets/sfx/chomp.wav +0 -0
- package/src/assets/sfx/chomp_alt.wav +0 -0
- package/src/assets/sfx/clack.wav +0 -0
- package/src/assets/sfx/clang.wav +0 -0
- package/src/assets/sfx/clash.wav +0 -0
- package/src/assets/sfx/click.wav +0 -0
- package/src/assets/sfx/coin.wav +0 -0
- package/src/assets/sfx/combo.wav +0 -0
- package/src/assets/sfx/crash.wav +0 -0
- package/src/assets/sfx/crunch.wav +0 -0
- package/src/assets/sfx/dance.wav +0 -0
- package/src/assets/sfx/deselect.wav +0 -0
- package/src/assets/sfx/dice_roll.wav +0 -0
- package/src/assets/sfx/die.wav +0 -0
- package/src/assets/sfx/draw.wav +0 -0
- package/src/assets/sfx/drop.wav +0 -0
- package/src/assets/sfx/eat.wav +0 -0
- package/src/assets/sfx/engine.wav +0 -0
- package/src/assets/sfx/error.wav +0 -0
- package/src/assets/sfx/flag.wav +0 -0
- package/src/assets/sfx/flap.wav +0 -0
- package/src/assets/sfx/flip_disc.wav +0 -0
- package/src/assets/sfx/footstep_run.wav +0 -0
- package/src/assets/sfx/footstep_walk.wav +0 -0
- package/src/assets/sfx/game_over.wav +0 -0
- package/src/assets/sfx/gate.wav +0 -0
- package/src/assets/sfx/hit.wav +0 -0
- package/src/assets/sfx/hop.wav +0 -0
- package/src/assets/sfx/hurt.wav +0 -0
- package/src/assets/sfx/invalid.wav +0 -0
- package/src/assets/sfx/jump.wav +0 -0
- package/src/assets/sfx/ladder.wav +0 -0
- package/src/assets/sfx/land.wav +0 -0
- package/src/assets/sfx/laugh.wav +0 -0
- package/src/assets/sfx/lose.wav +0 -0
- package/src/assets/sfx/merge.wav +0 -0
- package/src/assets/sfx/miss.wav +0 -0
- package/src/assets/sfx/nitro.wav +0 -0
- package/src/assets/sfx/pew.wav +0 -0
- package/src/assets/sfx/place.wav +0 -0
- package/src/assets/sfx/pling.wav +0 -0
- package/src/assets/sfx/point.wav +0 -0
- package/src/assets/sfx/pop.wav +0 -0
- package/src/assets/sfx/pop_soft.wav +0 -0
- package/src/assets/sfx/power_up.wav +0 -0
- package/src/assets/sfx/reveal.wav +0 -0
- package/src/assets/sfx/robot.wav +0 -0
- package/src/assets/sfx/rotate.wav +0 -0
- package/src/assets/sfx/run_steps.wav +0 -0
- package/src/assets/sfx/select.wav +0 -0
- package/src/assets/sfx/shuffle.wav +0 -0
- package/src/assets/sfx/six.wav +0 -0
- package/src/assets/sfx/slice.wav +0 -0
- package/src/assets/sfx/slide.wav +0 -0
- package/src/assets/sfx/snake.wav +0 -0
- package/src/assets/sfx/snap.wav +0 -0
- package/src/assets/sfx/splash.wav +0 -0
- package/src/assets/sfx/star.wav +0 -0
- package/src/assets/sfx/start.wav +0 -0
- package/src/assets/sfx/swoosh.wav +0 -0
- package/src/assets/sfx/tap.wav +0 -0
- package/src/assets/sfx/thud.wav +0 -0
- package/src/assets/sfx/thunk.wav +0 -0
- package/src/assets/sfx/tick.wav +0 -0
- package/src/assets/sfx/time_up.wav +0 -0
- package/src/assets/sfx/tock.wav +0 -0
- package/src/assets/sfx/walk_steps.wav +0 -0
- package/src/assets/sfx/warning.wav +0 -0
- package/src/assets/sfx/whack.wav +0 -0
- package/src/assets/sfx/whoosh.wav +0 -0
- package/src/assets/sfx/win.wav +0 -0
- package/src/assets/sfx/zap.wav +0 -0
- package/src/assets/textures/ad_bolt.png +0 -0
- package/src/assets/textures/ad_bubbles.png +0 -0
- package/src/assets/textures/ad_chevrons.png +0 -0
- package/src/assets/textures/asphalt.png +0 -0
- package/src/assets/textures/bark.jpg +0 -0
- package/src/assets/textures/explorer-atlas.png +0 -0
- package/src/assets/textures/facade.png +0 -0
- package/src/assets/textures/grass.png +0 -0
- package/src/assets/textures/leaves.png +0 -0
- package/src/assets/textures/limestone.jpg +0 -0
- package/src/assets/textures/meadow.jpg +0 -0
- package/src/assets/textures/nature-sources.json +87 -0
- package/src/assets/textures/pine.png +0 -0
- package/src/assets/textures/river.jpg +0 -0
- package/src/assets/textures/soft_glow.png +0 -0
- package/src/games/arrows/Arrows.tsx +69 -0
- package/src/games/arrows/ArrowsConstants.ts +107 -0
- package/src/games/arrows/ArrowsGame.ts +735 -0
- package/src/games/arrows/ArrowsScene.ts +395 -0
- package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
- package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
- package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
- package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
- package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
- package/src/games/bike-racing/BikeMeshes.ts +273 -0
- package/src/games/bike-racing/BikeRacing.tsx +211 -0
- package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
- package/src/games/bike-racing/BikeRacingGame.ts +557 -0
- package/src/games/bike-racing/BikeRacingScene.ts +119 -0
- package/src/games/block-blast/BlockBlast.tsx +73 -0
- package/src/games/block-blast/BlockBlastConstants.ts +179 -0
- package/src/games/block-blast/BlockBlastGame.ts +471 -0
- package/src/games/block-blast/BlockBlastScene.ts +156 -0
- package/src/games/block-breaker/BlockBreaker.tsx +79 -0
- package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
- package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
- package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
- package/src/games/bluk/Bluk.tsx +82 -0
- package/src/games/bluk/BlukConstants.ts +121 -0
- package/src/games/bluk/BlukGame.ts +323 -0
- package/src/games/bluk/BlukRules.ts +154 -0
- package/src/games/bluk/BlukScene.ts +514 -0
- package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
- package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
- package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
- package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
- package/src/games/candy-crush/CandyCrush.tsx +77 -0
- package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
- package/src/games/candy-crush/CandyCrushGame.ts +477 -0
- package/src/games/candy-crush/CandyCrushScene.ts +209 -0
- package/src/games/car-racing/CarMeshes.ts +440 -0
- package/src/games/car-racing/CarRacing.tsx +211 -0
- package/src/games/car-racing/CarRacingConstants.ts +167 -0
- package/src/games/car-racing/CarRacingFacade.ts +40 -0
- package/src/games/car-racing/CarRacingGame.ts +539 -0
- package/src/games/car-racing/CarRacingScene.ts +1026 -0
- package/src/games/car-racing/CarRacingScenery.ts +265 -0
- package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
- package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
- package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
- package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
- package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
- package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
- package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
- package/src/games/checkers/Checkers.tsx +83 -0
- package/src/games/checkers/CheckersAI.ts +255 -0
- package/src/games/checkers/CheckersConstants.ts +68 -0
- package/src/games/checkers/CheckersGame.ts +322 -0
- package/src/games/checkers/CheckersRules.ts +167 -0
- package/src/games/checkers/CheckersScene.ts +308 -0
- package/src/games/color-switch/ColorSwitch.tsx +75 -0
- package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
- package/src/games/color-switch/ColorSwitchGame.ts +329 -0
- package/src/games/color-switch/ColorSwitchScene.ts +220 -0
- package/src/games/colors-sort/ColorsSort.tsx +82 -0
- package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
- package/src/games/colors-sort/ColorsSortGame.ts +246 -0
- package/src/games/colors-sort/ColorsSortScene.ts +315 -0
- package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
- package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
- package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
- package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
- package/src/games/crossy-road/CrossyRoad.tsx +74 -0
- package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
- package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
- package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
- package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
- package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
- package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
- package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
- package/src/games/dino-jump/DinoJump.tsx +77 -0
- package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
- package/src/games/dino-jump/DinoJumpGame.ts +344 -0
- package/src/games/dino-jump/DinoJumpScene.ts +686 -0
- package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
- package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
- package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
- package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
- package/src/games/falling-sticks/FallingSticks.tsx +72 -0
- package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
- package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
- package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
- package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
- package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
- package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
- package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
- package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
- package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
- package/src/games/flappy-bird/FlappyBird.tsx +73 -0
- package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
- package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
- package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
- package/src/games/fruit-merger/FruitMerger.tsx +73 -0
- package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
- package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
- package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
- package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
- package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
- package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
- package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
- package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
- package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
- package/src/games/game-2048/Game2048.tsx +84 -0
- package/src/games/game-2048/Game2048Constants.ts +68 -0
- package/src/games/game-2048/Game2048Game.ts +181 -0
- package/src/games/game-2048/Game2048Rules.ts +101 -0
- package/src/games/game-2048/Game2048Scene.ts +206 -0
- package/src/games/knife-hit/KnifeHit.tsx +78 -0
- package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
- package/src/games/knife-hit/KnifeHitGame.ts +264 -0
- package/src/games/knife-hit/KnifeHitScene.ts +360 -0
- package/src/games/ludo-king/LudoKing.tsx +86 -0
- package/src/games/ludo-king/LudoKingConstants.ts +212 -0
- package/src/games/ludo-king/LudoKingGame.ts +326 -0
- package/src/games/ludo-king/LudoKingRules.ts +143 -0
- package/src/games/ludo-king/LudoKingScene.ts +397 -0
- package/src/games/maze-runner/MazeRunner.tsx +88 -0
- package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
- package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
- package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
- package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
- package/src/games/memory-match/MemoryMatch.tsx +77 -0
- package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
- package/src/games/memory-match/MemoryMatchGame.ts +222 -0
- package/src/games/memory-match/MemoryMatchRules.ts +38 -0
- package/src/games/memory-match/MemoryMatchScene.ts +268 -0
- package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
- package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
- package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
- package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
- package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
- package/src/games/mob-control/MobControl.tsx +73 -0
- package/src/games/mob-control/MobControlConstants.ts +106 -0
- package/src/games/mob-control/MobControlGame.ts +176 -0
- package/src/games/mob-control/MobControlMeshes.ts +85 -0
- package/src/games/mob-control/MobControlRenderer.ts +108 -0
- package/src/games/mob-control/MobControlRules.ts +522 -0
- package/src/games/mob-control/MobControlScene.ts +399 -0
- package/src/games/number-search/NumberSearch.tsx +18 -0
- package/src/games/number-search/NumberSearchNumbers.ts +623 -0
- package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
- package/src/games/pac-man/PacMan.tsx +86 -0
- package/src/games/pac-man/PacManConstants.ts +169 -0
- package/src/games/pac-man/PacManGame.ts +406 -0
- package/src/games/pac-man/PacManRules.ts +255 -0
- package/src/games/pac-man/PacManScene.ts +387 -0
- package/src/games/paper-io/PaperIo.tsx +91 -0
- package/src/games/paper-io/PaperIoConstants.ts +86 -0
- package/src/games/paper-io/PaperIoGame.ts +193 -0
- package/src/games/paper-io/PaperIoMeshes.ts +233 -0
- package/src/games/paper-io/PaperIoRules.ts +315 -0
- package/src/games/paper-io/PaperIoScene.ts +310 -0
- package/src/games/penguin-run/PenguinMeshes.ts +269 -0
- package/src/games/penguin-run/PenguinModel.ts +712 -0
- package/src/games/penguin-run/PenguinRun.tsx +77 -0
- package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
- package/src/games/penguin-run/PenguinRunGame.ts +406 -0
- package/src/games/penguin-run/PenguinRunScene.ts +949 -0
- package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
- package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
- package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
- package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
- package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
- package/src/games/pipe-connect/PipeConnect.tsx +69 -0
- package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
- package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
- package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
- package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
- package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
- package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
- package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
- package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
- package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
- package/src/games/popit-fidget/PopitFidget.tsx +72 -0
- package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
- package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
- package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
- package/src/games/reversi/Reversi.tsx +94 -0
- package/src/games/reversi/ReversiConstants.ts +67 -0
- package/src/games/reversi/ReversiGame.ts +266 -0
- package/src/games/reversi/ReversiRules.ts +176 -0
- package/src/games/reversi/ReversiScene.ts +240 -0
- package/src/games/search-grid/SearchGrid.tsx +92 -0
- package/src/games/search-grid/SearchGridConstants.ts +178 -0
- package/src/games/search-grid/SearchGridGame.ts +209 -0
- package/src/games/search-grid/SearchGridScene.ts +301 -0
- package/src/games/shared/BackdropCard.tsx +54 -0
- package/src/games/shared/EngineBackdrop.ts +300 -0
- package/src/games/shared/EngineBlasts.ts +136 -0
- package/src/games/shared/EngineBlocks.ts +91 -0
- package/src/games/shared/EngineControlText.ts +17 -0
- package/src/games/shared/EngineDice.ts +250 -0
- package/src/games/shared/EngineFootprint.ts +35 -0
- package/src/games/shared/EngineFruits.ts +1435 -0
- package/src/games/shared/EngineGameLoader.tsx +88 -0
- package/src/games/shared/EngineGameScreen.tsx +325 -0
- package/src/games/shared/EngineGameWidth.ts +3 -0
- package/src/games/shared/EngineGameWidth.web.ts +3 -0
- package/src/games/shared/EngineGlyphs.ts +178 -0
- package/src/games/shared/EngineHud.ts +815 -0
- package/src/games/shared/EngineLoading.ts +477 -0
- package/src/games/shared/EngineMeadow.ts +725 -0
- package/src/games/shared/EngineMeshCache.ts +15 -0
- package/src/games/shared/EngineMeshes.ts +10 -0
- package/src/games/shared/EngineRacingChase.ts +21 -0
- package/src/games/shared/EngineRacingHandling.ts +48 -0
- package/src/games/shared/EngineReadyContext.ts +4 -0
- package/src/games/shared/EngineTilt.ts +44 -0
- package/src/games/shared/EngineTouchSurface.tsx +103 -0
- package/src/games/shared/EngineUtils.ts +52 -0
- package/src/games/shared/GameActivity.ts +13 -0
- package/src/games/shared/GameLoading.tsx +202 -0
- package/src/games/shared/GameLoadingTransition.tsx +61 -0
- package/src/games/shared/ProceduralCacheVersion.ts +2 -0
- package/src/games/shared/useEngineGame.ts +240 -0
- package/src/games/shared/useGameResource.ts +21 -0
- package/src/games/shared/useLiveState.ts +58 -0
- package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
- package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
- package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
- package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
- package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
- package/src/games/snake-3d/Snake3D.tsx +76 -0
- package/src/games/snake-3d/Snake3DConstants.ts +61 -0
- package/src/games/snake-3d/Snake3DGame.ts +192 -0
- package/src/games/snake-3d/Snake3DMotion.ts +22 -0
- package/src/games/snake-3d/Snake3DRules.ts +116 -0
- package/src/games/snake-3d/Snake3DScene.ts +322 -0
- package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
- package/src/games/space-fighter/SpaceFighter.tsx +74 -0
- package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
- package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
- package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
- package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
- package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
- package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
- package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
- package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
- package/src/games/stack-tower/StackTower.tsx +76 -0
- package/src/games/stack-tower/StackTowerConstants.ts +74 -0
- package/src/games/stack-tower/StackTowerGame.ts +236 -0
- package/src/games/stack-tower/StackTowerScene.ts +186 -0
- package/src/games/sudoku/Sudoku.tsx +73 -0
- package/src/games/sudoku/SudokuConstants.ts +127 -0
- package/src/games/sudoku/SudokuGame.ts +250 -0
- package/src/games/sudoku/SudokuRules.ts +125 -0
- package/src/games/sudoku/SudokuScene.ts +304 -0
- package/src/games/tangram/Tangram.tsx +79 -0
- package/src/games/tangram/TangramConstants.ts +64 -0
- package/src/games/tangram/TangramGame.ts +356 -0
- package/src/games/tangram/TangramRules.ts +409 -0
- package/src/games/tangram/TangramScene.ts +203 -0
- package/src/games/tank-1990/Tank1990.tsx +78 -0
- package/src/games/tank-1990/Tank1990Constants.ts +81 -0
- package/src/games/tank-1990/Tank1990Game.ts +331 -0
- package/src/games/tank-1990/Tank1990Rules.ts +390 -0
- package/src/games/tank-1990/Tank1990Scene.ts +434 -0
- package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
- package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
- package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
- package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
- package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
- package/src/games/tile-home/TileHome.tsx +92 -0
- package/src/games/tile-home/TileHomeConstants.ts +139 -0
- package/src/games/tile-home/TileHomeGame.ts +435 -0
- package/src/games/tile-home/TileHomeScene.ts +154 -0
- package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
- package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
- package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
- package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
- package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
- package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
- package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
- package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
- package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
- package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
- package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
- package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
- package/src/games/word-search/WordSearch.tsx +18 -0
- package/src/games/word-search/WordSearchWords.ts +1642 -0
- package/src/helpers/GamePatternData.ts +120 -0
- package/src/helpers/GameSettingsModal.tsx +384 -0
- package/src/helpers/GameTheme.tsx +37 -0
- package/src/helpers/IconPaths.ts +6 -0
- package/src/helpers/index.ts +2 -0
- package/src/index.tsx +60 -0
- package/src/services/GameAssetLoader.ts +111 -0
- package/src/services/GameAssets.ts +149 -0
- package/src/services/GameLoaders.ts +93 -0
- package/src/services/GamesConstants.ts +193 -0
- package/src/services/GamesMetadata.ts +711 -0
- package/src/services/GamesService.ts +116 -0
- package/src/services/HapticsService.ts +48 -0
- package/src/services/ScoringService.ts +19 -0
- package/src/services/SfxSources.ts +81 -0
- package/src/services/SoundsService.ts +582 -0
- package/src/services/ThemeService.ts +281 -0
- package/src/services/UtilsService.ts +134 -0
- package/src/services/index.ts +6 -0
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{HUMAN_CAMERA_HEIGHT,MOVEMENT_START,MOVEMENT_STOP}from"./TreasureHuntConstants.js";import{caveAt,groundHeight,solidClearance,toLocal}from"./TreasureHuntRules.js";const DEAD_ZONE=8,RUN_DISTANCE=80,TAP_DURATION=280,INPUT_RESPONSE=.035;export const createSwipeInput=()=>({x:0,y:0,filtered:{x:0,y:0},filterActive:!1,touchId:null,startX:0,startY:0,contacts:new Map});function stopMovement(t){t.x=t.y=0,t.filtered.x=t.filtered.y=0,t.filterActive=!1,t.touchId=null,t.startX=t.startY=0}export function resetSwipe(t){stopMovement(t),t.contacts.clear()}export function startSwipe(t,e,o=0){Number.isFinite(e.pageX+e.pageY)&&!t.contacts.has(e.identifier)&&(t.contacts.set(e.identifier,{x:e.pageX,y:e.pageY,time:o,dragged:!1}),null===t.touchId&&(t.touchId=e.identifier,t.startX=e.pageX,t.startY=e.pageY,t.x=t.y=0,t.filtered.x=t.filtered.y=0,t.filterActive=!1))}export function moveSwipe(t,e){const o=t.contacts.get(e.identifier);if(o&&Math.hypot(e.pageX-o.x,e.pageY-o.y)>8&&(o.dragged=!0),null===t.touchId||t.touchId!==e.identifier)return;const r=e.pageX-t.startX,a=e.pageY-t.startY,n=Math.hypot(r,a);if(!Number.isFinite(n)||n<=8)return void(t.x=t.y=0);n>80&&(t.startX=e.pageX-r/n*80,t.startY=e.pageY-a/n*80);const i=Math.min(1,(n-8)/72),s=i*i*(3-2*i);t.x=r/n*s,t.y=-a/n*s}export function sampleSwipe(t,e){if(null===t.touchId)return t.filtered.x=t.filtered.y=0,t.filterActive=!1,t.filtered;const o=Math.max(0,Math.min(.05,e)),r=1-Math.exp(-o/.035);t.filtered.x+=(t.x-t.filtered.x)*r,t.filtered.y+=(t.y-t.filtered.y)*r;const a=Math.hypot(t.filtered.x,t.filtered.y);return a>=MOVEMENT_START?t.filterActive=!0:a<MOVEMENT_STOP&&(t.filterActive=!1),t.filterActive?t.filtered:STILL}const STILL={x:0,y:0};export function endSwipe(t,e,o=0){const r=t.contacts.get(e.identifier),a=r?o-r.time:1/0,n=!!r&&!r.dragged&&a>=0&&a<=280&&Math.hypot(e.pageX-r.x,e.pageY-r.y)<=8;return t.contacts.delete(e.identifier),e.identifier===t.touchId&&stopMovement(t),n}export const FOLLOW_OFFSET=[0,.8,4.1];const HEAD_HEIGHT=HUMAN_CAMERA_HEIGHT;export function createNatureCamera(t,e,o=0,r){const a={eye:[0,0,0],target:[0,0,0],fov:.95,follow:{target:t,offset:FOLLOW_OFFSET,smoothing:.045}};return resetNatureCamera(a,e,o,r),a}export function updateNatureCamera(t,e,o,r,a=0){if(!t.follow)return;const n=-Math.sin(e),i=-Math.cos(e);let s=FOLLOW_OFFSET[2],f=FOLLOW_OFFSET[1];if(o&&r){const t=groundHeight(o,r.x,r.z),e=caveAt(o,r.x,r.z);for(e&&(f=.65);s>=1.5;s-=.25){let a=!0,l=f;for(let e=1;e<=12;e++){const u=e/12,p=r.x+n*s*u,d=r.z+i*s*u;l=Math.max(l,(groundHeight(o,p,d)+.6-t-HEAD_HEIGHT)/u);const x=toLocal(o,p,d);for(const e of o.landscape.caves){const o=Math.abs(x.x-e.x),r=o<5.8&&Math.abs(x.z-e.z)<=e.length/2+.1,n=t+HEAD_HEIGHT+f*u;r&&n<e.y+7&&(o>2.8||n>e.y+4.7*Math.sqrt(Math.max(0,1-(o/3.5)**2))-.35)&&(a=!1)}const h=t+HEAD_HEIGHT+f*u;solidClearance(o.obstacleCells,p,d,.35,h-.35,h+.35)<0&&(a=!1)}if(e&&l>f+.1&&(a=!1),a){f=Math.min(5,l);break}}}if(a>0){const e=t.follow.offset,l=Math.hypot(e[0],e[2]),u=s<l?.055:.2;if(s=l+(s-l)*(1-Math.exp(-a/u)),f=e[1]+(f-e[1])*(1-Math.exp(-a/.12)),o&&r){const t=groundHeight(o,r.x,r.z);f=Math.max(f,groundHeight(o,r.x+n*s,r.z+i*s)+.35-t-HEAD_HEIGHT)}}t.follow.offset=[n*s,f,i*s]}export function resetNatureCamera(t,e,o=0,r){updateNatureCamera(t,o,r,e);const a=(r?groundHeight(r,e.x,e.z):0)+HEAD_HEIGHT,n=t.follow?.offset??FOLLOW_OFFSET;t.target=[e.x,a,e.z],t.eye=[e.x+n[0],a+n[1],e.z+n[2]],t.shake=0}export function explorerRelativeInput(t,e,o){if(Math.hypot(t.x,t.y)<=MOVEMENT_STOP)return o.active=!1,t;!o.active&&(o.yaw=e,o.active=!0);const r=Math.sin(o.yaw),a=Math.cos(o.yaw);return{...t,x:-a*t.x+r*t.y,y:-r*t.x-a*t.y}}const CONTACTS={walk:[.44,.94],run:[.22,.72]};export function createFootsteps(t){let e=null,o=0,r=0;const a=()=>{t.stop(e),e=null,o=0};return{stop:a,update(n,i){o=Math.max(0,o-Math.max(0,Math.min(.05,i)));const{animation:s,from:f,to:l,speed:u,audible:p}=n;if(!p||u<.15||"walk"!==s&&"run"!==s)return void a();if(f===l||o>0)return;const d=CONTACTS[s].findIndex(t=>f<l?t>f&&t<=l:t>f||t<=l);if(d<0)return;t.stop(e);const x="run"===s;e=t.play(x?"footstepRun":"footstepWalk",{volume:(x?.5:.35)*Math.min(1,u/(x?4:1.6)),pitch:[.97,1.02,1,1.04][r++%4],pan:0===d?-.06:.06}),o=.17}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{audio,effects,haptics,warmUpEngine,World}from"@nayan-ui/engine";import{playBankSound}from"../../services/SoundsService.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{ATTACK_COOLDOWN,HUMAN_CAMERA_HEIGHT,HUMAN_CLIP_TIME,HUMAN_GUARD_TIME,locomotionAnimation,MAX_HEALTH,sounds}from"./TreasureHuntConstants.js";import{createFootsteps,createNatureCamera,createSwipeInput,explorerRelativeInput,resetNatureCamera,resetSwipe,sampleSwipe,updateNatureCamera}from"./TreasureHuntControls.js";import{advanceHuman,placeHuman,playHuman,resetHuman,spawnHuman}from"./TreasureHuntModel.js";import{createState,groundHeight,peekNextMap,step,warmNextMap}from"./TreasureHuntRules.js";import{animateNature,placeRobot,spawnGem,spawnNature,spawnRobot,warmMapScenery}from"./TreasureHuntScene.js";export function createGame(e){warmUpEngine();const a=new World(6500);try{const t=createState(),n=spawnNature(a,t.map,e),o=spawnHuman(a,[t.player.x,groundHeight(t.map,t.player.x,t.player.z),t.player.z],e.human),s=a.spawn({mesh:"none",parent:o.root,position:[0,HUMAN_CAMERA_HEIGHT,0],pickable:!1}),r={get phase(){return"ready"===this.state.phase?"ready":"won"===this.state.phase||"lost"===this.state.phase?"over":"playing"},get score(){return this.state.score},get won(){return"won"===this.state.phase},onPhase:()=>{},world:a,assets:e,camera:createNatureCamera(s,t.player,t.yaw,t.map),movementReference:{active:!1,yaw:t.yaw},nature:n,state:t,human:o,footsteps:createFootsteps({play:(e,a)=>playBankSound(sounds,e,a)??null,stop:e=>audio.stop(e)}),swipe:createSwipeInput(),attackBuffer:0,enemies:new Map,gems:new Map,animationTime:0,combatTime:0,hudTime:0,nextRun:null,preparing:!1,prepareDelay:.3,onChange:()=>{}};return rebuildActors(r),r.nextRun=warmNextRun()[Symbol.iterator](),r}catch(e){throw a.dispose(),e}}function rebuildActors(e){clearInput(e),e.footsteps.stop();for(const a of e.enemies.values())e.world.despawn(a.root);for(const a of e.gems.values())e.world.despawn(a);e.enemies.clear(),e.gems.clear();for(const a of e.state.enemies)e.enemies.set(a.id,spawnRobot(e.world,a.x,groundHeight(e.state.map,a.x,a.z),a.z));syncGems(e),resetHuman(e.world,e.human),placeHuman(e.world,e.human,e.state.map,e.state.player,e.state.yaw),e.animationTime=0,e.combatTime=0,e.movementReference.active=!1,resetNatureCamera(e.camera,e.state.player,e.state.yaw,e.state.map)}function syncGems(e){for(const a of e.state.pickups)a.taken||e.gems.has(a.id)||e.gems.set(a.id,spawnGem(e.world,a.x,groundHeight(e.state.map,a.x,a.z),a.z))}export function start(e){e.world.isDisposed||e.preparing||"ready"!==e.state.phase||(e.state.phase="playing",e.prepareDelay=.3,clearInput(e),e.onPhase("playing"),e.onChange())}export function reset(e){e.world.isDisposed||e.preparing||(clearInput(e),e.footsteps.stop(),resetHuman(e.world,e.human),e.nextRun||peekNextMap()||(e.nextRun=warmNextRun()[Symbol.iterator]()),e.preparing=!0,e.prepareDelay=0,e.state.phase="ready",e.state.score=e.state.gems=e.state.defeated=0,e.state.health=MAX_HEALTH,e.onPhase("ready"),e.onChange())}function commitReset(e){e.nextRun?.return?.(),e.nextRun=null,e.state=createState(),e.world.despawn(e.nature.root),e.nature=spawnNature(e.world,e.state.map,e.assets),rebuildActors(e),e.hudTime=0,e.preparing=!1,e.prepareDelay=.3,e.nextRun=warmNextRun()[Symbol.iterator](),e.onPhase("ready"),e.onChange()}function*warmNextRun(){yield*warmNextMap();const e=peekNextMap();e&&(yield*warmMapScenery(e))}function prepareNextRun(e,a){if(!e.nextRun||a<=0)return;if(e.prepareDelay=Math.max(0,e.prepareDelay-a),e.prepareDelay>0)return;const t=performance.now()+4;for(let a=0;a<32&&e.nextRun;a++){const a=e.nextRun.next();if(a.done){e.nextRun=null,e.preparing&&commitReset(e);break}if(a.value(),performance.now()>=t)break}}function feedback(e,a){const{world:t,human:n}=e,o=groundHeight(e.state.map,a.x,a.z),s=[a.x,o+.9,a.z];switch(a.kind){case"attack":{const a="combatIdle"===n.animation||"punchStart"===n.animation||"punchRight"===n.animation||"punchLeft"===n.animation;a||(n.strikes=0);const o=a?n.strikes%2==0?"punchRight":"punchLeft":"punchStart";n.strikes++,playHuman(t,n,o),e.combatTime=HUMAN_GUARD_TIME,e.animationTime=HUMAN_CLIP_TIME.punchRight,playBankSound(sounds,"punch",{volume:.35,pitch:1.2});break}case"hit":case"defeated":{playBankSound(sounds,"defeated"===a.kind?"defeat":"impact",{volume:.5});const n=e.state.player.x-a.x,r=e.state.player.z-a.z,i=Math.hypot(n,r)||1;if(effects.sparks(t,{position:[a.x+n/i*.2,o+1.45,a.z+r/i*.2],colors:[[1.8,.65,.4,1],[1,1.5,2,1]],count:12,size:.1,speed:4,lifetime:.3}),haptics.impact("defeated"===a.kind?.8:.45),"defeated"===a.kind&&void 0!==a.id){const n=e.enemies.get(a.id);n&&(e.enemies.delete(a.id),popAndBurst(t,n.root,{scale:1,color:[1,.4,.48,1],duration:.3},{position:s,size:1.2,color:[1,.4,.48,1]}).then(()=>t.despawn(n.root)))}break}case"gem":{const n=void 0===a.id?void 0:e.gems.get(a.id);void 0!==n&&popAndBurst(t,n,{scale:.7,color:[.92,1.02,1.12,1],duration:.2},{position:s,size:.6,color:[.92,1.02,1.12,1],count:7}).then(()=>{t.despawn(n),e.gems.get(a.id)===n&&e.gems.delete(a.id)}),playBankSound(sounds,"gem",{volume:.55}),haptics.selection();break}case"hurt":playHuman(t,n,"hit"),e.animationTime=HUMAN_CLIP_TIME.hit,e.camera.shake=.25,playBankSound(sounds,"hurt",{volume:.5}),haptics.impact(.9);break;case"won":e.state.yaw=0,playHuman(t,n,"celebrate"),effects.confetti(t,{position:[a.x,o+2,a.z],colors:[[.4,1.5,1.8,1],[1.8,1.2,.3,1],[1.5,.4,.8,1]],size:.17,speed:6,count:60,lifetime:2,gravity:-3}),playBankSound(sounds,"win"),haptics.notify("success"),e.onPhase("over");break;case"lost":playHuman(t,n,"fall"),haptics.notify("error"),e.onPhase("over")}}export function clearInput(e){resetSwipe(e.swipe),e.attackBuffer=0}export function punch(e){"playing"===e.state.phase&&(e.attackBuffer=ATTACK_COOLDOWN+.1)}export function update(e,a){const t=Math.max(0,Math.min(.05,a)),n=e.attackBuffer>0,o=t>0&&"playing"===e.state.phase&&e.state.attackCooldown<=t,s=sampleSwipe(e.swipe,t);tick(e,{x:s.x,y:s.y,attack:n},a),e.attackBuffer=n&&o?0:Math.max(0,e.attackBuffer-t)}export function tick(e,a,t){if(e.world.isDisposed)return;const n=Math.min(.05,Math.max(0,t));if(e.preparing)return e.world.update(0),!e.nextRun&&n>0?commitReset(e):prepareNextRun(e,n),void(e.preparing||e.world.update(0));const o=step(e.state,explorerRelativeInput(a,e.state.yaw,e.movementReference),n),{state:s,world:r}=e;for(const a of o)feedback(e,a);if(updateNatureCamera(e.camera,s.yaw,s.map,s.player,n),syncGems(e),e.animationTime=Math.max(0,e.animationTime-n),e.combatTime=Math.max(0,e.combatTime-n),"playing"===s.phase&&0===e.animationTime)if(e.combatTime>0&&s.speed<.05)playHuman(r,e.human,"combatIdle");else if("combatIdle"===e.human.animation&&s.speed<.05)playHuman(r,e.human,"combatExit"),e.animationTime=HUMAN_CLIP_TIME.combatExit,e.human.strikes=0;else{const a=locomotionAnimation(s.speed,e.human.animation);playHuman(r,e.human,a,"run"===a?s.speed/4:"walk"===a?s.speed/1.6:1)}const i=r.transforms;placeHuman(r,e.human,s.map,s.player,s.yaw,n,i);for(const a of s.enemies){const t=e.enemies.get(a.id);t&&placeRobot(r,t,a.x,a.z,groundHeight(s.map,a.x,a.z),a.yaw,a.windup,a.stagger,a.moving,s.time,i)}i.flush(),animateNature(r,e.nature,n);const p=e.human.phase;r.update(n),advanceHuman(e.human,n),e.footsteps.update({animation:e.human.animation,from:p,to:e.human.phase,speed:s.speed,audible:"playing"===s.phase&&!audio.muted},n),e.hudTime+=n,(o.length||e.hudTime>=.12)&&(e.hudTime=0,e.onChange()),prepareNextRun(e,n)}export function dispose(e){clearInput(e),e.nextRun?.return?.(),e.nextRun=null,e.footsteps.stop(),e.world.dispose()}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{CAVE_INNER_HEIGHT,CAVE_INNER_WIDTH,caveClearance,hillRise,landscapeFor,random,riverWidth,riverX,ROCK_RINGS,ROCK_SIDES,rockSurface,TERRAIN_EDGE,TERRAIN_GRID,terrainHeight,terrainMeshHeight,terrainSurface,waterLevel}from"./TreasureHuntRules.js";export function humanSupportHeight(e,t,r=!0){const n=r?Math.max(0,Math.min(e[0][1],e[1][1])):0;return Math.max(t[0]-e[0][1],t[1]-e[1][1])+n}class Mesh{vertices=[];indices=[];vertex(e,t,r,n=[1,1,1]){const o=this.vertices.length/11;return this.vertices.push(...e,...t,n[0],n[1],n[2],...r),o}quad(e,t,r,n,o=!1){this.indices.push(e,t,r,e,r,n),o&&this.indices.push(r,t,e,n,r,e)}geometry(){return{vertices:new Float32Array(this.vertices),indices:new Uint32Array(this.indices)}}}export function contactShadowGeometry(){const e=new Mesh,t=e.vertex([0,0,0],[0,1,0],[.5,.5]);for(let r=0;r<=32;r++){const n=r/32*Math.PI*2;e.vertex([Math.cos(n),0,Math.sin(n)],[0,1,0],[(Math.cos(n)+1)/2,(Math.sin(n)+1)/2]),r>0&&e.indices.push(t,r+1,r)}return e.geometry()}export function diamondGeometry(){const e=new Mesh,t=(e,t,r,n=0)=>Array.from({length:e},(o,s)=>{const i=s/e*Math.PI*2+n;return[Math.cos(i)*t,r,Math.sin(i)*t]}),r=t(8,.25,.34),n=t(8,.365,.245,Math.PI/8),o=t(16,.52,.085),s=t(16,.52,.055),i=t(8,.3,-.23,Math.PI/8),a=[0,-.6,0],h=[[.88,.97,1.08],[.55,.75,.89],[1.12,1.17,1.2],[.74,.86,.98]],l=[[.46,.64,.81],[.98,1.08,1.17],[.7,.87,1.03],[1.16,1.2,1.24]],u=(t,r)=>{const n=t[0],o=t[1],s=t[2],i=[o[0]-n[0],o[1]-n[1],o[2]-n[2]],a=[s[0]-n[0],s[1]-n[1],s[2]-n[2]],h=[i[1]*a[2]-i[2]*a[1],i[2]*a[0]-i[0]*a[2],i[0]*a[1]-i[1]*a[0]],l=t.reduce((e,r)=>[e[0]+r[0]/t.length,e[1]+r[1]/t.length,e[2]+r[2]/t.length],[0,0,0]),u=h[0]*l[0]+h[1]*(l[1]+.1)+h[2]*l[2]<0,f=Math.hypot(...h)*(u?-1:1);h[0]/=f,h[1]/=f,h[2]/=f;const M=t.map(t=>e.vertex(t,h,[t[0]+.5,t[2]+.5],r));for(let t=1;t<M.length-1;t++)e.indices.push(M[0],M[u?t+1:t],M[u?t:t+1])};u(r,[1.03,1.1,1.16]);for(let e=0;e<8;e++){const t=(e+1)%8,f=(e+7)%8,M=2*e,x=M+1,d=(M+2)%16;u([r[e],r[t],n[e]],h[e%4]),u([r[e],n[e],o[M],n[f]],h[(e+2)%4]),u([n[e],o[M],o[x]],h[(e+1)%4]),u([n[e],o[x],o[d]],h[(e+3)%4]),u([a,i[f],s[M],i[e]],l[e%4]),u([i[e],s[M],s[x]],l[(e+2)%4]),u([i[e],s[x],s[d]],l[(e+1)%4])}for(let e=0;e<16;e++)u([o[e],s[e],s[(e+1)%16],o[(e+1)%16]],[.83,.94,1.04]);return e.geometry()}export function terrainGeometry(e){const t=terrainGeometrySteps(e);let r=t.next();for(;!r.done;)r=t.next();return r.value}export function*terrainGeometrySteps(e){const t=landscapeFor(e),r=new Mesh,n={meadow:[],stone:[],shore:[]},o=TERRAIN_GRID.length-1,s=e=>{if(void 0!==e.index)return e.index;const{x:n,z:o}=e,s=terrainMeshHeight(t,n,o),i=(terrainHeight(t,n+.15,o)-terrainHeight(t,n-.15,o))/.3,a=(terrainHeight(t,n,o+.15)-terrainHeight(t,n,o-.15))/.3,h=Math.hypot(i,1,a),l=.87+.09*Math.sin(.13*n+Math.sin(.1*o));return e.index=r.vertex([n,s,o],[-i/h,1/h,-a/h],[n/3,o/3],[l,l,.95*l]),e.index},i=[];for(let e=0;e<=o;e++){for(let t=0;t<=o;t++){const r={x:TERRAIN_GRID[t],z:TERRAIN_GRID[e]};s(r),i.push(r)}e%2==1&&(yield)}const a=(e,t)=>{if(e.length<3)return;const r=e.map(s);for(let n=1;n<r.length-1;n++){const o=e[0],s=e[n],i=e[n+1];Math.abs((s.x-o.x)*(i.z-o.z)-(s.z-o.z)*(i.x-o.x))>1e-8&&t.push(r[0],r[n],r[n+1])}},h=(e,t)=>{const r=[],n=[];for(let o=0;o<e.length;o++){const s=e[o],i=e[(o+1)%e.length],a=t(s),h=t(i);if((a<=0?r:n).push(s),a<=0!=h<=0){let e=0,o=1;for(let r=0;r<10;r++){const r=(e+o)/2;t({x:s.x+(i.x-s.x)*r,z:s.z+(i.z-s.z)*r})<=0==a<=0?e=r:o=r}const h=(e+o)/2,l={x:s.x+(i.x-s.x)*h,z:s.z+(i.z-s.z)*h};r.push(l),n.push(l)}}return[r,n]},l=e=>{const r=e.map(e=>i[e]),o=r.map(e=>terrainSurface(t,e.x,e.z));if(o.every(e=>e===o[0]))return void a(r,(s=o[0],"grass"===s?n.meadow:"hill"===s||"cave"===s?n.stone:n.shore));var s;const l=e=>Math.abs(e.x-riverX(t,e.z))-riverWidth(t,e.z),[u,f]=h(r,l);a(u,n.shore);const[M,x]=h(f,e=>l(e)-1.4);a(M,n.shore);const[d,v]=h(x,e=>caveClearance(t,e.x,e.z));a(d,n.stone);const[m,p]=h(v,e=>hillRise(t,e.x,e.z)-.35);a(m,n.meadow),a(p,n.stone)};for(let e=0;e<o;e++){for(let t=0;t<o;t++){const r=e*(o+1)+t,n=r+o+1;l([r,n,r+1]),l([r+1,n,n+1])}e%2==1&&(yield)}const u=new Float32Array(r.vertices),f=e=>{const t=new Int32Array(u.length/11).fill(-1),r=[],n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const s=e[o];let i=t[s];if(i<0){i=r.length/11,t[s]=i;for(let e=0;e<11;e++)r.push(u[11*s+e])}n[o]=i}return{vertices:new Float32Array(r),indices:n}},M=f(n.meadow);yield;const x=f(n.stone);return yield,{meadow:M,stone:x,shore:f(n.shore)}}export function riverGeometry(e){const t=new Mesh;for(let r=0;r<=512;r++){const n=r*TERRAIN_EDGE*2/512-TERRAIN_EDGE;for(let r=0;r<=8;r++){const o=r/8*2-1,s=riverX(e,n)+o*riverWidth(e,n),i=waterLevel(e,n)+.04,a=Math.abs(o),h=.015*Math.sin(4.7*n+8*o),l=.86+.12*Math.sin(2.2*n+17*o);t.vertex([s,i+h*(1-a),n],[0,1,0],[r/8,.3*n],[.18*l+.15*a,.48*l+.2*a,.49*l+.2*a])}}for(let e=0;e<512;e++)for(let r=0;r<8;r++){const n=9*e+r,o=n+8+1;t.quad(n,o,o+1,n+1,!0)}return t.geometry()}export function caveGeometry(){const e=new Mesh,t=28,r=r=>{const n=e.vertices.length/11;for(let n=0;n<=12;n++)for(let o=0;o<=t;o++){const s=o/t*Math.PI,i=n/12*20-10,a=r?1+.045*Math.sin(2.1*o+1.7*n):1+.025*Math.sin(1.6*o+2*n),h=r?5.8:CAVE_INNER_WIDTH,l=r?7:CAVE_INNER_HEIGHT,u=r?1:-1;e.vertex([Math.cos(s)*h*a,Math.sin(s)*l*a-.12,i],[Math.cos(s)*u,Math.sin(s)*u,0],[o/t*4,i/3],r?[.9,.92,.86]:[.48,.54,.49])}for(let r=0;r<12;r++)for(let o=0;o<t;o++){const s=n+29*r+o,i=s+t+1;e.quad(s,s+1,i+1,i,!0)}return n},n=r(!0),o=r(!1);for(const r of[0,12])for(let s=0;s<t;s++){const t=n+29*r+s,i=o+29*r+s,a=[t,t+1,i+1,i].map(t=>{const n=11*t,o=e.vertices[n],s=e.vertices[n+1],i=e.vertices[n+2];return e.vertex([o,s,i],[0,0,0===r?-1:1],[o/3,s/3],[.78,.82,.76])});e.quad(a[0],a[1],a[2],a[3],!0)}return e.geometry()}export function boulderGeometry(e){const t=new Mesh,r=ROCK_RINGS,n=ROCK_SIDES;for(let o=0;o<=r;o++)for(let s=0;s<=n;s++){const{position:i,normal:a}=rockSurface(e,s/n*Math.PI*2,o/r*Math.PI);t.vertex(i,a,[s/n*2,o/r],[.86,.89,.82])}for(let e=0;e<r;e++)for(let r=0;r<n;r++){const o=e*(n+1)+r,s=o+n+1;t.quad(o,o+1,s+1,s,!0)}return t.geometry()}export function foliageGeometry(e,t){const r=random(173+67*t+(e?3:0)),n=new Mesh,o=e?74:56;for(let t=0;t<o;t++){const s=2.399*t+r(),i=t/o,a=e?4.8+4.5*i:5.3+2.7*r(),h=e?2.6*(1-.83*i):.5+2*r(),l=[Math.cos(s)*h*.7,a,Math.sin(s)*h*.7],u=e?1.6*h:1.8+r(),f=e?1.2:1.6+r(),M=e?.3+.3*r():1.6*r()-.8,x=[Math.cos(s)*u/2,0,Math.sin(s)*u/2],d=[-Math.sin(s)*f*Math.cos(M)/2,Math.sin(M)*f/2,Math.cos(s)*f*Math.cos(M)/2],v=.7+.32*r(),m=[[-1,-1,0,1],[1,-1,1,1],[1,1,1,0],[-1,1,0,0]].map(([e,t,r,o])=>n.vertex([l[0]+x[0]*e+d[0]*t,l[1]+d[1]*t,l[2]+x[2]*e+d[2]*t],[0,.9,.25],[r,o],[v,v,v]));n.quad(m[0],m[1],m[2],m[3],!0)}return n.geometry()}export function grassGeometry(e){const t=random(e+543),r=new Mesh;for(let e=0;e<24;e++){const e=1.8*(t()-.5),n=1.8*(t()-.5),o=.12+.26*t(),s=t()*Math.PI*2,i=.008*Math.cos(s),a=.008*Math.sin(s),h=[.3+.16*t(),.4+.2*t(),.12+.1*t()],l=r.vertex([e-i,0,n-a],[0,1,0],[0,0],h),u=r.vertex([e+i,0,n+a],[0,1,0],[1,0],h),f=r.vertex([e+.06,o,n+.025],[0,1,0],[.5,1],h);r.indices.push(l,u,f,f,u,l)}return r.geometry()}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{lathe,loadModel,loadTexture,merge,quat,shapeGeometry,tube}from"@nayan-ui/engine";import _0x7006aa from"../../assets/models/explorer/source.json";import{cacheGameAsset,createGameMesh as _0x560d45}from"../shared/EngineMeshes.js";import{HUMAN_CLIPS,HUMAN_HEIGHT,HUMAN_LOOPS,locomotionRate}from"./TreasureHuntConstants.js";import{contactShadowGeometry,humanSupportHeight}from"./TreasureHuntMeshes.js";import{groundHeight,groundTilt,toWorld}from"./TreasureHuntRules.js";let humanAssetsLoading;export function loadHumanAssets(){return humanAssetsLoading??=(async()=>{const[e,t]=await Promise.all([loadModel(require("../../assets/models/explorer/explorer.glb"),{center:!1,fit:HUMAN_HEIGHT,shine:.055}),loadTexture(require("../../assets/textures/explorer-atlas.png"))]);if(!e.jointCount||Object.keys(HUMAN_CLIPS).some(t=>!e.animations.some(e=>e.name===t)))throw Error("The explorer is missing its native skeletal animation clips");return{model:e,atlas:t,soleIndices:new Uint32Array(_0x7006aa.soleVertices.flat()),supportIndices:new Uint32Array([..._0x7006aa.soleVertices.flat(),..._0x7006aa.bodyContactVertices]),leftCount:_0x7006aa.soleVertices[0].length}})().catch(e=>{throw humanAssetsLoading=void 0,e}),humanAssetsLoading}export function spawnHuman(e,t,o){const a=e.spawn({mesh:"none",position:t,pickable:!1});return{root:a,body:e.spawn({mesh:o.model,texture:o.atlas,parent:a,pickable:!1}),animation:null,rate:1,strikes:0,phase:0,indices:o.soleIndices,supportIndices:o.supportIndices,samples:new Float32Array(3*o.supportIndices.length),leftCount:o.leftCount,soles:[[0,0,0],[0,0,0]],shadows:[spawnContactShadow(e,a),spawnContactShadow(e,a)]}}export function placeHuman(e,t,o,a,s,r=0,n){const i="fall"===t.animation;if(!e.sampleSkinnedVertices(t.body,i?t.supportIndices:t.indices,t.samples,r))return;for(let e=0;e<2;e++){const o=0===e?0:t.leftCount,a=0===e?t.leftCount:t.indices.length;let s=1/0,r=0,n=0,i=0;for(let e=o;e<a;e++)s=Math.min(s,t.samples[3*e+1]);for(let e=o;e<a;e++)t.samples[3*e+1]<=s+.008&&(r+=t.samples[3*e],n+=t.samples[3*e+2],i++);t.soles[e][0]=r/i,t.soles[e][1]=s,t.soles[e][2]=n/i}const l=t.soles,p=l.map(e=>{const t=toWorld({rotation:s},e[0],e[2]);return groundHeight(o,a.x+t.x,a.z+t.z)});let h=humanSupportHeight(l,[p[0],p[1]],"run"===t.animation);if(i)for(let e=t.indices.length;e<t.supportIndices.length;e++){const r=3*e,n=toWorld({rotation:s},t.samples[r],t.samples[r+2]);h=Math.max(h,groundHeight(o,a.x+n.x,a.z+n.z)-t.samples[r+1])}(n??e).set(t.root,{position:[a.x,h,a.z],rotation:quat.y(s)}),l.forEach((r,i)=>{const l=toWorld({rotation:s},r[0],r[2]),m=Math.max(0,h+r[1]-p[i]);placeContactShadow(e,t.shadows[i],[r[0],p[i]-h+.006,r[2]],groundTilt(o,a.x+l.x,a.z+l.z,s),.11+.08*m,.19+.1*m,.09*Math.exp(6*-m),n)})}export function playHuman(e,t,o,a=1){const s=t.animation===o&&HUMAN_LOOPS.has(o),r=locomotionRate(a,s?t.rate:void 0);s&&t.rate===r||(s||(t.phase=0),t.animation=o,t.rate=r,e.playClip(t.body,o,{loop:HUMAN_CLIPS[o].loop,speed:r,fade:"hit"===o?.04:.08,...s?{}:{time:0}}))}export function resetHuman(e,t){t.animation="idle",t.rate=0,t.strikes=0,t.phase=0,e.playClip(t.body,"idle",{loop:!0,speed:0,time:0,fade:0})}export function advanceHuman(e,t){if(!e.animation)return;const o=HUMAN_CLIPS[e.animation],a=e.phase+t*e.rate/o.duration;e.phase=o.loop?a%1:Math.min(1,a)}const STEEL=[.48,.56,.59],ARMOR=[.31,.39,.42],DARK=[.065,.09,.105],CHROME=[.72,.76,.74],AMBER=[.9,.43,.11],part=(e,t,o,a,s)=>({geometry:shapeGeometry(e),position:t,scale:o,color:a,rotation:s}),box=(e,t,o)=>part("roundedBox",e,t,o),bolt=(e,t,o)=>part("sphere",[e,t,o],[.035,.035,.025],CHROME),make=(e,t=.45)=>_0x560d45(merge(e),{center:!1,shine:t});let cached,disc;function prepareRobot(){return cacheGameAsset("treasure-hunt/TreasureHuntModel:prepareRobot",()=>prepareRobotUncached())}function prepareRobotUncached(){if(cached)return cached;const e=[{geometry:lathe([[.21,.88],[.29,.94],[.36,1.22],[.32,1.38],[.19,1.43]],{segments:12,color:ARMOR}),scale:[1,1,.62]},part("cylinder",[0,1.06,0],[.22,.7,.22],DARK),box([0,1.23,.21],[.46,.3,.065],STEEL),box([0,.97,.15],[.37,.16,.055],ARMOR),box([0,1.18,-.21],[.38,.4,.18],DARK),part("cylinder",[0,1.49,0],[.17,.15,.17],CHROME),part("torus",[0,1.27,.255],[.17,.17,.05],CHROME,quat.x(Math.PI/2)),part("sphere",[0,1.27,.28],[.105,.105,.035],[2,.52,.12])];for(const t of[-1,1]){e.push(part("sphere",[.37*t,1.36,0],[.21,.23,.24],DARK),part("cylinder",[.22*t,1.25,-.27],[.105,.44,.105],STEEL)),e.push({geometry:tube([[.26*t,.94,.12],[.31*t,1.03,.15],[.35*t,1.24,.1]],{radius:.018,sides:6,color:AMBER})});for(const o of[1.11,1.34])e.push(bolt(.195*t,o,.255));for(let o=0;o<4;o++)e.push(box([.15*t,1.13+.035*o,.249],[.095,.012,.018],DARK))}const t=[box([0,1.7,0],[.45,.31,.35],STEEL),box([0,1.52,.025],[.36,.1,.29],ARMOR),box([0,1.7,.178],[.34,.175,.028],DARK),box([0,1.845,0],[.28,.035,.2],ARMOR),box([0,1.58,.17],[.17,.025,.025],DARK)];for(const e of[-1,1])t.push(part("sphere",[.084*e,1.718,.202],[.072,.065,.036],[2,.17,.07]),part("torus",[.084*e,1.718,.195],[.095,.095,.035],CHROME,quat.x(Math.PI/2)),bolt(.18*e,1.79,.172),bolt(.18*e,1.6,.172)),t.push(part("cylinder",[.24*e,1.7,0],[.06,.14,.13],DARK));t.push({geometry:tube([[.18,1.82,-.03],[.21,1.99,-.05],[.18,2.05,-.05]],{radius:.012,sides:6,color:STEEL})},part("sphere",[.18,2.05,-.05],[.035,.035,.035],[1.7,.18,.1]));const o=[part("sphere",[0,0,0],[.2,.2,.21],CHROME),part("cylinder",[0,-.17,0],[.11,.31,.12],DARK),box([0,-.15,.045],[.18,.26,.16],ARMOR),part("cylinder",[0,-.29,0],[.14,.1,.15],CHROME)];for(const e of[-1,1])o.push(part("cylinder",[.06*e,-.16,-.05],[.025,.25,.025],CHROME),bolt(.055*e,-.09,.128));const a=[part("sphere",[0,0,0],[.13,.13,.14],DARK),box([0,-.16,.015],[.17,.28,.19],STEEL),box([0,-.2,.12],[.1,.12,.025],ARMOR),part("cylinder",[0,-.31,0],[.09,.06,.1],CHROME),box([0,-.36,.02],[.16,.1,.14],DARK)];for(const e of[-1,1])a.push(box([.063*e,-.42,.045],[.043,.12,.07],STEEL),box([.063*e,-.47,.08],[.044,.05,.1],CHROME),bolt(.053*e,-.1,.12));const s=[part("sphere",[0,0,0],[.19,.2,.19],DARK),part("cylinder",[0,-.18,0],[.115,.34,.12],CHROME),box([0,-.17,.045],[.19,.26,.16],ARMOR),box([0,-.13,.13],[.085,.11,.025],AMBER),part("sphere",[0,-.34,.01],[.19,.17,.2],DARK)],r=[part("sphere",[0,0,0],[.16,.16,.17],CHROME),box([0,-.16,.02],[.17,.29,.17],ARMOR),part("cylinder",[0,-.2,-.055],[.075,.33,.075],DARK),box([0,-.405,.075],[.23,.12,.35],DARK),box([0,-.365,.12],[.23,.07,.24],STEEL)];for(const e of[-1,1])r.push(part("cylinder",[.083*e,-.16,.015],[.026,.28,.026],CHROME),bolt(.075*e,-.04,.1),bolt(.08*e,-.36,.24));return cached={chassis:make(e),head:make(t,.6),arm:make(o),forearm:make(a,.6),thigh:make(s),shin:make(r,.6)},cached}export function spawnRobot(e,t,o,a){const s=prepareRobot(),r=e.spawn({mesh:"none",position:[t,o,a],pickable:!1}),n=(t,o,a)=>e.spawn({mesh:t,parent:o,position:a,pickable:!1}),i=n(s.chassis,r,[0,0,0]),l=n(s.head,r,[0,0,0]),p=n(s.arm,r,[-.41,1.38,0]),h=n(s.arm,r,[.41,1.38,0]),m=n(s.forearm,p,[0,-.31,0]),u=n(s.forearm,h,[0,-.31,0]),d=n(s.thigh,r,[-.2,.86,0]),R=n(s.thigh,r,[.2,.86,0]),f=n(s.shin,d,[0,-.34,0]),x=n(s.shin,R,[0,-.34,0]);return{root:r,warning:e.spawn({mesh:"torus",parent:r,position:[0,.04,0],scale:0,color:[2,.24,.12,1],pickable:!1}),chassis:i,head:l,armL:p,armR:h,elbowL:m,elbowR:u,legL:d,legR:R,kneeL:f,kneeR:x,motion:null,colorState:null,warningVisible:!1,pose:[NaN,NaN,NaN,NaN]}}function animateRobot(e,t,o){if(t.motion===o)return;t.motion=o;const a=[t.armL,t.armR,t.elbowL,t.elbowR,t.legL,t.legR,t.kneeL,t.kneeR];for(const t of a)e.stopAnimation(t);if("walk"===o)for(const[o,a,s,r,n]of[[t.legL,t.kneeL,t.armL,t.elbowL,1],[t.legR,t.kneeR,t.armR,t.elbowR,-1]]){const t=[0,.25,.5,.75,1];e.animate(o,t.map(e=>({at:e,rotation:quat.x(Math.sin(e*Math.PI*2)*n*.3)})),{duration:.85,repeat:"forever",easing:"linear"}),e.animate(a,t.map(e=>({at:e,rotation:quat.x(.46*Math.max(0,Math.sin(e*Math.PI*2)*n))})),{duration:.85,repeat:"forever",easing:"linear"}),e.animate(s,t.map(e=>({at:e,rotation:quat.x(-Math.sin(e*Math.PI*2)*n*.25)})),{duration:.85,repeat:"forever",easing:"linear"}),e.animate(r,{rotation:quat.x(-.16)},{duration:.12})}else for(const s of a)e.animate(s,{rotation:quat.x("attack"===o?s===t.armL||s===t.armR?-.9:s===t.elbowL||s===t.elbowR?-.8:0:"stagger"===o?.12:0)},{duration:.15,easing:"easeOut"})}export function placeRobot(e,t,o,a,s,r,n,i,l,p,h){const m=h??e,u=t.pose;(u[0]!==o||u[1]!==s||u[2]!==a||u[3]!==r)&&(m.set(t.root,{position:[o,s,a],rotation:quat.y(r)}),u[0]=o,u[1]=s,u[2]=a,u[3]=r);const d=i>0?2:n>0?1:0;if(t.colorState!==d){const e=2===d?[1.8,1.8,1.8,1]:1===d?[1.25,1.05,.9,1]:[1,1,1,1];m.set(t.chassis,{color:e}),m.set(t.head,{color:e}),t.colorState=d}t.warningVisible!==n>0&&(m.set(t.warning,{scale:n>0?[3.5,.04,3.5]:0}),t.warningVisible=n>0),animateRobot(e,t,i>0?"stagger":n>0?"attack":l?"walk":"idle")}const shadowMesh=()=>cacheGameAsset("treasure-hunt/TreasureHuntModel:shadowMesh",()=>disc??=_0x560d45(contactShadowGeometry(),{center:!1})),SPREAD=[1.8,1.3,.85];export function spawnContactShadow(e,t){return disc=shadowMesh(),SPREAD.map(()=>e.spawn({mesh:disc,parent:t,scale:0,color:[0,0,0,0],pickable:!1}))}export function placeContactShadow(e,t,o,a,s,r,n,i){t.forEach((t,l)=>(i??e).set(t,{position:[o[0],o[1]+.001*l,o[2]],rotation:a,scale:[s*SPREAD[l],1,r*SPREAD[l]],color:[0,0,0,n]}))}export function*warmAssets(){yield loadHumanAssets,yield prepareRobot,yield shadowMesh}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{ATTACK_COOLDOWN,ATTACK_HIT_TIME,ATTACK_RANGE,ENEMY_COUNT,GEM_GOAL,HUMAN_HEIGHT,MAX_HEALTH,MINIMAP_SIZE,MOVEMENT_START,MOVEMENT_STOP,PLAYER_RADIUS,PLAYER_SPEED,POINTS_GEM,POINTS_HEALTH_BONUS,POINTS_ROBOT_DEFEAT,POINTS_ROBOT_HIT,TERRAIN_PROFILES,WORLD_EDGE}from"./TreasureHuntConstants.js";export const SOLID_CELL=8;const INDEX_MARGIN=1.5;export const ROCK_RINGS=12;export const ROCK_SIDES=18;export const CAVE_INNER_WIDTH=3.5;export const CAVE_INNER_HEIGHT=4.8;export const BRIDGE_RAIL_INSET=.15;export const BRIDGE_RAIL_DEPTH=.09;export const BRIDGE_POST_WIDTH=.3;export const BRIDGE_POST_HEIGHT=1.12;export function rockSurface(t,e,a){const o=1+.12*Math.sin(3*e+5*a+t)+.05*Math.cos(7*e-3*a),n=[Math.sin(a)*Math.cos(e),Math.cos(a),Math.sin(a)*Math.sin(e)];return{position:[n[0]*o,Math.max(-.2,n[1]*o*.8+.45),n[2]*o*.9],normal:n}}const rockHulls=new Map;function rockHull(t){const e=rockHulls.get(t);if(e)return e;const a=[];let o=1/0,n=-1/0;for(let e=0;e<=12;e++)for(let r=0;r<18;r++){const{position:[i,s,l]}=rockSurface(t,r/18*Math.PI*2,e/12*Math.PI);a.push({x:i,z:l}),o=Math.min(o,s),n=Math.max(n,s)}a.sort((t,e)=>t.x-e.x||t.z-e.z);const r=(t,e,a)=>(e.x-t.x)*(a.z-t.z)-(e.z-t.z)*(a.x-t.x),i=t=>{const e=[];for(const a of t){for(;e.length>1&&r(e[e.length-2],e[e.length-1],a)<=0;)e.pop();e.push(a)}return e.pop(),e},s={points:[...i(a),...i([...a].reverse())],bottom:o,top:n};return rockHulls.set(t,s),s}export function circleSolid(t,e,a,o,n,r){return{shape:"circle",tag:t,x:e,z:a,radius:o,bottom:n,top:r,minX:e-o,maxX:e+o,minZ:a-o,maxZ:a+o}}function polygonSolid(t,e,a,o,n,r){return{shape:"polygon",tag:t,x:e,z:a,points:o,bottom:n,top:r,minX:Math.min(...o.map(t=>t.x)),maxX:Math.max(...o.map(t=>t.x)),minZ:Math.min(...o.map(t=>t.z)),maxZ:Math.max(...o.map(t=>t.z))}}export function boxSolid(t,e,a,o,n,r,i,s){const l=Math.cos(r),h=Math.sin(r),p=[[-o,-n],[o,-n],[o,n],[-o,n]].map(([t,o])=>({x:e+l*t+h*o,z:a-h*t+l*o}));return polygonSolid(t,e,a,p,i,s)}export function rockSolid(t,e,a,o,n,r){const i=rockHull(r),s=Math.cos(n),l=Math.sin(n),h=i.points.map(e=>({x:t+s*e.x*o[0]+l*e.z*o[2],z:a-l*e.x*o[0]+s*e.z*o[2]}));return polygonSolid("rock",t,a,h,e+i.bottom*o[1],e+i.top*o[1])}export function solidDistance(t,e,a){if("circle"===t.shape)return Math.hypot(e-t.x,a-t.z)-t.radius;let o=1/0,n=!0;for(let r=0;r<t.points.length;r++){const i=t.points[r],s=t.points[(r+1)%t.points.length],l=s.x-i.x,h=s.z-i.z,p=l*l+h*h;l*(a-i.z)-h*(e-i.x)<-1e-10&&(n=!1);const x=Math.max(0,Math.min(1,((e-i.x)*l+(a-i.z)*h)/p));o=Math.min(o,(e-i.x-l*x)**2+(a-i.z-h*x)**2)}return Math.sqrt(o)*(n?-1:1)}export function indexSolid(t,e){for(let a=Math.floor((e.minX-1.5)/8);a<=Math.floor((e.maxX+1.5)/8);a++)for(let o=Math.floor((e.minZ-1.5)/8);o<=Math.floor((e.maxZ+1.5)/8);o++){const n=a+","+o,r=t.get(n)??[];r.push(e),t.set(n,r)}}export function solidClearance(t,e,a,o,n,r){let i=1/0;for(const s of t.get(Math.floor(e/8)+","+Math.floor(a/8))??[])s.top<=n+.001||s.bottom>=r||(i=Math.min(i,solidDistance(s,e,a)-o));return i}export function bridgeBarriers(t){const e=[];for(const a of[-1,1]){const o=a*(t.halfWidth-.15);e.push({kind:"rail",x:0,z:o,halfX:t.halfLength,halfZ:.045});for(let a=.2-t.halfLength;a<=t.halfLength;a+=2)e.push({kind:"post",x:a,z:o,halfX:.15,halfZ:.15})}return e}export const TERRAIN_STEP=1.6;export const TERRAIN_EDGE=WORLD_EDGE+48;const APRON_CELLS=8,PLAYABLE_CELLS=Math.round(2*WORLD_EDGE/1.6);export const TERRAIN_GRID=Float32Array.from([...Array.from({length:8},(t,e)=>6*e-TERRAIN_EDGE),...Array.from({length:PLAYABLE_CELLS+1},(t,e)=>e*WORLD_EDGE*2/PLAYABLE_CELLS-WORLD_EDGE),...Array.from({length:8},(t,e)=>WORLD_EDGE+6*(e+1))]);const terrainSamples=new WeakMap;let cursor=4294967295*Math.random()>>>0;export function random(t){let e=t>>>0;return()=>{e+=1831565813;let t=Math.imul(e^e>>>15,1|e);return t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}const profiles=new Map,hillAxes=new WeakMap,rotations=new WeakMap,FOOTPRINT=Array.from({length:9},(t,e)=>{const a=(e-1)/8*Math.PI*2;return[e?Math.cos(a):0,e?Math.sin(a):0]}),smooth=t=>{const e=Math.max(0,Math.min(1,t));return e*e*(3-2*e)},gap=(t,e)=>Math.hypot(t.x-e.x,t.z-e.z);export function landscapeFor(t){const e=profiles.get(t);if(e)return e;const a=random(7919*t+314159),o={profile:t,phase:a()*Math.PI*2,hills:Array.from({length:9},(t,e)=>({x:(e%2?-1:1)*(34+65*a()),z:190*a()-95,height:2+4*a(),width:16+22*a(),depth:16+22*a(),yaw:a()*Math.PI*2})),caves:[],bridges:[]};for(const[t,e]of[[-36-12*a(),15+13*a()],[47+12*a(),12*a()-45]]){const a={x:t,z:e,y:waterLevel(o,e)+1+meadowRolling(o,t,e),length:20};o.caves.push(a)}for(const t of[-46,-2,58])o.bridges.push({x:riverX(o,t),z:t,halfLength:riverWidth(o,t)+4.5,halfWidth:2.8,y:waterLevel(o,t)+1.08});return profiles.set(t,o),o}export function riverX(t,e){return 10+11*Math.sin(.035*e+t.phase)+2*Math.sin(.073*e)}export function riverWidth(t,e){return 4.8+.6*Math.sin(.05*e+t.phase)}export function waterLevel(t,e){return.018*e}export function hillRise(t,e,a){let o=hillAxes.get(t);!o&&(o=t.hills.map(t=>({hill:t,cos:Math.cos(t.yaw),sin:Math.sin(t.yaw)})),hillAxes.set(t,o));let n=0;for(const{hill:t,cos:r,sin:i}of o){const o=.8*t.width,s=e-t.x,l=a-t.z,h=(s*r+l*i)/o,p=(-s*i+l*r)/(.8*t.depth),x=Math.max(0,1-h*h-p*p);n+=t.height*x**2}const r=6*smooth((Math.hypot(e,a)-111)/17);if(0===n)return r;const i=Math.abs(e-riverX(t,a))-riverWidth(t,a);for(const o of t.bridges){const t=Math.max(0,Math.abs(e-o.x)-o.halfLength-3),r=Math.hypot(t,a-o.z);n*=smooth((r-o.halfWidth-2)/6)}for(const o of t.caves)n*=smooth((caveDistance(o,e,a)-8.5)/5);return n*smooth((i-3)/10)+r}function meadowRolling(t,e,a){return.08*Math.sin(.12*e+t.phase)*Math.cos(.11*a)}function baseHeight(t,e,a){const o=Math.abs(e-riverX(t,a)),n=riverWidth(t,a),r=waterLevel(t,a);return o<=n?r-1.8*(1-(o/n)**4):r+smooth((o-n)/1.4)*(1+meadowRolling(t,e,a)+hillRise(t,e,a))}export function terrainHeight(t,e,a){let o=baseHeight(t,e,a);for(const n of t.caves){const t=1-smooth((caveDistance(n,e,a)-5.8)/4);o+=(n.y-o)*t}return o}export function terrainMeshHeight(t,e,a){let o=terrainSamples.get(t);const n=TERRAIN_GRID.length;!o&&(o=Float32Array.from({length:n*n},(e,a)=>terrainHeight(t,TERRAIN_GRID[a%n],TERRAIN_GRID[Math.floor(a/n)])),terrainSamples.set(t,o));const r=t=>Math.max(0,Math.min(n-2,t<-WORLD_EDGE?Math.floor((t+TERRAIN_EDGE)/6):t<WORLD_EDGE?8+Math.floor((t+WORLD_EDGE)/1.6):8+PLAYABLE_CELLS+Math.floor((t-WORLD_EDGE)/6))),i=r(e),s=r(a),l=s*n+i,h=Math.max(0,Math.min(1,(e-TERRAIN_GRID[i])/(TERRAIN_GRID[i+1]-TERRAIN_GRID[i]))),p=Math.max(0,Math.min(1,(a-TERRAIN_GRID[s])/(TERRAIN_GRID[s+1]-TERRAIN_GRID[s])));return h+p<=1?o[l]+h*(o[l+1]-o[l])+p*(o[l+n]-o[l]):o[l+n+1]+(1-h)*(o[l+n]-o[l+n+1])+(1-p)*(o[l+1]-o[l+n+1])}export function caveDistance(t,e,a){return Math.hypot(e-t.x,Math.max(0,Math.abs(a-t.z)-t.length/2+3.5))}export function caveClearance(t,e,a){return Math.min(...t.caves.map(t=>caveDistance(t,e,a)-7),1/0)}export function terrainSurface(t,e,a){const o=Math.abs(e-riverX(t,a)),n=riverWidth(t,a);return o<=n?"river":o<n+1.4?"shore":caveClearance(t,e,a)<0?"cave":hillRise(t,e,a)>.35?"hill":"grass"}export function toWorld(t,e,a){const{sin:o,cos:n}=rotationAxes(t);return{x:n*e+o*a,z:-o*e+n*a}}export function toLocal(t,e,a){const{sin:o,cos:n}=rotationAxes(t);return{x:n*e-o*a,z:o*e+n*a}}function rotationAxes(t){let e=rotations.get(t);return(!e||e.angle!==t.rotation)&&(e={angle:t.rotation,sin:Math.sin(t.rotation),cos:Math.cos(t.rotation)},rotations.set(t,e)),e}export function groundHeight(t,e,a){const o=toLocal(t,e,a);return bridgeAtLocal(t.landscape,o.x,o.z)?.y??terrainMeshHeight(t.landscape,o.x,o.z)}export function groundTilt(t,e,a,o=0){const n=.12*Math.cos(o),r=.12*Math.sin(o),i=(groundHeight(t,e+n,a-r)-groundHeight(t,e-n,a+r))/.24,s=(groundHeight(t,e+r,a+n)-groundHeight(t,e-r,a-n))/.24,l=Math.hypot(i,1,s),h=[-s/l,0,i/l,1+1/l],p=Math.hypot(...h);return[h[0]/p,0,h[2]/p,h[3]/p]}function bridgeAtLocal(t,e,a){return t.bridges.find(t=>Math.abs(e-t.x)<=t.halfLength&&Math.abs(a-t.z)<=t.halfWidth)}export function bridgeAt(t,e,a){const o=toLocal(t,e,a);return bridgeAtLocal(t.landscape,o.x,o.z)}export function surfaceAt(t,e,a){const o=toLocal(t,e,a);return bridgeAtLocal(t.landscape,o.x,o.z)?"bridge":terrainSurface(t.landscape,o.x,o.z)}const overviews=new WeakMap;function overviewFor(t,e){let a=overviews.get(t);!a&&(a=new Map,overviews.set(t,a));let o=a.get(e);return!o&&(o={row:0,cells:Array(e*e).fill(null)},a.set(e,o)),o}function sampleOverviewRows(t,e,a,o){const n=Math.min(e,a.row+o);for(;a.row<n;a.row++){const o=((a.row+.5)/e*2-1)*WORLD_EDGE;for(let n=0;n<e;n++){const r=((n+.5)/e*2-1)*WORLD_EDGE;a.cells[a.row*e+n]=Math.hypot(r,o)>t.edge-4?null:surfaceAt(t,r,o)}}}export function mapOverview(t,e){const a=overviewFor(t,e);return sampleOverviewRows(t,e,a,e),a.cells}export function waterDepth(t,e,a){const o=toLocal(t,e,a);return Math.abs(o.x-riverX(t.landscape,o.z))<=riverWidth(t.landscape,o.z)?Math.max(0,waterLevel(t.landscape,o.z)-terrainHeight(t.landscape,o.x,o.z)):0}export function caveAt(t,e,a){const o=toLocal(t,e,a);return t.landscape.caves.find(t=>Math.abs(o.x-t.x)<5.8&&Math.abs(o.z-t.z)<t.length/2+.2)}export function cavePassageClearance(t,e,a){const o=3.4125*Math.sqrt(1-((HUMAN_HEIGHT+.12)/4.68)**2);let n=-1/0;for(const r of t.caves)n=Math.max(n,Math.min(o-Math.abs(e-r.x),r.length/2+5-Math.abs(a-r.z)));return n}function terrainClearance(t,e,a){const o=Math.min(Math.abs(e-riverX(t,a))-riverWidth(t,a)-1.4,.35-hillRise(t,e,a),caveClearance(t,e,a));let n=Math.max(o,cavePassageClearance(t,e,a));for(const o of t.bridges)n=Math.max(n,Math.min(o.halfLength-Math.abs(e-o.x),o.halfWidth-Math.abs(a-o.z)));return n}export function navigationClearance(t,e,a,o=PLAYER_RADIUS){let n=t.edge-4-o-Math.hypot(e,a);for(const[r,i]of FOOTPRINT){const s=toLocal(t,e+r*o,a+i*o);n=Math.min(n,terrainClearance(t.landscape,s.x,s.z))}const r=groundHeight(t,e,a);return Math.min(n,solidClearance(t.obstacleCells,e,a,o,r+.02,r+HUMAN_HEIGHT))}export function isWalkable(t,e,a,o=PLAYER_RADIUS){if(!Number.isFinite(e+a)||Math.hypot(e,a)+o>t.edge-4)return!1;const n=groundHeight(t,e,a);for(const[r,i]of FOOTPRINT){const s=e+r*o,l=a+i*o,h=toLocal(t,s,l);if(terrainClearance(t.landscape,h.x,h.z)<-1e-8)return!1;if(Math.abs(groundHeight(t,s,l)-n)>Math.max(.25,.5*o))return!1}return solidClearance(t.obstacleCells,e,a,o,n+.02,n+HUMAN_HEIGHT)>=-1e-8}function indexProp(t,e){const a=groundHeight(t,e.x,e.z)-.07;indexSolid(t.obstacleCells,"rock"===e.kind?rockSolid(e.x,a,e.z,[e.scale,e.scale,e.scale],e.yaw,e.style):circleSolid("tree",e.x,e.z,.32*e.scale,a-.45*e.scale,a+("pine"===e.kind?9.4:8.2)*e.scale))}function generateScenery(t){const e=random(6790115^t.seed),a=e=>{t.decorations.push(e),indexSolid(t.obstacleCells,"rock"===e.kind?rockSolid(e.x,e.y,e.z,e.scale,e.yaw,e.style):circleSolid("tree",e.x,e.z,.32*e.scale[0],e.y-.45*e.scale[1],e.y+9.4*e.scale[1]))};for(const e of t.landscape.bridges)for(const a of bridgeBarriers(e)){const o=toWorld(t,e.x+a.x,e.z+a.z);indexSolid(t.obstacleCells,boxSolid("rail"===a.kind?"bridge-rail":"bridge-post",o.x,o.z,a.halfX,a.halfZ,t.rotation,e.y+("rail"===a.kind?.445:0),e.y+("rail"===a.kind?1.025:1.12)))}for(let o=0;o<90;o++){const n=o/90*Math.PI*2,r=t.edge+7+18*e(),i=Math.cos(n)*r,s=Math.sin(n)*r;a({kind:"rock",area:"horizon",x:i,z:s,y:groundHeight(t,i,s)-2,scale:[5+5*e(),3+4*e(),5+5*e()],yaw:n,style:o%4}),a({kind:"pine",area:"horizon",x:.92*i,z:.92*s,y:groundHeight(t,.92*i,.92*s),scale:[1.8,1.8,1.8],yaw:n,style:o%4})}for(const o of t.landscape.caves){for(let n=0;n<14;n++)a({kind:"rock",area:"cave-roof",...toWorld(t,o.x+5*(e()-.5),o.z-8+n%7*2.6),y:o.y+5.5+.4*e(),scale:[2+e(),1+e(),1.7+e()],yaw:e()*Math.PI*2,style:n%4});for(const n of[-1,1])for(let r=0;r<7;r++)a({kind:"rock",area:"cave-entrance",...toWorld(t,o.x+n*(5.4+1.6*e()),o.z-9+3*r),y:o.y-.2,scale:[1.5,1.8+e(),2],yaw:r,style:r%4})}}function*reachableFromSpawn(t){const e=new Set(["0,0"]),a=[[0,0]],o=[],n=Math.floor(2*(-t.edge-t.spawn.x)),r=Math.floor(2*(-t.edge-t.spawn.z)),i=Math.ceil(4*t.edge)+3,s=new Uint8Array(i*i),l=(e,a)=>{const o=e-n,l=a-r;if(o<0||l<0||o>=i||l>=i)return!1;const h=l*i+o;let p=s[h];return!p&&(p=isWalkable(t,t.spawn.x+.5*e,t.spawn.z+.5*a,.75)?1:2,s[h]=p),1===p};for(let n=0;n<a.length;n++){n&&n%64==0&&(yield);const[r,i]=a[n],s={x:t.spawn.x+3*r,z:t.spawn.z+3*i};o.push(s);for(const[t,o]of[[1,0],[-1,0],[0,1],[0,-1],[1,1],[-1,1],[1,-1],[-1,-1]]){const n=r+t,s=i+o,h=n+","+s;if(e.has(h))continue;if(!l(6*n,6*s)){e.add(h);continue}let p=!0;for(let e=1;e<6;e++)if(!l(6*r+t*e,6*i+o*e)){p=!1;break}p&&(e.add(h),a.push([n,s]))}}return o}function*generateNatureSteps(t){const e=random(t),a=landscapeFor((t>>>0)%TERRAIN_PROFILES),o={seed:t,edge:WORLD_EDGE,rotation:e()*Math.PI*2,landscape:a,spawn:{x:0,z:0},props:[],decorations:[],obstacleCells:new Map,reachable:[],gems:[],enemies:[]},n={x:riverX(a,-16)-13,z:-16};let r=toWorld(o,n.x,n.z);for(let t=0;t<30&&!isWalkable(o,r.x,r.z,1.2);t++)for(let e=0;e<24;e++){const a=toWorld(o,n.x+Math.cos(e/24*Math.PI*2)*t,n.z+Math.sin(e/24*Math.PI*2)*t);if("grass"===surfaceAt(o,a.x,a.z)&&isWalkable(o,a.x,a.z,1.2)){r=a;break}}o.spawn=r,generateScenery(o),yield;for(let t=0;t<700;t++){t&&t%100==0&&(yield);const n=e()*Math.PI*2,r=Math.sqrt(e())*(WORLD_EDGE-7),i=Math.cos(n)*r,s=Math.sin(n)*r,l=toLocal(o,i,s);if(gap({x:i,z:s},o.spawn)<9||Math.abs(l.x-riverX(a,l.z))<riverWidth(a,l.z)+2.5)continue;if(a.bridges.some(t=>Math.abs(l.z-t.z)<t.halfWidth+3&&Math.abs(l.x-t.x)<t.halfLength+5))continue;if(a.caves.some(t=>Math.abs(l.x-t.x)<10&&Math.abs(l.z-t.z)<18))continue;if(!isWalkable(o,i,s,1.1))continue;const h=e()<.24?"rock":e()<.65?"pine":"birch",p={x:i,z:s,kind:h,scale:"rock"===h?.65+2.2*e():.75+1.05*e(),yaw:e()*Math.PI*2,style:Math.floor(4*e())};o.props.push(p),indexProp(o,p)}o.reachable=yield*reachableFromSpawn(o);const i=[...o.reachable];for(let t=i.length-1;t>0;t--){const a=Math.floor(e()*(t+1));[i[t],i[a]]=[i[a],i[t]]}const s=(t,e,a,n)=>{for(const r of i){if(t.length===e)break;gap(r,o.spawn)>=n&&t.every(t=>gap(r,t)>=a)&&t.push({...r})}if(t.length!==e)throw new Error("The wilderness needs more reachable objective positions")};return s(o.gems,GEM_GOAL,12,6),s(o.enemies,ENEMY_COUNT,24,22),o}function finishMap(t){let e=t.next();for(;!e.done;)e=t.next();return e.value}const nextSeed=()=>cursor=cursor+2654435769>>>0;export function generateNature(t=nextSeed()){return finishMap(generateNatureSteps(t))}let nextMap;export function*warmNextMap(){if(!nextMap){const t=nextSeed();nextMap={seed:t,builder:generateNatureSteps(t),done:!1}}const t=nextMap;for(;!t.done;)yield()=>{if(t.done)return;let e;try{e=t.builder.next()}catch(e){throw t.builder=generateNatureSteps(t.seed),e}e.done&&(t.map=e.value,t.done=!0)};if(nextMap!==t)return;const e=t.map,a=overviewFor(e,MINIMAP_SIZE);for(;nextMap===t&&a.row<MINIMAP_SIZE;)yield()=>sampleOverviewRows(e,MINIMAP_SIZE,a,4)}export const peekNextMap=()=>nextMap?.map;function takeNextMap(){const t=nextMap;return nextMap=void 0,t?(!t.done&&(t.map=finishMap(t.builder),t.done=!0),t.map):generateNature()}export const distance=(t,e)=>Math.hypot(t.x-e.x,t.z-e.z);export function createState(t){const e=void 0===t?takeNextMap():generateNature(t);return{map:e,phase:"ready",player:{...e.spawn},yaw:e.rotation,health:MAX_HEALTH,gems:0,defeated:0,score:0,time:0,attackCooldown:0,attackPending:0,invulnerable:0,moving:!1,speed:0,velocity:{x:0,z:0},yawVelocity:0,enemies:e.enemies.map((t,e)=>({...t,home:{...t},id:e,health:2,yaw:0,windup:0,recovery:0,stagger:0,moving:!1})),pickups:e.gems.map((t,e)=>({...t,id:e,taken:!1}))}}export function moveActor(t,e,a,o,n=PLAYER_RADIUS,r=[]){const i=(a,o)=>isWalkable(t,a,o,n)&&r.every(t=>{const r=Math.hypot(a-t.x,o-t.z),i=Math.hypot(e.x-t.x,e.z-t.z);return r>=n+t.radius-1e-8||i<n+t.radius&&r>i+1e-8}),s=(e,a)=>Math.min(navigationClearance(t,e,a,n),...r.map(t=>Math.hypot(e-t.x,a-t.z)-t.radius-n)),l=Math.max(1,Math.ceil(Math.hypot(a,o)/.2)),h=a/l,p=o/l,x=Math.hypot(h,p);if(!(x<1e-8))for(let t=0;t<l;t++){if(i(e.x+h,e.z+p)){e.x+=h,e.z+=p;continue}let t=0,a=1;for(let o=0;o<9;o++){const o=(t+a)/2;i(e.x+h*o,e.z+p*o)?t=o:a=o}const o=Math.max(0,t-.003/x);e.x+=h*o,e.z+=p*o;const n=.08,r=s(e.x+n,e.z)-s(e.x-n,e.z),l=s(e.x,e.z+n)-s(e.x,e.z-n),M=Math.hypot(r,l);if(M<1e-8)continue;const f=r/M,d=l/M,u=Math.min(0,h*f+p*d),m=(h-u*f)*(1-o),g=(p-u*d)*(1-o);if(!(Math.hypot(m,g)<.002))for(const t of[1,.5,.25])if(i(e.x+m*t,e.z+g*t)){e.x+=m*t,e.z+=g*t;break}}}function actorBodies(t,e){const a=t.enemies.filter(t=>t!==e&&t.health>0).map(t=>({x:t.x,z:t.z,radius:.5}));return e!==t.player&&a.push({...t.player,radius:PLAYER_RADIUS}),a}function canSee(t,e,a){if(Math.abs(groundHeight(t,e.x,e.z)-groundHeight(t,a.x,a.z))>1.6)return!1;const o=Math.ceil(distance(e,a)/.4);for(let n=1;n<o;n++){const r=n/o;if(!isWalkable(t,e.x+(a.x-e.x)*r,e.z+(a.z-e.z)*r,.25))return!1}return!0}export function step(t,e,a){if("playing"!==t.phase)return[];const o=Math.min(.05,Math.max(0,a));if(0===o)return[];const n=[],r=(t,e,a)=>n.push({kind:t,...e,id:a});t.time+=o,t.attackCooldown=Math.max(0,t.attackCooldown-o),t.invulnerable=Math.max(0,t.invulnerable-o);const i=Math.hypot(e.x,e.y),s=i>=(t.moving?MOVEMENT_STOP:MOVEMENT_START),l=s?e.x/Math.max(1,i):0,h=s?-e.y/Math.max(1,i):0;if(e.attack&&0===t.attackCooldown){const e=t.enemies.filter(e=>e.health>0&&distance(e,t.player)<=ATTACK_RANGE&&canSee(t.map,t.player,e)).sort((e,a)=>distance(e,t.player)-distance(a,t.player))[0];e&&(t.yaw=Math.atan2(e.x-t.player.x,e.z-t.player.z),t.yawVelocity=0),t.attackCooldown=ATTACK_COOLDOWN,t.attackPending=ATTACK_HIT_TIME,r("attack",t.player)}const p=t.player.x,x=t.player.z,M=PLAYER_SPEED*(t.attackPending>0?.3:1),f=1-Math.exp(-o/.065);if(!s&&(t.velocity.x=0,t.velocity.z=0,t.yawVelocity=0),s&&t.attackPending<=0){const e=Math.atan2(l,h),a=Math.atan2(Math.sin(e-t.yaw),Math.cos(e-t.yaw)),n=12,r=Math.exp(-n*o),i=(t.yawVelocity-n*a)*o,s=(-a+i)*r;let p=Math.max(-5*o,Math.min(5*o,a+s));t.yawVelocity=Math.max(-5,Math.min(5,(t.yawVelocity-n*i)*r)),p*a>0&&Math.abs(p)>Math.abs(a)&&(p=a,t.yawVelocity=0),t.yaw+=p}if(s){const e=Math.sin(t.yaw),a=Math.cos(t.yaw),o=Math.max(0,(l*e+h*a)/Math.max(1e-8,Math.hypot(l,h))),n=M*o*o;t.velocity.x+=(l*n-t.velocity.x)*f,t.velocity.z+=(h*n-t.velocity.z)*f;const r=Math.min(0,t.velocity.x*e+t.velocity.z*a);t.velocity.x-=r*e,t.velocity.z-=r*a}if(moveActor(t.map,t.player,t.velocity.x*o,t.velocity.z*o,PLAYER_RADIUS,actorBodies(t,t.player)),t.velocity.x=(t.player.x-p)/o,t.velocity.z=(t.player.z-x)/o,t.speed=Math.hypot(t.player.x-p,t.player.z-x)/o,t.moving=t.speed>.001,t.attackPending>0&&(t.attackPending=Math.max(0,t.attackPending-o),0===t.attackPending))for(const e of t.enemies){const a=distance(e,t.player);e.health<=0||a>ATTACK_RANGE||!canSee(t.map,t.player,e)||(((e.x-t.player.x)*Math.sin(t.yaw)+(e.z-t.player.z)*Math.cos(t.yaw))/(a||1)<.15&&a>.8||(e.health--,e.stagger=.35,e.windup=0,moveActor(t.map,e,.65*Math.sin(t.yaw),.65*Math.cos(t.yaw),.65,actorBodies(t,e)),r(0===e.health?"defeated":"hit",e,e.id),t.score+=0===e.health?POINTS_ROBOT_DEFEAT:POINTS_ROBOT_HIT,0===e.health&&(t.defeated++,t.pickups.push({x:e.x,z:e.z,id:t.pickups.length,taken:!1}))))}for(const e of t.enemies){if(e.moving=!1,e.health<=0)continue;if(e.recovery=Math.max(0,e.recovery-o),e.stagger=Math.max(0,e.stagger-o),e.stagger>0)continue;const a=distance(e,t.player);if(e.windup>0){if(e.windup=Math.max(0,e.windup-o),0===e.windup&&(e.recovery=1.2,a<2.1&&0===t.invulnerable&&canSee(t.map,e,t.player)&&(t.health--,t.invulnerable=1.2,r("hurt",t.player),0===t.health)))return t.phase="lost",r("lost",t.player),n;continue}const i=a<13&&canSee(t.map,e,t.player);if(i&&a<1.25&&0===e.recovery)e.windup=.6,e.yaw=Math.atan2(t.player.x-e.x,t.player.z-e.z);else{const a={x:e.home.x+1.8*Math.sin(.45*t.time+e.id),z:e.home.z+1.8*Math.cos(.45*t.time+e.id)},n=i?t.player:a,r=n.x-e.x,s=n.z-e.z,l=Math.hypot(r,s);if(l>(i?1.05:.2)){const a=i?2.7:1.1,n={x:e.x,z:e.z};moveActor(t.map,e,r/l*a*o,s/l*a*o,.65,actorBodies(t,e)),e.yaw=Math.atan2(r,s),e.moving=distance(n,e)/o>.05}}}for(const e of t.pickups)!e.taken&&distance(e,t.player)<1.2&&Math.abs(groundHeight(t.map,e.x,e.z)-groundHeight(t.map,t.player.x,t.player.z))<1.2&&canSee(t.map,t.player,e)&&(e.taken=!0,t.gems++,t.score+=POINTS_GEM,r("gem",e,e.id));return t.gems>=GEM_GOAL&&t.defeated===t.enemies.length&&(t.phase="won",t.score+=t.health*POINTS_HEALTH_BONUS,r("won",t.player)),n}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{extrude,merge,Path,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{getSceneInputInsets}from"../shared/EngineHud.js";import{cacheGameAsset,createGameMesh as _0x568687}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{MINIMAP_SIZE,WORLD_EDGE}from"./TreasureHuntConstants.js";import{boulderGeometry,caveGeometry,diamondGeometry,foliageGeometry,grassGeometry,riverGeometry,terrainGeometrySteps}from"./TreasureHuntMeshes.js";import{placeContactShadow,spawnContactShadow}from"./TreasureHuntModel.js";import{BRIDGE_POST_HEIGHT,BRIDGE_POST_WIDTH,bridgeBarriers,groundHeight,groundTilt,isWalkable,landscapeFor,mapOverview,random,riverWidth,riverX,surfaceAt,toWorld}from"./TreasureHuntRules.js";let meshes;const part=(e,t,r,a)=>({geometry:shapeGeometry(e),position:t,scale:r,color:a});function prepareBridge(){return cacheGameAsset("treasure-hunt/TreasureHuntScene:prepareBridge",()=>prepareBridgeUncached())}function prepareBridgeUncached(){return meshes??={plank:_0x568687(merge([part("roundedBox",[0,-.08,0],[.43,.16,5.6],[1,1,1])]),{center:!1,shine:.12}),post:_0x568687(merge([part("roundedBox",[0,.5,0],[.16,BRIDGE_POST_HEIGHT,.16],[.31,.35,.33]),part("cube",[0,.04,0],[BRIDGE_POST_WIDTH,.08,BRIDGE_POST_WIDTH],[.16,.2,.2]),part("roundedBox",[0,1.08,0],[.2,.08,.2],[.54,.57,.51]),...[-1,1].flatMap(e=>[-1,1].map(t=>part("cylinder",[.09*e,.09,.09*t],[.035,.02,.035],[.64,.64,.56])))]),{center:!1,shine:.55})},meshes}export function spawnBridge(e,t,r,a,s){const o=prepareBridge(),n=toWorld(r,a.x,a.z),i=e.spawn({mesh:"none",parent:t,position:[n.x,a.y,n.z],rotation:quat.y(r.rotation),pickable:!1}),p=Math.ceil(2*a.halfLength/.43),l=2*a.halfLength/p;for(let t=0;t<p;t++)e.spawn({mesh:o.plank,texture:s.bark,parent:i,position:[-a.halfLength+(t+.5)*l,0,0],scale:[l/.43,1,2*a.halfWidth/5.6],color:[1.4,1.13,.81,1],pickable:!1});for(const t of[-1,1]){e.spawn({mesh:"cube",parent:i,position:[0,-.28,1.85*t],scale:[2*a.halfLength,.34,.22],color:[.23,.26,.24,1],pickable:!1});for(const r of[-1,1])e.spawn({mesh:"cube",parent:i,position:[r*(a.halfLength-.65),-.7,1.85*t],scale:[.85,1.3,.85],texture:s.stone,color:[.72,.75,.66,1],pickable:!1})}for(const t of bridgeBarriers(a))if("post"===t.kind)e.spawn({mesh:o.post,parent:i,position:[t.x,0,t.z],pickable:!1});else for(const r of[.48,.98])e.spawn({mesh:"cube",parent:i,position:[t.x,r,t.z],scale:[2*t.halfX,.07,2*t.halfZ],color:[.39,.43,.4,1],pickable:!1})}export{spawnRobot,placeRobot}from"./TreasureHuntModel.js";const WHITE=[1,1,1,1];let natureMeshes;const terrainMeshes=new Map,terrainPreparations=new Map;function terrainPreparation(e){let t=terrainPreparations.get(e);return!t&&(t={builder:terrainGeometrySteps(e),models:{}},terrainPreparations.set(e,t)),t}function advanceTerrain(e){if(e.geometry)return;const t=e.builder.next();t.done&&(e.geometry=t.value)}function terrainPart(e,t,r){return t.models[r]??=cacheGameAsset("treasure-terrain:"+e+":"+r,()=>{if("water"===r)return _0x568687(riverGeometry(landscapeFor(e)),{center:!1,shine:.85});for(;!t.geometry;)advanceTerrain(t);return _0x568687(t.geometry[r],{center:!1})})}function*warmTerrain(e){if(terrainMeshes.has(e))return;const t=terrainPreparation(e);for(;!t.geometry;)if(yield()=>advanceTerrain(t),terrainMeshes.has(e))return;for(const r of["meadow","stone","shore","water"])if(yield()=>{terrainPart(e,t,r)},terrainMeshes.has(e))return;terrainMeshes.set(e,t.models),terrainPreparations.delete(e)}function trunk(e,t){const r=[{geometry:tube([[0,-.45,0],[0,-.08,0],[.03,.35,.02],[.08,2,.08],[-.08,4.4,0],[.2,e?9.4:8.2,.1]],{radius:e=>.32*(1-.95*e),sides:9,smoothness:2})}];for(let a=0;a<12;a++){const s=2.4*a+t,o=4.8+a*(e?.33:.24),n=e?2.1*(1-a/16):1.6;r.push({geometry:tube([[0,o,0],[Math.cos(s)*n*.55,o+.15,Math.sin(s)*n*.55],[Math.cos(s)*n,o+(e?-.1:.9),Math.sin(s)*n]],{radius:e=>.065*(1-.98*e),sides:5,smoothness:1})})}return _0x568687(merge(r),{center:!1})}const natureCache=new Map;function natureMesh(e,t){let r=natureCache.get(e);return!r&&(r=cacheGameAsset("treasure-hunt/TreasureHuntScene:"+e,t),natureCache.set(e,r)),r}const gemMesh=()=>natureMesh("gem",()=>_0x568687(diamondGeometry(),{center:!1,shine:.98})),trunkMesh=(e,t)=>natureMesh("trunk:"+e+":"+t,()=>trunk(e,t)),foliageMesh=(e,t)=>natureMesh("foliage:"+e+":"+t,()=>_0x568687(foliageGeometry(e,t),{center:!1})),rockMesh=e=>natureMesh("rock:"+e,()=>_0x568687(boulderGeometry(e),{center:!1})),grassMesh=e=>natureMesh("grass:"+e,()=>_0x568687(grassGeometry(e),{center:!1})),caveMesh=()=>natureMesh("cave",()=>_0x568687(caveGeometry(),{center:!1}));export function prepareNature(){return natureMeshes??={gem:gemMesh(),trunks:[trunkMesh(!0,0),trunkMesh(!1,1)],pine:Array.from({length:4},(e,t)=>foliageMesh(!0,t)),birch:Array.from({length:4},(e,t)=>foliageMesh(!1,t)),rocks:Array.from({length:4},(e,t)=>rockMesh(t)),grass:Array.from({length:4},(e,t)=>grassMesh(t)),cave:caveMesh()},natureMeshes}export function*warmAssets(){yield prepareBridge,yield gemMesh,yield()=>trunkMesh(!0,0),yield()=>trunkMesh(!1,1);for(let e=0;e<4;e++)yield()=>foliageMesh(!0,e),yield()=>foliageMesh(!1,e),yield()=>rockMesh(e),yield()=>grassMesh(e);yield caveMesh}export function terrainModels(e){let t=terrainMeshes.get(e);if(!t){const r=terrainPreparation(e);t={meadow:terrainPart(e,r,"meadow"),stone:terrainPart(e,r,"stone"),shore:terrainPart(e,r,"shore"),water:terrainPart(e,r,"water")},terrainMeshes.set(e,t),terrainPreparations.delete(e)}return t}const grassPlacements=new WeakMap;function*scatterGrass(e){const t=random(6790115^e.seed),r=[],a=Math.cos(e.rotation),s=Math.sin(e.rotation);for(let o=0;o<1900;o++){o&&o%64==0&&(yield);const n=e.reachable[Math.floor(t()*e.reachable.length)],i=n.x+2*(t()-.5),p=n.z+2*(t()-.5),l={x:i*a-p*s,z:i*s+p*a};"grass"!==surfaceAt(e,i,p)||!isWalkable(e,i,p,.9)||Math.abs(l.x-riverX(e.landscape,l.z))<riverWidth(e.landscape,l.z)+1||e.landscape.caves.some(e=>Math.abs(l.x-e.x)<6&&Math.abs(l.z-e.z)<11)||r.push({position:[i,groundHeight(e,i,p)-.02,p],scale:.7+.7*t(),yaw:t()*Math.PI*2,style:o%4})}return r}function grassPreparation(e){let t=grassPlacements.get(e);return!t&&(t={builder:scatterGrass(e)},grassPlacements.set(e,t)),t}function advanceGrass(e){if(e.placements)return;const t=e.builder.next();t.done&&(e.placements=t.value)}export function*warmMapScenery(e){const t=grassPreparation(e);for(;!t.placements;)yield()=>advanceGrass(t);yield()=>{minimapTiles(e)},yield*warmTerrain(e.landscape.profile)}export function spawnNature(e,t,r){const a=prepareNature(),s=terrainModels(t.landscape.profile),o=e.spawn({mesh:"none",pickable:!1}),n=(t,r,a=1,s=WHITE,n,i=0)=>e.spawn({mesh:t,position:r,scale:a,color:s,texture:n,rotation:quat.y(i),parent:o,pickable:!1}),i=(r,a)=>{const s="number"==typeof a?a:a[0],n="number"==typeof a?a:a[2];placeContactShadow(e,spawnContactShadow(e,o),[r[0],groundHeight(t,r[0],r[2])+.006,r[2]],groundTilt(t,r[0],r[2]),.27*s,.27*n,.065)};n(s.meadow,[0,0,0],1,[.85,.96,.77,1],r.meadow,t.rotation),n(s.stone,[0,0,0],1,[.9,.94,.92,1],r.stone,t.rotation),n(s.shore,[0,0,0],1,[.96,.78,.53,1],r.stone,t.rotation);for(const a of t.landscape.bridges)spawnBridge(e,o,t,a,r);const p=n(s.water,[0,0,0],1,[1.3,1.3,1.3,.94],r.water,t.rotation);for(const e of t.props){const s=[e.x,groundHeight(t,e.x,e.z)-.07,e.z];"rock"===e.kind?n(a.rocks[e.style],s,e.scale,WHITE,r.stone,e.yaw):(n(a.trunks["pine"===e.kind?0:1],s,e.scale,"pine"===e.kind?[.7,.65,.52,1]:[1.35,1.35,1.24,1],r.bark,e.yaw),n(a[e.kind][e.style],s,e.scale,WHITE,"pine"===e.kind?r.pine:r.leaves,e.yaw),i(s,e.scale))}for(const e of t.decorations){const t=[e.x,e.y,e.z];if("rock"===e.kind){const s="horizon"===e.area?[.62,.69,.65,1]:"cave-roof"===e.area?[.85,.9,.84,1]:[.8,.88,.8,1];n(a.rocks[e.style],t,e.scale,s,r.stone,e.yaw)}else n(a.trunks[0],t,e.scale,[.7,.65,.52,1],r.bark,e.yaw),n(a.pine[e.style],t,e.scale,[.7,.8,.74,1],r.pine,e.yaw),i(t,e.scale)}const l=grassPreparation(t);for(;!l.placements;)advanceGrass(l);for(const e of l.placements)n(a.grass[e.style],e.position,e.scale,WHITE,void 0,e.yaw);for(const e of t.landscape.caves){const s=toWorld(t,e.x,e.z);n(a.cave,[s.x,e.y,s.z],1,WHITE,r.stone,t.rotation)}return{root:o,water:p,flow:0}}export function animateNature(e,t,r){t.flow=(t.flow+.08*r)%1,e.set(t.water,{textureRegion:[0,t.flow,1,1+t.flow]})}export function spawnGem(e,t,r,a){return e.spawn({mesh:prepareNature().gem,position:[t,r+.9,a],scale:.7,color:[.92,1.02,1.12,1],spin:[0,.85,0],bob:{amplitude:[0,.16,0],speed:2.5,phase:t+a},pickable:!1})}const MAP_COLORS={grass:"#649452",hill:"#b3b8ac",cave:"#777f77",river:"#38b8ee",shore:"#cdb785",bridge:"#f7d79a"},mapTiles=new WeakMap,miniMaps=new WeakMap,mapAt=e=>(e+WORLD_EDGE)/(2*WORLD_EDGE)*MINIMAP_SIZE;let mapDot,mapArrow;function minimapTiles(e){const t=mapTiles.get(e);if(t)return t;const r=mapOverview(e,MINIMAP_SIZE),a=[];let s=new Map;for(let e=0;e<MINIMAP_SIZE;e++){const t=new Map;let o=0;for(;o<MINIMAP_SIZE;){const n=r[e*MINIMAP_SIZE+o];let i=o+1;for(;i<MINIMAP_SIZE&&r[e*MINIMAP_SIZE+i]===n;)i++;if(n){const r=o+":"+i+":"+n,p=s.get(r);if(p)p.height++,t.set(r,p);else{const s={x:o,y:e,width:i-o,height:1,color:toColor(MAP_COLORS[n])};a.push(s),t.set(r,s)}}o=i}s=t}return mapTiles.set(e,a),a}export function drawMiniMap(e,t){if(!e.ready)return;let r=miniMaps.get(e);if(r?.map!==t.map){e.clearLayer("minimap");const a=e.layer("minimap");for(const r of minimapTiles(t.map))e.rectangle(a,r.x+r.width/2,-r.y-r.height/2,r.width,r.height,r.color);for(const r of t.map.landscape.bridges){const s=toWorld(t.map,r.x,r.z),o=e.rectangle(a,mapAt(s.x),-mapAt(s.z),r.halfLength/WORLD_EDGE*MINIMAP_SIZE,Math.max(3,r.halfWidth/WORLD_EDGE*MINIMAP_SIZE),toColor(MAP_COLORS.bridge),1);e.world.set(o,{rotation:quat.z(t.map.rotation)})}mapDot??=cacheGameAsset("treasure-map-dot",()=>_0x568687(extrude((new Path).addCircle(0,0,.5),{depth:0}),{center:!1})),mapArrow??=cacheGameAsset("treasure-map-arrow",()=>_0x568687(extrude(Path.fromSVG("M-3 0H3L0 5Z"),{depth:0}),{center:!1}));const s=e.world.spawn({mesh:"none",parent:a,pickable:!1});e.world.spawn({mesh:mapDot,parent:s,scale:10,color:[1,1,1,1],pickable:!1}),e.world.spawn({mesh:mapDot,parent:s,position:[0,0,1],scale:6,color:toColor("#173d28"),pickable:!1}),e.world.spawn({mesh:mapArrow,parent:s,position:[0,7,1],color:[1,1,1,1],pickable:!1}),e.text(a,"N",MINIMAP_SIZE-8,-8,10,[1,1,1,1]),r={map:t.map,root:a,player:s,width:NaN,offset:NaN,x:NaN,z:NaN,yaw:NaN,enemies:new Map,gems:new Map},miniMaps.set(e,r)}const{width:a,offset:s}=e.viewport,o=e.world.transforms;if((r.width!==a||r.offset!==s)&&(o.position(r.root,a-MINIMAP_SIZE-18,-(getSceneInputInsets(s).top+6),5),r.width=a,r.offset=s),r.x!==t.player.x||r.z!==t.player.z||r.yaw!==t.yaw){const e=t.yaw-Math.PI;o.transform(r.player,mapAt(t.player.x),-mapAt(t.player.z),4,0,0,Math.sin(e/2),Math.cos(e/2)),r.x=t.player.x,r.z=t.player.z,r.yaw=t.yaw}for(const a of t.enemies){let t=r.enemies.get(a.id);!t&&(t={entity:e.world.spawn({mesh:mapDot,parent:r.root,scale:6,color:toColor("#ff6355"),pickable:!1}),x:NaN,z:NaN,visible:!0},r.enemies.set(a.id,t));const s=a.health>0;(t.x!==a.x||t.z!==a.z||t.visible!==s)&&(o.position(t.entity,mapAt(a.x),-mapAt(a.z),2),o.scale(t.entity,s?6:0),t.x=a.x,t.z=a.z,t.visible=s)}for(const a of t.pickups){let t=r.gems.get(a.id);if(t)t.visible!==!a.taken&&(a.taken?o.scale(t.entity,0):o.scale(t.entity,5,5,1),t.visible=!a.taken);else{const s=e.rectangle(r.root,mapAt(a.x),-mapAt(a.z),5,5,toColor("#bdffff"),3);o.rotation(s,0,0,Math.sin(Math.PI/8),Math.cos(Math.PI/8)),a.taken?o.scale(s,0):o.scale(s,5,5,1),t={entity:s,x:a.x,z:a.z,visible:!a.taken},r.gems.set(a.id,t)}}o.flush()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x1077aa=_0x5db8;!function(){const e=_0x5db8,o=_0xc686();for(;;)try{if(784763==parseInt(e(152,"y2Sp"))/1+-parseInt(e(247,"KKhj"))/2+parseInt(e(154,"eHno"))/3+parseInt(e(263,"PbUE"))/4+parseInt(e(174,"h$Lb"))/5+parseInt(e(218,"OeYG"))/6+-parseInt(e(276,"KKhj"))/7)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x12dee6,{useEffect,useRef,useCallback,useMemo}from"react";function _0x5db8(e,o){e-=110;const t=_0xc686();let W=t[e];if(void 0===_0x5db8.rdyenw){const e=function(e,o){let t,W,d=[],n=0,a="";for(e=function(e){let o="",t="";for(let t,W,d=0,n=0;W=e.charAt(n++);~W&&(t=d%4?64*t+W:W,d++%4)?o+=String.fromCharCode(255&t>>(-2*d&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++)d[W]=W;for(W=0;W<256;W++)n=(n+d[W]+o.charCodeAt(W%o.length))%256,t=d[W],d[W]=d[n],d[n]=t;W=0,n=0;for(let o=0;o<e.length;o++)W=(W+1)%256,n=(n+d[W])%256,t=d[W],d[W]=d[n],d[n]=t,a+=String.fromCharCode(e.charCodeAt(o)^d[(d[W]+d[n])%256]);return a};_0x5db8.NCemdr=e,_0x5db8.aSvSMR={},_0x5db8.rdyenw=!0}const d=t[0];_0x5db8.DeDyJr!==d&&(_0x5db8.aSvSMR={},_0x5db8.DeDyJr=d);const n=_0x5db8.aSvSMR[e];return void 0===n?(void 0===_0x5db8.tTmJAZ&&(_0x5db8.tTmJAZ=!0),W=_0x5db8.NCemdr(W,o),_0x5db8.aSvSMR[e]=W):W=n,W}import{View,StyleSheet}from"react-native";import{useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useWhackAMoleStore}from"./WhackAMoleStore.js";import{createWhackAMoleService,ANIMATION_CONFIG,GAME_CONFIG}from"./WhackAMoleService.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameGrid}from"./components/GameGrid.js";import{GameBackground}from"./components/GameBackground.js";import{GameControlButton,GameOverModal}from"../../helpers/index.js";import{GameSettingsModal}from"../../helpers/GameSettingsModal.js";import{WHACK_A_MOLE_CONSTANTS}from"./WhackAMoleConstants.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{jsx as _0x2e457d,jsxs as _0x1e7a26}from"react/jsx-runtime";export const WhackAMole=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:d,onShareScreenshot:n,onShowLeaderboard:a,bannerAd:r})=>{const S="KKhj",s="v(zU",i=_0x5db8,k={yZVFJ:function(e,o){return e&&o},kiimI:function(e,o){return e(o)},baYlF:function(e,o,t){return e(o,t)},rXogM:function(e){return e()},VZJzd:function(e){return e()},Vxbtr:i(140,S),slgTE:function(e){return e?.()},FlZXI:function(e,o,t){return e(o,t)},kUhIw:function(e){return e()},tqYEt:function(e,o,t){return e(o,t)},eGeKV:function(e,o){return e(o)},BxgUd:function(e,o){return e(o)},KSPbH:function(e,o,t){return e(o,t)},DmYBX:function(e,o,t){return e(o,t)},GZorx:function(e,o,t){return e(o,t)},LXjjh:function(e,o,t){return e(o,t)}},u=k[i(243,"PbUE")](useWhackAMoleStore,e=>e[i(111,"tnSd")]),m=useWhackAMoleStore(e=>e[i(124,"z)A$")]),C=useRef(!1),h=k.eGeKV(useRef,t);h[i(211,"6Nr)")]=t;const l=useCallback(e=>{const o=i;if(h[o(193,"J%b%")]&&!C[o(201,"tnSd")]){const t=useWhackAMoleStore[o(132,"a0i*")]();h[o(249,"8k#I")]({status:e,score:t[o(202,"2Gn4")][o(269,"Hc0R")]()}),C[o(179,")biu")]=!0}},[]),G=k[i(184,"h!Mh")](useRef,e);G[i(121,"y2Sp")]=e;const O=WHACK_A_MOLE_CONSTANTS[i(134,"4SSI")],p=WHACK_A_MOLE_CONSTANTS[i(133,"#OFd")],A=WHACK_A_MOLE_CONSTANTS[i(197,"8k#I")],f=WHACK_A_MOLE_CONSTANTS[i(246,"2Gn4")],M=WHACK_A_MOLE_CONSTANTS.gameDuration,x=useCallback(e=>{const o=i,t=e*e,W={};return W.length=t,Array[o(160,"J)D#")](W,(t,W)=>({id:W,isActive:!1,position:{x:(W%e-1)*(GAME_CONFIG[o(256,"cs4L")]+20),y:Math[o(182,"qhIl")](W/e-1)*(GAME_CONFIG[o(208,"tKSI")]+20),z:0}}))},[]);useEffect(()=>{const e=i;if(k.yZVFJ(!u,!m)){const o=k.kiimI(x,A);useWhackAMoleStore[e(169,"J)D#")]()[e(130,"$N$K")](o)}},[A,u,m,x]);const R={};R[i(198,"#OFd")]=16;const _=useRef(Array[i(188,"y2Sp")](R,()=>useSharedValue(0))).current,N={};N[i(166,"tnSd")]=16;const I=useRef(Array[i(244,"eHno")](N,()=>useSharedValue(0)))[i(114,"%ZAh")],H=k[i(257,s)](useRef,null);!H[i(259,"Hc0R")]&&(H.current=createWhackAMoleService(_,I));const b=H[i(227,"tKSI")],y=()=>G.current?.enableSounds??!0,K=()=>G.current?.[i(143,"a0i*")]??!0,T=k.kiimI(useRef,()=>{const e=i;k[e(141,"OeYG")](playSound,GAME_SOUNDS[e(150,"J%b%")][e(212,"$N$K")],k[e(254,"z)A$")](y)),playHaptic(HapticType[e(171,"NO4t")],K())})[i(153,"wZgk")],J=useRef(()=>{const e=i;playSound(GAME_SOUNDS[e(261,"mToH")].MISS,y()),playHaptic(HapticType[e(268,"qhIl")],k[e(181,"%ZAh")](K))})[i(186,"h$Lb")],P=useRef(()=>{const e=i;k[e(141,"OeYG")](playSound,GAME_SOUNDS[e(118,"RZfn")][e(271,"qhIl")],k[e(177,"4SSI")](y)),k.baYlF(playHaptic,HapticType[e(235,"f671")],K())}).current,g=k[i(175,"rzWZ")](useRef,()=>{const e=i;playSound(GAME_SOUNDS[e(272,"((ZH")][e(146,"UPGy")],y()),playHaptic(HapticType.MEDIUM,K())})[i(265,"#sbB")],Q=useRef(()=>{const e=i,o={fWUTK:function(e,o){return e(o)},HgDfK:k.Vxbtr},t=useWhackAMoleStore[e(168,"h88M")]().holes,W=[];for(let o=0;o<t[e(166,"tnSd")];o++)t[o]&&!t[o]?.[e(194,"%ZAh")]&&W[e(137,"%ZAh")](o);b[e(135,"jZSh")](W,t=>{const W=e;if(_[t]){if(o[W(252,"Hc0R")]!==o[W(115,"RZfn")]){const e={AHUbO:function(e,t){return o.fWUTK(e,t)},NCsNR:W(213,"h88M")};return()=>{const o=W;_0x2ed6a4[o(176,"KKhj")]()[o(151,"f671")]&&!_0x5b90fc[o(201,"tnSd")]&&e.AHUbO(_0x434ce6,e.NCsNR),_0x64d429[o(136,"eHno")]?.[o(232,"JDW7")](),_0x5cd9c5.getState()[o(138,"Xh#w")](),_0x18c599[o(193,"J%b%")]?.[o(172,")biu")]()}}_[t][W(192,"M9IK")]=withSpring(1,ANIMATION_CONFIG[W(200,"RZfn")]),useWhackAMoleStore[W(167,"#OFd")]()[W(253,"((ZH")](t),P()}},o=>{const t=e,W=useWhackAMoleStore[t(233,"2nsz")]();o<W[t(206,"Tj9H")][t(236,"wNKK")]&&W[t(163,"tKSI")][o]&&W[t(145,"eHno")][o][t(258,"3QT9")]&&_[o]&&(k.rXogM(J),_[o][t(210,"wNKK")]=withSpring(0,ANIMATION_CONFIG.MOLE_SPRING),W.deactivateHole(o))},p)})[i(186,"h$Lb")],E=useCallback(()=>{const e=i;C[e(193,"J%b%")]=!1,useWhackAMoleStore[e(230,"FbSi")]()[e(270,"wZgk")](M,A),b[e(217,"wZgk")](),b[e(142,")biu")](useWhackAMoleStore.getState()[e(161,"RZfn")]),b[e(155,"qhIl")](Q,O),k[e(220,"cs4L")](playSound,GAME_SOUNDS.WHACK_A_MOLE[e(223,"Yv3J")],y()),playHaptic(HapticType[e(255,"%ZAh")],K())},[M,A,b,Q,O]),F=useCallback(()=>{const e=i;l(e(229,"6Nr)")),useWhackAMoleStore[e(183,"8AmT")]()[e(260,"rzWZ")](),b[e(221,"mToH")](),b[e(189,"pvLa")](),k[e(199,"eHno")](playHaptic,HapticType[e(196,"KKhj")],K())},[l,b]),q=k[i(264,"RZfn")](useCallback,e=>{const o=i,t=useWhackAMoleStore.getState();t.isPlaying&&(e<0||e>=t[o(128,"FT4U")].length||!t[o(191,"#OFd")][e]||!t.holes[e][o(159,"v(zU")]?g():b[o(157,"cs4L")](e,()=>{const t=o;T(),useWhackAMoleStore.getState()[t(165,"J)D#")](e,f),_[e]&&(_[e][t(190,"Tj9H")]=withSpring(0,ANIMATION_CONFIG[t(144,"h88M")])),I[e]&&(I[e][t(277,"cs4L")]=withTiming(1,ANIMATION_CONFIG[t(203,"pvLa")],o=>{o&&I[e]&&(I[e].value=withTiming(0,ANIMATION_CONFIG.HIT_TIMING))}))}))},[b,T,g,f,_,I]),L=useCallback(()=>{const e=i;k[e(225,"a0i*")](W),C[e(224,"h!Mh")]=!1,b[e(156,")biu")](),useWhackAMoleStore[e(215,"eHno")]()[e(122,"h$Lb")](),b[e(250,"jZSh")]()},[b,W]);useEffect(()=>{const e=i;return useWhackAMoleStore[e(222,"jZSh")](o=>o[e(207,"qhIl")],o=>{const t=e;useWhackAMoleStore[t(248,"((ZH")]()[t(240,"((ZH")]&&10===o&&(playSound(GAME_SOUNDS[t(180,"Yv3J")][t(110,"Xh#w")],y()),playHaptic(HapticType[t(147,"wNKK")],K()))})},[]),k.baYlF(useEffect,()=>{const e=i;m&&!C[e(228,"z)A$")]&&(l("win"),k[e(239,"rzWZ")](playSound,GAME_SOUNDS[e(119,"#OFd")][e(266,"NO4t")],k[e(170,"pvLa")](y)),k[e(123,"f671")](playHaptic,HapticType[e(209,"RZfn")],k[e(262,"v(zU")](K))),!m&&(C[e(249,"8k#I")]=!1)},[m,l]),k[i(129,"J)D#")](useEffect,()=>{(m||!u)&&b.cleanup()},[m,u,b]),useEffect(()=>()=>{const e=_0x5db8;useWhackAMoleStore[e(127,"3QT9")]().isPlaying&&!C.current&&l(e(245,"h$Lb")),H[e(273,"rzWZ")]?.[e(237,"jZSh")](),useWhackAMoleStore[e(126,"Hc0R")]()[e(122,"h$Lb")](),H[e(251,"pvLa")]?.[e(214,"UPGy")]()},[]);const D=e?.[i(120,s)]??0,Z=useMemo(()=>({isPlaying:u,gameOver:m,onStartGame:E,onStopGame:F,onShare:d,onShowLeaderboard:a,startButtonSubtext:"Whack moles to score!"}),[u,m,E,F,d,a]),v=useMemo(()=>m?useWhackAMoleStore[i(117,"2Gn4")]().score:0,[m]),j=k[i(116,"#sbB")](useMemo,()=>({isVisible:m,score:v,onPlayAgain:L,buttonText:i(234,"#sbB"),title:i(242,"!Mn&"),message:i(178,"#sbB")}),[m,v,L]),U=useMemo(()=>({gameId:GAME_IDS[i(131,"PbUE")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]),w={};w[i(195,"!Mn&")]=D;const V=k[i(205,"z)A$")](useMemo,()=>[styles[i(125,"M9IK")],w],[D]),z={};z[i(112,S)]=_,z[i(158,"cs4L")]=I,z[i(187,"Tj9H")]=q,z.gridSize=A;const B={...Z},Y={...j};Y.onShare=n,Y[i(173,"y2Sp")]=r;const X={...U};return k.GZorx(_0x1e7a26,GameBackground,{offset:D,children:[_0x2e457d(ScoreBoard,{offset:D}),k[i(164,"KKhj")](_0x2e457d,View,{style:V,children:k.FlZXI(_0x2e457d,GameGrid,z)}),k[i(162,"UPGy")](_0x2e457d,GameControlButton,B),_0x2e457d(GameOverModal,Y),k[i(275,"wNKK")](_0x2e457d,GameSettingsModal,X)]})};const _0x326e2d={};function _0xc686(){const e=["W6iugWPWlSowxW","z8oiW6pdVSk8WQ7dPSkX","f3RcPCoDtW","m303k8oZ","W5emWPVdH1JdLgNcPW","hCkBtZtdSmoWx0D8WONcNfC","W5bdBcBcR8k0qIq","wCkup0tcPSkJcMVdGSkNWRRdQtbIW6JcKJymDq","WP3cO8oTCqZdJmoXW5CYW7VcQMNcTCkxWP7cMCoZ","eey/W6ZcLCooi0pcTCogW4FdRa89W5K","WOqEWRRdSCoWiSkL","WRFcOSklpa","aCoXwcvLWQRdH8kiWR0","WO/cNSkSc8khzIJdJCkLW6O","kJDriK4","WOeUWO/cQCkx","q0u8W4DOjgmpW6VcICodlSkOWQe","W5jiErFcT8kWFIdcTfDtWPvx","sZDMWQZcLCkjWRO5CgHS","WO8eWQtdPSoM","WOtdSutdGGRdTCkJW4LD","o8o3WPO9WPv4xa","W4pdUCk1iwNcJSkOW4m0W5RcGxJcVG","DJ7cKSkkWPf9dq3dKSoPWQtdGuy","WOVdUMRcKNzkfLKzDNFcLW","a8kMx8kgB8o7WQRdU2W","l8oRW7GurmkTFrWtqmkbDhK","W6hdTCoWDdTEgG","W5nFW7JcTCkGESoPW7qCq8kBWOZcVG","Cmo3qcxcHw0lF8kKW7u6erNcHCoxqbq","u104W5rYfNi","DNKAACouW7yee8kb","AxGps8orW5ighSkqW7HafSkF","x8odWPu6W6H7wmoN","ewibba","WQJdP1ddVmokW6tdOrtdPmonlGxdUG","WRxdJu3dKYC","WORdM8oSWPdcQa","bJDCnMO","ahGpcSoaWQPPeCoP","WRxdMCkUW7KXWRS","u8kEj3lcHmkRdwC","yr1EWRRcVSk7WP4o","ehuAoSoFWOzYga","WObvW6ZcSCoJ","hJxdJHlcTa","qLqUW5bOiMWlW6pcVmoEkSkIWR3dSG","Fmk4WQvjgCoPddS","WQVcK3dcGgZcKSogWRFdR8ocW5GYW6u","WOnMWQbbza","fsnXigRcHSoUhG","WQBcLSolBJS","iYFcNCoQsCoKAaPLgmkmW63dQSk8W4m","u0qVW4D5dxy","dmk/sCoWzmoXWQhdQqXJqbq","WPhcJCkYlSk3","zCoVtJJcGW","WQFcMMz6yHZdPbS","AHtdI8ocrW","lmk/AW8","W7ZdNJtdHJVdJmkh","lwtdQSotW4GUzrRdH8ojWOC","EmkRWQrk","WPLLW7FcNCoGWRFdOsr8W6dcIHHxWQZcJa","ngVdJSojW4e","xmkup0tcGW","ACoICCkYqa","WR/dH1NcO1H7iW","WQ7cPmk5n8kNrHpdOq","FrqdWPFcKceaWPbDgG","pWnboKVcQG","wd9jW7pdTG/cO8oy","wmkEpuBcHmkI","WOukWPhdR8ot","WOhdJx/dI8oWW5RdLcJdMCoxaa","WRRdICkYW6WGWR3cJq","WOVcRCo6W4NcRG","WQnjW5dcP8oaWR/dGGrFW4y","W4DhFbhcSSk7uqNcQ1ftWOXlwJOcW4i","W4/dQKyvWQm","kMxdJSozW5C","D8oQtdlcVuuczW","WQRdU8omWRdcHmoKWQiAW7C","WONdKghdGCo9","gSoxWQqgWRK","W609DIW2W73cRq","W6OGWRS","zrLeWORcR8k2","WRpdMwFdSYFdQ8kzW6fGW7pcTcCjgSk9","WOaoWRZdKmoHlCkLW7q","Emk1WQ5F","W7ddPCoXyYPXah3dG8okEvtdLIjn","W5v4W6FdTSoKW4Odj0i+uu7cQa","r8kShxqJW53cK8kdWPPPW5C9ma","y3aIzSo5","zSkiCCo4uddcVq","eem8W6JcMmoUk0/cTa","cmkJsCoHEW","BcBdNmo7DdZcNq","W4rkFYhcNG","lCkYyXldUSoDE3K","WOhdGCoYWOFcVSozWP8","W47dVM0lWOacWRW","W60PAJ02W78","WPbZWQvcW6yaCJy","W7BdPSony8oNf1xdOmk7W4DefSo3","hhPGzwWXiG","oSk+W73cQSoJsSkDuq","mZ3cMCoOvSoKxGvLeSkjWQu","jSkCsmkIwG","amotWQyuWQHE","afO7W7RcLCoPmG","W6/dIIldKdFdJmkuWPNdGSoYW7yfW43cVGPVFq","WODYWP1msq","W4Kgr1VcRSkHW68HW6q","WQpcJxDiyHG","wtWQWRBdMrO3W6u","iCk6zXRdSG","WOezWQFdRG","W7ZdIIJdLZVdJG","WOJcOCo8W5xcVYNcQCk9W6L4W47dOSo5","q3CWrcRdN8kQh1TjW6BdMmk6","W4Cqy2tcU8k5W7iQ","xdHsW6xdGaJcRq","evmTW77cJ8oDletcVmoiW57dIa8/W48","WOH1W7BcISoXWPJdUW","W40wkZ9p","W4ewy17cUCk5W7iQW4VdN8oQdq","W5/dK3aEWQG","WPtcGSk7f8kwFdy","sv43t8oGW6GIjCkH","u8o3WResW4O","ACoEW5BdJSk8WQBdPmkX","W6yehsTHiCow","WRjQWQHKr8oYcSkO","uSkSvCoADrRcJmkfksddJHq","ymoQWP4JW7G","ECoMoKlcJCkDjNTzWQ7cLxFcTa","WOFdKwpdRmoN","bYdcISo5wmkQAW","ethdGGhcSKzmWP0G","mcnioCkhWO1BpmkdW5HKl8kw","t8okzH/cPq","W7eEpc12jSomxq","W7hdTmoJDcP3d3NdIW","umotyadcVW","W7C9vNtcHmkhW4CqW47dV8oklq","WQjRWRvMzCo9eW","WPRcR8o2W5dcRcJcLSkTW7vrW6ldOCoWoSkp","imoUWQizWRq","qxy3qs/dKmkOshHqW4hdMmkuaq","D3axF8oA","j8oDzGvoWRRdP8k3WPzIW543","WRddJ8kqW7iKWQRcKdOs","hYLPfL/cICoZfMPxW43dTCkziq","kCk8yapdMSogCh1d","WQtcOSkkjSk2qre","WOtdPxFdQmoK","idJcOCojzq","WP/cQ8oHW6JcVZVcJCk9","WPVdINldJCoKW5BdHsxdNCowcY0","y8kZeMlcU8kvof3dRCkeWPpdQa","wCowWRiQW7LM","FCkSWRLvgCo1oq","W63dJJxdKsRdPCksWRZdIa","hSkKvSkVEG","W4RdQNiCWQOAWQ0o","EmoICmkIzmkox8oG"];return(_0xc686=function(){return e})()}_0x326e2d[_0x1077aa(216,"y2Sp")]=1,_0x326e2d[_0x1077aa(274,"2Gn4")]=BACKGROUND_COLOR,_0x326e2d.paddingTop=0,_0x326e2d[_0x1077aa(238,"h$Lb")]=20,_0x326e2d.paddingBottom=0;const _0x344a08={};_0x344a08[_0x1077aa(185,"PbUE")]=1,_0x344a08[_0x1077aa(204,"a0i*")]=20;const _0x26eeed={};_0x26eeed[_0x1077aa(113,"PbUE")]=_0x326e2d,_0x26eeed[_0x1077aa(226,"PbUE")]=_0x344a08;const styles=StyleSheet[_0x1077aa(241,"8AmT")](_0x26eeed);
|
|
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{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,TIME_LIMIT}from"./WhackAMoleConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./WhackAMoleGame.js";import{jsx as _0x328481}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.WHACK_A_MOLE,FEEDBACK={spawn:{sound:SOUNDS.SPAWN,haptic:HapticType.LIGHT},hit:{sound:SOUNDS.HIT,haptic:HapticType.HEAVY},miss:{sound:SOUNDS.MISS,haptic:HapticType.LIGHT},empty:{sound:SOUNDS.EMPTY_TAP,haptic:HapticType.MEDIUM},warning:{sound:SOUNDS.TIME_WARNING,haptic:HapticType.WARNING}};export const WhackAMole=engineGame(GAME_IDS.WHACK_A_MOLE,e=>{const[t,s]=useLiveState(0),[o,r]=useLiveState(TIME_LIMIT),{theme:a,screen:i,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.WHACK_A_MOLE,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,o)=>setLayout(e,getLayout(t,s,o)),tap:tap,outcome:()=>"win",sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),onOver:e=>e(SOUNDS.GAME_OVER,HapticType.ERROR),wire:(e,t)=>{e.onScore=s,e.onTime=r,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),m=useMemo(()=>lightFor(a),[a]),p=useMemo(()=>backgroundFor(a),[a]);return _0x328481(EngineGameScreen,{...i,light:m,background:p,columns:[scoreColumn(t),timerColumn(o,a,0)],subtext:"Whack moles to score!",gameOver:n({title:"TIME UP!",message:"Great whacking!",scoreLabel:"Final Score",score:t,buttonText:"Whack Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{makeView,rayThrough}from"../shared/EngineMeadow.js";import{gameWidthFor}from"../shared/EngineUtils.js";export const GRID=3;export const HOLES=9;export const TIME_LIMIT=120;export const POINTS_PER_MOLE=500;export const TIME_WARNING=10;export const FIRST_SPAWN=1;export const SPAWN_MAX=1.5;export const SPAWN_MIN=1.05;export const MOLE_UP_TIME=2;export const EYE_HEIGHT=1.6;export const ROW_SPACING=1.6;export const HOLE_RADIUS=.36;export const MOLE_HEIGHT=.62;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=175,SKY_BELOW_SCOREBOARD=45,SIDE_MARGIN=14,MAX_FAR_Z=5.3;export function getLayout(o,t,e){const r=getScoreBoardTop(e)+82+45,n=makeView(o,t,{eyeHeight:1.6,horizon:r/t,playDepth:3}),s=rayThrough(n,o/2,t-175),i=-1.6/-s[1]*s[2],p=Math.min(o-14,o/2+gameWidthFor(o)/2);let a=.05,h=3;for(let o=0;o<40;o++){const o=(a+h)/2,[t]=toScreen(n,[o*(1+.36),0,-(i+.36*o)]);t>p?h=o:a=o}const E=Math.min(a,(5.3-i)/3.92),_=i+.36*E,I=[];for(let o=0;o<3;o++)for(let t=0;t<3;t++)I.push([(t-1)*E,0,-(_+(2-o)*E*1.6)]);return{width:o,height:t,view:n,spacing:E,nearZ:_,holes:I}}export function toScreen(o,t){const e=[t[0]-o.eye[0],t[1]-o.eye[1],t[2]-o.eye[2]],r=e[0]*o.forward[0]+e[1]*o.forward[1]+e[2]*o.forward[2],n=e[0]*o.up[0]+e[1]*o.up[1]+e[2]*o.up[2],s=o.height/2/(o.tanHalf*Math.max(r,.001));return[o.width/2+e[0]*s,o.height/2-n*s]}export function meadowFor(o){const t=o.view.horizon;return{sun:[.82,.55*t],clouds:[.02,.8*t],hotAirBalloons:1}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{cameraFor}from"../shared/EngineMeadow.js";import{FIRST_SPAWN,HOLES,MOLE_UP_TIME,POINTS_PER_MOLE,SPAWN_MAX,SPAWN_MIN,TIME_LIMIT,TIME_WARNING,toScreen}from"./WhackAMoleConstants.js";import{bonk,buildScene,duck,hideAll,hitEffect,missEffect,moleTop,popUp,removeScene,thud}from"./WhackAMoleScene.js";const WORLD_CAPACITY=1e3,MAX_STEP=.1;export function createGame(e){const o=new World(1e3),n={world:o,camera:{eye:[0,1.6,0],target:[0,1,-3],fov:.9},theme:e,layout:null,hitLayout:null,hitZones:[],scene:null,phase:"ready",get score(){return o.scoreboard.score},get timeLeft(){return o.scoreboard.shownSeconds},up:new Array(HOLES).fill(!1),hideAt:new Array(HOLES).fill(0),nextSpawn:0,clock:0,onPhase:e=>{},onScore:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(0,TIME_LIMIT),o.scoreboard.handlers={onScore:e=>n.onScore(e),onSecond:e=>{n.onTime(e),e===TIME_WARNING&&"playing"===n.phase&&n.onEvent("warning")},onTimeUp:()=>"playing"===n.phase&&end(n)},n}export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o;const n=cameraFor(o.view);e.camera.eye=n.eye,e.camera.target=n.target,e.camera.fov=n.fov,e.scene=buildScene(e.world,o,e.theme),e.up.forEach((n,t)=>n&&e.scene&&e.world.set(e.scene.moles[t],{position:[o.holes[t][0],0,o.holes[t][2]]}))}export function setTheme(e,o){o!==e.theme&&(e.theme=o,e.layout&&!e.world.isDisposed&&setLayout(e,e.layout))}export function start(e){"ready"===e.phase&&(e.phase="playing",e.nextSpawn=e.clock+FIRST_SPAWN,e.world.scoreboard.startCountdown(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){e.world.cancelTimers(),clearMoles(e),e.world.scoreboard.reset(0,TIME_LIMIT),e.phase="ready",e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}function clearMoles(e){e.up.fill(!1),e.layout&&e.scene&&hideAll(e.world,e.layout,e.scene)}export function tick(e,o){if(!e.world.isDisposed){if(e.clock+=Math.min(o,.1),"playing"===e.phase){for(let o=0;"playing"===e.phase&&o<HOLES;o++)e.up[o]&&e.clock>=e.hideAt[o]&&(e.up[o]=!1,e.layout&&e.scene&&duck(e.world,e.layout,e.scene,o),e.onEvent("miss"));"playing"===e.phase&&e.clock>=e.nextSpawn&&(spawn(e),e.nextSpawn=e.clock+SPAWN_MIN+Math.random()*(SPAWN_MAX-SPAWN_MIN))}e.world.update(o)}}function spawn(e){const o=[];for(let n=0;n<HOLES;n++)e.up[n]||o.push(n);if(!o.length)return;const n=o[Math.floor(Math.random()*o.length)];e.up[n]=!0,e.hideAt[n]=e.clock+MOLE_UP_TIME,e.layout&&e.scene&&popUp(e.world,e.layout,e.scene,n),e.onEvent("spawn")}function end(e){e.world.cancelTimers(),e.world.scoreboard.stop(),clearMoles(e),e.phase="over",e.onPhase("over")}function toSegment(e,o,n){const t=n[0]-o[0],r=n[1]-o[1],a=t||r?Math.max(0,Math.min(1,((e[0]-o[0])*t+(e[1]-o[1])*r)/(t*t+r*r))):0;return Math.hypot(e[0]-(o[0]+t*a),e[1]-(o[1]+r*a))}export function holeAt(e,o,n){const t=e.layout;if(!t)return null;if(e.hitLayout!==t){const o=moleTop(t);e.hitZones=t.holes.map(e=>{const n=toScreen(t.view,e);return{rim:n,reach:.5*Math.abs(toScreen(t.view,[e[0]+t.spacing,0,e[2]])[0]-n[0]),up:toScreen(t.view,[e[0],o,e[2]]),down:toScreen(t.view,[e[0],.15*t.spacing,e[2]])}}),e.hitLayout=t}let r=null,a=1;const s=[o,n];return e.hitZones.forEach(({rim:o,up:n,down:t,reach:l},i)=>{const p=e.up[i]?n:t,u=toSegment(s,o,p)/l;u<a&&(r=i,a=u)}),r}export function tap(e,o,n){if("playing"!==e.phase)return;const t=holeAt(e,o,n);if(null==t)return;const{layout:r,scene:a}=e;if(!e.up[t])return e.onEvent("empty"),void(r&&(thud(e.world,r,t),missEffect(e.world,r,t)));e.up[t]=!1,e.world.scoreboard.add(POINTS_PER_MOLE),e.onEvent("hit"),r&&a&&(bonk(e.world,r,a,t),hitEffect(e.world,r,t))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,lathe,merge,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{flowerMesh,noise,random,rockMesh,sceneryTint,spawnWorld,tuftMesh}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0x3eeee4}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{HOLE_RADIUS,meadowFor,MOLE_HEIGHT}from"./WhackAMoleConstants.js";const meshes=new Map,cached=(o,e)=>{let t=meshes.get(o);return!t&&(t=cacheGameAsset("whack-a-mole/WhackAMoleScene:"+o,e),meshes.set(o,t)),t},rgb=o=>{const[e,t,s]=toColor(o);return[e,t,s]},mix=(o,e,t)=>[o[0]+(e[0]-o[0])*t,o[1]+(e[1]-o[1])*t,o[2]+(e[2]-o[2])*t],shade=(o,e)=>[o[0]*e,o[1]*e,o[2]*e],smooth=(o,e,t)=>{const s=Math.min(1,Math.max(0,(t-o)/(e-o)));return s*s*(3-2*s)},sphere=()=>shapeGeometry("sphere"),tinted=(o,e)=>[o[0]*e[0],o[1]*e[1],o[2]*e[2],o[3]??1],moundMesh=()=>cached("wam-mound",()=>{const o=rgb("#7A4E2D"),e=rgb("#A27449"),t=rgb("#140B05"),s=HOLE_RADIUS;return _0x3eeee4(lathe([[1.75*s,0],[1.45*s,.12*s],[1.12*s,.3*s],[.95*s,.32*s],[.8*s,.16*s],[.66*s,.03*s],[.001,.015*s]],{segments:40,displace:(o,e)=>e<.6?.012*Math.sin(o*Math.PI*2*9)*Math.sin(e*Math.PI):0,color:({position:n})=>{const i=Math.hypot(n[0],n[2])/s,a=.82+.36*noise(40*n[0]+5,40*n[2]),r=mix(shade(o,.65),e,smooth(.9,1.15,i)*(1-.6*smooth(1.3,1.75,i)));return shade(mix(t,r,smooth(.62,.92,i)),a)}}),{center:!1,shine:.05})}),moleMesh=()=>cached("wam-mole",()=>{const o=rgb("#7B5134"),e=rgb("#4E3220"),t=rgb("#E8B48A"),s=rgb("#FF6F91"),n=rgb("#F2A99B"),i=lathe([[.33,-.45],[.36,.05],[.35,.4],[.3,.66],[.2,.84],[.001,.93]],{segments:32,color:({position:s,normal:n})=>{const i=smooth(.35,.85,n[2])*(1-smooth(.35,.6,s[1])),a=mix(mix(e,o,smooth(-.3,.6,s[1])),t,.65*i);return shade(a,.85+.3*noise(30*s[0]+8*s[1],30*s[2]+70*s[1]))}}),a=o=>[o,{...o,position:[-o.position[0],o.position[1],o.position[2]]}],r=[];for(const o of[1,-1])for(const[e,t]of[[.02,.04],[-.02,0],[-.06,-.03]])r.push({geometry:tube([[.1*o,.62+e,.36],[.24*o,.63+1.6*e,.34+t],[.36*o,.62+2.4*e,.3+t]],{radius:.006,sides:4,smoothness:4,color:[.15,.1,.08]})});return _0x3eeee4(merge([{geometry:i},{geometry:sphere(),position:[0,.6,.27],scale:[.25,.19,.22],color:[...t,1]},{geometry:sphere(),position:[0,.65,.38],scale:[.11,.085,.09],color:[...s,1]},{geometry:sphere(),position:[.02,.675,.42],scale:.025,color:[1,1,1,1]},...a({geometry:shapeGeometry("roundedBox"),position:[.025,.52,.355],scale:[.04,.06,.02],color:[1,1,.96,1]}),...a({geometry:sphere(),position:[.11,.77,.25],scale:.075,color:[.04,.03,.03,1]}),...a({geometry:sphere(),position:[.095,.79,.285],scale:.022,color:[1,1,1,1]}),...a({geometry:sphere(),position:[.23,.84,0],scale:[.11,.09,.05],color:[...e,1]}),...a({geometry:sphere(),position:[.2,.6,.2],scale:[.11,.08,.06],color:[...mix(t,s,.35),1]}),...a({geometry:sphere(),position:[.2,.2,.3],scale:[.17,.09,.15],color:[...n,1]}),...r]),{center:!1,shine:.22})}),moleScale=o=>MOLE_HEIGHT*o.spacing/.93;export const molePosition=(o,e,t)=>{const[s,,n]=o.holes[e];return[s,t?0:1.05*-moleScale(o),n]};export const moleTop=o=>.9*moleScale(o);export function buildScene(o,e,t){const s=sceneryTint(t),n=spawnWorld(o,e.view,t,{...meadowFor(e),foreground:!1}),i=random(11),a=e.spacing,r=-e.holes[e.holes.length-1][2],l=-e.holes[0][2],m=(o,t)=>e.holes.every(([e,,s])=>Math.hypot(o-e,t-s)>a*HOLE_RADIUS*2),p=(e,t,a,r,l,p)=>{for(let h=0,d=0;h<r&&d<8*r;d++){const r=-(l+i()*(p-l)),d=(2*i()-1)*(.62*-r+.4);m(d,r)&&(n.push(o.spawn({mesh:e,position:[d,0,r],scale:t,rotation:quat.y(6.3*i()),color:tinted(a,s),pickable:!1})),h++)}};p(tuftMesh(),.9,[1,1,1,1],70,r-a,l+1.4*a);const h=["#FF6B9D","#FFFFFF","#FFD54F","#B784FF","#6FA8FF"].map(o=>toColor(o));for(let o=0;o<5;o++)p(flowerMesh(),.8,h[o],5,r-.5*a,l+1.4*a);p(rockMesh(),[.07,.05,.06],[.85,.8,.75,1],14,r-.5*a,l+a);const d=e.holes.map(([e,,t])=>o.spawn({mesh:moundMesh(),position:[e,0,t],scale:a,rotation:quat.y(6.3*i()),color:tinted([1,1,1,1],s),pickable:!1})),u=e.holes.map((t,n)=>o.spawn({mesh:moleMesh(),position:molePosition(e,n,!1),scale:moleScale(e),color:tinted([1,1,1,1],s),pickable:!1}));return{scenery:n,mounds:d,moles:u}}export function removeScene(o,e){for(const t of[...e.scenery,...e.mounds,...e.moles])o.despawn(t)}export function popUp(o,e,t,s){const n=t.moles[s];o.stopAnimation(n),o.set(n,{position:molePosition(e,s,!1),scale:moleScale(e),rotation:quat.y(0)}),o.animate(n,{position:molePosition(e,s,!0)},{spring:{stiffness:200,damping:15}}),o.animate(n,[{rotation:quat.y(.35),at:.3},{rotation:quat.y(-.35),at:.8},{rotation:quat.y(0)}],{duration:1.6,delay:.25,easing:"easeInOut"})}export function duck(o,e,t,s){const n=t.moles[s];o.stopAnimation(n),o.animate(n,{position:molePosition(e,s,!1)},{duration:.22,easing:"easeIn"})}export function bonk(o,e,t,s){const n=t.moles[s],i=moleScale(e);o.stopAnimation(n),o.animate(n,[{scale:[1.25*i,.55*i,1.25*i],at:.25},{scale:[1.1*i,.7*i,1.1*i]}],{duration:.18}),o.animate(n,{position:molePosition(e,s,!1)},{duration:.28,delay:.14,easing:"easeIn"}),o.animate(n,{scale:i},{duration:.01,delay:.45});const[a,,r]=e.holes[s];effects.sparkle(o,{position:[a,.75*moleTop(e),r],count:14,size:.06*e.spacing,speed:2.2*e.spacing,direction:[0,1,0],spread:1.1,lifetime:.55,gravity:4*-e.spacing,colors:[toColor("#FFD700"),toColor("#FFF59D"),toColor("#FFA500")]})}export function thud(o,e,t){const[s,,n]=e.holes[t];effects.shatter(o,{position:[s,.05*e.spacing,n],count:8,mesh:"sphere",size:.05*e.spacing,speed:1.6*e.spacing,direction:[0,1,0],spread:1.2,lifetime:.45,gravity:6*-e.spacing,colors:[toColor("#7A4E2D"),toColor("#A27449")],flash:!1})}const STREAK=[2.2,1.85,.7,.95],FLASH=[2.4,2.1,1.2,.8],DUST=[.86,.74,.56,.6];function dust(o,e,t,s){const[n,,i]=e.holes[t],a=e.spacing;effects.dust(o,{position:[n,.05*a,i],count:Math.round(10*s),size:.22*a*s,speed:2.2*a*s,direction:[0,1,0],spread:1.45,lifetime:.5,color:DUST,endSize:2.2})}export function hitEffect(o,e,t){const[s,,n]=e.holes[t],i=e.spacing,a=[s,.8*moleTop(e),n+.2*i];effects.flash(o,{position:a,color:FLASH,size:.5*i,lifetime:.16,endSize:2.4});const r=Math.random()*Math.PI;for(let e=0;e<8;e++){const t=r+e/8*Math.PI*2,[s,n]=[Math.cos(t),Math.sin(t)],l=.32*i,m=i*(.75+e%2*.2),p=o.spawn({mesh:"cube",position:[a[0]+s*l,a[1]+n*l,a[2]],rotation:quat.z(t),scale:[.2*i,.05*i,.02*i],color:STREAK,pickable:!1});o.animate(p,{position:[a[0]+s*m,a[1]+n*m,a[2]],scale:[.04*i,.012*i,.02*i],color:[STREAK[0],STREAK[1],STREAK[2],0]},{duration:.26,easing:"easeOut"}).then(()=>{o.has(p)&&o.despawn(p)})}dust(o,e,t,1)}export function missEffect(o,e,t){dust(o,e,t,.6)}export function hideAll(o,e,t){t.moles.forEach((t,s)=>{o.stopAnimation(t),o.set(t,{position:molePosition(e,s,!1),scale:moleScale(e),rotation:quat.y(0)})})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{createSearchGame}from"../search-grid/SearchGrid.js";import{WORDS}from"./WordSearchWords.js";export const WordSearch=createSearchGame({gameId:GAME_IDS.WORD_SEARCH,list:WORDS,alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",sounds:GAME_SOUNDS.WORD_SEARCH,winTitle:"ALL WORDS FOUND!",winMessage:"Great word hunting!",startSubtext:"Find hidden words!",variant:"word",displayName:"WordSearch"});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const WORDS=["BABY","BACK","BAKE","BALL","BAND","BANK","BARN","BATH","BEAR","BELL","BELT","BIKE","BIRD","BLUE","BOAT","BODY","BOLT","BOMB","BONE","BOOK","BOOT","BOWL","BURN","BUSH","CAGE","CAKE","CALM","CAMP","CAPE","CARD","CART","CAVE","CHEF","CHIP","CITY","CLAP","CLAY","CLIP","CLUB","CLUE","COAL","COAT","COIN","COLD","COMB","COOK","COOL","COPY","CORN","COZY","CRAB","CREW","CROP","CROW","CUBE","CURE","CURL","CUTE","DARK","DART","DAWN","DEAL","DEAR","DECK","DEEP","DEER","DESK","DICE","DIRT","DISH","DOCK","DOME","DOOR","DOVE","DRAW","DRUM","DUCK","DUMP","DUNE","DUST","EARN","EAST","EASY","ECHO","EDGE","FACE","FAIR","FALL","FAME","FARM","FAST","FEAR","FEED","FEEL","FILM","FIND","FINE","FIRE","FISH","FLAG","FLAT","FLIP","FLOW","FOAM","FOLD","FOLK","FOOD","FOOL","FOOT","FORK","FORM","FORT","FOUR","FREE","FROG","FUEL","FULL","GAME","GATE","GEAR","GIFT","GIRL","GLAD","GLOW","GLUE","GOAT","GOLD","GOLF","GOOD","GRAY","GROW","GUST","HAIL","HAIR","HALF","HALL","HAND","HARE","HARP","HAWK","HEAD","HEAL","HEAR","HEAT","HELP","HERB","HERO","HIDE","HIGH","HIKE","HILL","HINT","HOLD","HOLE","HOME","HOOD","HOOK","HOPE","HORN","HOST","HOUR","HUGE","HUNT","HURT","ICON","IDEA","IRON","ISLE","ITEM","JACK","JADE","JAIL","JAZZ","JEAN","JOKE","JUMP","JURY","JUST","KEEN","KEEP","KICK","KIDS","KIND","KING","KISS","KITE","KNEE","KNIT","KNOB","KNOT","LACE","LAKE","LAMB","LAMP","LAND","LANE","LAST","LATE","LAWN","LEAD","LEAF","LEAN","LEAP","LEFT","LENS","LIFE","LIFT","LIKE","LIME","LINE","LINK","LION","LIST","LIVE","LOAD","LOAF","LOCK","LOGO","LONG","LOOK","LOOP","LORD","LOUD","LOVE","LUCK","LUNG","MAIL","MAKE","MALL","MANE","MANY","MASK","MAZE","MEAL","MEAT","MENU","MILD","MILK","MILL","MIND","MINE","MINT","MISS","MIST","MOON","MOSS","MOTH","MUCH","MULE","NAIL","NAME","NAVY","NEAR","NECK","NEST","NEWS","NICE","NINE","NOSE","NOTE","OAKS","OVEN","PACK","PAGE","PAID","PAIL","PAIR","PALM","PARK","PATH","PEAK","PEAR","PEEL","PETS","PICK","PINE","PINK","PIPE","PLAN","PLAY","PLUM","POEM","POND","POOL","PONY","PORT","POST","POUR","PULL","PUMP","PURE","QUIZ","RACE","RACK","RAFT","RAIN","RANK","RARE","READ","REAL","REED","REEF","RICE","RICH","RIDE","RING","RISE","ROAD","ROAM","ROCK","ROLE","ROLL","ROOF","ROOM","ROOT","ROPE","ROSE","RUBY","RUIN","RULE","RUSH","SAFE","SAGE","SAIL","SALT","SAND","SAVE","SEAL","SEAT","SEED","SHIP","SHOE","SHOP","SHOW","SIDE","SIGN","SILK","SING","SINK","SIZE","SKIN","SKIP","SLED","SLIM","SLIP","SLOW","SLUG","SNAP","SNOW","SOAP","SOCK","SOFA","SOFT","SOIL","SOLE","SONG","SOON","SORT","SOUL","SOUP","SOUR","SPIN","SPOT","STAR","STAY","STEM","STEP","STEW","STOP","SUCH","SUIT","SURE","SURF","SWAN","SWIM","TAIL","TAKE","TALE","TALK","TALL","TANK","TAPE","TAXI","TEAM","TEAR","TENT","TEST","THIN","TIDE","TILE","TIME","TINY","TOAD","TOLD","TOLL","TONE","TOOL","TOPS","TORN","TOUR","TOWN","TOYS","TRAP","TRAY","TREE","TRIM","TRIP","TRUE","TUBE","TUNA","TUNE","TURN","TWIN","TYPE","UNIT","UPON","USED","VASE","VEST","VIEW","VINE","VOTE","WADE","WAGE","WAIT","WAKE","WALK","WALL","WAND","WARM","WARN","WASH","WAVE","WEAK","WEAR","WEEK","WELL","WEST","WHAT","WHEN","WIDE","WIFE","WILD","WILL","WIND","WINE","WING","WIRE","WISE","WISH","WOLF","WOOD","WOOL","WORD","WORK","WORM","WRAP","YARD","YEAR","YOGA","YOLK","ZERO","ZONE","ZOOM","APPLE","ANGEL","BEACH","BERRY","BLOCK","BOARD","BONUS","BRAIN","BRAVE","BREAD","BRICK","BRIDE","BRUSH","BUILD","CABIN","CAMEL","CANDY","CHAIR","CHARM","CHEAP","CHECK","CHESS","CHIEF","CHILD","CHINA","CLEAN","CLEAR","CLIMB","CLOCK","CLOSE","CLOTH","CLOUD","COACH","COAST","COLOR","CORAL","COUCH","COUNT","COURT","COVER","CRAFT","CRANE","CRASH","CRAZY","CREAM","CROSS","CROWD","CROWN","CRUSH","CURVE","CYCLE","DAILY","DAIRY","DANCE","DEPTH","DIVER","DIZZY","DONOR","DOUBT","DOUGH","DRAFT","DRAIN","DRAMA","DREAM","DRESS","DRINK","DRIVE","DUSTY","EAGLE","EARLY","EARTH","ELBOW","EMPTY","ENEMY","ENJOY","ENTER","EQUAL","EVENT","EVERY","EXTRA","FAIRY","FAITH","FEAST","FENCE","FIELD","FIFTY","FINAL","FLAME","FLASH","FLEET","FLOAT","FLOOD","FLOOR","FLOUR","FLUTE","FOCUS","FORCE","FRAME","FRESH","FRONT","FROST","FRUIT","FUNNY","GHOST","GIANT","GLASS","GLOBE","GLOVE","GOOSE","GRACE","GRAIN","GRAND","GRAPE","GRASS","GRAVE","GREAT","GREEN","GREET","GROUP","GUARD","GUESS","GUIDE","HAPPY","HEART","HEAVY","HELLO","HONEY","HORSE","HOTEL","HOUSE","HUMAN","HUMOR","HURRY","IGLOO","IMAGE","INNER","INPUT","IVORY","JELLY","JEWEL","JOINT","JOKER","JUDGE","JUICE","KAYAK","KNIFE","KNOCK","KOALA","LABEL","LARGE","LASER","LATER","LAUGH","LAYER","LEARN","LEMON","LEVEL","LIGHT","LIMIT","LINEN","LIVER","LOCAL","LODGE","LOGIC","LOOSE","LOVER","LUCKY","LUNAR","LUNCH","MAGIC","MAJOR","MANGO","MANOR","MAPLE","MARCH","MATCH","MAYOR","MEDAL","MELON","METAL","MINOR","MODEL","MONEY","MONTH","MOOSE","MOTOR","MOUNT","MOUSE","MOUTH","MOVIE","MUDDY","MUSIC","NIGHT","NOBLE","NOISE","NORTH","NOVEL","NURSE","OCEAN","OLIVE","ONION","OPERA","ORDER","ORGAN","OTHER","OTTER","OUTER","OWNER","PAINT","PANDA","PANEL","PAPER","PARTY","PASTA","PATCH","PAUSE","PEACE","PEACH","PEARL","PENNY","PHONE","PHOTO","PIANO","PILOT","PIZZA","PLACE","PLAIN","PLANE","PLANT","PLATE","PLAZA","PLUMB","POINT","POLAR","POUND","POWER","PRESS","PRICE","PRIDE","PRIME","PRINT","PRIZE","PROOF","PROUD","PUPPY","QUEEN","QUEST","QUICK","QUIET","QUILT","QUOTE","RADAR","RADIO","RAISE","RANCH","RANGE","RAPID","RAVEN","REACH","READY","RIDER","RIGHT","RIVER","ROBIN","ROBOT","ROCKY","ROUND","ROUTE","ROYAL","RUGBY","RULER","SALAD","SAUCE","SCALE","SCENE","SCENT","SCORE","SCOUT","SHADE","SHAKE","SHAPE","SHARE","SHARK","SHARP","SHEEP","SHEET","SHELF","SHELL","SHIFT","SHINE","SHIRT","SHOCK","SHORE","SHORT","SHOUT","SIGHT","SILLY","SINCE","SKATE","SKILL","SKULL","SLEEP","SLICE","SLIDE","SMART","SMELL","SMILE","SMOKE","SNACK","SNAKE","SOLAR","SOLID","SOLVE","SOUTH","SPACE","SPARE","SPARK","SPEAK","SPEED","SPEND","SPICE","SPINE","SPLIT","SPOON","SPORT","SPRAY","SQUAD","STACK","STAFF","STAGE","STAIR","STAKE","STAMP","STAND","START","STATE","STEAK","STEAM","STEEL","STEEP","STEER","STICK","STILL","STOCK","STONE","STORE","STORM","STORY","STOVE","STRAW","STRIP","STUDY","STUFF","STYLE","SUGAR","SUITE","SUNNY","SUPER","SWEET","SWIFT","SWING","SWORD","TABLE","TASTE","TEACH","TEETH","THANK","THEME","THICK","THING","THINK","THORN","THREE","THROW","THUMB","TIGER","TIGHT","TIMER","TITLE","TOAST","TODAY","TOKEN","TOOTH","TORCH","TOTAL","TOUCH","TOUGH","TOWEL","TOWER","TRACK","TRADE","TRAIL","TRAIN","TRASH","TREAT","TREND","TRIAL","TRIBE","TRICK","TRUCK","TRULY","TRUST","TRUTH","TULIP","TWICE","TWIST","UNCLE","UNDER","UNION","UNITY","UNTIL","UPPER","URBAN","USUAL","VALID","VALUE","VIDEO","VIGOR","VIRAL","VISIT","VIVID","VOCAL","VOICE","VOTER","WAGON","WASTE","WATCH","WATER","WEAVE","WHALE","WHEAT","WHEEL","WHERE","WHILE","WHITE","WHOLE","WOMAN","WORLD","WORRY","WORTH","WOUND","WRITE","WRONG","YACHT","YOUNG","YOUTH","ZEBRA","ABSORB","ACCENT","ACCEPT","ACCESS","ACROSS","ACTION","ADMIRE","ADVICE","AFFORD","AGENDA","ALIENS","ALMOND","ALMOST","ALWAYS","AMOUNT","ANCHOR","ANIMAL","ANKLET","ANNUAL","ANSWER","APPEAL","ARCHER","ARTIST","ASLEEP","ASSIST","ASSUME","ATTACH","ATTACK","ATTEND","AUGUST","AUTUMN","AWAKEN","BACKER","BADGER","BAKERY","BALLET","BALLOT","BAMBOO","BANANA","BANGLE","BANKER","BANNER","BARBER","BARELY","BARREL","BASKET","BATTLE","BAZAAR","BEACON","BEAUTY","BEHIND","BELONG","BESIDE","BETTER","BEYOND","BISHOP","BITTER","BLANCH","BLAZER","BLOUSE","BOBCAT","BONSAI","BORDER","BORROW","BOTANY","BOTTLE","BOUNCE","BRANCH","BREEZE","BRIDGE","BRIGHT","BROKEN","BRONZE","BROWSE","BUBBLE","BUCKET","BUDGET","BUFFET","BUMBLE","BUNDLE","BURDEN","BUREAU","BURGER","BURNER","BUTTER","BUTTON","BUYERS","CACTUS","CAMERA","CAMPUS","CANARY","CANCEL","CANDLE","CANVAS","CANYON","CARBON","CARPET","CARROT","CASTLE","CASUAL","CATTLE","CELLAR","CENTER","CEREAL","CHANGE","CHAPEL","CHARGE","CHEESE","CHERRY","CHOICE","CHOOSE","CHURCH","CIRCLE","CIRCUS","CLOSET","COBALT","COBWEB","COFFEE","COLLAR","COLONY","COMEDY","COMMIT","COMMON","COOKIE","COPPER","CORNER","COSMOS","COTTON","COUPLE","COURSE","COUSIN","CRADLE","CREATE","CREDIT","CRISIS","CRUISE","CUPOLA","CUSTOM","CYMBAL","DAGGER","DAMSEL","DANCER","DANGER","DARING","DEBATE","DECENT","DECODE","DEFEAT","DEFEND","DEFINE","DEGREE","DEMAND","DEPEND","DESERT","DESIGN","DESIRE","DETAIL","DETECT","DEVICE","DEVOTE","DIALOG","DIAPER","DINNER","DIRECT","DIVIDE","DOCTOR","DOLLAR","DONKEY","DOUBLE","DRAGON","DRAWER","DRIVER","DUSTER","EARNED","EASILY","EATING","EDITOR","EFFORT","EIGHTH","ELDERS","ELEVEN","EMBARK","EMERGE","EMPIRE","ENABLE","ENERGY","ENGINE","ENOUGH","ENSURE","ENTIRE","ERASER","ESCAPE","ESTATE","EVOLVE","EXCEED","EXCEPT","EXCITE","EXCUSE","EXEMPT","EXHALE","EXPAND","EXPECT","EXPERT","EXPORT","EXPOSE","EXTEND","FABRIC","FACIAL","FACTOR","FAIRLY","FALCON","FALLEN","FAMILY","FAMINE","FAMOUS","FARMER","FATHER","FAUCET","FEALTY","FEEBLE","FELLOW","FERRET","FIESTA","FIGURE","FILTER","FINDER","FINGER","FINISH","FISHER","FLIGHT","FLOWER","FLUFFY","FLYING","FOLLOW","FONDUE","FOREST","FORGET","FORMAT","FORMER","FOSSIL","FOSTER","FREEZE","FRIEND","FRIGHT","FROZEN","FUMBLE","FUTURE","GADGET","GALAXY","GALLON","GALLOP","GAMBLE","GARAGE","GARDEN","GARLIC","GATHER","GAZING","GENTLE","GENTLY","GEYSER","GINGER","GLOBAL","GLOSSY","GOBLET","GOLDEN","GOLFER","GOSPEL","GOSSIP","GOVERN","GRAVEL","GREASE","GROUND","GROWTH","GUITAR","GUTTER","GYPSUM","HAIRDO","HAMLET","HAMMER","HAMPER","HANDLE","HANGAR","HAPPEN","HARBOR","HARDLY","HEAVEN","HELMET","HELPER","HERBAL","HEROES","HIDDEN","HIKING","HOBBIT","HOCKEY","HOLLOW","HONEST","HOODIE","HOPING","HORROR","HOSTEL","HUDDLE","HUMBLE","HUNGER","HUNTER","HURDLE","HUSTLE","HYBRID","HYPHEN","ICICLE","IGNITE","IMMUNE","IMPACT","IMPORT","IMPOSE","INCOME","INDEED","INDOOR","INFECT","INFORM","INJURE","INSECT","INSERT","INSIDE","INSIST","INSULT","INTACT","INTEND","INVENT","INVEST","INVITE","INWARD","ISLAND","ITSELF","JACKET","JAGUAR","JARGON","JERSEY","JIGSAW","JINGLE","JOCKEY","JOVIAL","JUMBLE","JUMPER","JUNGLE","JUNIOR","KARATE","KENNEL","KERNEL","KETTLE","KILLER","KINDLY","KITTEN","KNIGHT","LADDER","LAGOON","LAPTOP","LAUNCH","LAVISH","LAWYER","LEADER","LEAGUE","LENDER","LESSON","LETTER","LIGHTS","LIKELY","LINING","LIQUID","LISTEN","LITTER","LITTLE","LIVELY","LIZARD","LOCKER","LONELY","LOVELY","LUXURY","MAGNET","MAIDEN","MANAGE","MANGLE","MANNER","MARBLE","MARKET","MASCOT","MASTER","MATTER","MEADOW","MEDIUM","MELLOW","MELODY","MEMORY","MENTAL","MENTOR","MIDDLE","MIGHTY","MILLER","MINUTE","MIRROR","MOBILE","MODERN","MODIFY","MOMENT","MONKEY","MOSAIC","MOTHER","MOTION","MUFFIN","MUMBLE","MURDER","MUSCLE","MUSEUM","MUZZLE","MYRTLE","MYRIAD","NAPKIN","NARROW","NATION","NATURE","NEARBY","NEARLY","NEEDLE","NICKEL","NIMBLE","NOODLE","NORMAL","NOTICE","NOTIFY","NUMBER","NURSED","NUTMEG","OBJECT","OBTAIN","OCCUPY","OFFEND","OFFICE","OLDEST","ONLINE","OPENER","OPPOSE","OPTION","ORANGE","ORCHID","ORIGIN","OSPREY","OUTFIT","OUTLET","OUTPUT","OUTRUN","OYSTER","PADDLE","PALACE","PARCEL","PARENT","PARROT","PASTOR","PASTRY","PATROL","PATRON","PATTER","PEBBLE","PENCIL","PEOPLE","PEPPER","PERMIT","PERSON","PHRASE","PICKLE","PICNIC","PIGEON","PILLAR","PILLOW","PIRATE","PISTOL","PLANET","PLAYER","PLEDGE","PLENTY","PLIERS","PLUNGE","POCKET","POETRY","POISON","POLICY","POLISH","POLITE","POLLEN","PONDER","POPLAR","PORTAL","POSTER","POTATO","POTTER","POWDER","PRAYER","PREFIX","PRINCE","PRISON","PROFIT","PROMPT","PROPEL","PROVEN","PUBLIC","PUDDLE","PUPPET","PURPLE","PURSUE","PUZZLE","PYTHON","QUARRY","QUARTZ","RABBIT","RACKET","RADISH","RANDOM","RANGER","RANSOM","RAPTOR","RATTLE","RAVINE","REASON","REBOOT","RECALL","RECIPE","RECORD","REDUCE","REFORM","REFUGE","REGARD","REGION","REGRET","REJECT","RELATE","RELIEF","REMAIN","REMEDY","REMIND","REMOTE","REMOVE","RENDER","RENTAL","REPAIR","REPEAT","REPORT","RESCUE","RESIGN","RESIST","RESORT","RESULT","RETAIL","RETAIN","RETIRE","RETURN","REVEAL","REVIEW","REVOLT","REWARD","RIBBON","RIDING","RIPPLE","RITUAL","ROBUST","ROCKET","ROLLER","ROOKIE","RUBBER","RUBBLE","RUMBLE","RUNNER","RUSTIC","SADDLE","SAFARI","SAFELY","SAFETY","SAILOR","SALMON","SALOON","SAMPLE","SANDAL","SAVORY","SCENIC","SCHOOL","SCREEN","SCROLL","SEARCH","SEASON","SECURE","SELECT","SEQUEL","SERENE","SETTLE","SHADOW","SHIELD","SIGNAL","SILVER","SIMPLE","SINGLE","SISTER","SKETCH","SLEEVE","SLIDER","SMOOTH","SNATCH","SOCCER","SOCIAL","SOCKET","SOFTLY","SORROW","SOURCE","SPIRAL","SPIRIT","SPLASH","SPONGE","SPORTS","SPREAD","SPRING","SQUARE","STABLE","STREAM","STREET","STRICT","STRING","STRIPE","STRONG","STUDIO","SUBMIT","SUBTLE","SUDDEN","SUFFIX","SUMMER","SUMMIT","SUNKEN","SUNSET","SUPERB","SUPPLY","SURELY","SURVEY","SWITCH","SYMBOL","SYNTAX","SYSTEM","TABLET","TACKLE","TAILOR","TALENT","TARGET","TEAPOT","TEMPLE","TENANT","TENDER","TENNIS","TERROR","THIRST","THORNY","THREAD","THRILL","THRONE","THRONG","TICKET","TIMBER","TIMELY","TIPTOE","TISSUE","TOGGLE","TONGUE","TROPHY","TUMBLE","TUNDRA","TUNNEL","TURKEY","TURTLE","TUXEDO","UNFAIR","UNFOLD","UNIQUE","UNLESS","UNLIKE","UNLOCK","UNREST","UNSAFE","UNSEEN","UNWIND","UPDATE","UPHOLD","UPKEEP","UPBEAT","VALLEY","VANISH","VELVET","VENDOR","VERIFY","VESSEL","VICTIM","VIOLIN","VIRTUE","VISION","VISUAL","VOLUME","VOYAGE","WAFFLE","WALKER","WALLET","WALNUT","WALRUS","WANDER","WARMTH","WEAPON","WEEKLY","WICKED","WIDGET","WIGGLY","WINDOW","WINNER","WINTER","WISDOM","WIZARD","WONDER","WORKER","WORTHY","WREATH","WRITER","ZENITH","ZIGZAG","ZIPPER","ZODIAC"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const PATTERN_RAINBOW=["#E91E63","#F44336","#FF5722","#FF9800","#FFC107","#8E24AA","#CDDC39","#8BC34A","#4CAF50","#009688","#00BCD4","#03A9F4","#2196F3","#3F51B5","#9C27B0"];const R=PATTERN_RAINBOW;export const PATTERN_GRID_COLOR="rgba(0, 0, 0, 0.02)";const seededRandom=r=>{const t=43758.5453*Math.sin(12.9898*r+78.233*r);return t-Math.floor(t)},hexAlpha=r=>Math.floor(255*r).toString(16).padStart(2,"0");export function gamePattern(r,t){const o=[{start:[0,0],end:[r,t],colors:[R[0]+"40",R[2]+"35",R[4]+"40",R[6]+"35",R[8]+"40",R[10]+"35",R[12]+"40",R[14]+"35"]},{start:[0,0],end:[r/2,t/2],colors:[R[1]+"25","transparent",R[5]+"25","transparent",R[9]+"25","transparent",R[13]+"25","transparent"]},{start:[r,0],end:[0,t],colors:[R[3]+"20","transparent",R[7]+"20","transparent",R[11]+"20","transparent"]}],e=[];for(let o=0;o<20;o++){const n=r/20*o+40*Math.sin(.5*o)+80*seededRandom(3*o+1),a=t/20*o+50*Math.cos(.7*o)+100*seededRandom(3*o+2),s=24+24*seededRandom(3*o+3),d=""+R[o%R.length]+hexAlpha(.2+.1*Math.sin(o)),h=Math.max(s,Math.min(r-s,n)),i=Math.max(s,Math.min(t-s,a));switch(o%5){case 0:e.push({kind:"circle",cx:h+s/2,cy:i+s/2,r:s/2,color:d});break;case 1:e.push({kind:"rrect",x:h,y:i,w:s,h:s,r:.2*s,color:d});break;case 2:e.push({kind:"rrect",x:h,y:i,w:.55*s,h:1.3*s,r:.12*s,color:d});break;case 3:e.push({kind:"rrect",x:h,y:i,w:1.3*s,h:.55*s,r:.12*s,color:d});break;default:e.push({kind:"diamond",cx:h+s/2,cy:i+s/2,size:s,color:d})}}const n=r=>R[r]+"30";e.push({kind:"circle",cx:.1*r,cy:.15*t,r:40,color:n(0)},{kind:"rrect",x:.85*r,y:.82*t,w:70,h:70,r:14,color:n(3)},{kind:"diamond",cx:.85*r,cy:.2*t,size:60,color:n(8)},{kind:"rrect",x:.1*r,y:.77*t,w:90,h:40,r:8,color:n(12)},{kind:"circle",cx:.5*r,cy:.1*t,r:25,color:n(14)},{kind:"rrect",x:.17*r,y:.47*t,w:36,h:64,r:8,color:n(6)},{kind:"diamond",cx:.8*r,cy:.6*t,size:56,color:n(10)},{kind:"rrect",x:.56*r,y:.87*t,w:50,h:50,r:10,color:n(1)},{kind:"circle",cx:.3*r,cy:.25*t,r:24,color:n(4)},{kind:"rrect",x:.66*r,y:.32*t,w:56,h:30,r:6,color:n(9)});const a=[];for(let o=0;o<Math.floor(r/40);o++)a.push({x:40*o,y:0,w:1,h:t});for(let o=0;o<Math.floor(t/40);o++)a.push({x:0,y:40*o,w:r,h:1});return{width:r,height:t,gradients:o,shapes:e,grid:a}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _0x57c4(W,e){W-=407;const b=_0x49ff();let x=b[W];if(void 0===_0x57c4.fuCtAT){const W=function(W,e){let b,x,t=[],o=0,d="";for(W=function(W){let e="",b="";for(let b,x,t=0,o=0;x=W.charAt(o++);~x&&(b=t%4?64*b+x:x,t++%4)?e+=String.fromCharCode(255&b>>(-2*t&6)):0)x="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(x);for(let W=0,x=e.length;W<x;W++)b+="%"+("00"+e.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(b)}(W),x=0;x<256;x++)t[x]=x;for(x=0;x<256;x++)o=(o+t[x]+e.charCodeAt(x%e.length))%256,b=t[x],t[x]=t[o],t[o]=b;x=0,o=0;for(let e=0;e<W.length;e++)x=(x+1)%256,o=(o+t[x])%256,b=t[x],t[x]=t[o],t[o]=b,d+=String.fromCharCode(W.charCodeAt(e)^t[(t[x]+t[o])%256]);return d};_0x57c4.XhsJxt=W,_0x57c4.zxFxya={},_0x57c4.fuCtAT=!0}const t=b[0];_0x57c4.yYKmLd!==t&&(_0x57c4.zxFxya={},_0x57c4.yYKmLd=t);const o=_0x57c4.zxFxya[W];return void 0===o?(void 0===_0x57c4.qhqgeC&&(_0x57c4.qhqgeC=!0),x=_0x57c4.XhsJxt(x,e),_0x57c4.zxFxya[W]=x):x=o,x}const _0x1103bb=_0x57c4;!function(){const W=_0x57c4,e=_0x49ff();for(;;)try{if(331889==-parseInt(W(661,"UPq%"))/1+parseInt(W(695,"Ju@q"))/2+parseInt(W(687,"mYw*"))/3*(parseInt(W(598,"IaG$"))/4)+parseInt(W(670,"3mnm"))/5*(parseInt(W(508,"BXZ!"))/6)+-parseInt(W(433,"UIBr"))/7*(-parseInt(W(575,"Yu2C"))/8)+-parseInt(W(708,"AW]m"))/9*(parseInt(W(490,"hBe#"))/10)+parseInt(W(520,"$6Gr"))/11*(-parseInt(W(614,"$6Gr"))/12))break;e.push(e.shift())}catch(W){e.push(e.shift())}}();import{c as _0x29bb2c}from"react/compiler-runtime";import _0x4b2fbb,{useEffect,useRef}from"react";import{View,Text,ScrollView,TouchableOpacity,StyleSheet,Modal,Animated,Pressable}from"react-native";import _0x17be00,{Easing,useAnimatedStyle,useSharedValue,withDelay,withSpring,withTiming}from"react-native-reanimated";import{getGameTitle,COLORS,BACKGROUND_COLOR}from"../services/GamesConstants.js";import{isTablet}from"../services/UtilsService.js";import{GAMES_METADATA}from"../services/GamesMetadata.js";import{GameBackground}from"./GameBackgroundPattern.js";import{VolumeIcon,HapticIcon,BookIcon}from"./Icons.js";import{jsx as _0xbf0708,jsxs as _0x547bb7}from"react/jsx-runtime";const CustomSwitch=_0x4b2fbb[_0x1103bb(631,"3cW9")](({value:W,onValueChange:e})=>{const b=_0x1103bb,x=useRef(new Animated.Value(W?1:0))[b(684,"zwlO")],t=useRef(W);({eysLa:function(W,e,b){return W(e,b)}})[b(496,"jd1J")](useEffect,()=>{const e=b;if(t.current!==W){const b={};b.toValue=W?1:0,b[e(679,"BXZ!")]=!1,b[e(513,"1UWK")]=8,b.tension=100,Animated[e(719,"j834")](x,b).start(),t[e(452,"J$PJ")]=W}},[W,x]);const o={inputRange:[0,1]};o[b(448,"D01P")]=[3,25];const d=useRef(x[b(714,"BVMr")](o))[b(628,"s26]")],n={};n[b(649,"$6Gr")]=[0,1],n.outputRange=[COLORS[b(478,"hBe#")],COLORS[b(567,"i08x")]];const _=useRef(x[b(651,"v2Mo")](n))[b(469,"[)L@")],s={};s[b(663,"HmVo")]=_;const a={};return a[b(590,"!&O8")]=d,_0xbf0708(Pressable,{onPress:()=>e(!W),children:_0xbf0708(Animated[b(572,"A8LK")],{style:[styles.switchTrack,s],children:_0xbf0708(Animated[b(519,"p!)C")],{style:[styles[b(420,"!q]b")],a]})})})});export const GameSettingsModal=W=>{const e="6NBV",b="j834",x="1(YK",t="HmVo",o="rv!8",d="2yzS",n="i08x",_="BXZ!",s="[H0o",a="3mnm",i=_0x1103bb,r={UBAth:i(718,"A8LK"),DiAWs:function(W,e,b){return W(e,b)},knScM:function(W,e){return W(e)},CIQaL:function(W,e){return W!==e},praEL:function(W,e){return W(e)},kpBoo:function(W,e){return W(e)},xStlj:function(W,e){return W!==e},tcURp:"PZoyF",OwWxu:i(428,"3mnm"),BSdVk:i(465,"BXZ!"),nqlWZ:function(W,e){return W!==e},tAaYm:function(W,e,b){return W(e,b)},vZuqE:function(W,e){return W!==e},iIsPK:i(426,"KaD@"),ZvGwq:function(W,e,b){return W(e,b)},mRNAV:function(W,e){return W===e},NlkSr:function(W,e,b){return W(e,b)},mAlFa:function(W,e,b){return W(e,b)},gaOjh:function(W,e,b){return W(e,b)},OaBsU:function(W,e){return W!==e},CsAyG:function(W,e,b){return W(e,b)}},k=_0x29bb2c(67),{gameId:l,settings:m,onSettingsChange:f}=W,u=void 0===f?_temp:f;let S;k[0]!==l?(S=r[i(610,"rv!8")](getGameTitle,l),k[0]=l,k[1]=S):S=k[1];const C=S+i(604,e),O=GAMES_METADATA[l],{isVisible:R,enableSounds:h,enableHaptics:y}=m,P=r[i(540,"[H0o")](useSharedValue,.85),K=r[i(557,"]RM[")](useSharedValue,0),G=r[i(720,"HmVo")](useSharedValue,18),Q=useSharedValue(0),q=useSharedValue(18),V=useSharedValue(0),J=r[i(423,"$6Gr")](useSharedValue,18),p=useSharedValue(0);let g,T;r[i(525,"a7Mx")](k[2],K)||k[3]!==P||k[4]!==G||k[5]!==Q||k[6]!==J||k[7]!==p||k[8]!==R||k[9]!==q||k[10]!==V?(g=()=>{const W=i,e=r[W(595,"eKT1")][W(606,"1UWK")]("|");let b=0;for(;;){switch(e[b++]){case"0":if(!R)return P[W(457,"xtN5")]=.85,K[W(446,"SX1u")]=0,G[W(532,"IaG$")]=18,Q[W(579,a)]=0,q[W(701,"a7Mx")]=18,V[W(625,"J$PJ")]=0,J[W(713,"qa1Z")]=18,void(p[W(411,"CHQg")]=0);continue;case"1":V.value=withDelay(200,withTiming(1,{duration:220,easing:Easing[W(645,"KaD@")](Easing[W(636,"J$PJ")])}));continue;case"2":const e={};e[W(535,"A8LK")]=14,e[W(444,"i08x")]=200,J[W(558,"UPq%")]=r.DiAWs(withDelay,330,withSpring(0,e));continue;case"3":const b={};b[W(481,"1UWK")]=14,b[W(655,"v2Mo")]=200,q[W(411,"CHQg")]=withDelay(200,withSpring(0,b));continue;case"4":Q.value=withDelay(90,withTiming(1,{duration:220,easing:Easing[W(554,"IaG$")](Easing[W(622,"W]wE")])}));continue;case"5":const x={};x[W(642,"j834")]=13,x[W(550,"$6Gr")]=210,P[W(716,"2yzS")]=withSpring(1,x);continue;case"6":K[W(502,"j834")]=withTiming(1,{duration:160,easing:Easing.out(Easing[W(648,"2yzS")])});continue;case"7":p[W(568,"hBe#")]=withDelay(330,withTiming(1,{duration:220,easing:Easing[W(527,"jd1J")](Easing[W(612,a)])}));continue;case"8":const t={damping:14};t[W(551,"UIBr")]=200,G[W(712,"!q]b")]=withDelay(90,withSpring(0,t));continue}break}},T=[R,P,K,G,Q,q,V,J,p],k[2]=K,k[3]=P,k[4]=G,k[5]=Q,k[6]=J,k[7]=p,k[8]=R,k[9]=q,k[10]=V,k[11]=g,k[12]=T):r.tcURp!==r[i(434,"KaD@")]?_0x3a6201=_0x97921d[18]:(g=k[11],T=k[12]),useEffect(g,T);const L={};L[i(705,"3mnm")]=P.value;const w=r.praEL(useAnimatedStyle,()=>({opacity:K[i(699,"]RM[")],transform:[L]})),N={};N[i(694,b)]=G.value;const v=useAnimatedStyle(()=>({opacity:Q[i(703,"7q&%")],transform:[N]})),B={};B[i(681,"UIBr")]=q.value;const H=useAnimatedStyle(()=>({opacity:V[i(558,"UPq%")],transform:[B]})),F={};F[i(511,"UPq%")]=J[i(616,"*!1s")];const I=useAnimatedStyle(()=>({opacity:p[i(712,"!q]b")],transform:[F]}));let E;k[13]!==u||k[14]!==m?(E=W=>{const e=i,b={...m};b[e(421,"SX1u")]=W,u(b)},k[13]=u,k[14]=m,k[15]=E):E=k[15];const M=E;let A;if(k[16]!==u||k[17]!==m)A=W=>{const e=i,b={...m};b[e(607,"WhYV")]=W,r.knScM(u,b)},k[16]=u,k[17]=m,k[18]=A;else if(r[i(432,"Yu2C")]!==r[i(574,"7q&%")])A=k[18];else if(PCnMLE[i(689,"IaG$")](_0x521c7b.current,_0x44dac3)){const W={};W[i(624,"KaD@")]=_0x2a705f?1:0,W.useNativeDriver=!1,W.friction=8,W[i(657,b)]=100,_0x82deea[i(521,x)](_0x4e15a7,W).start(),_0x2a8495[i(542,"a7Mx")]=_0x29a57f}const j=A;let Z;r[i(410,"2yzS")](k[19],u)||k[20]!==m?(Z=()=>{const W=i,e={...m};e[W(585,"j834")]=!1,r.praEL(u,e)},k[19]=u,k[20]=m,k[21]=Z):Z=k[21];const D=Z;let z,U,X,Y,WW,eW,cW,bW,xW,tW,oW,dW,nW,_W,sW,aW,iW,rW,kW,lW;if(r[i(473,"WhYV")](k[22],w)?(z=[styles.container,w],k[22]=w,k[23]=z):z=k[23],k[24]===Symbol[i(547,"jd1J")](i(505,"$6Gr"))?(U=r[i(609,"j834")](_0xbf0708,View,{style:StyleSheet[i(440,"s26]")],children:_0xbf0708(GameBackground,{children:_0xbf0708(View,{})})}),k[24]=U):U=k[24],r.vZuqE(k[25],v)?(X=[styles.header,v],k[25]=v,k[26]=X):X=k[26],k[27]!==C){const W={};W.style=styles[i(499,"Yu2C")],W[i(561,e)]=C,Y=_0xbf0708(Text,W),k[27]=C,k[28]=Y}else Y=k[28];if(k[29]===Symbol[i(608,"qa1Z")](r[i(541,"mYw*")])){const W={};W.style=styles.closeButtonText,W[i(431,"1(YK")]="\u2715",WW=_0xbf0708(Text,W),k[29]=WW}else WW=k[29];if(k[30]!==D){const W={};W[i(504,"1UWK")]=D,W[i(597,"]RM[")]=styles[i(464,"Ju@q")],W[i(596,t)]=WW,eW=_0xbf0708(TouchableOpacity,W),k[30]=D,k[31]=eW}else eW=k[31];if(k[32]!==X||r.vZuqE(k[33],Y)||k[34]!==eW){const W={};W[i(672,"rv!8")]=X,W[i(408,"2yzS")]=[Y,eW],cW=r[i(600,"PG&9")](_0x547bb7,_0x17be00[i(419,"1UWK")],W),k[32]=X,k[33]=Y,k[34]=eW,k[35]=cW}else cW=k[35];if(k[36]!==H)bW=[styles[i(623,o)],H],k[36]=H,k[37]=bW;else if("nYDKB"!==i(524,"IaG$"))bW=k[37];else{const W={};W.style=_0x3ef56a,W[i(559,"Yu2C")]=[_0x86f7ee,_0x194e3a,_0x51273],_0x337feb=_0x324494(_0x2ab00b,{style:_0x2523ea.overlay,children:_0x500151(_0x5879db[i(528,"Yu2C")],W)}),_0x2af9e7[59]=_0x4c5b8c,_0x194bfc[60]=_0x439295,_0x5ab138[61]=_0x31222a,_0x3fcd71[62]=_0x2e1712}if(r[i(620,"UPq%")](k[38],Symbol.for(i(546,"2yzS")))){const W={};W[i(427,"zwlO")]=22,W.color=COLORS.TEXT,xW=_0xbf0708(VolumeIcon,W),k[38]=xW}else xW=k[38];if(k[39]===Symbol[i(710,"Yu2C")](i(426,"KaD@"))?(tW=_0x547bb7(View,{style:styles[i(660,"3mnm")],children:[xW,r[i(497,"KaD@")](_0x547bb7,View,{children:[r[i(488,"[)L@")](_0xbf0708,Text,{style:styles[i(564,"IaG$")],children:i(602,"1(YK")}),_0xbf0708(Text,{style:styles[i(656,"D01P")],children:i(603,d)})]})]}),k[39]=tW):tW=k[39],k[40]!==h||k[41]!==M){const W={};W[i(468,n)]=h,W.onValueChange=M,oW=_0x547bb7(View,{style:styles.toggleContainer,children:[tW,_0xbf0708(CustomSwitch,W)]}),k[40]=h,k[41]=M,k[42]=oW}else oW=k[42];if(k[43]===Symbol[i(413,d)](i(483,"a7Mx"))){const W={};W.style=styles[i(677,"qa1Z")],dW=_0xbf0708(View,W),k[43]=dW}else dW=k[43];if(k[44]===Symbol[i(587,"!q]b")](r[i(429,"zwlO")])){const W={};W[i(659,"7q&%")]=22,W[i(471,"qa1Z")]=COLORS[i(514,t)],nW=_0xbf0708(HapticIcon,W),k[44]=nW}else nW=k[44];if(k[45]===Symbol.for(i(706,b))?(_W=r[i(584,"AW]m")](_0x547bb7,View,{style:styles[i(443,"BVMr")],children:[nW,_0x547bb7(View,{children:[r[i(484,"qa1Z")](_0xbf0708,Text,{style:styles[i(512,_)],children:"Haptic Feedback"}),_0xbf0708(Text,{style:styles[i(418,"hBe#")],children:i(630,"CHQg")})]})]}),k[45]=_W):_W=k[45],k[46]!==y||k[47]!==j){const W={};W.value=y,W[i(599,"Yu2C")]=j,sW=r[i(438,"xtN5")](_0x547bb7,View,{style:styles[i(685,"hBe#")],children:[_W,_0xbf0708(CustomSwitch,W)]}),k[46]=y,k[47]=j,k[48]=sW}else sW=k[48];if(k[49]!==bW||k[50]!==oW||k[51]!==sW){const W={};W[i(555,"J$PJ")]=bW,W[i(493,"p!)C")]=[oW,dW,sW],aW=_0x547bb7(_0x17be00[i(566,"W]wE")],W),k[49]=bW,k[50]=oW,k[51]=sW,k[52]=aW}else aW=k[52];if(k[53]!==O||k[54]!==I){const W={};W[i(516,x)]=18,W[i(463,"1UWK")]=COLORS[i(407,"H[^z")],iW=O&&_0x547bb7(_0x17be00[i(640,n)],{style:[styles[i(674,"3mnm")],I],children:[_0x547bb7(View,{style:styles[i(647,"xtN5")],children:[_0xbf0708(BookIcon,W),r[i(658,"j834")](_0xbf0708,Text,{style:styles[i(495,"j834")],children:"How to Play"})]}),_0xbf0708(Text,{style:styles[i(531,"]O@P")],children:O.description}),O.instructions[i(646,_)](_temp2)]}),k[53]=O,k[54]=I,k[55]=iW}else i(615,"W]wE")!==i(673,"nC^H")?iW=k[55]:(_0x45c3ea=[_0x41f479[i(486,"mYw*")],_0x30a7f9],_0x4bafc6[25]=_0x2f5b4e,_0x4a0a5b[26]=_0x542c60);if(r[i(556,"CHQg")](k[56],aW)||r.OaBsU(k[57],iW)){const W={};W.style=styles.scrollView,W[i(470,"HmVo")]=styles[i(430,"UIBr")],W.showsVerticalScrollIndicator=!1,W[i(445,o)]=[aW,iW],rW=r[i(683,"HmVo")](_0x547bb7,ScrollView,W),k[56]=aW,k[57]=iW,k[58]=rW}else rW=k[58];if(k[59]!==cW||r[i(565,"v2Mo")](k[60],rW)||k[61]!==z){const W={};W[i(639,"D01P")]=z,W[i(510,"!q]b")]=[U,cW,rW],kW=r[i(693,"6NBV")](_0xbf0708,View,{style:styles[i(717,"i08x")],children:_0x547bb7(_0x17be00[i(479,"Ju@q")],W)}),k[59]=cW,k[60]=rW,k[61]=z,k[62]=kW}else kW=k[62];if(k[63]!==D||k[64]!==R||r[i(498,s)](k[65],kW)){const W=i(436,"!q]b")[i(543,"zwlO")]("|");let e=0;for(;;){switch(W[e++]){case"0":k[63]=D;continue;case"1":k[65]=kW;continue;case"2":const W={};W.visible=R,W.animationType=i(569,"BVMr"),W[i(675,s)]=!0,W[i(501,"1(YK")]=D,W[i(530,"3cW9")]=kW,lW=_0xbf0708(Modal,W);continue;case"3":k[64]=R;continue;case"4":k[66]=lW;continue}break}}else lW=k[66];return lW};const _0x432193={};_0x432193[_0x1103bb(654,"A8LK")]=1,_0x432193.backgroundColor=COLORS.OVERLAY,_0x432193[_0x1103bb(682,"mYw*")]=_0x1103bb(451,"SX1u"),_0x432193[_0x1103bb(704,"H[^z")]=_0x1103bb(491,"v2Mo");const _0xe3133={};_0xe3133[_0x1103bb(613,"i08x")]="95%",_0xe3133[_0x1103bb(591,"1UWK")]=isTablet?500:360,_0xe3133[_0x1103bb(571,"KaD@")]=_0x1103bb(644,"BXZ!"),_0xe3133[_0x1103bb(635,"J$PJ")]=10,_0xe3133[_0x1103bb(621,"J$PJ")]=_0x1103bb(545,"s26]"),_0xe3133[_0x1103bb(539,"AW]m")]=BACKGROUND_COLOR;const _0x20e191={};_0x20e191[_0x1103bb(601,"KaD@")]="row",_0x20e191[_0x1103bb(577,"6NBV")]="space-between",_0x20e191[_0x1103bb(466,"HmVo")]=_0x1103bb(619,"1UWK"),_0x20e191[_0x1103bb(409,"1UWK")]=10,_0x20e191[_0x1103bb(485,"2yzS")]=16,_0x20e191.backgroundColor=COLORS[_0x1103bb(453,"a7Mx")];const _0x479fbb={fontSize:20};_0x479fbb[_0x1103bb(500,"IaG$")]=_0x1103bb(544,"i08x"),_0x479fbb[_0x1103bb(700,"j834")]=COLORS[_0x1103bb(412,"Qa83")];const _0xdddfc2={};_0xdddfc2[_0x1103bb(678,"J$PJ")]=8;const _0x44b17c={};_0x44b17c[_0x1103bb(476,"jd1J")]=18,_0x44b17c[_0x1103bb(480,"AW]m")]="semibold",_0x44b17c[_0x1103bb(456,"A8LK")]=COLORS.TEXT;const _0x4a4b0e={};_0x4a4b0e[_0x1103bb(573,"Ju@q")]=1,_0x4a4b0e[_0x1103bb(688,"BXZ!")]=10,_0x4a4b0e[_0x1103bb(582,"s26]")]=0;const _0x5e8e76={};_0x5e8e76[_0x1103bb(455,"H[^z")]=0;const _0x5e7ffa={};_0x5e7ffa[_0x1103bb(691,"BXZ!")]=12,_0x5e7ffa[_0x1103bb(686,"eKT1")]=16,_0x5e7ffa.marginBottom=10,_0x5e7ffa[_0x1103bb(474,"SX1u")]=COLORS[_0x1103bb(437,"6NBV")];const _0x2bbb41={};_0x2bbb41.flexDirection=_0x1103bb(552,"hBe#"),_0x2bbb41[_0x1103bb(637,"*!1s")]=_0x1103bb(507,"*!1s"),_0x2bbb41[_0x1103bb(425,"Ju@q")]=_0x1103bb(593,"2yzS");const _0x30c8e9={};_0x30c8e9[_0x1103bb(422,"p!)C")]=_0x1103bb(570,"p!)C"),_0x30c8e9.alignItems="center",_0x30c8e9[_0x1103bb(709,"s26]")]=1,_0x30c8e9[_0x1103bb(576,"IaG$")]=12;const _0x3154b3={};_0x3154b3[_0x1103bb(594,"SX1u")]=15,_0x3154b3[_0x1103bb(536,"J$PJ")]=_0x1103bb(618,"D01P"),_0x3154b3.color=COLORS.TEXT;const _0x1c8d38={};_0x1c8d38[_0x1103bb(664,"CHQg")]=13,_0x1c8d38[_0x1103bb(711,"HmVo")]=2,_0x1c8d38.color=COLORS[_0x1103bb(424,"[H0o")];const _0x442d96={height:1};_0x442d96[_0x1103bb(459,"UPq%")]=_0x1103bb(650,"W]wE"),_0x442d96[_0x1103bb(458,"1UWK")]=12;const _0x22d9de={};_0x22d9de[_0x1103bb(665,"BVMr")]=_0x1103bb(441,"BVMr"),_0x22d9de[_0x1103bb(562,"3cW9")]=_0x1103bb(589,"D01P"),_0x22d9de[_0x1103bb(460,"3mnm")]=8,_0x22d9de[_0x1103bb(494,"3cW9")]=8;const _0xcf2f93={};_0xcf2f93[_0x1103bb(666,"3cW9")]=15,_0xcf2f93[_0x1103bb(482,"KaD@")]=_0x1103bb(537,"v2Mo"),_0xcf2f93[_0x1103bb(676,"D01P")]=COLORS[_0x1103bb(424,"[H0o")];const _0x148a89={};_0x148a89[_0x1103bb(492,"KaD@")]=13,_0x148a89[_0x1103bb(456,"A8LK")]=COLORS[_0x1103bb(449,"6NBV")],_0x148a89[_0x1103bb(454,"CHQg")]=19,_0x148a89[_0x1103bb(652,"HmVo")]=12;const _0x2069eb={};_0x2069eb.flexDirection=_0x1103bb(415,"W]wE"),_0x2069eb.alignItems="flex-start",_0x2069eb[_0x1103bb(534,"]O@P")]=8;const _0x1badf9={};_0x1badf9[_0x1103bb(523,"rv!8")]=22,_0x1badf9[_0x1103bb(671,"IaG$")]=22,_0x1badf9[_0x1103bb(450,"zwlO")]=11,_0x1badf9[_0x1103bb(442,"[)L@")]=_0x1103bb(669,"*!1s"),_0x1badf9[_0x1103bb(627,"BVMr")]=_0x1103bb(588,"i08x"),_0x1badf9[_0x1103bb(526,"nC^H")]=_0x1103bb(518,"!&O8"),_0x1badf9.marginRight=10,_0x1badf9[_0x1103bb(634,"CHQg")]=1;const _0x44699f={};function _0x49ff(){const W=["WOOXWRBcPCk5WOCkWOTMvG","WQtdUKRdV8oS","aSkNWOhdGfFdNKKCy8kSW7JdJSkdW4K1WP5cAmo4gSkHWQu3W6rh","gCkSWPpdL1hcHuCnz8kSW4NdR8kdW446WP4","Chr2ySkXW4WrWQddRbBdLai","omo6wmkT","W6NcRsC","C3rOD8k2WQpdNSkmpa","g8oLiCkOW6O","W7ldPbFdJaa","z2PqrCkWW7VcVwJdQwVcKG","s8ojW5KzWRKTaKnlWOJdM1O","WPTPWQlcMmkD","W5xcSCo7WQfLbZi","WOWzWPHNvmo8qSkRWOhdS8kmCSozy8olova","a8kYWPldIK3cLW","DwvyF8kW","WR8yWOFcLG","WO5GWQFcGCkCs2nc","W7hdNCkwaX1udG","WPvBWRRcGCks","tSonW5yyWRu","i8kGW5ddGW","WOTNWRW","W6aavLVcS8k7WPRdLmoBWQS","bc/cHW","ASkLc8oLdwbhW5X4j8kr","aM8fWQZcK0vAW6BdHCo9hSoXW6NcUdm","WRdcSxPuW7WsWPKoWRr+DLpcKW4","W5FdLCkxea","hSoZjmkPW6WAW5JdNwrFCG","x05DW7rZW6bVW7O1W7/cTeG","W7tdTr9yW6P7WQFcLmo/WODaheS","W4tdGh/dRCku","BJVcL8kP","WOdcRmo7WPuFWPPZpalcLa","WOhdPCk9W6HzdmkgvSkPW5/cUdqFW6DChaZdUCkZzCkzW57dS1JdKG","e2CCWQi","WR7dLKZdG8oi","cuCvWPFcVW","uImVWQldKmoCWRrcWPmjnmkjW4q","W4exW53dOxySbmkN","W4dcTqlcRCk6","fGe3WRFdTSoKWOa","WOFdO8kjW5LD","gh3dN8kNqG","x8o4FCkHWRWoWR3dIsu","gIj4W7yG","l8oNvY5t","cXmjWQmUWRXTW68XW7VcUKm","p8o0tSk6vvr0W55lhCkzwW","FgTt","d2CSW5/dK8kDhbldK0nctNtcKmkM","EMTdr8kUW67cNMhdRMS","W4NcS8o3WRvVcc4UWQ4","s8k7lCkmitesW4i","tefqW6n6","wrhcO8ksFq","hdX+W5pcI8kzW5OterpcMG","dcb/WPe","aMeuWQpcKuvNW7ldJ8oWkmoT","wuvsW6j6W7C","WRbhW6jiWRK2WQW","CCkNWQySmG","vmofW5qiWPGNbwHcWP4","WPS8WRVcPSk+WQazWQXKuxjclG","W58kW4j0eW","pSoNDdfE","W6ZdNCkaab1up2GxW68rDJGW","W6hcHmoFW6NdGhNcNJVcLHJdImkjlCkAiG","WRddUfS","EfPKW5NcOM51hYqNWOTWWOVcUHfj","tJy4WR/dKmorWO4","W6ldK8kEcay","WOlcRmo9WOeuWPfYlrVcImo7","hx/dSCksta","F3LZD8kXWOtdVSkgiCoE","WQFcGCoIWOOZ","W4ZcPSoYWQzS","dNm9W4BdKCkbbW","FxP0zmk6WQpdVSkGi8odbSkuW5mToHJcUGFcH8kEW5C","W6FdQHFdLHC","W6uHWPGDDmk4fqavoa","WQJcGmoxWRSA","wefFW714W7DtW6aUW7xcK1tcKcldTG","hCoEW6FcPmoicW","W67dJHZcQSoSbSouDG","hSoNp8kYW6mEW5RdNhrf","WPFcIvrNW5m/WPuVWOrlxgZcOctcUWm","WRFcQCo3WOu","lIOQimovWP4SWP7dJaa","W6xdNCkFfX1udG","WPxdR8kYW796r8kcvmkSW4q","qCkfWPH8C0JdQen+CSoeWOpdI8oEWQjUc8o8x8keWQxcSSo3W7NcJq","W6NdHbFdVWq","WP1PWQRcICkrv2fKB8ofW6GytxqRCSke","mc1vDCkaiq","W7uhwuVcI8kPWRddNmoFWRaq","guCUW63dMq","nZexemo2W6lcOuRdRu/cRq","W7ddRMDWW7SVWQy0","W75bWPCBFhy","WPxdR8kYW79+s8krvG","W7hdSrnmW4PGWRdcNW","WO3dVSkWwhbcWPVcGCkoBbzc","a8kNWOpdL0RcN0O1B8kHW4ldGq","W63dMahcKSoE","WR3dRmk3W5HF","Dr/cJCkowG","W6FcPZtcSCkQWQjEW63cVmorEG","WP/cJNZcH31EqutdRCk0","W40rW6BdQgmRbmk6pSkbuWRdMNy","bSkJWOZdLKy","BmkGbCoLarq2W61Mn8keqqe","W67dKSkIfrfjgG","W53dI03dRCkTWQKyWOj8ymkHWRemW6m/W5GyDr9ckJ96WO8U","WRddLSoBW67dRwtcPWW","yKr2W47cTtz0dJK/WObxWOq","vIhcImoJhSkNWQhdQctcHCkK","vs86WQRdKmovWQneWOKrna","dSoSjmkXW6SaW6NdMW","W7FcL8oDW6ZdLgFcKdRcNsu","g3VdNmk0rSkRWOBdJZxcUCkB","W6FdJSkBbabtbMm","sLbcra","W5ldS8kLW4uMWP9shqJcKG","W5ewW47dQa","WOKYWQ3cPSkYWRWSWO9VthnE","WQzhW6ldJColW5G","W4tdSb9x","WPZcNrVcUCkoW4SGWQn2EG","W5epW4BdPhW5","gID5W5FcJmkyW6SgfHVcKCkIWQtdPW","x8k6imkulq","WP7cOeFcUxK","s8kZWO1ZBq","WRlcM8kijSooEmo5W4tcT8oBESk5WPZcJW","W6FdLay","W5NcQZdcOG","WR/dVeRdT8oSWPO","WOpdT8kRu31EWRZcGa","eSoAW6pcPSoKgJFcKSkgW7/cS8k5WOHgra","WO/cGh7cHK8","W6BdTH1hW4j3WOBcHmo+WODab0NcKW","gmoAW7ZcPmojeqBcNSkaW6lcRmkG","W5GeW4nRcmoUeq","WRvDW75oWOS9WRfKW6hdMa","WQSuW4K","WQzoW6pdISolW6GJA8kPW7hdMmkzaHCI","kIqNp8oLWOKQWOZdIHddSYNdRSorWRO","urdcNmkEqG","mqfhqCkU","umkvWOTTyGJdSq","e34kWQ7cGa","W4NcOSoZWRPRcsC5","nSo/wCkXxe8","WP9TWQ/cJSkmf2TjBCoyW54bq3K3DSk3WQ/cKxtdG0OFWP3cJq","W67dJGa","WRPCW6noWQ4TWRT3W6ddG8ofgciUBa","WQLlW6ldNmoMW48/Emk1W6O","W5ZdMKxdQmk/W6KqWPrI","uJq0WQVdMSoEWPjEWO4","WRBcSwO","o8oLAITxymoxWQJdMhCCWROO","WPBcLgy","WQbgW6LwWRK","qmo/W44bWRO","W6e8WP4/va","W7xcHmoqW7FdGG","W6ZcQJZcUCkRWQjVW6O","WRhcGmkijSovA8oJW7pcSCoAymksWOFcLSkXavC","oW1oWQLXW7KpWO8","WOhdS8kRwhDLWQ3cI8kxAW","W48fbmkzWOu9F8o+WRLVW6OSW4nlFa","WO3cJNxcLezEFeRdSCkSFG","W55TWQGovq","icNcLxe","W6NcKmoxWODklHqjWO/cKCklWRCizK0","WRlcV3fgW7u","Agvarq","W6ddTG0","WP7dOCkKW4nis8kmw8kW","W6OmW4TS","WOFcRmo3WOOIWRT1mahcJa","W7K5b8kOWOi","WR3dTg3dPCo3W6u8W5lcO8o+BSojWO4","WP7cGgi","mHbuWRf8W60tWQlcQCoQW4hdL35W","Evf+W4RcUg8","WQhdUeFdPSoS","WO3cHeL+W4u","WOXAuW","lSo3wCkXue9NW7LIamkbwaa","f3zVW7NcISkgWRfNWQGXnSk3","eJmdi8oZ","gCkXWRBdILdcMuyvAW","lCo+xmkXvLzpW4TSf8kCqXq","c8oRpW","W5NcOSoWWQDSfa","ecXKW5FcM8kF","WQLhW6RdJq","W6ZdNCkkmb1Ehwu","WPPHWQRcMCkq","WO5TWQdcMCkDsW","xe9sW6jmW6XgW7a","W5mTEvVcJa","Fx1ZFmk7WR/dR8kn","W6i6WOywFq","W43dKItdGX56B0tdSmktFW","W6dcRapcTmkJWQvVW4FcOmoCCCoyWOC","mmomWOpdI8k5","WPxdRmk5W7nPs8kzvSkNW4tcJJGq","W7eqW4hdO3z+jmkVlmkNxbhdMG","WR1KWQ/cLmoysMLzBSotW7jcrM8TESkgWRVdLh3dLK4uWOJcJr0h","EdzcWRfHW6ieWOBcTq","W7ZcQJtcSCkGWQDyW6xcRmouASom","W7ldJmkEdGa","WQpcN8oAWO4SA8o6c8onWQ/dRCk1fq","W6ldQGK","bmkdWOhdUK4","wmkHjCkLcq","kquLWPVdOYXcmGuQWOf2","WQBdReRdTW","W43cRSo6WQDH","WP3cNHZcUCoVW4ytWPfhBmk9","fcNcPxFcJq","z1v7W5JcTq","WRbaW7vBWQG9","rxK6","W6ldMCkCeXfi","W67cT8oYW4pdSq","WRXeW7viWRO0WRD0","bZxcKwi","w8k2j8kulcWz","WOFdR8kkW6Pbv8ko","WQvtW7XpWRK","DLv6W4JcLh5Lcd8HWPvgWOpcSrG","B2Hnr8kSW4lcPMhdPwW","pCoJt8kNxe90","uXdcVmkjFua8wmo6W7hcU0JcQsu","BSofW5GFWRe2bwbeW4RdKvGFzurEWRnoxmkQEejHW40u","WO3dUSkVua","gCkkW5ddKCkb","pLegW6ddT8kNldpdTxjmyW","vConW4GkWRKSogbA","WRfDW6jEWRKQWOPIW63dHCoEpW","WQjhW7fE","E0fKW5NcUx1VkciMWPfxWOtcQG","WQbfW7LoWR8WWOXRW7ZdGCoj","ad1ZW4/cMW","W6ZcRSo7WQq","ANGejSoteSkoWRZdQ8ovlG","fmkJWO3dK0RcNKm","W6BcRcBcOCk9WQvPW7dcOCosCCoXWPFcK8oGW6H7","vItcNG","WPZdTCkO","aNxdIW","o8oJEZbsy8o6WOVdL2eCWRGokHa","WPX9WQ/cIq","W4BdGfZdU8kTW5uuWOL2AG","bcFcKMFdP8kNWR/dPSkyEK7cT8oEWOfdWRpdRwVcR2ZcSSk8pmoUzG","W7rkWO0kA3tcNvxcOrFcQa","C3rOD8k2WQpdImkmomozhCky","W5eiW53dUxe2nCk7k8kHva","W5OjW4TJ","W65qWPajF2RcL0RcSW","bYzTW4tcKSkiW5ShhqdcLSkeWQFdTq","bmkNWO7dKeRcN0O","nmkRWQhdTfa","W4GdgCkB","WQpdTKZdTmoLWO3dPYNdJam","WRldLSkjWRFcLJlcOdtcIrBdOCkE","W7S7WOWoCCk7icyCiSoxWR5Scq","Fhr5E8k4WR/dPCkwiSojmCkAW5ySlq","xSodW5qzWOmRfMO","AgHbwmkgW6lcOghdQ2VcNMDW","WOBdSmkSs0PfWQpcIW","WOG4WRhcTSkYWRW","W5hcQmo3v2nKWPRcJCkt","y1n1W4ZdUcKJxMfOW5ChW5/dSLyEW7bwfmo9WRvoWQ1A","W6BcRH7dU8oZWQddQc/dGW","WPhcHhVcLejp","w8kNpCkmia","WPFcRCkmgmoR","WQtdVeJdP8oGWOFdHq","tGZcRSktFeu+xSo2W7dcOq","eczMW4ZcJa","W6ddRa3dKahcMHa","WQntW7rEWRu2WR8","gMFdNSkDs8k6WRVdKctcKCkmWO3cOvNdVq","bsJcKwlcOmoIW4xcTCoskrNdTG","vti8WQpdJ8oCWPzzWPGK","mJ1hzCkmnCkrWONdKSoygCkjjSof","xwzBACky","a3SuWRxcKvLb","WRdcSxPuW7WsWOKuWRH+FK7cKq7cJW","W7yoxeVcJCkWWPq","A3TtFCkVpmk+WOG","h3xdN8k3q8kGWRu","WRRcQepcKMy","D3TPzmkTWRJdQCkxjCochmkHW587kW","dxVdICk3t8k8WOddHYxcVmklWPC","W67dJrFcPG","fGLmWPzN","bmkWWOhdJvdcNeunA8kA","W5FdTSkGW4zhW6vbeZRcQ8oYWOC","cCouEmkcsG","WRhdTKxdP8oAWOhdKsK","bgCqWQ7cKfjh","W6CVWPmpFq","e8kTWOZdJfe","rCkbWPvQyG","W7hcSmorWPykwSof","W40ld8klWOW"];return(_0x49ff=function(){return W})()}_0x44699f.fontSize=12,_0x44699f[_0x1103bb(414,"eKT1")]=_0x1103bb(581,"7q&%"),_0x44699f[_0x1103bb(447,"[H0o")]=COLORS.TEXT;const _0xbd7570={};_0xbd7570[_0x1103bb(697,"3mnm")]=14,_0xbd7570.color=COLORS.TEXT,_0xbd7570[_0x1103bb(692,"jd1J")]=1,_0xbd7570[_0x1103bb(549,"!&O8")]=20;const _0x119ff7={};_0x119ff7[_0x1103bb(592,"2yzS")]=52,_0x119ff7[_0x1103bb(578,"*!1s")]=30,_0x119ff7.borderRadius=15,_0x119ff7[_0x1103bb(662,"]RM[")]=_0x1103bb(667,"H[^z");const _0x1940de={};_0x1940de[_0x1103bb(435,"BXZ!")]=0,_0x1940de.height=2;const _0x388311={};_0x388311[_0x1103bb(523,"rv!8")]=24,_0x388311[_0x1103bb(475,"]O@P")]=24,_0x388311[_0x1103bb(517,"H[^z")]=12,_0x388311.position="absolute",_0x388311[_0x1103bb(417,"zwlO")]=COLORS[_0x1103bb(633,"[)L@")],_0x388311[_0x1103bb(487,"eKT1")]="#000",_0x388311[_0x1103bb(680,"W]wE")]=_0x1940de,_0x388311[_0x1103bb(586,"s26]")]=.25,_0x388311[_0x1103bb(605,"Yu2C")]=4,_0x388311.elevation=4;const _0x5c0ebc={};_0x5c0ebc[_0x1103bb(462,"UIBr")]=_0x432193,_0x5c0ebc.container=_0xe3133,_0x5c0ebc[_0x1103bb(529,"3mnm")]=_0x20e191,_0x5c0ebc.headerTitle=_0x479fbb,_0x5c0ebc[_0x1103bb(464,"Ju@q")]=_0xdddfc2,_0x5c0ebc[_0x1103bb(538,"!&O8")]=_0x44b17c,_0x5c0ebc[_0x1103bb(477,"!q]b")]=_0x4a4b0e,_0x5c0ebc[_0x1103bb(553,"xtN5")]=_0x5e8e76,_0x5c0ebc.section=_0x5e7ffa,_0x5c0ebc[_0x1103bb(563,"7q&%")]=_0x2bbb41,_0x5c0ebc[_0x1103bb(472,"]RM[")]=_0x30c8e9,_0x5c0ebc[_0x1103bb(509,"UIBr")]=_0x3154b3,_0x5c0ebc[_0x1103bb(533,"p!)C")]=_0x1c8d38,_0x5c0ebc[_0x1103bb(698,"zwlO")]=_0x442d96,_0x5c0ebc.sectionLabelRow=_0x22d9de,_0x5c0ebc[_0x1103bb(715,"CHQg")]=_0xcf2f93,_0x5c0ebc[_0x1103bb(626,"*!1s")]=_0x148a89,_0x5c0ebc[_0x1103bb(522,"D01P")]=_0x2069eb,_0x5c0ebc[_0x1103bb(461,"*!1s")]=_0x1badf9,_0x5c0ebc[_0x1103bb(560,"nC^H")]=_0x44699f,_0x5c0ebc[_0x1103bb(690,"HmVo")]=_0xbd7570,_0x5c0ebc[_0x1103bb(653,"1(YK")]=_0x119ff7,_0x5c0ebc[_0x1103bb(638,"J$PJ")]=_0x388311;const styles=StyleSheet[_0x1103bb(617,"J$PJ")](_0x5c0ebc);function _temp(){}function _temp2(W,e){const b=_0x1103bb,x={IZTMU:function(W,e,b,x){return W(e,b,x)},noXFY:function(W,e,b){return W(e,b)},WBEWs:function(W,e,b){return W(e,b)},FApxB:function(W,e){return W+e}};return x[b(580,"hBe#")](_0x547bb7,View,{style:styles[b(629,"[H0o")],children:[x[b(632,"Qa83")](_0xbf0708,View,{style:styles[b(707,"j834")],children:x[b(696,"s26]")](_0xbf0708,Text,{style:styles[b(643,"Yu2C")],children:x[b(467,"Ju@q")](e,1)})}),_0xbf0708(Text,{style:styles[b(548,"J$PJ")],children:W})]},e)}
|
|
1
|
+
"use strict";import{c as _0x25d8c4}from"react/compiler-runtime";import _0x2de817 from"react";import{Modal,Platform,Pressable,ScrollView,StyleSheet,Text,TouchableOpacity,useWindowDimensions,View}from"react-native";import{BackdropCard as _0x50c65f}from"../games/shared/BackdropCard.js";import{getGameTitle}from"../services/GamesConstants.js";import{GAMES_METADATA}from"../services/GamesMetadata.js";import{isThemedGame}from"../services/ThemeService.js";import{isTablet}from"../services/UtilsService.js";import{createThemedStyles,useGameTheme}from"./GameTheme.js";import{jsx as _0x5ad628,jsxs as _0x2e99e4,Fragment as _0x17d98c}from"react/jsx-runtime";const CustomSwitch=_0x2de817.memo(e=>{const t=_0x25d8c4(26),{label:o,value:i,onValueChange:n}=e,l=useGameTheme();let r;t[0]!==l?(r=getStyles(l),t[0]=l,t[1]=r):r=t[1];const a=r;let s,d;t[2]!==i?(s={checked:i},t[2]=i,t[3]=s):s=t[3],t[4]!==n||t[5]!==i?(d=()=>n(!i),t[4]=n,t[5]=i,t[6]=d):d=t[6];const g=i?l.SWITCH_TRACK_ON:l.SWITCH_TRACK_OFF;let h,m;t[7]!==g?(h={backgroundColor:g},t[7]=g,t[8]=h):h=t[8],t[9]!==a.switchTrack||t[10]!==h?(m=[a.switchTrack,h],t[9]=a.switchTrack,t[10]=h,t[11]=m):m=t[11];const p=i?25:3;let x,u,b,T;return t[12]!==p?(x={left:p},t[12]=p,t[13]=x):x=t[13],t[14]!==a.switchThumb||t[15]!==x?(u=_0x5ad628(View,{style:[a.switchThumb,x]}),t[14]=a.switchThumb,t[15]=x,t[16]=u):u=t[16],t[17]!==m||t[18]!==u?(b=_0x5ad628(View,{style:m,children:u}),t[17]=m,t[18]=u,t[19]=b):b=t[19],t[20]!==o||t[21]!==b||t[22]!==s||t[23]!==d||t[24]!==i?(T=_0x5ad628(Pressable,{accessibilityRole:"switch",accessibilityLabel:o,accessibilityState:s,"aria-checked":i,onPress:d,children:b}),t[20]=o,t[21]=b,t[22]=s,t[23]=d,t[24]=i,t[25]=T):T=t[25],T}),noopSettingsChange=e=>{},GameSettingsModalComponent=e=>{const t=_0x25d8c4(148),{gameId:o,settings:i,onSettingsChange:n}=e,l=void 0===n?noopSettingsChange:n,r=useGameTheme();let a;t[0]!==r?(a=getStyles(r),t[0]=r,t[1]=a):a=t[1];const s=a;let d;t[2]!==o?(d=getGameTitle(o),t[2]=o,t[3]=d):d=t[3];const g=d+" Settings",h=GAMES_METADATA[o],{isVisible:m,enableSounds:p,enableHaptics:x}=i,u=useWindowDimensions(),b="web"===Platform.OS,T=Math.max(0,Math.min(360,u.width-32)),w=Math.max(16,Math.min(i.anchor?.top??80,u.height-160)),C=Math.max(16,u.width-T-16),S=Math.min(C,Math.max(16,i.anchor?.right??16)),y=o;let f;t[4]!==y?(f=isThemedGame(y),t[4]=y,t[5]=f):f=t[5];const _=f,v="dark"===i.theme;let V;t[6]!==l||t[7]!==i?(V=e=>{l({...i,enableSounds:e})},t[6]=l,t[7]=i,t[8]=V):V=t[8];const R=V;let B;t[9]!==l||t[10]!==i?(B=e=>{l({...i,enableHaptics:e})},t[9]=l,t[10]=i,t[11]=B):B=t[11];const D=B;let k;t[12]!==l||t[13]!==i?(k=e=>{l({...i,theme:e?"dark":"light"})},t[12]=l,t[13]=i,t[14]=k):k=t[14];const E=k;let M;t[15]!==l||t[16]!==i?(M=()=>{l({...i,isVisible:!1})},t[15]=l,t[16]=i,t[17]=M):M=t[17];const L=M;let H,I,W;t[18]===Symbol.for("react.memo_cache_sentinel")?(H=b&&{backgroundColor:"transparent"},t[18]=H):H=t[18],t[19]!==s.overlay?(I=[s.overlay,H],t[19]=s.overlay,t[20]=I):I=t[20],t[21]!==L?(W=b&&_0x5ad628(Pressable,{accessibilityRole:"button",accessibilityLabel:"Dismiss game settings",style:StyleSheet.absoluteFill,onPress:L}),t[21]=L,t[22]=W):W=t[22];const A=b?g:void 0;let G,j,F;t[23]!==S||t[24]!==r||t[25]!==w||t[26]!==u.height||t[27]!==T?(G=b&&{position:"absolute",top:w,right:S,width:T,maxHeight:Math.max(0,u.height-w-16),backgroundColor:r.SURFACE,borderRadius:16,borderWidth:1,borderColor:r.SURFACE,padding:20,boxShadow:"0 12px 40px #0004"},t[23]=S,t[24]=r,t[25]=w,t[26]=u.height,t[27]=T,t[28]=G):G=t[28],t[29]!==s.container||t[30]!==G?(j=[s.container,G],t[29]=s.container,t[30]=G,t[31]=j):j=t[31],t[32]===Symbol.for("react.memo_cache_sentinel")?(F=!b&&_0x5ad628(_0x50c65f,{}),t[32]=F):F=t[32];const z=b&&s.popoverHeader;let P;t[33]!==s.header||t[34]!==z?(P=[s.header,z],t[33]=s.header,t[34]=z,t[35]=P):P=t[35];const O=b&&s.popoverHeaderTitle;let U;t[36]!==s.headerTitle||t[37]!==O?(U=[s.headerTitle,O],t[36]=s.headerTitle,t[37]=O,t[38]=U):U=t[38];const X=b?"Settings":g;let N;t[39]!==U||t[40]!==X?(N=_0x5ad628(Text,{accessibilityRole:"header",style:U,children:X}),t[39]=U,t[40]=X,t[41]=N):N=t[41];const K=b&&s.popoverCloseButton;let q;t[42]!==s.closeButton||t[43]!==K?(q=[s.closeButton,K],t[42]=s.closeButton,t[43]=K,t[44]=q):q=t[44];const Y=b&&s.popoverCloseButtonText;let J,Q,Z;t[45]!==s.closeButtonText||t[46]!==Y?(J=_0x5ad628(Text,{style:[s.closeButtonText,Y],children:"\u2715"}),t[45]=s.closeButtonText,t[46]=Y,t[47]=J):J=t[47],t[48]!==L||t[49]!==q||t[50]!==J?(Q=_0x5ad628(TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:"Close settings",onPress:L,style:q,children:J}),t[48]=L,t[49]=q,t[50]=J,t[51]=Q):Q=t[51],t[52]!==P||t[53]!==N||t[54]!==Q?(Z=_0x2e99e4(View,{style:P,children:[N,Q]}),t[52]=P,t[53]=N,t[54]=Q,t[55]=Z):Z=t[55];const ee=b&&s.popoverScrollView;let te;t[56]!==s.scrollView||t[57]!==ee?(te=[s.scrollView,ee],t[56]=s.scrollView,t[57]=ee,t[58]=te):te=t[58];const oe=b&&s.popoverSection;let ie;t[59]!==s.section||t[60]!==oe?(ie=[s.section,oe],t[59]=s.section,t[60]=oe,t[61]=ie):ie=t[61];const ne=b&&s.popoverText;let le;t[62]!==s.toggleTitle||t[63]!==ne?(le=_0x5ad628(Text,{style:[s.toggleTitle,ne],children:"Sound Effects"}),t[62]=s.toggleTitle,t[63]=ne,t[64]=le):le=t[64];const re=b&&s.popoverText;let ae,se,ce,de,ge;t[65]!==s.toggleSubtitle||t[66]!==re?(ae=_0x5ad628(Text,{style:[s.toggleSubtitle,re],children:"Play sounds during gameplay"}),t[65]=s.toggleSubtitle,t[66]=re,t[67]=ae):ae=t[67],t[68]!==le||t[69]!==ae?(se=_0x2e99e4(View,{children:[le,ae]}),t[68]=le,t[69]=ae,t[70]=se):se=t[70],t[71]!==s.toggleLeft||t[72]!==se?(ce=_0x5ad628(View,{style:s.toggleLeft,children:se}),t[71]=s.toggleLeft,t[72]=se,t[73]=ce):ce=t[73],t[74]!==p||t[75]!==R?(de=_0x5ad628(CustomSwitch,{label:"Sound Effects",value:p,onValueChange:R}),t[74]=p,t[75]=R,t[76]=de):de=t[76],t[77]!==s.toggleContainer||t[78]!==ce||t[79]!==de?(ge=_0x2e99e4(View,{style:s.toggleContainer,children:[ce,de]}),t[77]=s.toggleContainer,t[78]=ce,t[79]=de,t[80]=ge):ge=t[80];const he=b&&s.popoverDivider;let me;t[81]!==s.divider||t[82]!==he?(me=_0x5ad628(View,{style:[s.divider,he]}),t[81]=s.divider,t[82]=he,t[83]=me):me=t[83];const pe=b&&s.popoverText;let xe;t[84]!==s.toggleTitle||t[85]!==pe?(xe=_0x5ad628(Text,{style:[s.toggleTitle,pe],children:"Haptic Feedback"}),t[84]=s.toggleTitle,t[85]=pe,t[86]=xe):xe=t[86];const ue=b&&s.popoverText;let be,Te,we,Ce,Se,ye,fe,_e,ve,Ve,Re,Be;return t[87]!==s.toggleSubtitle||t[88]!==ue?(be=_0x5ad628(Text,{style:[s.toggleSubtitle,ue],children:"Vibration on interactions"}),t[87]=s.toggleSubtitle,t[88]=ue,t[89]=be):be=t[89],t[90]!==xe||t[91]!==be?(Te=_0x2e99e4(View,{children:[xe,be]}),t[90]=xe,t[91]=be,t[92]=Te):Te=t[92],t[93]!==s.toggleLeft||t[94]!==Te?(we=_0x5ad628(View,{style:s.toggleLeft,children:Te}),t[93]=s.toggleLeft,t[94]=Te,t[95]=we):we=t[95],t[96]!==x||t[97]!==D?(Ce=_0x5ad628(CustomSwitch,{label:"Haptic Feedback",value:x,onValueChange:D}),t[96]=x,t[97]=D,t[98]=Ce):Ce=t[98],t[99]!==s.toggleContainer||t[100]!==we||t[101]!==Ce?(Se=_0x2e99e4(View,{style:s.toggleContainer,children:[we,Ce]}),t[99]=s.toggleContainer,t[100]=we,t[101]=Ce,t[102]=Se):Se=t[102],t[103]!==v||t[104]!==E||t[105]!==s.divider||t[106]!==s.popoverDivider||t[107]!==s.popoverText||t[108]!==s.toggleContainer||t[109]!==s.toggleLeft||t[110]!==s.toggleSubtitle||t[111]!==s.toggleTitle||t[112]!==_?(ye=_&&_0x2e99e4(_0x17d98c,{children:[_0x5ad628(View,{style:[s.divider,b&&s.popoverDivider]}),_0x2e99e4(View,{style:s.toggleContainer,children:[_0x5ad628(View,{style:s.toggleLeft,children:_0x2e99e4(View,{children:[_0x5ad628(Text,{style:[s.toggleTitle,b&&s.popoverText],children:"Dark Mode"}),_0x5ad628(Text,{style:[s.toggleSubtitle,b&&s.popoverText],children:"Play with the dark theme"})]})}),_0x5ad628(CustomSwitch,{label:"Dark Mode",value:v,onValueChange:E})]})]}),t[103]=v,t[104]=E,t[105]=s.divider,t[106]=s.popoverDivider,t[107]=s.popoverText,t[108]=s.toggleContainer,t[109]=s.toggleLeft,t[110]=s.toggleSubtitle,t[111]=s.toggleTitle,t[112]=_,t[113]=ye):ye=t[113],t[114]!==ie||t[115]!==ge||t[116]!==me||t[117]!==Se||t[118]!==ye?(fe=_0x2e99e4(View,{style:ie,children:[ge,me,Se,ye]}),t[114]=ie,t[115]=ge,t[116]=me,t[117]=Se,t[118]=ye,t[119]=fe):fe=t[119],t[120]!==h||t[121]!==s.gameDescription||t[122]!==s.instructionBadge||t[123]!==s.instructionNumber||t[124]!==s.instructionRow||t[125]!==s.instructionText||t[126]!==s.section||t[127]!==s.sectionLabel||t[128]!==s.sectionLabelRow?(_e=!b&&h&&_0x2e99e4(View,{style:[s.section],children:[_0x5ad628(View,{style:s.sectionLabelRow,children:_0x5ad628(Text,{style:s.sectionLabel,children:"How to Play"})}),_0x5ad628(Text,{style:s.gameDescription,children:h.description}),h.instructions.map((e,t)=>_0x2e99e4(View,{style:s.instructionRow,children:[_0x5ad628(View,{style:s.instructionBadge,children:_0x5ad628(Text,{style:s.instructionNumber,children:t+1})}),_0x5ad628(Text,{style:s.instructionText,children:e})]},t))]}),t[120]=h,t[121]=s.gameDescription,t[122]=s.instructionBadge,t[123]=s.instructionNumber,t[124]=s.instructionRow,t[125]=s.instructionText,t[126]=s.section,t[127]=s.sectionLabel,t[128]=s.sectionLabelRow,t[129]=_e):_e=t[129],t[130]!==s.scrollContent||t[131]!==te||t[132]!==fe||t[133]!==_e?(ve=_0x2e99e4(ScrollView,{style:te,contentContainerStyle:s.scrollContent,showsVerticalScrollIndicator:!1,children:[fe,_e]}),t[130]=s.scrollContent,t[131]=te,t[132]=fe,t[133]=_e,t[134]=ve):ve=t[134],t[135]!==A||t[136]!==j||t[137]!==Z||t[138]!==ve?(Ve=_0x2e99e4(View,{testID:b?"game-settings-popover":void 0,role:b?"dialog":void 0,accessibilityLabel:A,style:j,children:[F,Z,ve]}),t[135]=A,t[136]=j,t[137]=Z,t[138]=ve,t[139]=Ve):Ve=t[139],t[140]!==I||t[141]!==W||t[142]!==Ve?(Re=_0x2e99e4(View,{style:I,children:[W,Ve]}),t[140]=I,t[141]=W,t[142]=Ve,t[143]=Re):Re=t[143],t[144]!==L||t[145]!==m||t[146]!==Re?(Be=_0x5ad628(Modal,{visible:m,transparent:!0,onRequestClose:L,children:Re}),t[144]=L,t[145]=m,t[146]=Re,t[147]=Be):Be=t[147],Be};export const GameSettingsModal=_0x2de817.memo(GameSettingsModalComponent);GameSettingsModal.displayName="GameSettingsModal";const getStyles=createThemedStyles(e=>({overlay:{flex:1,backgroundColor:e.OVERLAY,justifyContent:"center",alignItems:"center"},container:{width:"95%",maxWidth:isTablet?500:360,maxHeight:"70%",borderRadius:10,overflow:"hidden",backgroundColor:e.BACKGROUND},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:10,paddingHorizontal:16,backgroundColor:e.SURFACE,borderBottomWidth:1,borderBottomColor:e.DIVIDER},headerTitle:{fontSize:20,fontWeight:"semibold",color:e.TEXT},closeButton:{padding:8},closeButtonText:{fontSize:18,fontWeight:"semibold",color:e.TEXT},popoverHeader:{padding:0,paddingHorizontal:0,marginBottom:16,backgroundColor:"transparent",borderBottomWidth:0},popoverText:{fontFamily:"inherit",color:e.TEXT},popoverHeaderTitle:{fontFamily:"inherit",fontSize:16,fontWeight:"700"},popoverCloseButton:{width:40,height:40,padding:0,alignItems:"center",justifyContent:"center",borderRadius:20,borderWidth:1,borderColor:e.SURFACE,backgroundColor:e.SURFACE},popoverCloseButtonText:{fontSize:18,fontWeight:"400",lineHeight:18},popoverScrollView:{padding:0,paddingBottom:0},popoverSection:{padding:0,marginBottom:0,borderWidth:0,backgroundColor:"transparent"},popoverDivider:{backgroundColor:e.SURFACE},scrollView:{flexShrink:1,padding:10,paddingBottom:0},scrollContent:{paddingBottom:0},section:{borderRadius:12,padding:16,marginBottom:10,backgroundColor:e.SURFACE,borderWidth:e.BORDER_WIDTH,borderColor:e.BORDER},toggleContainer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},toggleLeft:{flexDirection:"row",alignItems:"center",flex:1,gap:12,marginRight:12},toggleTitle:{fontSize:15,fontWeight:"600",color:e.TEXT},toggleSubtitle:{fontSize:13,marginTop:2,color:e.TEXT_MUTED},divider:{height:1,backgroundColor:e.DIVIDER,marginVertical:12},sectionLabelRow:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},sectionLabel:{fontSize:15,fontWeight:"600",color:e.TEXT},gameDescription:{fontSize:13,color:e.TEXT,lineHeight:19,marginBottom:12},instructionRow:{flexDirection:"row",alignItems:"flex-start",marginBottom:8},instructionBadge:{width:22,height:22,borderRadius:11,backgroundColor:e.CHIP,alignItems:"center",justifyContent:"center",marginRight:10,marginTop:1},instructionNumber:{fontSize:12,fontWeight:"700",color:e.TEXT},instructionText:{fontSize:14,color:e.TEXT,flex:1,lineHeight:20},switchTrack:{width:52,height:30,borderRadius:15,justifyContent:"center"},switchThumb:{width:24,height:24,borderRadius:12,position:"absolute",backgroundColor:e.SWITCH_THUMB,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:4}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{c as _0x39936e}from"react/compiler-runtime";import _0x1a2c99,{createContext,useContext}from"react";import{StyleSheet}from"react-native";import{GAME_THEMES,resolveGameTheme}from"../services/ThemeService.js";import{jsx as _0x4eff76}from"react/jsx-runtime";const GameThemeContext=createContext(GAME_THEMES.classic);export const GameThemeProvider=e=>{const t=_0x39936e(5),{theme:r,children:o}=e;let m,s;return t[0]!==r?(m=resolveGameTheme(r),t[0]=r,t[1]=m):m=t[1],t[2]!==o||t[3]!==m?(s=_0x4eff76(GameThemeContext.Provider,{value:m,children:o}),t[2]=o,t[3]=m,t[4]=s):s=t[4],s};export const useGameTheme=()=>useContext(GameThemeContext);export const createThemedStyles=e=>{const t=new Map;return r=>{const o=t.get(r);if(o)return o;const m=StyleSheet.create(e(r));return t.set(r,m),m}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const TROPHY_PATH="M134.7 33.8Q138.7 32.8 256.7 32.3Q374.7 31.8 378.7 33.8Q391.7 38.8 396.7 51.8Q399.7 57.8 399.7 68.8V79.8H434.7L469.7 80.8L472.7 82.8Q477.7 86.8 479.7 94.8Q482.7 112.8 476.7 143.8Q468.7 178.8 450.2 203.3Q431.7 227.8 406.7 235.8L398.7 238.8L396.7 246.8Q384.7 293.8 329.7 327.8Q303.7 343.8 277.7 348.8L272.7 349.8L271.7 398.8V447.8H305.7Q338.7 447.8 342.7 449.8Q348.7 452.8 350.7 459.8Q352.7 465.8 349.7 471.8Q346.7 477.8 340.7 478.8Q337.7 479.8 255.7 479.8Q173.7 479.8 170.7 478.8Q164.7 477.8 161.7 471.8Q158.7 465.8 160.7 459.8Q162.7 452.8 168.7 449.8Q172.7 447.8 205.7 447.8H239.7V398.8V350.8L236.7 349.8Q192.7 339.8 158.2 310.8Q123.7 281.8 114.7 245.8L112.7 238.8L104.7 235.8Q67.7 223.8 46.7 179.8Q33.7 151.8 31.7 116.8Q30.7 98.8 32.2 92.8Q33.7 86.8 38.7 82.8L41.7 80.8L76.7 79.8H111.7V68.8Q111.7 57.8 113.7 52.8Q119.7 37.8 134.7 33.8ZM367.7 146.8V63.8H255.7H143.7V149.8Q144.7 221.8 145.2 231.8Q145.7 241.8 150.7 252.8Q164.7 280.8 198.7 300.8Q230.7 319.8 255.7 319.8Q283.7 319.8 317.7 297.8Q352.7 274.8 363.7 245.8Q366.7 237.8 367.2 225.3Q367.7 212.8 367.7 146.8ZM111.7 157.8V111.8H87.7H63.7V118.8Q66.7 159.8 89.7 187.8Q97.7 197.8 107.7 202.8L111.7 204.8ZM447.7 118.8Q447.7 118.8 447.7 118.8V111.8H423.7H399.7V157.8V204.8L403.7 202.8Q413.7 197.8 421.7 187.8Q444.7 159.8 447.7 118.8Z";export const SHARE_PATH="M376.2 48.8Q406.2 44.8 427.2 64.8Q439.2 75.8 444.2 87.8Q453.2 113.8 441.7 138.8Q430.2 163.8 404.2 172.8Q397.2 174.8 384.2 174.8Q371.2 174.8 364.2 172.8Q353.2 168.8 343.2 160.8L338.2 156.8L264.2 197.8L190.2 238.8L191.2 243.8Q192.2 247.8 192.2 255.8Q192.2 263.8 191.2 267.8L190.2 272.8L264.2 313.8L337.2 355.8L343.2 350.8Q358.2 338.8 376.7 336.3Q395.2 333.8 412.2 342.8Q446.2 358.8 448.2 395.8Q449.2 425.8 428.2 445.8Q417.2 455.8 404.2 460.8Q396.2 463.8 384.2 463.8Q372.2 463.8 364.2 460.8Q356.2 457.8 351.2 454.8Q332.2 442.8 324.2 423.8Q319.2 410.8 320.2 395.8Q321.2 387.8 321.2 385.8L316.2 380.8Q309.2 375.8 251.2 342.8Q180.2 302.8 177.2 301.8L174.2 299.8L169.2 304.8Q159.2 312.8 146.2 317.8Q140.2 319.8 128.2 319.8Q116.2 319.8 110.2 317.8Q77.2 306.8 66.2 273.8Q61.2 255.8 66.2 237.8Q77.2 204.8 110.2 194.8Q116.2 192.8 128.2 192.8Q140.2 192.8 146.2 194.8Q159.2 198.8 169.2 206.8Q174.2 211.8 176.7 210.3Q179.2 208.8 250.2 168.8Q321.2 128.8 321.2 126.3Q321.2 123.8 320.2 115.8Q318.2 85.8 341.2 64.8Q356.2 50.8 376.2 48.8ZM398.2 82.8Q392.2 80.8 385.2 80.3Q378.2 79.8 375.2 80.8Q362.2 85.8 355.2 98.8Q353.2 102.8 353.2 111.8Q353.2 120.8 355.2 124.8Q360.2 134.8 369.7 139.8Q379.2 144.8 389.2 142.8Q406.2 139.8 413.2 124.8Q415.2 120.8 415.2 111.8Q415.2 102.8 413.2 98.8Q408.2 87.8 398.2 82.8ZM142.2 226.8Q137.2 224.8 129.2 224.3Q121.2 223.8 118.2 225.8Q105.2 229.8 99.2 242.8Q97.2 246.8 97.2 255.8Q97.2 264.8 99.2 269.8Q110.2 290.8 133.2 287.8Q149.2 284.8 157.2 269.8Q159.2 264.8 159.2 255.8Q159.2 246.8 157.2 242.8Q152.2 231.8 142.2 226.8ZM389.2 368.8Q389.2 368.8 389.2 368.8Q384.2 367.8 383.7 367.8Q383.2 367.8 378.2 368.8Q362.2 370.8 355.2 386.8Q353.2 390.8 353.2 399.8Q353.2 408.8 355.2 412.8Q360.2 423.8 370.2 428.8Q376.2 430.8 384.2 430.8Q392.2 430.8 398.2 428.8Q408.2 423.8 413.2 412.8Q415.2 408.8 415.2 399.8Q415.2 390.8 413.2 386.8Q408.2 376.8 398.2 371.8Q394.2 369.8 389.2 368.8Z";export const PLAY_PATH="M112 111v290c0 17.44 17 28.52 31 20.16l247.9-148.37c12.12-7.25 12.12-26.33 0-33.58L143 90.84c-14-8.36-31 2.72-31 20.16z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{GameSettingsModal}from"./GameSettingsModal.js";export{GameThemeProvider,useGameTheme,createThemedStyles}from"./GameTheme.js";
|
package/lib/module/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export*from"./games/play-with-tua/PlayWithTua.js";export*from"./games/treasure-hunt/TreasureHunt.js";export*from"./games/arrows/Arrows.js";export*from"./games/balloon-blaster/BalloonBlaster.js";export*from"./games/bike-racing/BikeRacing.js";export*from"./games/bluk/Bluk.js";export*from"./games/chameleon-run/ChameleonRun.js";export*from"./games/mob-control/MobControl.js";export*from"./games/paper-io/PaperIo.js";export*from"./games/crossy-road/CrossyRoad.js";export*from"./games/block-blast/BlockBlast.js";export*from"./games/block-breaker/BlockBreaker.js";export*from"./games/bubble-shooter/BubbleShooter.js";export*from"./games/candy-crush/CandyCrush.js";export*from"./games/car-racing/CarRacing.js";export*from"./games/color-switch/ColorSwitch.js";export*from"./games/colors-sort/ColorsSort.js";export*from"./games/connect-em-all/ConnectEmAll.js";export*from"./games/dino-jump/DinoJump.js";export*from"./games/dots-and-boxes/DotsAndBoxes.js";export*from"./games/flappy-bird/FlappyBird.js";export*from"./games/fruit-merger/FruitMerger.js";export*from"./games/fruit-ninja/FruitNinja.js";export*from"./games/game-2048/Game2048.js";export*from"./games/knife-hit/KnifeHit.js";export*from"./games/ludo-king/LudoKing.js";export*from"./games/maze-runner/MazeRunner.js";export*from"./games/mine-sweeper/MineSweeper.js";export*from"./games/number-search/NumberSearch.js";export*from"./games/nuts-and-bolts/NutsAndBolts.js";export*from"./games/pac-man/PacMan.js";export*from"./games/perfect-circle/PerfectCircle.js";export*from"./games/pipe-connect/PipeConnect.js";export*from"./games/popit-fidget/PopitFidget.js";export*from"./games/sliding-numbers/SlidingNumbers.js";export*from"./games/snake-3d/Snake3D.js";export*from"./games/space-fighter/SpaceFighter.js";export*from"./games/sudoku/Sudoku.js";export*from"./games/stack-tower/StackTower.js";export*from"./games/spider-solitaire/SpiderSolitaire.js";export*from"./games/tank-1990/Tank1990.js";export*from"./games/tic-tac-toe/TicTacToe.js";export*from"./games/tile-home/TileHome.js";export*from"./games/whack-a-mole/WhackAMole.js";export*from"./games/word-search/WordSearch.js";export*from"./games/find-different-number/FindDifferentNumber.js";export*from"./games/snakes-and-ladders/SnakesAndLadders.js";export*from"./games/tangram/Tangram.js";export*from"./games/checkers/Checkers.js";export*from"./games/memory-match/MemoryMatch.js";export*from"./games/falling-sticks/FallingSticks.js";export*from"./games/reversi/Reversi.js";export*from"./games/penguin-run/PenguinRun.js";export*from"./services/GamesService.js";export*from"./services/GamesMetadata.js";export*from"./services/SoundsService.js";export*from"./services/UtilsService.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const FRAME_BUDGET_MS=4,MAX_JOBS_PER_FRAME=64,timing={afterPaint(t){let s;const i=requestAnimationFrame(()=>{s=setTimeout(t,0)});return()=>{cancelAnimationFrame(i),void 0!==s&&clearTimeout(s)}}};export class GameAssetLoader{stage=0;active=!1;busy=!1;disposed=!1;done=!1;constructor(t,s,i,e,h=timing){this.stages=t,this.changed=s,this.finished=i,this.failed=e,this.clock=h}start(){this.disposed||this.done||(this.active=!0,this.schedule())}pause(){this.active=!1,this.cancel?.(),this.cancel=void 0}dispose(){this.pause(),this.disposed=!0}schedule(){!this.active||this.busy||this.cancel||this.disposed||this.done||(this.cancel=this.clock.afterPaint(()=>{this.cancel=void 0,this.step()}))}async step(){if(!this.active||this.disposed)return;this.busy=!0;const t=()=>this.clock.now?.()??performance.now(),s=t();try{for(let i=0;i<64&&this.active&&!this.disposed;i++){const i=this.stages[this.stage];if(!i)return this.done=!0,this.active=!1,void this.finished();if(!this.iterator&&(this.changed(i.label),this.iterator=i.tasks()[Symbol.iterator]()),!this.task){const t=this.iterator.next();if(t.done){this.iterator=void 0,this.stage++;continue}this.task=t.value}if(!this.active||this.disposed)break;const e=this.task();if(e&&"function"==typeof e.then&&await e,this.task=void 0,t()-s>=4)break}}catch(t){this.reject(t)}finally{this.busy=!1}this.schedule()}reject(t){this.busy=!1,this.disposed||(this.task||(this.iterator=void 0),this.pause(),this.failed(t))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{resolveGameTheme}from"./ThemeService.js";import{GAME_IDS}from"./UtilsService.js";function*deferred(e){let r=[];yield()=>{r=e()},yield*r}const HEAVY_GAME_ASSETS={[GAME_IDS.PLAY_WITH_TUA]:function*(){yield*deferred(()=>require("../games/play-with-tua/PlayWithTuaModel").warmAssets())},[GAME_IDS.TREASURE_HUNT]:function*(){yield*deferred(()=>require("../games/treasure-hunt/TreasureHuntConstants").warmAssets()),yield*deferred(()=>require("../games/treasure-hunt/TreasureHuntScene").warmAssets()),yield*deferred(()=>require("../games/treasure-hunt/TreasureHuntModel").warmAssets())},[GAME_IDS.TILE_HOME]:function*(){const{TILE_TYPES:e}=require("../games/tile-home/TileHomeConstants");yield*deferred(()=>require("../games/shared/EngineFruits").warmAssets(e.map(e=>e.fruit),.25))},[GAME_IDS.FRUIT_MERGER]:function*(){yield*deferred(()=>require("../games/fruit-merger/FruitMergerScene").warmAssets())},[GAME_IDS.FRUIT_NINJA]:function*(){const{FRUIT_KINDS:e,FRUIT_DETAIL:r}=require("../games/fruit-ninja/FruitNinjaConstants");yield*deferred(()=>require("../games/shared/EngineFruits").warmAssets(e,r,!0)),yield*deferred(()=>require("../games/fruit-ninja/FruitNinjaScene").warmAssets())},[GAME_IDS.CAR_RACING]:function*(){yield*deferred(()=>require("../games/car-racing/CarRacingConstants").warmAssets()),yield*deferred(()=>require("../games/car-racing/CarRacingScene").warmAssets())},[GAME_IDS.BIKE_RACING]:function*(){yield*deferred(()=>require("../games/car-racing/CarRacingConstants").warmAssets()),yield*deferred(()=>require("../games/bike-racing/BikeRacingConstants").warmAssets()),yield*deferred(()=>require("../games/bike-racing/BikeRacingScene").warmAssets())},[GAME_IDS.PENGUIN_RUN]:function*(){yield*deferred(()=>require("../games/penguin-run/PenguinMeshes").warmAssets()),yield*deferred(()=>require("../games/penguin-run/PenguinRunScene").warmAssets())},[GAME_IDS.CHAMELEON_RUN]:function*(){yield*deferred(()=>require("../games/chameleon-run/ChameleonRunMeshes").warmAssets())},[GAME_IDS.PAPER_IO]:function*(){yield*deferred(()=>require("../games/paper-io/PaperIoMeshes").warmAssets()),yield*deferred(()=>require("../games/paper-io/PaperIoScene").warmAssets())},[GAME_IDS.CROSSY_ROAD]:function*(){yield*deferred(()=>require("../games/crossy-road/CrossyRoadMeshes").warmAssets()),yield*deferred(()=>require("../games/crossy-road/CrossyRoadPerson").warmAssets())}},prepared=new Set,scenes=new Set;let sharedReady=!1;export const isHeavyGame=e=>Object.hasOwn(HEAVY_GAME_ASSETS,e);export const areGameAssetsReady=(e,r)=>prepared.has(e)&&scenes.has(e+":"+(r??"classic"))&&e!==GAME_IDS.TREASURE_HUNT;export function gameAssetStages(e,r){const s=HEAVY_GAME_ASSETS[e];return[{label:"Getting ready",*tasks(){yield()=>{const e=require("@nayan-ui/engine");if(!e.isEngineAvailable)throw Error("The native game engine is unavailable in this app build");return e.warmUpEngine()},!sharedReady&&(yield()=>require("../games/shared/EngineHud").loadHudFonts(),yield*deferred(()=>require("../games/shared/EngineHud").warmAssets()),yield*deferred(()=>require("../games/shared/EngineBlasts").warmAssets()),yield()=>{sharedReady=!0})}},{label:"Bringing your world to life",*tasks(){require("./SoundsService").preloadGameSounds(e),prepared.has(e)||(s&&(yield*s()),yield()=>{prepared.add(e)}),e===GAME_IDS.TREASURE_HUNT&&(yield*deferred(()=>require("../games/treasure-hunt/TreasureHuntRules").warmNextMap()),yield()=>{const e=require("../games/treasure-hunt/TreasureHuntRules").peekNextMap();e&&require("../games/treasure-hunt/TreasureHuntScene").terrainModels(e.landscape.profile)})}},{label:"Adding the finishing touches",*tasks(){const s=e+":"+(r??"classic");if(!scenes.has(s)){const a=resolveGameTheme(r);[GAME_IDS.PAPER_IO,GAME_IDS.TILE_HOME,GAME_IDS.FRUIT_MERGER].includes(e)&&(yield()=>require("../games/shared/EngineBackdrop").backdropMesh(a)),e===GAME_IDS.FRUIT_NINJA&&(yield*deferred(()=>require("../games/shared/EngineMeadow").warmAssets(a,["meadow"]))),e===GAME_IDS.CHAMELEON_RUN&&(yield*deferred(()=>require("../games/chameleon-run/ChameleonRunBackdrop").warmAssets(a))),yield*require("./SoundsService").warmSoundAssets([e]),e===GAME_IDS.TREASURE_HUNT&&(yield()=>require("../games/treasure-hunt/TreasureHuntConstants").sounds?.ready),yield()=>{scenes.add(s)}}}}]}export function gameAssetGroups(){return Object.keys(HEAVY_GAME_ASSETS).map(e=>({id:e,*tasks(){for(const r of gameAssetStages(e))yield*r.tasks()}}))}
|