@nayan-ui/games 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -191
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/assets/models/explorer/explorer.glb +0 -0
- package/lib/module/assets/models/explorer/params.json +51 -0
- package/lib/module/assets/models/explorer/source.json +222 -0
- package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/lib/module/assets/models/play-with-tua/sources.json +141 -0
- package/lib/module/assets/sfx/balloon_pop.wav +0 -0
- package/lib/module/assets/sfx/blocked.wav +0 -0
- package/lib/module/assets/sfx/boing.wav +0 -0
- package/lib/module/assets/sfx/bonus.wav +0 -0
- package/lib/module/assets/sfx/boom.wav +0 -0
- package/lib/module/assets/sfx/bump.wav +0 -0
- package/lib/module/assets/sfx/cannon.wav +0 -0
- package/lib/module/assets/sfx/capture.wav +0 -0
- package/lib/module/assets/sfx/card_flip.wav +0 -0
- package/lib/module/assets/sfx/card_place.wav +0 -0
- package/lib/module/assets/sfx/catch.wav +0 -0
- package/lib/module/assets/sfx/chime.wav +0 -0
- package/lib/module/assets/sfx/chomp.wav +0 -0
- package/lib/module/assets/sfx/chomp_alt.wav +0 -0
- package/lib/module/assets/sfx/clack.wav +0 -0
- package/lib/module/assets/sfx/clang.wav +0 -0
- package/lib/module/assets/sfx/clash.wav +0 -0
- package/lib/module/assets/sfx/click.wav +0 -0
- package/lib/module/assets/sfx/coin.wav +0 -0
- package/lib/module/assets/sfx/combo.wav +0 -0
- package/lib/module/assets/sfx/crash.wav +0 -0
- package/lib/module/assets/sfx/crunch.wav +0 -0
- package/lib/module/assets/sfx/dance.wav +0 -0
- package/lib/module/assets/sfx/deselect.wav +0 -0
- package/lib/module/assets/sfx/dice_roll.wav +0 -0
- package/lib/module/assets/sfx/die.wav +0 -0
- package/lib/module/assets/sfx/draw.wav +0 -0
- package/lib/module/assets/sfx/drop.wav +0 -0
- package/lib/module/assets/sfx/eat.wav +0 -0
- package/lib/module/assets/sfx/engine.wav +0 -0
- package/lib/module/assets/sfx/error.wav +0 -0
- package/lib/module/assets/sfx/flag.wav +0 -0
- package/lib/module/assets/sfx/flap.wav +0 -0
- package/lib/module/assets/sfx/flip_disc.wav +0 -0
- package/lib/module/assets/sfx/footstep_run.wav +0 -0
- package/lib/module/assets/sfx/footstep_walk.wav +0 -0
- package/lib/module/assets/sfx/game_over.wav +0 -0
- package/lib/module/assets/sfx/gate.wav +0 -0
- package/lib/module/assets/sfx/hit.wav +0 -0
- package/lib/module/assets/sfx/hop.wav +0 -0
- package/lib/module/assets/sfx/hurt.wav +0 -0
- package/lib/module/assets/sfx/invalid.wav +0 -0
- package/lib/module/assets/sfx/jump.wav +0 -0
- package/lib/module/assets/sfx/ladder.wav +0 -0
- package/lib/module/assets/sfx/land.wav +0 -0
- package/lib/module/assets/sfx/laugh.wav +0 -0
- package/lib/module/assets/sfx/lose.wav +0 -0
- package/lib/module/assets/sfx/merge.wav +0 -0
- package/lib/module/assets/sfx/miss.wav +0 -0
- package/lib/module/assets/sfx/nitro.wav +0 -0
- package/lib/module/assets/sfx/pew.wav +0 -0
- package/lib/module/assets/sfx/place.wav +0 -0
- package/lib/module/assets/sfx/pling.wav +0 -0
- package/lib/module/assets/sfx/point.wav +0 -0
- package/lib/module/assets/sfx/pop.wav +0 -0
- package/lib/module/assets/sfx/pop_soft.wav +0 -0
- package/lib/module/assets/sfx/power_up.wav +0 -0
- package/lib/module/assets/sfx/reveal.wav +0 -0
- package/lib/module/assets/sfx/robot.wav +0 -0
- package/lib/module/assets/sfx/rotate.wav +0 -0
- package/lib/module/assets/sfx/run_steps.wav +0 -0
- package/lib/module/assets/sfx/select.wav +0 -0
- package/lib/module/assets/sfx/shuffle.wav +0 -0
- package/lib/module/assets/sfx/six.wav +0 -0
- package/lib/module/assets/sfx/slice.wav +0 -0
- package/lib/module/assets/sfx/slide.wav +0 -0
- package/lib/module/assets/sfx/snake.wav +0 -0
- package/lib/module/assets/sfx/snap.wav +0 -0
- package/lib/module/assets/sfx/splash.wav +0 -0
- package/lib/module/assets/sfx/star.wav +0 -0
- package/lib/module/assets/sfx/start.wav +0 -0
- package/lib/module/assets/sfx/swoosh.wav +0 -0
- package/lib/module/assets/sfx/tap.wav +0 -0
- package/lib/module/assets/sfx/thud.wav +0 -0
- package/lib/module/assets/sfx/thunk.wav +0 -0
- package/lib/module/assets/sfx/tick.wav +0 -0
- package/lib/module/assets/sfx/time_up.wav +0 -0
- package/lib/module/assets/sfx/tock.wav +0 -0
- package/lib/module/assets/sfx/walk_steps.wav +0 -0
- package/lib/module/assets/sfx/warning.wav +0 -0
- package/lib/module/assets/sfx/whack.wav +0 -0
- package/lib/module/assets/sfx/whoosh.wav +0 -0
- package/lib/module/assets/sfx/win.wav +0 -0
- package/lib/module/assets/sfx/zap.wav +0 -0
- package/lib/module/assets/textures/ad_bolt.png +0 -0
- package/lib/module/assets/textures/ad_bubbles.png +0 -0
- package/lib/module/assets/textures/ad_chevrons.png +0 -0
- package/lib/module/assets/textures/asphalt.png +0 -0
- package/lib/module/assets/textures/bark.jpg +0 -0
- package/lib/module/assets/textures/explorer-atlas.png +0 -0
- package/lib/module/assets/textures/facade.png +0 -0
- package/lib/module/assets/textures/grass.png +0 -0
- package/lib/module/assets/textures/leaves.png +0 -0
- package/lib/module/assets/textures/limestone.jpg +0 -0
- package/lib/module/assets/textures/meadow.jpg +0 -0
- package/lib/module/assets/textures/nature-sources.json +87 -0
- package/lib/module/assets/textures/pine.png +0 -0
- package/lib/module/assets/textures/river.jpg +0 -0
- package/lib/module/assets/textures/soft_glow.png +0 -0
- package/lib/module/games/arrows/Arrows.js +1 -1
- package/lib/module/games/arrows/ArrowsConstants.js +1 -1
- package/lib/module/games/arrows/ArrowsGame.js +1 -0
- package/lib/module/games/arrows/ArrowsScene.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
- package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -1
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
- package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
- package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
- package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
- package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
- package/lib/module/games/bluk/Bluk.js +1 -1
- package/lib/module/games/bluk/BlukConstants.js +1 -1
- package/lib/module/games/bluk/BlukGame.js +1 -0
- package/lib/module/games/bluk/BlukRules.js +1 -0
- package/lib/module/games/bluk/BlukScene.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
- package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
- package/lib/module/games/car-racing/CarMeshes.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js +1 -1
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
- package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
- package/lib/module/games/car-racing/CarRacingGame.js +1 -0
- package/lib/module/games/car-racing/CarRacingScene.js +1 -0
- package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
- package/lib/module/games/checkers/Checkers.js +1 -1
- package/lib/module/games/checkers/CheckersAI.js +1 -0
- package/lib/module/games/checkers/CheckersConstants.js +1 -1
- package/lib/module/games/checkers/CheckersGame.js +1 -0
- package/lib/module/games/checkers/CheckersRules.js +1 -0
- package/lib/module/games/checkers/CheckersScene.js +1 -0
- package/lib/module/games/color-switch/ColorSwitch.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
- package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
- package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
- package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
- package/lib/module/games/game-2048/Game2048.js +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -1
- package/lib/module/games/game-2048/Game2048Game.js +1 -0
- package/lib/module/games/game-2048/Game2048Rules.js +1 -0
- package/lib/module/games/game-2048/Game2048Scene.js +1 -0
- package/lib/module/games/knife-hit/KnifeHit.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
- package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
- package/lib/module/games/ludo-king/LudoKing.js +1 -1
- package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
- package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
- package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
- package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
- package/lib/module/games/memory-match/MemoryMatch.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
- package/lib/module/games/mob-control/MobControl.js +1 -1
- package/lib/module/games/mob-control/MobControlConstants.js +1 -1
- package/lib/module/games/mob-control/MobControlGame.js +1 -0
- package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
- package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
- package/lib/module/games/mob-control/MobControlRules.js +1 -0
- package/lib/module/games/mob-control/MobControlScene.js +1 -0
- package/lib/module/games/number-search/NumberSearch.js +1 -1
- package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
- package/lib/module/games/pac-man/PacMan.js +1 -1
- package/lib/module/games/pac-man/PacManConstants.js +1 -1
- package/lib/module/games/pac-man/PacManGame.js +1 -0
- package/lib/module/games/pac-man/PacManRules.js +1 -0
- package/lib/module/games/pac-man/PacManScene.js +1 -0
- package/lib/module/games/paper-io/PaperIo.js +1 -1
- package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
- package/lib/module/games/paper-io/PaperIoGame.js +1 -0
- package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
- package/lib/module/games/paper-io/PaperIoRules.js +1 -0
- package/lib/module/games/paper-io/PaperIoScene.js +1 -0
- package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
- package/lib/module/games/penguin-run/PenguinModel.js +1 -0
- package/lib/module/games/penguin-run/PenguinRun.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
- package/lib/module/games/reversi/Reversi.js +1 -1
- package/lib/module/games/reversi/ReversiConstants.js +1 -1
- package/lib/module/games/reversi/ReversiGame.js +1 -0
- package/lib/module/games/reversi/ReversiRules.js +1 -0
- package/lib/module/games/reversi/ReversiScene.js +1 -0
- package/lib/module/games/search-grid/SearchGrid.js +1 -0
- package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
- package/lib/module/games/search-grid/SearchGridGame.js +1 -0
- package/lib/module/games/search-grid/SearchGridScene.js +1 -0
- package/lib/module/games/shared/BackdropCard.js +1 -0
- package/lib/module/games/shared/EngineBackdrop.js +1 -0
- package/lib/module/games/shared/EngineBlasts.js +1 -0
- package/lib/module/games/shared/EngineBlocks.js +1 -0
- package/lib/module/games/shared/EngineControlText.js +1 -0
- package/lib/module/games/shared/EngineDice.js +1 -0
- package/lib/module/games/shared/EngineFootprint.js +1 -0
- package/lib/module/games/shared/EngineFruits.js +1 -0
- package/lib/module/games/shared/EngineGameLoader.js +1 -0
- package/lib/module/games/shared/EngineGameScreen.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
- package/lib/module/games/shared/EngineGlyphs.js +1 -0
- package/lib/module/games/shared/EngineHud.js +1 -0
- package/lib/module/games/shared/EngineLoading.js +1 -0
- package/lib/module/games/shared/EngineMeadow.js +1 -0
- package/lib/module/games/shared/EngineMeshCache.js +1 -0
- package/lib/module/games/shared/EngineMeshes.js +1 -0
- package/lib/module/games/shared/EngineRacingChase.js +1 -0
- package/lib/module/games/shared/EngineRacingHandling.js +1 -0
- package/lib/module/games/shared/EngineReadyContext.js +1 -0
- package/lib/module/games/shared/EngineTilt.js +1 -0
- package/lib/module/games/shared/EngineTouchSurface.js +1 -0
- package/lib/module/games/shared/EngineUtils.js +1 -0
- package/lib/module/games/shared/GameActivity.js +1 -0
- package/lib/module/games/shared/GameLoading.js +1 -0
- package/lib/module/games/shared/GameLoadingTransition.js +1 -0
- package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
- package/lib/module/games/shared/useEngineGame.js +1 -0
- package/lib/module/games/shared/useGameResource.js +1 -0
- package/lib/module/games/shared/useLiveState.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
- package/lib/module/games/snake-3d/Snake3D.js +1 -1
- package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
- package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
- package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
- package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
- package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
- package/lib/module/games/stack-tower/StackTower.js +1 -1
- package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
- package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
- package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
- package/lib/module/games/sudoku/Sudoku.js +1 -1
- package/lib/module/games/sudoku/SudokuConstants.js +1 -1
- package/lib/module/games/sudoku/SudokuGame.js +1 -0
- package/lib/module/games/sudoku/SudokuRules.js +1 -0
- package/lib/module/games/sudoku/SudokuScene.js +1 -0
- package/lib/module/games/tangram/Tangram.js +1 -1
- package/lib/module/games/tangram/TangramConstants.js +1 -1
- package/lib/module/games/tangram/TangramGame.js +1 -0
- package/lib/module/games/tangram/TangramRules.js +1 -0
- package/lib/module/games/tangram/TangramScene.js +1 -0
- package/lib/module/games/tank-1990/Tank1990.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
- package/lib/module/games/tile-home/TileHome.js +1 -1
- package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
- package/lib/module/games/tile-home/TileHomeGame.js +1 -0
- package/lib/module/games/tile-home/TileHomeScene.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
- package/lib/module/games/word-search/WordSearch.js +1 -1
- package/lib/module/games/word-search/WordSearchWords.js +1 -0
- package/lib/module/helpers/GamePatternData.js +1 -0
- package/lib/module/helpers/GameSettingsModal.js +1 -1
- package/lib/module/helpers/GameTheme.js +1 -0
- package/lib/module/helpers/IconPaths.js +1 -0
- package/lib/module/helpers/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/GameAssetLoader.js +1 -0
- package/lib/module/services/GameAssets.js +1 -0
- package/lib/module/services/GameLoaders.js +1 -0
- package/lib/module/services/GamesConstants.js +1 -1
- package/lib/module/services/GamesMetadata.js +1 -1
- package/lib/module/services/GamesService.js +1 -1
- package/lib/module/services/HapticsService.js +1 -1
- package/lib/module/services/ScoringService.js +1 -1
- package/lib/module/services/SfxSources.js +1 -0
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/ThemeService.js +1 -0
- package/lib/module/services/UtilsService.js +1 -1
- package/lib/module/services/index.js +1 -1
- package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
- package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
- package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
- package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
- package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
- package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
- package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
- package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
- package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
- package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
- package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
- package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
- package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
- package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
- package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
- package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
- package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
- package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
- package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
- package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
- package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
- package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
- package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
- package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
- package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
- package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
- package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
- package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
- package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
- package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
- package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
- package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
- package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
- package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
- package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
- package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
- package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
- package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
- package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
- package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
- package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
- package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
- package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
- package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
- package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
- package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
- package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
- package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
- package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
- package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
- package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
- package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
- package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
- package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
- package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
- package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
- package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
- package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
- package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
- package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
- package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
- package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
- package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
- package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
- package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
- package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
- package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
- package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
- package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
- package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
- package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
- package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
- package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
- package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
- package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
- package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
- package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
- package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
- package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
- package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
- package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
- package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
- package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
- package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
- package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
- package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
- package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
- package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
- package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
- package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
- package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
- package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
- package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
- package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
- package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
- package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
- package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
- package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
- package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
- package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
- package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
- package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
- package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
- package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
- package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
- package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
- package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
- package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
- package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
- package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
- package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
- package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
- package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
- package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
- package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
- package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
- package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
- package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
- package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
- package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
- package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
- package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
- package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
- package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
- package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
- package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
- package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
- package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
- package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
- package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
- package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
- package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
- package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
- package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
- package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
- package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
- package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
- package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
- package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
- package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
- package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
- package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
- package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
- package/lib/typescript/src/helpers/index.d.ts +1 -19
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
- package/lib/typescript/src/services/GameAssets.d.ts +11 -0
- package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
- package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
- package/lib/typescript/src/services/HapticsService.d.ts +1 -1
- package/lib/typescript/src/services/SfxSources.d.ts +79 -0
- package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
- package/lib/typescript/src/services/ThemeService.d.ts +117 -0
- package/lib/typescript/src/services/UtilsService.d.ts +20 -2
- package/lib/typescript/src/services/index.d.ts +3 -0
- package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
- package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
- package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
- package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
- package/lib/web/assets/0376bda32be3-robot.wav +0 -0
- package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
- package/lib/web/assets/0b21278bffba-boing.wav +0 -0
- package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
- package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
- package/lib/web/assets/177f00502e08-bonus.wav +0 -0
- package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
- package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
- package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
- package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
- package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
- package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
- package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
- package/lib/web/assets/2699065037ad-select.wav +0 -0
- package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
- package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
- package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
- package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
- package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
- package/lib/web/assets/336d63b739b5-combo.wav +0 -0
- package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
- package/lib/web/assets/3a816e20212f-capture.wav +0 -0
- package/lib/web/assets/40240217810a-nitro.wav +0 -0
- package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
- package/lib/web/assets/501994226995-coin.wav +0 -0
- package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
- package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
- package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
- package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
- package/lib/web/assets/6da3b101926d-merge.wav +0 -0
- package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
- package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
- package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
- package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
- package/lib/web/assets/7506e3efe264-catch.wav +0 -0
- package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
- package/lib/web/assets/793abe620201-card_place.wav +0 -0
- package/lib/web/assets/7da09c57f52d-facade.png +0 -0
- package/lib/web/assets/7e1a902176f6-pine.png +0 -0
- package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
- package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
- package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
- package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
- package/lib/web/assets/854b31683cb2-draw.wav +0 -0
- package/lib/web/assets/8616150393b7-error.wav +0 -0
- package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
- package/lib/web/assets/88755845922c-hop.wav +0 -0
- package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
- package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
- package/lib/web/assets/9210a24472d1-place.wav +0 -0
- package/lib/web/assets/930d833ebf89-splash.wav +0 -0
- package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
- package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
- package/lib/web/assets/9ab04403898b-clang.wav +0 -0
- package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
- package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
- package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
- package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
- package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
- package/lib/web/assets/a76940a48c68-hit.wav +0 -0
- package/lib/web/assets/a98ddb724460-leaves.png +0 -0
- package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
- package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
- package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
- package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
- package/lib/web/assets/ab37cd128509-click.wav +0 -0
- package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
- package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
- package/lib/web/assets/b3894545cf71-slice.wav +0 -0
- package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
- package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
- package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
- package/lib/web/assets/baff6feda846-lose.wav +0 -0
- package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
- package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
- package/lib/web/assets/c3a9edfad195-die.wav +0 -0
- package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
- package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
- package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
- package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
- package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
- package/lib/web/assets/d15591767778-tap.wav +0 -0
- package/lib/web/assets/d1781a52234f-slide.wav +0 -0
- package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
- package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
- package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
- package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
- package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
- package/lib/web/assets/e454e56df89a-clack.wav +0 -0
- package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
- package/lib/web/assets/ed6496b891fc-land.wav +0 -0
- package/lib/web/assets/f21920200a81-thunk.wav +0 -0
- package/lib/web/assets/f753b43be89d-whack.wav +0 -0
- package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
- package/lib/web/assets/fbe299716916-grass.png +0 -0
- package/lib/web/chunk-52ez2s9z.js +15 -0
- package/lib/web/chunk-8675t224.js +1 -0
- package/lib/web/index.js +2 -0
- package/lib/web/package.json +1 -0
- package/lib/web/services.js +2 -0
- package/package.json +94 -73
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/models/explorer/explorer.glb +0 -0
- package/src/assets/models/explorer/params.json +51 -0
- package/src/assets/models/explorer/source.json +222 -0
- package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/src/assets/models/play-with-tua/sources.json +141 -0
- package/src/assets/sfx/balloon_pop.wav +0 -0
- package/src/assets/sfx/blocked.wav +0 -0
- package/src/assets/sfx/boing.wav +0 -0
- package/src/assets/sfx/bonus.wav +0 -0
- package/src/assets/sfx/boom.wav +0 -0
- package/src/assets/sfx/bump.wav +0 -0
- package/src/assets/sfx/cannon.wav +0 -0
- package/src/assets/sfx/capture.wav +0 -0
- package/src/assets/sfx/card_flip.wav +0 -0
- package/src/assets/sfx/card_place.wav +0 -0
- package/src/assets/sfx/catch.wav +0 -0
- package/src/assets/sfx/chime.wav +0 -0
- package/src/assets/sfx/chomp.wav +0 -0
- package/src/assets/sfx/chomp_alt.wav +0 -0
- package/src/assets/sfx/clack.wav +0 -0
- package/src/assets/sfx/clang.wav +0 -0
- package/src/assets/sfx/clash.wav +0 -0
- package/src/assets/sfx/click.wav +0 -0
- package/src/assets/sfx/coin.wav +0 -0
- package/src/assets/sfx/combo.wav +0 -0
- package/src/assets/sfx/crash.wav +0 -0
- package/src/assets/sfx/crunch.wav +0 -0
- package/src/assets/sfx/dance.wav +0 -0
- package/src/assets/sfx/deselect.wav +0 -0
- package/src/assets/sfx/dice_roll.wav +0 -0
- package/src/assets/sfx/die.wav +0 -0
- package/src/assets/sfx/draw.wav +0 -0
- package/src/assets/sfx/drop.wav +0 -0
- package/src/assets/sfx/eat.wav +0 -0
- package/src/assets/sfx/engine.wav +0 -0
- package/src/assets/sfx/error.wav +0 -0
- package/src/assets/sfx/flag.wav +0 -0
- package/src/assets/sfx/flap.wav +0 -0
- package/src/assets/sfx/flip_disc.wav +0 -0
- package/src/assets/sfx/footstep_run.wav +0 -0
- package/src/assets/sfx/footstep_walk.wav +0 -0
- package/src/assets/sfx/game_over.wav +0 -0
- package/src/assets/sfx/gate.wav +0 -0
- package/src/assets/sfx/hit.wav +0 -0
- package/src/assets/sfx/hop.wav +0 -0
- package/src/assets/sfx/hurt.wav +0 -0
- package/src/assets/sfx/invalid.wav +0 -0
- package/src/assets/sfx/jump.wav +0 -0
- package/src/assets/sfx/ladder.wav +0 -0
- package/src/assets/sfx/land.wav +0 -0
- package/src/assets/sfx/laugh.wav +0 -0
- package/src/assets/sfx/lose.wav +0 -0
- package/src/assets/sfx/merge.wav +0 -0
- package/src/assets/sfx/miss.wav +0 -0
- package/src/assets/sfx/nitro.wav +0 -0
- package/src/assets/sfx/pew.wav +0 -0
- package/src/assets/sfx/place.wav +0 -0
- package/src/assets/sfx/pling.wav +0 -0
- package/src/assets/sfx/point.wav +0 -0
- package/src/assets/sfx/pop.wav +0 -0
- package/src/assets/sfx/pop_soft.wav +0 -0
- package/src/assets/sfx/power_up.wav +0 -0
- package/src/assets/sfx/reveal.wav +0 -0
- package/src/assets/sfx/robot.wav +0 -0
- package/src/assets/sfx/rotate.wav +0 -0
- package/src/assets/sfx/run_steps.wav +0 -0
- package/src/assets/sfx/select.wav +0 -0
- package/src/assets/sfx/shuffle.wav +0 -0
- package/src/assets/sfx/six.wav +0 -0
- package/src/assets/sfx/slice.wav +0 -0
- package/src/assets/sfx/slide.wav +0 -0
- package/src/assets/sfx/snake.wav +0 -0
- package/src/assets/sfx/snap.wav +0 -0
- package/src/assets/sfx/splash.wav +0 -0
- package/src/assets/sfx/star.wav +0 -0
- package/src/assets/sfx/start.wav +0 -0
- package/src/assets/sfx/swoosh.wav +0 -0
- package/src/assets/sfx/tap.wav +0 -0
- package/src/assets/sfx/thud.wav +0 -0
- package/src/assets/sfx/thunk.wav +0 -0
- package/src/assets/sfx/tick.wav +0 -0
- package/src/assets/sfx/time_up.wav +0 -0
- package/src/assets/sfx/tock.wav +0 -0
- package/src/assets/sfx/walk_steps.wav +0 -0
- package/src/assets/sfx/warning.wav +0 -0
- package/src/assets/sfx/whack.wav +0 -0
- package/src/assets/sfx/whoosh.wav +0 -0
- package/src/assets/sfx/win.wav +0 -0
- package/src/assets/sfx/zap.wav +0 -0
- package/src/assets/textures/ad_bolt.png +0 -0
- package/src/assets/textures/ad_bubbles.png +0 -0
- package/src/assets/textures/ad_chevrons.png +0 -0
- package/src/assets/textures/asphalt.png +0 -0
- package/src/assets/textures/bark.jpg +0 -0
- package/src/assets/textures/explorer-atlas.png +0 -0
- package/src/assets/textures/facade.png +0 -0
- package/src/assets/textures/grass.png +0 -0
- package/src/assets/textures/leaves.png +0 -0
- package/src/assets/textures/limestone.jpg +0 -0
- package/src/assets/textures/meadow.jpg +0 -0
- package/src/assets/textures/nature-sources.json +87 -0
- package/src/assets/textures/pine.png +0 -0
- package/src/assets/textures/river.jpg +0 -0
- package/src/assets/textures/soft_glow.png +0 -0
- package/src/games/arrows/Arrows.tsx +69 -0
- package/src/games/arrows/ArrowsConstants.ts +107 -0
- package/src/games/arrows/ArrowsGame.ts +735 -0
- package/src/games/arrows/ArrowsScene.ts +395 -0
- package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
- package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
- package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
- package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
- package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
- package/src/games/bike-racing/BikeMeshes.ts +273 -0
- package/src/games/bike-racing/BikeRacing.tsx +211 -0
- package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
- package/src/games/bike-racing/BikeRacingGame.ts +557 -0
- package/src/games/bike-racing/BikeRacingScene.ts +119 -0
- package/src/games/block-blast/BlockBlast.tsx +73 -0
- package/src/games/block-blast/BlockBlastConstants.ts +179 -0
- package/src/games/block-blast/BlockBlastGame.ts +471 -0
- package/src/games/block-blast/BlockBlastScene.ts +156 -0
- package/src/games/block-breaker/BlockBreaker.tsx +79 -0
- package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
- package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
- package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
- package/src/games/bluk/Bluk.tsx +82 -0
- package/src/games/bluk/BlukConstants.ts +121 -0
- package/src/games/bluk/BlukGame.ts +323 -0
- package/src/games/bluk/BlukRules.ts +154 -0
- package/src/games/bluk/BlukScene.ts +514 -0
- package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
- package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
- package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
- package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
- package/src/games/candy-crush/CandyCrush.tsx +77 -0
- package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
- package/src/games/candy-crush/CandyCrushGame.ts +477 -0
- package/src/games/candy-crush/CandyCrushScene.ts +209 -0
- package/src/games/car-racing/CarMeshes.ts +440 -0
- package/src/games/car-racing/CarRacing.tsx +211 -0
- package/src/games/car-racing/CarRacingConstants.ts +167 -0
- package/src/games/car-racing/CarRacingFacade.ts +40 -0
- package/src/games/car-racing/CarRacingGame.ts +539 -0
- package/src/games/car-racing/CarRacingScene.ts +1026 -0
- package/src/games/car-racing/CarRacingScenery.ts +265 -0
- package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
- package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
- package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
- package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
- package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
- package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
- package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
- package/src/games/checkers/Checkers.tsx +83 -0
- package/src/games/checkers/CheckersAI.ts +255 -0
- package/src/games/checkers/CheckersConstants.ts +68 -0
- package/src/games/checkers/CheckersGame.ts +322 -0
- package/src/games/checkers/CheckersRules.ts +167 -0
- package/src/games/checkers/CheckersScene.ts +308 -0
- package/src/games/color-switch/ColorSwitch.tsx +75 -0
- package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
- package/src/games/color-switch/ColorSwitchGame.ts +329 -0
- package/src/games/color-switch/ColorSwitchScene.ts +220 -0
- package/src/games/colors-sort/ColorsSort.tsx +82 -0
- package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
- package/src/games/colors-sort/ColorsSortGame.ts +246 -0
- package/src/games/colors-sort/ColorsSortScene.ts +315 -0
- package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
- package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
- package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
- package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
- package/src/games/crossy-road/CrossyRoad.tsx +74 -0
- package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
- package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
- package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
- package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
- package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
- package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
- package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
- package/src/games/dino-jump/DinoJump.tsx +77 -0
- package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
- package/src/games/dino-jump/DinoJumpGame.ts +344 -0
- package/src/games/dino-jump/DinoJumpScene.ts +686 -0
- package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
- package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
- package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
- package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
- package/src/games/falling-sticks/FallingSticks.tsx +72 -0
- package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
- package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
- package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
- package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
- package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
- package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
- package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
- package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
- package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
- package/src/games/flappy-bird/FlappyBird.tsx +73 -0
- package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
- package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
- package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
- package/src/games/fruit-merger/FruitMerger.tsx +73 -0
- package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
- package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
- package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
- package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
- package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
- package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
- package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
- package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
- package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
- package/src/games/game-2048/Game2048.tsx +84 -0
- package/src/games/game-2048/Game2048Constants.ts +68 -0
- package/src/games/game-2048/Game2048Game.ts +181 -0
- package/src/games/game-2048/Game2048Rules.ts +101 -0
- package/src/games/game-2048/Game2048Scene.ts +206 -0
- package/src/games/knife-hit/KnifeHit.tsx +78 -0
- package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
- package/src/games/knife-hit/KnifeHitGame.ts +264 -0
- package/src/games/knife-hit/KnifeHitScene.ts +360 -0
- package/src/games/ludo-king/LudoKing.tsx +86 -0
- package/src/games/ludo-king/LudoKingConstants.ts +212 -0
- package/src/games/ludo-king/LudoKingGame.ts +326 -0
- package/src/games/ludo-king/LudoKingRules.ts +143 -0
- package/src/games/ludo-king/LudoKingScene.ts +397 -0
- package/src/games/maze-runner/MazeRunner.tsx +88 -0
- package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
- package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
- package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
- package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
- package/src/games/memory-match/MemoryMatch.tsx +77 -0
- package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
- package/src/games/memory-match/MemoryMatchGame.ts +222 -0
- package/src/games/memory-match/MemoryMatchRules.ts +38 -0
- package/src/games/memory-match/MemoryMatchScene.ts +268 -0
- package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
- package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
- package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
- package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
- package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
- package/src/games/mob-control/MobControl.tsx +73 -0
- package/src/games/mob-control/MobControlConstants.ts +106 -0
- package/src/games/mob-control/MobControlGame.ts +176 -0
- package/src/games/mob-control/MobControlMeshes.ts +85 -0
- package/src/games/mob-control/MobControlRenderer.ts +108 -0
- package/src/games/mob-control/MobControlRules.ts +522 -0
- package/src/games/mob-control/MobControlScene.ts +399 -0
- package/src/games/number-search/NumberSearch.tsx +18 -0
- package/src/games/number-search/NumberSearchNumbers.ts +623 -0
- package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
- package/src/games/pac-man/PacMan.tsx +86 -0
- package/src/games/pac-man/PacManConstants.ts +169 -0
- package/src/games/pac-man/PacManGame.ts +406 -0
- package/src/games/pac-man/PacManRules.ts +255 -0
- package/src/games/pac-man/PacManScene.ts +387 -0
- package/src/games/paper-io/PaperIo.tsx +91 -0
- package/src/games/paper-io/PaperIoConstants.ts +86 -0
- package/src/games/paper-io/PaperIoGame.ts +193 -0
- package/src/games/paper-io/PaperIoMeshes.ts +233 -0
- package/src/games/paper-io/PaperIoRules.ts +315 -0
- package/src/games/paper-io/PaperIoScene.ts +310 -0
- package/src/games/penguin-run/PenguinMeshes.ts +269 -0
- package/src/games/penguin-run/PenguinModel.ts +712 -0
- package/src/games/penguin-run/PenguinRun.tsx +77 -0
- package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
- package/src/games/penguin-run/PenguinRunGame.ts +406 -0
- package/src/games/penguin-run/PenguinRunScene.ts +949 -0
- package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
- package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
- package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
- package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
- package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
- package/src/games/pipe-connect/PipeConnect.tsx +69 -0
- package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
- package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
- package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
- package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
- package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
- package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
- package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
- package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
- package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
- package/src/games/popit-fidget/PopitFidget.tsx +72 -0
- package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
- package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
- package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
- package/src/games/reversi/Reversi.tsx +94 -0
- package/src/games/reversi/ReversiConstants.ts +67 -0
- package/src/games/reversi/ReversiGame.ts +266 -0
- package/src/games/reversi/ReversiRules.ts +176 -0
- package/src/games/reversi/ReversiScene.ts +240 -0
- package/src/games/search-grid/SearchGrid.tsx +92 -0
- package/src/games/search-grid/SearchGridConstants.ts +178 -0
- package/src/games/search-grid/SearchGridGame.ts +209 -0
- package/src/games/search-grid/SearchGridScene.ts +301 -0
- package/src/games/shared/BackdropCard.tsx +54 -0
- package/src/games/shared/EngineBackdrop.ts +300 -0
- package/src/games/shared/EngineBlasts.ts +136 -0
- package/src/games/shared/EngineBlocks.ts +91 -0
- package/src/games/shared/EngineControlText.ts +17 -0
- package/src/games/shared/EngineDice.ts +250 -0
- package/src/games/shared/EngineFootprint.ts +35 -0
- package/src/games/shared/EngineFruits.ts +1435 -0
- package/src/games/shared/EngineGameLoader.tsx +88 -0
- package/src/games/shared/EngineGameScreen.tsx +325 -0
- package/src/games/shared/EngineGameWidth.ts +3 -0
- package/src/games/shared/EngineGameWidth.web.ts +3 -0
- package/src/games/shared/EngineGlyphs.ts +178 -0
- package/src/games/shared/EngineHud.ts +815 -0
- package/src/games/shared/EngineLoading.ts +477 -0
- package/src/games/shared/EngineMeadow.ts +725 -0
- package/src/games/shared/EngineMeshCache.ts +15 -0
- package/src/games/shared/EngineMeshes.ts +10 -0
- package/src/games/shared/EngineRacingChase.ts +21 -0
- package/src/games/shared/EngineRacingHandling.ts +48 -0
- package/src/games/shared/EngineReadyContext.ts +4 -0
- package/src/games/shared/EngineTilt.ts +44 -0
- package/src/games/shared/EngineTouchSurface.tsx +103 -0
- package/src/games/shared/EngineUtils.ts +52 -0
- package/src/games/shared/GameActivity.ts +13 -0
- package/src/games/shared/GameLoading.tsx +202 -0
- package/src/games/shared/GameLoadingTransition.tsx +61 -0
- package/src/games/shared/ProceduralCacheVersion.ts +2 -0
- package/src/games/shared/useEngineGame.ts +240 -0
- package/src/games/shared/useGameResource.ts +21 -0
- package/src/games/shared/useLiveState.ts +58 -0
- package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
- package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
- package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
- package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
- package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
- package/src/games/snake-3d/Snake3D.tsx +76 -0
- package/src/games/snake-3d/Snake3DConstants.ts +61 -0
- package/src/games/snake-3d/Snake3DGame.ts +192 -0
- package/src/games/snake-3d/Snake3DMotion.ts +22 -0
- package/src/games/snake-3d/Snake3DRules.ts +116 -0
- package/src/games/snake-3d/Snake3DScene.ts +322 -0
- package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
- package/src/games/space-fighter/SpaceFighter.tsx +74 -0
- package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
- package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
- package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
- package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
- package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
- package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
- package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
- package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
- package/src/games/stack-tower/StackTower.tsx +76 -0
- package/src/games/stack-tower/StackTowerConstants.ts +74 -0
- package/src/games/stack-tower/StackTowerGame.ts +236 -0
- package/src/games/stack-tower/StackTowerScene.ts +186 -0
- package/src/games/sudoku/Sudoku.tsx +73 -0
- package/src/games/sudoku/SudokuConstants.ts +127 -0
- package/src/games/sudoku/SudokuGame.ts +250 -0
- package/src/games/sudoku/SudokuRules.ts +125 -0
- package/src/games/sudoku/SudokuScene.ts +304 -0
- package/src/games/tangram/Tangram.tsx +79 -0
- package/src/games/tangram/TangramConstants.ts +64 -0
- package/src/games/tangram/TangramGame.ts +356 -0
- package/src/games/tangram/TangramRules.ts +409 -0
- package/src/games/tangram/TangramScene.ts +203 -0
- package/src/games/tank-1990/Tank1990.tsx +78 -0
- package/src/games/tank-1990/Tank1990Constants.ts +81 -0
- package/src/games/tank-1990/Tank1990Game.ts +331 -0
- package/src/games/tank-1990/Tank1990Rules.ts +390 -0
- package/src/games/tank-1990/Tank1990Scene.ts +434 -0
- package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
- package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
- package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
- package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
- package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
- package/src/games/tile-home/TileHome.tsx +92 -0
- package/src/games/tile-home/TileHomeConstants.ts +139 -0
- package/src/games/tile-home/TileHomeGame.ts +435 -0
- package/src/games/tile-home/TileHomeScene.ts +154 -0
- package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
- package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
- package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
- package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
- package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
- package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
- package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
- package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
- package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
- package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
- package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
- package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
- package/src/games/word-search/WordSearch.tsx +18 -0
- package/src/games/word-search/WordSearchWords.ts +1642 -0
- package/src/helpers/GamePatternData.ts +120 -0
- package/src/helpers/GameSettingsModal.tsx +384 -0
- package/src/helpers/GameTheme.tsx +37 -0
- package/src/helpers/IconPaths.ts +6 -0
- package/src/helpers/index.ts +2 -0
- package/src/index.tsx +60 -0
- package/src/services/GameAssetLoader.ts +111 -0
- package/src/services/GameAssets.ts +149 -0
- package/src/services/GameLoaders.ts +93 -0
- package/src/services/GamesConstants.ts +193 -0
- package/src/services/GamesMetadata.ts +711 -0
- package/src/services/GamesService.ts +116 -0
- package/src/services/HapticsService.ts +48 -0
- package/src/services/ScoringService.ts +19 -0
- package/src/services/SfxSources.ts +81 -0
- package/src/services/SoundsService.ts +582 -0
- package/src/services/ThemeService.ts +281 -0
- package/src/services/UtilsService.ts +134 -0
- package/src/services/index.ts +6 -0
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{createSearchGame}from"../search-grid/SearchGrid.js";import{NUMBERS}from"./NumberSearchNumbers.js";export const NumberSearch=createSearchGame({gameId:GAME_IDS.NUMBER_SEARCH,list:NUMBERS,alphabet:"0123456789",sounds:GAME_SOUNDS.NUMBER_SEARCH,winTitle:"ALL NUMBERS FOUND!",winMessage:"Great number hunting!",startSubtext:"Find hidden numbers!",variant:"number",displayName:"NumberSearch"});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const NUMBERS=["1234","2345","3456","4567","5678","6789","7890","1111","2222","3333","4444","5555","6666","7777","8888","9999","1010","2020","3030","4040","5050","6060","7070","8080","9090","1212","1313","1414","1515","1616","1717","1818","1919","2121","2323","2424","2525","2626","2727","2828","2929","3131","3232","3434","3535","3636","3737","3838","3939","4141","4242","4343","4545","4646","4747","4848","4949","5151","5252","5353","5454","5656","5757","5858","5959","6161","6262","6363","6464","6565","6767","6868","6969","7171","7272","7373","7474","7575","7676","7878","7979","8181","8282","8383","8484","8585","8686","8787","8989","9191","9292","9393","9494","9595","9696","9797","9898","1000","2000","3000","4000","5000","6000","7000","8000","9000","1001","2002","3003","4004","5005","6006","7007","8008","9009","1122","2233","3344","4455","5566","6677","7788","8899","1100","2200","3300","4400","5500","6600","7700","8800","9900","1221","2332","3443","4554","5665","6776","7887","8998","1331","2442","3553","4664","5775","6886","7997","1248","2468","1357","3579","1369","2481","3692","4826","5937","1470","2580","3690","1590","2460","3570","4680","5790","6810","7920","8130","9240","1024","2048","4096","8192","1536","3072","6144","1025","2050","3075","4100","5125","12345","23456","34567","45678","56789","67890","11111","22222","33333","44444","55555","66666","77777","88888","99999","10101","20202","30303","40404","50505","60606","70707","80808","90909","12121","13131","14141","15151","16161","17171","18181","19191","21212","23232","24242","25252","26262","27272","28282","29292","31313","32323","34343","35353","36363","37373","38383","39393","41414","42424","43434","45454","46464","47474","48484","49494","51515","52525","53535","54545","56565","57575","58585","59595","10001","20002","30003","40004","50005","60006","70007","80008","90009","10010","20020","30030","40040","50050","60060","70070","11011","22022","33033","44044","55055","66066","77077","88088","99099","11211","12321","13431","14541","15651","16761","17871","11221","22332","33443","44554","55665","66776","77887","88998","10203","20304","30405","40506","50607","60708","70809","80910","13579","24680","97531","86420","12468","13692","24816","36924","10000","20000","30000","40000","50000","60000","70000","80000","90000","10100","20200","30300","40400","50500","60600","70700","10240","20480","40960","81920","15360","30720","61440","12800","25600","51200","10250","20500","30750","41000","51250","61500","123456","234567","345678","456789","567890","111111","222222","333333","444444","555555","666666","777777","888888","999999","101010","202020","303030","404040","505050","606060","707070","808080","909090","121212","131313","141414","151515","161616","171717","181818","191919","212121","232323","242424","252525","262626","272727","282828","292929","313131","323232","343434","353535","363636","373737","383838","393939","414141","424242","434343","454545","464646","474747","484848","494949","515151","525252","535353","545454","565656","575757","585858","595959","616161","626262","636363","646464","656565","676767","686868","696969","717171","727272","737373","747474","757575","767676","787878","797979","818181","828282","838383","848484","858585","868686","878787","898989","919191","929292","939393","949494","959595","969696","979797","989898","100001","200002","300003","400004","500005","600006","700007","800008","900009","100100","200200","300300","400400","500500","600600","700700","800800","900900","110011","220022","330033","440044","550055","660066","770077","880088","990099","112211","123321","134431","145541","156651","167761","178871","189981","112233","223344","334455","445566","556677","667788","778899","102030","203040","304050","405060","506070","607080","708090","135790","246800","975310","864200","124680","136920","248160","369240","100000","200000","300000","400000","500000","600000","700000","800000","900000","101000","202000","303000","404000","505000","606000","707000","102400","204800","409600","819200","153600","307200","614400","128000","256000","512000","102500","205000","307500","410000","512500","615000","111222","222333","333444","444555","555666","666777","777888","888999","100200","200300","300400","400500","500600","600700","700800","800900","110110","220220","330330","440440","550550","660660","770770","880880","990990","123123","234234","345345","456456","567567","678678","789789","321321","432432","543543","654654","765765","876876","987987","111000","222000","333000","444000","555000","666000","777000","888000","999000","100010","200020","300030","400040","500050","600060","700070","800080","900090","112112","113113","114114","115115","116116","117117","118118","119119","121121","131131","141141","151151","161161","171171","181181","191191","101101","102102","103103","104104","105105","106106","107107","108108","109109","246810","135791","112358","132134","314159","271828","161803","141421","173205","223606","100101","200201","300301","400401","500501","600601","700701","800801","900901"];
|
|
@@ -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{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT}from"./NutsAndBoltsConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./NutsAndBoltsGame.js";import{jsx as _0x5e1389}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.NUTS_AND_BOLTS,CLASSIC_TEXT="#FFFFFF",FEEDBACK={select:{sound:SOUNDS.SELECT,haptic:HapticType.LIGHT},place:{sound:SOUNDS.PLACE,haptic:HapticType.MEDIUM},complete:{sound:SOUNDS.COMPLETE,haptic:HapticType.SUCCESS}};export const NutsAndBolts=engineGame(GAME_IDS.NUTS_AND_BOLTS,e=>{const[t,s]=useLiveState(0),[a,o]=useLiveState(TIME_LIMIT),[i,n]=useLiveState(null),{game:r,theme:m,status:S,screen:p,gameOver:u}=useEngineGame(e,{gameId:GAME_IDS.NUTS_AND_BOLTS,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,a)=>{const o=getLayout(t,s,a);return setLayout(e,o),o.boardWidth},tap:tap,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>{"win"!==t&&e(SOUNDS.GAME_OVER,HapticType.HEAVY)},wire:(e,t)=>{e.onScore=s,e.onTime=o,e.onPlanks=n,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),E="classic"===m.mode?"#FFFFFF":void 0;return _0x5e1389(EngineGameScreen,{...p,light:LIGHT,columns:[textColumn("PLANKS",i??r.planks.length,E),textColumn("SCORE",t.toLocaleString(),E),textColumn("TIMER",formatTime(a),E)],subtext:"Unscrew the planks!",gameOver:u({title:"win"===S?"PUZZLE SOLVED!":"TIME UP!",message:"win"===S?"All bolts matched!":"You ran out of time!",scoreLabel:"win"===S?"Puzzle Solved!":"Game Over",score:t,buttonText:"win"===S?"Play Again!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const BOARD_COLS=5;export const BOARD_ROWS=5;export const EXTRA_HOLES=3;export const TIME_LIMIT=120;export const LIFT_TIME=.26;export const MOVE_TIME=.6;export const FALL_TIME=.6;export const TILT=.38;export const LIGHT=frontLight([-.4,.5,1],.45);export const CLASSIC_BOARD="rgba(255, 255, 255, 0.30)";export const CLASSIC_SEPARATOR="rgba(255, 255, 255, 0.1)";const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,PADDING=18,SWAP_ROW=.95;export function getLayout(t,o,r){const e=gameWidthFor(t),n=getScoreBoardTop(r)+82,i=Math.max(240,o-n-110),p=Math.min((e-36)/5,(i/Math.cos(.38)-36)/5.95);return{width:t,height:o,tilt:.38,centerY:n+i/2,cell:p,padding:18,boardWidth:5*p+36,boardHeight:5.95*p+36}}export function pointAt(t,o,r){const e=t.boardHeight/2-t.padding-t.cell/2;return[(r-2)*t.cell,e-o*t.cell]}export function swapAt(t,o){return[(o-1)*(1.2*t.cell),-t.boardHeight/2+t.padding+.38*t.cell]}export const separatorY=t=>-t.boardHeight/2+t.padding+.86*t.cell;
|
|
@@ -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{pointAt,swapAt,TIME_LIMIT}from"./NutsAndBoltsConstants.js";import{canPlaceBoltInHole,canSelectBolt,checkPlankRemoval,generatePuzzle,getBoltAtPosition,getBoltById,getHoleById,getPlanksAtPosition,isPuzzleComplete,moveBoltToGrid,moveBoltToHole}from"./NutsAndBoltsRules.js";import{boltRest,buildScene,celebrate,dropPlank,liftBolt,lowerBolt,moveBolt,placeSockets,removeBolts,removeScene,setSceneTheme,settleBolt,spawnBolt,spawnPlank}from"./NutsAndBoltsScene.js";const WORLD_CAPACITY=300,deal=()=>{const o=generatePuzzle();return{...o,homes:o.bolts.map(o=>({row:o.originalRow,col:o.originalCol}))}};export function createGame(o){const e=new World(300),t={world:e,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,scene:null,phase:"ready",...deal(),selected:null,get score(){return e.scoreboard.score},get time(){return e.scoreboard.shownSeconds},won:!1,onPhase:o=>{},onScore:o=>{},onTime:o=>{},onPlanks:o=>{},onEvent:o=>{}};return e.scoreboard.reset(0,TIME_LIMIT),e.scoreboard.handlers={onSecond:o=>t.onTime(o),onTimeUp:()=>"playing"===t.phase&&end(t,!1)},t}const holeIndex=o=>Number(o.slice(5));function boltAt(o,e){const t=o.layout;if(e.holeId){const[o,l]=swapAt(t,holeIndex(e.holeId));return[o,l,0]}const[l,n]=pointAt(t,e.row,e.col);return[l,n,boltRest(o.planks,e.row,e.col)]}export function setLayout(o,e){o.scene&&removeScene(o.world,o.scene),o.layout=e,aimTilted(o.camera,e),o.scene=buildScene(o.world,e,o.theme,o.homes),spawnPieces(o)}export function setTheme(o,e){o.theme=e,o.layout&&o.scene&&setSceneTheme(o.world,o.layout,o.scene,e)}function spawnPieces(o){const{layout:e,scene:t}=o;if(e&&t){for(const l of o.planks)spawnPlank(o.world,e,t,l);for(const l of o.bolts)spawnBolt(o.world,e,t,l.id,boltAt(o,l));if(o.selected){const l=getBoltById(o.selected,o.bolts);l&&liftBolt(o.world,e,t,l.id,boltAt(o,l))}}}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();const{layout:e,scene:t}=o;if(e&&t){for(const e of t.planks.values())o.world.despawn(e);t.planks.clear(),removeBolts(o.world,t)}Object.assign(o,deal()),o.selected=null,o.world.scoreboard.reset(0,TIME_LIMIT),o.won=!1,o.phase="ready",e&&t&&(placeSockets(o.world,e,t,o.homes),spawnPieces(o)),o.onScore(0),o.onTime(TIME_LIMIT),o.onPlanks(o.planks.length),o.onPhase("ready")}export function dispose(o){o.world.dispose()}export function tick(o,e){o.world.isDisposed||o.world.update(e)}function end(o,e){o.world.scoreboard.stop();const{layout:t,scene:l}=o;if(o.selected&&t&&l){const e=getBoltById(o.selected,o.bolts);e&&lowerBolt(o.world,o.layout,l,e.id,boltAt(o,e))}o.selected=null,o.won=e,o.phase="over",o.onPhase("over")}export function targetAt(o,e,t){const l=o.layout;if(!l)return null;const[n,s]=unproject(l,e,t,10),r=(.5*l.cell)**2,d=([o,e])=>(n-o)**2+(s-e)**2<=r;for(const e of o.holes)if(d(swapAt(l,holeIndex(e.id))))return{row:e.row,col:e.col,holeId:e.id};const a=new Set(o.bolts.filter(o=>null===o.holeId).map(o=>o.row+"-"+o.col));for(const e of o.homes)if(!a.has(e.row+"-"+e.col)&&d(pointAt(l,e.row,e.col)))return{row:e.row,col:e.col,holeId:null};for(const e of o.bolts)if(null===e.holeId&&d(pointAt(l,e.row,e.col)))return{row:e.row,col:e.col,holeId:null};return null}export function tap(o,e,t){if("playing"!==o.phase)return;const l=targetAt(o,e,t);l&&choose(o,l)}export function choose(o,e){const{layout:t,scene:l}=o;if(!t||!l||"playing"!==o.phase)return;const n=e=>{const n=o.selected?getBoltById(o.selected,o.bolts):null;n&&lowerBolt(o.world,o.layout,l,n.id,boltAt(o,n)),o.selected=e;const s=getBoltById(e,o.bolts);liftBolt(o.world,t,l,e,boltAt(o,s)),o.onEvent("select")},s=()=>{const e=o.selected?getBoltById(o.selected,o.bolts):null;e&&lowerBolt(o.world,o.layout,l,e.id,boltAt(o,e)),o.selected=null};if(!o.selected){if(e.holeId){const t=getHoleById(e.holeId,o.holes);t?.boltId&&getBoltById(t.boltId,o.bolts)&&n(t.boltId)}else{const t=getBoltAtPosition(e.row,e.col,o.bolts);t&&canSelectBolt(t,o.planks)&&n(t.id)}return}if(!getBoltById(o.selected,o.bolts))return void(o.selected=null);if(e.holeId){const t=getHoleById(e.holeId,o.holes);if(!t)return;return t.boltId===o.selected?s():canPlaceBoltInHole(t)?place(o,moveBoltToHole(o.selected,e.holeId,o.bolts,o.holes)):void(t.boltId&&n(t.boltId))}const r=getBoltAtPosition(e.row,e.col,o.bolts);return r&&r.id===o.selected?s():r&&canSelectBolt(r,o.planks)?n(r.id):void(r||(o.homes.some(o=>o.row===e.row&&o.col===e.col)||getPlanksAtPosition(e.row,e.col,o.planks).length>0)&&place(o,moveBoltToGrid(o.selected,e.row,e.col,o.bolts,o.holes)))}function place(o,e){const{layout:t,scene:l}=o,n=o.selected,s=boltAt(o,getBoltById(n,o.bolts));o.bolts=e.bolts,o.holes=e.holes,o.selected=null;const{removedPlanks:r,remainingPlanks:d}=checkPlankRemoval(o.planks,o.bolts);if(o.planks=d,t&&l){moveBolt(o.world,t,l,n,s,boltAt(o,getBoltById(n,o.bolts)));for(const e of r){const n=l.planks.get(e.id),s=dropPlank(o.world,t,l,e);null!=n&&o.world.after(s,()=>o.world.despawn(n))}if(r.length)for(const e of o.bolts)e.id!==n&&null===e.holeId&&settleBolt(o.world,l,e.id,boltAt(o,e))}if(r.length&&o.onPlanks(o.planks.length),isPuzzleComplete(o.planks))return o.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-o.time,TIME_LIMIT,o.score)),o.onScore(o.score),o.onEvent("complete"),t&&celebrate(o.world,t),void end(o,!0);o.onEvent("place")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{BOARD_COLS,BOARD_ROWS,EXTRA_HOLES}from"./NutsAndBoltsConstants.js";const PLANK_COLORS={horizontal:"#8B4513",vertical:"#C0C0C0"};export const getPlankPositions=o=>{const t=[];for(let n=0;n<o.length;n++)"horizontal"===o.orientation?t.push({row:o.startRow,col:o.startCol+n}):t.push({row:o.startRow+n,col:o.startCol});return t};export const plankCoversPosition=(o,t,n)=>{const l="horizontal"===o.orientation?n-o.startCol:t-o.startRow;return("horizontal"===o.orientation?t===o.startRow:n===o.startCol)&&Number.isInteger(l)&&l>=0&&l<o.length};const randomInt=(o,t)=>Math.floor(Math.random()*(t-o+1))+o,shuffleArray=o=>{const t=[...o];for(let o=t.length-1;o>0;o--){const n=Math.floor(Math.random()*(o+1));[t[o],t[n]]=[t[n],t[o]]}return t};export const generatePuzzle=()=>{const o=[],t=[];let n=[],l=0,r=0,e=!1,s=0;for(;!e&&s<500;){s++,n=[],l=0;const o=randomInt(0,3);if(0===o){const o=shuffleArray([...Array(BOARD_ROWS).keys()]).slice(0,4),t=shuffleArray([...Array(BOARD_COLS).keys()]).slice(0,4);for(const t of o){const o=randomInt(0,1),r=BOARD_COLS-o-randomInt(0,1);n.push({id:"plank-"+l++,orientation:"horizontal",startRow:t,startCol:o,length:Math.max(2,r),color:PLANK_COLORS.horizontal,zIndex:l})}for(const o of t){const t=randomInt(0,1),r=BOARD_ROWS-t-randomInt(0,1);n.push({id:"plank-"+l++,orientation:"vertical",startRow:t,startCol:o,length:Math.max(2,r),color:PLANK_COLORS.vertical,zIndex:l})}}else if(1===o){const o=Math.floor(BOARD_ROWS/2),t=Math.floor(BOARD_COLS/2);for(let t=0;t<4;t++){const r=(o-1+t)%BOARD_ROWS;n.push({id:"plank-"+l++,orientation:"horizontal",startRow:r,startCol:randomInt(0,1),length:BOARD_COLS-randomInt(0,1),color:PLANK_COLORS.horizontal,zIndex:l})}for(let o=0;o<4;o++){const r=(t-1+o)%BOARD_COLS;n.push({id:"plank-"+l++,orientation:"vertical",startRow:randomInt(0,1),startCol:r,length:BOARD_ROWS-randomInt(0,1),color:PLANK_COLORS.vertical,zIndex:l})}}else if(2===o){for(let o=0;o<4;o++){const t=randomInt(0,BOARD_ROWS-1),r=o%2==0?0:randomInt(0,1),e=o%2==0?BOARD_COLS-randomInt(0,1):BOARD_COLS;n.push({id:"plank-"+l++,orientation:"horizontal",startRow:t,startCol:r,length:Math.max(2,e-r),color:PLANK_COLORS.horizontal,zIndex:l})}for(let o=0;o<4;o++){const t=randomInt(0,BOARD_COLS-1),r=o%2==0?0:randomInt(0,1),e=o%2==0?BOARD_ROWS-randomInt(0,1):BOARD_ROWS;n.push({id:"plank-"+l++,orientation:"vertical",startRow:r,startCol:t,length:Math.max(2,e-r),color:PLANK_COLORS.vertical,zIndex:l})}}else{for(let o=0;o<4;o++){const o=randomInt(0,BOARD_ROWS-1),t=randomInt(2,BOARD_COLS),r=randomInt(0,Math.max(0,BOARD_COLS-t));n.push({id:"plank-"+l++,orientation:"horizontal",startRow:o,startCol:r,length:t,color:PLANK_COLORS.horizontal,zIndex:l})}for(let o=0;o<4;o++){const o=randomInt(0,BOARD_COLS-1),t=randomInt(2,BOARD_ROWS),r=randomInt(0,Math.max(0,BOARD_ROWS-t));n.push({id:"plank-"+l++,orientation:"vertical",startRow:r,startCol:o,length:t,color:PLANK_COLORS.vertical,zIndex:l})}}const t=3;for(let o=0;o<n.length;o++){const l=n[o],r=getPlankPositions(l),e=[];for(let t=0;t<r.length;t++){const l=r[t];for(let r=0;r<n.length;r++)if(r!==o&&plankCoversPosition(n[r],l.row,l.col)){e.push(t);break}}if(e.length>t){const o=e[t-1];l.length=o+1}}const r=getPlankIntersections(n),a=8;if(r.length<a)continue;let i=!0;for(const o of n)if(!getPlankPositions(o).some(o=>r.some(t=>t.row===o.row&&t.col===o.col))){i=!1;break}i&&r.length>=a&&n.length>=3&&(e=!0)}const a=getPlankIntersections(n);for(const o of a)t.push({id:"bolt-"+r++,row:o.row,col:o.col,originalRow:o.row,originalCol:o.col,holeId:null});for(let t=0;t<EXTRA_HOLES;t++)o.push({id:"hole-"+t,row:BOARD_ROWS,col:t+Math.floor((BOARD_COLS-EXTRA_HOLES)/2),boltId:null});return{holes:o,bolts:t,planks:n}};export const getBoltById=(o,t)=>t.find(t=>t.id===o)||null;export const getBoltAtPosition=(o,t,n)=>n.find(n=>n.row===o&&n.col===t&&null===n.holeId)||null;export const getHoleById=(o,t)=>t.find(t=>t.id===o)||null;export const getPlanksAtPosition=(o,t,n)=>n.filter(n=>plankCoversPosition(n,o,t));export const getPlankIntersections=o=>{const t=new Map;for(const n of o){const o=getPlankPositions(n);for(const n of o){const o=n.row+"-"+n.col;t.set(o,(t.get(o)||0)+1)}}const n=[];for(const[o,l]of t)if(l>=2){const[t,l]=o.split("-").map(Number);n.push({row:t,col:l})}return n};export const getValidBoltPositions=o=>getPlankIntersections(o);export const getEmptyGridHoles=(o,t)=>{const n=new Set(t.filter(o=>null===o.holeId).map(o=>o.row+"-"+o.col)),l=new Map;for(const o of t){const t=o.originalRow+"-"+o.originalCol;l.set(t,{row:o.originalRow,col:o.originalCol})}const r=[];for(const[o,t]of l)!n.has(o)&&r.push(t);return r};export const canSelectBolt=(o,t)=>{if(null!==o.holeId)return!1;const n=getPlanksAtPosition(o.row,o.col,t);if(0===n.length)return!0;const l=Math.max(...n.map(o=>o.zIndex));return void 0!==n.find(o=>o.zIndex===l)};export const canPlaceBoltInHole=o=>null===o.boltId;export const moveBoltToHole=(o,t,n,l)=>{const r=n.map(o=>({...o})),e=l.map(o=>({...o})),s=r.find(t=>t.id===o),a=e.find(o=>o.id===t);if(!s||!a)return{bolts:n,holes:l};if(s.holeId){const o=e.find(o=>o.id===s.holeId);o&&(o.boltId=null)}return a.boltId=o,s.holeId=t,{bolts:r,holes:e}};export const moveBoltToGrid=(o,t,n,l,r)=>{const e=l.map(o=>({...o})),s=r.map(o=>({...o})),a=e.find(t=>t.id===o);if(!a)return{bolts:l,holes:r};if(a.holeId){const o=s.find(o=>o.id===a.holeId);o&&(o.boltId=null)}return a.row=t,a.col=n,a.holeId=null,{bolts:e,holes:s}};export const checkPlankRemoval=(o,t)=>{const n=[],l=[],r=new Set(t.filter(o=>null===o.holeId).map(o=>o.row+"-"+o.col));for(const t of o)getPlankPositions(t).some(o=>r.has(o.row+"-"+o.col))?l.push(t):n.push(t);return{removedPlanks:n,remainingPlanks:l}};export const isPuzzleComplete=o=>0===o.length;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat,recolor,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x27145b}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CLASSIC_BOARD,CLASSIC_SEPARATOR,FALL_TIME,LIFT_TIME,MOVE_TIME,pointAt,separatorY,swapAt}from"./NutsAndBoltsConstants.js";import{getPlankPositions}from"./NutsAndBoltsRules.js";const meshes=new Map,cached=(t,o)=>{let e=meshes.get(t);return!e&&(e=cacheGameAsset("nuts-and-bolts/NutsAndBoltsScene:"+t,o),meshes.set(t,e)),e},STAND_UP=quat.x(Math.PI/2),ACROSS=quat.z(0),DOWN=quat.z(Math.PI/2),BOARD_DEPTH=10,BACKDROP_DEPTH=25,PLANK_PAD=10,PLANK_WIDTH=26,PLANK_DEPTH=10,PLANK_CAP=1.6,PLANK_TOP=11.6,PLANK_STEP=4,WOOD=toColor("#8B4513"),METAL=toColor("#B8BEC6"),SILVER=[.78,.8,.84,1],GOLD=toColor("#FFD700");export const holeRadius=t=>Math.min(18,.3*t.cell);export const boltRadius=t=>Math.min(16,.27*t.cell);const plankZ=t=>4*(t.zIndex-1);export const boltRest=(t,o,e)=>t.reduce((t,a)=>getPlankPositions(a).some(t=>t.row===o&&t.col===e)?Math.max(t,plankZ(a)+11.6):t,0);const panelMesh=(t,o,e)=>cached("nb-panel:"+t.toFixed(1)+"x"+o.toFixed(1)+":"+e,()=>_0x27145b(extrude((new Path).addRoundedRect(-t/2,-o/2,t,o,e),{depth:10}),{shine:.2})),cube=()=>shapeGeometry("cube"),faceShade=(t,o)=>e=>recolor(e,({normal:e})=>{const a=e[2]>.6?t:e[2]<-.6?.6*o:o;return[a,a,a,1]}),plankMesh=(t,o,e,a)=>cached("nb-plank-v2:"+(a?"m":"w")+":"+t+":"+o.toFixed(2)+":"+e.toFixed(1),()=>{const n=(t-1)*o,s=n+20+26,i=.62*e,r=e=>{const a=(new Path).addRoundedRect(-s/2+e,-13+e,s-2*e,26-2*e,13-e);for(let s=0;s<t;s++)a.addCircle(-n/2+s*o,0,i+e);return a},l=Array.from({length:t},(t,e)=>-n/2+e*o),p=[{geometry:faceShade(.82,.62)(extrude(r(0),{depth:10,fillRule:"evenodd"}))},{geometry:faceShade(1,.8)(extrude(r(1.6),{depth:1.6,fillRule:"evenodd"})),position:[0,0,5.8]}],d=6.6+.05;return(a?[-7.5,-3,4,8.5]:[-8.5,-5.5,-2.5,3,6,9]).forEach((t,o)=>{const e=s/2-13+Math.sqrt(Math.max(0,121-t*t)),n=[];for(const o of l)if(Math.abs(t)<i+3){const e=Math.sqrt((i+3)**2-t*t);n.push([o-e,o+e])}let r=-e;for(const[s,i]of[...n,[e,e]]){if(s-r>2){const e=a?1.18:.62+o%3*.06;p.push({geometry:cube(),position:[(r+s)/2,t,d],scale:[s-r,a?.35:.6+o%2*.4,.1],color:[e,e,e,1]})}r=i}}),_0x27145b(merge(p),{center:!1,shine:a?.8:.2})}),nutSocketMesh=()=>cached("nb-socket-nut",()=>{const t=new Path;for(let o=0;o<6;o++){const e=o/6*Math.PI*2+Math.PI/6;0===o?t.moveTo(.48*Math.cos(e),.48*Math.sin(e)):t.lineTo(.48*Math.cos(e),.48*Math.sin(e))}t.close().addCircle(0,0,.24);const o=toColor("#2E9E5B"),e=toColor("#6FD39A"),a=toColor("#16301F");return _0x27145b(merge([{geometry:extrude(t,{depth:.18,fillRule:"evenodd"}),rotation:quat.x(-Math.PI/2),position:[0,.09,0],color:[o[0],o[1],o[2],1]},{geometry:lathe([[.24,.17],[.3,.181]],{segments:48}),color:[e[0],e[1],e[2],1]},{geometry:lathe([[.001,-.06],[.24,-.06],[.24,.17]],{segments:40,displace:(t,o)=>o>.5?.02*Math.sin((t+5*o)*Math.PI*2):0}),color:[a[0],a[1],a[2],1]}]),{center:!1,shine:.6})}),socketMesh=t=>t?nutSocketMesh():cached("nb-socket-"+(t?"swap":"grid"),()=>{const[o,e,a]=t?["#3CB371","#228B22","#90EE90"]:["#D2B48C","#B8956A","#F5DEB3"],n=toColor(o),s=toColor(e),i=toColor(a);return _0x27145b(lathe([[.001,.04],[.26,.05],[.38,.1],[.46,.2],[.5,.24],[.56,.18],[.6,0]],{segments:28,color:({position:t})=>{const o=Math.hypot(t[0],t[2]),e=o<.3?i:o<.45?s:n;return[e[0],e[1],e[2]]}}),{center:!1,shine:.3})}),boltMesh=()=>cached("nb-bolt-v2",()=>{const t=lathe([[.001,.4],[.3,.4],[.38,.35],[.38,.12],[.36,.1]],{segments:6}),o=lathe([[.36,.12],[.48,.1],[.5,.06],[.5,.02],[.47,0],[.14,0]],{segments:48}),e=lathe([[.15,0],[.15,-.62],[.1,-.7],[.001,-.7]],{segments:32,displace:(t,o)=>o<.85?.03*Math.sin((t+7*o)*Math.PI*2):0});return _0x27145b(merge([{geometry:e,color:[.62,.64,.68,1]},{geometry:o,color:[.92,.93,.95,1]},{geometry:t}]),{center:!1,shine:.9})}),panelColor=t=>toColor("classic"===t.mode?CLASSIC_BOARD:t.BOARD.SURFACE),separatorColor=t=>toColor("classic"===t.mode?CLASSIC_SEPARATOR:t.BOARD.BORDER);export function buildScene(t,o,e,a){const n=spawnBackdrop(t,o.width,o.height,-25,e);placeTiltedBackdrop(t,n,o,25);const s="classic"===e.mode,i=s?16:8,r=t.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,i),position:[0,0,-5],color:panelColor(e),pickable:!1}),l=toColor(e.BOARD.BORDER),p=!s&&l[3]>0?t.spawn({mesh:cached("nb-rim:"+o.boardWidth.toFixed(1)+"x"+o.boardHeight.toFixed(1),()=>_0x27145b(extrude((new Path).addRoundedRect(-o.boardWidth/2,-o.boardHeight/2,o.boardWidth,o.boardHeight,8).addRoundedRect(-o.boardWidth/2+1,-o.boardHeight/2+1,o.boardWidth-2,o.boardHeight-2,7),{depth:0,fillRule:"evenodd"}))),position:[0,0,.3],color:l,pickable:!1}):null,d=t.spawn({mesh:"cube",position:[0,separatorY(o),.2],scale:[o.boardWidth-2*o.padding,1.5,.3],color:separatorColor(e),pickable:!1}),h=holeRadius(o);return{backdrop:n,panel:r,rim:p,separator:d,sockets:a.map(({row:e,col:a})=>{const[n,s]=pointAt(o,e,a);return t.spawn({mesh:socketMesh(!1),position:[n,s,0],rotation:STAND_UP,scale:2*h,pickable:!1})}),swaps:[0,1,2].map(e=>{const[a,n]=swapAt(o,e);return t.spawn({mesh:socketMesh(!0),position:[a,n,0],rotation:STAND_UP,scale:2*h,pickable:!1})}),planks:new Map,bolts:new Map}}export function removeScene(t,o){const e=[o.backdrop,o.panel,o.separator,...o.sockets,...o.swaps,...Array.from(o.planks.values()),...Array.from(o.bolts.values(),t=>t.pivot)];for(const a of null!=o.rim?[...e,o.rim]:e)t.despawn(a)}export function setSceneTheme(t,o,e,a){setBackdropTheme(t,e.backdrop,a),t.set(e.panel,{mesh:panelMesh(o.boardWidth,o.boardHeight,"classic"===a.mode?16:8),color:panelColor(a)}),t.set(e.separator,{color:separatorColor(a)})}export function placeSockets(t,o,e,a){for(const o of e.sockets)t.despawn(o);const n=holeRadius(o);e.sockets=a.map(({row:e,col:a})=>{const[s,i]=pointAt(o,e,a);return t.spawn({mesh:socketMesh(!1),position:[s,i,0],rotation:STAND_UP,scale:2*n,pickable:!1})})}const plankCentre=(t,o)=>{const[e,a]=pointAt(t,o.startRow,o.startCol),[n,s]="horizontal"===o.orientation?pointAt(t,o.startRow,o.startCol+o.length-1):pointAt(t,o.startRow+o.length-1,o.startCol);return[(e+n)/2,(a+s)/2,plankZ(o)+5]};export function spawnPlank(t,o,e,a){e.planks.set(a.id,t.spawn({mesh:plankMesh(a.length,o.cell,holeRadius(o),"horizontal"!==a.orientation),position:plankCentre(o,a),rotation:"horizontal"===a.orientation?ACROSS:DOWN,color:"horizontal"===a.orientation?WOOD:METAL,pickable:!1}))}export function dropPlank(t,o,e,a){const n=e.planks.get(a.id);if(null==n)return 0;e.planks.delete(a.id);const[s,i,r]=plankCentre(o,a),l=.5*(a.zIndex%2?1:-1),[p,d,h]="horizontal"===a.orientation?WOOD:METAL;return t.animate(n,{position:[s+l*o.cell*.4,i-2.5*o.cell,r-30]},{duration:FALL_TIME,easing:"easeIn"}),t.animate(n,{turn:[.4*l,0,l]},{duration:FALL_TIME,easing:"easeIn"}),t.animate(n,{color:[p,d,h,0]},{duration:FALL_TIME,easing:"easeIn"}),FALL_TIME}export function spawnBolt(t,o,e,a,n){const s=t.spawn({mesh:"none",position:n,pickable:!1}),i=t.spawn({mesh:boltMesh(),parent:s,rotation:STAND_UP,scale:2*boltRadius(o),color:SILVER,pickable:!1});e.bolts.set(a,{pivot:s,body:i})}export function removeBolts(t,o){for(const e of o.bolts.values())t.despawn(e.pivot);o.bolts.clear()}const lifted=(t,o)=>[o[0],o[1],o[2]+1.6*boltRadius(t)],SCREW_TURNS=2.5;function hover(t,o,e,a,n){const s=lifted(o,a);t.animate(e.pivot,{position:[s[0],s[1],s[2]+.25*boltRadius(o)]},{duration:.7,delay:n,repeat:"forever",yoyo:!0,easing:"easeInOut"}),t.animate(e.pivot,{turn:[0,0,.3*Math.PI]},{duration:1.1,delay:n,repeat:"forever",yoyo:!0,easing:"easeInOut"})}export function liftBolt(t,o,e,a,n){const s=e.bolts.get(a);s&&(t.stopAnimation(s.pivot),t.animate(s.pivot,{position:lifted(o,n)},{duration:LIFT_TIME,easing:"easeOut"}),t.animate(s.pivot,{turn:[0,0,2*Math.PI*2.5]},{duration:LIFT_TIME,easing:"easeOut"}),t.animate(s.body,{color:GOLD},{duration:LIFT_TIME}),hover(t,o,s,n,LIFT_TIME))}function seat(t,o,e,a,n){const s=.12*boltRadius(o);t.animate(e.pivot,[{position:[a[0],a[1],a[2]-s],at:.4},{position:a,at:1}],{duration:.14,delay:n,easing:"easeOut"})}export function lowerBolt(t,o,e,a,n){const s=e.bolts.get(a);s&&(t.stopAnimation(s.pivot),t.animate(s.pivot,{position:n},{duration:LIFT_TIME,easing:"easeIn"}),t.animate(s.pivot,{turn:[0,0,2*-Math.PI*2.5]},{duration:LIFT_TIME,easing:"easeIn"}),t.animate(s.body,{color:SILVER},{duration:LIFT_TIME}),seat(t,o,s,n,LIFT_TIME))}export function settleBolt(t,o,e,a){const n=o.bolts.get(e);n&&t.animate(n.pivot,{position:a},{duration:.25,delay:.1,easing:"bounce"})}export function moveBolt(t,o,e,a,n,s){const i=e.bolts.get(a);if(!i)return;const r=Math.max(n[2],s[2])+2.4*boltRadius(o),l=lifted(o,s),p=.55*MOVE_TIME,d=MOVE_TIME-p;t.stopAnimation(i.pivot),t.animate(i.pivot,[{position:[n[0],n[1],r],at:.3},{position:[(n[0]+s[0])/2,(n[1]+s[1])/2,r+.6*boltRadius(o)],at:.6},{position:[l[0],l[1],l[2]],at:1}],{duration:p,path:"smooth",easing:"easeInOut"}),t.animate(i.pivot,{position:s},{duration:d,delay:p,easing:"easeIn"}),t.animate(i.pivot,{turn:[0,0,2*-Math.PI*2.5]},{duration:d,delay:p,easing:"easeIn"}),t.animate(i.body,{color:SILVER},{duration:MOVE_TIME}),seat(t,o,i,s,MOVE_TIME)}export function celebrate(t,o){effects.confetti(t,{position:[0,o.cell,o.cell],count:60,size:.12*o.cell,speed:1.4*o.boardWidth,lifetime:1.3,gravity:2.4*-o.boardWidth,colors:["#FFD700","#3CB371","#C4733B","#4DA6FF"].map(t=>toColor(t))})}
|
|
@@ -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{livesColumn,scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,INITIAL_LIVES,LIGHT,TIME_LIMIT}from"./PacManConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./PacManGame.js";import{jsx as _0x384e19}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.PAC_MAN,FEEDBACK={chomp:{sound:SOUNDS.CHOMP},pellet:{sound:SOUNDS.POWER_PELLET,haptic:HapticType.MEDIUM},fruit:{sound:SOUNDS.FRUIT,haptic:HapticType.MEDIUM},eatGhost:{sound:SOUNDS.EAT_GHOST,haptic:HapticType.HEAVY},eatGhostCombo:{sound:SOUNDS.EAT_GHOST_COMBO,haptic:HapticType.HEAVY},lifeLost:{sound:SOUNDS.LIFE_LOST,haptic:HapticType.ERROR}},scoreText=e=>""+e;export const PacMan=engineGame(GAME_IDS.PAC_MAN,e=>{const[t,s]=useLiveState(0),[o,a]=useLiveState(INITIAL_LIVES),[i,r]=useLiveState(TIME_LIMIT),{theme:n,status:S,screen:m,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.PAC_MAN,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,o)=>{const a=getLayout(t,s,o);return setLayout(e,a),a.sizeX},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START),onStop:e=>e(null,HapticType.LIGHT),onOver:(e,t)=>e("win"===t?SOUNDS.LEVEL_COMPLETE:SOUNDS.DEATH,"win"===t?HapticType.SUCCESS:HapticType.HEAVY),wire:(e,t)=>{let o=!1;e.onScore=s,e.onLives=a,e.onTime=r,e.onEvent=e=>{"chomp"===e?(o=!o,t(o?SOUNDS.CHOMP:SOUNDS.CHOMP_ALT)):t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}});return _0x384e19(EngineGameScreen,{...m,light:LIGHT,columns:[scoreColumn(t),livesColumn(o,INITIAL_LIVES),timerColumn(i,n,0)],subtext:"Eat dots, dodge ghosts!",gameOver:E({title:"win"===S?"MAZE CLEARED!":"GAME OVER",message:"win"===S?"You cleared the maze!":"The ghosts got you!",scoreLabel:"Final Score",score:t,formatter:scoreText,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 COLS=19;export const ROWS=21;export const POINTS_PER_DOT=100;export const POINTS_PER_POWER_PELLET=500;export const POINTS_PER_GHOST=500;export const POINTS_PER_FRUIT=300;export const INITIAL_LIVES=3;export const TIME_LIMIT=300;export const PAC_STEP=.16;export const GHOST_STEP=.25;export const GHOST_EATEN_STEP=.1;export const POWER_PELLET_TIME=7;export const FLASH_TIME=2;export const SCATTER_TIME=7;export const CHASE_TIME=20;export const FRUIT_TIME=10;export const FRUIT_SPAWN_DOTS=[70,170];export const CHOMP_TIME=.16;export let CellType=function(t){return t[t.EMPTY=0]="EMPTY",t[t.WALL=1]="WALL",t[t.DOT=2]="DOT",t[t.POWER_PELLET=3]="POWER_PELLET",t[t.GHOST_HOUSE=4]="GHOST_HOUSE",t[t.GHOST_DOOR=5]="GHOST_DOOR",t[t.TUNNEL=6]="TUNNEL",t}({});export let GhostMode=function(t){return t.SCATTER="scatter",t.CHASE="chase",t.FRIGHTENED="frightened",t.EATEN="eaten",t.IN_HOUSE="in_house",t.LEAVING_HOUSE="leaving_house",t}({});export let GhostName=function(t){return t.BLINKY="blinky",t.PINKY="pinky",t.INKY="inky",t.CLYDE="clyde",t}({});export const DIRECTIONS={UP:{x:0,y:-1},DOWN:{x:0,y:1},LEFT:{x:-1,y:0},RIGHT:{x:1,y:0},NONE:{x:0,y:0}};export const OPPOSITE={UP:"DOWN",DOWN:"UP",LEFT:"RIGHT",RIGHT:"LEFT",NONE:"NONE"};export const GHOST_LIST=[GhostName.BLINKY,GhostName.PINKY,GhostName.INKY,GhostName.CLYDE];export const GHOST_COLORS={[GhostName.BLINKY]:"#FF2E2E",[GhostName.PINKY]:"#FFB8FF",[GhostName.INKY]:"#36E2FF",[GhostName.CLYDE]:"#FFB852"};export const COLORS={BOARD:"#0A0A2E",WALL:"#2742F0",WALL_EDGE:"#5A72FF",DOT:"#FFE2B0",PELLET:"#FFF4D6",PACMAN:"#FFE000",FRUIT:"#FF4040",FRUIT_STEM:"#4CAF50",FRIGHTENED:"#2334E8",FRIGHTENED_FLASH:"#F4F4FF",EYE:"#FFFFFF",PUPIL:"#1A1A6E"};export const LIGHT=frontLight([-.35,.5,1],.5);export const TILT=.34;export const PACMAN_MAZE=[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1],[1,3,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,3,1],[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1],[1,2,1,1,2,1,2,1,1,1,1,1,2,1,2,1,1,2,1],[1,2,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,2,1],[1,1,1,1,2,1,1,1,0,1,0,1,1,1,2,1,1,1,1],[0,0,0,1,2,1,0,0,0,0,0,0,0,1,2,1,0,0,0],[1,1,1,1,2,1,0,1,1,5,1,1,0,1,2,1,1,1,1],[6,0,0,0,2,0,0,1,4,4,4,1,0,0,2,0,0,0,6],[1,1,1,1,2,1,0,1,1,1,1,1,0,1,2,1,1,1,1],[0,0,0,1,2,1,0,0,0,0,0,0,0,1,2,1,0,0,0],[1,1,1,1,2,1,0,1,1,1,1,1,0,1,2,1,1,1,1],[1,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1],[1,2,1,1,2,1,1,1,2,1,2,1,1,1,2,1,1,2,1],[1,3,2,1,2,2,2,2,2,0,2,2,2,2,2,1,2,3,1],[1,1,2,1,2,1,2,1,1,1,1,1,2,1,2,1,2,1,1],[1,2,2,2,2,1,2,2,2,1,2,2,2,1,2,2,2,2,1],[1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,1,1,2,1],[1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]];export const PACMAN_START={x:9,y:15};export const GHOST_START={[GhostName.BLINKY]:{x:9,y:7},[GhostName.PINKY]:{x:9,y:9},[GhostName.INKY]:{x:8,y:9},[GhostName.CLYDE]:{x:10,y:9}};export const GHOST_SCATTER={[GhostName.BLINKY]:{x:17,y:0},[GhostName.PINKY]:{x:1,y:0},[GhostName.INKY]:{x:17,y:20},[GhostName.CLYDE]:{x:1,y:20}};export const GHOST_RELEASE={[GhostName.BLINKY]:0,[GhostName.PINKY]:2,[GhostName.INKY]:5,[GhostName.CLYDE]:8};export const HOUSE_DOOR={x:9,y:9};const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120,RIM=0,WALL_STAND=1.4;export function getLayout(t,o,e){const E=getScoreBoardTop(e)+82,T=Math.max(200,o-E-120),s=gameWidthFor(t)/19,N=T/(21*Math.cos(.34)+1.4*Math.sin(.34)),r=Math.max(6,Math.floor(Math.min(s,N)));return{width:t,height:o,tilt:.34,centerY:E+T/2,cell:r,sizeX:19*r,sizeY:21*r}}export const gridPoint=(t,o,e)=>[o*t.cell-t.sizeX/2,t.sizeY/2-e*t.cell];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{CHASE_TIME,CHOMP_TIME,FLASH_TIME,FRUIT_SPAWN_DOTS,FRUIT_TIME,GHOST_LIST,GHOST_RELEASE,GHOST_STEP,GhostMode,GhostName,INITIAL_LIVES,PAC_STEP,POINTS_PER_FRUIT,POINTS_PER_GHOST,POWER_PELLET_TIME,SCATTER_TIME,TIME_LIMIT}from"./PacManConstants.js";import{collides,eatAt,frightenGhosts,initGhosts,initMaze,initPacman,moveGhost as _0x46d98f,reachedHouse,releaseGhost,stepPacman}from"./PacManRules.js";import{buildScene,clearDots,dressGhost,eatDot,fruitEaten,ghostEaten,moveGhost as _0x4d6880,movePacman,pacmanHit,placeFruit,removeScene,setPacman,setSceneTheme,startChomp,stopChomp}from"./PacManScene.js";const WORLD_CAPACITY=500,MAX_STEP=.1,SWIPE=15;export function createGame(e){const o=new World(500),n=initMaze(),t={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",maze:n,pacman:initPacman(),ghosts:initGhosts(),fruit:null,fruitExpireAt:0,get score(){return o.scoreboard.score},get lives(){return o.scoreboard.lives},won:!1,combo:0,mode:GhostMode.SCATTER,modeTimer:SCATTER_TIME,elapsed:0,get timeLeft(){return o.scoreboard.shownSeconds},clock:0,pacPending:0,ghostPending:0,anchor:null,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(INITIAL_LIVES,TIME_LIMIT),o.scoreboard.handlers={onScore:e=>t.onScore(e),onSecond:e=>t.onTime(e),onTimeUp:()=>"playing"===t.phase&&lose(t)},t}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),redraw(e),"playing"===e.phase?startChomp(e.world,e.scene,CHOMP_TIME):stopChomp(e.world,e.scene)}export function setTheme(e,o){e.theme=o,e.scene&&setSceneTheme(e.world,e.scene,o)}function redraw(e){const{layout:o,scene:n}=e;if(o&&n){setPacman(e.world,o,n,e.pacman.x,e.pacman.y,e.pacman.direction);for(const t of GHOST_LIST){const s=e.ghosts.find(e=>e.name===t);_0x4d6880(e.world,o,n,t,s.x,s.y,0,!0),dressGhost(e.world,o,n,t,s.mode,s.isFlashing)}placeFruit(e.world,o,n,e.fruit)}}function home(e){e.maze=initMaze(),e.pacman=initPacman(),e.ghosts=initGhosts(),e.fruit=null,e.won=!1,e.combo=0,e.mode=GhostMode.SCATTER,e.modeTimer=SCATTER_TIME,e.elapsed=0,e.pacPending=0,e.ghostPending=0,e.world.scoreboard.reset(INITIAL_LIVES,TIME_LIMIT),e.scene&&(clearDots(e.world,e.scene),removeScene(e.world,e.scene),e.scene=e.layout?buildScene(e.world,e.layout,e.theme):null),redraw(e)}export function start(e){"ready"===e.phase&&(home(e),e.world.scoreboard.startCountdown(TIME_LIMIT),e.phase="playing",e.scene&&startChomp(e.world,e.scene,CHOMP_TIME),e.onScore(0),e.onLives(INITIAL_LIVES),e.onTime(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){home(e),e.phase="ready",e.anchor=null,e.scene&&stopChomp(e.world,e.scene),e.onScore(0),e.onLives(INITIAL_LIVES),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function drag(e,{phase:o,x:n,y:t}){if("start"===o)return void(e.anchor=[n,t]);const s=e.anchor;if(!s||"playing"!==e.phase)return;const a=n-s[0],r=t-s[1];if(Math.abs(a)<=15&&Math.abs(r)<=15)return;const i=Math.abs(a)>Math.abs(r)?a>0?"RIGHT":"LEFT":r>0?"DOWN":"UP";e.pacman.nextDirection=i,e.anchor="end"===o?null:[n,t]}export function tick(e,o){if(e.world.isDisposed)return;const n=Math.min(o,.1);if(e.clock+=n,"playing"===e.phase){for(e.elapsed+=n,advanceModes(e,n),advanceFright(e,n),e.pacPending+=n;"playing"===e.phase&&e.pacPending>=PAC_STEP;)e.pacPending-=PAC_STEP,pacStep(e);for(e.ghostPending+=n;"playing"===e.phase&&e.ghostPending>=GHOST_STEP;)e.ghostPending-=GHOST_STEP,ghostStep(e);e.fruit&&e.clock>=e.fruitExpireAt&&(e.fruit=null,e.layout&&e.scene&&placeFruit(e.world,e.layout,e.scene,null))}e.world.update(o)}function advanceModes(e,o){if(e.modeTimer-=o,e.modeTimer>0)return;const n=e.mode===GhostMode.SCATTER?GhostMode.CHASE:GhostMode.SCATTER;e.mode=n,e.modeTimer=n===GhostMode.SCATTER?SCATTER_TIME:CHASE_TIME;for(const o of e.ghosts)o.mode!==GhostMode.SCATTER&&o.mode!==GhostMode.CHASE||(o.mode=n);dressAll(e)}function advanceFright(e,o){let n=!1;for(const t of e.ghosts){if(t.mode!==GhostMode.FRIGHTENED)continue;t.frightenedTimer-=o;const s=t.frightenedTimer<FLASH_TIME;s!==t.isFlashing&&(t.isFlashing=s,n=!0),t.frightenedTimer<=0&&(t.mode=e.mode,t.isFlashing=!1,n=!0)}n&&dressAll(e)}function pacStep(e){const{layout:o,scene:n}=e;if(!o||!n)return;const{moved:t,wrapped:s}=stepPacman(e.pacman,e.maze.cells);t&&movePacman(e.world,o,n,e.pacman.x,e.pacman.y,e.pacman.direction,PAC_STEP,s);const a=eatAt(e.maze,e.pacman.x,e.pacman.y);if(a){e.world.scoreboard.add(a.points),eatDot(e.world,n,e.pacman.x,e.pacman.y),a.pellet?(e.ghosts=frightenGhosts(e.ghosts,POWER_PELLET_TIME),e.combo=0,dressAll(e),e.onEvent("pellet")):e.onEvent("chomp");const t=e.maze.totalDots-e.maze.dotsRemaining;!e.fruit&&FRUIT_SPAWN_DOTS.includes(t)&&(e.fruit={x:9,y:11},e.fruitExpireAt=e.clock+FRUIT_TIME,placeFruit(e.world,o,n,e.fruit))}e.fruit&&e.pacman.x===e.fruit.x&&e.pacman.y===e.fruit.y&&(e.world.scoreboard.add(POINTS_PER_FRUIT),fruitEaten(e.world,o,n,e.fruit.x,e.fruit.y),e.fruit=null,e.onEvent("fruit")),checkCollisions(e)||0===e.maze.dotsRemaining&&win(e)}function ghostStep(e){const{layout:o,scene:n}=e;if(!o||!n)return;for(let o=0;o<e.ghosts.length;o++){const n=e.ghosts[o];n.mode===GhostMode.IN_HOUSE&&e.elapsed>=GHOST_RELEASE[n.name]&&(e.ghosts[o]=releaseGhost(n))}const t=e.ghosts.find(e=>e.name===GhostName.BLINKY)??null,s=t?{x:t.x,y:t.y}:null;for(let t=0;t<e.ghosts.length;t++){let a=reachedHouse(e.ghosts[t]);const r=a.x;a=_0x46d98f(e.maze.cells,a,e.pacman,s),e.ghosts[t]=a;const i=Math.abs(a.x-r)>1;_0x4d6880(e.world,o,n,a.name,a.x,a.y,GHOST_STEP,i)}dressAll(e),checkCollisions(e)}function checkCollisions(e){const{layout:o,scene:n}=e;if(!o||!n)return!1;for(let t=0;t<e.ghosts.length;t++){const s=e.ghosts[t];if(collides(e.pacman,s))if(s.mode===GhostMode.FRIGHTENED)e.combo++,e.world.scoreboard.add(POINTS_PER_GHOST*Math.pow(2,e.combo-1)),s.mode=GhostMode.EATEN,s.isFlashing=!1,dressGhost(e.world,o,n,s.name,s.mode,!1),ghostEaten(e.world,o,s.x,s.y),e.onEvent(e.combo>1?"eatGhostCombo":"eatGhost");else if(s.mode!==GhostMode.EATEN&&s.mode!==GhostMode.IN_HOUSE&&s.mode!==GhostMode.LEAVING_HOUSE)return loseLife(e),!0}return!1}function loseLife(e){const{layout:o,scene:n}=e;e.onLives(Math.max(0,e.world.scoreboard.addLives(-1))),o&&n&&pacmanHit(e.world,o,e.pacman.x,e.pacman.y),e.lives<=0?lose(e):(e.onEvent("lifeLost"),e.pacman={...initPacman(),direction:"NONE",nextDirection:"NONE"},e.ghosts=initGhosts(),e.combo=0,e.elapsed=0,e.pacPending=0,e.ghostPending=0,redraw(e))}function win(e){e.won=!0,end(e)}function lose(e){e.won=!1,end(e)}function end(e){e.world.scoreboard.stop(),e.phase="over",e.anchor=null,e.scene&&stopChomp(e.world,e.scene),e.onPhase("over")}function dressAll(e){const{layout:o,scene:n}=e;if(o&&n)for(const t of e.ghosts)dressGhost(e.world,o,n,t.name,t.mode,t.isFlashing)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{CellType,COLS,DIRECTIONS,GHOST_SCATTER,GHOST_START,GhostMode,GhostName,OPPOSITE,PACMAN_MAZE,PACMAN_START,ROWS}from"./PacManConstants.js";const GHOST_DIRS=["UP","DOWN","LEFT","RIGHT"];export function initMaze(){const t=PACMAN_MAZE.map(t=>[...t]);let e=0;for(const o of t)for(const t of o)t!==CellType.DOT&&t!==CellType.POWER_PELLET||e++;return{cells:t,dotsRemaining:e,totalDots:e}}export const initPacman=()=>({x:PACMAN_START.x,y:PACMAN_START.y,direction:"LEFT",nextDirection:"LEFT"});const makeGhost=(t,e)=>({name:t,x:GHOST_START[t].x,y:GHOST_START[t].y,direction:"UP",mode:e,previousMode:GhostMode.SCATTER,frightenedTimer:0,isFlashing:!1});export const initGhosts=()=>[makeGhost(GhostName.BLINKY,GhostMode.SCATTER),makeGhost(GhostName.PINKY,GhostMode.IN_HOUSE),makeGhost(GhostName.INKY,GhostMode.IN_HOUSE),makeGhost(GhostName.CLYDE,GhostMode.IN_HOUSE)];export function canMove(t,e,o){if(o<0||o>=ROWS)return!1;if(e<0||e>=COLS)return!0;const n=t[o]?.[e];return n!==CellType.WALL&&n!==CellType.GHOST_DOOR}export function canGhostMove(t,e,o,n){if(o<0||o>=ROWS)return!1;if(e<0||e>=COLS)return!0;const s=t[o]?.[e];return s===CellType.GHOST_DOOR?n.mode===GhostMode.LEAVING_HOUSE||n.mode===GhostMode.EATEN:s!==CellType.WALL}export function stepPacman(t,e){if(t.nextDirection!==t.direction){const o=DIRECTIONS[t.nextDirection];canMove(e,t.x+o.x,t.y+o.y)&&(t.direction=t.nextDirection)}const o=DIRECTIONS[t.direction];let n=t.x+o.x;const s=t.y+o.y;let r=!1;return n<0?(n=COLS-1,r=!0):n>=COLS&&(n=0,r=!0),canMove(e,n,s)?(t.x=n,t.y=s,{moved:!0,wrapped:r}):{moved:!1,wrapped:!1}}export function eatAt(t,e,o){const n=t.cells[o];return n?n[e]===CellType.DOT?(n[e]=CellType.EMPTY,t.dotsRemaining--,{points:100,pellet:!1}):n[e]===CellType.POWER_PELLET?(n[e]=CellType.EMPTY,t.dotsRemaining--,{points:500,pellet:!0}):null:null}function chaseTarget(t,e,o){const n=DIRECTIONS[e.direction];switch(t.name){case GhostName.BLINKY:return{x:e.x,y:e.y};case GhostName.PINKY:return{x:Math.max(0,Math.min(COLS-1,e.x+4*n.x)),y:Math.max(0,Math.min(ROWS-1,e.y+4*n.y))};case GhostName.INKY:if(o){const t=e.x+2*n.x,s=e.y+2*n.y;return{x:Math.max(0,Math.min(COLS-1,t+(t-o.x))),y:Math.max(0,Math.min(ROWS-1,s+(s-o.y)))}}return{x:e.x,y:e.y};case GhostName.CLYDE:return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)>8?{x:e.x,y:e.y}:GHOST_SCATTER[GhostName.CLYDE];default:return{x:e.x,y:e.y}}}const wrap=t=>t<0?COLS-1:t>=COLS?0:t;function candidates(t,e,o){o.length=0;const n=OPPOSITE[e.direction];for(const s of GHOST_DIRS){const r=DIRECTIONS[s];s!==n&&canGhostMove(t,e.x+r.x,e.y+r.y,e)&&o.push(s)}if(!o.length){const s=DIRECTIONS[n];canGhostMove(t,e.x+s.x,e.y+s.y,e)&&o.push(n)}return o.length}const ghostDirections=[];function toward(t,e,o,n){const s={...e};if(!candidates(t,e,ghostDirections))return s;let r=ghostDirections[0],i=1/0;for(const t of ghostDirections){const s=DIRECTIONS[t],a=e.x+s.x-o,T=e.y+s.y-n,h=a*a+T*T;h<i&&(i=h,r=t)}const a=DIRECTIONS[r];return s.x=wrap(e.x+a.x),s.y=e.y+a.y,s.direction=r,s}function randomly(t,e){const o={...e};if(!candidates(t,e,ghostDirections))return o;const n=ghostDirections[Math.floor(Math.random()*ghostDirections.length)],s=DIRECTIONS[n];return o.x=wrap(e.x+s.x),o.y=e.y+s.y,o.direction=n,o}export function moveGhost(t,e,o,n){switch(e.mode){case GhostMode.IN_HOUSE:return{...e};case GhostMode.LEAVING_HOUSE:{const t={...e};return e.y>7?(t.y--,t.direction="UP"):(t.mode=GhostMode.SCATTER,t.direction="LEFT"),t}case GhostMode.EATEN:return toward(t,e,9,9);case GhostMode.FRIGHTENED:return randomly(t,e);case GhostMode.SCATTER:{const o=GHOST_SCATTER[e.name];return toward(t,e,o.x,o.y)}case GhostMode.CHASE:{const s=chaseTarget(e,o,n);return toward(t,e,s.x,s.y)}default:return{...e}}}export function frightenGhosts(t,e){return t.map(t=>t.mode===GhostMode.EATEN||t.mode===GhostMode.IN_HOUSE?t:{...t,previousMode:t.mode,mode:GhostMode.FRIGHTENED,frightenedTimer:e,isFlashing:!1,direction:OPPOSITE[t.direction]})}export const releaseGhost=t=>t.mode===GhostMode.IN_HOUSE?{...t,mode:GhostMode.LEAVING_HOUSE}:t;export const reachedHouse=t=>t.mode===GhostMode.EATEN&&9===t.x&&9===t.y?{...t,mode:GhostMode.LEAVING_HOUSE}:t;export const collides=(t,e)=>t.x===e.x&&t.y===e.y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,merge,Path,quat,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{createGameMesh as _0x43cd99}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{CellType,COLORS,COLS,GHOST_COLORS,GHOST_LIST,GhostMode,gridPoint,PACMAN_MAZE,ROWS}from"./PacManConstants.js";const BOARD_DEPTH=.18,WALL_H=.62,BACKDROP_DEPTH=24,cube=()=>shapeGeometry("cube");let boardModel=null;function boardMesh(){if(boardModel)return boardModel;const o=COLS/2,e=ROWS/2,t=toColor(COLORS.WALL),s=toColor(COLORS.WALL_EDGE),n=toColor(COLORS.BOARD),l=[{geometry:cube(),position:[0,0,-.09],scale:[COLS,ROWS,.18],color:n}];for(let n=0;n<ROWS;n++)for(let a=0;a<COLS;a++){if(PACMAN_MAZE[n][a]!==CellType.WALL)continue;const r=a+.5-o,i=e-(n+.5);l.push({geometry:cube(),position:[r,i,.31],scale:[1,1,.62],color:t}),l.push({geometry:cube(),position:[r,i,.63],scale:[.78,.78,.04],color:s})}return boardModel=_0x43cd99(merge(l),{center:!1,shine:.25}),boardModel}const dotKey=(o,e)=>e*COLS+o,worldAt=(o,e,t,s)=>{const[n,l]=gridPoint(o,e,t);return[n,l,s]},MOUTH_ANGLE={RIGHT:Math.PI/2,LEFT:-Math.PI/2,UP:Math.PI,DOWN:0,NONE:Math.PI/2},mouthRotation=o=>quat.z(MOUTH_ANGLE[o]);function spawnDots(o,e,t){const s=.22*e.cell;for(let n=0;n<ROWS;n++)for(let l=0;l<COLS;l++){const a=PACMAN_MAZE[n][l];a===CellType.DOT?t.dots.set(dotKey(l,n),o.spawn({mesh:"sphere",position:worldAt(e,l+.5,n+.5,s),scale:.17*e.cell,color:toColor(COLORS.DOT),pickable:!1})):a===CellType.POWER_PELLET&&t.dots.set(dotKey(l,n),o.spawn({mesh:"sphere",position:worldAt(e,l+.5,n+.5,.3*e.cell),scale:.46*e.cell,color:toColor(COLORS.PELLET),bob:{amplitude:[0,0,.08*e.cell],speed:5},pickable:!1}))}}const solid=o=>{const[e,t,s]=toColor(o),n=2/Math.max(e,t,s,.01);return[e*n,t*n,s*n,1]},THICK=.3,BODY_Z=-.35,TOP_Z=.15-.35+.01;let pacModel=null,mouthModel=null,ghostModel=null,discModel=null;const pacMesh=()=>pacModel??=_0x43cd99(extrude((new Path).addCircle(0,0,.5),{depth:.3})),mouthMesh=()=>{if(mouthModel)return mouthModel;const o=(new Path).moveTo(0,0);for(let e=0;e<=8;e++){const t=e/8*.62*2-.62;o.lineTo(.56*Math.sin(t),.56*Math.cos(t))}return o.close(),mouthModel=_0x43cd99(extrude(o,{depth:0}),{center:!1}),mouthModel},ghostMesh=()=>{if(ghostModel)return ghostModel;const o=[];for(let e=0;e<=16;e++){const t=e/16*Math.PI;o.push([.5*Math.cos(t),.05+.5*Math.sin(t)])}o.push([-.5,-.38]);for(let e=0;e<=6;e++)o.push([e/6*1-.5,e%2?-.5:-.36]);o.push([.5,-.38]);const e=(new Path).moveTo(o[0][0],-o[0][1]);for(const[t,s]of o.slice(1))e.lineTo(t,-s);return e.close(),ghostModel=_0x43cd99(extrude(e,{depth:.3})),ghostModel},flatDisc=()=>discModel??=_0x43cd99(extrude((new Path).addCircle(0,0,.5),{depth:0}));function spawnPacman(o,e){const t=.86*e.cell,s=o.spawn({mesh:"none",position:worldAt(e,9.5,15.5,t/2),pickable:!1});return o.spawn({mesh:pacMesh(),parent:s,position:[0,0,-.35*t],scale:t,color:solid(COLORS.PACMAN),pickable:!1}),{pacman:s,mouth:o.spawn({mesh:mouthMesh(),parent:s,position:[0,0,TOP_Z*t],rotation:mouthRotation("LEFT"),scale:t,color:toColor(COLORS.BOARD),pickable:!1})}}function spawnGhost(o,e,t){const s=.86*e.cell,n=o.spawn({mesh:"none",position:worldAt(e,9.5,7.5,.5*s),pickable:!1}),l=o.spawn({mesh:ghostMesh(),parent:n,position:[0,0,-.35*s],scale:s,color:solid(GHOST_COLORS[t]),pickable:!1}),a=e=>o.spawn({mesh:flatDisc(),parent:n,position:[e*s*.19,.1*s,TOP_Z*s],scale:[.26*s,.32*s,1],color:solid(COLORS.EYE),pickable:!1}),r=e=>o.spawn({mesh:flatDisc(),parent:n,position:[e*s*.19,.06*s,(TOP_Z+.01)*s],scale:.13*s,color:solid(COLORS.PUPIL),pickable:!1});return{root:n,body:l,eyes:[a(-1),a(1)],pupils:[r(-1),r(1)]}}export function buildScene(o,e,t){const s=spawnBackdrop(o,e.width,e.height,-24,t);placeTiltedBackdrop(o,s,e,24);const n=o.spawn({mesh:boardMesh(),scale:e.cell,color:[1,1,1,1],pickable:!1}),{pacman:l,mouth:a}=spawnPacman(o,e),r={};for(const t of GHOST_LIST)r[t]=spawnGhost(o,e,t);const i={backdrop:s,board:n,dots:new Map,pacman:l,mouth:a,mouthSize:.86*e.cell,ghosts:r,fruit:null};return spawnDots(o,e,i),i}export function removeScene(o,e){o.despawn(e.backdrop),o.despawn(e.board);for(const t of e.dots.values())o.despawn(t);o.despawn(e.pacman);for(const t of GHOST_LIST)o.despawn(e.ghosts[t].root);null!=e.fruit&&o.despawn(e.fruit)}export function setSceneTheme(o,e,t){setBackdropTheme(o,e.backdrop,t)}export function eatDot(o,e,t,s){const n=e.dots.get(dotKey(t,s));null!=n&&(o.despawn(n),e.dots.delete(dotKey(t,s)))}export function clearDots(o,e){for(const t of e.dots.values())o.despawn(t);e.dots.clear()}export function placeFruit(o,e,t,s){if(null!=t.fruit&&(o.despawn(t.fruit),t.fruit=null),!s)return;const n=.7*e.cell,l=o.spawn({mesh:"none",position:worldAt(e,s.x+.5,s.y+.5,n/2),bob:{amplitude:[0,0,.1*e.cell],speed:4},pickable:!1});o.spawn({mesh:"sphere",parent:l,scale:n,color:toColor(COLORS.FRUIT),pickable:!1}),o.spawn({mesh:"cylinder",parent:l,position:[0,.1*n,.5*n],scale:[.08*n,.4*n,.08*n],color:toColor(COLORS.FRUIT_STEM),pickable:!1}),o.set(l,{scale:.01}),o.animate(l,{scale:1},{duration:.25,easing:"back"}),t.fruit=l}export function fruitEaten(o,e,t,s,n){effects.sparkle(o,{position:worldAt(e,s+.5,n+.5,.5*e.cell),count:18,size:.12*e.cell,speed:5*e.cell,lifetime:.5,gravity:8*-e.cell,colors:[toColor("#FF5252"),toColor("#FFCDD2"),[1,1,1,1]]}),placeFruit(o,e,t,null)}export function movePacman(o,e,t,s,n,l,a,r){const i=.86*e.cell,p=worldAt(e,s+.5,n+.5,i/2);o.set(t.mouth,{rotation:mouthRotation(l)}),r?o.set(t.pacman,{position:p}):o.animate(t.pacman,{position:p},{duration:a,easing:"linear"})}export function setPacman(o,e,t,s,n,l){const a=.86*e.cell;o.stopAnimation(t.pacman),o.set(t.pacman,{position:worldAt(e,s+.5,n+.5,a/2)}),o.set(t.mouth,{rotation:mouthRotation(l)})}export function startChomp(o,e,t){o.stopAnimation(e.mouth),o.set(e.mouth,{scale:.05*e.mouthSize}),o.animate(e.mouth,{scale:e.mouthSize},{duration:t,easing:"easeInOut",repeat:"forever",yoyo:!0})}export function stopChomp(o,e){o.stopAnimation(e.mouth),o.set(e.mouth,{scale:.6*e.mouthSize})}export function pacmanHit(o,e,t,s){effects.explosion(o,{position:worldAt(e,t+.5,s+.5,.5*e.cell),count:26,size:.5*e.cell,speed:4*e.cell,lifetime:.6,colors:[toColor("#FFE000"),toColor("#FFB000")]})}const ghostLook=(o,e,t)=>o===GhostMode.FRIGHTENED?solid(t?COLORS.FRIGHTENED_FLASH:COLORS.FRIGHTENED):solid(GHOST_COLORS[e]);export function moveGhost(o,e,t,s,n,l,a,r){const i=.86*e.cell,p=worldAt(e,n+.5,l+.5,.5*i),d=t.ghosts[s];r?o.set(d.root,{position:p}):o.animate(d.root,{position:p},{duration:a,easing:"linear"})}export function dressGhost(o,e,t,s,n,l){const a=.86*e.cell,r=t.ghosts[s],i=n===GhostMode.EATEN;o.set(r.body,{scale:i?0:a,color:ghostLook(n,s,l)})}export function ghostEaten(o,e,t,s){effects.sparkle(o,{position:worldAt(e,t+.5,s+.5,.5*e.cell),count:16,size:.12*e.cell,speed:4*e.cell,lifetime:.4,gravity:6*-e.cell,colors:[toColor("#80DEFF"),[1,1,1,1]]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x3646bd=_0xf45e;!function(){const e=_0xf45e,o=_0x1601();for(;;)try{if(398454==parseInt(e(396,"gHlp"))/1+-parseInt(e(400,"Bv66"))/2+-parseInt(e(370,"zn7m"))/3*(-parseInt(e(351,"F)wE"))/4)+parseInt(e(281,"adaX"))/5+-parseInt(e(268,"]MGh"))/6*(-parseInt(e(284,"()[S"))/7)+parseInt(e(379,"0QHT"))/8+parseInt(e(302,"p4Mn"))/9*(-parseInt(e(338,"uWYi"))/10))break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x96a7a3 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x560c68}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{usePaperIoStore,useGameOver,useWon,useIsPlaying}from"./PaperIoStore.js";function _0x1601(){const e=["q8k5W5Xfh8kbaG","WQpdI29aWQrjW4tdQa","h8oWW5VcNSk4wComWQa","nSozb0RdIvGvWQfR","WQVdGeH2WQrCW5NdO8oSW6xdUwiIC2tcKG","WRa6W5hdSG","WPe1AZKy","xSopl8oBwb9+W7K","yYxcGaz/","W6bLaMZcJ2NdImof","W5/dRWLmWPDWWOi","W7HLiN0","WQFdM2LHWRvgW4q","W7/cGYiSBKCMW5/cI8kcbgu","W5/cOriZrG","wSotBSkpg8o1dW","W7RcVX4LWPZdKvFcJuu","W4WqWPbZyHGV","CdtcHSk1jSolW44qdG","F8kPWO0hWOu","W7pdS8oVWOFdTW","tmkokWipWRz3","ySkUWQddLCkL","xmklWRiWWRldMCoEgW","WOFdVSk3WRxdKrhcRMH0W5e","sCozW4hcTSoocSo4","W5FdH1RcGsTmwsq","CSoGmCkQeCoEW4FdU8kp","WOZcMW7dOSoSW7JdQuldGSkZWRHsW4S","DSoMlCopeSorW4nVW6GUWQu","aSocDCkSWRm8ymk4EG","W4JdKvpcGmk8WQW","udtcHNfbd8krjSkl","WQNcLmoAWQ3cHW","sCoPgmkQdW","u8ohomkwtG","BmkszXtcIavhWOvKf2hcJY0","WO0lW5dcSmkqW6nNWQqdW4el","jSo2sSkBWOKDqG","D8k3aCoAW55kamkTyCovWPdcT8oV","WQKSpComvLBdMa","W57dRW9kWP1WWQixhSoU","C2tcULhcKmo+W7ehWRe","W4NdJ2VdI3iE","WRhdK8oOymkJW6m2C8oqlCkkrGW","x8oFW5BcICoocCoJ","omoyW6u","lCoqW6JcSmknDmoQWPRcQrJdPmkwW4Hrtq","tGxcO8kob8ob","t2dcV1hcTCkOWQZdJW","Amkqf2lcOCkOW73dQYCDW4ON","oSocW67cNSkmymoGWOZcSW","fdRcVCotpq","nSoMtmk5WOast8kurSo2","W7ldTCoZWPddPHqezW0","W4/dH0xcT8kTWO3cUeddHG","AutdVtNcPqJcHSkawx81bq","W4NcLYCmWQy","W5Oac8k2WPpcJLW","W7xdO8oLWRBdSZ8jAaNcRbC","gaVcSSoybSkuW6HGbmk5bG","W4FdI3/dLNibsq","Bmo7gmoGeSoeW65QW6GKWQa","CcpcImk1nW","zwlcRwBcK8o2W6a","W4/dUrrmWPC","umoeeSkkn8ogW6/dMq","WRpcQmk2W4lcOgDvqGlcVq08WOG","Dmo0g8kjEXfrWRxcSG","wqxcIdv1WORcHJz5WPW","W7fXv8kY","WOFdGNP6WR0iW53dOSo5W7pcMMyIC2FdL8kceCkQW7nIeColcSoTqvOfW7GrumoeW5tcGCkgCW","FCopD8kWfW","W6JcKYiSyL09","CSolfCk6cG","B1/dRINcRapcOq","WOBdVSkWWOddItFcTMX/","W6lcIdKQBLiLW4tcImk3","s3dcUxdcPmkNWQW","WOhcKLtcHqvCssy","WPryW6JcLmkRdSouWRpdPa","WO/cHuxcPcu","WQmLW5hdMmkDW5a","W7n24OkGWQRcJmoeWQe4WRVcO8k/hCkDWQO","E8oVySkRWRNcHetcGCkJghRdKq","uXRcOCkeja","W7pdJeddLva","Dmo5dmk2DW","WOnLrw4vgazpfwjREW","WQP7yZ8hW6lcVI5rWPu","wCojW4FcH8okcmoGdLPgW5xdMa","m8oDvYpdT8oWW6S","xK7dOSkIvSokW657imk7cmov","omopjxddJLadWQG","WRJcPSoqWOVcJ8oZ","Es/cUcHm","W4izWOzHBqO6","WRuJW4BdUmkDW5JcRa","krhcVmowdG","W7RcVX4LW6pdKvFcJuu","WONcMxpcVHbpwa","WPpcHexcHbrB","W7hcLmk1eCoYWRPTsCoCjSkk","W6HTqCkscCkyWPJdIvK","ymojACoD","W5tcI8kXk8kZWPDMsSouk8oa","W7/dS17dVLJdHSk5","yCoblSo8cG","WPauFZSeasm","gHhcUq","W4q8qrfsWRLD","wSkCicWpWRC","WOCeFZSigZJcMMNdUWzz","aM3dMZqquSojDCkaWPtcKhxcS8oh","W77cLtumyLu","WP3dQmktWONdNaNcVM99","zCkKWOSbWONdP8o7prtcTa","W7XPx8kWsmoi","WPryW6JcKSkSbmoDWRldSrLz","puxdGSk2WQGsxrSXW5ldGZeD","B8khkSoQeGeLWQldSgtcHJtcSGBdP8ke","WOddTmkqWPhdJXNcUwy","bSo2W5VcJCo7WQldLSoBWRNdT8oydCoI","WPulzWvsWRvIkq","W6ZcGYqnC1i9W4G","qmkNWPFdI8kIW7NcHSoW","oSk4W7yGWPG","WReZW4ddMCkmW5FcRh0","W6f5neRcMgy","W7FcK8k/iSouWRDStG","WOysAaWhctlcI2q","WRBdI2H2WQrVW5hdOmoU","WPj5ssea","WPmhqZvs","ymoGoSo+fSotW5S","pmoFi1hdN18d","W4bAkMuuW60GhbWhW5eRwa","W6pdPCoYWOFdTZ0r","W6GyoXHLEI1feG","W6VdReNdSuiN","b8oEBmo7qfbYW6dcQvlcTHJdPGS","W4ihWOzHDXO","FYZcVmoWW54","vSkSWOldNCkNW7lcQCoIWQtdQ8oAiCoE","WPjEW6/cOSkUgSoyWRldTq","WQpcPxlcMsm","WOhcLK3cSZHz","W5PpECkHAmo9W68","E1hcILdcLq","WOysAaOaaZVcINhdIa4"];return(_0x1601=function(){return e})()}import{PaperIoService}from"./PaperIoService.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{jsx as _0x133ea3,jsxs as _0x2b7858}from"react/jsx-runtime";const PaperIoComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:W,onReplayGame:a,onShare:t,onShareScreenshot:r,onShowLeaderboard:n,bannerAd:d})=>{const s="cyX4",S="uWYi",m="$nn%",i="vu00",u=_0xf45e,k={TGBmA:function(e,o,W){return e(o,W)},bTfpy:function(e,o,W){return e(o,W)},SNaGc:function(e,o){return e(o)},wFoWw:u(271,"da4N"),IlZej:u(323,"ZR3k"),syvMx:function(e,o){return e===o},yBjHZ:u(273,"jgV8"),rSdEm:"Cells Captured",TFilQ:function(e,o){return e||o},vYjKY:function(e,o,W){return e(o,W)},irerT:function(e,o,W){return e(o,W)}},p=_0x96a7a3[u(279,"Hg!p")](e?.enableSounds??!0);p.current=e?.[u(368,"1k&n")]??!0;const x=_0x96a7a3[u(394,"gbD@")](e?.enableHaptics??!0);x[u(322,"bbfa")]=e?.[u(305,"()[S")]??!0;const f=e?.[u(301,"XAJV")]??0,G=_0x96a7a3[u(413,"uWYi")](W);G[u(409,"gbD@")]=W;const l=_0x96a7a3.useRef(a);l.current=a;const _=useGameOver(),C=useWon(),P=useIsPlaying(),O=k.TFilQ(_,C),R=_0x96a7a3.useRef(!1),I=_0x96a7a3.useRef(0),y=_0x96a7a3[u(343,"zuqv")](0),h=_0x96a7a3[u(290,"ZR3k")](0),H=_0x96a7a3[u(276,"iBjW")](!1),Q=_0x96a7a3[u(371,"0QHT")](e=>{const o=u;if(G.current&&!H.current){const W=usePaperIoStore.getState()[o(375,"PY#k")];G[o(299,"0QHT")]({status:e,score:W[o(321,"ZR3k")]()}),H[o(376,"Sz^t")]=!0}},[]),b=_0x96a7a3[u(333,"jgV8")](()=>new PaperIoService,[]),v=_0x96a7a3[u(372,"da4N")](()=>{const e=u;k[e(347,"vu00")](playSound,GAME_SOUNDS.PAPER_IO[e(373,"XAJV")],p[e(327,"qRYY")]),k[e(326,"iBjW")](playHaptic,HapticType[e(360,"PY#k")],x.current)},[]),q=_0x96a7a3[u(280,"4x!6")](()=>{const e=u;k[e(318,"l!%$")](playHaptic,HapticType[e(300,"Bv66")],x[e(387,"1k&n")])},[]),g=_0x96a7a3.useCallback(()=>{const e=u;playSound(GAME_SOUNDS[e(335,"bl%E")][e(328,"809Z")],p[e(390,"qT(C")]),playHaptic(HapticType[e(307,"uWYi")],x.current)},[]);_0x96a7a3[u(354,"Sz^t")](()=>{b[u(402,"@Xf%")](v,q,g)},[b,v,q,g]),_0x96a7a3[u(363,s)](()=>{const e=u,o={};o[e(294,"hRK3")]=e(397,"PY#k");const W=o;return usePaperIoStore[e(306,"4x!6")](o=>o[e(277,"mdz*")],o=>{const a=e;"PZFCv"!==W[a(334,"()[S")]?(_0x76a86f[a(297,"BzkQ")]=_0x1e632e,_0x2cc261[a(365,"F)wE")](_0x4d80ea)):(R[a(296,"e8qd")]=o,b[a(336,"mdz*")](o))})},[b]),_0x96a7a3[u(415,"gAAG")](()=>{const e=u;if(_&&!H[e(296,"e8qd")]&&k[e(320,"E]:k[e(346,"zcA0")]),O){const o=usePaperIoStore[e(361,"qT(C")]();I[e(324,"]PXn")]=o[e(377,"bbfa")],y.current=o[e(325,"iBjW")],h[e(270,"l!%$")]=o.aiPct}!_&&(H[e(350,"F)wE")]=!1)},[_,C,O,Q]),_0x96a7a3[u(292,"l!%$")](()=>{b[u(278,"bl%E")]()},[b]),_0x96a7a3[u(392,"4x!6")](()=>()=>{const e=_0xf45e;usePaperIoStore[e(289,"gbD@")]().isPlaying&&!H.current&&Q(e(406,"(O)0")),usePaperIoStore[e(286,"iBjW")]()[e(291,"yqcM")](),b[e(408,"z%2]")](),usePaperIoStore[e(391,"uWYi")]()[e(366,"0QHT")]()},[b,Q]);const N=_0x96a7a3[u(414,"yqcM")](()=>{const e=u;e(382,"gAAG"),k[e(399,i)](e(410,"da4N"),e(384,"qRYY"))?(H[e(352,"([eH")]=!1,b[e(339,"zcA0")](),usePaperIoStore[e(405,"BzkQ")]()[e(293,"]PXn")](),b[e(381,"E![f")](),usePaperIoStore.getState()[e(380,i)](),b.setPlaying(!0),b[e(330,"PY#k")](),playSound(GAME_SOUNDS.PAPER_IO[e(310,"qT(C")],p[e(385,"iBjW")]),playHaptic(HapticType[e(309,"Hg!p")],x[e(297,"BzkQ")])):_0x4362e6(_0x48b973?e(358,"cyX4"):CsiWkx[e(386,"zcA0")])},[b]),A=_0x96a7a3[u(341,"e8qd")](()=>{const e=u;Q(k[e(364,"da4N")]),playSound(GAME_SOUNDS[e(378,"zcA0")][e(342,"F)wE")],p[e(403,"Gw&4")]),playHaptic(HapticType[e(355,"XAJV")],x[e(337,"@Xf%")]),b[e(367,"zuqv")](),usePaperIoStore[e(289,"gbD@")]()[e(388,"mdz*")](),b[e(389,"iBjW")]()},[b,Q]),M=_0x96a7a3[u(311,"l!%$")](()=>{const e=u;l[e(296,"e8qd")]?.(),H.current=!1,b.resetGame(),usePaperIoStore.getState().resetGame(),b[e(401,"hRK3")]()},[b]),T={..._0x96a7a3[u(357,"@Xf%")](()=>({isPlaying:!O&&P,gameOver:_,onStartGame:N,onStopGame:A,onShare:t,onShowLeaderboard:n,startButtonSubtext:u(383,"]PXn")}),[O,P,_,N,A,t,n])},L={..._0x96a7a3.useMemo(()=>{const e=u;if(e(304,"adaX")!==e(407,"E![f")){const o=usePaperIoStore[e(313,"]PXn")](),W=_?o[e(332,"0QHT")]:0,a=_?o[e(274,"l!%$")]:0,t=_?o[e(295,m)]:0,r={};return r[e(315,"BzkQ")]=_,r[e(288,"HLbQ")]=W,r[e(374,"e8qd")]=M,r[e(353,"bbfa")]=e(417,"yqcM"),r[e(369,"809Z")]=C?e(319,"vu00"):e(411,"809Z"),r.scoreLabel=k[e(345,"(O)0")],r[e(329,"z%2]")]=C?e(282,"p4Mn")+a+"% to "+t+"%!":e(416,"qRYY")+a+"% vs AI "+t+e(395,"gbD@"),r}{const o=_0x56792a[e(285,m)]()[e(331,"bl%E")];_0x598e65[e(337,"@Xf%")]({status:_0x1a5098,score:o[e(283,"mdz*")]()}),_0x38aa36.current=!0}},[_,C,M])};L[u(412,S)]=r,L.bannerAd=d;const B={};return B[u(308,S)]=GAME_IDS[u(314,s)],B[u(287,"()[S")]=e||DEFAULT_GAME_SETTINGS,B[u(316,"]PXn")]=o,k[u(269,"e8qd")](_0x133ea3,GestureHandlerRootView,{style:styles[u(344,"P2Bl")],children:_0x2b7858(_0x560c68,{offset:f,children:[_0x133ea3(GameArea,{gameService:b,offset:f}),k.vYjKY(_0x133ea3,ScoreBoard,{offset:f}),k.vYjKY(_0x133ea3,GameControlButton,T),_0x133ea3(GameOverModal,L),k[u(393,"uWYi")](_0x133ea3,GameSettingsModal,B)]})})},_0x1effa5={};function _0xf45e(e,o){e-=268;const W=_0x1601();let a=W[e];if(void 0===_0xf45e.WQoanS){const e=function(e,o){let W,a,t=[],r=0,n="";for(e=function(e){let o="",W="";for(let W,a,t=0,r=0;a=e.charAt(r++);~a&&(W=t%4?64*W+a:a,t++%4)?o+=String.fromCharCode(255&W>>(-2*t&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let e=0,a=o.length;e<a;e++)W+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),a=0;a<256;a++)t[a]=a;for(a=0;a<256;a++)r=(r+t[a]+o.charCodeAt(a%o.length))%256,W=t[a],t[a]=t[r],t[r]=W;a=0,r=0;for(let o=0;o<e.length;o++)a=(a+1)%256,r=(r+t[a])%256,W=t[a],t[a]=t[r],t[r]=W,n+=String.fromCharCode(e.charCodeAt(o)^t[(t[a]+t[r])%256]);return n};_0xf45e.dMfZiw=e,_0xf45e.NFGnun={},_0xf45e.WQoanS=!0}const t=W[0];_0xf45e.jMrxWs!==t&&(_0xf45e.NFGnun={},_0xf45e.jMrxWs=t);const r=_0xf45e.NFGnun[e];return void 0===r?(void 0===_0xf45e.nXRSwJ&&(_0xf45e.nXRSwJ=!0),a=_0xf45e.dMfZiw(a,o),_0xf45e.NFGnun[e]=a):a=r,a}_0x1effa5[_0x3646bd(317,"gbD@")]=1,_0x1effa5[_0x3646bd(359,"cyX4")]=BACKGROUND_COLOR;const _0x626a35={};_0x626a35.container=_0x1effa5;const styles=StyleSheet[_0x3646bd(303,"z%2]")](_0x626a35);export const PaperIo=PaperIoComponent;PaperIo[_0x3646bd(349,"1HQ8")]=_0x3646bd(312,"Ig8E");
|
|
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{GAME_DURATION_MS,getLayout,gridFor,LIGHT,LOW_TIME,PLAYER_COLORS}from"./PaperIoConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./PaperIoGame.js";import{jsx as _0x88e1b6}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.PAPER_IO,FULL_TIME=Math.round(GAME_DURATION_MS/1e3),NO_STATS={score:0,territoryPct:0,aiPct:0,rank:1,alivePlayers:1};export const PaperIo=engineGame(GAME_IDS.PAPER_IO,e=>{const[t,r]=useLiveState(!1),[s,o]=useLiveState(NO_STATS),[a,i]=useLiveState(FULL_TIME),{game:n,theme:m,status:S,screen:u,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.PAPER_IO,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s)=>{const o=e.grid??gridFor(t,s,isTablet);setLayout(e,getLayout(t,s,o)),r(!0)},drag:drag,reportScore:e=>e.stats?.score??0,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(null,HapticType.MEDIUM),wire:(e,t)=>{e.onStats=o,e.onTime=i,e.onEvent=r=>{"turn"===r?t(SOUNDS.TURN,HapticType.SELECTION):"capture"===r?t(SOUNDS.CAPTURE,HapticType.MEDIUM):t(e.won?SOUNDS.WIN:SOUNDS.GAME_OVER,e.won?HapticType.SUCCESS:HapticType.ERROR)}}}),E=useMemo(()=>toRgb(m.BACKGROUND),[m.BACKGROUND]);return _0x88e1b6(EngineGameScreen,{...u,source:t&&n.world?n.world:null,light:LIGHT,background:E,columns:[textColumn("YOU",s.territoryPct+"%",PLAYER_COLORS[0].head),timerColumn(a,m,LOW_TIME),textColumn("AI",s.aiPct+"%",PLAYER_COLORS[1].head)],subtext:"Claim the most land!",gameOver:p({title:"win"===S?"YOU WIN!":"GAME OVER",message:"win"===S?"You beat the AI "+s.territoryPct+"% to "+s.aiPct+"%!":"You "+s.territoryPct+"% vs AI "+s.aiPct+"% \u2014 try again!",scoreLabel:"Cells Captured",score:s.score,buttonText:"Play Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{frontLight}from"../shared/EngineUtils.js";export const STEP_MS=92;export const PLAYER_COUNT=2;export const START_TERRITORY=1;export const GAME_DURATION_MS=12e4;export const LOW_TIME=10;export const POINTS_PER_CELL=10;export const SWIPE=10;export const PLAYER_COLORS=[{territory:"#62B96E",trail:"#6BCB77",head:"#6BCB77",headDark:"#4CA85B"},{territory:"#E86262",trail:"#FF6B6B",head:"#FF6B6B",headDark:"#D64C4C"}];export const COLORS={CLASSIC_BOARD:"rgba(0, 0, 0, 0.18)",FLASH:"#FFFFFF",EYE:"#FFFFFF",PUPIL:"#2C2C44"};export const TILT=.48;export const WORLD_SCALE=.25;export const LIGHT=frontLight([-.4,.5,1],.5);export const LAND=.32;export const TRAIL=.22;export const PERSON={SCALE:3.2,STRIDE:.38,HEIGHT:3.06,CELEBRATION_SCALE:1.5};export const PERSON_COLORS={SKIN:["#DFAC87","#A57355"],HAIR:"#352A24",PANTS:"#2F3D50",SHOE:"#38414A",SOLE:"#EEE9DF",POLE:"#CCD4D8",BADGE:"#E8D4A3"};export function gridFor(t,o,r){const e=Math.round(t/(r?44:32));return{cols:Math.ceil(t/e),rows:Math.ceil(o/e),cell:e}}export function getLayout(t,o,r){const e=t/r.cols,E=o/r.rows/Math.cos(.48),n=r.rows*E,s=r.cell*(.54+PERSON.SCALE*PERSON.HEIGHT*PERSON.CELEBRATION_SCALE),L=n*Math.sin(.48)/2+s*Math.cos(.48)+80;return{...r,width:t,height:o,tilt:.48,columnWidth:e,rowDepth:E,eyeDistance:L,centerY:o/2,gridW:t,gridH:n}}export const cellCentre=(t,o,r)=>[(o+.5)*t.columnWidth-t.gridW/2,t.gridH/2-(r+.5)*t.rowDepth];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{GAME_DURATION_MS,STEP_MS,SWIPE,WORLD_SCALE}from"./PaperIoConstants.js";import{newBoard,stats,step,turn}from"./PaperIoRules.js";import{buildScene,finish,placeHeads,removeScene,setSceneTheme,syncBoard}from"./PaperIoScene.js";export function createGame(e){return{world:null,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,grid:null,layout:null,scene:null,phase:"ready",board:null,stats:null,won:!1,sinceStep:0,fresh:!0,swipe:null,onPhase:e=>{},onStats:e=>{},onTime:e=>{},onEvent:e=>{}}}export function setLayout(e,t){!e.world&&(e.world=new World(t.cols*t.rows*2+200),e.world.scoreboard.reset(0,GAME_DURATION_MS/1e3),e.world.scoreboard.handlers={onSecond:t=>e.onTime(t),onTimeUp:()=>"playing"===e.phase&&e.board&&end(e,(e.board.counts[0]??0)>(e.board.counts[1]??0))},e.grid={cols:t.cols,rows:t.rows,cell:t.cell},e.board=newBoard(e.grid),e.stats=stats(e.board),e.onStats(e.stats));const r=e.world;e.scene&&removeScene(r,e.scene),e.layout=t,aimTilted(e.camera,t),e.camera.eye=[0,(e.camera.target[1]-Math.sin(t.tilt)*t.eyeDistance)*WORLD_SCALE,(e.camera.target[2]+Math.cos(t.tilt)*t.eyeDistance)*WORLD_SCALE],e.camera.target=[e.camera.target[0]*WORLD_SCALE,e.camera.target[1]*WORLD_SCALE,e.camera.target[2]*WORLD_SCALE],e.camera.ortho=t.height*WORLD_SCALE/2,e.scene=buildScene(r,t,e.theme,e.board)}export function setTheme(e,t){e.theme=t,e.world&&e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,t)}function fresh(e){const{world:t,grid:r,layout:o}=e;t&&r&&o&&(e.board=newBoard(r),e.stats=stats(e.board),e.scene&&removeScene(t,e.scene),e.scene=buildScene(t,o,e.theme,e.board),t.scoreboard.reset(0,GAME_DURATION_MS/1e3),e.sinceStep=0,e.won=!1,e.swipe=null,e.onStats(e.stats),e.onTime(Math.round(GAME_DURATION_MS/1e3)))}export function start(e){"ready"===e.phase&&e.world&&(fresh(e),e.world.scoreboard.startCountdown(GAME_DURATION_MS/1e3),e.fresh=!0,e.phase="playing",e.onPhase("playing"))}export function reset(e){fresh(e),e.phase="ready",e.onPhase("ready")}export function dispose(e){e.world?.dispose()}export function tick(e,t){const{world:r,board:o}=e;if(r&&!r.isDisposed){if("playing"===e.phase&&o){const r=e.fresh?0:1e3*Math.min(t,.25);e.fresh=!1,advance(e,o,r)}r.update(t)}}function advance(e,t,r){if(e.sinceStep+=r,e.sinceStep<STEP_MS)return;e.sinceStep=0;const o=step(t),{world:a,layout:s,scene:n}=e;a&&s&&n&&((o.territory||o.trails)&&syncBoard(a,s,n,t,o.territory&&!o.full,o.territory?void 0:o.trailCells),placeHeads(a,s,n,t,!0,o.captured)),o.territory&&(e.stats=stats(t),e.onStats(e.stats)),o.captured[0]&&e.onEvent("capture"),o.full&&end(e,o.won)}function end(e,t){e.world?.scoreboard.stop(),e.won=t,e.phase="over",e.swipe=null,e.board&&(e.stats=stats(e.board),e.onStats(e.stats)),e.world&&e.layout&&e.scene&&finish(e.world,e.layout,e.scene,t),e.onPhase("over"),e.onEvent("over")}export function drag(e,{phase:t,x:r,y:o}){if("start"===t)return void(e.swipe={x:r,y:o,last:null});const a=e.swipe;if(!a||"end"===t)return void(e.swipe=null);if("playing"!==e.phase||!e.board)return;const s=r-a.x,n=o-a.y,i=Math.abs(s),l=Math.abs(n);if(i<SWIPE&&l<SWIPE)return;const d=i>=l?s>0?"RIGHT":"LEFT":n>0?"DOWN":"UP";d!==a.last&&(a.last=d,turn(e.board,d)&&e.onEvent("turn"))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{block,ellipsoid,loft,merge,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x316f9d}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{COLORS,PERSON_COLORS}from"./PaperIoConstants.js";const WHITE=[1,1,1,1],part=(o,e,t)=>({geometry:o,position:e,color:t}),orb=(o,e,t,r=12)=>part(ellipsoid(o,void 0,r),e,t),pipe=(o,e,t,r=10)=>({geometry:tube(o,{radius:e,sides:r,smoothness:3,caps:!0}),color:t}),model=(o,e=.12)=>_0x316f9d(merge(o),{center:!1,shine:e});function flagGeometry(o){const e=[],t=[];for(const r of[1,-1]){const s=e.length/11;for(let t=0;t<=6;t++)for(let s=0;s<=12;s++){const p=s/12,a=t/6,i=p*Math.PI*2.1-o+.7*a,n=Math.sin(i)*p*.085,h=.085*(Math.sin(i)+p*Math.PI*2.1*Math.cos(i)),l=.085*p*.7*Math.cos(i),m=.56*h+.045*l,d=.78*.56,O=-.78*l,f=Math.hypot(m,d,O),u=12===s||0===t||6===t?.78:1;e.push(.78*-p,n,.56*a-.045*p,r*m/f,r*d/f,r*O/f,u,u,u,p,a)}for(let o=0;o<6;o++)for(let e=0;e<12;e++){const p=s+13*o+e,a=p+1,i=p+12+1,n=i+1;r>0?t.push(p,a,i,a,n,i):t.push(p,i,a,a,i,n)}}return{vertices:Float32Array.from(e),indices:Uint32Array.from(t)}}let cached=null;export function personMeshes(){return cacheGameAsset("paper-io/PaperIoMeshes:personMeshes",()=>personMeshesUncached())}function personMeshesUncached(){if(cached)return cached;const o=toColor(PERSON_COLORS.PANTS),e=toColor(PERSON_COLORS.HAIR),t=toColor(PERSON_COLORS.POLE),r=toColor(PERSON_COLORS.SHOE),s=toColor(PERSON_COLORS.SOLE),p=toColor(COLORS.EYE),a=toColor(COLORS.PUPIL),i=model([{geometry:loft([{z:.9,bottom:-.145,top:.145,width:.115,square:2.8},{z:1.04,bottom:-.155,top:.155,width:.105,square:2.8},{z:1.3,bottom:-.225,top:.225,width:.13,square:2.6},{z:1.41,bottom:-.2,top:.2,width:.105,square:2.4},{z:1.47,bottom:-.07,top:.07,width:.065,square:2}],{around:16,smoothness:2})},pipe([[0,-.205,1.37],[.025,-.27,1.25],[.04,-.29,1.18]],.075),pipe(Array.from({length:17},(o,e)=>[.06*Math.cos(e*Math.PI/8),.07*Math.sin(e*Math.PI/8),1.465]),.015,[.74,.74,.74,1],6)]),n=model([orb([.108,.108,.133],[.005,0,1.65],WHITE,16),pipe([[0,0,1.45],[0,0,1.55]],.052),orb([.026,.023,.03],[.109,0,1.64]),...[-1,1].map(o=>orb([.022,.017,.036],[-.012,.109*o,1.65])),pipe([[.04,-.29,1.18],[.13,-.305,1.16],[.24,-.31,1.21]],.05),orb([.046,.045,.06],[.24,-.31,1.22])]),h=[orb([.11,.116,.073],[-.021,0,1.744],e,16),orb([.06,.104,.077],[-.065,0,1.69],e),orb([.115,.173,.12],[0,0,.855],o),part(block(.025,.055,.075),[.128,-.065,1.3],toColor(PERSON_COLORS.BADGE)),pipe([[.24,-.31,.05],[.24,-.31,1.22],[.24,-.31,3]],.013,t,8),orb([.025,.025,.025],[.24,-.31,3.02],t,8),pipe([[.107,-.025,1.603],[.115,0,1.598],[.107,.025,1.603]],.004,[.36,.2,.17,1],6)];for(const o of[-1,1])h.push(orb([.018,.024,.017],[.101,.047*o,1.678],p,8)),h.push(orb([.009,.01,.012],[.117,.047*o,1.678],a,8)),h.push(pipe([[.105,.027*o,1.706],[.098,.066*o,1.707]],.006,e,6));const l=model([pipe([[0,0,0],[.01,.04,-.12],[.025,.055,-.23]],.073)]),m=model([pipe([[.025,.055,-.22],[.045,.06,-.35],[.075,.055,-.46]],.045),orb([.038,.039,.06],[.08,.055,-.475])]),d=model([pipe([[0,0,0],[.035,0,-.34],[-.01,0,-.72]],.072,o),orb([.071,.071,.085],[.035,0,-.34],o),orb([.142,.066,.06],[.065,0,-.778],r),part(block(.275,.133,.025),[.065,0,-.832],s),pipe([[.11,-.04,-.73],[.11,.04,-.73]],.009,s,6),pipe([[.065,-.04,-.725],[.065,.04,-.725]],.009,s,6)]),O=[0,2*Math.PI/3,4*Math.PI/3].map(o=>_0x316f9d(flagGeometry(o),{center:!1,shine:.02}));return cached={shirt:i,skin:n,details:model(h),sleeve:l,hand:m,leg:d,flags:O},cached}export function*warmAssets(){yield personMeshes}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{PLAYER_COUNT,POINTS_PER_CELL,START_TERRITORY}from"./PaperIoConstants.js";export const DIRECTIONS={UP:{dx:0,dy:-1},DOWN:{dx:0,dy:1},LEFT:{dx:-1,dy:0},RIGHT:{dx:1,dy:0}};const shuffle=r=>{const t=r.slice();for(let r=t.length-1;r>0;r--){const o=Math.floor(Math.random()*(r+1)),n=t[r];t[r]=t[o],t[o]=n}return t};export const countTerritory=(r,t)=>{let o=0;for(let n=0;n<r.total;n++)r.owners[n]===t&&o++;return o};export function newBoard(r){const{cols:t,rows:o,cell:n}=r,e=t*o,i=new Array(e).fill(0),s=[],l=START_TERRITORY,d=l+1,a=Math.max(d,Math.round(250/n)),u=Math.floor(t/2);for(let r=0;r<PLAYER_COUNT;r++){const n=0===r?{col:u,row:o-1-a}:{col:u,row:a},e=r+1;for(let r=n.row-l;r<=n.row+l;r++)for(let s=n.col-l;s<=n.col+l;s++)s>=0&&s<t&&r>=0&&r<o&&(i[r*t+s]=e);s.push({id:e,index:r,isBot:0!==r,alive:!0,col:n.col,row:n.row,dir:DIRECTIONS.RIGHT,pendingDir:DIRECTIONS.RIGHT,trail:[],homeCol:n.col,homeRow:n.row,botState:"expand",botStepsOut:0,botTurned:!1})}const f={...r,total:e,owners:i,trails:new Array(e).fill(0),players:s,counts:[]};return f.counts=s.map(r=>countTerritory(f,r.id)),f}export function stats(r){const t=r.counts[0]??0,o=r.counts[1]??0;let n=1;for(const o of r.players)1!==o.id&&(r.counts[o.id-1]??0)>t&&n++;return{score:t*POINTS_PER_CELL,territoryPct:Math.round(t/r.total*1e3)/10,aiPct:Math.round(o/r.total*1e3)/10,rank:n,alivePlayers:r.players.filter(r=>r.alive).length}}export function turn(r,t){const o=r.players[0];if(!o||!o.alive)return!1;const n=DIRECTIONS[t];return!(n.dx===-o.dir.dx&&n.dy===-o.dir.dy||n.dx===o.pendingDir.dx&&n.dy===o.pendingDir.dy||(o.pendingDir=n,0))}const resolvedDir=r=>r.pendingDir.dx!==-r.dir.dx||r.pendingDir.dy!==-r.dir.dy?r.pendingDir:r.dir;function pickSafeDir(r,t,o){for(const n of o){if(n.dx===-t.dir.dx&&n.dy===-t.dir.dy)continue;const o=t.col+n.dx,e=t.row+n.dy;if(!(o<0||o>=r.cols||e<0||e>=r.rows)&&r.trails[e*r.cols+o]!==t.id)return n}return null}function roomInDir(r,t,o){let n=0,e=t.col,i=t.row;for(;n<r.cols+r.rows&&(e+=o.dx,i+=o.dy,!(e<0||e>=r.cols||i<0||i>=r.rows));)n++;return n}function pickOutwardDir(r,t){const o=shuffle([DIRECTIONS.UP,DIRECTIONS.DOWN,DIRECTIONS.LEFT,DIRECTIONS.RIGHT]);return o.sort((o,n)=>roomInDir(r,t,n)-roomInDir(r,t,o)),pickSafeDir(r,t,o)}function decideBot(r,t){if(0===t.trail.length)t.botState="expand",t.botTurned=!1,t.botStepsOut=12+Math.floor(10*Math.random()),t.pendingDir=pickOutwardDir(r,t)??t.dir;else if("expand"===t.botState)if(t.botStepsOut--,t.trail.length>90)t.botState="return";else if(t.botStepsOut<=0)if(t.botTurned)t.botState="return";else{const o=0!==t.dir.dx?[DIRECTIONS.UP,DIRECTIONS.DOWN]:[DIRECTIONS.LEFT,DIRECTIONS.RIGHT];o.sort((o,n)=>roomInDir(r,t,n)-roomInDir(r,t,o));const n=pickSafeDir(r,t,o);n?(t.pendingDir=n,t.botTurned=!0,t.botStepsOut=10+Math.floor(10*Math.random())):t.botState="return"}if("return"===t.botState){const o=t.homeCol-t.col,n=t.homeRow-t.row,e=[];Math.abs(o)>=Math.abs(n)?(0!==o&&e.push(o>0?DIRECTIONS.RIGHT:DIRECTIONS.LEFT),0!==n&&e.push(n>0?DIRECTIONS.DOWN:DIRECTIONS.UP)):(0!==n&&e.push(n>0?DIRECTIONS.DOWN:DIRECTIONS.UP),0!==o&&e.push(o>0?DIRECTIONS.RIGHT:DIRECTIONS.LEFT)),e.push(t.dir);const i=pickSafeDir(r,t,e);i&&(t.pendingDir=i)}const o=t.col+t.pendingDir.dx,n=t.row+t.pendingDir.dy;if(o<0||o>=r.cols||n<0||n>=r.rows||r.trails[n*r.cols+o]===t.id){const o=pickSafeDir(r,t,shuffle([DIRECTIONS.UP,DIRECTIONS.DOWN,DIRECTIONS.LEFT,DIRECTIONS.RIGHT]));o&&(t.pendingDir=o)}}function capture(r,t){const{cols:o,rows:n,total:e,owners:i,trails:s}=r,l=t.id;for(const r of t.trail)i[r]=l,s[r]=0;t.trail=[];const d=new Uint8Array(e),a=[],u=(r,t)=>{if(r<0||r>=o||t<0||t>=n)return;const e=t*o+r;d[e]||i[e]===l||(d[e]=1,a.push(e))};for(let r=0;r<o;r++)u(r,0),u(r,n-1);for(let r=0;r<n;r++)u(0,r),u(o-1,r);for(;a.length>0;){const r=a.pop(),t=r%o,n=(r-t)/o;u(t-1,n),u(t+1,n),u(t,n-1),u(t,n+1)}for(let r=0;r<e;r++)d[r]||i[r]===l||(i[r]=l)}const NONE=0,TRAIL=1,CAPTURE=2;function move(r,t){t.pendingDir.dx===-t.dir.dx&&t.pendingDir.dy===-t.dir.dy||(t.dir=t.pendingDir);const o=t.col+t.dir.dx,n=t.row+t.dir.dy;if(o<0||o>=r.cols||n<0||n>=r.rows)return 0;const e=n*r.cols+o;t.col=o,t.row=n;const i=r.trails[e]===t.id;if(r.owners[e]===t.id||i){if(t.trail.length>0)return capture(r,t),2}else if(0===r.trails[e])return r.trails[e]=t.id,t.trail.push(e),1;return 0}export function step(r){const{players:t}=r;for(const o of t)o.alive&&o.isBot&&decideBot(r,o);const o=t.map(t=>{if(!t.alive)return-1;const o=resolvedDir(t),n=t.col+o.dx,e=t.row+o.dy;return n>=0&&n<r.cols&&e>=0&&e<r.rows?e*r.cols+n:-1}),n={trailCells:[],territory:!1,trails:!1,captured:t.map(()=>!1),full:!1,won:!1};for(let e=0;e<t.length;e++){const i=t[e];if(!i.alive)continue;const s=o[e];if(s>=0&&o.some((r,t)=>t!==e&&r===s)){i.dir=resolvedDir(i);continue}const l=move(r,i);1===l?(n.trails=!0,n.trailCells.push(i.row*r.cols+i.col)):2===l&&(n.territory=!0,n.trails=!0,n.captured[e]=!0)}if(n.territory){r.counts=t.map(t=>countTerritory(r,t.id));const o=r.counts[0]??0,e=r.counts[1]??0;o+e>=r.total&&(n.full=!0,n.won=o>e)}return n}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,Path,quat}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x1fb685}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS,LAND,PERSON,PERSON_COLORS,PLAYER_COLORS,STEP_MS,TRAIL,WORLD_SCALE}from"./PaperIoConstants.js";import{personMeshes}from"./PaperIoMeshes.js";const meshes=new Map,cached=(e,o)=>{let a=meshes.get(e);return!a&&(a=cacheGameAsset("paper-io/PaperIoScene:"+e,o),meshes.set(e,a)),a},BOARD_DEPTH=8,BACKDROP_DEPTH=30,GLIDE=Math.ceil(STEP_MS/(1e3/60))*(1e3/60)/1e3,FLASH=.48,panelMesh=(e,o,a)=>cached("pio-panel:"+e+"x"+o+":"+a,()=>_0x1fb685(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o,a),{depth:8}),{shine:.15}));function landCorners(e,o,a,t){const n=(o,a)=>o<0||o>=e.cols||a<0||a>=e.rows||e.owners[a*e.cols+o]===t,r=n(o,a-1),s=n(o+1,a),l=n(o,a+1),i=n(o-1,a);return(r||i?0:1)|(r||s?0:2)|(l||s?0:4)|(l||i?0:8)}function landMesh(e){return e?cached("pio-land:"+e,()=>{const o=e&e-1?.48:.95,[a,t,n,r]=[1,2,4,8].map(a=>e&a?o:0),s=(new Path).moveTo(-.5+a,-.5).lineTo(.5-t,-.5);return t&&s.arcTo(t,t,0,!1,!0,.5,-.5+t),s.lineTo(.5,.5-n),n&&s.arcTo(n,n,0,!1,!0,.5-n,.5),s.lineTo(-.5+r,.5),r&&s.arcTo(r,r,0,!1,!0,-.5,.5-r),s.lineTo(-.5,-.5+a),a&&s.arcTo(a,a,0,!1,!0,-.5+a,-.5),_0x1fb685(extrude(s.close(),{depth:1}),{center:!1})}):"cube"}const boardColor=e=>toColor("classic"===e.mode?COLORS.CLASSIC_BOARD:e.BOARD.SURFACE),landColor=e=>toColor(PLAYER_COLORS[e-1]?.territory??"#888888"),trailColor=e=>toColor(PLAYER_COLORS[e-1]?.trail??"#AAAAAA",.6),landH=e=>e.cell*LAND,facing=e=>quat.z(Math.atan2(-e.dy,e.dx));function spawnHead(e,o,a,t){const n=PLAYER_COLORS[a],r=personMeshes(),s=e.spawn({mesh:"none",parent:t,pickable:!1}),l=e.spawn({mesh:"none",parent:s,scale:o.cell*PERSON.SCALE,pickable:!1}),i=toColor(PERSON_COLORS.SKIN[a%PERSON_COLORS.SKIN.length]);e.spawn({mesh:r.shirt,parent:l,color:toColor(n.head),pickable:!1}),e.spawn({mesh:r.skin,parent:l,color:i,pickable:!1}),e.spawn({mesh:r.details,parent:l,pickable:!1});const p=[-1,1].map(o=>{const a=e.spawn({mesh:"none",parent:l,position:[0,.11*o,.86],pickable:!1});return e.spawn({mesh:r.leg,parent:a,pickable:!1}),a}),d=e.spawn({mesh:"none",parent:l,position:[0,.205,1.37],pickable:!1});e.spawn({mesh:r.sleeve,parent:d,color:toColor(n.head),pickable:!1}),e.spawn({mesh:r.hand,parent:d,color:i,pickable:!1});const h=e.spawn({mesh:"none",parent:l,position:[.24,-.31,2.4],pickable:!1}),m=e.spawn({mesh:r.flags[a%r.flags.length],parent:h,rotation:quat.z(-.055),color:toColor(n.head),pickable:!1});return e.animate(m,{rotation:quat.z(.055)},{duration:.5+.08*a,repeat:"forever",yoyo:!0,easing:"easeInOut"}),{root:s,visual:l,legs:p,arm:d,flag:m,stride:a,col:-1,row:-1,walking:!1}}function rest(e,o){for(const a of[...o.legs,o.arm])e.stopAnimation(a),e.animate(a,{rotation:[0,0,0,1]},{duration:.15});e.stopAnimation(o.visual),e.set(o.visual,{position:[0,0,0]}),o.walking=!1}export function buildScene(e,o,a,t){const n=e.spawn({mesh:"none",scale:WORLD_SCALE,pickable:!1}),r=spawnBackdrop(e,o.width,o.height,-30,a);e.set(r,{parent:n}),placeTiltedBackdrop(e,r,o,30);const s=e.spawn({mesh:panelMesh(o.gridW,o.gridH,"classic"===a.mode?0:8),parent:n,position:[0,0,-4],color:boardColor(a),pickable:!1}),l={root:n,backdrop:r,board:s,land:new Array(t.total).fill(null),landOwner:new Int8Array(t.total),landCorners:new Uint8Array(t.total),trail:new Array(t.total).fill(null),trailOwner:new Int8Array(t.total),heads:t.players.map((a,t)=>spawnHead(e,o,t,n))};return syncBoard(e,o,l,t,!1),placeHeads(e,o,l,t,!1),l}export function removeScene(e,o){e.despawn(o.root)}export function setSceneTheme(e,o,a,t){setBackdropTheme(e,a.backdrop,t),e.set(a.board,{mesh:panelMesh(o.gridW,o.gridH,"classic"===t.mode?0:8),color:boardColor(t)})}export function syncBoard(e,o,a,t,n,r){const s=landH(o),l=o.cell*TRAIL;for(let i=0,p=r?.length??t.total;i<p;i++){const p=r?r[i]:i,d=t.owners[p],h=p%t.cols,m=(p-h)/t.cols,u=d?landCorners(t,h,m,d):0;if(d!==a.landOwner[p]||u!==a.landCorners[p]){const[t,r]=cellCentre(o,h,m);let l=a.land[p];if(0===d)null!=l&&e.despawn(l),a.land[p]=null;else{const i=landColor(d),h=landMesh(u);null==l?(l=e.spawn({mesh:h,parent:a.root,position:[t,r,s/2],scale:[o.columnWidth,o.rowDepth,s],color:i,pickable:!1}),a.land[p]=l):e.set(l,{mesh:h}),n&&d!==a.landOwner[p]?(e.stopAnimation(l),e.set(l,{color:toColor(COLORS.FLASH),position:[t,r,.75*s],scale:[o.columnWidth,o.rowDepth,1.5*s]}),e.animate(l,{color:i,position:[t,r,s/2],scale:[o.columnWidth,o.rowDepth,s]},{duration:.48,easing:"easeOut"})):e.set(l,{color:i})}a.landOwner[p]=d,a.landCorners[p]=u}const C=t.trails[p];if(C!==a.trailOwner[p]){const n=a.trail[p];if(null!=n&&e.despawn(n),a.trail[p]=null,0!==C){const n=p%t.cols,r=(p-n)/t.cols,[i,d]=cellCentre(o,n,r),h=e.spawn({mesh:"cube",parent:a.root,position:[i,d,s+l/2],scale:[.86*o.columnWidth,.86*o.rowDepth,l],color:trailColor(C),pickable:!1});e.set(h,{scale:[.4*o.columnWidth,.4*o.rowDepth,l]}),e.animate(h,{scale:[.86*o.columnWidth,.86*o.rowDepth,l]},{duration:.12,easing:"back"}),a.trail[p]=h}a.trailOwner[p]=C}}}export function placeHeads(e,o,a,t,n,r=[]){t.players.forEach((s,l)=>{const i=a.heads[l];if(!i)return;const[p,d]=cellCentre(o,s.col,s.row),h=landH(o)+(t.trails[s.row*t.cols+s.col]?o.cell*TRAIL:0)+.02*o.cell,m=facing(s.dir),u=i.col!==s.col||i.row!==s.row;if(n)if(e.animate(i.root,{position:[p,d,h]},{duration:GLIDE,easing:"linear"}),e.animate(i.root,{rotation:m},{duration:.14}),u&&s.alive){const a=++i.stride%2==0?1:-1;i.legs.forEach((o,t)=>e.animate(o,{rotation:quat.y(PERSON.STRIDE*a*(0===t?1:-1))},{duration:GLIDE,easing:"easeInOut"})),e.animate(i.arm,{rotation:quat.y(-PERSON.STRIDE*a*.7)},{duration:GLIDE,easing:"easeInOut"}),e.animate(i.visual,[{position:[0,0,.055*o.cell],at:.5},{position:[0,0,0]}],{duration:GLIDE,easing:"easeInOut"});const t=personMeshes().flags;e.set(i.flag,{mesh:t[i.stride%t.length]}),i.walking=!0}else i.walking&&rest(e,i);else e.stopAnimation(i.root),e.set(i.root,{position:[p,d,h],rotation:m,scale:s.alive?1:0});if(i.col=s.col,i.row=s.row,r[l]){e.animate(i.root,[{scale:1.22,at:.3},{scale:1}],{duration:.35,easing:"easeOut"});const[a,t]=cellCentre(o,s.col,s.row);effects.shatter(e,{position:[a*WORLD_SCALE,t*WORLD_SCALE,(h+o.cell)*WORLD_SCALE],count:14,size:.3*o.cell*WORLD_SCALE,speed:8*o.cell*WORLD_SCALE,lifetime:.5,gravity:20*-o.cell*WORLD_SCALE,colors:[toColor(PLAYER_COLORS[l].head),toColor("#FFFFFF")]})}})}export function finish(e,o,a,t){a.heads.forEach((o,a)=>{rest(e,o);const n=0===a===t;e.stopAnimation(o.root),n?e.animate(o.root,[{scale:PERSON.CELEBRATION_SCALE,at:.4},{scale:1.3}],{duration:.5,easing:"easeOut"}):e.animate(o.root,{scale:.75},{duration:.4})}),t&&effects.confetti(e,{position:[0,0,3*o.cell*WORLD_SCALE],count:70,size:.5*o.cell*WORLD_SCALE,speed:1.2*o.gridW*WORLD_SCALE,lifetime:1.4,gravity:2*-o.gridW*WORLD_SCALE,colors:["#6BCB77","#FFD93D","#FFFFFF","#4CA85B"].map(e=>toColor(e))})}export function*warmAssets(){for(let e=1;e<16;e++)yield()=>landMesh(e)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{lathe,merge,shapeGeometry,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x503239}from"../shared/EngineMeshes.js";const NAVY=[.06,.08,.14],NAVY_SHEEN=[.16,.2,.32],CREAM=[1,.98,.93],CREAM_SHADE=[.88,.9,.95],ORANGE=[1,.62,.12],ORANGE_DARK=[.92,.42,.08],IRIS=[.18,.5,.95],IRIS_DARK=[.06,.2,.55],rgba=(e,o=1)=>[e[0],e[1],e[2],o],mix=(e,o,t)=>{const s=Math.min(1,Math.max(0,t));return[e[0]+(o[0]-e[0])*s,e[1]+(o[1]-e[1])*s,e[2]+(o[2]-e[2])*s]},inside=(e,o,t)=>Math.min(1,Math.max(0,(o-e)/t+.5)),ellipse=(e,o,t,s=28)=>Array.from({length:s+1},(a,r)=>{const n=Math.PI/2-r/s*Math.PI;return[Math.max(.001,Math.cos(n)*e),t+Math.sin(n)*o]}),HEAD_Y=.49,HEAD_RX=.25,HEAD_RY=.225,headZ=(e,o)=>.25*Math.sqrt(Math.max(0,1-(e/.25)**2-((o-.49)/.225)**2));function bodyColor({position:[e,o,t]}){const s=mix(NAVY,NAVY_SHEEN,.6*(o+.3)*Math.max(0,-t/.3+.3)),a=Math.sqrt((e/.235)**2+((o+.04)/.255)**2),r=inside(a,1,.06)*inside(-t,-.04,.04);return rgba(mix(s,mix(CREAM_SHADE,CREAM,2*(o+.25)),r))}function headColor({position:[e,o,t]}){const s=mix(NAVY,NAVY_SHEEN,.5*Math.max(0,(o-.49)/.225)),a=Math.min(Math.hypot(e-.072,o-.53)/.1,Math.hypot(e+.072,o-.53)/.1),r=Math.hypot(e/1.15,o-.44)/.115,n=inside(Math.min(a,r),1,.08)*inside(-t,-.06,.04);return rgba(mix(s,CREAM,n))}const onFace=(e,o,t,s,a)=>({geometry:shapeGeometry("sphere"),position:[e,o,headZ(e,o)+s],scale:t,color:a});function eye(e){const o=.074*e;return[onFace(o,.525,[.1,.122,.05],-.012,rgba([1,1,1])),onFace(o+.004*e,.519,[.07,.08,.03],.004,rgba(IRIS_DARK)),onFace(o+.004*e,.513,[.058,.06,.03],.008,rgba(IRIS)),onFace(o+.004*e,.519,[.036,.042,.03],.013,rgba([.02,.02,.04])),onFace(o-.014,.539,.024,.024,[1.8,1.8,1.8,1]),onFace(o+.016,.503,.011,.022,[1.6,1.6,1.6,1]),{geometry:tube([[o+.05*e,.593,headZ(o+.05*e,.593)+.004],[o,.61,headZ(o,.61)+.006],[o-.045*e,.6,headZ(o-.045*e,.6)+.004]],{radius:e=>.009+.005*Math.sin(e*Math.PI),sides:6,color:rgba(NAVY)})}]}function beak(){const e=headZ(0,.46),o=e=>1+.45*Math.abs(Math.cos(e*Math.PI*2));return[{geometry:tube([[0,.468,e-.03],[0,.464,e+.03],[0,.452,e+.075],[0,.44,e+.09]],{radius:e=>.048*(1-.85*e),shape:o,sides:16,color:({v:e})=>rgba(mix(ORANGE,ORANGE_DARK,.6*e))})},{geometry:tube([[0,.436,e-.03],[0,.434,e+.02],[0,.432,e+.05]],{radius:e=>.03*(1-.8*e),shape:o,sides:14,color:rgba(ORANGE_DARK)})}]}const tufts=()=>[-1,0,1].map(e=>({geometry:tube([[.035*e,.715-.03,-.02],[.05*e,.755,0-.01*Math.abs(e)],[.065*e,.715+.07,.05]],{radius:o=>.022*(1-.85*o)*(0===e?1.15:.9),sides:8,color:rgba(NAVY)})})),tail=()=>({geometry:tube([[0,-.2,-.26],[0,-.27,-.33],[0,-.3,-.38]],{radius:e=>.07*(1-.8*e),shape:e=>.4+.6*Math.abs(Math.cos(e*Math.PI*2)),sides:12,color:rgba(NAVY)})});let bodyModel=null;export function bodyMesh(){return cacheGameAsset("penguin-run/PenguinMeshes:bodyMesh",()=>bodyMeshUncached())}function bodyMeshUncached(){if(bodyModel)return bodyModel;const e=lathe([[.001,.42],[.14,.4],[.18,.34],[.2,.29],[.225,.24],[.258,.17],[.284,.09],[.302,0],[.306,-.08],[.296,-.16],[.268,-.24],[.215,-.3],[.13,-.33],[.001,-.338]],{segments:64,color:bodyColor}),o=lathe(ellipse(.25,.225,.49,32),{segments:64,color:headColor});return bodyModel=_0x503239(merge([{geometry:e},{geometry:o},...eye(-1),...eye(1),...beak(),...tufts(),tail()]),{center:!1,shine:.55}),bodyModel}const flipperModels={};export function flipperMesh(e){return cacheGameAsset("penguin-run/PenguinMeshes:flipperMesh"+JSON.stringify([e]),()=>flipperMeshUncached(e))}function flipperMeshUncached(e){const o=flipperModels[e];if(o)return o;const t=tube([[.07*-e,.05,0],[.01*-e,.02,0],[.02*e,-.08,.01],[.022*e,-.17,.005],[.01*e,-.24,-.01],[.006*-e,-.27,-.015]],{radius:e=>.06*Math.sin(.6+2.2*e)+.012,shape:e=>.32+.68*Math.abs(Math.cos(e*Math.PI*2)),sides:18,smoothness:10,color:({normal:o})=>rgba(o[0]*e<-.25?CREAM_SHADE:NAVY)}),s=_0x503239(t,{center:!1,shine:.5});return flipperModels[e]=s,s}let footModel=null;export function footMesh(){return cacheGameAsset("penguin-run/PenguinMeshes:footMesh",()=>footMeshUncached())}function footMeshUncached(){if(footModel)return footModel;const e=shapeGeometry("sphere"),o=[-.42,0,.42].map(e=>({geometry:tube([[0,.03,.04],[.05*Math.sin(e),.026,.09],[.08*Math.sin(e),.022,.135]],{radius:e=>.032-.008*e,sides:10,color:rgba(ORANGE)})})),t=[-.42,0,.42].map(o=>({geometry:e,position:[.08*Math.sin(o),.022,.135],scale:.048,color:rgba(ORANGE)})),s={geometry:tube([[0,.04,.02],[0,.12,0],[0,.22,-.01]],{radius:e=>.045+.04*e,sides:12,color:({v:e})=>rgba(e<.35?mix(ORANGE_DARK,ORANGE,2*e):NAVY)})};return footModel=_0x503239(merge([s,{geometry:e,position:[0,.03,.05],scale:[.15,.06,.16],color:rgba(mix(ORANGE,ORANGE_DARK,.3))},...o,...t]),{center:!1,shine:.35}),footModel}export function*warmAssets(){yield bodyMesh,yield footMesh,yield()=>flipperMesh(-1),yield()=>flipperMesh(1)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{quat}from"@nayan-ui/engine";import{bodyMesh,flipperMesh,footMesh}from"./PenguinMeshes.js";export const LOOPING=new Set(["idle","walk","run","dance"]);export const CLIP_TIME={idle:5,walk:.9,run:.44,punch:.52,jab:.4,jump:.95,slide:1.35,hit:.75,dance:1.1,dead:1.7};const PELVIS_Y=.39,BODY_SCALE=[.94,1.15,.94],SHOULDER=[.246,.18,0],FOOT=[.12,0,.06],IDENTITY=[0,0,0,1],flipL=(o,t,i=0)=>quat.fromEuler(o,i,-t),flipR=(o,t,i=0)=>quat.fromEuler(o,-i,t),REST_L=flipL(0,.14),REST_R=flipR(0,.14),pelvisAt=(o=0,t=0)=>[0,.39+o,t],footLAt=(o=0,t=0)=>[-FOOT[0],FOOT[1]+o,FOOT[2]+t],footRAt=(o=0,t=0)=>[FOOT[0],FOOT[1]+o,FOOT[2]+t],FOOT_L_REST=quat.y(-.18),FOOT_R_REST=quat.y(.18);export function preparePenguin(){bodyMesh(),flipperMesh(-1),flipperMesh(1),footMesh()}export function spawnPenguin(o,t,i=1,n=[1,1,1,1]){const a=o.spawn({mesh:"none",position:t,scale:i,pickable:!1}),p=o.spawn({mesh:"none",parent:a,position:pelvisAt(),pickable:!1});return{root:a,pelvis:p,body:o.spawn({mesh:bodyMesh(),parent:p,position:[0,0,0],scale:BODY_SCALE,color:n,pickable:!1}),flipperL:o.spawn({mesh:flipperMesh(-1),parent:p,position:[-SHOULDER[0],SHOULDER[1],SHOULDER[2]],rotation:REST_L,color:n,pickable:!1}),flipperR:o.spawn({mesh:flipperMesh(1),parent:p,position:[SHOULDER[0],SHOULDER[1],SHOULDER[2]],rotation:REST_R,color:n,pickable:!1}),footL:o.spawn({mesh:footMesh(),parent:a,position:footLAt(),rotation:FOOT_L_REST,color:n,pickable:!1}),footR:o.spawn({mesh:footMesh(),parent:a,position:footRAt(),rotation:FOOT_R_REST,color:n,pickable:!1}),x:t[0],yaw:0,anim:null}}const parts=o=>[o.pelvis,o.flipperL,o.flipperR,o.footL,o.footR];function toRest(o,t,i){for(const i of parts(t))o.stopAnimation(i);const n=[[t.pelvis,pelvisAt(),IDENTITY],[t.flipperL,[-SHOULDER[0],SHOULDER[1],SHOULDER[2]],REST_L],[t.flipperR,[SHOULDER[0],SHOULDER[1],SHOULDER[2]],REST_R],[t.footL,footLAt(),FOOT_L_REST],[t.footR,footRAt(),FOOT_R_REST]];for(const[a,p,r]of n)i<=0?o.set(a,{position:p,rotation:r,...a===t.pelvis&&{scale:1}}):o.animate(a,{position:p,rotation:r,...a===t.pelvis&&{scale:1}},{duration:i,easing:"easeOut"})}export function facePenguin(o,t,i,n=.12){t.yaw=i,n<=0?o.set(t.root,{rotation:quat.y(i)}):o.animate(t.root,{rotation:quat.y(i)},{duration:n})}export function movePenguin(o,t,i,n,a="linear"){return t.x=i,o.animate(t.root,{position:[i,0,0]},{duration:n,easing:a})}export function placePenguin(o,t,i,n=0){o.stopAnimation(t.root),t.x=i,o.set(t.root,{position:[i,0,0]}),facePenguin(o,t,n,0),toRest(o,t,0),t.anim=null}const BLEND=.12,hip=(o,t,i)=>[o,.39+t,i],lean=(o,t,i)=>quat.fromEuler(o,t,i),footRot=(o,t,i=0)=>quat.fromEuler(t,.18*o+i,0),k=(o,t)=>({...t,at:o}),AIR=[[0,0],[.26,0],[.4,.72],[.52,.95],[.64,.72],[.78,0],[1,0]],airAt=o=>{for(let t=1;t<AIR.length;t++){const[i,n]=AIR[t],[a,p]=AIR[t-1];if(o<=i)return p+(n-p)*(o-a)/Math.max(1e-6,i-a)}return 0};export function playPenguin(o,t,i,n=1){if(t.anim===i&&LOOPING.has(i))return Promise.resolve();t.anim=i,toRest(o,t,.12);const a=CLIP_TIME[i]/n,p={duration:a,repeat:"forever",delay:.12,easing:"linear",path:"smooth"},r={duration:a,delay:.12,easing:"linear",path:"smooth"},s=(t,i,n)=>o.animate(t,i,n),{pelvis:e,flipperL:l,flipperR:f,footL:R,footR:h}=t;switch(i){case"idle":return s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.12,{position:hip(0,.012,0),rotation:lean(-.02,0,0),scale:[1.01,1.03,1.01]}),k(.26,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.36,{position:hip(.006,0,0),rotation:lean(.04,.42,-.04),scale:1}),k(.5,{position:hip(.006,.01,0),rotation:lean(.02,.38,-.04),scale:[1.01,1.025,1.01]}),k(.58,{position:hip(-.006,0,0),rotation:lean(.04,-.36,.04),scale:1}),k(.72,{position:hip(-.006,.01,0),rotation:lean(.02,-.33,.04),scale:[1.01,1.025,1.01]}),k(.8,{position:hip(-.012,0,0),rotation:lean(0,0,.05),scale:1}),k(.9,{position:hip(0,.012,0),rotation:lean(-.02,0,0),scale:[1.01,1.03,1.01]}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})],p),s(l,[k(0,{rotation:REST_L}),k(.12,{rotation:flipL(.02,.2)}),k(.26,{rotation:REST_L}),k(.4,{rotation:REST_L}),k(.44,{rotation:flipL(-.1,.55)}),k(.48,{rotation:flipL(0,.25)}),k(.51,{rotation:flipL(-.05,.45)}),k(.58,{rotation:REST_L}),k(.9,{rotation:flipL(.02,.2)}),k(1,{rotation:REST_L})],p),s(f,[k(0,{rotation:REST_R}),k(.12,{rotation:flipR(.02,.2)}),k(.26,{rotation:REST_R}),k(.64,{rotation:REST_R}),k(.68,{rotation:flipR(.15,.5)}),k(.74,{rotation:REST_R}),k(.9,{rotation:flipR(.02,.2)}),k(1,{rotation:REST_R})],p),s(h,[k(0,{position:footRAt()}),k(.78,{position:footRAt()}),k(.82,{position:footRAt(.025,.02)}),k(.86,{position:footRAt()}),k(1,{position:footRAt()})],p),Promise.resolve();case"walk":case"run":{const o="run"===i,t=o?.025:.04,n=o?.09:.15,a=o?.04:.08,r=o?.4:.05,L=o?-.025:-.005,T=o?.06:.025;s(e,[k(0,{position:hip(-t,L,0),rotation:lean(r,a,n)}),k(.25,{position:hip(0,T,0),rotation:lean(r+.02,0,0)}),k(.5,{position:hip(t,L,0),rotation:lean(r,-a,-n)}),k(.75,{position:hip(0,T,0),rotation:lean(r+.02,0,0)}),k(1,{position:hip(-t,L,0),rotation:lean(r,a,n)})],p);const E=o?.09:.045,u=o?.11:.06,A=(o,t,i)=>{const n=[[0,t(0,-u),footRot(o,0)],[.12,t(.6*E,.4*-u),footRot(o,.35)],[.25,t(E,.4*u),footRot(o,-.1)],[.4,t(0,u),footRot(o,-.15)],[.46,t(0,.9*u),footRot(o,0)],[1,t(0,-u),footRot(o,0)]].map(([o,t,n])=>[(o+i)%1,t,n]).sort((o,t)=>o[0]-t[0]),a=n[0],p=n.map(([o,t,i])=>k(o,{position:t,rotation:i}));if(a[0]>0){const o=n[n.length-1];p.unshift(k(0,{position:o[1],rotation:o[2]}))}return p[p.length-1].at<1&&p.push(k(1,{position:p[0].position,rotation:p[0].rotation})),p};s(h,A(1,footRAt,0),p),s(R,A(-1,footLAt,.5),p);const[S,_,O]=o?[.95,.55,.85]:[.15,.3,.55];return s(l,[k(0,{rotation:flipL(S,_)}),k(.25,{rotation:flipL(S-.08,(_+O)/2)}),k(.5,{rotation:flipL(S,O)}),k(.75,{rotation:flipL(S-.08,(_+O)/2)}),k(1,{rotation:flipL(S,_)})],p),s(f,[k(0,{rotation:flipR(S,O)}),k(.25,{rotation:flipR(S-.08,(_+O)/2)}),k(.5,{rotation:flipR(S,_)}),k(.75,{rotation:flipR(S-.08,(_+O)/2)}),k(1,{rotation:flipR(S,O)})],p),Promise.resolve()}case"punch":case"jab":{const o="punch"===i,t=o?1:-1,n=o?1:.7,a=o?f:l,p=o?l:f,L=o?flipR:flipL,T=o?flipL:flipR,E=o?R:h,u=o?h:R,A=o?footLAt:footRAt,S=o?1:-1;return s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY}),k(.3,{position:hip(0,-.035*n,-.03),rotation:lean(-.12,.45*t*n,0)}),k(.4,{position:hip(0,-.04*n,.1*n),rotation:lean(.32*n,-.38*t*n,0)}),k(.48,{position:hip(0,-.04*n,.12*n),rotation:lean(.38*n,-.46*t*n,0)}),k(.64,{position:hip(0,-.03*n,.09*n),rotation:lean(.26*n,-.32*t*n,0)}),k(1,{position:hip(0,0,0),rotation:IDENTITY})],r),s(a,[k(0,{rotation:o?REST_R:REST_L}),k(.3,{rotation:L(.95,.55)}),k(.4,{rotation:L(-1.6,.2,.15)}),k(.48,{rotation:L(-1.85,.12,.2)}),k(.64,{rotation:L(-1.55,.2,.1)}),k(1,{rotation:o?REST_R:REST_L})],r),s(p,[k(0,{rotation:o?REST_L:REST_R}),k(.3,{rotation:T(-.5,.35)}),k(.42,{rotation:T(.7,.55)}),k(.64,{rotation:T(.5,.45)}),k(1,{rotation:o?REST_L:REST_R})],r),s(E,[k(0,{position:A()}),k(.3,{position:A()}),k(.36,{position:A(.035,.07)}),k(.42,{position:A(0,.13*n)}),k(.7,{position:A(0,.12*n)}),k(.85,{position:A(.02,.05)}),k(1,{position:A()})],r),s(u,[k(0,{rotation:footRot(S,0)}),k(.4,{rotation:footRot(S,-.15,-.45*t)}),k(.7,{rotation:footRot(S,-.1,-.35*t)}),k(1,{rotation:footRot(S,0)})],r)}case"jump":{const o=o=>o.map(o=>o.position?{...o,position:[o.position[0],o.position[1]+airAt(o.at??0),o.position[2]]}:o),t=s(e,o([k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.22,{position:hip(0,-.09,.02),rotation:lean(.22,0,0),scale:[1.14,.84,1.14]}),k(.3,{position:hip(0,.02,0),rotation:lean(-.06,0,0),scale:[.9,1.16,.9]}),k(.4,{position:hip(0,.02,0),rotation:lean(.02,0,0),scale:1}),k(.52,{position:hip(0,.02,0),rotation:lean(.05,0,0),scale:1}),k(.64,{position:hip(0,.01,0),rotation:lean(0,0,0),scale:1}),k(.72,{position:hip(0,.01,0),rotation:lean(-.04,0,0),scale:[.95,1.07,.95]}),k(.8,{position:hip(0,-.09,.01),rotation:lean(.18,0,0),scale:[1.16,.82,1.16]}),k(.9,{position:hip(0,.015,0),rotation:lean(-.03,0,0),scale:[.96,1.05,.96]}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})]),r),i=(o,t)=>[k(0,{rotation:t}),k(.22,{rotation:o(1.1,.5)}),k(.32,{rotation:o(-.2,2.3)}),k(.42,{rotation:o(.1,1)}),k(.52,{rotation:o(-.1,2.1)}),k(.66,{rotation:o(.1,1.1)}),k(.8,{rotation:o(-.2,1.7)}),k(.9,{rotation:o(0,.5)}),k(1,{rotation:t})];s(l,i(flipL,REST_L),r),s(f,i(flipR,REST_R),r);for(const[t,i,n]of[[R,footLAt,-1],[h,footRAt,1]])s(t,o([k(0,{position:i(),rotation:footRot(n,0)}),k(.28,{position:i(),rotation:footRot(n,-.3)}),k(.42,{position:i(.07,-.05),rotation:footRot(n,.6)}),k(.52,{position:i(.07,-.04),rotation:footRot(n,.5)}),k(.62,{position:i(.06,-.03),rotation:footRot(n,.4)}),k(.76,{position:i(.01,.02),rotation:footRot(n,-.25)}),k(.8,{position:i(),rotation:footRot(n,0)}),k(1,{position:i(),rotation:footRot(n,0)})]),r);return t}case"slide":{s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.12,{position:hip(0,-.06,-.03),rotation:lean(-.35,0,0),scale:[1.04,.92,1.04]}),k(.24,{position:hip(0,-.13,-.08),rotation:lean(-1.05,0,0),scale:[1.06,.88,1.06]}),k(.45,{position:hip(0,-.13,-.08),rotation:lean(-1.02,.04,.04),scale:[1.06,.88,1.06]}),k(.6,{position:hip(0,-.13,-.08),rotation:lean(-1.05,-.04,-.04),scale:[1.06,.88,1.06]}),k(.74,{position:hip(0,-.13,-.08),rotation:lean(-1.02,.03,.02),scale:[1.06,.88,1.06]}),k(.86,{position:hip(0,-.05,-.03),rotation:lean(-.3,0,0),scale:[1.03,.95,1.03]}),k(.93,{position:hip(0,.01,0),rotation:lean(.06,0,0),scale:[.98,1.02,.98]}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})],r);const o=(o,t,i)=>[k(0,{rotation:t}),k(.12,{rotation:o(-.3,.6)}),k(.24,{rotation:o(-.5,.9)}),k(.4+i,{rotation:o(-.45,1)}),k(.55+i,{rotation:o(-.55,.9)}),k(.74,{rotation:o(-.5,.95)}),k(.86,{rotation:o(-.15,.5)}),k(1,{rotation:t})];s(l,o(flipL,REST_L,0),r),s(f,o(flipR,REST_R,.04),r);for(const[o,t,i,n]of[[R,footLAt,-1,0],[h,footRAt,1,.05]])s(o,[k(0,{position:t(),rotation:footRot(i,0)}),k(.12,{position:t(.01,.08),rotation:footRot(i,-.3)}),k(.24,{position:t(.03,.18),rotation:footRot(i,-.55)}),k(.5+n,{position:t(.03,.18),rotation:footRot(i,-.5)}),k(.76,{position:t(.03,.18),rotation:footRot(i,-.55)}),k(.88,{position:t(.01,.05),rotation:footRot(i,-.1)}),k(1,{position:t(),rotation:footRot(i,0)})],r);return s(t.body,[k(0,{scale:1}),k(1,{scale:1})],r)}case"hit":return o.animate(t.root,{shake:.045},{duration:.4*a}),s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY,scale:1}),k(.1,{position:hip(0,-.02,-.08),rotation:lean(-.55,0,.15),scale:[1.06,.93,1.06]}),k(.26,{position:hip(0,0,-.05),rotation:lean(.22,0,-.08),scale:1}),k(.42,{position:hip(0,0,-.03),rotation:lean(-.12,0,.05),scale:1}),k(.58,{position:hip(0,0,-.01),rotation:lean(.06,0,-.02),scale:1}),k(.75,{position:hip(0,0,0),rotation:lean(-.02,0,0),scale:1}),k(1,{position:hip(0,0,0),rotation:IDENTITY,scale:1})],r),s(l,[k(0,{rotation:REST_L}),k(.1,{rotation:flipL(-.4,1.9)}),k(.28,{rotation:flipL(.2,.6)}),k(.44,{rotation:flipL(-.1,1)}),k(.62,{rotation:flipL(0,.4)}),k(1,{rotation:REST_L})],r),s(f,[k(0,{rotation:REST_R}),k(.12,{rotation:flipR(-.4,1.8)}),k(.3,{rotation:flipR(.2,.55)}),k(.46,{rotation:flipR(-.1,.95)}),k(.64,{rotation:flipR(0,.4)}),k(1,{rotation:REST_R})],r),s(R,[k(0,{position:footLAt()}),k(.14,{position:footLAt(.04,-.06)}),k(.24,{position:footLAt(0,-.1)}),k(.7,{position:footLAt(0,-.06)}),k(1,{position:footLAt()})],r),s(h,[k(0,{position:footRAt()}),k(.3,{position:footRAt()}),k(.4,{position:footRAt(.03,-.04)}),k(.5,{position:footRAt(0,-.07)}),k(1,{position:footRAt()})],r);case"dance":return s(e,[k(0,{position:hip(-.03,0,0),rotation:lean(0,.35,.18),scale:[1.04,.95,1.04]}),k(.12,{position:hip(-.01,.07,0),rotation:lean(0,.2,.08),scale:[.97,1.05,.97]}),k(.25,{position:hip(0,.09,0),rotation:lean(-.05,0,0),scale:1}),k(.38,{position:hip(.01,.07,0),rotation:lean(0,-.2,-.08),scale:[.97,1.05,.97]}),k(.5,{position:hip(.03,0,0),rotation:lean(0,-.35,-.18),scale:[1.04,.95,1.04]}),k(.62,{position:hip(.01,.07,0),rotation:lean(0,-.2,-.08),scale:[.97,1.05,.97]}),k(.75,{position:hip(0,.09,0),rotation:lean(-.05,0,0),scale:1}),k(.88,{position:hip(-.01,.07,0),rotation:lean(0,.2,.08),scale:[.97,1.05,.97]}),k(1,{position:hip(-.03,0,0),rotation:lean(0,.35,.18),scale:[1.04,.95,1.04]})],p),s(l,[k(0,{rotation:flipL(0,2.6)}),k(.25,{rotation:flipL(-.35,1.9)}),k(.5,{rotation:flipL(0,2.6)}),k(.75,{rotation:flipL(-.35,1.9)}),k(1,{rotation:flipL(0,2.6)})],p),s(f,[k(0,{rotation:flipR(-.35,1.9)}),k(.25,{rotation:flipR(0,2.6)}),k(.5,{rotation:flipR(-.35,1.9)}),k(.75,{rotation:flipR(0,2.6)}),k(1,{rotation:flipR(-.35,1.9)})],p),s(R,[k(0,{position:footLAt()}),k(.6,{position:footLAt()}),k(.75,{position:footLAt(.07,.03)}),k(.9,{position:footLAt()}),k(1,{position:footLAt()})],p),s(h,[k(0,{position:footRAt()}),k(.1,{position:footRAt()}),k(.25,{position:footRAt(.07,.03)}),k(.4,{position:footRAt()}),k(1,{position:footRAt()})],p),Promise.resolve();case"dead":return s(e,[k(0,{position:hip(0,0,0),rotation:IDENTITY}),k(.08,{position:hip(0,-.02,-.05),rotation:lean(-.35,0,.08)}),k(.2,{position:hip(.02,0,0),rotation:lean(.18,.15,.14)}),k(.34,{position:hip(-.02,0,0),rotation:lean(-.05,-.2,-.16)}),k(.48,{position:hip(.015,0,0),rotation:lean(.08,.15,.12)}),k(.6,{position:hip(0,-.02,-.03),rotation:lean(-.3,0,.05)}),k(.76,{position:[0,.3,-.26],rotation:lean(-1.55,0,.1)}),k(.84,{position:[0,.36,-.24],rotation:lean(-1.38,0,.12)}),k(.92,{position:[0,.3,-.26],rotation:lean(-1.55,0,.1)}),k(1,{position:[0,.3,-.26],rotation:lean(-1.55,0,.1)})],r),s(l,[k(0,{rotation:REST_L}),k(.08,{rotation:flipL(-.3,1.2)}),k(.3,{rotation:flipL(.2,.8)}),k(.6,{rotation:flipL(-.4,1.6)}),k(.8,{rotation:flipL(-.2,1.45)}),k(.88,{rotation:flipL(-.3,1.7)}),k(1,{rotation:flipL(-.2,1.4)})],r),s(f,[k(0,{rotation:REST_R}),k(.1,{rotation:flipR(-.3,1.1)}),k(.36,{rotation:flipR(.2,.9)}),k(.62,{rotation:flipR(-.4,1.5)}),k(.8,{rotation:flipR(-.2,1.4)}),k(.88,{rotation:flipR(-.3,1.65)}),k(1,{rotation:flipR(-.2,1.35)})],r),s(R,[k(0,{position:footLAt(),rotation:footRot(-1,0)}),k(.2,{position:footLAt(.03,.03),rotation:footRot(-1,0)}),k(.26,{position:footLAt(0,.04),rotation:footRot(-1,0)}),k(.6,{position:footLAt(),rotation:footRot(-1,0)}),k(.78,{position:footLAt(.2,.05),rotation:footRot(-1,-1.2)}),k(1,{position:footLAt(.18,.04),rotation:footRot(-1,-1.3)})],r),s(h,[k(0,{position:footRAt(),rotation:footRot(1,0)}),k(.34,{position:footRAt(.03,-.03),rotation:footRot(1,0)}),k(.4,{position:footRAt(0,-.04),rotation:footRot(1,0)}),k(.6,{position:footRAt(),rotation:footRot(1,0)}),k(.8,{position:footRAt(.22,.03),rotation:footRot(1,-1.1)}),k(1,{position:footRAt(.2,.02),rotation:footRot(1,-1.25)})],r)}}export function strikePoint(o,t){return[o.x+.45*Math.sin(o.yaw)*t,.55*t,.45*Math.cos(o.yaw)*t]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{MAX_LIVES,RESULTS_DELAY_LOSE,RESULTS_DELAY_WIN,TRACK_LENGTH}from"./PenguinRunConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,steer,tick}from"./PenguinRunGame.js";import{backgroundFor,FOG,lightFor}from"./PenguinRunScene.js";import{jsx as _0x593b87}from"react/jsx-runtime";const SFX=GAME_SOUNDS.PENGUIN_RUN;export const PenguinRun=engineGame(GAME_IDS.PENGUIN_RUN,e=>{const[t,s]=useLiveState(0),[n,r]=useLiveState(0),[i,o]=useLiveState(MAX_LIVES),[a,S]=useLiveState(0),{theme:m,status:u,screen:E,gameOver:p}=useEngineGame(e,{gameId:GAME_IDS.PENGUIN_RUN,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s)=>setLayout(e,t,s),drag:(e,{phase:t,x:s,y:n})=>steer(e,t,s,n),sounds:SFX,resultsDelay:e=>"win"===e?RESULTS_DELAY_WIN:RESULTS_DELAY_LOSE,onStart:e=>e(SFX.START),wire:(e,t)=>{e.onScore=s,e.onCoins=r,e.onLives=o,e.onDistance=S,e.onCoin=e=>t(e?SFX.GEM:SFX.COIN,e?HapticType.LIGHT:null),e.onJump=()=>t(SFX.JUMP),e.onSlide=()=>t(SFX.SLIDE),e.onLane=()=>t(SFX.LANE_SWITCH,HapticType.LIGHT),e.onHurt=()=>t(SFX.CRASH,HapticType.HEAVY),e.onCrash=()=>{t(SFX.CRASH,HapticType.HEAVY),e.world.after(.5,()=>t(SFX.GAME_OVER))},e.onWin=()=>t(GAME_SOUNDS.WELL_DONE,HapticType.SUCCESS)}}),L=useMemo(()=>lightFor(m),[m]),G=useMemo(()=>backgroundFor(m),[m]);return _0x593b87(EngineGameScreen,{...E,light:L,background:G,fog:FOG,columns:[scoreColumn(t),livesColumn(i,MAX_LIVES),textColumn("TRACK",TRACK_LENGTH-a+" m")],subtext:"Swipe, jump and slide!",gameOver:p({title:"win"===u?"YOU MADE IT!":"OUCH!",message:"win"===u?"Made it to the finish with "+n+" coins!":"Out of lives after "+a+" of "+TRACK_LENGTH+" m. Try a new track!",scoreLabel:"Score",score:t,buttonText:"win"===u?"Run Again!":"Try Again!"})})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const PENGUIN_SIZE=1.2;export const LANE_X=[-1.7,0,1.7];export const LANE_STIFFNESS=14;export const LEAN_ROLL=.045;export const LEAN_YAW=.035;export const MAX_LEAN=.32;export const CAMERA_FOLLOW=6;export const SPEED_START=7;export const TRACK_LENGTH=1e3;export const START_CLEAR=14;export const FINISH_CLEAR=6;export const SLAB=2;export const RESULTS_DELAY_LOSE=1700;export const RESULTS_DELAY_WIN=2600;export const TILE_LENGTH=12;export const TILES_AHEAD=9;export const TILES_BEHIND=2;export const TILES_BEFORE_START=3;export const TILES_PAST_FINISH=3;export const JUMP_AIR_METRES=5.5;export const SLIDE_LOW_METRES=7;export const JUMP_TIME=[.7,1.15];export const SLIDE_TIME=[.8,1.25];export const GAP_WINDOW=[.15,.9];export const LOW_WINDOW=[.08,.94];export const GAP_HALF=.45;export const MAX_LIVES=3;export const HURT_INVULNERABLE=2.2;export const HIT_DEPTH=.3;export const LANE_TOLERANCE=.7;export const COIN_RADIUS=1.1;export const POINTS_PER_METRE=2;export const POINTS_COIN=20;export const POINTS_GEM=200;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{quat,World}from"@nayan-ui/engine";import{CLIP_TIME,placePenguin,playPenguin,preparePenguin,spawnPenguin}from"./PenguinModel.js";import{CAMERA_FOLLOW,COIN_RADIUS,GAP_HALF,GAP_WINDOW,HIT_DEPTH,HURT_INVULNERABLE,JUMP_AIR_METRES,JUMP_TIME,LANE_STIFFNESS,LANE_TOLERANCE,LANE_X,LEAN_ROLL,LEAN_YAW,LOW_WINDOW,MAX_LEAN,MAX_LIVES,PENGUIN_SIZE,POINTS_COIN,POINTS_GEM,POINTS_PER_METRE,SLIDE_LOW_METRES,SLIDE_TIME,SPEED_START,TILE_LENGTH,TILES_AHEAD,TILES_BEFORE_START,TILES_BEHIND,TRACK_LENGTH}from"./PenguinRunConstants.js";import{coinSparkle,crashDust,despawnTile,generateTrack,LAST_TILE,prepareRunMeshes,spawnTile}from"./PenguinRunScene.js";const noop=()=>{},newSeed=()=>Math.floor(1e9*Math.random());export function createGame(e){preparePenguin(),prepareRunMeshes();const n=new World(1800),a={world:n,theme:e,penguin:spawnPenguin(n,[0,0,0],PENGUIN_SIZE),camera:{eye:[0,3.1,5.4],target:[0,1.1,-6],fov:.9},phase:"ready",won:!1,plan:generateTrack(newSeed()),tiles:[],nextTile:0,lane:1,x:0,vx:0,camX:0,z:0,speed:SPEED_START,distance:0,lastDistance:0,coins:0,gems:0,score:0,lives:MAX_LIVES,invulnerable:0,action:null,queued:null,queuedT:0,actionT:0,actionDur:0,orbit:0,onPhase:noop,onScore:noop,onCoins:noop,onLives:noop,onHurt:noop,onDistance:noop,onCoin:noop,onJump:noop,onSlide:noop,onLane:noop,onCrash:noop,onWin:noop};return reset(a),a}const runPace=e=>Math.min(1.7,Math.max(1,e.speed/SPEED_START));function keepTiles(e){for(;e.nextTile<=LAST_TILE&&e.nextTile*TILE_LENGTH<-e.z+TILES_AHEAD*TILE_LENGTH;)e.tiles.push(spawnTile(e.world,e.nextTile,e.theme,e.plan)),e.nextTile++;for(;e.tiles.length&&e.tiles[0].z-TILE_LENGTH>e.z+TILES_BEHIND*TILE_LENGTH;)despawnTile(e.world,e.tiles.shift())}const LEAN_Q=[0,0,0,1],TURN_Q=[0,0,0,1],ROOT_Q=[0,0,0,1];function place(e){const n=Math.max(-MAX_LEAN,Math.min(MAX_LEAN,e.vx*LEAN_ROLL)),a=Math.max(-MAX_LEAN,Math.min(MAX_LEAN,e.vx*LEAN_YAW));e.world.set(e.penguin.root,{position:[e.x,0,e.z],rotation:quat.multiply(quat.z(-n,LEAN_Q),quat.y(Math.PI-a,TURN_Q),ROOT_Q)}),e.penguin.x=e.x,e.penguin.yaw=Math.PI-a,aimCamera(e)}function aimCamera(e){e.camera.eye=[e.camX,3.1,e.z+5.4],e.camera.target=[e.camX,1.1,e.z-6]}function orbitCamera(e,n){e.orbit+=.35*n;const a=e.orbit+.9;e.camera.eye=[e.x+4.2*Math.sin(a),1.9,e.z+4.2*Math.cos(a)],e.camera.target=[e.x,.8,e.z]}export function reset(e){e.world.cancelTimers();for(const n of e.tiles)despawnTile(e.world,n);e.tiles=[],e.nextTile=-TILES_BEFORE_START,e.plan=generateTrack(newSeed()),e.won=!1,e.lane=1,e.x=LANE_X[1],e.vx=0,e.camX=0,e.z=0,e.speed=SPEED_START,e.distance=e.coins=e.gems=e.score=0,e.lives=MAX_LIVES,e.invulnerable=0,e.action=null,e.queued=null,e.orbit=0,e.world.stopAnimation(e.penguin.root),placePenguin(e.world,e.penguin,0,Math.PI),keepTiles(e),place(e),playPenguin(e.world,e.penguin,"idle"),setPhase(e,"ready"),e.onScore(0),e.onCoins(0),e.onLives(MAX_LIVES),e.lastDistance=0,e.onDistance(0)}function setPhase(e,n){e.phase=n,e.onPhase(n)}export function start(e){"over"===e.phase&&reset(e),playPenguin(e.world,e.penguin,"run"),aimCamera(e),setPhase(e,"playing")}export function swipe(e,n){if("playing"!==e.phase)return;if("left"===n||"right"===n){const a=Math.max(0,Math.min(2,e.lane+("left"===n?-1:1)));if(a===e.lane)return;return e.lane=a,void e.onLane()}const a="up"===n?"jump":"slide";if(e.action===a)return e.queued=a,void(e.queuedT=QUEUE_TIME);e.queued=null,e.action=a,e.actionT=0;const[o,i,[t,r]]="jump"===a?[JUMP_AIR_METRES,GAP_WINDOW,JUMP_TIME]:[SLIDE_LOW_METRES,LOW_WINDOW,SLIDE_TIME];e.actionDur=Math.min(r,Math.max(t,o/((i[1]-i[0])*e.speed))),playPenguin(e.world,e.penguin,a,CLIP_TIME[a]/e.actionDur),"jump"===a?e.onJump():e.onSlide()}const DRAG_THRESHOLD=18,QUEUE_TIME=.35,drag={x:0,y:0,fired:!1};export function steer(e,n,a,o){if("start"===n)return drag.x=a,drag.y=o,void(drag.fired=!1);if("end"===n||drag.fired)return;const i=a-drag.x,t=o-drag.y;Math.max(Math.abs(i),Math.abs(t))<18||(drag.fired=!0,Math.abs(i)>Math.abs(t)?swipe(e,i<0?"left":"right"):swipe(e,t<0?"up":"down"))}const actionFrac=e=>Math.max(0,e.actionT-.06)/e.actionDur,airborne=e=>"jump"===e.action&&actionFrac(e)>=GAP_WINDOW[0]&&actionFrac(e)<=GAP_WINDOW[1],ducking=e=>"slide"===e.action&&actionFrac(e)>=LOW_WINDOW[0]&&actionFrac(e)<=LOW_WINDOW[1];function hurt(e){e.lives--,e.onLives(e.lives),e.invulnerable=HURT_INVULNERABLE,e.action="hit",e.actionT=0,e.actionDur=CLIP_TIME.hit/1.3,playPenguin(e.world,e.penguin,"hit",1.3),crashDust(e.world,[e.x,.5,e.z-.4]),e.camera.shake=.22,e.onHurt()}function crash(e){e.lives=0,e.onLives(0),e.action=null,playPenguin(e.world,e.penguin,"dead"),crashDust(e.world,[e.x,.6,e.z-.4]),e.camera.shake=.35,e.onCrash(),setPhase(e,"over")}function fall(e){e.lives=0,e.onLives(0),e.action=null,playPenguin(e.world,e.penguin,"dead",1.4),e.world.animate(e.penguin.root,{position:[e.x,-7,e.z-1.2]},{duration:1.3,easing:"easeIn"}),crashDust(e.world,[e.x,0,e.z-.6]),e.camera.shake=.15,e.onCrash(),setPhase(e,"over")}function win(e){e.won=!0,e.action=null,e.world.animate(e.penguin.root,{rotation:quat.y(0)},{duration:.5,delay:.5,easing:"easeInOut"}),playPenguin(e.world,e.penguin,"dance"),e.onWin(),setPhase(e,"over")}export function tick(e,n){if(!e.world.isDisposed){if("playing"===e.phase){e.speed=SPEED_START;const a=e.speed*n;e.z-=a,e.distance+=a;const o=LANE_STIFFNESS,i=Math.max(1,Math.ceil(n/.008)),t=n/i;for(let n=0;n<i;n++)e.vx+=(o*o*(LANE_X[e.lane]-e.x)-2*o*e.vx)*t,e.x+=e.vx*t;if(e.camX+=(.4*e.x-e.camX)*(1-Math.exp(-n*CAMERA_FOLLOW)),e.invulnerable=Math.max(0,e.invulnerable-n),e.queuedT=Math.max(0,e.queuedT-n),e.action&&(e.actionT+=n,e.actionT>=e.actionDur+.06)){e.action=null;const n=e.queuedT>0?e.queued:null;e.queued=null,n?swipe(e,"jump"===n?"up":"down"):playPenguin(e.world,e.penguin,"run",runPace(e))}keepTiles(e),place(e);for(const a of e.tiles)if(!(a.z<e.z-TILE_LENGTH||a.z-TILE_LENGTH>e.z+TILE_LENGTH)){for(const o of a.obstacles)if(!(e.invulnerable>0||Math.abs(LANE_X[o.lane]-e.x)>LANE_TOLERANCE)&&("gap"===o.kind?Math.abs(o.z-e.z)<GAP_HALF&&!airborne(e):Math.abs(o.z-e.z)<HIT_DEPTH&&("beam"!==o.kind||!ducking(e)))){if(e.lives>1){hurt(e);break}return finish(e,n,"gap"===o.kind?fall:crash)}for(const n of a.pickups)n.taken||Math.abs(n.z-e.z)>COIN_RADIUS||Math.abs(LANE_X[n.lane]-e.x)>LANE_TOLERANCE||(n.taken=!0,e.world.despawn(n.e),coinSparkle(e.world,[LANE_X[n.lane],n.y,n.z],n.gem),n.gem?e.gems++:e.coins++,e.onCoins(e.coins+10*e.gems),e.onCoin(n.gem))}const r=Math.min(TRACK_LENGTH,Math.floor(e.distance)),s=r*POINTS_PER_METRE+e.coins*POINTS_COIN+e.gems*POINTS_GEM;if(s!==e.score&&(e.score=s,e.onScore(s)),r!==e.lastDistance&&(e.lastDistance=r,e.onDistance(r)),e.distance>=TRACK_LENGTH)return finish(e,n,win)}else"over"===e.phase&&e.won&&e.speed>0?(e.speed=Math.max(0,e.speed-22*n),e.z-=e.speed*n,e.world.set(e.penguin.root,{position:[e.x,0,e.z]}),aimCamera(e)):"ready"===e.phase&&orbitCamera(e,n);e.world.update(n)}}function finish(e,n,a){a(e),e.world.update(n)}export function setLayout(e,n,a){e.camera.fov=n/Math.max(1,a)<.7?1:.85}export function setTheme(e,n){if(n===e.theme||e.world.isDisposed)return;e.theme=n;const a=e.tiles.map(e=>e.index);for(const n of e.tiles)despawnTile(e.world,n);e.tiles=a.map(a=>spawnTile(e.world,a,n,e.plan))}export function dispose(e){e.world.dispose()}
|