@nayan-ui/games 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 -38
- 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";export const POINTS_PER_CORRECT=200;export const POINTS_PER_UNIT=500;export const WIN_BONUS=5e3;export const CLUES=36;const DIGITS=[1,2,3,4,5,6,7,8,9],ALL_DIGITS=1022,BOX_OF=Array.from({length:81},(o,r)=>3*Math.floor(r/27)+Math.floor(r%9/3));function shuffle(o){const r=[...o];for(let o=r.length-1;o>0;o--){const t=Math.floor(Math.random()*(o+1));[r[o],r[t]]=[r[t],r[o]]}return r}function deadCell(o,r,t,e,n){for(let l=n;l<81;l++)if(0===o[l]&&1022===(r[l/9|0]|t[l%9]|e[BOX_OF[l]]))return!0;return!1}function solve(o,r,t,e,n){let l=n;for(;l<81&&0!==o[l];)l++;if(81===l)return!0;const f=l/9|0,s=l%9,a=BOX_OF[l];for(const n of shuffle(DIGITS)){const i=1<<n;if(!((r[f]|t[s]|e[a])&i)){if(o[l]=n,r[f]|=i,t[s]|=i,e[a]|=i,!deadCell(o,r,t,e,l+1)&&solve(o,r,t,e,l+1))return!0;o[l]=0,r[f]&=~i,t[s]&=~i,e[a]&=~i}}return!1}function solvedBoard(){const o=new Uint8Array(81),r=new Uint16Array(9),t=new Uint16Array(9),e=new Uint16Array(9);for(let n=0;n<9;n+=3){const l=shuffle(DIGITS);let f=0;for(let s=n;s<n+3;s++)for(let a=n;a<n+3;a++){const n=l[f++],i=1<<n;o[9*s+a]=n,r[s]|=i,t[a]|=i,e[BOX_OF[9*s+a]]|=i}}return solve(o,r,t,e,0),Array.from({length:9},(r,t)=>Array.from(o.subarray(9*t,9*t+9)))}export function newPuzzle(){const o=solvedBoard(),r=o.map(o=>o.map(o=>({value:o,given:!0,error:!1}))),t=shuffle(Array.from({length:81},(o,r)=>({row:Math.floor(r/9),col:r%9})));for(const o of t.slice(0,45))r[o.row][o.col].value=0,r[o.row][o.col].given=!1;return{grid:r,solution:o,toFill:45}}export function completedUnits(o,r,t){const e=(r,t)=>o.grid[r][t].value===o.solution[r][t],n=new Set;let l=0,f=!0,s=!0;for(let o=0;o<9;o++)e(r,o)||(f=!1),e(o,t)||(s=!1);if(f){l+=500;for(let o=0;o<9;o++)n.add(9*r+o)}if(s){l+=500;for(let o=0;o<9;o++)n.add(9*o+t)}const a=3*Math.floor(r/3),i=3*Math.floor(t/3);let u=!0;for(let o=a;o<a+3;o++)for(let r=i;r<i+3;r++)e(o,r)||(u=!1);if(u){l+=500;for(let o=a;o<a+3;o++)for(let r=i;r<i+3;r++)n.add(9*o+r)}return{cells:[...n],points:l}}export function remaining(o){const r=[0,9,9,9,9,9,9,9,9,9];for(const t of o.grid)for(const o of t)o.value>0&&!o.error&&(r[o.value]=Math.max(0,r[o.value]-1));return r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,Path}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{flatGlyphMesh}from"../shared/EngineGlyphs.js";import{cacheGameAsset,createGameMesh as _0x1f597b}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CELL_HEIGHT,cellCentre,COLORS,FLASH_STEP,KEY_HEIGHT,keyCentre}from"./SudokuConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("sudoku/SudokuScene:"+e,o),meshes.set(e,t)),t},BOARD_DEPTH=10,BACKDROP_DEPTH=30,SURFACE=1,panelMesh=(e,o,t,s)=>cached("sd-panel:"+e+":"+o+":"+t+":"+s,()=>_0x1f597b(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o,t),{depth:s}),{shine:0})),cellColor=(e,o)=>toColor("selected"===o?COLORS.SELECTED:e.error?COLORS.ERROR:"same"===o?COLORS.SAME_NUMBER:"peer"===o?COLORS.PEER:e.given?COLORS.GIVEN:COLORS.CELL),digitColor=e=>toColor(e.error?COLORS.TEXT_ERROR:e.given?COLORS.TEXT_GIVEN:COLORS.TEXT_PLACED),keyDigit=e=>Math.min(.5*e.key,.4*e.keyH),DIGIT=.5,cellHeight=(e,o)=>e.cell*CELL_HEIGHT*(o?1.8:1),cellTop=e=>1+e.cell*CELL_HEIGHT,keyTop=e=>1+e.key*KEY_HEIGHT;function spawnBoard(e,o,t){const s="classic"===t.mode,l=[e.spawn({mesh:panelMesh(o.board,o.board,s?14:8,10),position:[0,o.boardY,-5],color:toColor(s?COLORS.FRAME:t.BOARD.SURFACE),pickable:!1}),e.spawn({mesh:panelMesh(o.grid,o.grid,4,1),position:[0,o.boardY,.5],color:toColor(s?COLORS.LINES:t.BOARD.GRID_LINE),pickable:!1})];return s&&l.push(e.spawn({mesh:panelMesh(o.grid+6,o.grid+6,8,1),position:[0,o.boardY,.2],color:toColor(COLORS.WELL),pickable:!1})),l}export function buildScene(e,o,t){const s=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,s,o,30);const l=o.cell*CELL_HEIGHT,n=[];for(let t=0;t<9;t++)for(let s=0;s<9;s++){const[i,a]=cellCentre(o,t,s);n.push(spawnRaisedBlock(e,{position:[i,a,1+l/2],size:[o.cell,o.cell,l],color:toColor(COLORS.CELL),gloss:!1,shadow:!1}))}const i=[],a=o.key*KEY_HEIGHT;for(let t=1;t<=9;t++){const[s,l]=keyCentre(o,t),n=e.spawn({mesh:"none",position:[s,l,1],pickable:!1}),r=spawnRaisedBlock(e,{parent:n,position:[0,0,a/2],size:[o.key,o.keyH,a],color:toColor(COLORS.KEY),gloss:!1,shadow:!1}),p=keyDigit(o),d=e.spawn({mesh:flatGlyphMesh(String(t)),parent:n,position:[0,.1*o.keyH,a+.6],scale:p,color:toColor(COLORS.KEY_TEXT),pickable:!1}),h=.42*p,C=e.spawn({mesh:flatGlyphMesh("9"),parent:n,position:[0,.32*-o.keyH,a+.6],scale:h,color:toColor(COLORS.KEY_REMAINING),pickable:!1});i.push({root:n,block:r,digit:d,count:C})}return{backdrop:s,board:spawnBoard(e,o,t),cells:n,digits:Array(81).fill(null),shown:Array(81).fill(""),selected:-1,keys:i,keyCounts:Array(9).fill(-1)}}export function removeScene(e,o){for(const t of[o.backdrop,...o.board,...o.cells,...o.digits,...o.keys.map(e=>e.root)])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s);for(const o of t.board)e.despawn(o);t.board=spawnBoard(e,o,s)}export function drawGrid(e,o,t,s,l,n=-1){const i=.5*o.cell;t.selected=-1;for(let a=0;a<9;a++)for(let r=0;r<9;r++){const p=9*a+r,d=s[a][r],h=l(a,r),[C,E]=cellCentre(o,a,r),k=cellHeight(o,"selected"===h),u=1+k+.6;"selected"===h&&(t.selected=p),e.stopAnimation(t.cells[p]),e.set(t.cells[p],{color:cellColor(d,h),position:[C,E,1+k/2],scale:[o.cell,o.cell,k]});const f=d.value?d.value+":"+d.given+":"+d.error:"";if(f!==t.shown[p]){const s=t.digits[p];if(null!=s&&e.despawn(s),t.digits[p]=null,d.value){const s=e.spawn({mesh:flatGlyphMesh(String(d.value)),position:[C,E,u],scale:i,color:digitColor(d),pickable:!1});p===n&&(e.set(s,{scale:.2*i,position:[C,E,u+.5*o.cell]}),e.animate(s,{scale:i,position:[C,E,u]},{duration:.22,easing:"back"})),t.digits[p]=s}t.shown[p]=f}else null!=t.digits[p]&&(e.stopAnimation(t.digits[p]),e.set(t.digits[p],{position:[C,E,u],scale:i}))}}export function drawKeys(e,o,t,s){const l=.42*keyDigit(o);t.keys.forEach((o,n)=>{const i=s[n+1];t.keyCounts[n]!==i&&(t.keyCounts[n]=i,e.set(o.block,{color:toColor(i>0?COLORS.KEY:COLORS.KEY_DISABLED)}),e.set(o.digit,{color:toColor(i>0?COLORS.KEY_TEXT:COLORS.KEY_DISABLED_TEXT)}),e.set(o.count,{mesh:flatGlyphMesh(String(i)),scale:i>0?l:.001}))})}export function pressKey(e,o,t,s,l){const n=t.keys[s-1];if(!n)return;const[i,a]=keyCentre(o,s);e.animate(n.root,{position:[i,a,1-(l?o.key*KEY_HEIGHT*.55:0)]},{duration:l?.06:.12,easing:l?"easeOut":"back"})}export function shakeCell(e,o,t,s){e.animate(t.cells[s],{shake:.12*o.cell},{duration:.28});const l=t.digits[s];null!=l&&e.animate(l,{shake:.12*o.cell},{duration:.28})}export function flash(e,o,t,s,l){const n=Math.floor(l/9),i=l%9;for(const l of s){const s=cellHeight(o,l===t.selected),a=Math.floor(l/9),r=l%9,[p,d]=cellCentre(o,a,r),h=Math.max(Math.abs(a-n),Math.abs(r-i))*FLASH_STEP;e.animate(t.cells[l],[{position:[p,d,1+s/2+.3*o.cell],at:.35},{position:[p,d,1+s/2]}],{duration:.4,delay:h,easing:"easeOut"});const C=t.digits[l];if(null!=C){const t=.5*o.cell,l=1+s+.6;e.animate(C,[{position:[p,d,l+.3*o.cell],scale:1.2*t,at:.35},{position:[p,d,l],scale:t}],{duration:.4,delay:h,easing:"easeOut"})}}}export function celebrate(e,o){effects.confetti(e,{position:[0,o.boardY,2*o.cell],count:70,size:.2*o.cell,speed:1.3*o.board,lifetime:1.4,gravity:2.2*-o.board,colors:["#FFD700","#4CAF50","#2196F3","#E74C3C"].map(e=>toColor(e))})}export{keyTop,cellTop};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,textColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{GAME_DURATION,getLayout,LIGHT}from"./TangramConstants.js";import{createGame,dispose,drag,playAgain,setLayout,setTheme,start,stop,tick}from"./TangramGame.js";import{TOTAL_PIECES}from"./TangramRules.js";import{jsx as _0x32e1f8}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.TANGRAM,FEEDBACK={rotate:{sound:SOUNDS.ROTATE,haptic:HapticType.LIGHT},place:{sound:SOUNDS.PLACE,haptic:HapticType.SUCCESS},wrong:{sound:SOUNDS.WRONG,haptic:HapticType.WARNING},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const Tangram=engineGame(GAME_IDS.TANGRAM,e=>{const[t,s]=useLiveState(0),[a,r]=useLiveState(0),[o,i]=useLiveState(GAME_DURATION),{game:n,theme:m,status:S,screen:p,gameOver:u}=useEngineGame(e,{gameId:GAME_IDS.TANGRAM,create:createGame,start:start,reset:stop,replay:playAgain,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,a)=>{const r=getLayout(t,s,a);return setLayout(e,r),r.boardW},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START),wire:(e,t)=>{e.onScore=s,e.onPlaced=r,e.onTime=i,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x32e1f8(EngineGameScreen,{...p,light:LIGHT,columns:[scoreColumn(t),textColumn("PIECES",a+"/"+TOTAL_PIECES),timerColumn(o,m)],subtext:"Fit all seven pieces!",gameOver:u({title:"win"===S?"PUZZLE SOLVED!":"TIME UP!",message:"win"===S?"You reassembled the shape!":"You ran out of time!",scoreLabel:"Score",score:n.score,buttonText:"win"===S?"Next Puzzle!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x1b14b7=_0x52ad;!function(){const t=_0x52ad,o=_0x35b8();for(;;)try{if(678478==-parseInt(t(351,"IU@V"))/1*(parseInt(t(380,"!&iP"))/2)+parseInt(t(390,"I%AP"))/3+-parseInt(t(303,"1#Du"))/4*(parseInt(t(334,"dCCR"))/5)+-parseInt(t(297,"^d!Y"))/6*(-parseInt(t(256,"tiQb"))/7)+-parseInt(t(308,"t2Z["))/8+-parseInt(t(319,"a%ic"))/9*(-parseInt(t(335,"wT6u"))/10)+parseInt(t(293,"*$bz"))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}();import{getGameDimensions}from"../../services/UtilsService.js";import{BACKGROUND_COLOR,PRIMARY_COLOR,darken}from"../../services/GamesConstants.js";const DIMS=getGameDimensions(),GAME_WIDTH=DIMS[_0x1b14b7(320,"[8AK")],SCREEN_H=DIMS.height,TOTAL_BOARD_UNITS=6.2,RESERVED_CHROME=280,AVAILABLE_H=Math[_0x1b14b7(398,"DNXB")](360,SCREEN_H-280),UNIT_BY_WIDTH=.998*GAME_WIDTH/4,UNIT_BY_HEIGHT=AVAILABLE_H/6.2;export const UNIT=Math[_0x1b14b7(381,"s*eQ")](32,Math.floor(Math[_0x1b14b7(356,"Abd&")](UNIT_BY_WIDTH,UNIT_BY_HEIGHT)));export const BOARD_W=GAME_WIDTH;export const BOARD_H=Math[_0x1b14b7(310,"yi&$")](6.2*UNIT);const SIL_TOP=.3*UNIT;export const SNAP_DIST=1.8*UNIT;export const ROT_TOL=30;export const TRAY_SCALE=.55;const _0x3bcb37={};_0x3bcb37[_0x1b14b7(317,"dCCR")]=120,_0x3bcb37.POINTS_PER_PIECE=1e3,_0x3bcb37.TIME_BONUS_PER_SECOND=10,_0x3bcb37[_0x1b14b7(353,"Gk#!")]=7;export const TANGRAM_GAME_CONFIG=_0x3bcb37;const _0x3cad99={};_0x3cad99[_0x1b14b7(363,"IU@V")]=_0x1b14b7(291,"ey#Q"),_0x3cad99[_0x1b14b7(421,"h8)8")]=_0x1b14b7(313,"cRaL"),_0x3cad99[_0x1b14b7(376,"56rM")]=_0x1b14b7(298,"lQVW"),_0x3cad99[_0x1b14b7(286,"wT6u")]=_0x1b14b7(324,"%Ovx"),_0x3cad99[_0x1b14b7(253,"t2Z[")]=_0x1b14b7(307,"a%ic"),_0x3cad99[_0x1b14b7(339,"ZAT)")]="#F4C724",_0x3cad99.teal=_0x1b14b7(373,"cM^h");const TAN_COLORS=_0x3cad99,_0x21e401={};_0x21e401[_0x1b14b7(395,"tiQb")]=BACKGROUND_COLOR,_0x21e401[_0x1b14b7(372,"a%ic")]=PRIMARY_COLOR,_0x21e401[_0x1b14b7(383,"%Ovx")]="rgba(255, 255, 255, 0.12)",_0x21e401[_0x1b14b7(416,"IU@V")]=_0x1b14b7(364,"lQVW"),_0x21e401[_0x1b14b7(407,"M7f2")]=_0x1b14b7(369,"%Ovx"),_0x21e401.TEXT_PRIMARY=_0x1b14b7(273,"7zy%");export const TANGRAM_COLORS=_0x21e401;function _0x52ad(t,o){t-=246;const n=_0x35b8();let r=n[t];if(void 0===_0x52ad.Auejdk){const t=function(t,o){let n,r,x=[],e=0,W="";for(t=function(t){let o="",n="";for(let n,r,x=0,e=0;r=t.charAt(e++);~r&&(n=x%4?64*n+r:r,x++%4)?o+=String.fromCharCode(255&n>>(-2*x&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let t=0,r=o.length;t<r;t++)n+="%"+("00"+o.charCodeAt(t).toString(16)).slice(-2);return decodeURIComponent(n)}(t),r=0;r<256;r++)x[r]=r;for(r=0;r<256;r++)e=(e+x[r]+o.charCodeAt(r%o.length))%256,n=x[r],x[r]=x[e],x[e]=n;r=0,e=0;for(let o=0;o<t.length;o++)r=(r+1)%256,e=(e+x[r])%256,n=x[r],x[r]=x[e],x[e]=n,W+=String.fromCharCode(t.charCodeAt(o)^x[(x[r]+x[e])%256]);return W};_0x52ad.qJdyKJ=t,_0x52ad.igZaQF={},_0x52ad.Auejdk=!0}const x=n[0];_0x52ad.nbeKnQ!==x&&(_0x52ad.igZaQF={},_0x52ad.nbeKnQ=x);const e=_0x52ad.igZaQF[t];return void 0===e?(void 0===_0x52ad.EirMjH&&(_0x52ad.EirMjH=!0),r=_0x52ad.qJdyKJ(r,o),_0x52ad.igZaQF[t]=r):r=e,r}const _0xa46827={};_0xa46827.type=_0x1b14b7(246,"9DSi"),_0xa46827[_0x1b14b7(262,"1#Du")]=TAN_COLORS[_0x1b14b7(414,"56rM")],_0xa46827[_0x1b14b7(404,"SXt5")]=[[0,0],[0,4],[2,2]];const _0x466e16={};_0x466e16[_0x1b14b7(367,"rUO1")]=_0x1b14b7(279,"wT6u"),_0x466e16[_0x1b14b7(250,"^d!Y")]=TAN_COLORS[_0x1b14b7(385,"t2Z[")],_0x466e16[_0x1b14b7(397,"IU@V")]=[[0,0],[4,0],[2,2]];const _0x3ff0df={};_0x3ff0df[_0x1b14b7(272,"[8AK")]="medium",_0x3ff0df.color=TAN_COLORS[_0x1b14b7(340,"ZVo]")],_0x3ff0df.pts=[[4,4],[2,4],[4,2]];const _0x327127={};_0x327127[_0x1b14b7(389,"By3T")]=_0x1b14b7(349,"yi&$"),_0x327127[_0x1b14b7(249,"h8)8")]=TAN_COLORS.orange,_0x327127[_0x1b14b7(269,"%Ovx")]=[[0,4],[2,4],[1,3]];const _0x46d95d={};_0x46d95d[_0x1b14b7(247,"S!14")]=_0x1b14b7(400,"tiQb"),_0x46d95d[_0x1b14b7(278,"cRaL")]=TAN_COLORS[_0x1b14b7(329,"$qPG")],_0x46d95d[_0x1b14b7(302,"lQVW")]=[[2,2],[3,3],[3,1]];const _0x350aac={};_0x350aac.type=_0x1b14b7(417,"8@rz"),_0x350aac.color=TAN_COLORS[_0x1b14b7(289,"!&iP")],_0x350aac[_0x1b14b7(404,"SXt5")]=[[1,3],[2,4],[3,3],[2,2]];const _0x4e3fe1={};_0x4e3fe1[_0x1b14b7(247,"S!14")]="para",_0x4e3fe1[_0x1b14b7(294,"*$bz")]=TAN_COLORS[_0x1b14b7(290,"2mtD")],_0x4e3fe1[_0x1b14b7(344,"S!14")]=[[3,3],[4,2],[4,0],[3,1]];const BASE_TANS=[_0xa46827,_0x466e16,_0x3ff0df,_0x327127,_0x46d95d,_0x350aac,_0x4e3fe1],_0x362910={};_0x362910[_0x1b14b7(354,"&L&X")]=360,_0x362910[_0x1b14b7(264,"Abd&")]=360,_0x362910.small=360,_0x362910.square=90,_0x362910[_0x1b14b7(305,"z[EL")]=180;const SYMMETRY=_0x362910,LEVEL_ROTATIONS=[0,90,180,270],_0x30b84e={};function _0x35b8(){const t=["ACo6smo3","Bmo4DfD3W6VcVq","WRX5bwfe","W6GCeCoQu10","WOaxxmoxva","efvAWQnGWPncWPNdUCoFb8oKba","W6r0W6WFWPa","WQ7dSaZcPg1cWPnoWQiiWOmw","WQNcGSoyW6Ha","quiaW7ldVa","pfb4gJ0","W4hdTfmxaq","DGNcSKmFFmkF","mSo9CgKk","dff1WOBdNmk2","dshdOg9q","WOpdUmofl1a","W5PTW5eOWP3dHW","awXggIFdSa","ptBdT21D","WOO4rmoNsa","t8khkwnt","zsrMWPriWPH+WOG","C8orW6xcVe1lofm","W7e8kCoAsa","WPmqwSocCq","W48mna","s2NcHM4SoG","WPTNW5SBW7y","umkVe2Lo","bwb9WOf+","D8o6F8oIW5e","w11T","WQrXW44cFa","qJpdH8oqWOLG","eKb4WQhdTW","bvP+WQ9r","W67cKSohWRlcGq","nCkkASoKW5q","fSkyfKv2W51t","W4rZW6KNg3xdLmkf","vxFdT8ksnWFcMdRcIYGUW7u","W641FJ3dJW","u8kik0Lw","AhRcRW","W7xdOeupW58","W64XyJ3dNHu","WQhdVcuvba","WRNdOCkZWOhcUW","W44ikHxdPSop","WRunW442bq","rCkslgK","mCo6WPhcGNNdIunAuwTlW43cIh4FW4OLWR59kwdcNmkzW5lcLa","WQtdSmo9jKS","o8kiW4ZcMNXZ","W4tdGdFdNa","WPjdW7OiBuS","jYJdPwmbFmkzW7FcJMxcLg0FW6jnWR8wW5jaW5LSWRqCx0i","W53dMdC","ysiLW5unW6fHWR7dImoObCo5","W4RcKN3dMrOGWRW","W71AsCoHjCkPW7G","BfNdKW","vCkyWR42W4VdMCk1ACkatCogWRtdIq","WPSXW4ahiq","W6RcRLddVZe","WQxcU3e/WQu","W4FcQmo8WRpcIa","xa4RW4hcI8oYB8krW4uJW7ZdIG","W73dJ3G","W4LuW5qkWOi","bGBdI0PMg8oPWPBdTGddUr5JWOiH","wmkVWQ9EW5S","aXHN","vfZcJCkSpG","W68bE8oOWQq","DMm2W4xcPW","WOxdGSkxDG","W7OXtXyjW7dcS8oNWPNdImk1WRZdIa","bSoFfcz+","W5tdSSoLcxpdGCks","k8ovd8kMWOK","W4tcICoEiCoMWQNcGmkdyCkIF30","oCoEywCfWRPyW71Hra","CCkVW4tdLghdJs8OkHikWPi","v8kkkG","dmojW7q","WQxcSwq","cmoYq0aU","t8onuCoBW5O","WQ7dVt8w","WOOrDCoxvW","WRmkBq","mmknrCo6W5y","W6rGW4WkWOy","WPpdGGSJkCo2FmoHyG","hYFdPMv7","W77cKSosW6ddRmo2h0OgFteiW7O","f8o6teS2WOa","WO0rW7iPfq","WOHSW44B","WQ1mW64zW7y","WP4VW5ah","W6ZdRGldUHOaWOS","Dmk3furOW4fFbvVcPtjkW5mXCfrs","W5eCmrpdOmoc","W681Fa","WO3dS8oscLq","WPpdKq8Gpa","lmoZeW","kwPNW5bL","x1bUW50","umkMWODtW4T3","pCo5g8o5oG","W4FdGSkZs1a","DwFcSG","WOxdLmkHESkRW7RcTa","aqHXng7cPG","eJ52uHu","W5/cTSopWQBcOG","tmoMz3GkWQzr","WP3dSSoycee","W4RdKeCEW4i","smk6WPLr","W5xdGve","WRVcUxGBWRaxaJ9NWORdOMiFcG","W7VdRIJdVba","n8owdqzI","AhBcPCkHmqO","amoAW6vNWOC","l8oEz3yi","W4NdHSk6AfG","W6e7ydxdMa","jtVdTa","s0BcJNiu","kSoqBKG4","WQRcKSomW7K","DZPdCr3dReS","aSkVW4lcRvm","eSoOjmkhWPG","W7VdRJC","c8orW4T1WPS","lmoskGXe","j8kaW5VcNNW","W7tdPYpdOq0","W4tdLGhdKhFdGfe","c8oQuuq","W57dGK87bW","t8kQWOC","W7pcRuhdUa","jmktW4JcL35L","W5qxo8oBva","WQhdJCkl","e111WP7dLSkZ","imkQWPtcGW","W6/cKmkKW6/dPmkehW","zmkTWO5zW4y","W7RdPInfW6DvvqzxWQpdMwOK","WQVcV3GCWQ0","WRiUW44wpW","WP9ylujs","WPBcN8oOeXjqWQNcNGpdNSk2WRm","ymkOWRhcOwBdJ08","Cmolw8oeW5u","uCoqACoOW7y","W4qekb4","m8oPWOa","WQ3cS33cOvDtWR/cPSktggNdLW","fCorW7XG","hwHAha","W4lcJSoqi8oNWQFdOmkzz8k+D2ldPW","WRNdUxBcOwiWW5m","qKG0DdBdU8kIWO52WPlcQ38P","WOJdTCos","W6/cKmotWRdcIq","WOVdGXSana"];return(_0x35b8=function(){return t})()}_0x30b84e.x=2,_0x30b84e.y=2;const PIVOT=_0x30b84e,rotatePt=(t,o,n,r,x)=>{const e=_0x1b14b7,W={xkKeT:function(t,o){return t/o}};W[e(341,"IU@V")]=function(t,o){return t*o},W.RtjgA=function(t,o){return t-o},W[e(325,"tiQb")]=function(t,o){return t-o},W[e(314,"I%AP")]=function(t,o){return t+o},W[e(386,"Abd&")]=function(t,o){return t*o};const _=W,b=_[e(263,"cRaL")](_[e(341,"IU@V")](n,Math.PI),180),a=Math[e(276,"1#Du")](b),d=Math[e(284,"2X!b")](b),u=_[e(342,"dCCR")](t,r),i=o-x;return{x:_[e(391,"cRaL")](_[e(388,"iIDy")](r,_[e(271,"tiQb")](u,a)),i*d),y:_[e(258,"F3u)")](x+u*d,i*a)}},centroidOf=t=>{const o=_0x1b14b7,n={};n[o(419,"r)T#")]=function(t,o){return t/o};const r=n;let x=0,e=0;for(const o of t)x+=o.x,e+=o.y;return{x:r[o(275,"UWpG")](x,t[o(361,"8@rz")]),y:e/t.length}},pathFromPoints=t=>{const o=_0x1b14b7;let n="M "+t[0].x[o(415,"1#Du")](2)+" "+t[0].y[o(415,"1#Du")](2);for(let r=1;r<t[o(346,"[&xa")];r++)n+=" L "+t[r].x[o(252,"By3T")](2)+" "+t[r].y[o(281,"rUO1")](2);return n+" Z"},mulberry32=t=>{const o=_0x1b14b7,n={ariby:function(t,o){return t%o}};n[o(336,"L7@O")]=function(t,o){return t!==o},n[o(300,"tz!(")]=o(384,"2X!b"),n[o(318,"$qPG")]=function(t,o){return t^o},n.IFZsJ=function(t,o){return t|o},n[o(393,"UWpG")]=function(t,o){return t>>>o};const r=n;let x=t>>>0;return()=>{const t=o,n={pndkj:function(t,o){return r[_0x52ad(265,"DNXB")](t,o)}};if(r[t(360,"ey#Q")](t(299,"tz!("),r[t(311,"M7f2")])){x|=0,x=x+1831565813|0;let o=Math[t(402,"M7f2")](r[t(283,"s*eQ")](x,x>>>15),r[t(332,"SXt5")](1,x));return o=o+Math[t(285,"a%ic")](o^o>>>7,61|o)^o,((o^r[t(323,"s*eQ")](o,14))>>>0)/4294967296}{let o=(n[t(377,"a%ic")](_0x1254b5-_0x39993d,_0xdedb7e)+_0x1c5f82)%_0x3e5892;return o=_0x51a2a7[t(260,"F3u)")](o,_0x4bc265-o),o<=_0x56c674}}},shuffle=(t,o)=>{const n=_0x1b14b7,r={CiBCV:function(t){return t()}},x=[...t];for(let t=x.length-1;t>0;t--){const e=Math[n(328,"r)T#")](r[n(316,"SXt5")](o)*(t+1));[x[t],x[e]]=[x[e],x[t]]}return x},polysMatch=(t,o,n)=>{const r=_0x1b14b7;if(t[r(410,"tiQb")]!==o[r(368,"F%#]")])return!1;const x=new Array(o[r(358,"&L&X")])[r(301,"8@rz")](!1);for(const e of t){let t=!1;for(let W=0;W<o[r(330,"z[EL")];W++)if(!x[W]&&Math[r(333,"IU@V")](e.x-o[W].x,e.y-o[W].y)<=n){x[W]=!0,t=!0;break}if(!t)return!1}return!0},FIT_STEPS=[0,45,90,135,180,225,270,315],pickInitialRot=(t,o,n)=>{const r=_0x1b14b7,x={};x[r(362,"56rM")]=function(t,o){return t%o},x[r(277,"DNXB")]=function(t,o){return t-o},x[r(255,"yi&$")]=function(t,o){return t>o};const e=x,W=[45,90,135,180,225,270,315,0][r(326,"!&iP")](n=>{const x=r;if(x(292,"2X!b")!==x(327,"%Ovx")){const t=_0x34a75c(_0x47f1e6(_0x1ecdfb),_0x1c6062,_0x1e8324,_0x16b26d.x,_0x42f8e2.y),o={};return o.x=t.x*_0x2403c6,o.y=t.y*_0xf14524,o}{let r=(e[x(274,"wT6u")](e[x(343,"tz!(")](n,t),o)+o)%o;return r=Math[x(288,"ey#Q")](r,o-r),e[x(321,"&Dg8")](r,30)}});return W[Math.floor(n()*W[r(248,"2X!b")])]??45};export const generateLevel=t=>{const o=_0x1b14b7,n={QYPgn:function(t,o){return t*o},yJdpW:function(t,o){return t(o)},cLwRs:function(t,o){return t+o},MHzUe:function(t,o){return t+o},vzjGL:function(t,o,n,r){return t(o,n,r)},ltbjy:function(t,o){return t*o},qRWKZ:function(t){return t()},PnDVs:function(t,o){return t<o},FBseN:function(t){return t()},xxaSN:function(t,o){return t>o},tvrEq:function(t,o){return t-o},NxoRw:function(t,o){return t/o},Nmktp:function(t,o){return t(o)},lfgro:function(t,o){return t+o},UikHq:function(t,o){return t*o},xfrHc:function(t,o){return t<o},JhagR:function(t,o){return t/o},HRSoG:function(t,o,n){return t(o,n)},qsXiy:function(t,o){return t+o}},r=mulberry32(n.cLwRs(n.ltbjy(t,2654435761),40503)),x=LEVEL_ROTATIONS[Math[o(359,"M7f2")](n[o(411,"56rM")](r)*LEVEL_ROTATIONS.length)],e=n[o(405,"*Ro6")](n[o(254,"7zy%")](r),.5),W=t=>e?4-t:t,_=BASE_TANS.map(t=>t[o(344,"S!14")].map(([t,o])=>{const n=rotatePt(W(t),o,x,PIVOT.x,PIVOT.y),r={};return r.x=n.x*UNIT,r.y=n.y*UNIT,r}));let b=1/0,a=1/0,d=-1/0,u=-1/0;for(const t of _)for(const r of t)r.x<b&&(b=r.x),n[o(337,"SXt5")](r.y,a)&&(a=r.y),r.x>d&&(d=r.x),n[o(347,"!&iP")](r.y,u)&&(u=r.y);const i=n.tvrEq(d,b),f=n[o(406,"$qPG")](n.tvrEq(BOARD_W,i),2)-b,s=SIL_TOP-a,O={};for(const t of BASE_TANS){if(O[t[o(304,"DNXB")]])continue;const r=t[o(251,"Abd&")][o(399,"*$bz")](([t,o])=>({x:W(t)*UNIT,y:o*UNIT})),x=n[o(295,"56rM")](centroidOf,r);O[t[o(259,"2X!b")]]=r[o(370,"rUO1")](t=>({x:t.x-x.x,y:t.y-x.y}))}const R=SIL_TOP+(u-a)+.35*UNIT,S=n[o(280,"1#Du")](R,n[o(350,"*Ro6")](UNIT,.55)),I=BOARD_H-.55*UNIT,T=t=>Math.min(Math[o(309,"r)T#")](t,S),I),C=[T(S),T(I)],k=[4,3],m=[],y=n[o(322,"z[EL")](UNIT,.28);for(let t=0;n[o(257,"r)T#")](t,k[o(315,"L7@O")]);t++){const x=k[t];for(let e=0;n[o(287,"L7@O")](e,x);e++)m[o(282,"tiQb")]({x:n[o(408,"%Ovx")]((e+.5)*BOARD_W,x)+n[o(296,"I%AP")](r()-.5,y),y:C[t]+n.tvrEq(r(),.5)*y})}const P=n.HRSoG(shuffle,m,r),N=BASE_TANS.map((t,e)=>{const W=o,b=O[t.type];let a=0;for(const t of b){const o=Math[W(331,"%Ovx")](t.x,t.y);o>a&&(a=o)}const d=Math.ceil(n[W(413,"ZVo]")](2,a)+.5*UNIT),u=n[W(270,"ZAT)")](centroidOf,_[e]),i=n[W(382,"$qPG")](u.x,f),R=n[W(357,"F3u)")](u.y,s),S=_[e].map(t=>({x:t.x-u.x,y:t.y-u.y})),I=((t,n)=>{const r=o,e=O[t],W=.08*UNIT;for(const t of FIT_STEPS){const o=e[r(338,"8@rz")](o=>rotatePt(o.x,o.y,t,0,0));if(polysMatch(o,n,W))return t}return x})(t.type,S),T=_[e][W(418,"&L&X")](t=>({x:t.x+f,y:t.y+s})),C=pathFromPoints(T),k=SYMMETRY[t[W(412,"ZVo]")]],m=P[e];return{id:e,type:t[W(312,"tz!(")],color:t[W(268,"&L&X")],stroke:darken(t.color,.28),localPoints:b,canvasSize:d,targetCx:i,targetCy:R,targetRot:I,symmetry:k,silPath:C,initialRot:n[W(387,"V#*(")](pickInitialRot,I,k,r),scatterCx:m.x,scatterCy:m.y}}),h={x:n.qsXiy(b,f),y:a+s,w:d-b,h:n[o(355,"IU@V")](u,a)},A={};return A[o(366,"wT6u")]=N,A[o(261,"*$bz")]=h,A};export const isRotationMatched=(t,o,n)=>{const r=_0x1b14b7,x={};x[r(345,"F%#]")]=function(t,o){return t%o},x[r(267,"^d!Y")]=function(t,o){return t%o},x[r(403,"SXt5")]=function(t,o){return t-o};const e=x;let W=e[r(379,"yi&$")](e[r(378,"*$bz")](e.IokCU(t,o),n)+n,n);return W=Math.min(W,n-W),W<=30};export const snappedRotation=(t,o,n)=>{const r=_0x1b14b7,x={};x[r(420,"M7f2")]=function(t,o){return t/o},x[r(365,"r)T#")]=function(t,o){return t-o},x[r(348,"dCCR")]=function(t,o){return t*o};const e=x,W=Math[r(310,"yi&$")](e[r(266,"tiQb")](e.AdWfi(t,o),n));return o+e[r(401,"tz!(")](W,n)};export const localPath=(t,o,n)=>{const r=t[_0x1b14b7(374,"Gk#!")](t=>({x:t.x+o,y:t.y+n}));return pathFromPoints(r)};
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";import{RIM_RADIUS,TOTAL_BOARD_UNITS}from"./TangramRules.js";export const GAME_DURATION=120;export const POINTS_PER_PIECE=1e3;export{TRAY_SCALE,RIM_RADIUS}from"./TangramRules.js";export const TAP_MAX=.25;export const TAP_SLOP=10;export const ROTATE_STEP=45;export const ROTATE_TIME=.18;export const SNAP_TIME=.16;export const ENTRY_STAGGER=.045;export const WIN_DELAY=.22;export const WIN_STAGGER=.09;export const COLORS={CLASSIC_SLOT:"rgba(255, 255, 255, 0.12)",CLASSIC_SLOT_EDGE:"rgba(255, 255, 255, 0.30)"};export const TILT=0;export const LIGHT=frontLight([0,0,1],.45);export const PIECE_DEPTH=.2;export const STACK_STEP=.14;export const HELD_HEIGHT=1.2;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=88;export function getLayout(o,t,r){const T=getScoreBoardTop(r)+82,e=Math.max(240,t-T-88),n=gameWidthFor(o),s=n/(4+2*RIM_RADIUS),_=e/Math.cos(0)/TOTAL_BOARD_UNITS,E=Math.min(s,_);return{width:o,height:t,tilt:0,centerY:T+e/2,unit:E,boardW:n,boardH:E*TOTAL_BOARD_UNITS}}export const toWorld=(o,t,r)=>[t-o.boardW/2,o.boardH/2-r];export const toBoard=(o,t,r)=>[t+o.boardW/2,o.boardH/2-r];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{calculateTimeBasedScore}from"../../services/ScoringService.js";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{ENTRY_STAGGER,GAME_DURATION,HELD_HEIGHT,PIECE_DEPTH,POINTS_PER_PIECE,RIM_RADIUS,ROTATE_STEP,ROTATE_TIME,SNAP_TIME,STACK_STEP,TAP_MAX,TAP_SLOP,toBoard,TRAY_SCALE,WIN_DELAY,WIN_STAGGER}from"./TangramConstants.js";import{claimSlot,generateLevel,insidePiece,rotatePt,TOTAL_PIECES}from"./TangramRules.js";import{buildScene,celebrate,dim,enter,moveTo,pop,removeScene,setPose,setSceneTheme,wiggle}from"./TangramScene.js";const WORLD_CAPACITY=200;export function createGame(e){const t=new World(200),o={world:t,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",level:0,data:null,tans:[],occupied:[],active:-1,held:null,placed:0,get score(){return t.scoreboard.score},get timeLeft(){return t.scoreboard.shownSeconds},won:!1,clock:0,onPhase:e=>{},onScore:e=>{},onPlaced:e=>{},onTime:e=>{},onEvent:e=>{}};return t.scoreboard.reset(0,GAME_DURATION),t.scoreboard.handlers={onSecond:e=>o.onTime(e),onTimeUp:()=>"playing"===o.phase&&end(o,!1)},o}function poseOf(e,t){const o=e.tans[t],n=e.held?.id===t&&e.held.moved;return o.placed?{x:o.x,y:o.y,rot:o.rot,scale:1,lift:0}:n?{x:o.x,y:o.y,rot:o.rot,scale:1.05,lift:HELD_HEIGHT}:e.active===t?{x:o.x,y:o.y,rot:o.rot,scale:1,lift:STACK_STEP*(TOTAL_PIECES+2)}:{x:o.x,y:o.y,rot:o.rot,scale:TRAY_SCALE,lift:STACK_STEP*(t+1)}}const allPoses=e=>e.tans.map((t,o)=>poseOf(e,o));export function setLayout(e,t){const o=!e.layout;e.held&&(e.held=null,e.active=-1),e.layout=t,aimTilted(e.camera,t),o?setupLevel(e,e.level):rebuild(e,!1)}export function setTheme(e,t){e.theme=t,e.scene&&setSceneTheme(e.world,e.scene,t)}function rebuild(e,t){const o=e.layout;if(!o)return;const n=e.data;e.data=generateLevel(e.level,o.unit,o.boardW,o.boardH),n&&n.pieces.length===e.data.pieces.length&&!t&&(e.tans=e.tans.map((t,o)=>{const a=e.data.pieces[o];if(!t.placed)return{...t,x:a.scatterCx,y:a.scatterCy};const r=e.occupied.findIndex((e,o)=>e&&Math.hypot(n.pieces[o].targetCx-t.x,n.pieces[o].targetCy-t.y)<1),s=e.data.pieces[r]??a;return{...t,x:s.targetCx,y:s.targetCy}})),e.scene&&removeScene(e.world,e.scene),e.scene=buildScene(e.world,o,e.theme,e.data,allPoses(e)),t&&enter(e.world,o,e.scene,allPoses(e),ENTRY_STAGGER)}function setupLevel(e,t){const o=e.layout;e.world.cancelTimers(),e.level=t,e.held=null,e.active=-1,e.placed=0,e.world.scoreboard.reset(0,GAME_DURATION),e.won=!1,o&&(e.data=generateLevel(t,o.unit,o.boardW,o.boardH),e.tans=e.data.pieces.map(e=>({x:e.scatterCx,y:e.scatterCy,rot:e.initialRot,placed:!1})),e.occupied=e.data.pieces.map(()=>!1),rebuild(e,!0)),e.onScore(0),e.onPlaced(0),e.onTime(GAME_DURATION)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.startCountdown(GAME_DURATION),e.onPhase("playing"))}export function stop(e){e.phase="ready",setupLevel(e,0),e.onPhase("ready")}export function playAgain(e){const t=e.won?e.level+1:e.level;e.phase="ready",setupLevel(e,t),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,t){e.world.isDisposed||(e.clock+=Math.min(t,.25),e.world.update(t))}function end(e,t){e.world.scoreboard.stop(),e.won=t,e.phase="over";const{layout:o,scene:n,data:a}=e,r=e.held?.id;e.held=null,void 0!==r&&settle(e,r),o&&n&&a&&(t?celebrate(e.world,o,n,a,SNAP_TIME+WIN_DELAY,WIN_STAGGER):dim(e.world,n,e.tans.flatMap((e,t)=>e.placed?[]:[t]),a.pieces.map(e=>e.color))),e.onPhase("over"),e.onEvent(t?"win":"lose")}function boardPoint(e,t,o){const n=e.layout,[a,r]=unproject(n,t,o,.3+n.unit*PIECE_DEPTH*2);return toBoard(n,a,r)}export function tanAt(e,t,o){const{data:n,layout:a}=e;if(!n||!a)return-1;const r=[e.active,...[6,5,4,3,2,1,0].filter(t=>t!==e.active)].filter(e=>e>=0);for(const s of[0,.15*a.unit])for(const a of r){const r=e.tans[a];if(r.placed)continue;const l=e.held?.id===a&&e.held.moved?1.05:e.active===a?1:TRAY_SCALE;if(insidePiece(n.pieces[a].localPoints,r.x,r.y,r.rot,l,t,o,s))return a}return-1}export function drag(e,t){const{layout:o,scene:n}=e;if(!o||!n)return;if("start"===t.phase){if("playing"!==e.phase)return;const[a,r]=boardPoint(e,t.x,t.y),s=tanAt(e,a,r);if(s<0)return;const l=e.tans[s],i=e.active;return e.held={id:s,sx:t.x,sy:t.y,bx:a,by:r,ox:l.x,oy:l.y,at:e.clock,moved:!1},e.active=s,i>=0&&i!==s&&!e.tans[i].placed&&moveTo(e.world,o,n,i,poseOf(e,i),.14),void moveTo(e.world,o,n,s,poseOf(e,s),.14)}const a=e.held;if(!a)return;const r=e.tans[a.id];if("end"===t.phase&&t.cancelled)return r.x=a.ox,r.y=a.oy,e.held=null,settle(e,a.id);if(!a.moved&&Math.hypot(t.x-a.sx,t.y-a.sy)>TAP_SLOP&&(a.moved=!0,moveTo(e.world,o,n,a.id,poseOf(e,a.id),.1)),a.moved){const[s,l]=boardPoint(e,t.x,t.y);return r.x=a.ox+(s-a.bx),r.y=a.oy+(l-a.by),"end"!==t.phase?void setPose(e.world,o,n,a.id,poseOf(e,a.id)):(e.held=null,drop(e,a.id))}"end"===t.phase&&(e.held=null,e.clock-a.at<TAP_MAX&&rotate(e,a.id))}function rotate(e,t){const{layout:o,scene:n}=e;e.tans[t].rot+=ROTATE_STEP,keepInView(e,t),o&&n&&moveTo(e.world,o,n,t,poseOf(e,t),ROTATE_TIME,"back"),e.onEvent("rotate")}function settle(e,t){keepInView(e,t),e.layout&&e.scene&&moveTo(e.world,e.layout,e.scene,t,poseOf(e,t),.12)}function keepInView(e,t){const o=e.layout,n=e.data;if(!o||!n)return;const a=e.tans[t],r=poseOf(e,t).scale,s=n.pieces[t].localPoints.map(e=>rotatePt(e.x*r,e.y*r,a.rot,0,0)),l=s.map(e=>e.x),i=s.map(e=>e.y),d=o.unit*r*RIM_RADIUS;a.x=Math.max(d-Math.min(...l),Math.min(o.boardW-d-Math.max(...l),a.x)),a.y=Math.max(d-Math.min(...i),Math.min(o.boardH-d-Math.max(...i),a.y))}function drop(e,t){const{layout:o,scene:n,data:a}=e;if(!o||!n||!a||"playing"!==e.phase)return settle(e,t);const r=e.tans[t],s=claimSlot(a,e.occupied,o.unit,a.pieces[t].type,r.x,r.y,r.rot);if(s&&"nudge"!==s)return r.placed=!0,r.x=s.cx,r.y=s.cy,r.rot=s.rot,e.active===t&&(e.active=-1),moveTo(e.world,o,n,t,poseOf(e,t),SNAP_TIME),pop(e.world,o,n,t,.14),e.onEvent("place"),void placePiece(e);settle(e,t),"nudge"===s&&(wiggle(e.world,n,t,r.rot),e.onEvent("wrong"))}function placePiece(e){e.placed+=1,e.world.scoreboard.add(POINTS_PER_PIECE);const t=e.placed>=TOTAL_PIECES;t&&e.world.scoreboard.set(calculateTimeBasedScore(GAME_DURATION-e.timeLeft,GAME_DURATION,e.score)),e.onPlaced(e.placed),e.onScore(e.score),t&&end(e,!0)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const TOTAL_BOARD_UNITS=6;export const TRAY_SCALE=.4;export const RIM_RADIUS=.024;export const ROT_TOL=30;export const SNAP_UNITS=1.8;export const TOTAL_PIECES=7;const TAN_COLORS={blue:"#4A90E2",red:"#E24A4A",green:"#5BB749",orange:"#F5A623",purple:"#9B59B6",yellow:"#F4C724",teal:"#26C6DA"},BASE_TANS=[{type:"large",color:TAN_COLORS.blue,pts:[[0,0],[0,4],[2,2]]},{type:"large",color:TAN_COLORS.red,pts:[[0,0],[4,0],[2,2]]},{type:"medium",color:TAN_COLORS.green,pts:[[4,4],[2,4],[4,2]]},{type:"small",color:TAN_COLORS.orange,pts:[[0,4],[2,4],[1,3]]},{type:"small",color:TAN_COLORS.purple,pts:[[2,2],[3,3],[3,1]]},{type:"square",color:TAN_COLORS.yellow,pts:[[1,3],[2,4],[3,3],[2,2]]},{type:"para",color:TAN_COLORS.teal,pts:[[3,3],[4,2],[4,0],[3,1]]}],SYMMETRY={large:360,medium:360,small:360,square:90,para:180},LEVEL_ROTATIONS=[0,90,180,270],PIVOT={x:2,y:2},FIT_STEPS=[0,45,90,135,180,225,270,315];export const rotatePt=(t,e,r,o,n)=>{const a=r*Math.PI/180,y=Math.cos(a),l=Math.sin(a),s=t-o,p=e-n;return{x:o+s*y-p*l,y:n+s*l+p*y}};const centroidOf=t=>{let e=0,r=0;for(const o of t)e+=o.x,r+=o.y;return{x:e/t.length,y:r/t.length}},mulberry32=t=>{let e=t>>>0;return()=>{e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}},polysMatch=(t,e,r)=>{if(t.length!==e.length)return!1;const o=new Array(e.length).fill(!1);for(const n of t){let t=!1;for(let a=0;a<e.length;a++)if(!o[a]&&Math.hypot(n.x-e[a].x,n.y-e[a].y)<=r){o[a]=!0,t=!0;break}if(!t)return!1}return!0},TRAY_TANS=[[[2,0],[0,2],[2,2]],[[2,0],[0,2],[0,0]],[[3,1],[2,0],[4,0]],[[4,0],[3,1],[4,1]],[[2,2],[3,2],[2,1]],[[3,1],[3,2],[4,2],[4,1]],[[2,0],[2,1],[3,2],[3,1]]],canonicalCache=new Map;export function canonicalShapes(t){const e=canonicalCache.get(t);if(e)return e;const r={};for(const e of BASE_TANS){if(r[e.type])continue;const o=e.pts.map(([e,r])=>{return{x:(o=e,t?4-o:o),y:r};var o}),n=centroidOf(o);r[e.type]=o.map(t=>({x:t.x-n.x,y:t.y-n.y}))}const o=r;return canonicalCache.set(t,o),o}export function generateLevel(t,e,r,o){const n=e,a=.1*n,y=mulberry32(2654435761*t+40503),l=LEVEL_ROTATIONS[Math.floor(y()*LEVEL_ROTATIONS.length)],s=y()<.5,p=BASE_TANS.map(t=>t.pts.map(([t,e])=>{const r=rotatePt((o=t,s?4-o:o),e,l,PIVOT.x,PIVOT.y);var o;return{x:r.x*n,y:r.y*n}}));let x=1/0,i=1/0,h=-1/0,T=-1/0;for(const t of p)for(const e of t)e.x<x&&(x=e.x),e.y<i&&(i=e.y),e.x>h&&(h=e.x),e.y>T&&(T=e.y);const u=(r-(h-x))/2-x,m=a-i,S=canonicalShapes(s),f=Object.fromEntries(Object.entries(S).map(([t,e])=>[t,e.map(t=>({x:t.x*n,y:t.y*n}))])),A=(t,e)=>{const r=f[t],o=.08*n;for(const t of FIT_STEPS)if(polysMatch(r.map(e=>rotatePt(e.x,e.y,t,0,0)),e,o))return t;return l},O=2*Math.SQRT2*n,R=Math.SQRT2*n,M=1.1,g=TRAY_TANS.flatMap(t=>{const e=t.reduce((t,[e])=>t+e,0)/t.length,r=t.reduce((t,[,e])=>t+e,0)/t.length;return t.map(([t,o])=>({x:((e-2)*M+t-e)*Math.SQRT2*n*.4,y:((r-1)*M+o-r)*Math.SQRT2*n*.4}))}),_=Math.min(...g.map(t=>t.y)),C=Math.max(...g.map(t=>t.y)),E=(Math.min(...g.map(t=>t.x))+Math.max(...g.map(t=>t.x)))/2,N=a+(T-i)+Math.max(12,.12*n)-_,L=(o-(a-.024*n)-(N+C+.4*n*.024))/2;return{pieces:BASE_TANS.map((t,e)=>{const o=centroidOf(p[e]),a=p[e].map(t=>({x:t.x-o.x,y:t.y-o.y})),y=A(t.type,a),l=SYMMETRY[t.type],x=TRAY_TANS[e].map(([t,e])=>({x:(s?4-t:t)*Math.SQRT2*n,y:e*Math.SQRT2*n})),i=centroidOf(x),h=A(t.type,x.map(t=>({x:t.x-i.x,y:t.y-i.y}))),T={x:r/2+.4*(i.x-O)*M-(s?-E:E),y:N+.4*(i.y-R)*M+L};return{id:e,type:t.type,color:t.color,localPoints:f[t.type],targetCx:o.x+u,targetCy:o.y+m+L,targetRot:y,symmetry:l,silPoints:p[e].map(t=>({x:t.x+u,y:t.y+m+L})),initialRot:h,scatterCx:T.x,scatterCy:T.y}}),mirror:s,silhouetteRect:{x:x+u,y:i+m+L,w:h-x,h:T-i}}}export const isRotationMatched=(t,e,r)=>{let o=((t-e)%r+r)%r;return o=Math.min(o,r-o),o<=30};export const snappedRotation=(t,e,r)=>e+Math.round((t-e)/r)*r;export function claimSlot(t,e,r,o,n,a,y){let l=-1,s=1/0,p=!1;if(t.pieces.forEach((t,x)=>{if(e[x]||t.type!==o)return;const i=Math.hypot(n-t.targetCx,a-t.targetCy);i>1.8*r||(isRotationMatched(y,t.targetRot,t.symmetry)?i<s&&(s=i,l=x):p=!0)}),l<0)return p?"nudge":null;e[l]=!0;const x=t.pieces[l];return{slot:l,cx:x.targetCx,cy:x.targetCy,rot:snappedRotation(y,x.targetRot,x.symmetry)}}export function insidePiece(t,e,r,o,n,a,y,l=0){const s=rotatePt(a-e,y-r,-o,0,0),p=s.x/n,x=s.y/n;let i=!1;for(let e=0,r=t.length-1;e<t.length;r=e++){const o=t[e],n=t[r];o.y>x!=n.y>x&&p<(n.x-o.x)*(x-o.y)/(n.y-o.y)+o.x&&(i=!i)}if(i||l<=0)return i;const h=l/n;for(let e=0,r=t.length-1;e<t.length;r=e++){const o=t[e],n=t[r],a=n.x-o.x,y=n.y-o.y,l=Math.max(0,Math.min(1,((p-o.x)*a+(x-o.y)*y)/(a*a+y*y||1)));if(Math.hypot(p-(o.x+a*l),x-(o.y+y*l))<=h)return!0}return!1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,Path,quat,tube}from"@nayan-ui/engine";import{darken}from"../../services/GamesConstants.js";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x2d9942}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{COLORS,PIECE_DEPTH,RIM_RADIUS,toWorld}from"./TangramConstants.js";import{canonicalShapes}from"./TangramRules.js";const meshes=new Map,cached=(o,t)=>{let e=meshes.get(o);return!e&&(e=cacheGameAsset("tangram/TangramScene:"+o,t),meshes.set(o,e)),e},BACKDROP_DEPTH=30,SLOT_Z=.3,polygon=o=>(new Path).addPolygon(o.map(o=>[o.x,o.y])),loop=(o,t)=>[...o,o[0]].map(o=>[o.x,-o.y,t]),slabMesh=(o,t)=>cached("tg-slab:"+o+":"+t,()=>_0x2d9942(extrude(polygon(canonicalShapes(t)[o]),{depth:PIECE_DEPTH}),{center:!1,shine:.45})),rimMesh=(o,t)=>cached("tg-rim:"+o+":"+t,()=>_0x2d9942(tube(loop(canonicalShapes(t)[o],0),{radius:RIM_RADIUS,sides:8,smoothness:1,caps:!1}),{center:!1,shine:.3})),slotMesh=(o,t)=>cached("tg-slot:"+o+":"+t,()=>_0x2d9942(extrude(polygon(canonicalShapes(t)[o]),{depth:0}),{center:!1}));export const turn=o=>quat.z(-o*Math.PI/180);const slotFill=o=>toColor("classic"===o.mode?COLORS.CLASSIC_SLOT:o.BOARD.CELL_EMPTY),slotEdge=o=>toColor("classic"===o.mode?COLORS.CLASSIC_SLOT_EDGE:o.BOARD.BORDER),rootPosition=(o,t)=>{const[e,n]=toWorld(o,t.x,t.y);return[e,n,.3+t.lift*o.unit]};function spawnSlots(o,t,e,n){const s=[];for(const a of e.pieces){const[r,i]=toWorld(t,a.targetCx,a.targetCy),l=turn(a.targetRot);s.push(o.spawn({mesh:slotMesh(a.type,e.mirror),position:[r,i,.3],rotation:l,scale:t.unit,color:slotFill(n),pickable:!1})),s.push(o.spawn({mesh:rimMesh(a.type,e.mirror),position:[r,i,.3],rotation:l,scale:[t.unit,t.unit,.2*t.unit],color:slotEdge(n),pickable:!1}))}return s}export function buildScene(o,t,e,n,s){const a=spawnBackdrop(o,t.width,t.height,-30,e);placeTiltedBackdrop(o,a,t,30);const r={backdrop:a,slots:spawnSlots(o,t,n,e),tans:[]};return n.pieces.forEach((e,a)=>{const i=s[a],l=o.spawn({mesh:"none",position:rootPosition(t,i),rotation:turn(i.rot),scale:t.unit*i.scale,pickable:!1}),p=o.spawn({mesh:slabMesh(e.type,n.mirror),parent:l,position:[0,0,PIECE_DEPTH/2],color:toColor(e.color),pickable:!1}),u=o.spawn({mesh:rimMesh(e.type,n.mirror),parent:l,position:[0,0,PIECE_DEPTH],color:toColor(darken(e.color,.28)),pickable:!1});r.tans.push({root:l,slab:p,rim:u})}),r}export function removeScene(o,t){for(const e of[t.backdrop,...t.slots,...t.tans.map(o=>o.root)])o.despawn(e)}export function setSceneTheme(o,t,e){setBackdropTheme(o,t.backdrop,e),t.slots.forEach((t,n)=>o.set(t,{color:n%2?slotEdge(e):slotFill(e)}))}export function setPose(o,t,e,n,s){const a=e.tans[n];a&&(o.stopAnimation(a.root),o.set(a.root,{position:rootPosition(t,s),rotation:turn(s.rot),scale:t.unit*s.scale}))}export function moveTo(o,t,e,n,s,a,r="easeOut"){const i=e.tans[n];i&&o.animate(i.root,{position:rootPosition(t,s),rotation:turn(s.rot),scale:t.unit*s.scale},{duration:a,easing:r})}export function enter(o,t,e,n,s){n.forEach((n,a)=>{const r=e.tans[a];r&&(o.stopAnimation(r.root),o.set(r.root,{position:rootPosition(t,n),rotation:turn(n.rot),scale:t.unit*n.scale*.4}),o.animate(r.root,{scale:t.unit*n.scale},{duration:.26,delay:a*s,easing:"back"}))})}export function pop(o,t,e,n,s){const a=e.tans[n];a&&o.animate(a.root,[{scale:1.08*t.unit,at:.3},{scale:t.unit}],{duration:.29,delay:s,easing:"easeOut"})}export function wiggle(o,t,e,n){const s=t.tans[e];s&&o.animate(s.root,[{rotation:turn(n+7)},{rotation:turn(n-7)},{rotation:turn(n+4)},{rotation:turn(n)}],{duration:.26})}export function celebrate(o,t,e,n,s,a){e.tans.forEach((e,n)=>{o.animate(e.root,[{scale:1.1*t.unit,at:.5},{scale:t.unit}],{duration:.27,delay:s+n*a,easing:"easeInOut"})});const r=n.silhouetteRect,[i,l]=toWorld(t,r.x+r.w/2,r.y+r.h/2);effects.confetti(o,{position:[i,l,t.unit],count:60,size:.1*t.unit,speed:1.4*r.w,lifetime:1.3,gravity:2.4*-r.w,colors:n.pieces.slice(0,4).map(o=>toColor(o.color))})}export function dim(o,t,e,n){for(const s of e){const e=t.tans[s];if(!e)continue;const a=toColor(n[s]);o.animate(e.slab,{color:[.45*a[0],.45*a[1],.5*a[2],1]},{duration:.4})}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x42855a=_0x9e28;!function(){const e=_0x9e28,t=_0x473c();for(;;)try{if(582240==parseInt(e(255,"4tMQ"))/1+parseInt(e(222,"s)$I"))/2*(-parseInt(e(332,"2fAy"))/3)+parseInt(e(275,"4&KT"))/4+parseInt(e(327,"ULS)"))/5+-parseInt(e(305,"s)$I"))/6*(-parseInt(e(251,"sKt("))/7)+-parseInt(e(309,"3%Eb"))/8+parseInt(e(244,"RW%W"))/9*(-parseInt(e(291,"Mpl8"))/10))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x30455a,{useEffect,useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView,Gesture,GestureDetector}from"react-native-gesture-handler";import{runOnJS}from"react-native-reanimated";import{useTank1990Store,useIsPlaying,useIsGameOver,useIsWin}from"./Tank1990Store.js";function _0x9e28(e,t){e-=213;const o=_0x473c();let n=o[e];if(void 0===_0x9e28.cqrIym){const e=function(e,t){let o,n,r=[],a=0,s="";for(e=function(e){let t="",o="";for(let o,n,r=0,a=0;n=e.charAt(a++);~n&&(o=r%4?64*o+n:n,r++%4)?t+=String.fromCharCode(255&o>>(-2*r&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(let e=0,n=t.length;e<n;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),n=0;n<256;n++)r[n]=n;for(n=0;n<256;n++)a=(a+r[n]+t.charCodeAt(n%t.length))%256,o=r[n],r[n]=r[a],r[a]=o;n=0,a=0;for(let t=0;t<e.length;t++)n=(n+1)%256,a=(a+r[n])%256,o=r[n],r[n]=r[a],r[a]=o,s+=String.fromCharCode(e.charCodeAt(t)^r[(r[n]+r[a])%256]);return s};_0x9e28.DCZDIy=e,_0x9e28.MmgRYd={},_0x9e28.cqrIym=!0}const r=o[0];_0x9e28.RIEATl!==r&&(_0x9e28.MmgRYd={},_0x9e28.RIEATl=r);const a=_0x9e28.MmgRYd[e];return void 0===a?(void 0===_0x9e28.ZdwoGB&&(_0x9e28.ZdwoGB=!0),n=_0x9e28.DCZDIy(n,t),_0x9e28.MmgRYd[e]=n):n=a,n}import{getGameConfig}from"./Tank1990Constants.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameBoard}from"./components/GameBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x368401,jsxs as _0x54c116}from"react/jsx-runtime";const scoreFormatter=e=>""+e[_0x42855a(300,"od]y")]();export const Tank1990=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:n,onShare:r,onShareScreenshot:a,onShowLeaderboard:s,bannerAd:W})=>{const d="[1@w",u="7V@p",m="Lr7j",i=_0x42855a,k={sikgg:i(263,"&hMe"),lLcCO:i(219,"2gO("),cOzdu:function(e,t){return e>t},KXtWj:i(299,"4tMQ"),sfIEJ:function(e,t){return e(t)},mVokl:function(e,t){return e===t},urJuk:"LPODF",mitGh:function(e,t){return e-t},PmvPg:i(248,"2gO("),rZlqh:function(e,t,o){return e(t,o)},LJSjp:"cancel",WAvUk:function(e){return e()},uNhpT:function(e,t,o){return e(t,o)},RuQHV:function(e,t,o){return e(t,o)},Kulue:function(e,t,o){return e(t,o)},pysgl:function(e,t,o){return e(t,o)},DsIrl:function(e,t,o){return e(t,o)},IMYnx:function(e,t){return e&&t}},{width:S}=k.WAvUk(getGameDimensions),l=useIsPlaying(),x=useIsGameOver(),f=k[i(268,"od]y")](useIsWin),_=useRef(!1),C=useRef(null),R=useRef(e);R.current=e;const G=useRef(o);G[i(216,"favm")]=o;const p=useRef(l);p.current=l;const h=useRef(x);h[i(243,"Lr7j")]=x;const g=useCallback(e=>{const t=i,o={IABvS:function(e,t){return e>=t},tuvSq:function(e,t){return e/t},xndFd:function(e,t,o){return e(t,o)}};if(k.sikgg===t(306,"RW%W")){const e={_0x50b9a2:347,_0x553e39:"U@(M",_0x2a382:"2gO("};let n=0;const r=o[t(238,"G(kK")](1e3,60),a=s=>{const W=t;o[W(e._0x50b9a2,e._0x553e39)](s-n,r)&&(n=s,_0x530b8b[W(276,e._0x2a382)]()[W(310,"^Nn$")](_0x1d36ac.current)),_0x13a5bc[W(339,"UZB)")]=_0x35c255(a)};_0x4479d0[t(331,"Ad]4")]=_0x484453(a);const s=_0x1b306a();_0x3229cb[t(324,u)]=o[t(290,m)](_0x33ce9d,()=>{const e=t;_0x15fa6a[e(246,"yqP&")]()[e(262,"od]y")](_0x5a185c[e(338,"yqP&")])},s[t(346,"(giA")]),_0x458160(()=>_0x51e522[t(273,"&hMe")]().spawnEnemy(_0xb4296d[t(216,"favm")]),1e3)}else if(G[t(324,u)]&&!_[t(338,"yqP&")]){const o=useTank1990Store[t(220,"2fAy")]()[t(326,"V5YO")];G[t(243,m)]({status:e,score:o.toString()}),_[t(250,"od]y")]=!0}},[]),b=useCallback((e,t)=>{const o=i;if(!p.current||h[o(216,"favm")])return;const n=Math[o(340,"&hMe")](e),r=Math[o(345,"Qaot")](t);if(n<5&&r<5)return;let a;a=n>r?e>0?k[o(282,"erK9")]:"left":k.cOzdu(t,0)?k[o(281,"k6Em")]:"up",useTank1990Store.getState()[o(225,"HUHC")](a)},[]),I=k[i(284,"[nNd")](useCallback,()=>{useTank1990Store.getState().setDirection(null)},[]),y=k.RuQHV(useMemo,()=>Gesture.Pan().onUpdate(e=>{const t=i;runOnJS(b)(e.translationX,e[t(278,"(giA")])})[i(258,"vQ[V")](()=>{const e=i;k.mVokl(k.urJuk,e(334,"&bAn"))?runOnJS(I)():k[e(317,"BY4d")](_0x345cfc,_0x1fd124?e(253,"9Z5f"):"lose")}),[b,I]);k[i(254,"X@$2")](useEffect,()=>{const e=i;return useTank1990Store[e(276,"2gO(")]().initializeGame(S),()=>{const t=e;useTank1990Store.getState()[t(288,"4&KT")]&&!_[t(242,"3%Eb")]&&g(t(221,"4tMQ")),C.current&&(clearGameInterval(C.current),C[t(250,"od]y")]=null),useTank1990Store[t(265,"RW%W")]()[t(344,"]R(%")]()}},[S,g]);const P=useRef(!1);useEffect(()=>{const e=i;x&&!P.current&&g(f?e(264,"&bAn"):e(227,"sKt(")),P.current=x,!x&&(_[e(333,"4tMQ")]=!1)},[x,f,g]);const M=k[i(325,"OKh6")](useRef,null);useEffect(()=>{const e=i,t={};t[e(266,"HUHC")]=function(e,t){return e<t},t[e(322,"s)$I")]=function(e,t){return e!==t},t[e(330,"yqP&")]=e(314,"HUHC"),t[e(329,"ENdT")]=k.PmvPg;const o=t;if(l&&!x){let t=0;const o=1e3/60,n=r=>{const a=e;k[a(230,"CTdt")](r,t)>=o&&(t=r,useTank1990Store[a(229,"vQ[V")]()[a(343,"7V@p")](R.current)),M.current=k.sfIEJ(requestAnimationFrame,n)};M[e(256,"t6iI")]=requestAnimationFrame(n);const r=getGameConfig();C.current=setGameInterval(()=>{const t=e;useTank1990Store[t(224,"HUHC")]()[t(289,"erK9")](R[t(279,"W!9o")])},r[e(233,"&hMe")]),k[e(252,"od]y")](setTimeout,()=>useTank1990Store[e(292,"od]y")]()[e(231,"X@$2")](R.current),1e3)}return()=>{const t=e;if(M[t(319,"9Z5f")]&&(cancelAnimationFrame(M[t(331,"Ad]4")]),M[t(214,"!q1q")]=null),C[t(285,"RW%W")])if(o[t(218,"F*3b")](o.TShsu,o[t(223,"4&KT")]))clearGameInterval(C[t(295,"]14%")]),C.current=null;else{if(!_0x5784a4[t(339,"UZB)")]||_0x3dd57d[t(311,"vQ[V")])return;const e=5,o=_0x58d1ae[t(241,"!]V3")](_0x1fda7a),n=_0x32b019[t(267,"s)$I")](_0x4de00c);if(o<e&&PSMTAh[t(235,"sTP5")](n,e))return;let r;r=o>n?_0x259c08>0?"right":t(303,"CTdt"):_0x190c8d>0?t(302,"]14%"):"up",_0x237f0f.getState()[t(335,"U@(M")](r)}}},[l,x]);const O=useCallback(()=>{const e=i;_[e(249,"[nNd")]=!1,useTank1990Store[e(224,"HUHC")]().startGame(),playSound(GAME_SOUNDS[e(237,"&hMe")].START,R[e(321,"2@Vd")][e(297,"yqP&")]),playHaptic(HapticType[e(234,"HUHC")],R[e(242,"3%Eb")][e(307,"2fAy")])},[]),T=useCallback(()=>{const e=i;g(k[e(298,d)]),useTank1990Store[e(292,"od]y")]()[e(337,d)](),useTank1990Store.getState().initializeGame(S)},[g,S]),v=useCallback(()=>{const e=i;_.current=!1,n?.(),useTank1990Store.getState().resetGame(),useTank1990Store[e(257,"]Ah*")]().initializeGame(S)},[S,n]),A=e?.[i(215,"k6Em")]??0,H=k.pysgl(useMemo,()=>({isVisible:x,score:useTank1990Store[i(245,"sKt(")]()[i(260,"W!9o")],onPlayAgain:v,buttonText:f?"Next Level!":i(313,"k6Em"),scoreLabel:f?"Level Complete!":i(287,"W!9o"),scoreFormatter:scoreFormatter,title:f?i(328,"Qaot"):i(342,"Mpl8"),message:f?i(294,"[1@w"):i(304,"sKt(")}),[x,v,f]),q=useMemo(()=>({gameId:GAME_IDS[i(269,"7V@p")],settings:e,onSettingsChange:t}),[e,t]),N={};N[i(247,"3%Eb")]=A||0;const V=useMemo(()=>[styles[i(318,"t6iI")],N],[A]),Q=useMemo(()=>({isPlaying:l,gameOver:x,onStartGame:O,onStopGame:T,onShare:r,onShowLeaderboard:s,startButtonSubtext:i(236,"3%Eb")}),[l,x,O,T,r,s]),E={};E[i(320,"yhye")]=A;const U={...Q},K={...H};K[i(217,"]R(%")]=a,K[i(274,"U@(M")]=W;const j={...q};return k[i(271,"]14%")](_0x368401,GestureHandlerRootView,{style:styles.root,children:_0x54c116(GameBackgroundPattern,{children:[k[i(341,"(giA")](_0x368401,ScoreBoard,E),k.DsIrl(_0x368401,GestureDetector,{gesture:y,children:_0x54c116(View,{style:V,children:[_0x368401(View,{style:styles[i(312,"9Z5f")],children:_0x368401(GameBoard,{})}),k[i(301,"erK9")](l,!x)&&_0x368401(View,{style:styles.gestureHint})]})}),_0x368401(GameControlButton,U),_0x368401(GameOverModal,K),_0x368401(GameSettingsModal,j)]})})};const _0x275278={};_0x275278[_0x42855a(226,"4&KT")]=1,_0x275278.backgroundColor=BACKGROUND_COLOR;const _0x4e46f8={};_0x4e46f8[_0x42855a(296,"Mpl8")]=1,_0x4e46f8[_0x42855a(259,"^Nn$")]="center",_0x4e46f8[_0x42855a(239,"od]y")]=_0x42855a(323,"9Z5f"),_0x4e46f8[_0x42855a(272,"vQ[V")]=15;const _0x1a2271={};function _0x473c(){const e=["z8khW6qnWPe","gCkCFCktqSoJjNJdUuhcNeK","jCopDJHidSoHW61gW40AtG","W7ldJSkPkMlcImkbiCk2","aCoYzSk0gSouWQm","W7evWRCDESk0WRi","xNfR","E8osW7VcSCk4","WPOXWRbcqrFcShnB","jH3dUCkbWQJdHwai","fSk2oZlcQCkdfMVcOa","v8kHtq","BSofW63cU8kTWPtcIsrbtq/cQCkTW5ddVmoSqr8","i8k4s8kHEa","mSkAWR3dPSoGW7xcVtbmAs7cLG","W59MjmoRFCkpjG","W4aeW61UWR3cUG","W611W4JcMKhcI8ky","c8k9gZ/cVmk2eG","W6bojgjf","W7nkW4TBhG","wK4FW5/cQgNcHCoQ","yZrPWOiUW4y","W4JcKZ/cIrj/bqbFW55T","pbJdOK4+","ESkBnv8pw8oZW5e","BSkBnuGssmoIW5DCW4eHrW","cdddTNe","sCo/Bmkp","bmosW7yWrCk9WPFdR1q","WOD1W4VdQYaTm14","WR7dT8oiW4Ck","bmkVWRddNvucaavSFq","WPabW67dStP4WQBdQfxcHWxcNwu","wN19omkAdmkBfSo3qKJcImkhW4dcG13dKKe","umk7buuUDW","jmoVWP50la","WR1zWRrHxIimW5hcRmozW7ZcNHJdP8o8W4NcSa","A1jwhSk8BSostSkW","qCktWRebvG","W4bFWRlcPgmiW6ldIhlcPW","dXnFWRJdQdNcLSoQimozW4NdIq","sSkvWQa","WPPjWQb2vsHy","umoMkSkqjmkGW7u","ebCHWQtcMtBdRmkeBM/cMWa","qSo1A8k5WQxdTuPr","bCoIymkvc8oBWQnK","WOLDWRzGwsHlW7ZcRmoC","W5zXW5Pkha","W6ldNLldISoEWPK+","W4jgWQNcSwGVW6i","eSo4sCkeWR3dVMC","W5nPWRFcSMu","nwm6","pmkQWR3dN14","mM0ZW5v/WPSjW5RcV8k0k04","WQhdRColWOfpumk2","lW/cRSknWObIdSo9","WO9+W7RdLJa","W7FdRmkPW4BdTSozWQPoBmoAWQZdNtFdOq","ACovuCoZdG","W7ldHmk1oW","W5jdWRRcTgmeW7JdIhlcRq","DNfCnSkw","xmk+W4u","t0nIW4pdNMpdVSk4","DmkSk1qW","WPJdH3S","W7zYWQ3cLMy","ft3dMSkVWRVcMZzbWRu","WRpcM1ddQCo0WOqSyG","D8oJvCkibG","WPbXW5VdNd0IihpcO1pdTCoIcuDSaSkb","whzSbSkxpSkFeG","cmkyz8k5tSoJaN8","wM3cOJHsW40swHhcHKlcOCoj","W6zgW5HGhSkCW7nB","rSk2W5KUWR5nyKro","F8ozW6NcUmkNWQVcMdfFtcJcNG","ECodtmoZdSkhWRe","B8oKxJi2WP4","W6q6W79kWRi","WPddMmoCnYW","WO7dM8kPW61pEW","W7tdPuJdImoV","s1nKW6ldJ2ZdVG","WRzlW7PDbSkxW54","xmoFumoGb8ojWPBdSSoDlmko","bY/dG2ufWOrdtre","WO/dPmoEaW1EWPydjSk+","s8o9pmkKjq","W69aWO1wlIVcGhS","W4zwWQ/cKhKGW6ldIa","WRNcUmoNpLRcPfnVW4hdHSkJ","W4hdH8k2B3pcOCkfiCk6oCoFWPyqFZtdQ8oFWRhdQdODW60","zSoms8klc27cIG","WRSCWPH/","b8oPDCkKe8oFWOrUotvPyq","W4ZdOCkjjwy","zdPWWO8","W5vCWPFcRg4GW7RdIeZcObZcKeGW","WRxdMCoMgHS","yCowtSkx","WR/dU8oAW7q","Fmo/ASkyW7hdTL9hW5XJDmowW6iskdP/A1S+W5NcUXO4","W4dcLd3cJbaujYnTW7ntW7q","Cg14W5RdOq","weukW67cSg3cUCoUh8oRW7RdQv8","W61LW5tcNehcL8k7x8kkrWNcLCor","W40iW6q2ahyCW6xcM8olW4NdTJm","W7RdUmk3W5FdK8oqWRX9","WOnLW43dIJeImW","jwS5a8kRmmkuWOC","W7SqW7i9WPNcQCoquJddMa","ESkwofq0","W4GkW6uXbH9kW77cI8olW5G","zmovumkEaeNcISkAvq0","AmkWWPFdV8og","WQhdVCoxWODptmkvWPLqrLipW74","ix8Mfmkplmkf","W5ldRgayW5pcOG","WR3cQmoMoeRcUei","WRtdKxhdLey","iw86eSkpma","iGNdPSkwWOhdHhS","ExBcUSo5WOe","F8oIxZq2","WQSWWRusWR8GWOhdSKGQWORcP0i","ESkgAdFcHSkzWOJdJ8ozaZGGW5a+WOq","WR/dRCk9W4TH","nSouFmk1cG","WOnVgSkIvSocWPy","db9AW67cVK/cNCoCoq","yYb1WPmUW4qA"];return(_0x473c=function(){return e})()}_0x1a2271.width="100%",_0x1a2271[_0x42855a(316,"]14%")]=_0x42855a(280,"V5YO");const _0x552854={};_0x552854[_0x42855a(277,"&bAn")]=10;const _0x4979ba={};_0x4979ba[_0x42855a(261,"[1@w")]=_0x275278,_0x4979ba[_0x42855a(308,"favm")]=_0x4e46f8,_0x4979ba[_0x42855a(312,"9Z5f")]=_0x1a2271,_0x4979ba[_0x42855a(293,"2@Vd")]=_0x552854;const styles=StyleSheet[_0x42855a(283,"ENdT")](_0x4979ba);Tank1990.displayName="Tank1990";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{ENEMIES_PER_LEVEL,FRAME,getLayout,LIGHT,LIVES}from"./Tank1990Constants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./Tank1990Game.js";import{jsx as _0x301d88}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.TANK_1990,ENEMIES_CLASSIC_COLOR="#FFFFFF",scoreFormatter=e=>e.toLocaleString();export const Tank1990=engineGame(GAME_IDS.TANK_1990,e=>{const[t,s]=useLiveState(0),[r,i]=useLiveState(LIVES),[o,a]=useLiveState(ENEMIES_PER_LEVEL),{theme:n,status:S,screen:m,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.TANK_1990,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,r)=>{const i=getLayout(t,s,r);return setLayout(e,i),i.boardWidth+2*Math.min(FRAME,.5*i.cell)},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>e("win"===t?SOUNDS.WIN:SOUNDS.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.HEAVY),wire:(e,t)=>{e.onScore=s,e.onLives=i,e.onEnemies=a,e.onEvent=e=>{"fire"===e?t(SOUNDS.FIRE):"kill"===e?t(SOUNDS.DESTROY,HapticType.SUCCESS):t(SOUNDS.DAMAGE,HapticType.ERROR)}}});return _0x301d88(EngineGameScreen,{...m,light:LIGHT,columns:[scoreColumn(t,"SCORE"),livesColumn(r,LIVES),textColumn("ENEMIES",o,"classic"===n.mode?"#FFFFFF":void 0)],subtext:"Defend your base!",gameOver:E({title:"win"===S?"LEVEL COMPLETE!":"GAME OVER",message:"win"===S?"All enemies destroyed!":"Your base was destroyed!",scoreLabel:"win"===S?"Level Complete!":"Final Score",score:t,formatter:scoreFormatter,buttonText:"win"===S?"Next Level!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x5995cd=_0xa61c;!function(){const W=_0xa61c,d=_0x4339();for(;;)try{if(505108==parseInt(W(371,"!a!A"))/1*(-parseInt(W(322,"v]C8"))/2)+parseInt(W(375,"S&b["))/3*(-parseInt(W(393,"%t0k"))/4)+-parseInt(W(370,"4VU6"))/5*(parseInt(W(261,"v3jy"))/6)+parseInt(W(294,"a6ea"))/7*(-parseInt(W(311,")0Gm"))/8)+parseInt(W(345,"80zx"))/9+parseInt(W(315,"MxTv"))/10*(parseInt(W(277,"tqE*"))/11)+parseInt(W(389,"GjTX"))/12)break;d.push(d.shift())}catch(W){d.push(d.shift())}}();const _0x1eb4b3={};_0x1eb4b3[_0x5995cd(350,"S&b[")]=_0x5995cd(253,"e79p"),_0x1eb4b3[_0x5995cd(314,"#M0!")]="rgba(0, 0, 0, 0.10)",_0x1eb4b3[_0x5995cd(374,"JtRK")]=_0x5995cd(299,"ejek"),_0x1eb4b3[_0x5995cd(300,"esb9")]=_0x5995cd(296,"p%s#"),_0x1eb4b3[_0x5995cd(284,"z%AE")]=_0x5995cd(252,"a6ea"),_0x1eb4b3.PLAYER_BODY_SHADOW=_0x5995cd(256,"K(X%"),_0x1eb4b3[_0x5995cd(352,"esb9")]=_0x5995cd(346,"v3jy"),_0x1eb4b3[_0x5995cd(365,"Nj3R")]=_0x5995cd(270,"@nAm"),_0x1eb4b3[_0x5995cd(385,"T9Fx")]="#FFF176",_0x1eb4b3[_0x5995cd(292,"z%AE")]=_0x5995cd(358,"JtRK"),_0x1eb4b3.PLAYER_BARREL="#B8860B",_0x1eb4b3[_0x5995cd(249,"JAj0")]=_0x5995cd(373,"MxTv"),_0x1eb4b3[_0x5995cd(282,"n1F^")]=_0x5995cd(332,"egjs"),_0x1eb4b3[_0x5995cd(268,"tIG9")]=_0x5995cd(308,"ejek"),_0x1eb4b3[_0x5995cd(383,"90!f")]="#4A5C72",_0x1eb4b3.ENEMY_BODY_SHADOW="#354558",_0x1eb4b3[_0x5995cd(325,"JAj0")]=_0x5995cd(390,"R@JM"),_0x1eb4b3[_0x5995cd(255,"7h[^")]="#5A7090",_0x1eb4b3[_0x5995cd(354,"tqE*")]=_0x5995cd(291,"sW#2"),_0x1eb4b3[_0x5995cd(338,"qhpG")]="#506478",_0x1eb4b3.ENEMY_BARREL=_0x5995cd(269,"4VU6"),_0x1eb4b3.ENEMY_BARREL_HIGHLIGHT=_0x5995cd(313,"n1F^"),_0x1eb4b3[_0x5995cd(288,"ejek")]=_0x5995cd(287,"80zx"),_0x1eb4b3.BULLET_GLOW="rgba(255, 120, 0, 0.6)",_0x1eb4b3[_0x5995cd(306,"wJEx")]=_0x5995cd(309,"A*Iw"),_0x1eb4b3[_0x5995cd(276,"T9Fx")]=_0x5995cd(334,"BCO9"),_0x1eb4b3[_0x5995cd(295,"e79p")]="#945028",_0x1eb4b3[_0x5995cd(264,"p26d")]=_0x5995cd(372,"K(X%"),_0x1eb4b3[_0x5995cd(330,"iYzY")]=_0x5995cd(339,"Yrpt"),_0x1eb4b3[_0x5995cd(248,"e79p")]="#6B3410",_0x1eb4b3.BRICK_RIGHT_EDGE="#7A3B14",_0x1eb4b3[_0x5995cd(260,"*w^Q")]="#2E1A0C",_0x1eb4b3.BRICK_MORTAR_SHADOW="#1E1008",_0x1eb4b3[_0x5995cd(394,"HV4H")]=_0x5995cd(369,"ejek"),_0x1eb4b3[_0x5995cd(363,"*w^Q")]="rgba(60, 30, 10, 0.2)",_0x1eb4b3.BRICK_DAMAGED_FACE=_0x5995cd(278,"v]C8"),_0x1eb4b3.BRICK_DAMAGED_FACE_ALT="#6E381A",_0x1eb4b3[_0x5995cd(283,"^vKf")]="#9A6040",_0x1eb4b3[_0x5995cd(312,"iYzY")]=_0x5995cd(356,"p%s#"),_0x1eb4b3.BRICK_DAMAGED_BOTTOM="#4A2508",_0x1eb4b3[_0x5995cd(281,"v3jy")]=_0x5995cd(387,"qhpG"),_0x1eb4b3[_0x5995cd(286,"HV4H")]=_0x5995cd(274,"BCO9"),_0x1eb4b3.STEEL_TOP=_0x5995cd(333,"aUF*"),_0x1eb4b3[_0x5995cd(297,"#SCh")]=_0x5995cd(329,"p%s#"),_0x1eb4b3[_0x5995cd(272,"JAj0")]=_0x5995cd(366,"K(X%"),_0x1eb4b3[_0x5995cd(267,"z%AE")]=_0x5995cd(328,"T9Fx"),_0x1eb4b3[_0x5995cd(320,"p%s#")]=_0x5995cd(364,"Lx13"),_0x1eb4b3[_0x5995cd(316,"A*Iw")]="#1E88E5",_0x1eb4b3[_0x5995cd(327,"wJEx")]=_0x5995cd(301,"PFXS"),_0x1eb4b3[_0x5995cd(359,"sW#2")]=_0x5995cd(377,"esb9"),_0x1eb4b3[_0x5995cd(293,"#SCh")]=_0x5995cd(379,"p26d"),_0x1eb4b3[_0x5995cd(280,"80zx")]=_0x5995cd(318,"Yrpt"),_0x1eb4b3[_0x5995cd(351,"T9Fx")]="#2E7D32",_0x1eb4b3.GRASS_TIP=_0x5995cd(344,"T9Fx"),_0x1eb4b3[_0x5995cd(391,"JtRK")]=_0x5995cd(326,"^vKf"),_0x1eb4b3[_0x5995cd(257,"S&b[")]="#FFD700",_0x1eb4b3[_0x5995cd(265,"n1F^")]="#FFC107",_0x1eb4b3[_0x5995cd(357,"v]C8")]=_0x5995cd(336,"Nj3R"),_0x1eb4b3.BASE_EMBLEM=_0x5995cd(266,"T9Fx"),_0x1eb4b3.BASE_SHADOW=_0x5995cd(381,"sW#2"),_0x1eb4b3.EXPLOSION_CORE=_0x5995cd(289,"v3jy"),_0x1eb4b3[_0x5995cd(395,"e79p")]=_0x5995cd(254,"Lx13"),_0x1eb4b3.EXPLOSION_MID="rgba(255, 120, 0, 0.7)",_0x1eb4b3[_0x5995cd(317,"sW#2")]=_0x5995cd(271,"Yrpt"),_0x1eb4b3[_0x5995cd(342,"p%s#")]=_0x5995cd(307,"8h]s"),_0x1eb4b3[_0x5995cd(321,"90!f")]=_0x5995cd(262,"JtRK"),_0x1eb4b3[_0x5995cd(310,"egjs")]="rgba(255, 255, 255, 1)",_0x1eb4b3[_0x5995cd(303,")0Gm")]=_0x5995cd(302,"PFXS"),_0x1eb4b3[_0x5995cd(361,"#SCh")]="rgba(255, 200, 50, 0.4)",_0x1eb4b3[_0x5995cd(382,"GjTX")]=_0x5995cd(331,"R@JM"),_0x1eb4b3.SPAWN_SHIELD_EDGE=_0x5995cd(279,"GjTX"),_0x1eb4b3[_0x5995cd(355,"R@JM")]=_0x5995cd(347,"Yrpt"),_0x1eb4b3[_0x5995cd(340,"*w^Q")]="rgba(0, 0, 0, 0.2)",_0x1eb4b3[_0x5995cd(273,"egjs")]=_0x5995cd(335,"MxTv"),_0x1eb4b3[_0x5995cd(250,"8h]s")]=_0x5995cd(360,"Yrpt");export const TANK_1990_COLORS=_0x1eb4b3;const _0x4b629e={};_0x4b629e[_0x5995cd(388,"i^ZF")]=13,_0x4b629e[_0x5995cd(368,")0Gm")]=17,_0x4b629e[_0x5995cd(343,"G79@")]=24,_0x4b629e.PLAYER_SPEED=2,_0x4b629e.ENEMY_SPEED=1,_0x4b629e[_0x5995cd(396,"Lx13")]=20,_0x4b629e[_0x5995cd(397,"90!f")]=6,_0x4b629e[_0x5995cd(348,"%t0k")]=4,_0x4b629e[_0x5995cd(341,"n1F^")]=300,_0x4b629e[_0x5995cd(323,"v]C8")]=1500,_0x4b629e.INITIAL_LIVES=3,_0x4b629e.ENEMY_SPAWN_INTERVAL=5e3,_0x4b629e[_0x5995cd(319,"i^ZF")]=4,_0x4b629e[_0x5995cd(362,"Nj3R")]=20,_0x4b629e[_0x5995cd(324,"G79@")]=500,_0x4b629e.POINTS_PER_LEVEL=2e3,_0x4b629e[_0x5995cd(337,"tIG9")]=500,_0x4b629e[_0x5995cd(305,"!a!A")]=2e3;export const TANK_1990_GAME_CONFIG=_0x4b629e;const _0x329b1f={enemySpeed:.6,enemyFireCooldown:2e3};_0x329b1f[_0x5995cd(384,")0Gm")]=3,_0x329b1f.enemiesPerLevel=10,_0x329b1f[_0x5995cd(380,"@nAm")]=6e3;const _0x4c142a={enemySpeed:1,enemyFireCooldown:1500,maxEnemies:4,enemiesPerLevel:15,enemySpawnInterval:5e3},_0x297ec6={};function _0x4339(){const W=["WRfeWRNdOSogxKm","jmkuFSkZmCkJemk4WPVdPCoTESkObvWNoCkx","DmkpWPddRxRcRmo5W7pdPZe2AmoIW5FdV8o+WOCpxW","WRGaj8oEj1JdIq","z0RcVCobWOddJ8oNW5GdWPq+W6ldMeK","jSoAf8khWRtcNYebWRtcJbdcRfZcICobwmoviCkQW6W","W7v1W5pdPCkjtw0AcSoGW6Lpdu3cKG","WORcIa5QW656W5elW40","rmkKW5GQWR1oWOy","W5bLFuyFE8oqa8o5bKJcIe8","W5tcVCk0W60lzGC","W6KJCCkgp17cPmoMaGCzWRm0WQXUnSkFWOnF","W7iiW79UWRTUWQ1Mp1Dx","wwdcRx8Ei8kT","W7xdIeDjfCoAW7hcPwFdMW","imocWQO4W54LW7ZdQSoU","pwJcV2qkmmkvbSoIWO7dQCkN","WQxcSaemWRf7rb40rwtcUW","WPhcPHhdKCkFW5KGWRKajSkIWPW","WRVdICkXqLtdJdOAW6K6","WPnVWRpcNSo+kXW","W6tcS8oKyeJcUXtdQCkFWPW","rf4jzmokWQFdOa","W4FdIg16W5msqteJzv/cUSoChCok","WRGcvCkHusJdJG","BCkpvSkEFt04vIBdUahcUW","W5DmWRRcL8ojkYa/W6yJEeVdKSk9xW0B","zLFcUSowWPNdN8o4W5ChWPqHW6FdI1pcMHWyWQa","W5jjWOj6WQ5HWRG","W4joWR7cG8ofpcW0W6qNAv/dGCkWqa8FcrvRq8oK","W5VdGmkrkmkUfCkW","W4BcVmoeW618BGq3W6JcGSoJbCkK","WRPRmKC9jmoZWPa6WODA","W6ZdO8kqW4JcQ8ozqcueW589W7JcUCouiSk8zZ/cL8k7WPpcNCoBfMm","i8knWRSpW6VcJSkmq8oTa8oe","WQzgiCkvyhJcUa","W5VdHCkuwCkVz8kW","dJ3dSSojBmoeWOS","n1z8Fmk3W4xcJ1aCW5uof8k9WQTB","WOBcSte1z8kWWOVcThpdUmknWOBdHG","W7tdOSksW4rvWPz6W6tcLZi/W4hdMsO","tH3dJN4ojmoZ","W4RdTmk8a8kCtmkdBSk8kauOW70","WPXFWRKkCmoqi8oDWOG7WPJdI8oiWR7cTZTkmqRcKmoOpsb8","W5tcUCorW6HXW57cKhddHeZcHWtdUmoWeeddHCoI","WRpdIWehWRD9sW","dmkBW69mv8ozW7n7v8oja8oL","W4JdRhGbACk9k8ouWR0Cg8kBFCoAmcJdTq","WPbya0ymcCoBWRayWRW","n8oCWQOYW4GOW67dT8o/tSo9zga","W7VdUrrOW6HgW4eB","eSo0W6pcKXpdGSkD","WRxcLSohDSo7kSo9z8kCfa","BSo9WPOOk8kYWPyhxmoEhCouWR/cPW","W5VcTCk6iZBcTu4","ieH8DSkHW4JcMfSuW5KBaCkUWQXF","dmkIWQKcWPhcJCktzhGbWQ9AW77dISoAWO/dVG","WOqzW6bGWQ97WPu","wLhcSCkWW6nYWPZdHMtcO0VdHMFdQCkpwmo+WONdHa","oIpcR3pdQCoFWPJdJJ8YW5VdGmo/ufS","WQu5W7KhW4rXW4fwoW","W4/dT3eaDCk2nSoiWQKaaCkD","psNcTNZdRCotWPpdJIu5W53dGW","WQhdSYq5WOtdJHNdLNvgWO/dGsxdKtZdGqm3W5NdUCojWRik","WQ5vW47dQYStbSo8WQBcSW","WPRcPCo8vG","xK7dQKlcR0ldNW","drZcNv7cJSk+W6tcTf1nWQdcU8keosKPWOC1tSknW7/cJmkxWR7dQW","WOmFW5uTWRmqWR05uKddJSoTiSkDW4DZfs/cUYXhfmoS","m8kSWQBcTCowyCoAlSoJbSotWOBdG8o1B8kOc8oDDCkQhq","W5VcVSoMwCkRy8oi","W7xdIfDhdCohW6VcPgZdJq","WPHxhM4Bp8ogWRWyWQS","WQm6ECozjYVcQuhdNCoeccy","zLFcUSowWPNdN8oMW4GqWOmRW7K","W4BcSCocW6WEgwq3W6hcPa","fx1FrmoAWQxdPsD/WRfMCmozW4GRWOhdI8k6WQldO8kbW7pcRW","W7VdQSkxW4tdQSkoaKvnWO1aWQVdV8kDBG","WQXQWPiOe8k9qSkNW7q","nmoxbCkBWQ7cIZ8eWRG","rmowWQ0UWR1cWOm","AmoBbhzQumocWPjzWP7dKSku","jmkcA8kYj8kVg8k4WPhdO8o2ACk7b00","mCkbW44pWPVdLmoG","WPlcLmkaW4q4WR7dKa","W6KJCCkgp1ZcVCoZhGSbWRm0WQXUnmkpWOTyW4NcGq","WQldQYaLWO3dGXtdNwjrWOK","zmkDs1tdQvOEWOpdNmovq8oSWRmG","jCo7W4VdUe3dK8oK","cmk0CZ/dLw95sW","jCocWQiOW4yLW7FdOSoPwq","W6ddNghcQSo3WRyCWR8ai8knWRW","WOxdHCo2fLhdGX8","lCkSW4X6mCk1WPaFpSk9E8krW7RdGruSwsxdGsLuEqfD","WQ8hdIr0fCkLd8oEnW","WRxdLSk4WPKccxuYW7/cPmoYgmkPW6S5rJBdK8o7W7tdP2HSW5W","m8oye8ktWQJcKJWiWRNcHWRcP1dcLG","nKlcLmkdpSovrCk1WQxcHCoBsCk8mmkVnrq","A8odagPJxCooWPHxWP7dHmkCW7W/WOldLY94","WQhcSq0kWRqGut0MFv8","s1FcVCk2W6rYWONdL2lcPq","W4StcufLESox","W5ZdKCk+W6xdHSk/lLzNWQ1j","WOxdO8ktWRTHzargWP7dHCkhAmoyWPHlpupcQ8kdWOVcKWu","WPxdO8oab8oSpG","WRpcVNGhW4qmpq","A8odagPJxCooWO5nWOJdJ8kgW6OVWOxdIYfXE8oe","D8kBwmkbyYCHvJldOq","tJ7dOu/cRHtdQIpcMc9u","psNcTNZdRCotWPFdGdiOW43dJ8o9qq","WPnRW4xdRCoXlHq","C8kosCkbFsCLvIFdUaVcPa","WRZdQLa2rSkbea","WR3dGSk0W6ZcT8oFnq","pwJcV2qkmmkvemo/WOVdS8kZWObhWQBcGa","pW7cMvH6WQrc","BL3dIxHNW5bcWQRdLCkaWOXEAZZcLsddPSkKehtdUsZcG0S","WRbSivKUkCoPWPaZWOflW7K","eH7cM1BdK8oH","W4rEdCk4wetcKuddGmohjXhdOspdImoQW6VcNhNdICkV","W4RcV8o7ySotFgBdOdNcSGddLa","WO9XW6pdMez0ySkvW57dKuldT8kOiLfxWRhdMI8IWO0","WR3cSSkWWP7dH8osrq","WRFcS8oeWPzpWPb5W6xdUubCWOtcGedcN2SlzCkqlmocWQ/dTa","ASkhx1RdT1anWP/dKCoiva","W48nlu07a8oVWPm","ECowBYRdHN1VuYLGW7TyW7ibWOXNiCoPydNcRvBdTW","vCkGzSoPW4NdTe4","q8klwaJdHvxcKw/dVG","hKNcK8oEdmk5W6Lq","WPlcLCoYWRi1W70bWPNcKq","W5xdKwLZW44EqdCQCLZcPSopemom","WRH1uCosuLZcUa","WR/cHCowBCoHm8oXBSkbgs8","W6DSW5FdRmkuqwaqaCoV","W4JdUM0aF8kXimouWRCAf8krymopncNdVCkh","WPpdI8kpfIFdHbFdGCkkWQyPW70","W6pcVmoYAe7cRrZdRSkiWOSbW7BcMt3dMty9rWy","WPNcGGTOW6v6W4CbW43dPCkFrSoRochcMW","WRtdSsaTWPJdGXldHNvxWPy","vYBdQ8kcn8k8qa","W5/cQ8oJA8oeD2RdOtNcTqJdMYa","rmkOW5nsWR87WOe","WPnSWRVdQ8o0xge","ECowBYRdHN1JwYnPW7buW7ewWPa","WORdOCkDDY7cSezPWOTmwrzLW4JdG8o0zfv5W6/cJtNdJCk4","bmoQrdNdULqx","WPKTWOhcK8kODCkn","jCo+W4pcItRcPmkw","xX7cPmoPFmoeWPCPwaijWP0rkxeEa8kBW68"];return(_0x4339=function(){return W})()}function _0xa61c(W,d){W-=248;const x=_0x4339();let _=x[W];if(void 0===_0xa61c.mEFlLj){const W=function(W,d){let x,_,e=[],b=0,o="";for(W=function(W){let d="",x="";for(let x,_,e=0,b=0;_=W.charAt(b++);~_&&(x=e%4?64*x+_:_,e++%4)?d+=String.fromCharCode(255&x>>(-2*e&6)):0)_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(_);for(let W=0,_=d.length;W<_;W++)x+="%"+("00"+d.charCodeAt(W).toString(16)).slice(-2);return decodeURIComponent(x)}(W),_=0;_<256;_++)e[_]=_;for(_=0;_<256;_++)b=(b+e[_]+d.charCodeAt(_%d.length))%256,x=e[_],e[_]=e[b],e[b]=x;_=0,b=0;for(let d=0;d<W.length;d++)_=(_+1)%256,b=(b+e[_])%256,x=e[_],e[_]=e[b],e[b]=x,o+=String.fromCharCode(W.charCodeAt(d)^e[(e[_]+e[b])%256]);return o};_0xa61c.uszauE=W,_0xa61c.TsXIhF={},_0xa61c.mEFlLj=!0}const e=x[0];_0xa61c.VnpEEb!==e&&(_0xa61c.TsXIhF={},_0xa61c.VnpEEb=e);const b=_0xa61c.TsXIhF[W];return void 0===b?(void 0===_0xa61c.DjFBqV&&(_0xa61c.DjFBqV=!0),_=_0xa61c.uszauE(_,d),_0xa61c.TsXIhF[W]=_):_=b,_}_0x297ec6[_0x5995cd(258,")0Gm")]=1.4,_0x297ec6[_0x5995cd(392,"T!2t")]=1e3,_0x297ec6.maxEnemies=5,_0x297ec6[_0x5995cd(263,"ejek")]=20,_0x297ec6.enemySpawnInterval=4e3;const _0x56c8b3={};_0x56c8b3.easy=_0x329b1f,_0x56c8b3[_0x5995cd(304,"e79p")]=_0x4c142a,_0x56c8b3[_0x5995cd(251,"i^ZF")]=_0x297ec6;export const TANK_1990_DIFFICULTY_CONFIG=_0x56c8b3;export const getGameConfig=()=>TANK_1990_DIFFICULTY_CONFIG[_0x5995cd(290,"K(X%")];
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID_WIDTH=13;export const GRID_HEIGHT=17;export const LIVES=3;export const POINTS_PER_ENEMY=1e3;export const POINTS_PER_LEVEL=2e3;export const ENEMIES_PER_LEVEL=15;export const MAX_ENEMIES=4;export const STEP_MS=1e3/60;export const STEP_TOLERANCE_MS=2;export const MAX_PENDING_MS=50;export const REFERENCE_CELL=24;export const PLAYER_SPEED=2;export const ENEMY_SPEED=1;export const TANK_RATIO=.8;export const HIT_TANK_SIZE=20;export const BULLET_SPEED=6;export const BULLET_SIZE=4;export const PLAYER_FIRE_COOLDOWN=300;export const ENEMY_FIRE_COOLDOWN=1500;export const SPAWN_PROTECTION=2e3;export const ENEMY_TURN_INTERVAL=800;export const ENEMY_AIM_TOLERANCE=72;export const FIRST_ENEMY=1e3;export const ENEMY_SPAWN_INTERVAL=5e3;export const SWIPE_THRESHOLD=5;export const TURN_TIME=.08;export const EXPLOSION_TIME=.5;export const TILT=.42;export const LIGHT=frontLight([-.45,.5,1],.45);export const CLASSIC_FIELD="rgba(255, 255, 255, 0.30)";export const GRID_LINE="rgba(0, 0, 0, 0.10)";const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110;export const FRAME=10;export function getLayout(t,o,E){const e=gameWidthFor(t),r=getScoreBoardTop(E)+82,n=Math.max(240,o-r-110),s=(n-20*Math.cos(.42))/(17*Math.cos(.42)+.8*Math.sin(.42)),_=Math.max(8,Math.floor(Math.min((e-20)/13,s)));return{width:t,height:o,tilt:.42,centerY:r+n/2,cell:_,boardWidth:13*_,boardHeight:17*_}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{ENEMIES_PER_LEVEL,ENEMY_SPAWN_INTERVAL,ENEMY_SPEED,FIRST_ENEMY,LIVES,MAX_ENEMIES,MAX_PENDING_MS,PLAYER_SPEED,POINTS_PER_ENEMY,POINTS_PER_LEVEL,STEP_MS,STEP_TOLERANCE_MS,SWIPE_THRESHOLD}from"./Tank1990Constants.js";import{bulletClashes,bulletHit,createEnemy,createMap,createPlayer,damageTile,enemyHeading,enemyWantsToFire,fire,moveBullet,moveTank}from"./Tank1990Rules.js";import{buildScene,explode,muzzleFlash,rebuildWalls,removeScene,setSceneTheme,syncUnits,updateWall}from"./Tank1990Scene.js";const WORLD_CAPACITY=1200;export function createGame(e){const n=new World(1200),l={world:n,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",tiles:createMap(),player:null,enemies:[],bullets:[],get lives(){return n.scoreboard.lives},get score(){return n.scoreboard.score},enemiesRemaining:ENEMIES_PER_LEVEL,won:!1,direction:null,now:0,pending:0,firstSpawn:null,nextSpawn:0,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onEnemies:e=>{},onEvent:e=>{}};return n.scoreboard.reset(LIVES),l}const board=e=>{const n=e.layout;return n?{tiles:e.tiles,cell:n.cell,width:n.boardWidth,height:n.boardHeight}:null};export function setLayout(e,n){const l=e.layout;if(e.scene&&removeScene(e.world,e.scene),e.layout=n,aimTilted(e.camera,n),l&&l.cell!==n.cell){const t=n.cell/l.cell;for(const n of[...e.player?[e.player]:[],...e.enemies])n.x*=t,n.y*=t;for(const n of e.bullets)n.x*=t,n.y*=t}e.player||(e.player=createPlayer(n.cell,e.now)),e.scene=buildScene(e.world,n,e.theme,e.tiles),sync(e)}export function setTheme(e,n){e.theme=n,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,n)}function sync(e){const{layout:n,scene:l}=e;n&&l&&syncUnits(e.world,n,l,[...e.player?[e.player]:[],...e.enemies],e.bullets,e.now)}export function start(e){"ready"===e.phase&&e.layout&&(e.phase="playing",e.pending=0,e.firstSpawn=e.now+FIRST_ENEMY,e.nextSpawn=e.now+ENEMY_SPAWN_INTERVAL,e.player=createPlayer(e.layout.cell,e.now),e.onPhase("playing"))}export function reset(e){e.tiles=createMap(),e.enemies=[],e.bullets=[],e.world.scoreboard.reset(LIVES),e.enemiesRemaining=ENEMIES_PER_LEVEL,e.won=!1,e.direction=null,e.firstSpawn=null,e.phase="ready",e.player=e.layout?createPlayer(e.layout.cell,e.now):null,e.layout&&e.scene&&rebuildWalls(e.world,e.layout,e.scene,e.tiles),sync(e),e.onScore(0),e.onLives(LIVES),e.onEnemies(ENEMIES_PER_LEVEL),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,n){if(!e.world.isDisposed){if("playing"===e.phase){let l=Math.min(e.pending+1e3*n,MAX_PENDING_MS);for(;"playing"===e.phase&&l>=STEP_MS-STEP_TOLERANCE_MS;)l-=STEP_MS,e.now+=STEP_MS,null!==e.firstSpawn&&e.now>=e.firstSpawn&&(e.firstSpawn=null,spawnEnemy(e)),e.now>=e.nextSpawn&&(e.nextSpawn+=ENEMY_SPAWN_INTERVAL,spawnEnemy(e)),step(e);e.pending=l}else e.now+=1e3*Math.min(n,.25);sync(e),e.world.update(n)}}function spawnEnemy(e){const n=e.layout;if(!n||e.enemies.length>=MAX_ENEMIES||e.enemiesRemaining<=0)return;const l=createEnemy(n.cell,e.enemies,e.now);l&&(e.enemies.push(l),e.enemiesRemaining-=1,e.onEnemies(e.enemiesRemaining))}function step(e){const n=board(e),l=e.layout;let t=e.player;if(!n||!l||!t)return;const o=e.now,i=[t,...e.enemies];e.direction&&t.isAlive&&(t=moveTank(t,e.direction,PLAYER_SPEED,n,i),i[0]=t);const s=e.bullets.slice();if(t.isAlive){const n=fire(t,o);n&&(s.push(n),muzzleFlash(e.world,l,t),t={...t,lastFireTime:o},i[0]=t,e.onEvent("fire"))}const r=t;let a=e.enemies.map(t=>{if(!t.isAlive)return t;const a=moveTank(t,t.direction,ENEMY_SPEED,n,i),E=a.x===t.x&&a.y===t.y,{direction:d,turned:u}=enemyHeading(t,r,n,i,E,o),p=moveTank(t,d,ENEMY_SPEED,n,i);if(u&&(p.lastDirectionChangeTime=o),enemyWantsToFire(p,r)){const n=fire(p,o);n&&(s.push(n),muzzleFlash(e.world,l,p),p.lastFireTime=o)}return p});for(const e of s)moveBullet(e);const E=bulletClashes(s);for(const[n,t]of E.points)explode(e.world,l,n,t,!1);let d=e.lives,u=!1;const p=[t,...a],m=E.remaining.filter(i=>{const s=bulletHit(i,n,p,o);if(!s.hit)return!0;if(s.tile){const[n,t]=s.tile,o=e.tiles[t][n].type,i=damageTile(e.tiles,n,t);i&&e.scene&&updateWall(e.world,l,e.scene,n,t,i,o),explode(e.world,l,(n+.5)*l.cell,(t+.5)*l.cell,!1)}s.base&&(u=!0,explode(e.world,l,i.x,i.y,!0));const r=s.tank;if(r)if(explode(e.world,l,r.x,r.y,!0),r.isPlayer)d-=1,e.onEvent("hit"),t=d>0?createPlayer(l.cell,o):{...t,isAlive:!1},p[0]=t;else{a=a.map(e=>e.id===r.id?{...e,isAlive:!1}:e);for(let e=0;e<a.length;e++)p[e+1]=a[e];e.onScore(e.world.scoreboard.add(POINTS_PER_ENEMY)),e.onEvent("kill")}return!1});e.player=t,e.enemies=a.filter(e=>e.isAlive),e.bullets=m,d!==e.lives&&(e.world.scoreboard.setLives(d),e.onLives(d)),u||d<=0?end(e,!1):e.enemiesRemaining<=0&&0===e.enemies.length&&end(e,!0)}function end(e,n){e.won=n,n&&e.onScore(e.world.scoreboard.add(POINTS_PER_LEVEL)),e.direction=null,e.phase="over",e.onPhase("over")}export function drag(e,{phase:n,dx:l,dy:t}){"end"!==n?"move"===n&&"playing"===e.phase&&(Math.abs(l)<SWIPE_THRESHOLD&&Math.abs(t)<SWIPE_THRESHOLD||(e.direction=Math.abs(l)>Math.abs(t)?l>0?"right":"left":t>0?"down":"up")):e.direction=null}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{BULLET_SIZE,BULLET_SPEED,ENEMY_AIM_TOLERANCE,ENEMY_FIRE_COOLDOWN,ENEMY_SPEED,ENEMY_TURN_INTERVAL,GRID_HEIGHT,GRID_WIDTH,HIT_TANK_SIZE,PLAYER_FIRE_COOLDOWN,REFERENCE_CELL,SPAWN_PROTECTION,TANK_RATIO}from"./Tank1990Constants.js";const DIRECTIONS=["up","down","left","right"],OPPOSITE={up:"down",down:"up",left:"right",right:"left"},STEP={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},solid=B=>!!B&&("brick"===B.type||"steel"===B.type||"base"===B.type);let ids=0;const nextId=()=>++ids;export const BASE_X=Math.floor(GRID_WIDTH/2);export const BASE_Y=GRID_HEIGHT-3;const LAYOUTS=[[".............",".B.B.B.B.B.B.",".B.B.B.B.B.B.",".B.B.BSB.B.B.",".B.B.B.B.B.B.",".B.B.....B.B.",".....B.B.....","S.BB.....BB.S",".....B.B.....",".B.B.BBB.B.B.",".B.B.B.B.B.B.",".B.B.....B.B.",".B.B.BBB.B.B.",".............",".............",".............","............."],[".............","..SS.....SS..","..S..BBB..S..","BB...B.B...BB","..SS.....SS..",".....SSS.....",".BBB.....BBB.",".B.B.BBB.B.B.",".BBB.B.B.BBB.",".....BBB.....","SS.........SS","..BBB.S.BBB..","..B.......B..",".............","BB.........BB",".............","............."],[".............","..B.......B..",".BB.SS.SS.BB.","BB.........BB","B..BB...BB..B","..BB..S..BB..",".BB..BBB..BB.","BB..BB.BB..BB","...BB...BB...",".SBB..S..BBS.","..B..BBB..B..",".BB.B...B.BB.","....B.S.B....",".............","SS.........SS",".............","............."],[".............",".BBB.....BBB.",".B.B.SSS.B.B.",".BBB.....BBB.",".............","SS.BBB.BBB.SS","...B.B.B.B...","...BBB.BBB...",".B.........B.",".BBB.SSS.BBB.",".B.B.....B.B.",".BBB.BBB.BBB.",".....B.B.....",".............",".BB.......BB.",".............","............."],[".............","..B..B.B..B..","..B..B.B..B..","SSB..B.B..BSS","..B.......B..","..BBBB.BBBB..","......S......","BBBB.SSS.BBBB","......S......","..BBBB.BBBB..","..B.......B..","SSB.BBBBB.BSS","..B.......B..",".............",".B.........B.",".............","............."],[".............",".BBBBB.BBBBB.",".B.........B.",".B.BBB.BBB.B.",".B.B.S.S.B.B.","...B.....B...","S..BBB.BBB..S",".............","BB.SS.B.SS.BB",".............","S..BBB.BBB..S","...B.....B...",".B.B.BBB.B.B.",".B.........B.",".BB.......BB.",".............","............."]];export function createMap(){const B=GRID_WIDTH,t=GRID_HEIGHT,e=LAYOUTS[Math.floor(Math.random()*LAYOUTS.length)],n=Math.random()<.5,r=Array.from({length:t},(t,r)=>Array.from({length:B},(t,i)=>{const o=e[r]?.[n?B-1-i:i];return"B"===o?{type:"brick",health:2}:"S"===o?{type:"steel",health:0}:{type:"empty",health:0}})),i=(B,t)=>{r[t]?.[B]&&(r[t][B]={type:"empty",health:0})};for(const t of[0,BASE_X,B-1])for(let B=-1;B<=1;B++)for(let e=0;e<=1;e++)i(t+B,e);for(let e=t-2;e<t;e++)for(let t=0;t<B;t++)i(t,e);for(let B=BASE_Y-2;B<t;B++)for(let t=BASE_X-2;t<=BASE_X+2;t++)i(t,B);r[BASE_Y][BASE_X]={type:"base",health:1};for(const[B,t]of[[BASE_X-1,BASE_Y-1],[BASE_X,BASE_Y-1],[BASE_X+1,BASE_Y-1],[BASE_X-1,BASE_Y],[BASE_X+1,BASE_Y]])r[t][B]={type:"steel",health:0};return r}export function createPlayer(B,t){return{id:0,x:2*B+B/2,y:(GRID_HEIGHT-1)*B+B/2,direction:"up",isPlayer:!0,isAlive:!0,lastFireTime:-1/0,spawnProtectionEndTime:t+SPAWN_PROTECTION,lastDirectionChangeTime:0}}export function createEnemy(B,t,e){const n=(2*B)**2;for(const r of[0,Math.floor(GRID_WIDTH/2),GRID_WIDTH-1]){const i=r*B+B/2,o=B/2;if(!t.some(B=>(B.x-i)**2+(B.y-o)**2<n))return{id:nextId(),x:i,y:o,direction:"down",isPlayer:!1,isAlive:!0,lastFireTime:-1/0,spawnProtectionEndTime:e+SPAWN_PROTECTION,lastDirectionChangeTime:e}}return null}function nextPosition(B,t,e,n,r){const i=e*(n.cell/REFERENCE_CELL),[o,l]=STEP[t],S=B.x+o*i,E=B.y+l*i,a=n.cell*TANK_RATIO,s=a/2;if(S-s<0||S+s>n.width||E-s<0||E+s>n.height)return null;for(const[B,t]of[[S-s,E-s],[S+s,E-s],[S-s,E+s],[S+s,E+s]])if(solid(n.tiles[Math.floor(t/n.cell)]?.[Math.floor(B/n.cell)]))return null;const h=a*a;for(const t of r)if(t.id!==B.id&&t.isAlive&&(S-t.x)**2+(E-t.y)**2<h)return null;return[S,E]}export function moveTank(B,t,e,n,r){const i=nextPosition(B,t,e,n,r);return i?{...B,direction:t,x:i[0],y:i[1]}:{...B,direction:t}}export function fire(B,t){if(t-B.lastFireTime<(B.isPlayer?PLAYER_FIRE_COOLDOWN:ENEMY_FIRE_COOLDOWN))return null;const[e,n]=STEP[B.direction],r=HIT_TANK_SIZE/2+2;return{id:nextId(),x:B.x+e*r,y:B.y+n*r,direction:B.direction,isPlayerBullet:B.isPlayer}}export function moveBullet(B){const[t,e]=STEP[B.direction];B.x+=t*BULLET_SPEED,B.y+=e*BULLET_SPEED}export function bulletHit(B,t,e,n){if(B.x<0||B.x>t.width||B.y<0||B.y>t.height)return{hit:!0};const r=Math.floor(B.x/t.cell),i=Math.floor(B.y/t.cell),o=t.tiles[i]?.[r];if("brick"===o?.type)return{hit:!0,tile:[r,i]};if("steel"===o?.type)return{hit:!0};if("base"===o?.type)return B.isPlayerBullet?{hit:!0}:{hit:!0,tile:[r,i],base:!0};const l=((BULLET_SIZE+HIT_TANK_SIZE)/2)**2;for(const t of e)if(t.isAlive&&B.isPlayerBullet!==t.isPlayer&&!(n<t.spawnProtectionEndTime)&&(B.x-t.x)**2+(B.y-t.y)**2<l)return{hit:!0,tank:t};return{hit:!1}}export function damageTile(B,t,e){const n=B[e]?.[t];if(!n||"brick"!==n.type&&"base"!==n.type)return null;const r="brick"===n.type?{type:n.health-1<=0?"empty":"brick",health:n.health-1}:{type:"empty",health:n.health};return B[e][t]=r,r}export function bulletClashes(B){const t=new Set,e=[],n=(2*BULLET_SIZE)**2;for(let r=0;r<B.length;r++)for(let i=r+1;i<B.length;i++){const o=B[r],l=B[i];o.isPlayerBullet!==l.isPlayerBullet&&(o.x-l.x)**2+(o.y-l.y)**2<n&&(t.add(r),t.add(i),e.push([(o.x+l.x)/2,(o.y+l.y)/2]))}return{remaining:t.size?B.filter((B,e)=>!t.has(e)):B,points:e}}const toward=(B,t)=>{const e=t.x-B.x,n=t.y-B.y;return Math.abs(e)>Math.abs(n)?e>0?"right":"left":n>0?"down":"up"};export function enemyHeading(B,t,e,n,r,i){if(r){const r=DIRECTIONS.filter(t=>t!==B.direction&&nextPosition(B,t,ENEMY_SPEED,e,n));if(r.length){const e=toward(B,t);return{direction:r.includes(e)?e:r[Math.floor(Math.random()*r.length)],turned:!0}}return{direction:OPPOSITE[B.direction],turned:!0}}if(i-B.lastDirectionChangeTime<ENEMY_TURN_INTERVAL)return{direction:B.direction,turned:!1};const o=Math.random();return{direction:o<.4?toward(B,t):o<.75?B.direction:DIRECTIONS[Math.floor(Math.random()*DIRECTIONS.length)],turned:!0}}export function enemyWantsToFire(B,t){const e=ENEMY_AIM_TOLERANCE;return("up"===B.direction?Math.abs(B.x-t.x)<e&&B.y>t.y:"down"===B.direction?Math.abs(B.x-t.x)<e&&B.y<t.y:"left"===B.direction?Math.abs(B.y-t.y)<e&&B.x>t.x:Math.abs(B.y-t.y)<e&&B.x<t.x)||Math.random()<.3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x25f5bf}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CLASSIC_FIELD,EXPLOSION_TIME,FRAME,GRID_HEIGHT,GRID_LINE,GRID_WIDTH,TANK_RATIO,TURN_TIME}from"./Tank1990Constants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("tank-1990/Tank1990Scene:"+e,o),meshes.set(e,t)),t},rgb=e=>{const[o,t,s]=toColor(e);return[o,t,s]},c4=e=>toColor(e),cube=()=>shapeGeometry("cube"),sphere=()=>shapeGeometry("sphere"),STAND_UP=quat.x(Math.PI/2),HEADING={up:0,left:Math.PI/2,down:Math.PI,right:-Math.PI/2};export const heading=e=>quat.z(HEADING[e]);const FIELD_DEPTH=8,BACKDROP_DEPTH=25;export const toWorld=(e,o,t,s=0)=>[o-e.boardWidth/2,e.boardHeight/2-t,s];const brickMesh=e=>cached("t90-brick-"+(e?1:2),()=>{const o=e?.34:.56,t=rgb(e?"#7A3F1E":"#A0522D"),s=rgb(e?"#9A6040":"#C0764A"),r=[{geometry:cube(),position:[0,0,o/2],scale:[.96,.96,o],color:[...rgb("#2E1A0C"),1]},{geometry:cube(),position:[0,0,(o-.04)/2],scale:[.98,.98,o-.04],color:[...t,1]}];for(let t=0;t<4;t++){const l=(t+.5)/4-.5,i=t%2?-.25:0;for(let a=0;a<3;a++){const n=Math.max(-.48,-.5+i+.5*a+.02),d=Math.min(.48,-.5+i+.5*(a+1)-.02);if(d-n<.06)continue;if(e&&(t+a)%3==0)continue;const p=.9+(7*t+3*a)%5*.04;r.push({geometry:cube(),position:[(n+d)/2,l,o+.025],scale:[d-n,.2,.05],color:[s[0]*p,s[1]*p,s[2]*p,1]})}}return _0x25f5bf(merge(r),{center:!1,shine:.1})}),STEEL={edge:"#252B33",body:"#5F6B7A",plate:"#9AA6B4",rivet:"#E6EBF1"},steelMesh=()=>cached("t90-steel-v2",()=>{const e=[{geometry:cube(),position:[0,0,.29],scale:[.98,.98,.58],color:[...rgb(STEEL.edge),1]},{geometry:cube(),position:[0,0,.3],scale:[.9,.9,.6],color:[...rgb(STEEL.body),1]},{geometry:cube(),position:[0,0,.62],scale:[.62,.62,.04],color:[...rgb(STEEL.plate),1]},{geometry:cube(),position:[0,0,.645],scale:[.5,.5,.01],color:[...rgb(STEEL.body),1]}];for(const[o,t]of[[-.36,-.36],[.36,-.36],[-.36,.36],[.36,.36]])e.push({geometry:sphere(),position:[o,t,.6],scale:[.12,.12,.08],color:[...rgb(STEEL.rivet),1]});return _0x25f5bf(merge(e),{center:!1,shine:.85})}),baseMesh=()=>cached("t90-base",()=>_0x25f5bf(merge([{geometry:shapeGeometry("roundedBox"),position:[0,0,.14],scale:[.92,.92,.28],color:[...rgb("#FFC107"),1]},{geometry:cube(),position:[0,0,.29],scale:[.7,.7,.03],color:[...rgb("#FF8F00"),1]},{geometry:extrude((new Path).addStar(0,0,.32,.14),{depth:.12}),position:[0,0,.36],color:[...rgb("#FFE082"),1]}]),{center:!1,shine:.7})),PLAYER_PAINT={hull:"#FFD700",top:"#FFE44D",track:"#8B7209",turret:"#FFF176",barrel:"#B8860B"},ENEMY_PAINT={hull:"#6B7D94",top:"#8A9AAE",track:"#2E3C4E",turret:"#7A8EA4",barrel:"#4A5E74"},tankMesh=e=>cached("t90-tank-"+(e?"player":"enemy"),()=>{const o=e?PLAYER_PAINT:ENEMY_PAINT,t=[];for(const e of[1,-1]){t.push({geometry:shapeGeometry("roundedBox"),position:[.37*e,0,.13],scale:[.24,1,.26],color:c4(o.track)});for(let o=0;o<6;o++)t.push({geometry:cube(),position:[.37*e,.168*o-.42,.265],scale:[.25,.06,.02],color:[.12,.12,.12,1]})}return t.push({geometry:shapeGeometry("roundedBox"),position:[0,0,.22],scale:[.56,.84,.24],color:c4(o.hull)},{geometry:cube(),position:[0,-.08,.345],scale:[.46,.5,.02],color:c4(o.top)},{geometry:lathe([[.001,.2],[.12,.19],[.2,.14],[.23,.06],[.23,0]],{segments:24}),position:[0,-.04,.34],rotation:STAND_UP,color:c4(o.turret)},{geometry:tube([[0,.12,.43],[0,.66,.43]],{radius:.055,sides:12}),color:c4(o.barrel)},{geometry:tube([[0,.6,.43],[0,.68,.43]],{radius:.075,sides:12}),color:c4(o.barrel)}),_0x25f5bf(merge(t),{center:!1,shine:e?.55:.4})}),fieldMesh=(e,o)=>cached("t90-field:"+e.boardWidth+"x"+e.boardHeight+":"+o,()=>_0x25f5bf(extrude((new Path).addRoundedRect(-e.boardWidth/2,-e.boardHeight/2,e.boardWidth,e.boardHeight,o),{depth:8}),{shine:.1})),gridMesh=e=>cached("t90-grid:"+e.cell,()=>{const o=[];for(let t=1;t<GRID_WIDTH;t++)o.push({geometry:cube(),position:[t*e.cell-e.boardWidth/2,0,0],scale:[1,e.boardHeight,.2]});for(let t=1;t<GRID_HEIGHT;t++)o.push({geometry:cube(),position:[0,e.boardHeight/2-t*e.cell,0],scale:[e.boardWidth,1,.2]});return _0x25f5bf(merge(o),{center:!1})}),frameWidth=e=>Math.min(FRAME,.5*e.cell),frameMesh=e=>cached("t90-frame:"+e.boardWidth+"x"+e.boardHeight,()=>{const o=frameWidth(e),t=.6*e.cell,s=e.boardWidth,r=e.boardHeight,l=(e,t,l,i)=>({geometry:extrude((new Path).addRoundedRect(-s/2-o+e,-r/2-o+e,s+2*(o-e),r+2*(o-e),Math.max(1,.5*o-e)).addRect(-s/2-.2*e,-r/2-.2*e,s+.4*e,r+.4*e),{depth:t,fillRule:"evenodd"}),position:[0,0,i],color:[...rgb(l),1]}),i=[l(0,t,STEEL.body,t/2),l(.22*o,.06*t,STEEL.plate,t+.03*t)],a=(e,s)=>i.push({geometry:sphere(),position:[e,s,t+.06*t],scale:[.3*o,.3*o,.2*o],color:[...rgb(STEEL.rivet),1]}),n=o/2;for(let o=0;o<=GRID_WIDTH;o++){const t=-s/2+o*e.cell;a(t,r/2+n),a(t,-r/2-n)}for(let o=1;o<GRID_HEIGHT;o++){const t=-r/2+o*e.cell;a(-s/2-n,t),a(s/2+n,t)}return _0x25f5bf(merge(i),{center:!1,shine:.85})}),fieldColor=e=>toColor("classic"===e.mode?CLASSIC_FIELD:e.BOARD.SURFACE),wallMesh=e=>"brick"===e.type?brickMesh(e.health<2):"steel"===e.type?steelMesh():"base"===e.type?baseMesh():null;export function buildScene(e,o,t,s){const r=spawnBackdrop(e,o.width,o.height,-25,t);return placeTiltedBackdrop(e,r,o,25),{backdrop:r,field:e.spawn({mesh:fieldMesh(o,"classic"===t.mode?10:6),position:[0,0,-4],color:fieldColor(t),pickable:!1}),frame:e.spawn({mesh:frameMesh(o),position:[0,0,0],pickable:!1}),grid:e.spawn({mesh:gridMesh(o),position:[0,0,.15],color:toColor(GRID_LINE),pickable:!1}),walls:s.map((t,s)=>t.map((t,r)=>spawnWall(e,o,t,r,s))),tanks:new Map,bullets:new Map}}function spawnWall(e,o,t,s,r){const l=wallMesh(t);return l?e.spawn({mesh:l,position:toWorld(o,(s+.5)*o.cell,(r+.5)*o.cell),scale:o.cell,pickable:!1}):null}export function removeScene(e,o){const t=[...Array.from(o.tanks.values(),e=>e.body),...Array.from(o.bullets.values())];for(const s of[o.backdrop,o.field,o.frame,o.grid,...t,...o.walls.flat()])null!=s&&e.despawn(s)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s),e.set(t.field,{mesh:fieldMesh(o,"classic"===s.mode?10:6),color:fieldColor(s)})}export function updateWall(e,o,t,s,r,l,i){const a=t.walls[r][s],n=wallMesh(l);null!=a&&n?e.set(a,{mesh:n}):null!=a&&(e.despawn(a),t.walls[r][s]=null),effects.shatter(e,{position:toWorld(o,(s+.5)*o.cell,(r+.5)*o.cell,.5*o.cell),count:n?6:12,size:.14*o.cell,speed:3*o.cell,direction:[0,0,1],spread:1.2,lifetime:.5,gravity:9*-o.cell,colors:"base"===i?[c4("#FFC107"),c4("#FF8F00"),c4("#5A5A5A")]:[c4("#A0522D"),c4("#6B3410"),c4("#C0764A")],flash:!1})}export function rebuildWalls(e,o,t,s){for(const o of t.walls.flat())null!=o&&e.despawn(o);t.walls=s.map((t,s)=>t.map((t,r)=>spawnWall(e,o,t,r,s)))}const SHIELD=[.12,.55,1,.28],SHELL=[2.4,1.5,.45,1],SHELL_GLOW=[2.2,1.1,.3,.45];export function syncUnits(e,o,t,s,r,l){const i=o.cell*TANK_RATIO,a=new Set;for(const r of s){if(!r.isAlive)continue;a.add(r.id);let s=t.tanks.get(r.id);const n=toWorld(o,r.x,r.y);if(!s){const o=e.spawn({mesh:tankMesh(r.isPlayer),position:n,rotation:heading(r.direction),scale:i,pickable:!1});s={body:o,shield:e.spawn({mesh:"sphere",parent:o,position:[0,0,.3],scale:0,color:SHIELD,pickable:!1}),direction:r.direction,shielded:!1,x:r.x,y:r.y},t.tanks.set(r.id,s),e.set(o,{scale:.3*i}),e.animate(o,{scale:i},{duration:.25,easing:"back"})}(s.x!==r.x||s.y!==r.y)&&(e.set(s.body,{position:n}),s.x=r.x,s.y=r.y),s.direction!==r.direction&&(s.direction=r.direction,e.animate(s.body,{rotation:heading(r.direction)},{duration:TURN_TIME,easing:"easeOut"}));const d=l<r.spawnProtectionEndTime;d!==s.shielded&&(s.shielded=d,e.stopAnimation(s.shield),e.set(s.shield,{scale:d?1.45:0}),d&&e.animate(s.shield,{scale:1.6},{duration:.35,repeat:"forever",yoyo:!0,easing:"easeInOut"}))}for(const[o,s]of t.tanks)!a.has(o)&&(e.despawn(s.body),t.tanks.delete(o));const n=new Set,d=e.transforms;for(const s of r){n.add(s.id);const r=toWorld(o,s.x,s.y,.34*o.cell),l=t.bullets.get(s.id);if(null==l){const l=e.spawn({mesh:"sphere",position:r,scale:.24*o.cell,color:SHELL,pickable:!1});e.spawn({mesh:"puff",parent:l,scale:2.4,color:SHELL_GLOW,pickable:!1}),t.bullets.set(s.id,l)}else d.position(l,r[0],r[1],r[2])}d.flush();for(const[o,s]of t.bullets)!n.has(o)&&(e.despawn(s),t.bullets.delete(o))}export function muzzleFlash(e,o,t){const s=o.cell*TANK_RATIO,r=s/2+.5*s,[l,i]="up"===t.direction?[0,-1]:"down"===t.direction?[0,1]:"left"===t.direction?[-1,0]:[1,0];effects.dust(e,{position:toWorld(o,t.x+l*r,t.y+i*r,.43*s),count:3,size:.35*s,speed:1.5*s,direction:[l,-i,.3],spread:.5,lifetime:.1,color:[[2.6,2.6,2.2,.95],[2.4,2,.8,.8]],endSize:1.8})}export function explode(e,o,t,s,r){const l=o.cell*(r?.9:.5);effects.explosion(e,{position:toWorld(o,t,s,.4*o.cell),count:r?22:10,size:l,speed:l*(r?3:2),lifetime:EXPLOSION_TIME,direction:[0,0,1],spread:1.3,gravity:10*-o.cell,debris:r?[c4("#3E4A58"),c4("#FFB74D"),c4("#5A5A5A")]:void 0})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS,isTablet}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{textColumn,timerColumn}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{COLORS,getLayout,LIGHT,TIME_LIMIT}from"./TicTacToeConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,shownScore,start,tick}from"./TicTacToeGame.js";import{jsx as _0x8c6c16}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.TIC_TAC_TOE,LOW_TIME=30,FEEDBACK={place:{sound:SOUNDS.PLACE,haptic:HapticType.LIGHT},robot:{sound:SOUNDS.ROBOT,haptic:HapticType.LIGHT},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.LOSE,haptic:HapticType.ERROR},draw:{sound:SOUNDS.DRAW,haptic:HapticType.MEDIUM}},TITLES={win:["YOU WON!","You beat the robot!"],lose:["YOU LOST!","The robot wins!"],draw:["DRAW!","Nobody wins this round!"],timeout:["TIME UP!","You ran out of time!"]};export const TicTacToe=engineGame(GAME_IDS.TIC_TAC_TOE,e=>{const[t,o]=useLiveState("O"),[s,r]=useLiveState(TIME_LIMIT),{game:i,theme:a,screen:n,gameOver:m}=useEngineGame(e,{gameId:GAME_IDS.TIC_TAC_TOE,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,o,s)=>{const r=getLayout(t,o,s,isTablet);return setLayout(e,r),r.size+2*r.pad},drag:drag,outcome:e=>"win"===e.result?"win":"draw"===e.result?"draw":"lose",reportScore:(e,t)=>"win"===t?e.finalScore:0,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t,o)=>{"timeout"===o.result&&e(SOUNDS.TIME_UP,HapticType.ERROR)},wire:(e,t)=>{e.onTurn=o,e.onTime=r,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),T=useMemo(()=>toRgb(a.BACKGROUND),[a.BACKGROUND]),[S,u]=TITLES[i.result??"timeout"];return _0x8c6c16(EngineGameScreen,{...n,light:LIGHT,background:T,columns:[textColumn("YOU","O",COLORS.O_BADGE),timerColumn(s,a,30,"O"===t?"YOUR TURN":"AI THINKING..."),textColumn("AI","X",COLORS.X_BADGE)],subtext:"Play vs Robot!",gameOver:m({title:S,message:u,scoreLabel:"Final Score",score:shownScore(i),buttonText:"Play Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const TIME_LIMIT=120;export const WIN_SCORE=1e4;export const DRAW_SCORE=5e3;export const LOSE_SCORE=0;export const TIME_BONUS=50;export const ROBOT_DELAY=.5;export const COLORS={X:"#E53935",O:"#2E7D32",WIN:"#FFC107",FRAME:"#5c4033",WELL:"#3a2518",SURFACE:"#6b4c3b",SURFACE_ALT:"#735342",GRID:"#8d6e5a",X_BADGE:"#F44336",O_BADGE:"#4CAF50"};export const TILT=.42;export const LIGHT=frontLight([-.4,.5,1],.45);const SCOREBOARD_HEIGHT=92,CONTROLS_HEIGHT=120;export function getLayout(t,o,e,r){const n=r?10:8,s=getScoreBoardTop(e)+92,a=Math.max(180,o-s-120),i=a/Math.cos(.42)-2*n-30,l=3*Math.floor(Math.max(150,Math.min(gameWidthFor(t)-2*n,i))/3);return{width:t,height:o,tilt:.42,centerY:s+a/2,cell:l/3,size:l,pad:n}}export function cellCentre(t,o){return[(o%3-1)*t.cell,(1-Math.floor(o/3))*t.cell]}export function cellAt(t,o,e){const r=Math.floor((o+t.size/2)/t.cell),n=Math.floor((t.size/2-e)/t.cell);return r<0||r>2||n<0||n>2?-1:3*n+r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{cellAt,DRAW_SCORE,LOSE_SCORE,ROBOT_DELAY,TIME_BONUS,TIME_LIMIT,WIN_SCORE}from"./TicTacToeConstants.js";import{emptyBoard,robotMove,winningLine}from"./TicTacToeRules.js";import{buildScene,clearPieces,hideGhost,markWin,place,removeScene,setSceneTheme,showGhost,shrug}from"./TicTacToeScene.js";const WORLD_CAPACITY=240;export function createGame(e){const o=new World(240),r={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",board:emptyBoard(),turn:"O",result:null,finalScore:0,line:null,get timeLeft(){return o.scoreboard.shownSeconds},press:-1,onPhase:e=>{},onTurn:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(0,TIME_LIMIT),o.scoreboard.handlers={onSecond:e=>r.onTime(e),onTimeUp:()=>"playing"===r.phase&&end(r,"timeout")},r}export const scoreFor=(e,o)=>"win"===e?WIN_SCORE+Math.max(0,o)*TIME_BONUS:"draw"===e?DRAW_SCORE+Math.max(0,o)*(TIME_BONUS/2):LOSE_SCORE;export const shownScore=e=>e.result?e.finalScore:LOSE_SCORE;export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme,e.board),e.line&&markWin(e.world,o,e.scene,e.line)}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}function clear(e){e.world.cancelTimers(),e.board=emptyBoard(),e.turn="O",e.result=null,e.line=null,e.world.scoreboard.reset(0,TIME_LIMIT),e.press=-1,e.scene&&clearPieces(e.world,e.scene),e.onTurn("O"),e.onTime(TIME_LIMIT)}export function start(e){"ready"===e.phase&&(clear(e),e.world.scoreboard.startCountdown(TIME_LIMIT),e.phase="playing",e.onPhase("playing"))}export function reset(e){clear(e),e.phase="ready",e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(o)}function end(e,o){e.result=o,e.world.cancelTimers(),e.world.scoreboard.stop(),e.finalScore=scoreFor(o,e.timeLeft),e.press=-1,e.scene&&hideGhost(e.world,e.scene),e.phase="over",e.onPhase("over")}function put(e,o,r){e.board[o]=r;const{layout:n,scene:t}=e;n&&t&&place(e.world,n,t,o,r),e.onEvent("O"===r?"place":"robot");const s=winningLine(e.board);return s?(e.line=s,n&&t&&markWin(e.world,n,t,s),e.onEvent("O"===r?"win":"lose"),void end(e,"O"===r?"win":"lose")):e.board.every(e=>null!==e)?(n&&t&&shrug(e.world,n,t),e.onEvent("draw"),void end(e,"draw")):(e.turn="O"===r?"X":"O",void e.onTurn(e.turn))}export function play(e,o){"playing"!==e.phase||"O"!==e.turn||null!==e.board[o]||o<0||o>8||(put(e,o,"O"),"playing"===e.phase&&e.world.after(ROBOT_DELAY,()=>{if("playing"!==e.phase||"X"!==e.turn)return;const o=robotMove(e.board);o>=0&&put(e,o,"X")}))}export function cellUnder(e,o,r){const n=e.layout;if(!n)return-1;const[t,s]=unproject(n,o,r,1);return cellAt(n,t,s)}export function drag(e,{phase:o,x:r,y:n}){const{layout:t,scene:s}=e,a=cellUnder(e,r,n),l="playing"===e.phase&&"O"===e.turn&&a>=0&&null===e.board[a];if("start"===o?e.press=l?a:-1:a!==e.press&&(e.press=-1),"end"===o){const o=e.press;return e.press=-1,s&&hideGhost(e.world,s),void(o>=0&&play(e,o))}t&&s&&(e.press>=0?showGhost(e.world,t,s,e.press):hideGhost(e.world,s))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const LINES=[[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];export const emptyBoard=()=>Array(9).fill(null);export function winningLine(n){for(const t of LINES){const[r,o,e]=t;if(n[r]&&n[r]===n[o]&&n[r]===n[e])return t}return null}export const winnerOf=n=>{const t=winningLine(n);return t?n[t[0]]:null};const empties=n=>n.flatMap((n,t)=>null===n?[t]:[]),MISS_BLOCK=.4,SLIP=.7;function minimax(n,t,r,o){let e=0;for(const t of n)e=3*e+("X"===t?1:"O"===t?2:0);const i=32*e+2*r+("X"===t?1:0),l=o.get(i);if(void 0!==l)return l;const s=winnerOf(n);if("X"===s)return 10-r;if("O"===s)return r-10;let f="X"===t?-1/0:1/0,u=!1;for(let e=0;e<n.length;e++){if(null!==n[e])continue;u=!0,n[e]=t;const i=minimax(n,"X"===t?"O":"X",r+1,o);n[e]=null,f="X"===t?Math.max(f,i):Math.min(f,i)}const a=u?f:0;return o.set(i,a),a}const pick=n=>n[Math.floor(Math.random()*n.length)];export function robotMove(n){const t=empties(n);if(!t.length)return-1;const r=r=>t.filter(t=>{const o=[...n];return o[t]=r,winnerOf(o)===r}),o=r("X")[0];if(void 0!==o)return o;const e=r("O");if(e.length){const n=t.filter(n=>!e.includes(n));return n.length&&Math.random()<.4?pick(n):pick(e)}if(Math.random()<.7)return pick(t);const i=[...n],l=new Map;let s=-1/0,f=[];for(const n of t){i[n]="X";const t=minimax(i,"O",1,l);i[n]=null,t>s?(s=t,f=[n]):t===s&&f.push(n)}return pick(f)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,merge,Path,quat,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{popBurst}from"../shared/EngineBlasts.js";import{cacheGameAsset,createGameMesh as _0x11fb6c}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS}from"./TicTacToeConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("tic-tac-toe/TicTacToeScene:"+e,o),meshes.set(e,t)),t},BOARD_DEPTH=12,BACKDROP_DEPTH=30,STROKE=.075,SPAN=.23,BAR=.1,WIN_GOLD=toColor(COLORS.WIN),xMesh=()=>cached("ttt-x-v2",()=>{const e=(e,o)=>({geometry:tube([e,o],{radius:.075,sides:16,smoothness:2,caps:!0})});return _0x11fb6c(merge([e([-.23,-.23,.075],[.23,.23,.075]),e([.23,-.23,.0765],[-.23,.23,.0765])]),{center:!1,shine:.75})}),oMesh=()=>cached("ttt-o-v2",()=>{const e=Array.from({length:41},(e,o)=>{const t=o/40*Math.PI*2;return[.23*Math.cos(t),.23*Math.sin(t),.075]});return _0x11fb6c(tube(e,{radius:.075,sides:16,smoothness:2,caps:!1}),{center:!1,shine:.75})}),panelMesh=(e,o,t,s=0)=>cached("ttt-panel:"+e+":"+o+":"+t+":"+s,()=>_0x11fb6c(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:t}),{shine:s})),pieceColor=e=>toColor("X"===e?COLORS.X:COLORS.O);function spawnBoard(e,o,t){const s=[],l=o=>s.push(e.spawn({pickable:!1,...o})),a=o.size+2*o.pad,n="classic"===t.mode,r=Math.max(6,.075*o.cell),i=.1*o.cell;if(n){l({mesh:panelMesh(a,14,12),position:[0,0,-6],color:toColor(COLORS.FRAME)}),l({mesh:panelMesh(o.size+4,10,1),position:[0,0,.4],color:toColor(COLORS.WELL)}),l({mesh:panelMesh(o.size,6,1),position:[0,0,.8],color:toColor(COLORS.SURFACE)});for(let e=0;e<9;e++)if((Math.floor(e/3)+e)%2==1){const[t,s]=cellCentre(o,e);l({mesh:"cube",position:[t,s,1.3],scale:[o.cell,o.cell,.02],color:toColor(COLORS.SURFACE_ALT)})}}else{l({mesh:panelMesh(a,8,12),position:[0,0,-6],color:toColor(t.BOARD.SURFACE)});for(let e=0;e<9;e++){const[s,a]=cellCentre(o,e);l({mesh:panelMesh(Math.round(o.cell-2*r),10,3),position:[s,a,1.5],scale:1,color:toColor(t.BOARD.CELL_EMPTY)})}}const p=toColor(n?COLORS.GRID:t.BOARD.GRID_LINE),h=[0,0,0,.18],u=o.size-.16*o.cell,d=quat.z(Math.PI/2);for(const e of[-.5,.5])l({mesh:"capsule",position:[e*o.cell+.25*r,.25*-r,1.05],scale:[1.5*r,u,.6],color:h}),l({mesh:"capsule",position:[.25*r,e*o.cell-.25*r,1.05],rotation:d,scale:[1.5*r,u,.6],color:h}),l({mesh:"capsule",position:[e*o.cell,0,1+i/2],scale:[r,u,i],color:p}),l({mesh:"capsule",position:[0,e*o.cell,1+i/2],rotation:d,scale:[r,u,i],color:p});return s}export function buildScene(e,o,t,s){const l=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,l,o,30);const a=e.spawn({mesh:oMesh(),scale:0,color:toColor(COLORS.O,.35),pickable:!1}),n={backdrop:l,board:spawnBoard(e,o,t),pieces:Array(9).fill(null),ghost:a,line:null};return s.forEach((t,s)=>{t&&place(e,o,n,s,t,!1)}),n}export function removeScene(e,o){for(const t of[o.backdrop,...o.board,...o.pieces,o.ghost,o.line])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s);for(const o of t.board)e.despawn(o);t.board=spawnBoard(e,o,s)}const BOARD_TOP=1;export function place(e,o,t,s,l,a=!0){const[n,r]=cellCentre(o,s),i=e.spawn({mesh:"X"===l?xMesh():oMesh(),position:[n,r,BOARD_TOP],rotation:quat.z(a?"X"===l?-.6:.6:0),scale:a?0:o.cell,color:pieceColor(l),pickable:!1});e.spawn({mesh:"sphere",parent:i,position:[.04,-.04,.01],scale:[.23*2.5,.23*2.5,.01],color:[0,0,0,.2],pickable:!1}),a&&(e.animate(i,[{scale:1.18*o.cell,at:.6},{scale:.94*o.cell,at:.82},{scale:o.cell}],{duration:.36,easing:"easeOut"}),e.animate(i,{rotation:[0,0,0,1]},{duration:.3,easing:"easeOut"}),e.after(.2,()=>popBurst(e,{position:[n,r,BOARD_TOP+.15*o.cell],size:.7*o.cell,color:pieceColor(l),count:7}))),t.pieces[s]=i,hideGhost(e,t)}export function showGhost(e,o,t,s){const[l,a]=cellCentre(o,s);e.set(t.ghost,{position:[l,a,BOARD_TOP+.5],scale:.92*o.cell}),e.animate(t.ghost,{scale:.98*o.cell},{duration:.5,repeat:"forever",yoyo:!0,easing:"easeInOut"})}export function hideGhost(e,o){e.stopAnimation(o.ghost),e.set(o.ghost,{scale:0})}export function markWin(e,o,t,s){s.forEach((s,l)=>{const a=t.pieces[s];if(null==a)return;const[n,r]=cellCentre(o,s);e.animate(a,{color:WIN_GOLD},{duration:.25,delay:.08*l}),e.animate(a,[{position:[n,r,BOARD_TOP+.35*o.cell],at:.4},{position:[n,r,BOARD_TOP]}],{duration:.45,delay:.08*l,easing:"easeOut"})});const[l,a]=cellCentre(o,s[0]),[n,r]=cellCentre(o,s[2]),i=Math.hypot(n-l,r-a)+.5*o.cell,p=Math.atan2(r-a,n-l),h=.07*o.cell,u=BOARD_TOP+.075*o.cell*2+h,d=quat.z(p-Math.PI/2);t.line=e.spawn({mesh:"capsule",position:[(l+n)/2,(a+r)/2,u],rotation:d,scale:[2*h,.01,2*h],color:[1.6,1.25,.3,1],pickable:!1}),e.animate(t.line,{scale:[2*h,i,2*h]},{duration:.32,delay:.15,easing:"easeOut"}),e.animate(t.line,{color:[1.2,.95,.25,1]},{duration:.6,delay:.5,easing:"easeInOut",repeat:"forever",yoyo:!0}),effects.sparkle(e,{position:[(l+n)/2,(a+r)/2,u+4],count:30,size:.06*o.cell,speed:2.5*o.cell,lifetime:.7,gravity:2*-o.cell,colors:["#FFD54F","#FFC107","#FFFFFF"].map(e=>toColor(e))})}export function shrug(e,o,t){for(const s of t.pieces)null!=s&&e.animate(s,{shake:.04*o.cell},{duration:.4})}export function clearPieces(e,o){for(const t of o.pieces)null!=t&&(e.stopAnimation(t),e.set(t,{lifetime:.25}));o.pieces=Array(9).fill(null),null!=o.line&&e.despawn(o.line),o.line=null,hideGhost(e,o)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{formatTime,GAME_IDS}from"../../services/UtilsService.js";import{getFruit,isFruitBuilt}from"../shared/EngineFruits.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,POINTS_PER_SET,TILE_TYPES,TIME_LIMIT,TOTAL_SETS}from"./TileHomeConstants.js";import{addFruit,createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./TileHomeGame.js";import{jsx as _0x3d96d7}from"react/jsx-runtime";const SFX=GAME_SOUNDS.TILE_HOME,formatScore=e=>e.toLocaleString(),FRUIT_DETAIL=.25;export const TileHome=engineGame(GAME_IDS.TILE_HOME,e=>{const[t,r]=useLiveState(0),[i,a]=useLiveState(TIME_LIMIT),{status:s,screen:o,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.TILE_HOME,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,i)=>{const a=getLayout(t,r,i);return setLayout(e,a),a.boardWidth},tap:tap,onStart:e=>e(SFX.START,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=r,e.onTime=a,e.onPick=()=>t(SFX.PICK,HapticType.LIGHT),e.onMatch=()=>t(SFX.MATCH,HapticType.MEDIUM),e.onWin=()=>t(SFX.WIN,HapticType.SUCCESS),e.onLose=()=>t(SFX.GAME_OVER,HapticType.HEAVY);const i=[...new Set(TILE_TYPES.map(e=>e.fruit))];for(const t of i)isFruitBuilt(t,.25)&&addFruit(e,t,getFruit(t,.25));const s=i.filter(e=>!isFruitBuilt(e,.25));let o=0;const n=()=>{const t=s.shift();t&&!e.world.isDisposed&&(addFruit(e,t,getFruit(t,.25)),s.length&&(o=requestAnimationFrame(n)))};return s.length&&(o=requestAnimationFrame(n)),()=>{o&&cancelAnimationFrame(o)}}}),m=Math.max(0,TOTAL_SETS-Math.floor(t/POINTS_PER_SET));return _0x3d96d7(EngineGameScreen,{...o,light:LIGHT,columns:[{label:"SCORE",value:formatScore(t)},{label:"SETS",value:String(m)},{label:"TIME",value:formatTime(Math.max(0,Math.ceil(i)))}],subtext:"Match tiles!",gameOver:n({title:"win"===s?"YOU WON!":"TIME UP!",message:"win"===s?"All tiles sorted home!":"You ran out of time!",scoreLabel:"win"===s?"You Won!":"Game Over",score:t,formatter:formatScore,buttonText:"win"===s?"Play Again!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const BOARD_COLS=6;export const BOARD_ROWS=7;export const LAYER_COUNT=3;export const TILES_PER_TYPE=6;export const SLOT_CAPACITY=7;export const MATCH_COUNT=3;export const TIME_LIMIT=300;export const POINTS_PER_SET=500;export const TILE_TYPES=[{fruit:"apple",color:"#dc2626"},{fruit:"orange",color:"#f97316"},{fruit:"banana",color:"#fbbf24"},{fruit:"grapes",color:"#7c3aed"},{fruit:"kiwi",color:"#84cc16"},{fruit:"strawberry",color:"#ef4444"},{fruit:"mango",color:"#f59e0b"},{fruit:"cherries",color:"#be123c"},{fruit:"pineapple",color:"#eab308"},{fruit:"watermelon",color:"#22c55e"},{fruit:"peach",color:"#fda4af"},{fruit:"pomegranate",color:"#9f1239"}];export const TOTAL_SETS=6*TILE_TYPES.length/3;export const FLY_TIME=.25;export const LIFT_AT=.28;export const LIFT_SCALE=1.08;export const MATCH_CHECK_DELAY=.3;export const MATCH_REMOVE_DELAY=.4;export const MATCH_BURST_TIME=.55;export const SHADE_TIME=.22;export const SHIFT_SPRING={stiffness:200,damping:15};export const LAND_SPRING={stiffness:260,damping:9};export const LAND_SQUASH=1.12;export const INTRO_SPRING={stiffness:400,damping:18,mass:1};export const RIPPLE_TIME=.3;export const LAYER_STAGGER=.07;export const shadeFor=t=>t>0?Math.min(.2+.15*t,.6):0;export const LIGHT=frontLight([-.35,.6,1],.5);export const TILE_FACE="#fffdf7";export const TILE_THICKNESS=.4;export const CLASSIC_BOARD="rgba(255, 255, 255, 0.35)";export const CLASSIC_TRAY="rgba(255, 255, 255, 0.45)";export const CLASSIC_TRAY_BORDER="rgba(255, 255, 255, 0.6)";export const CLASSIC_SLOT="rgba(255, 255, 255, 0.25)";export const CLASSIC_SLOT_BORDER="rgba(255, 255, 255, 0.5)";const BOARD_PADDING=8,TRAY_PADDING=8,TRAY_BORDER=1,SLOT_GAP=4,TRAY_BOARD_GAP=10;export function getLayout(t,o,r){const e=gameWidthFor(t),n=(e-16)/6,s=n-2,p=7*n+16,T=Math.floor((e-16-24)/7),a=T+16,i=r+(o-r-(a+10+p))/2,_=(t-e)/2;return{width:t,height:o,boardLeft:_,boardTop:i+a+10,boardWidth:e,boardHeight:p,cell:n,tile:s,fruit:s-12,trayLeft:_,trayTop:i,trayWidth:e,trayHeight:a,slot:T}}export const tileOrigin=(t,o,r,e)=>[t.boardLeft+8+o*t.cell+e*(t.cell/2),t.boardTop+8+r*t.cell+e*(t.cell/2)];export const slotOrigin=(t,o)=>[t.trayLeft+1+8+o*(t.slot+4),t.trayTop+1+8];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{TIME_BONUS_PER_SECOND}from"../../services/ScoringService.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{introPlayed,toColor}from"../shared/EngineUtils.js";import{BOARD_COLS,BOARD_ROWS,FLY_TIME,INTRO_SPRING,LAND_SPRING,LAND_SQUASH,LAYER_COUNT,LAYER_STAGGER,LIFT_AT,LIFT_SCALE,MATCH_BURST_TIME,MATCH_CHECK_DELAY,MATCH_COUNT,MATCH_REMOVE_DELAY,POINTS_PER_SET,RIPPLE_TIME,SHADE_TIME,shadeFor,SHIFT_SPRING,SLOT_CAPACITY,slotOrigin,TILE_TYPES,tileOrigin,TILES_PER_TYPE,TIME_LIMIT}from"./TileHomeConstants.js";import{addTileFruit,buildScenery,layerZ,spawnTile,toWorld,trayZ,Z_FLYING}from"./TileHomeScene.js";const WORLD_CAPACITY=900,shuffle=o=>{for(let t=o.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[o[t],o[r]]=[o[r],o[t]]}return o};function generateBoard(){const o=shuffle(TILE_TYPES.flatMap((o,t)=>Array.from({length:TILES_PER_TYPE},()=>t))),t=[];for(let o=0;o<LAYER_COUNT;o++)for(let r=0;r<BOARD_ROWS-o;r++)for(let n=0;n<BOARD_COLS-o;n++)t.push({col:n,row:r,layer:o});return shuffle(t),o.slice(0,t.length).map((o,r)=>({typeId:o,...t[r],blocking:0,covers:[],root:null,shade:null,fruit:null,parts:[]}))}function countBlocking(o){for(const t of o)t.blocking=0,t.covers.length=0;for(const t of o){const r=t.col+.5*t.layer,n=t.row+.5*t.layer;for(const e of o)e.layer<=t.layer||Math.abs(e.col+.5*e.layer-r)<1&&Math.abs(e.row+.5*e.layer-n)<1&&(t.blocking++,e.covers.push(t))}}const introDelay=o=>{const t=(BOARD_COLS-1)/2,r=(BOARD_ROWS-1)/2,n=Math.hypot(t+1,r+1),e=Math.hypot(o.col+.5*o.layer-t,o.row+.5*o.layer-r);return Math.min(e,n)/n*RIPPLE_TIME+o.layer*LAYER_STAGGER};export function createGame(o){const t=new World(900),r=generateBoard();countBlocking(r);const n={world:t,camera:{eye:[0,0,500],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,fruits:{},scenery:[],phase:"ready",get score(){return t.scoreboard.score},won:!1,board:r,slot:[],flying:null,matching:[],intro:!0,introAge:-1,onPhase:o=>{},onScore:o=>{},onTime:o=>{},onPick:()=>{},onMatch:()=>{},onWin:()=>{},onLose:()=>{}};return showFullTime(n),t.scoreboard.handlers={onScore:o=>n.onScore(o),onSecond:o=>n.onTime(o),onTimeUp:()=>"playing"===n.phase&&end(n,!1)},n}const after=(o,t,r)=>o.world.after(t,r);function showFullTime(o){const t=o.world.scoreboard;t.reset(),t.startCountdown(TIME_LIMIT),t.stop()}export function addFruit(o,t,r){if(o.world.isDisposed||o.fruits[t])return;o.fruits[t]=r;const n=o.layout;if(!n)return;const e=[...o.board,...o.slot,...o.flying?[o.flying.tile]:[]];for(const l of e)null!=l.root&&null==l.fruit&&TILE_TYPES[l.typeId].fruit===t&&(l.fruit=addTileFruit(o.world,n,l.root,r,!0),l.parts.push(l.fruit))}export function setLayout(o,t){const r=o.layout;o.layout=t,o.camera.ortho=t.height/2;for(const t of o.scenery)o.world.despawn(t);if(o.scenery=buildScenery(o.world,t,o.theme),r&&r.tile===t.tile&&r.slot===t.slot){const r=o.world.transforms;for(const n of o.board){if(null==n.root)continue;const[o,e,l]=boardPosition(t,n);r.position(n.root,o,e,l)}o.slot.forEach((o,n)=>{if(null==o.root)return;const[e,l,s]=slotPosition(t,n);r.position(o.root,e,l,s)}),r.flush()}else spawnAll(o)}export function setTheme(o,t){o.theme=t;const r=o.layout;if(r&&!o.world.isDisposed){for(const t of o.scenery)o.world.despawn(t);o.scenery=buildScenery(o.world,r,t)}}const boardPosition=(o,t)=>{const[r,n]=tileOrigin(o,t.col,t.row,t.layer);return toWorld(o,r+o.tile/2,n+o.tile/2,layerZ(t.layer))},slotPosition=(o,t,r=trayZ)=>{const[n,e]=slotOrigin(o,t);return toWorld(o,n+o.slot/2,e+o.slot/2,r)},slotScale=o=>o.slot/o.tile;function despawnTile(o,t){null!=t.root&&o.world.despawn(t.root),t.root=null,t.shade=null,t.fruit=null,t.parts=[]}function spawnAll(o){const t=o.layout,r=o.fruits;if(!t)return;o.flying&&land(o);for(const t of[...o.board,...o.slot])despawnTile(o,t);const n=o.intro;n&&(o.introAge=0);for(const e of o.board){const[l,s]=tileOrigin(t,e.col,e.row,e.layer),i=spawnTile(o.world,t,r[TILE_TYPES[e.typeId].fruit],l+t.tile/2,s+t.tile/2,layerZ(e.layer),n?0:1);e.root=i.root,e.shade=i.shade,e.fruit=i.fruit,e.parts=i.parts,o.world.set(i.shade,{color:[0,0,0,shadeFor(e.blocking)]}),n&&o.world.animate(i.root,{scale:1},{spring:INTRO_SPRING,delay:introDelay(e)})}o.slot.forEach((n,e)=>{if(o.matching.includes(n))return;const[l,s]=slotOrigin(t,e),i=spawnTile(o.world,t,r[TILE_TYPES[n.typeId].fruit],l+t.slot/2,s+t.slot/2,trayZ,slotScale(t));n.root=i.root,n.shade=i.shade,n.fruit=i.fruit,n.parts=i.parts})}export function start(o){"ready"===o.phase&&(o.phase="playing",o.world.scoreboard.startCountdown(TIME_LIMIT),o.onPhase("playing"))}export function reset(o){o.world.cancelTimers(),o.flying&&despawnTile(o,o.flying.tile),o.flying=null;for(const t of[...o.board,...o.slot,...o.matching])despawnTile(o,t);o.board=generateBoard(),countBlocking(o.board),o.slot=[],o.matching=[],o.intro=!0,spawnAll(o),showFullTime(o),o.won=!1,o.phase="ready",o.onScore(0),o.onTime(TIME_LIMIT),o.onPhase("ready")}export function dispose(o){o.world.cancelTimers(),o.world.dispose()}function end(o,t){o.world.cancelTimers(),o.world.scoreboard.stop(),o.won=t,o.phase="over",t?o.onWin():o.onLose(),o.onPhase("over")}export function tick(o,t){o.world.isDisposed||(introPlayed(o,t),o.world.update(t))}export function tap(o,t,r){const n=o.layout;if(!n||"playing"!==o.phase||o.flying)return;const e=o.board.findIndex(o=>{if(o.blocking>0)return!1;const[e,l]=tileOrigin(n,o.col,o.row,o.layer);return t>=e&&t<=e+n.tile&&r>=l&&r<=l+n.tile});if(e<0)return;const l=o.board.splice(e,1)[0];for(const t of l.covers)t.blocking--,null!=t.shade&&o.world.animate(t.shade,{color:[0,0,0,shadeFor(t.blocking)]},{duration:SHADE_TIME});const s=o.slot.findIndex(o=>o.typeId===l.typeId),i=s>=0?s+1:o.slot.length;if(o.flying={tile:l,index:i},arrangeSlot(o),null!=l.root){const t=boardPosition(n,l);o.world.set(l.root,{position:[t[0],t[1],Z_FLYING]}),o.world.animate(l.root,{position:slotPosition(n,i,Z_FLYING)},{duration:FLY_TIME}),o.world.animate(l.root,[{scale:LIFT_SCALE,at:LIFT_AT},{scale:slotScale(n)}],{duration:FLY_TIME})}after(o,FLY_TIME,()=>land(o)),o.onPick()}function land(o){const t=o.flying,r=o.layout;if(!t||!r)return;o.flying=null;const n=t.tile,e=o.slot.findIndex(o=>o.typeId===n.typeId),l=e>=0?e+1:o.slot.length;if(o.slot.splice(l,0,n),null!=n.root){const t=slotScale(r);o.world.stopAnimation(n.root),o.world.set(n.root,{position:slotPosition(r,l),scale:t*LAND_SQUASH}),o.world.animate(n.root,{scale:t},{spring:LAND_SPRING})}arrangeSlot(o,n),after(o,MATCH_CHECK_DELAY,()=>checkMatches(o))}function arrangeSlot(o,t){const r=o.layout;if(!r)return;const n=o.flying?.index??-1;o.slot.forEach((e,l)=>{e!==t&&null!=e.root&&o.world.animate(e.root,{position:slotPosition(r,n>=0&&l>=n?l+1:l)},{spring:SHIFT_SPRING})})}function checkMatches(o){if("playing"===o.phase&&!o.matching.length){for(let t=0;t<TILE_TYPES.length;t++){const r=o.slot.filter(o=>o.typeId===t);if(!(r.length<MATCH_COUNT))return o.matching=r.slice(0,MATCH_COUNT),burstMatch(o),o.onMatch(),void after(o,MATCH_REMOVE_DELAY,()=>removeMatch(o))}o.slot.length>=SLOT_CAPACITY&&end(o,!1)}}function burstMatch(o){const t=o.layout;o.matching.forEach((r,n)=>{const e=r.root;if(null==e)return;const l=slotPosition(t,o.slot.indexOf(r)),s=toColor(TILE_TYPES[r.typeId].color);popAndBurst(o.world,e,{scale:slotScale(t),flash:r.parts,delay:n/o.matching.length*.1*MATCH_BURST_TIME,duration:MATCH_BURST_TIME},{position:[l[0],l[1],l[2]+40],size:t.slot,color:s,glowZ:l[2]-2}).then(()=>{o.world.despawn(e)}),r.root=null,r.parts=[]})}function removeMatch(o){if("playing"!==o.phase)return;const t=new Set(o.matching);o.slot=o.slot.filter(o=>!t.has(o)),o.matching=[],o.world.scoreboard.add(POINTS_PER_SET),arrangeSlot(o),0===o.board.length&&0===o.slot.length&&!o.flying&&(o.world.scoreboard.awardTimeBonus(TIME_BONUS_PER_SECOND),end(o,!0))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{extrude,Path}from"@nayan-ui/engine";import{spawnBackdrop}from"../shared/EngineBackdrop.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{cacheGameAsset,createGameMesh as _0x4e9b43}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{CLASSIC_BOARD,CLASSIC_SLOT,CLASSIC_SLOT_BORDER,CLASSIC_TRAY,CLASSIC_TRAY_BORDER,SLOT_CAPACITY,slotOrigin,TILE_FACE,TILE_THICKNESS}from"./TileHomeConstants.js";export const Z_BACKDROP=1;const Z_PANELS=4,Z_LAYER=120,Z_TILE_BASE=20;export const Z_FLYING=420;const FRUIT_LIFT=32,SHADE_LIFT=70;export const layerZ=e=>20+120*e;export const trayZ=20;export const toWorld=(e,t,o,s=0)=>[t-e.width/2,e.height/2-o,s];const meshes=new Map,cached=(e,t)=>{let o=meshes.get(e);return!o&&(o=cacheGameAsset("tile-home/TileHomeScene:"+e,t),meshes.set(e,o)),o};function flatLayer(e,t,o){const s=extrude(e,{depth:0,fillRule:"evenodd"}),r=s.vertices;for(let e=0;e<r.length;e+=11){const[s,a,n]=o(r[e],-r[e+1]);r[e+2]=t,r[e+6]=s,r[e+7]=a,r[e+8]=n}return s}const shadeMesh=e=>cached("shade:"+e,()=>_0x4e9b43(flatLayer((new Path).addRoundedRect(0,0,e,e,8),0,()=>[1,1,1]),{center:!1})),panelMesh=(e,t,o,s=0)=>cached("panel:"+e+":"+t+":"+o+":"+s,()=>{const r=(new Path).addRoundedRect(0,0,e,t,o);return s>0&&r.addRoundedRect(s,s,e-2*s,t-2*s,o-s),_0x4e9b43(flatLayer(r,0,()=>[1,1,1]),{center:!1})});export function buildScenery(e,t,o){const s="classic"===o.mode,r=[spawnBackdrop(e,t.width,t.height,1,o)],a=(o,s,a,n,i,d,l=0,h=4)=>r.push(e.spawn({mesh:panelMesh(a,n,i,l),position:toWorld(t,o,s,h),color:toColor(d),pickable:!1})),n=s?16:8;a(t.boardLeft,t.boardTop,t.boardWidth,t.boardHeight,n,s?CLASSIC_BOARD:o.BOARD.SURFACE),s||a(t.boardLeft,t.boardTop,t.boardWidth,t.boardHeight,n,o.BOARD.BORDER,1,4.2);const i=s?12:8;a(t.trayLeft,t.trayTop,t.trayWidth,t.trayHeight,i,s?CLASSIC_TRAY:o.BOARD.SURFACE),a(t.trayLeft,t.trayTop,t.trayWidth,t.trayHeight,i,s?CLASSIC_TRAY_BORDER:o.BOARD.BORDER,1,4.2);for(let e=0;e<SLOT_CAPACITY;e++){const[r,n]=slotOrigin(t,e);a(r,n,t.slot,t.slot,8,s?CLASSIC_SLOT:o.BOARD.CELL_EMPTY,0,4.4),a(r,n,t.slot,t.slot,8,s?CLASSIC_SLOT_BORDER:o.BOARD.BORDER,1.5,4.6)}return r}export function spawnTile(e,t,o,s,r,a,n){const i=t.tile,d=[-i/2,i/2,0],l=i*TILE_THICKNESS,h=e.spawn({mesh:"none",position:toWorld(t,s,r,a),scale:n,pickable:!1}),p=spawnRaisedBlock(e,{parent:h,position:[0,0,-l/2],size:[i,i,l],color:toColor(TILE_FACE),gloss:!1,shadow:!1}),R=e.spawn({mesh:shadeMesh(i),parent:h,position:[d[0],d[1],70],color:[0,0,0,0],pickable:!1}),A=o?addTileFruit(e,t,h,o,!1):null;return{root:h,shade:R,fruit:A,parts:null==A?[p]:[p,A]}}export function addTileFruit(e,t,o,s,r){const a=t.fruit/Math.max(s.whole.size[0],s.whole.size[1]),n=e.spawn({mesh:s.whole,parent:o,position:[-s.center[0]*a,1-s.center[1]*a,32-s.center[2]*a],scale:r?0:a,color:[1,1,1,1],pickable:!1});return r&&e.animate(n,{scale:a},{duration:.22,easing:"back"}),n}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{c as _0x1e6925}from"react/compiler-runtime";import{memo,useCallback,useEffect,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{haptics}from"@nayan-ui/engine";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{getSceneInputInsets,livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{EngineTouchSurface}from"../shared/EngineTouchSurface.js";import{GameLoading}from"../shared/GameLoading.js";import{GameLoadingTransition}from"../shared/GameLoadingTransition.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{ENEMY_COUNT,GEM_GOAL,getCachedAssets,loadAssets,MAX_HEALTH,MINIMAP_SIZE,NATURE_LIGHT,NIGHT_LIGHT,NIGHT_SKY,SKY}from"./TreasureHuntConstants.js";import{endSwipe,moveSwipe,resetSwipe,startSwipe}from"./TreasureHuntControls.js";import{clearInput,createGame,dispose,punch,reset,start,update}from"./TreasureHuntGame.js";import{drawMiniMap}from"./TreasureHuntScene.js";import{jsx as _0x485619,jsxs as _0x4d179f}from"react/jsx-runtime";const Run=memo(function(e){const{settings:t}=e,[s,n]=useLiveState(null,0),[a,r]=useState(null),{game:o,theme:i,phase:m,status:u,screen:d,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.TREASURE_HUNT,create:()=>createGame(e.assets),start:start,reset:reset,dispose:dispose,tick:update,hud:(e,t)=>drawMiniMap(t,e.state),resultsDelay:e=>"win"===e?1500:1200,reportData:e=>({gems:e.state.gems,defeated:e.state.defeated,seconds:Math.floor(e.state.time)}),sounds:GAME_SOUNDS.TREASURE_HUNT,onStart:e=>e(GAME_SOUNDS.TREASURE_HUNT.START),onOver:(e,t)=>{"win"!==t&&e(GAME_SOUNDS.TREASURE_HUNT.LOSE)},wire:e=>{e.onChange=()=>n({...snapshot(e.state),preparing:e.preparing}),e.onChange()}});useEffect(()=>{haptics.enabled=t.enableHaptics},[t.enableHaptics]),useEffect(()=>()=>{haptics.enabled=!0},[]);const l=useCallback(e=>{e||(clearInput(o),o.footsteps.stop(),o.movementReference.active=!1)},[o]),S=useCallback(()=>punch(o),[o]),E=useCallback(e=>r(e.message),[]),f=useMemo(()=>getSceneInputInsets(t.offset),[t.offset]),g="dark"===i.mode,T=o.preparing,h=T&&!!o.nextRun,_="playing"===m&&!T;return _0x4d179f(EngineGameScreen,{...d,onStart:()=>{o.preparing||d.onStart()},hudCapacity:MINIMAP_SIZE*MINIMAP_SIZE+1024,light:g?NIGHT_LIGHT:NATURE_LIGHT,background:g?NIGHT_SKY:SKY,fog:.006,errorMessage:a??void 0,onAudioChange:l,onError:E,columns:[scoreColumn(s?.score??0),livesColumn(s?.health??MAX_HEALTH,MAX_HEALTH,"HEALTH"),textColumn("GEMS",(s?.gems??0)+"/"+GEM_GOAL),textColumn("ROBOTS",(s?.defeated??0)+"/"+ENEMY_COUNT)],subtext:"Swipe to explore \xb7 Tap to punch",gameOver:p({title:"win"===u?"FOREST EXPLORED!":"EXPEDITION OVER",message:(s?.gems??0)+" diamonds found and "+(s?.defeated??0)+" robots defeated.",scoreLabel:"Adventure score",score:s?.score??0,buttonText:"Explore Again!"}),children:[_0x485619(SwipeNavigation,{input:o.swipe,enabled:_&&!t.isVisible&&!a,onTap:S,insets:f}),_0x485619(View,{pointerEvents:h?"auto":"none",style:StyleSheet.absoluteFill,children:_0x485619(GameLoadingTransition,{ready:!h,loader:_0x485619(GameLoading,{gameId:GAME_IDS.TREASURE_HUNT,theme:t.theme,offset:t.offset,visible:!t.isVisible}),children:null})})]})});export const TreasureHunt=engineGame(GAME_IDS.TREASURE_HUNT,e=>{const[t,s]=useState(getCachedAssets),[n,a]=useState(null);return useEffect(()=>{if(t)return;let e=!0;return loadAssets().then(t=>{e&&s(t)}).catch(t=>{e&&a(t instanceof Error?t.message:String(t))}),()=>{e=!1}},[t]),_0x485619(GameLoadingTransition,{ready:!!t,loader:_0x485619(GameLoading,{gameId:GAME_IDS.TREASURE_HUNT,theme:e.settings.theme,offset:e.settings.offset,error:!!n,message:n??void 0}),children:t&&_0x485619(Run,{...e,assets:t})})});function snapshot(e){return{health:e.health,gems:e.gems,defeated:e.defeated,score:e.score}}const SwipeNavigation=memo(function(e){const t=_0x1e6925(17),{input:s,enabled:n,onTap:a,insets:r}=e;let o;t[0]!==s?(o=e=>{startSwipe(s,e,e.timeStamp)},t[0]=s,t[1]=o):o=t[1];const i=o;let m;t[2]!==s?(m=e=>{moveSwipe(s,e)},t[2]=s,t[3]=m):m=t[3];const u=m;let d;t[4]!==n||t[5]!==s||t[6]!==a?(d=e=>{endSwipe(s,e,e.timeStamp)&&n&&a()},t[4]=n,t[5]=s,t[6]=a,t[7]=d):d=t[7];const p=d;let l;t[8]!==s?(l=()=>resetSwipe(s),t[8]=s,t[9]=l):l=t[9];const S=l;let E;return t[10]!==n||t[11]!==r||t[12]!==S||t[13]!==p||t[14]!==u||t[15]!==i?(E=_0x485619(EngineTouchSurface,{enabled:n,insets:r,onStart:i,onMove:u,onEnd:p,onCancel:S}),t[10]=n,t[11]=r,t[12]=S,t[13]=p,t[14]=u,t[15]=i,t[16]=E):E=t[16],E});
|