@nayan-ui/games 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -191
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/assets/models/explorer/explorer.glb +0 -0
- package/lib/module/assets/models/explorer/params.json +51 -0
- package/lib/module/assets/models/explorer/source.json +222 -0
- package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/lib/module/assets/models/play-with-tua/sources.json +141 -0
- package/lib/module/assets/sfx/balloon_pop.wav +0 -0
- package/lib/module/assets/sfx/blocked.wav +0 -0
- package/lib/module/assets/sfx/boing.wav +0 -0
- package/lib/module/assets/sfx/bonus.wav +0 -0
- package/lib/module/assets/sfx/boom.wav +0 -0
- package/lib/module/assets/sfx/bump.wav +0 -0
- package/lib/module/assets/sfx/cannon.wav +0 -0
- package/lib/module/assets/sfx/capture.wav +0 -0
- package/lib/module/assets/sfx/card_flip.wav +0 -0
- package/lib/module/assets/sfx/card_place.wav +0 -0
- package/lib/module/assets/sfx/catch.wav +0 -0
- package/lib/module/assets/sfx/chime.wav +0 -0
- package/lib/module/assets/sfx/chomp.wav +0 -0
- package/lib/module/assets/sfx/chomp_alt.wav +0 -0
- package/lib/module/assets/sfx/clack.wav +0 -0
- package/lib/module/assets/sfx/clang.wav +0 -0
- package/lib/module/assets/sfx/clash.wav +0 -0
- package/lib/module/assets/sfx/click.wav +0 -0
- package/lib/module/assets/sfx/coin.wav +0 -0
- package/lib/module/assets/sfx/combo.wav +0 -0
- package/lib/module/assets/sfx/crash.wav +0 -0
- package/lib/module/assets/sfx/crunch.wav +0 -0
- package/lib/module/assets/sfx/dance.wav +0 -0
- package/lib/module/assets/sfx/deselect.wav +0 -0
- package/lib/module/assets/sfx/dice_roll.wav +0 -0
- package/lib/module/assets/sfx/die.wav +0 -0
- package/lib/module/assets/sfx/draw.wav +0 -0
- package/lib/module/assets/sfx/drop.wav +0 -0
- package/lib/module/assets/sfx/eat.wav +0 -0
- package/lib/module/assets/sfx/engine.wav +0 -0
- package/lib/module/assets/sfx/error.wav +0 -0
- package/lib/module/assets/sfx/flag.wav +0 -0
- package/lib/module/assets/sfx/flap.wav +0 -0
- package/lib/module/assets/sfx/flip_disc.wav +0 -0
- package/lib/module/assets/sfx/footstep_run.wav +0 -0
- package/lib/module/assets/sfx/footstep_walk.wav +0 -0
- package/lib/module/assets/sfx/game_over.wav +0 -0
- package/lib/module/assets/sfx/gate.wav +0 -0
- package/lib/module/assets/sfx/hit.wav +0 -0
- package/lib/module/assets/sfx/hop.wav +0 -0
- package/lib/module/assets/sfx/hurt.wav +0 -0
- package/lib/module/assets/sfx/invalid.wav +0 -0
- package/lib/module/assets/sfx/jump.wav +0 -0
- package/lib/module/assets/sfx/ladder.wav +0 -0
- package/lib/module/assets/sfx/land.wav +0 -0
- package/lib/module/assets/sfx/laugh.wav +0 -0
- package/lib/module/assets/sfx/lose.wav +0 -0
- package/lib/module/assets/sfx/merge.wav +0 -0
- package/lib/module/assets/sfx/miss.wav +0 -0
- package/lib/module/assets/sfx/nitro.wav +0 -0
- package/lib/module/assets/sfx/pew.wav +0 -0
- package/lib/module/assets/sfx/place.wav +0 -0
- package/lib/module/assets/sfx/pling.wav +0 -0
- package/lib/module/assets/sfx/point.wav +0 -0
- package/lib/module/assets/sfx/pop.wav +0 -0
- package/lib/module/assets/sfx/pop_soft.wav +0 -0
- package/lib/module/assets/sfx/power_up.wav +0 -0
- package/lib/module/assets/sfx/reveal.wav +0 -0
- package/lib/module/assets/sfx/robot.wav +0 -0
- package/lib/module/assets/sfx/rotate.wav +0 -0
- package/lib/module/assets/sfx/run_steps.wav +0 -0
- package/lib/module/assets/sfx/select.wav +0 -0
- package/lib/module/assets/sfx/shuffle.wav +0 -0
- package/lib/module/assets/sfx/six.wav +0 -0
- package/lib/module/assets/sfx/slice.wav +0 -0
- package/lib/module/assets/sfx/slide.wav +0 -0
- package/lib/module/assets/sfx/snake.wav +0 -0
- package/lib/module/assets/sfx/snap.wav +0 -0
- package/lib/module/assets/sfx/splash.wav +0 -0
- package/lib/module/assets/sfx/star.wav +0 -0
- package/lib/module/assets/sfx/start.wav +0 -0
- package/lib/module/assets/sfx/swoosh.wav +0 -0
- package/lib/module/assets/sfx/tap.wav +0 -0
- package/lib/module/assets/sfx/thud.wav +0 -0
- package/lib/module/assets/sfx/thunk.wav +0 -0
- package/lib/module/assets/sfx/tick.wav +0 -0
- package/lib/module/assets/sfx/time_up.wav +0 -0
- package/lib/module/assets/sfx/tock.wav +0 -0
- package/lib/module/assets/sfx/walk_steps.wav +0 -0
- package/lib/module/assets/sfx/warning.wav +0 -0
- package/lib/module/assets/sfx/whack.wav +0 -0
- package/lib/module/assets/sfx/whoosh.wav +0 -0
- package/lib/module/assets/sfx/win.wav +0 -0
- package/lib/module/assets/sfx/zap.wav +0 -0
- package/lib/module/assets/textures/ad_bolt.png +0 -0
- package/lib/module/assets/textures/ad_bubbles.png +0 -0
- package/lib/module/assets/textures/ad_chevrons.png +0 -0
- package/lib/module/assets/textures/asphalt.png +0 -0
- package/lib/module/assets/textures/bark.jpg +0 -0
- package/lib/module/assets/textures/explorer-atlas.png +0 -0
- package/lib/module/assets/textures/facade.png +0 -0
- package/lib/module/assets/textures/grass.png +0 -0
- package/lib/module/assets/textures/leaves.png +0 -0
- package/lib/module/assets/textures/limestone.jpg +0 -0
- package/lib/module/assets/textures/meadow.jpg +0 -0
- package/lib/module/assets/textures/nature-sources.json +87 -0
- package/lib/module/assets/textures/pine.png +0 -0
- package/lib/module/assets/textures/river.jpg +0 -0
- package/lib/module/assets/textures/soft_glow.png +0 -0
- package/lib/module/games/arrows/Arrows.js +1 -1
- package/lib/module/games/arrows/ArrowsConstants.js +1 -1
- package/lib/module/games/arrows/ArrowsGame.js +1 -0
- package/lib/module/games/arrows/ArrowsScene.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
- package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -1
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
- package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
- package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
- package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
- package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
- package/lib/module/games/bluk/Bluk.js +1 -1
- package/lib/module/games/bluk/BlukConstants.js +1 -1
- package/lib/module/games/bluk/BlukGame.js +1 -0
- package/lib/module/games/bluk/BlukRules.js +1 -0
- package/lib/module/games/bluk/BlukScene.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
- package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
- package/lib/module/games/car-racing/CarMeshes.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js +1 -1
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
- package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
- package/lib/module/games/car-racing/CarRacingGame.js +1 -0
- package/lib/module/games/car-racing/CarRacingScene.js +1 -0
- package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
- package/lib/module/games/checkers/Checkers.js +1 -1
- package/lib/module/games/checkers/CheckersAI.js +1 -0
- package/lib/module/games/checkers/CheckersConstants.js +1 -1
- package/lib/module/games/checkers/CheckersGame.js +1 -0
- package/lib/module/games/checkers/CheckersRules.js +1 -0
- package/lib/module/games/checkers/CheckersScene.js +1 -0
- package/lib/module/games/color-switch/ColorSwitch.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
- package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
- package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
- package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
- package/lib/module/games/game-2048/Game2048.js +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -1
- package/lib/module/games/game-2048/Game2048Game.js +1 -0
- package/lib/module/games/game-2048/Game2048Rules.js +1 -0
- package/lib/module/games/game-2048/Game2048Scene.js +1 -0
- package/lib/module/games/knife-hit/KnifeHit.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
- package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
- package/lib/module/games/ludo-king/LudoKing.js +1 -1
- package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
- package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
- package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
- package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
- package/lib/module/games/memory-match/MemoryMatch.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
- package/lib/module/games/mob-control/MobControl.js +1 -1
- package/lib/module/games/mob-control/MobControlConstants.js +1 -1
- package/lib/module/games/mob-control/MobControlGame.js +1 -0
- package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
- package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
- package/lib/module/games/mob-control/MobControlRules.js +1 -0
- package/lib/module/games/mob-control/MobControlScene.js +1 -0
- package/lib/module/games/number-search/NumberSearch.js +1 -1
- package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
- package/lib/module/games/pac-man/PacMan.js +1 -1
- package/lib/module/games/pac-man/PacManConstants.js +1 -1
- package/lib/module/games/pac-man/PacManGame.js +1 -0
- package/lib/module/games/pac-man/PacManRules.js +1 -0
- package/lib/module/games/pac-man/PacManScene.js +1 -0
- package/lib/module/games/paper-io/PaperIo.js +1 -1
- package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
- package/lib/module/games/paper-io/PaperIoGame.js +1 -0
- package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
- package/lib/module/games/paper-io/PaperIoRules.js +1 -0
- package/lib/module/games/paper-io/PaperIoScene.js +1 -0
- package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
- package/lib/module/games/penguin-run/PenguinModel.js +1 -0
- package/lib/module/games/penguin-run/PenguinRun.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
- package/lib/module/games/reversi/Reversi.js +1 -1
- package/lib/module/games/reversi/ReversiConstants.js +1 -1
- package/lib/module/games/reversi/ReversiGame.js +1 -0
- package/lib/module/games/reversi/ReversiRules.js +1 -0
- package/lib/module/games/reversi/ReversiScene.js +1 -0
- package/lib/module/games/search-grid/SearchGrid.js +1 -0
- package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
- package/lib/module/games/search-grid/SearchGridGame.js +1 -0
- package/lib/module/games/search-grid/SearchGridScene.js +1 -0
- package/lib/module/games/shared/BackdropCard.js +1 -0
- package/lib/module/games/shared/EngineBackdrop.js +1 -0
- package/lib/module/games/shared/EngineBlasts.js +1 -0
- package/lib/module/games/shared/EngineBlocks.js +1 -0
- package/lib/module/games/shared/EngineControlText.js +1 -0
- package/lib/module/games/shared/EngineDice.js +1 -0
- package/lib/module/games/shared/EngineFootprint.js +1 -0
- package/lib/module/games/shared/EngineFruits.js +1 -0
- package/lib/module/games/shared/EngineGameLoader.js +1 -0
- package/lib/module/games/shared/EngineGameScreen.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
- package/lib/module/games/shared/EngineGlyphs.js +1 -0
- package/lib/module/games/shared/EngineHud.js +1 -0
- package/lib/module/games/shared/EngineLoading.js +1 -0
- package/lib/module/games/shared/EngineMeadow.js +1 -0
- package/lib/module/games/shared/EngineMeshCache.js +1 -0
- package/lib/module/games/shared/EngineMeshes.js +1 -0
- package/lib/module/games/shared/EngineRacingChase.js +1 -0
- package/lib/module/games/shared/EngineRacingHandling.js +1 -0
- package/lib/module/games/shared/EngineReadyContext.js +1 -0
- package/lib/module/games/shared/EngineTilt.js +1 -0
- package/lib/module/games/shared/EngineTouchSurface.js +1 -0
- package/lib/module/games/shared/EngineUtils.js +1 -0
- package/lib/module/games/shared/GameActivity.js +1 -0
- package/lib/module/games/shared/GameLoading.js +1 -0
- package/lib/module/games/shared/GameLoadingTransition.js +1 -0
- package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
- package/lib/module/games/shared/useEngineGame.js +1 -0
- package/lib/module/games/shared/useGameResource.js +1 -0
- package/lib/module/games/shared/useLiveState.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
- package/lib/module/games/snake-3d/Snake3D.js +1 -1
- package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
- package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
- package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
- package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
- package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
- package/lib/module/games/stack-tower/StackTower.js +1 -1
- package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
- package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
- package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
- package/lib/module/games/sudoku/Sudoku.js +1 -1
- package/lib/module/games/sudoku/SudokuConstants.js +1 -1
- package/lib/module/games/sudoku/SudokuGame.js +1 -0
- package/lib/module/games/sudoku/SudokuRules.js +1 -0
- package/lib/module/games/sudoku/SudokuScene.js +1 -0
- package/lib/module/games/tangram/Tangram.js +1 -1
- package/lib/module/games/tangram/TangramConstants.js +1 -1
- package/lib/module/games/tangram/TangramGame.js +1 -0
- package/lib/module/games/tangram/TangramRules.js +1 -0
- package/lib/module/games/tangram/TangramScene.js +1 -0
- package/lib/module/games/tank-1990/Tank1990.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
- package/lib/module/games/tile-home/TileHome.js +1 -1
- package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
- package/lib/module/games/tile-home/TileHomeGame.js +1 -0
- package/lib/module/games/tile-home/TileHomeScene.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
- package/lib/module/games/word-search/WordSearch.js +1 -1
- package/lib/module/games/word-search/WordSearchWords.js +1 -0
- package/lib/module/helpers/GamePatternData.js +1 -0
- package/lib/module/helpers/GameSettingsModal.js +1 -1
- package/lib/module/helpers/GameTheme.js +1 -0
- package/lib/module/helpers/IconPaths.js +1 -0
- package/lib/module/helpers/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/GameAssetLoader.js +1 -0
- package/lib/module/services/GameAssets.js +1 -0
- package/lib/module/services/GameLoaders.js +1 -0
- package/lib/module/services/GamesConstants.js +1 -1
- package/lib/module/services/GamesMetadata.js +1 -1
- package/lib/module/services/GamesService.js +1 -1
- package/lib/module/services/HapticsService.js +1 -1
- package/lib/module/services/ScoringService.js +1 -1
- package/lib/module/services/SfxSources.js +1 -0
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/ThemeService.js +1 -0
- package/lib/module/services/UtilsService.js +1 -1
- package/lib/module/services/index.js +1 -1
- package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
- package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
- package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
- package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
- package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
- package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
- package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
- package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
- package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
- package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
- package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
- package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
- package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
- package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
- package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
- package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
- package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
- package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
- package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
- package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
- package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
- package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
- package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
- package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
- package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
- package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
- package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
- package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
- package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
- package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
- package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
- package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
- package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
- package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
- package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
- package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
- package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
- package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
- package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
- package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
- package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
- package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
- package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
- package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
- package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
- package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
- package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
- package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
- package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
- package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
- package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
- package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
- package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
- package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
- package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
- package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
- package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
- package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
- package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
- package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
- package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
- package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
- package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
- package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
- package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
- package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
- package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
- package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
- package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
- package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
- package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
- package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
- package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
- package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
- package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
- package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
- package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
- package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
- package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
- package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
- package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
- package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
- package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
- package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
- package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
- package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
- package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
- package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
- package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
- package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
- package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
- package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
- package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
- package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
- package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
- package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
- package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
- package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
- package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
- package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
- package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
- package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
- package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
- package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
- package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
- package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
- package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
- package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
- package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
- package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
- package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
- package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
- package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
- package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
- package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
- package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
- package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
- package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
- package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
- package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
- package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
- package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
- package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
- package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
- package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
- package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
- package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
- package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
- package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
- package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
- package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
- package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
- package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
- package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
- package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
- package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
- package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
- package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
- package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
- package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
- package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
- package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
- package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
- package/lib/typescript/src/helpers/index.d.ts +1 -19
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
- package/lib/typescript/src/services/GameAssets.d.ts +11 -0
- package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
- package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
- package/lib/typescript/src/services/HapticsService.d.ts +1 -1
- package/lib/typescript/src/services/SfxSources.d.ts +79 -0
- package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
- package/lib/typescript/src/services/ThemeService.d.ts +117 -0
- package/lib/typescript/src/services/UtilsService.d.ts +20 -2
- package/lib/typescript/src/services/index.d.ts +3 -0
- package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
- package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
- package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
- package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
- package/lib/web/assets/0376bda32be3-robot.wav +0 -0
- package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
- package/lib/web/assets/0b21278bffba-boing.wav +0 -0
- package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
- package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
- package/lib/web/assets/177f00502e08-bonus.wav +0 -0
- package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
- package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
- package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
- package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
- package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
- package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
- package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
- package/lib/web/assets/2699065037ad-select.wav +0 -0
- package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
- package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
- package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
- package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
- package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
- package/lib/web/assets/336d63b739b5-combo.wav +0 -0
- package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
- package/lib/web/assets/3a816e20212f-capture.wav +0 -0
- package/lib/web/assets/40240217810a-nitro.wav +0 -0
- package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
- package/lib/web/assets/501994226995-coin.wav +0 -0
- package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
- package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
- package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
- package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
- package/lib/web/assets/6da3b101926d-merge.wav +0 -0
- package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
- package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
- package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
- package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
- package/lib/web/assets/7506e3efe264-catch.wav +0 -0
- package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
- package/lib/web/assets/793abe620201-card_place.wav +0 -0
- package/lib/web/assets/7da09c57f52d-facade.png +0 -0
- package/lib/web/assets/7e1a902176f6-pine.png +0 -0
- package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
- package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
- package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
- package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
- package/lib/web/assets/854b31683cb2-draw.wav +0 -0
- package/lib/web/assets/8616150393b7-error.wav +0 -0
- package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
- package/lib/web/assets/88755845922c-hop.wav +0 -0
- package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
- package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
- package/lib/web/assets/9210a24472d1-place.wav +0 -0
- package/lib/web/assets/930d833ebf89-splash.wav +0 -0
- package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
- package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
- package/lib/web/assets/9ab04403898b-clang.wav +0 -0
- package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
- package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
- package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
- package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
- package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
- package/lib/web/assets/a76940a48c68-hit.wav +0 -0
- package/lib/web/assets/a98ddb724460-leaves.png +0 -0
- package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
- package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
- package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
- package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
- package/lib/web/assets/ab37cd128509-click.wav +0 -0
- package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
- package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
- package/lib/web/assets/b3894545cf71-slice.wav +0 -0
- package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
- package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
- package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
- package/lib/web/assets/baff6feda846-lose.wav +0 -0
- package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
- package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
- package/lib/web/assets/c3a9edfad195-die.wav +0 -0
- package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
- package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
- package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
- package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
- package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
- package/lib/web/assets/d15591767778-tap.wav +0 -0
- package/lib/web/assets/d1781a52234f-slide.wav +0 -0
- package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
- package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
- package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
- package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
- package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
- package/lib/web/assets/e454e56df89a-clack.wav +0 -0
- package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
- package/lib/web/assets/ed6496b891fc-land.wav +0 -0
- package/lib/web/assets/f21920200a81-thunk.wav +0 -0
- package/lib/web/assets/f753b43be89d-whack.wav +0 -0
- package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
- package/lib/web/assets/fbe299716916-grass.png +0 -0
- package/lib/web/chunk-52ez2s9z.js +15 -0
- package/lib/web/chunk-8675t224.js +1 -0
- package/lib/web/index.js +2 -0
- package/lib/web/package.json +1 -0
- package/lib/web/services.js +2 -0
- package/package.json +94 -73
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/models/explorer/explorer.glb +0 -0
- package/src/assets/models/explorer/params.json +51 -0
- package/src/assets/models/explorer/source.json +222 -0
- package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/src/assets/models/play-with-tua/sources.json +141 -0
- package/src/assets/sfx/balloon_pop.wav +0 -0
- package/src/assets/sfx/blocked.wav +0 -0
- package/src/assets/sfx/boing.wav +0 -0
- package/src/assets/sfx/bonus.wav +0 -0
- package/src/assets/sfx/boom.wav +0 -0
- package/src/assets/sfx/bump.wav +0 -0
- package/src/assets/sfx/cannon.wav +0 -0
- package/src/assets/sfx/capture.wav +0 -0
- package/src/assets/sfx/card_flip.wav +0 -0
- package/src/assets/sfx/card_place.wav +0 -0
- package/src/assets/sfx/catch.wav +0 -0
- package/src/assets/sfx/chime.wav +0 -0
- package/src/assets/sfx/chomp.wav +0 -0
- package/src/assets/sfx/chomp_alt.wav +0 -0
- package/src/assets/sfx/clack.wav +0 -0
- package/src/assets/sfx/clang.wav +0 -0
- package/src/assets/sfx/clash.wav +0 -0
- package/src/assets/sfx/click.wav +0 -0
- package/src/assets/sfx/coin.wav +0 -0
- package/src/assets/sfx/combo.wav +0 -0
- package/src/assets/sfx/crash.wav +0 -0
- package/src/assets/sfx/crunch.wav +0 -0
- package/src/assets/sfx/dance.wav +0 -0
- package/src/assets/sfx/deselect.wav +0 -0
- package/src/assets/sfx/dice_roll.wav +0 -0
- package/src/assets/sfx/die.wav +0 -0
- package/src/assets/sfx/draw.wav +0 -0
- package/src/assets/sfx/drop.wav +0 -0
- package/src/assets/sfx/eat.wav +0 -0
- package/src/assets/sfx/engine.wav +0 -0
- package/src/assets/sfx/error.wav +0 -0
- package/src/assets/sfx/flag.wav +0 -0
- package/src/assets/sfx/flap.wav +0 -0
- package/src/assets/sfx/flip_disc.wav +0 -0
- package/src/assets/sfx/footstep_run.wav +0 -0
- package/src/assets/sfx/footstep_walk.wav +0 -0
- package/src/assets/sfx/game_over.wav +0 -0
- package/src/assets/sfx/gate.wav +0 -0
- package/src/assets/sfx/hit.wav +0 -0
- package/src/assets/sfx/hop.wav +0 -0
- package/src/assets/sfx/hurt.wav +0 -0
- package/src/assets/sfx/invalid.wav +0 -0
- package/src/assets/sfx/jump.wav +0 -0
- package/src/assets/sfx/ladder.wav +0 -0
- package/src/assets/sfx/land.wav +0 -0
- package/src/assets/sfx/laugh.wav +0 -0
- package/src/assets/sfx/lose.wav +0 -0
- package/src/assets/sfx/merge.wav +0 -0
- package/src/assets/sfx/miss.wav +0 -0
- package/src/assets/sfx/nitro.wav +0 -0
- package/src/assets/sfx/pew.wav +0 -0
- package/src/assets/sfx/place.wav +0 -0
- package/src/assets/sfx/pling.wav +0 -0
- package/src/assets/sfx/point.wav +0 -0
- package/src/assets/sfx/pop.wav +0 -0
- package/src/assets/sfx/pop_soft.wav +0 -0
- package/src/assets/sfx/power_up.wav +0 -0
- package/src/assets/sfx/reveal.wav +0 -0
- package/src/assets/sfx/robot.wav +0 -0
- package/src/assets/sfx/rotate.wav +0 -0
- package/src/assets/sfx/run_steps.wav +0 -0
- package/src/assets/sfx/select.wav +0 -0
- package/src/assets/sfx/shuffle.wav +0 -0
- package/src/assets/sfx/six.wav +0 -0
- package/src/assets/sfx/slice.wav +0 -0
- package/src/assets/sfx/slide.wav +0 -0
- package/src/assets/sfx/snake.wav +0 -0
- package/src/assets/sfx/snap.wav +0 -0
- package/src/assets/sfx/splash.wav +0 -0
- package/src/assets/sfx/star.wav +0 -0
- package/src/assets/sfx/start.wav +0 -0
- package/src/assets/sfx/swoosh.wav +0 -0
- package/src/assets/sfx/tap.wav +0 -0
- package/src/assets/sfx/thud.wav +0 -0
- package/src/assets/sfx/thunk.wav +0 -0
- package/src/assets/sfx/tick.wav +0 -0
- package/src/assets/sfx/time_up.wav +0 -0
- package/src/assets/sfx/tock.wav +0 -0
- package/src/assets/sfx/walk_steps.wav +0 -0
- package/src/assets/sfx/warning.wav +0 -0
- package/src/assets/sfx/whack.wav +0 -0
- package/src/assets/sfx/whoosh.wav +0 -0
- package/src/assets/sfx/win.wav +0 -0
- package/src/assets/sfx/zap.wav +0 -0
- package/src/assets/textures/ad_bolt.png +0 -0
- package/src/assets/textures/ad_bubbles.png +0 -0
- package/src/assets/textures/ad_chevrons.png +0 -0
- package/src/assets/textures/asphalt.png +0 -0
- package/src/assets/textures/bark.jpg +0 -0
- package/src/assets/textures/explorer-atlas.png +0 -0
- package/src/assets/textures/facade.png +0 -0
- package/src/assets/textures/grass.png +0 -0
- package/src/assets/textures/leaves.png +0 -0
- package/src/assets/textures/limestone.jpg +0 -0
- package/src/assets/textures/meadow.jpg +0 -0
- package/src/assets/textures/nature-sources.json +87 -0
- package/src/assets/textures/pine.png +0 -0
- package/src/assets/textures/river.jpg +0 -0
- package/src/assets/textures/soft_glow.png +0 -0
- package/src/games/arrows/Arrows.tsx +69 -0
- package/src/games/arrows/ArrowsConstants.ts +107 -0
- package/src/games/arrows/ArrowsGame.ts +735 -0
- package/src/games/arrows/ArrowsScene.ts +395 -0
- package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
- package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
- package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
- package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
- package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
- package/src/games/bike-racing/BikeMeshes.ts +273 -0
- package/src/games/bike-racing/BikeRacing.tsx +211 -0
- package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
- package/src/games/bike-racing/BikeRacingGame.ts +557 -0
- package/src/games/bike-racing/BikeRacingScene.ts +119 -0
- package/src/games/block-blast/BlockBlast.tsx +73 -0
- package/src/games/block-blast/BlockBlastConstants.ts +179 -0
- package/src/games/block-blast/BlockBlastGame.ts +471 -0
- package/src/games/block-blast/BlockBlastScene.ts +156 -0
- package/src/games/block-breaker/BlockBreaker.tsx +79 -0
- package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
- package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
- package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
- package/src/games/bluk/Bluk.tsx +82 -0
- package/src/games/bluk/BlukConstants.ts +121 -0
- package/src/games/bluk/BlukGame.ts +323 -0
- package/src/games/bluk/BlukRules.ts +154 -0
- package/src/games/bluk/BlukScene.ts +514 -0
- package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
- package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
- package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
- package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
- package/src/games/candy-crush/CandyCrush.tsx +77 -0
- package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
- package/src/games/candy-crush/CandyCrushGame.ts +477 -0
- package/src/games/candy-crush/CandyCrushScene.ts +209 -0
- package/src/games/car-racing/CarMeshes.ts +440 -0
- package/src/games/car-racing/CarRacing.tsx +211 -0
- package/src/games/car-racing/CarRacingConstants.ts +167 -0
- package/src/games/car-racing/CarRacingFacade.ts +40 -0
- package/src/games/car-racing/CarRacingGame.ts +539 -0
- package/src/games/car-racing/CarRacingScene.ts +1026 -0
- package/src/games/car-racing/CarRacingScenery.ts +265 -0
- package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
- package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
- package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
- package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
- package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
- package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
- package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
- package/src/games/checkers/Checkers.tsx +83 -0
- package/src/games/checkers/CheckersAI.ts +255 -0
- package/src/games/checkers/CheckersConstants.ts +68 -0
- package/src/games/checkers/CheckersGame.ts +322 -0
- package/src/games/checkers/CheckersRules.ts +167 -0
- package/src/games/checkers/CheckersScene.ts +308 -0
- package/src/games/color-switch/ColorSwitch.tsx +75 -0
- package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
- package/src/games/color-switch/ColorSwitchGame.ts +329 -0
- package/src/games/color-switch/ColorSwitchScene.ts +220 -0
- package/src/games/colors-sort/ColorsSort.tsx +82 -0
- package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
- package/src/games/colors-sort/ColorsSortGame.ts +246 -0
- package/src/games/colors-sort/ColorsSortScene.ts +315 -0
- package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
- package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
- package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
- package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
- package/src/games/crossy-road/CrossyRoad.tsx +74 -0
- package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
- package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
- package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
- package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
- package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
- package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
- package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
- package/src/games/dino-jump/DinoJump.tsx +77 -0
- package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
- package/src/games/dino-jump/DinoJumpGame.ts +344 -0
- package/src/games/dino-jump/DinoJumpScene.ts +686 -0
- package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
- package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
- package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
- package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
- package/src/games/falling-sticks/FallingSticks.tsx +72 -0
- package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
- package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
- package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
- package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
- package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
- package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
- package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
- package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
- package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
- package/src/games/flappy-bird/FlappyBird.tsx +73 -0
- package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
- package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
- package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
- package/src/games/fruit-merger/FruitMerger.tsx +73 -0
- package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
- package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
- package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
- package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
- package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
- package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
- package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
- package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
- package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
- package/src/games/game-2048/Game2048.tsx +84 -0
- package/src/games/game-2048/Game2048Constants.ts +68 -0
- package/src/games/game-2048/Game2048Game.ts +181 -0
- package/src/games/game-2048/Game2048Rules.ts +101 -0
- package/src/games/game-2048/Game2048Scene.ts +206 -0
- package/src/games/knife-hit/KnifeHit.tsx +78 -0
- package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
- package/src/games/knife-hit/KnifeHitGame.ts +264 -0
- package/src/games/knife-hit/KnifeHitScene.ts +360 -0
- package/src/games/ludo-king/LudoKing.tsx +86 -0
- package/src/games/ludo-king/LudoKingConstants.ts +212 -0
- package/src/games/ludo-king/LudoKingGame.ts +326 -0
- package/src/games/ludo-king/LudoKingRules.ts +143 -0
- package/src/games/ludo-king/LudoKingScene.ts +397 -0
- package/src/games/maze-runner/MazeRunner.tsx +88 -0
- package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
- package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
- package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
- package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
- package/src/games/memory-match/MemoryMatch.tsx +77 -0
- package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
- package/src/games/memory-match/MemoryMatchGame.ts +222 -0
- package/src/games/memory-match/MemoryMatchRules.ts +38 -0
- package/src/games/memory-match/MemoryMatchScene.ts +268 -0
- package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
- package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
- package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
- package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
- package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
- package/src/games/mob-control/MobControl.tsx +73 -0
- package/src/games/mob-control/MobControlConstants.ts +106 -0
- package/src/games/mob-control/MobControlGame.ts +176 -0
- package/src/games/mob-control/MobControlMeshes.ts +85 -0
- package/src/games/mob-control/MobControlRenderer.ts +108 -0
- package/src/games/mob-control/MobControlRules.ts +522 -0
- package/src/games/mob-control/MobControlScene.ts +399 -0
- package/src/games/number-search/NumberSearch.tsx +18 -0
- package/src/games/number-search/NumberSearchNumbers.ts +623 -0
- package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
- package/src/games/pac-man/PacMan.tsx +86 -0
- package/src/games/pac-man/PacManConstants.ts +169 -0
- package/src/games/pac-man/PacManGame.ts +406 -0
- package/src/games/pac-man/PacManRules.ts +255 -0
- package/src/games/pac-man/PacManScene.ts +387 -0
- package/src/games/paper-io/PaperIo.tsx +91 -0
- package/src/games/paper-io/PaperIoConstants.ts +86 -0
- package/src/games/paper-io/PaperIoGame.ts +193 -0
- package/src/games/paper-io/PaperIoMeshes.ts +233 -0
- package/src/games/paper-io/PaperIoRules.ts +315 -0
- package/src/games/paper-io/PaperIoScene.ts +310 -0
- package/src/games/penguin-run/PenguinMeshes.ts +269 -0
- package/src/games/penguin-run/PenguinModel.ts +712 -0
- package/src/games/penguin-run/PenguinRun.tsx +77 -0
- package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
- package/src/games/penguin-run/PenguinRunGame.ts +406 -0
- package/src/games/penguin-run/PenguinRunScene.ts +949 -0
- package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
- package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
- package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
- package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
- package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
- package/src/games/pipe-connect/PipeConnect.tsx +69 -0
- package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
- package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
- package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
- package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
- package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
- package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
- package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
- package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
- package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
- package/src/games/popit-fidget/PopitFidget.tsx +72 -0
- package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
- package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
- package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
- package/src/games/reversi/Reversi.tsx +94 -0
- package/src/games/reversi/ReversiConstants.ts +67 -0
- package/src/games/reversi/ReversiGame.ts +266 -0
- package/src/games/reversi/ReversiRules.ts +176 -0
- package/src/games/reversi/ReversiScene.ts +240 -0
- package/src/games/search-grid/SearchGrid.tsx +92 -0
- package/src/games/search-grid/SearchGridConstants.ts +178 -0
- package/src/games/search-grid/SearchGridGame.ts +209 -0
- package/src/games/search-grid/SearchGridScene.ts +301 -0
- package/src/games/shared/BackdropCard.tsx +54 -0
- package/src/games/shared/EngineBackdrop.ts +300 -0
- package/src/games/shared/EngineBlasts.ts +136 -0
- package/src/games/shared/EngineBlocks.ts +91 -0
- package/src/games/shared/EngineControlText.ts +17 -0
- package/src/games/shared/EngineDice.ts +250 -0
- package/src/games/shared/EngineFootprint.ts +35 -0
- package/src/games/shared/EngineFruits.ts +1435 -0
- package/src/games/shared/EngineGameLoader.tsx +88 -0
- package/src/games/shared/EngineGameScreen.tsx +325 -0
- package/src/games/shared/EngineGameWidth.ts +3 -0
- package/src/games/shared/EngineGameWidth.web.ts +3 -0
- package/src/games/shared/EngineGlyphs.ts +178 -0
- package/src/games/shared/EngineHud.ts +815 -0
- package/src/games/shared/EngineLoading.ts +477 -0
- package/src/games/shared/EngineMeadow.ts +725 -0
- package/src/games/shared/EngineMeshCache.ts +15 -0
- package/src/games/shared/EngineMeshes.ts +10 -0
- package/src/games/shared/EngineRacingChase.ts +21 -0
- package/src/games/shared/EngineRacingHandling.ts +48 -0
- package/src/games/shared/EngineReadyContext.ts +4 -0
- package/src/games/shared/EngineTilt.ts +44 -0
- package/src/games/shared/EngineTouchSurface.tsx +103 -0
- package/src/games/shared/EngineUtils.ts +52 -0
- package/src/games/shared/GameActivity.ts +13 -0
- package/src/games/shared/GameLoading.tsx +202 -0
- package/src/games/shared/GameLoadingTransition.tsx +61 -0
- package/src/games/shared/ProceduralCacheVersion.ts +2 -0
- package/src/games/shared/useEngineGame.ts +240 -0
- package/src/games/shared/useGameResource.ts +21 -0
- package/src/games/shared/useLiveState.ts +58 -0
- package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
- package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
- package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
- package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
- package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
- package/src/games/snake-3d/Snake3D.tsx +76 -0
- package/src/games/snake-3d/Snake3DConstants.ts +61 -0
- package/src/games/snake-3d/Snake3DGame.ts +192 -0
- package/src/games/snake-3d/Snake3DMotion.ts +22 -0
- package/src/games/snake-3d/Snake3DRules.ts +116 -0
- package/src/games/snake-3d/Snake3DScene.ts +322 -0
- package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
- package/src/games/space-fighter/SpaceFighter.tsx +74 -0
- package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
- package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
- package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
- package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
- package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
- package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
- package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
- package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
- package/src/games/stack-tower/StackTower.tsx +76 -0
- package/src/games/stack-tower/StackTowerConstants.ts +74 -0
- package/src/games/stack-tower/StackTowerGame.ts +236 -0
- package/src/games/stack-tower/StackTowerScene.ts +186 -0
- package/src/games/sudoku/Sudoku.tsx +73 -0
- package/src/games/sudoku/SudokuConstants.ts +127 -0
- package/src/games/sudoku/SudokuGame.ts +250 -0
- package/src/games/sudoku/SudokuRules.ts +125 -0
- package/src/games/sudoku/SudokuScene.ts +304 -0
- package/src/games/tangram/Tangram.tsx +79 -0
- package/src/games/tangram/TangramConstants.ts +64 -0
- package/src/games/tangram/TangramGame.ts +356 -0
- package/src/games/tangram/TangramRules.ts +409 -0
- package/src/games/tangram/TangramScene.ts +203 -0
- package/src/games/tank-1990/Tank1990.tsx +78 -0
- package/src/games/tank-1990/Tank1990Constants.ts +81 -0
- package/src/games/tank-1990/Tank1990Game.ts +331 -0
- package/src/games/tank-1990/Tank1990Rules.ts +390 -0
- package/src/games/tank-1990/Tank1990Scene.ts +434 -0
- package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
- package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
- package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
- package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
- package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
- package/src/games/tile-home/TileHome.tsx +92 -0
- package/src/games/tile-home/TileHomeConstants.ts +139 -0
- package/src/games/tile-home/TileHomeGame.ts +435 -0
- package/src/games/tile-home/TileHomeScene.ts +154 -0
- package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
- package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
- package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
- package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
- package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
- package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
- package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
- package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
- package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
- package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
- package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
- package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
- package/src/games/word-search/WordSearch.tsx +18 -0
- package/src/games/word-search/WordSearchWords.ts +1642 -0
- package/src/helpers/GamePatternData.ts +120 -0
- package/src/helpers/GameSettingsModal.tsx +384 -0
- package/src/helpers/GameTheme.tsx +37 -0
- package/src/helpers/IconPaths.ts +6 -0
- package/src/helpers/index.ts +2 -0
- package/src/index.tsx +60 -0
- package/src/services/GameAssetLoader.ts +111 -0
- package/src/services/GameAssets.ts +149 -0
- package/src/services/GameLoaders.ts +93 -0
- package/src/services/GamesConstants.ts +193 -0
- package/src/services/GamesMetadata.ts +711 -0
- package/src/services/GamesService.ts +116 -0
- package/src/services/HapticsService.ts +48 -0
- package/src/services/ScoringService.ts +19 -0
- package/src/services/SfxSources.ts +81 -0
- package/src/services/SoundsService.ts +582 -0
- package/src/services/ThemeService.ts +281 -0
- package/src/services/UtilsService.ts +134 -0
- package/src/services/index.ts +6 -0
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -38
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,lathe,merge,quat,recolor,shapeGeometry,tube}from"@nayan-ui/engine";import{noise,random}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0x455388}from"../shared/EngineMeshes.js";import{FINISH_CLEAR,LANE_X,SLAB,START_CLEAR,TILE_LENGTH,TILES_BEFORE_START,TILES_PAST_FINISH,TRACK_LENGTH}from"./PenguinRunConstants.js";export const LAST_TILE=Math.ceil(TRACK_LENGTH/TILE_LENGTH)+TILES_PAST_FINISH-1;const night=e=>"dark"===e.mode,DAY_LIGHT={direction:[.4,.9,.5],ambient:.72,color:[1.3,1.24,1.12],shadows:!0,shadowExtent:16},NIGHT_LIGHT={direction:[-.3,.85,.5],ambient:.66,color:[.95,1,1.25],shadows:!0,shadowExtent:16};export const lightFor=e=>night(e)?NIGHT_LIGHT:DAY_LIGHT;export const backgroundFor=e=>night(e)?[.16,.2,.32]:[.78,.88,.92];export const FOG=.02;const CANOPY_Y=-8,TREE_SPREAD=7.5,rgba=(e,o=1)=>[e[0],e[1],e[2],o],mix=(e,o,t)=>{const r=Math.min(1,Math.max(0,t));return[e[0]+(o[0]-e[0])*r,e[1]+(o[1]-e[1])*r,e[2]+(o[2]-e[2])*r]},STONE=[.82,.77,.66],STONE_DARK=[.56,.52,.45],MOSS=[.42,.56,.26],BARK=[.48,.34,.2],LEAF=[.26,.52,.18],LEAF_LIGHT=[.5,.72,.28],GOLD=[1,.76,.2],LEAF_DARK=[.12,.3,.1],PALM=[.34,.6,.2],WALK_X=3.78,WALK_WIDTH=1.44,WALK_OUTER=4.5,meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("penguin-run/PenguinRunScene:"+e,o),meshes.set(e,t)),t},weathered=(e,o=.5)=>({position:[t,r,s]})=>{const a=noise(3.1*t+e,3.1*s+2.3*r);let n=mix(STONE_DARK,STONE,.35+.8*a);return n=mix(n,MOSS,2.2*Math.max(0,noise(1.3*t+2*e,1.3*s+r)-(1-o))),rgba(n)},pathMesh=e=>cached("pr-path:"+e,()=>{const o=random(40+e),t=shapeGeometry("roundedBox"),r=[{geometry:shapeGeometry("cube"),position:[0,-.31,-TILE_LENGTH/2],scale:[5.3,.04,TILE_LENGTH],color:[.03,.025,.02,1]}];for(const s of[-1,1]){for(let e=0;e<4;e++)r.push({geometry:recolor(t,weathered(e+5*s,.6)),position:[2.85*s,.1,-1.5-3*e],scale:[.42,.5,2.94],color:[1,1,1,1]});for(let a=0;a<6;a++)r.push({geometry:recolor(t,weathered(20+a+7*s+13*e,.55)),position:[3.78*s,.04*(o()-.5)-.12,-1-2*a],scale:[1.4,.26,1.94],color:[1,1,1,1]});for(let e=0;e<4;e++){if(o()<.25)continue;const a=.35+.2*o();r.push({geometry:recolor(t,weathered(30+e+3*s,.7)),position:[4.32*s,a/2,-1.5-3*e],scale:[.34,a,2.4+.4*o()],color:[1,1,1,1]})}for(let e=0;e<3;e++){const e=-1-o()*(TILE_LENGTH-2),t=2.5+3.5*o(),a=4.55*s;r.push({geometry:tube([[a-.3*s,.05,e],[a+.08*s,-.3,e+.1],[a+.12*s,.5*-t,e-.1],[a+.05*s,-t,e+.15]],{radius:e=>.06-.035*e,sides:4,smoothness:3,color:({v:e})=>rgba(mix(LEAF,LEAF_LIGHT,.6*e))})})}}return r.push({geometry:recolor(t,weathered(3,.3)),position:[0,-.48,-TILE_LENGTH/2],scale:[9.3,.36,TILE_LENGTH+.02],color:[.85,.82,.78,1]}),r.push({geometry:recolor(shapeGeometry("cube"),({position:[e,o,t]})=>rgba(mix(mix(STONE_DARK,[.3,.3,.27],.08*-o),MOSS,1.6*Math.max(0,noise(.8*e,.8*t+o)-.55)))),position:[0,-4.6,-TILE_LENGTH/2],scale:[8.6,8,TILE_LENGTH],color:[1,1,1,1]}),_0x455388(merge(r),{center:!1,shine:.15})}),slabMesh=e=>cached("pr-slab:"+e,()=>_0x455388(merge([{geometry:recolor(shapeGeometry("roundedBox"),weathered(90+3*e,.35)),position:[0,-.15,0],scale:[1.66,.3,SLAB-.08],color:[1,1,1,1]}]),{center:!1,shine:.15})),brokenEdgeMesh=()=>cached("pr-broken",()=>{const e=random(97),o=[];for(const t of[-1,1])for(let r=0;r<5;r++)o.push({geometry:recolor(shapeGeometry("roundedBox"),weathered(100+r,.3)),position:[.33*r-.66+.1*(e()-.5),-.12-.1*e(),t*(SLAB/2-.08-.12*e())],rotation:quat.y(6.3*e()),scale:[.22+.12*e(),.2,.18+.12*e()],color:[1,1,1,1]});return _0x455388(merge(o),{center:!1,shine:.1})}),finishMesh=()=>cached("pr-finish",()=>{const e=shapeGeometry("roundedBox"),o=recolor(shapeGeometry("cube"),({position:[e,,o]})=>rgba((Math.floor(12*(e+.5))+Math.floor(3*(o+.5)))%2?[.96,.96,.94]:[.08,.08,.1]));return _0x455388(merge([{geometry:o,position:[0,.015,0],scale:[5.3,.03,1.2],color:[1,1,1,1]},{geometry:e,position:[-3.78,.2,0],scale:[1.1,.4,1.1],color:rgba([.8,.6,.16])},{geometry:e,position:[3.78,.2,0],scale:[1.1,.4,1.1],color:rgba([.8,.6,.16])},{geometry:e,position:[-3.78,3.1,0],scale:[.6,6.2,.6],color:rgba(GOLD)},{geometry:e,position:[3.78,3.1,0],scale:[.6,6.2,.6],color:rgba(GOLD)},{geometry:e,position:[0,6.25,0],scale:[8.36,.5,.7],color:rgba(GOLD)},{geometry:e,position:[0,5.35,.1],scale:[5.6,1.1,.12],color:rgba([.85,.12,.14])},{geometry:e,position:[0,5.35,.17],scale:[4.6,.12,.04],color:rgba([1,.9,.5])},...[-2.6,-1.3,0,1.3,2.6].map((e,o)=>{return{geometry:tube([[t=e,6,.4],[t+.06,5.45,.41]],{radius:e=>.14*(1-e),shape:e=>.2+.8*Math.abs(Math.cos(e*Math.PI*2)),sides:6,color:rgba([[.2,.5,.95],[1,.8,.15],[.2,.75,.3]][o%3])})};var t})]),{center:!1,shine:.5})}),startMesh=()=>cached("pr-start",()=>_0x455388(merge([{geometry:shapeGeometry("cube"),position:[0,.015,0],scale:[5.3,.03,.5],color:rgba([.96,.96,.92])}]),{center:!1,shine:.3})),templeMesh=()=>cached("pr-temple",()=>{const e=shapeGeometry("roundedBox"),o=(o,t=.5)=>recolor(e,weathered(o,t)),t=[0,1,2,3].map(e=>({geometry:o(150+e,.6-.1*e),position:[0,2.6*e-2,0],scale:[22-4.5*e,2.6,10-1.8*e],color:[1,1,1,1]}));return _0x455388(merge([{geometry:o(160,.3),position:[0,-8,0],scale:[24,12,12],color:[.85,.82,.78,1]},...t,{geometry:o(161,.3),position:[0,10.2,0],scale:[6,3.2,4.4],color:[1,1,1,1]},{geometry:e,position:[0,9.6,2.22],scale:[2,2.4,.1],color:[.05,.04,.03,1]},{geometry:e,position:[0,12.1,0],scale:[6.6,.5,5],color:rgba(GOLD)}]),{center:!1,shine:.15})}),columnMesh=e=>cached("pr-column:"+e,()=>{const o=e?2.2:4.4,t=shapeGeometry("roundedBox"),r=lathe([[.001,o],[.36,o-(e?.25:0)],[.38,o-.3],[.4,.8],[.44,.55]],{segments:24,displace:(o,t)=>.018*Math.cos(o*Math.PI*2*12)+(e&&t<.15?.4*(noise(9*o,1)-.5):0),color:weathered(e?7:2,.45)}),s=[{geometry:recolor(t,weathered(1,.7)),position:[0,.28,0],scale:[1.2,.56,1.2],color:[1,1,1,1]},{geometry:r}];return e?s.push({geometry:recolor(shapeGeometry("cylinder"),weathered(8,.6)),position:[.55,.32,.5],rotation:quat.z(Math.PI/2),scale:[.72,.8,.72],color:[1,1,1,1]}):(s.push({geometry:recolor(t,weathered(4,.3)),position:[0,o+.12,0],scale:[1.1,.24,1.1],color:[1,1,1,1]}),s.push({geometry:recolor(shapeGeometry("cylinder"),weathered(5,.3)),position:[0,o-.1,0],scale:[.95,.22,.95],color:[1,1,1,1]})),_0x455388(merge(s),{center:!1,shine:.1})}),idolMesh=()=>cached("pr-idol",()=>{const e=shapeGeometry("roundedBox"),o=o=>recolor(e,weathered(o,.55)),t=[.12,.11,.1,1];return _0x455388(merge([{geometry:o(1),position:[0,.35,0],scale:[1.5,.7,1.3],color:[1,1,1,1]},{geometry:o(2),position:[0,1.5,0],scale:[1.2,1.6,1.05],color:[1,1,1,1]},{geometry:o(3),position:[0,2.05,.5],scale:[1.15,.22,.2],color:[1,1,1,1]},{geometry:e,position:[-.28,1.82,.52],scale:[.3,.18,.08],color:t},{geometry:e,position:[.28,1.82,.52],scale:[.3,.18,.08],color:t},{geometry:o(4),position:[0,1.5,.58],scale:[.26,.5,.2],color:[1,1,1,1]},{geometry:e,position:[0,1.05,.53],scale:[.62,.12,.08],color:t},{geometry:o(5),position:[-.64,1.55,0],scale:[.14,.6,.35],color:[1,1,1,1]},{geometry:o(6),position:[.64,1.55,0],scale:[.14,.6,.35],color:[1,1,1,1]}]),{center:!1,shine:.1})}),torchMesh=()=>cached("pr-torch",()=>_0x455388(merge([{geometry:tube([[0,0,0],[.03,.6,.02],[-.02,1.2,0],[0,1.55,0]],{radius:e=>.07-.025*e,sides:8,color:rgba([.35,.24,.12])})},{geometry:lathe([[.001,1.5],[.18,1.55],[.26,1.75],[.22,1.76],[.001,1.65]],{segments:14,color:rgba([.55,.38,.16])})},{geometry:shapeGeometry("cylinder"),position:[0,.05,0],scale:[.35,.1,.35],color:rgba([.3,.22,.12])}]),{center:!1,shine:.6})),leafClump=(e,o=LEAF_DARK,t=LEAF_LIGHT)=>{const r=Array.from({length:7},(e,o)=>{const t=Math.PI/2-o/6*Math.PI;return[Math.max(.001,.5*Math.cos(t)),.5*Math.sin(t)]});return lathe(r,{segments:10,displace:(o,t)=>.08*Math.sin(o*Math.PI*2*3+e)*Math.sin(t*Math.PI*3+.7*e)+.04*Math.sin(o*Math.PI*2*7+1.9*e)*Math.sin(t*Math.PI*6),color:({position:[r,s,a]})=>rgba(mix(o,t,.35+1.1*s+.5*(noise(5*r+e,5*a-e)-.5)))})},bead=()=>lathe([[.001,.5],[.35,.35],[.5,0],[.35,-.35],[.001,-.5]],{segments:6}),bark=e=>({u:o,v:t})=>rgba(mix(mix([.3,.21,.13],BARK,.4+.8*noise(14*o+e,3*t)),MOSS,1.6*Math.max(0,.35-t)*noise(6*o,9*t+e))),treeMesh=e=>cached("pr-tree:"+e,()=>{const o=random(70+e),t=.8*(o()-.5),r=13+2*o(),s=o=>[t*o*o,o*r,.3*Math.sin(3*o+e)],a=[{geometry:tube(Array.from({length:6},(e,o)=>s(o/5)),{radius:e=>.62*(1-.6*e)+4*Math.max(0,.12-e),sides:10,smoothness:4,color:bark(e)})}];for(let t=0;t<5;t++){const r=t/5*Math.PI*2+.5*o(),s=1.8+.8*o();a.push({geometry:tube([[0,2.4,0],[.8*Math.cos(r),.9,.8*Math.sin(r)],[Math.cos(r)*s,0,Math.sin(r)*s]],{radius:e=>.4-.3*e,sides:6,smoothness:3,color:bark(e+t)})})}const n=[s(1)],i=3+Math.floor(2*o());for(let t=0;t<i;t++){const r=.55+t/i*.35+.05*o(),h=s(r),l=t/i*Math.PI*2+o(),m=1.6+1*o(),p=[h[0]+Math.cos(l)*m,h[1]+1.4+1.6*o(),h[2]+Math.sin(l)*m];a.push({geometry:tube([h,[(h[0]+p[0])/2,h[1]+.9,(h[2]+p[2])/2],p],{radius:e=>.28*(1-.5*r)*(1-.6*e),sides:6,smoothness:3,color:bark(e+10+t)})}),n.push(p)}return n.forEach((t,r)=>{const s=0===r?4:3;for(let n=0;n<s;n++){const s=o()*Math.PI*2,i=0===n?0:.6+.5*o(),h=(0===r?3.6:2.8)+1.2*o();a.push({geometry:leafClump(10*e+3*r+n),position:[t[0]+Math.cos(s)*i,t[1]+.4+.6*o(),t[2]+Math.sin(s)*i],rotation:quat.y(6.3*o()),scale:[h,h*(.5+.15*o()),h],color:[1,1,1,1]})}if(r>0&&o()<.8){const e=4+4*o();a.push({geometry:tube([[t[0],t[1],t[2]],[t[0]+.15,t[1]-.5*e,t[2]-.1],[t[0]-.1,t[1]-e,t[2]+.12]],{radius:.045,sides:4,smoothness:3,color:rgba(mix(BARK,LEAF,.55))})})}}),_0x455388(merge(a),{center:!1,shine:.05})}),palmMesh=e=>cached("pr-palm:"+e,()=>{const o=random(170+e),t=(o()<.5?-1:1)*(.6+.6*o()),r=10+2*o(),s=e=>[t*e*e,e*r,0],a=s(1),n=[{geometry:tube(Array.from({length:6},(e,o)=>s(o/5)),{radius:e=>.32-.1*e+2*Math.max(0,.08-e),sides:8,smoothness:5,color:({v:e})=>rgba(mix([.42,.33,.22],[.6,.5,.34],.5+.5*Math.sin(90*e)))})}];for(let e=0;e<9;e++){const t=e/9*Math.PI*2+.3*o(),r=3.6+1.2*o(),s=[Math.cos(t),0,Math.sin(t)],i=(e,o)=>[a[0]+s[0]*r*e,a[1]+o,a[2]+s[2]*r*e];n.push({geometry:tube([i(0,0),i(.35,.7),i(.7,.2),i(1,-1.3-.6*o())],{radius:e=>.42*Math.max(.05,Math.sin(Math.PI*Math.min(1,1.15*e)))**.6,shape:e=>.08+.92*Math.abs(Math.cos(e*Math.PI*2))**3,sides:6,smoothness:5,color:({v:e})=>rgba(mix(PALM,[.62,.74,.3],.8*e))})})}for(let e=0;e<3;e++){const o=e/3*Math.PI*2;n.push({geometry:bead(),position:[a[0]+.28*Math.cos(o),a[1]-.25,a[2]+.28*Math.sin(o)],scale:.32,color:rgba([.4,.27,.12])})}return _0x455388(merge(n),{center:!1,shine:.1})}),bushMesh=e=>cached("pr-bush:"+e,()=>{const o=random(210+e),t=[];for(let r=0;r<5;r++){const s=r/5*Math.PI*2+o(),a=0===r?0:.35+.2*o(),n=.7+.35*o();t.push({geometry:leafClump(300+7*e+r),position:[Math.cos(s)*a,.32*n,Math.sin(s)*a],scale:[n,.75*n,n],color:[1,1,1,1]})}const r=e?[1,.45,.6]:[1,.82,.25];for(let e=0;e<7;e++){const e=o()*Math.PI*2,s=.2+.45*o();t.push({geometry:bead(),position:[Math.cos(e)*s,.45+.35*o(),Math.sin(e)*s],scale:.11,color:rgba(r)})}return _0x455388(merge(t),{center:!1,shine:.1})}),canopyMesh=e=>cached("pr-canopy:"+e,()=>{const o=random(250+e),t=[];for(let r=0;r<9;r++){const s=4+3.5*o(),a=o();t.push({geometry:leafClump(400+11*e+r,mix(LEAF_DARK,[.08,.2,.08],a),mix(LEAF,LEAF_LIGHT,a)),position:[12*(o()-.5),1.5*o(),12*(o()-.5)],scale:[s,.55*s,s],color:[1,1,1,1]})}return _0x455388(merge(t),{center:!1,shine:.03})}),archMesh=()=>cached("pr-arch",()=>{const e=shapeGeometry("roundedBox"),o=(e,o)=>({geometry:tube([[e,5.3,.45],[e+.05,5.3-.5*o,.5],[e-.04,5.3-o,.48]],{radius:.04,sides:5,color:rgba(LEAF)})});return _0x455388(merge([{geometry:recolor(e,weathered(15,.8)),position:[-3.78,.25,0],scale:[1.35,.5,1.35],color:[1,1,1,1]},{geometry:recolor(e,weathered(16,.8)),position:[3.78,.25,0],scale:[1.35,.5,1.35],color:[1,1,1,1]},{geometry:recolor(e,weathered(11,.6)),position:[-3.78,2.8,0],scale:[1.05,5,1.05],color:[1,1,1,1]},{geometry:recolor(e,weathered(12,.6)),position:[3.78,2.8,0],scale:[1.05,5,1.05],color:[1,1,1,1]},{geometry:recolor(e,weathered(13,.4)),position:[0,5.6,0],scale:[8.8,.9,1.3],color:[1,1,1,1]},{geometry:recolor(e,weathered(14,.2)),position:[0,6.25,0],scale:[9.2,.4,1.5],color:[1,1,1,1]},{geometry:e,position:[0,5.6,.66],scale:[1.2,.5,.06],color:rgba(GOLD)},o(-2.2,1.6),o(-1.1,.9),o(.9,1.3),o(2.4,2)]),{center:!1,shine:.15})}),wideGateMesh=()=>cached("pr-wide-gate",()=>{const e=shapeGeometry("roundedBox"),o=shapeGeometry("cone"),t=Array.from({length:17},(e,t)=>({geometry:recolor(o,weathered(120+t,.2)),position:[.3*t-2.4,.95,.04],rotation:quat.x(Math.PI),scale:[.13,.2+t%2*.06,.13],color:[1,1,1,1]})),r=[-2.1,-1.2,-.4,.7,1.5,2.3].map((e,o)=>({geometry:tube([[e,1.08,.32],[e+.03,.95-o%3*.04,.35],[e-.02,.84-o%2*.1,.33]],{radius:.022,sides:5,color:rgba(LEAF)})})),s=[-1.8,-.9,0,.9,1.8].map(e=>({geometry:shapeGeometry("cylinder"),position:[e,1.32,.31],rotation:quat.x(Math.PI/2),scale:[.22,.04,.22],color:rgba(GOLD)}));return _0x455388(merge([...[-2.85,2.85].flatMap((o,t)=>[{geometry:recolor(e,weathered(130+t,.75)),position:[o,.25,0],scale:[.7,.5,.8],color:[1,1,1,1]},{geometry:recolor(e,weathered(132+t,.5)),position:[o,1.25,0],scale:[.5,2.5,.6],color:[1,1,1,1]}]),{geometry:recolor(e,weathered(134,.35)),position:[0,1.38,0],scale:[6.3,.6,.62],color:[1,1,1,1]},{geometry:recolor(e,weathered(135,.25)),position:[0,1.06,0],scale:[5.4,.14,.5],color:[.9,.86,.8,1]},{geometry:recolor(e,weathered(136,.2)),position:[0,1.76,0],scale:[6.6,.18,.72],color:[1,1,1,1]},...s,...t,...r]),{center:!1,shine:.15})}),coinMesh=()=>cached("pr-coin",()=>_0x455388(merge([{geometry:shapeGeometry("cylinder"),rotation:quat.x(Math.PI/2),scale:[.5,.08,.5],color:rgba(GOLD)},{geometry:shapeGeometry("cylinder"),rotation:quat.x(Math.PI/2),scale:[.34,.1,.34],color:rgba([1,.86,.36])}]),{shine:1})),gemMesh=()=>cached("pr-gem",()=>_0x455388(lathe([[.001,.3],[.3,.14],[.34,.06],[.001,-.38]],{segments:8,color:[1,1,1,1]}),{shine:1}));export function prepareRunMeshes(){for(const e of warmAssets())e()}export function*warmAssets(){yield()=>pathMesh(0),yield()=>pathMesh(1),yield()=>columnMesh(!1),yield()=>columnMesh(!0),yield()=>idolMesh(),yield()=>torchMesh(),yield()=>treeMesh(0),yield()=>treeMesh(1),yield()=>treeMesh(2),yield()=>palmMesh(0),yield()=>palmMesh(1),yield()=>bushMesh(0),yield()=>bushMesh(1),yield()=>canopyMesh(0),yield()=>canopyMesh(1),yield()=>archMesh(),yield()=>slabMesh(0),yield()=>slabMesh(1),yield()=>slabMesh(2),yield()=>brokenEdgeMesh(),yield()=>finishMesh(),yield()=>startMesh(),yield()=>templeMesh(),yield()=>wideGateMesh(),yield()=>coinMesh(),yield()=>gemMesh()}const slabZ=e=>-(e+.5)*SLAB;export function generateTrack(e){const o=random(e),t=[],r=Math.floor((TRACK_LENGTH-FINISH_CLEAR)/SLAB);for(let e=Math.ceil(START_CLEAR/SLAB);e<=r;){const r=slabZ(e),s=e*SLAB/TRACK_LENGTH;if(o()<.4+.15*s){const e=o()<.5?"gap":"beam";for(let o=0;o<3;o++)t.push({kind:e,lane:o,z:r,wide:!0})}else{const e=[0,1,2].sort(()=>o()-.5),a=o()<.15+.5*s?2:1;for(let o=0;o<a;o++)t.push({kind:"gap",lane:e[o],z:r})}e+=Math.max(4,5-Math.floor(2*s))+Math.floor(o()*(4-Math.floor(2*s)))}const s=(e,o,r)=>t.some(t=>t.lane===e&&Math.abs(t.z-o)<("gap"===t.kind?SLAB/2:.5)+r),a=[];let n=Math.floor(3*o()),i=8+6*o();for(let e=6;e<TRACK_LENGTH-2;e+=1.6){const t=-e;if(e>=i&&(n=(n+1+Math.floor(2*o()))%3,i=e+6+8*o()),s(n,t,.9)){const e=[0,1,2].filter(e=>!s(e,t,1.6));if(!e.length)continue;n=e[Math.floor(o()*e.length)]}a.push({lane:n,z:t,gem:o()<.04})}return{seed:e,obstacles:t,pickups:a}}export function spawnTile(e,o,t,r){const s=night(t),a=-o*TILE_LENGTH,n=a-TILE_LENGTH,i=e=>e<=a&&e>n,h=random(31*r.seed+17*o),l=s?[.8,.85,1,1]:[1,1,1,1],m=[],p=(o,t,r=1,s=0,a=l,n={})=>{const i=e.spawn({mesh:o,position:t,scale:r,rotation:quat.y(s),color:a,pickable:!1,...n});return m.push(i),i};p(pathMesh(Math.abs(o)%2),[0,0,a]);const d=Math.round(TILE_LENGTH/SLAB);for(let e=0;e<d;e++){const t=slabZ(o*d+e);for(let e=0;e<3;e++){if(r.obstacles.some(o=>"gap"===o.kind&&o.lane===e&&Math.abs(o.z-t)<.01)){p(brokenEdgeMesh(),[LANE_X[e],0,t],1,0);continue}const o=.88+.2*h();p(slabMesh(Math.floor(3*h())),[LANE_X[e],.02*(h()-.5),t],1,.015*(h()-.5),[l[0]*o,l[1]*o,l[2]*o,1])}}for(const e of[-1,1]){const o=h(),t=a-2-8*h();o<.45?p(columnMesh(h()<.35),[3.78*e,-.02,t],.85+.15*h(),6.3*h()):o<.65&&p(idolMesh(),[3.78*e,-.02,t],.72,e<0?.9:-.9);for(let o=0;o<2;o++){const o=a-1-10*h();h()<.6&&Math.abs(o-t)>1.6&&p(bushMesh(Math.floor(2*h())),[e*(3.78+.35*(h()-.3)),-.02,o],.75+.35*h(),6.3*h())}const r=a-1-10*h();h()<.75&&(p(torchMesh(),[2.85*e,.35,r]),p("flame",[2.85*e,2.05,r],.55,0,[2.6,1.3,.45,1],{bob:{amplitude:[.02,.06,.02],speed:9+4*h(),phase:6*h()}}),p("puff",[2.85*e,2.3,r],.6,0,[1.4,.8,.4,.35],{bob:{amplitude:[.03,.12,.03],speed:3,phase:6*h()}}));for(let o=0;o<2;o++){const o=[e*(12+7*h()),-9,a-h()*TILE_LENGTH];h()<.35?p(palmMesh(Math.floor(2*h())),o,.9+.3*h(),6.3*h()):p(treeMesh(Math.floor(3*h())),o,.85+.35*h(),6.3*h())}p(canopyMesh(Math.floor(2*h())),[e*(10+6*h()),-8,a-6],1+.4*h(),6.3*h(),l)}o>0&&o%5==0&&p(archMesh(),[0,0,a-6]),h()<.5&&p("puff",[16*(h()-.5),-3,a-12*h()],6+4*h(),0,s?[.4,.45,.6,.25]:[1.1,1.15,1.1,.35]),i(-TRACK_LENGTH)&&p(finishMesh(),[0,0,-TRACK_LENGTH]),i(0)&&p(startMesh(),[0,0,-.3]),o===-TILES_BEFORE_START&&p(templeMesh(),[0,0,a+4]),o===LAST_TILE&&p(templeMesh(),[0,0,n-4]);const g=r.obstacles.filter(e=>i(e.z)).map(e=>"gap"===e.kind||1!==e.lane?{...e,e:null}:{...e,e:p(wideGateMesh(),[0,0,e.z],1,0)}),M=r.pickups.filter(e=>i(e.z)).map(o=>spawnPickup(e,m,o.lane,o.gem?1:.9,o.z,o.gem));return{index:o,z:a,entities:m,obstacles:g,pickups:M}}function spawnPickup(e,o,t,r,s,a){const n=e.spawn({mesh:a?gemMesh():coinMesh(),position:[LANE_X[t],r,s],scale:a?.9:.85,color:a?[.35,.8,1.6,1]:[1.25,1.1,.75,1],spin:[0,a?1.8:3.2,0],bob:{amplitude:[0,.1,0],speed:3,phase:s},pickable:!1});return o.push(n),{gem:a,lane:t,y:r,z:s,e:n,taken:!1}}export function despawnTile(e,o){for(const t of o.entities)e.despawn(t)}export function coinSparkle(e,o,t){e.burst({position:o,count:t?16:7,mesh:"flame",size:t?.22:.14,speed:t?3:2,lifetime:.35,gravity:0,color:t?[.5,1.2,2.4,1]:[2.4,1.9,.7,1],endSize:0})}export function crashDust(e,o){e.burst({position:o,count:14,mesh:"sphere",size:.1,speed:4,lifetime:.6,gravity:-9,color:[rgba(STONE),rgba(STONE_DARK)],endSize:.05}),effects.dust(e,{position:o,count:6,size:.6,speed:1.2,lifetime:.9,color:[.8,.75,.65,.7],endSize:2.2})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{COLORS,getLayout,LIGHT}from"./PerfectCircleConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./PerfectCircleGame.js";import{levelOf}from"./PerfectCircleRules.js";import{jsx as _0x4a9b23}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.PERFECT_CIRCLE;export const PerfectCircle=engineGame(GAME_IDS.PERFECT_CIRCLE,e=>{const[r,t]=useLiveState(0),{theme:s,status:a,screen:i,gameOver:o}=useEngineGame(e,{gameId:GAME_IDS.PERFECT_CIRCLE,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,r,t,s)=>{const a=getLayout(r,t,s);return setLayout(e,a),2*a.radius},drag:drag,reportScore:e=>Math.round(100*e.accuracy),sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onOver:(e,r)=>e("win"===r?SOUNDS.SUCCESS:SOUNDS.FAIL,"win"===r?HapticType.SUCCESS:HapticType.ERROR),wire:(e,r)=>{e.onAccuracy=t,e.onEvent=e=>{"begin"===e?r(null,HapticType.LIGHT):"end"===e&&r(SOUNDS.DRAW_END,HapticType.MEDIUM)}}}),n=useMemo(()=>toRgb(s.BACKGROUND),[s.BACKGROUND]),m=levelOf(r);return _0x4a9b23(EngineGameScreen,{...i,light:LIGHT,background:n,columns:[{label:"ACCURACY",value:String(r),valueColor:r>0&&"light"!==s.mode?COLORS.UI:void 0}],subtext:"Draw perfect circle!",gameOver:o({title:"win"===a?m.label.toUpperCase():"NOT QUITE!",message:"win"===a?r+"% accuracy - Amazing circle!":r+"% accuracy - Need >70% to win",scoreLabel:"Final Score",score:r,buttonText:"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 MIN_POINT_DISTANCE=4;export const STROKE_RADIUS=2.5;export const FIT_TRACE_TIME=.65;export const TINT_TIME=.38;export const COLORS={STROKE:"#00d4ff",SUCCESS:"#4ecca3",FAIL:"#ff6b6b",GUIDE:"#ffffff",UI:"#00d4ff"};export const TILT=0;export const LIGHT=frontLight([-.4,.55,1],.45);const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120;export function getLayout(t,o,r){let e=gameWidthFor(t)/2;const n=getScoreBoardTop(r)+82+8,T=o-120;return T-n<2*e&&(e=Math.max(60,(T-n)/2)),{width:t,height:o,centerY:o/2,tilt:0,cx:t/2,cy:Math.min(Math.max(o/2+55,n+e),T-e),radius:e}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted}from"../shared/EngineTilt.js";import{MIN_POINT_DISTANCE}from"./PerfectCircleConstants.js";import{accuracyOf,fitCircle,MIN_POINTS,WIN_ACCURACY}from"./PerfectCircleRules.js";import{beginStroke,buildScene,clearStroke,endStroke,extendStroke,removeScene,setSceneTheme,verdict}from"./PerfectCircleScene.js";const WORLD_CAPACITY=3e3,MAX_POINTS=1400;export function createGame(e){return{world:new World(3e3),camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",points:[],drawing:!1,accuracy:0,won:!1,fit:null,onPhase:e=>{},onAccuracy:e=>{},onEvent:e=>{}}}export function setLayout(e,n){e.scene&&removeScene(e.world,e.scene),e.layout=n,aimTilted(e.camera,n),e.scene=buildScene(e.world,n,e.theme),e.drawing=!1,"over"!==e.phase&&(e.points=[])}export function setTheme(e,n){e.theme=n,e.scene&&setSceneTheme(e.world,e.scene,n)}export function start(e){"ready"===e.phase&&(reset(e),e.phase="playing",e.onPhase("playing"))}export function reset(e){e.points=[],e.drawing=!1,e.accuracy=0,e.won=!1,e.fit=null,e.scene&&clearStroke(e.world,e.scene),e.onAccuracy(0),"ready"!==e.phase&&(e.phase="ready",e.onPhase("ready"))}export function dispose(e){e.world.dispose()}export function tick(e,n){e.world.isDisposed||e.world.update(n)}function clamp(e,n,r){const t=n-e.cx,o=r-e.cy,i=t*t+o*o;if(i<=e.radius*e.radius)return{x:n,y:r};const s=e.radius/Math.sqrt(i);return{x:e.cx+t*s,y:e.cy+o*s}}export function drag(e,{phase:n,x:r,y:t}){const{layout:o,scene:i}=e;if(o){if("start"===n){if("playing"!==e.phase||e.drawing)return;const n=clamp(o,r,t);return e.points=[n],e.drawing=!0,i&&beginStroke(e.world,o,i,n),void e.onEvent("begin")}if(e.drawing){if("move"===n){const n=e.points[e.points.length-1];if((r-n.x)**2+(t-n.y)**2<MIN_POINT_DISTANCE*MIN_POINT_DISTANCE||e.points.length>=1400)return;const s=clamp(o,r,t);return e.points.push(s),void(i&&extendStroke(e.world,o,i,n,s))}e.drawing=!1,i&&endStroke(e.world,i),e.onEvent("end"),finish(e)}}}function finish(e){const n=e.layout;if(e.points.length<MIN_POINTS)e.accuracy=0,e.won=!1;else{e.accuracy=accuracyOf(e.points,{centerX:n.cx,centerY:n.cy,radius:n.radius});const r=fitCircle(e.points);e.fit=Number.isFinite(r.radius)&&r.radius>0?{cx:r.centerX,cy:r.centerY,r:r.radius}:null,e.won=e.accuracy>=WIN_ACCURACY,e.onAccuracy(e.accuracy),e.onEvent("scored")}e.scene&&verdict(e.world,n,e.scene,e.won,e.fit,e.theme),e.phase="over",e.onPhase("over")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const MIN_POINTS=20;export const WIN_ACCURACY=80;export const SUCCESS_ACCURACY=70;export function fitCircle(t){const n=t.length;let e=0,a=0,r=0,o=0,s=0,l=0,h=0,i=0,C=0;for(const n of t){const t=n.x,M=n.y,f=t*t,u=M*M;e+=t,a+=M,r+=f,o+=u,s+=t*M,l+=f*t,h+=u*M,i+=f*M,C+=t*u}const M=n*r-e*e,f=n*s-e*a,u=n*o-a*a,x=.5*(n*l+n*C-e*r-e*o),E=.5*(n*i+n*h-a*r-a*o),m=M*u-f*f;let A,g;Math.abs(m)<1e-10?(A=e/n,g=a/n):(A=(x*u-f*E)/m,g=(M*E-f*x)/m);let Y=0;for(const n of t)Y+=Math.sqrt((n.x-A)**2+(n.y-g)**2);return{centerX:A,centerY:g,radius:Y/n}}function angularCoverage(t,n,e){if(t.length<2)return 0;let a=Math.atan2(t[0].y-e,t[0].x-n),r=0;for(let o=1;o<t.length;o++){const s=Math.atan2(t[o].y-e,t[o].x-n);let l=s-a;for(a=s;l>Math.PI;)l-=2*Math.PI;for(;l<-Math.PI;)l+=2*Math.PI;r+=Math.abs(l)}return Math.min(r/(2*Math.PI),1)}export function accuracyOf(t,n){if(t.length<20)return 0;const{centerX:e,centerY:a,radius:r}=fitCircle(t);if(r<30)return 0;const o=t[0],s=t[t.length-1],l=Math.sqrt((s.x-o.x)**2+(s.y-o.y)**2),h=.15*n.radius;if(l>h)return 0;if(angularCoverage(t,e,a)<.85)return 0;const i=Math.max(0,100*(1-Math.abs(r-n.radius)/n.radius)),C=Math.sqrt((e-n.centerX)**2+(a-n.centerY)**2),M=Math.max(0,100*(1-C/n.radius));let f=0;for(const n of t){const t=Math.sqrt((n.x-e)**2+(n.y-a)**2);f+=Math.abs(t-r)/r}const u=.6*Math.max(0,100*(1-f/t.length*2))+.15*i+.15*M+100*(1-l/h)*.1;return Math.round(Math.min(100,Math.max(0,u)))}export const ACCURACY_LEVELS=[{min:95,label:"PERFECT!"},{min:90,label:"EXCELLENT!"},{min:85,label:"GREAT!"},{min:80,label:"GOOD!"},{min:70,label:"NICE TRY!"},{min:0,label:"KEEP TRYING!"}];export const levelOf=t=>ACCURACY_LEVELS.find(n=>t>=n.min)??ACCURACY_LEVELS[ACCURACY_LEVELS.length-1];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,quat,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x1efa72}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{COLORS,FIT_TRACE_TIME,STROKE_RADIUS,TINT_TIME}from"./PerfectCircleConstants.js";const meshes=new Map,cached=(o,e)=>{let t=meshes.get(o);return!t&&(t=cacheGameAsset("perfect-circle/PerfectCircleScene:"+o,e),meshes.set(o,t)),t},STAND_UP=quat.x(Math.PI/2),BACKDROP_DEPTH=30,PLATE_DEPTH=6,STROKE_Z=4,FIT_SEGMENTS=72,ringMesh=o=>cached("pc-ring:"+o.toFixed(4),()=>{const e=Array.from({length:97},(o,e)=>{const t=e/96*Math.PI*2;return[Math.cos(t),Math.sin(t),0]});return _0x1efa72(tube(e,{radius:o/2,sides:12,smoothness:2,caps:!1}),{center:!1,shine:.5})}),neon=o=>{const[e,t,r]=toColor(o);return[1.25*e,1.25*t,1.25*r,1]};export const toWorld=(o,e,t=4)=>[e.x-o.width/2,o.height/2-e.y,t];const plateColor=o=>"classic"===o.mode?toColor(COLORS.GUIDE,.2):toColor(o.BOARD.SURFACE),ringColor=o=>"classic"===o.mode?toColor(COLORS.GUIDE,.45):toColor(o.BOARD.BORDER);export function buildScene(o,e,t){const r=spawnBackdrop(o,e.width,e.height,-30,t);placeTiltedBackdrop(o,r,e,30);const s=toWorld(e,{x:e.cx,y:e.cy},0),n=2*e.radius+10;return{backdrop:r,plate:o.spawn({mesh:"cylinder",position:[s[0],s[1],-3],rotation:STAND_UP,scale:[n,6,n],color:plateColor(t),pickable:!1}),ring:o.spawn({mesh:ringMesh(3/e.radius),position:[s[0],s[1],1.5],scale:e.radius,color:ringColor(t),pickable:!1}),tip:o.spawn({mesh:"sphere",scale:0,color:neon(COLORS.STROKE),pickable:!1}),stroke:[],fit:[]}}export function removeScene(o,e){for(const t of[e.backdrop,e.plate,e.ring,e.tip,...e.stroke,...e.fit])o.despawn(t)}export function setSceneTheme(o,e,t){setBackdropTheme(o,e.backdrop,t),o.set(e.plate,{color:plateColor(t)}),o.set(e.ring,{color:ringColor(t)})}function bar(o,e,t,r,s,n=1){const a=t[0]-e[0],i=t[1]-e[1],p=Math.hypot(a,i);return o.spawn({mesh:"cylinder",position:[(e[0]+t[0])/2,(e[1]+t[1])/2,e[2]],rotation:quat.z(Math.atan2(i,a)-Math.PI/2),scale:[2*r*n,p*n,2*r*n],color:s,pickable:!1})}export function beginStroke(o,e,t,r){clearStroke(o,t);const s=toWorld(e,r);t.stroke.push(o.spawn({mesh:"sphere",position:s,scale:2*STROKE_RADIUS,color:neon(COLORS.STROKE),pickable:!1})),o.stopAnimation(t.tip),o.set(t.tip,{position:[s[0],s[1],s[2]+1],color:neon(COLORS.STROKE)}),o.animate(t.tip,{scale:3.2*STROKE_RADIUS},{duration:.12,easing:"back"})}export function extendStroke(o,e,t,r,s){const n=toWorld(e,r),a=toWorld(e,s),i=neon(COLORS.STROKE);t.stroke.push(bar(o,n,a,STROKE_RADIUS,i)),t.stroke.push(o.spawn({mesh:"sphere",position:a,scale:2*STROKE_RADIUS,color:i,pickable:!1})),o.set(t.tip,{position:[a[0],a[1],a[2]+1]})}export function endStroke(o,e){o.animate(e.tip,{scale:0},{duration:.15})}export function verdict(o,e,t,r,s,n){const a=neon(r?COLORS.SUCCESS:COLORS.FAIL);for(const e of t.stroke)o.animate(e,{color:a},{duration:TINT_TIME,easing:"easeOut"});if(effects.sparkle(o,{position:toWorld(e,{x:e.cx,y:e.cy},10),count:r?50:14,size:3,speed:e.radius*(r?2.2:1),lifetime:.9,colors:[a,[1,1,1,1]],flash:r}),!s)return;const i="classic"===n.mode?[1,1,1,.6]:toColor(n.TEXT,.6);for(let r=0;r<72;r++){const n=-Math.PI/2+r/72*Math.PI*2,a=-Math.PI/2+(r+1)/72*Math.PI*2,p=toWorld(e,{x:s.cx+Math.cos(n)*s.r,y:s.cy+Math.sin(n)*s.r},7),l=toWorld(e,{x:s.cx+Math.cos(a)*s.r,y:s.cy+Math.sin(a)*s.r},7),h=bar(o,p,l,.9,i,.001),d=Math.hypot(l[0]-p[0],l[1]-p[1]);o.animate(h,{scale:[1.8,1.05*d,1.8]},{duration:.06,delay:TINT_TIME/2+r/72*FIT_TRACE_TIME}),t.fit.push(h)}}export function clearStroke(o,e){for(const t of[...e.stroke,...e.fit])o.despawn(t);e.stroke=[],e.fit=[],o.stopAnimation(e.tip),o.set(e.tip,{scale:0})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";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{timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,gridSizeFor,LIGHT,TIME_LIMIT}from"./PipeConnectConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./PipeConnectGame.js";import{jsx as _0x5e7ab0}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.PIPE_CONNECT,GRID_SIZE=gridSizeFor(isTablet);export const PipeConnect=engineGame(GAME_IDS.PIPE_CONNECT,e=>{const[t,s]=useLiveState(TIME_LIMIT),{game:r,theme:i,status:n,screen:o,gameOver:a}=useEngineGame(e,{gameId:GAME_IDS.PIPE_CONNECT,create:e=>createGame(e,GRID_SIZE),start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,r)=>{const i=getLayout(t,s,r,GRID_SIZE);return setLayout(e,i),i.board},tap:tap,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onStop:e=>e(null,HapticType.MEDIUM),onOver:(e,t)=>{"win"!==t&&e(SOUNDS.GAME_OVER,HapticType.HEAVY)},wire:(e,t)=>{e.onTime=s,e.onTurn=e=>t(e?SOUNDS.COMPLETE:SOUNDS.ROTATE,e?HapticType.SUCCESS:HapticType.LIGHT)}});return _0x5e7ab0(EngineGameScreen,{...o,light:LIGHT,columns:[timerColumn(t,i,0)],subtext:"Connect the pipes!",gameOver:a({title:"win"===n?"CONNECTED!":"TIME UP!",message:"win"===n?"All pipes connected!":"You ran out of time!",scoreLabel:"Final Score",score:r.score,buttonText:"Play Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const TIME_LIMIT=120;export const POINTS_PER_PUZZLE=5e3;export const gridSizeFor=T=>T?8:7;export let PipeType=function(T){return T.EMPTY="empty",T.STRAIGHT="straight",T.CORNER="corner",T.CROSS="cross",T.T_SHAPE="t-shape",T.SOURCE="source",T.SINK="sink",T}({});export const DIRECTION={TOP:1,RIGHT:2,BOTTOM:4,LEFT:8};const ALL=DIRECTION.TOP|DIRECTION.RIGHT|DIRECTION.BOTTOM|DIRECTION.LEFT;export const PIPE_OPENINGS={[PipeType.EMPTY]:[0,0,0,0],[PipeType.STRAIGHT]:[DIRECTION.TOP|DIRECTION.BOTTOM,DIRECTION.LEFT|DIRECTION.RIGHT,DIRECTION.TOP|DIRECTION.BOTTOM,DIRECTION.LEFT|DIRECTION.RIGHT],[PipeType.CORNER]:[DIRECTION.TOP|DIRECTION.RIGHT,DIRECTION.RIGHT|DIRECTION.BOTTOM,DIRECTION.BOTTOM|DIRECTION.LEFT,DIRECTION.LEFT|DIRECTION.TOP],[PipeType.CROSS]:[ALL,ALL,ALL,ALL],[PipeType.T_SHAPE]:[DIRECTION.TOP|DIRECTION.RIGHT|DIRECTION.BOTTOM,DIRECTION.RIGHT|DIRECTION.BOTTOM|DIRECTION.LEFT,DIRECTION.BOTTOM|DIRECTION.LEFT|DIRECTION.TOP,DIRECTION.LEFT|DIRECTION.TOP|DIRECTION.RIGHT],[PipeType.SOURCE]:[ALL,ALL,ALL,ALL],[PipeType.SINK]:[ALL,ALL,ALL,ALL]};export const TURN_TIME=.2;export const FLOW_STEP=.045;export const WIN_STEP=.03;export const TILT=.32;export const LIGHT=frontLight([-.4,.5,1],.45);export const COLORS={PIPE:"#8B9DC3",WATER:"#4FC3F7",SOURCE:"#4CAF50",SINK:"#FF7043",CLASSIC_BOARD:"rgba(255, 255, 255, 0.30)",CLASSIC_CELL:"rgba(255, 255, 255, 0.10)"};const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,TABLET_WIDTH=640;export function getLayout(T,I,O,t){const E=T>640?6:4,e=gameWidthFor(T),R=getScoreBoardTop(O)+82,o=Math.max(200,I-R-110),C=Math.max(10,Math.floor(Math.min((e-2*E)/t,(o/Math.cos(.32)-2*E)/t)));return{width:T,height:I,tilt:.32,centerY:R+o/2,size:t,cell:C,padding:E,board:C*t+2*E}}export const isTabletWidth=T=>T>640;export function cellCentre(T,I,O){const t=T.board/2;return[-t+T.padding+(O+.5)*T.cell,t-T.padding-(I+.5)*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{PipeType,POINTS_PER_PUZZLE,TIME_LIMIT}from"./PipeConnectConstants.js";import{findConnectedPath,generatePuzzle,isPuzzleCompleteFromSet,rotatePipe}from"./PipeConnectRules.js";import{buildScene,flow,removeScene,setSceneTheme,splash,turnPiece,winPulse}from"./PipeConnectScene.js";const WORLD_CAPACITY=300,reach=(e,o=findConnectedPath(e))=>{const t=new Map;for(const e of o)t.set(e,t.size+1);return t};export function createGame(e,o){const t=new World(300),n=generatePuzzle(o),r={world:t,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,size:o,layout:null,scene:null,phase:"ready",grid:n,wet:reach(n),get score(){return t.scoreboard.score},get time(){return t.scoreboard.shownSeconds},won:!1,onPhase:e=>{},onTime:e=>{},onTurn:e=>{}};return t.scoreboard.reset(0,TIME_LIMIT),t.scoreboard.handlers={onSecond:e=>r.onTime(e),onTimeUp:()=>{"playing"===r.phase&&(r.won=!1,r.phase="over",r.onPhase("over"))}},r}const index=(e,o,t)=>o*e.size+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,e.grid,new Set(e.wet.keys()))}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.startCountdown(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){e.grid=generatePuzzle(e.size),e.wet=reach(e.grid),e.world.scoreboard.reset(0,TIME_LIMIT),e.won=!1,e.phase="ready",e.layout&&setLayout(e,e.layout),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(o)}export function cellAt(e,o,t){const n=e.layout;if(!n)return null;const[r,s]=unproject(n,o,t,.15*n.cell),i=n.board/2,a=Math.floor((r+i-n.padding)/n.cell),l=Math.floor((i-n.padding-s)/n.cell);return l>=0&&l<e.size&&a>=0&&a<e.size?[l,a]:null}export function tap(e,o,t){const n=cellAt(e,o,t);n&&rotateAt(e,n[0],n[1])}export function rotateAt(e,o,t){if("playing"!==e.phase)return;const n=e.grid[o]?.[t];if(!n||n.fixed||n.type===PipeType.EMPTY)return;const r=rotatePipe(n);e.grid[o][t]=r;const s=e.wet,i=findConnectedPath(e.grid),a=isPuzzleCompleteFromSet(e.grid,i);e.wet=reach(e.grid,i);const{layout:l,scene:d}=e;if(l&&d){const n=d.pieces[index(e,o,t)];null!=n&&turnPiece(e.world,n,r.rotation);let i=0;for(const[o,t]of e.wet)s.has(o)||i&&!(t<i)||(i=t);for(const o of e.grid)for(const t of o){const o=d.pieces[index(e,t.row,t.col)];if(null==o)continue;const n=e.wet.get(t.id);!!n!==s.has(t.id)&&flow(e.world,l,o,t,!!n,n??0,i)}if(a){for(const[o,t]of e.wet){const[n,r]=o.split("-").map(Number),s=d.pieces[index(e,n,r)];null!=s&&winPulse(e.world,l,s,t)}const o=e.grid.flat().find(e=>e.type===PipeType.SINK);o&&splash(e.world,l,o.row,o.col)}}if(a)return e.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-e.time,TIME_LIMIT,e.score+POINTS_PER_PUZZLE)),e.world.scoreboard.stop(),e.won=!0,e.phase="over",e.onTurn(!0),void e.onPhase("over");e.onTurn(!1)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{DIRECTION,PIPE_OPENINGS,PipeType}from"./PipeConnectConstants.js";export const getOpenDirections=t=>{const o=PIPE_OPENINGS[t.type];return o?o[t.rotation%4]??0:0};const areConnected=(t,o)=>{const e=getOpenDirections(t),n=getOpenDirections(o),r=o.row-t.row,p=o.col-t.col;return-1===r&&0===p?0!==(e&DIRECTION.TOP)&&0!==(n&DIRECTION.BOTTOM):1===r&&0===p?0!==(e&DIRECTION.BOTTOM)&&0!==(n&DIRECTION.TOP):0===r&&-1===p?0!==(e&DIRECTION.LEFT)&&0!==(n&DIRECTION.RIGHT):0===r&&1===p&&0!==(e&DIRECTION.RIGHT)&&0!==(n&DIRECTION.LEFT)};export const findConnectedPath=t=>{const o=new Set,e=[];for(const n of t)for(const t of n)t.type===PipeType.SOURCE&&(e.push(t),o.add(t.id));for(let n=0;n<e.length;n++){const r=e[n],p=getNeighbors(t,r.row,r.col);for(const t of p)o.has(t.id)||t.type!==PipeType.EMPTY&&areConnected(r,t)&&(o.add(t.id),e.push(t))}return o};export const isPuzzleCompleteFromSet=(t,o)=>{for(const e of t)for(const t of e)if(t.type===PipeType.SINK&&o.has(t.id))return!0;return!1};export const isPuzzleComplete=t=>{const o=findConnectedPath(t);return isPuzzleCompleteFromSet(t,o)};const getNeighbors=(t,o,e)=>{const n=[];return o>0&&n.push(t[o-1][e]),o<t.length-1&&n.push(t[o+1][e]),e>0&&n.push(t[o][e-1]),e<(t[0]?.length??0)-1&&n.push(t[o][e+1]),n},minEndRowGap=t=>Math.max(2,Math.floor(t/2));export const generatePuzzle=t=>{const o=t,e=t,n=[];for(let t=0;t<o;t++){const o=[];for(let n=0;n<e;n++)o.push({id:t+"-"+n,row:t,col:n,type:PipeType.EMPTY,rotation:0,filled:!1,fixed:!1});n.push(o)}const r=Math.floor(Math.random()*o);let p=Math.floor(Math.random()*o);const i=minEndRowGap(o);Math.abs(p-r)<i&&(p=r<o/2?Math.min(o-1,r+i):Math.max(0,r-i)),n[r][0]={...n[r][0],type:PipeType.SOURCE,fixed:!0},n[p][e-1]={...n[p][e-1],type:PipeType.SINK,fixed:!0};const s=buildRandomPath(r,0,p,e-1,o,e);return placePipesAlongPath(n,s),fillEmptyCells(n,o,e),scrambleRotations(n),n};const buildRandomPath=(t,o,e,n,r,p)=>{const i=new Set,s=[],T=(t,o)=>{if(t===e&&o===n)return s.push({row:t,col:o}),!0;i.add(t+"-"+o),s.push({row:t,col:o});const a=shuffleArray([{dr:-1,dc:0},{dr:1,dc:0},{dr:0,dc:-1},{dr:0,dc:1}]);for(const e of a){const n=t+e.dr,s=o+e.dc;if(n>=0&&n<r&&s>=0&&s<p&&!i.has(n+"-"+s)&&T(n,s))return!0}return s.pop(),!1};return T(t,o),s},placePipesAlongPath=(t,o)=>{for(let e=0;e<o.length;e++){const n=o[e],r=t[n.row][n.col];if(r.type===PipeType.SOURCE||r.type===PipeType.SINK)continue;let p=0;if(e>0){const t=o[e-1],r=t.row-n.row,i=t.col-n.col;-1===r&&(p|=DIRECTION.TOP),1===r&&(p|=DIRECTION.BOTTOM),-1===i&&(p|=DIRECTION.LEFT),1===i&&(p|=DIRECTION.RIGHT)}if(e<o.length-1){const t=o[e+1],r=t.row-n.row,i=t.col-n.col;-1===r&&(p|=DIRECTION.TOP),1===r&&(p|=DIRECTION.BOTTOM),-1===i&&(p|=DIRECTION.LEFT),1===i&&(p|=DIRECTION.RIGHT)}const i=findPipeForOpenings(p);r.type=i.type,r.rotation=i.rotation}},findPipeForOpenings=t=>{const o=[PipeType.STRAIGHT,PipeType.CORNER,PipeType.T_SHAPE,PipeType.CROSS];for(const e of o){const o=PIPE_OPENINGS[e];for(let n=0;n<4;n++)if(o[n]===t)return{type:e,rotation:n}}return{type:PipeType.STRAIGHT,rotation:0}},fillEmptyCells=(t,o,e)=>{const n=[PipeType.STRAIGHT,PipeType.CORNER,PipeType.T_SHAPE],r=[.45,.45,.1];for(let p=0;p<o;p++)for(let o=0;o<e;o++){const e=t[p][o];if(e.type!==PipeType.EMPTY)continue;const i=Math.random();let s=0,T=PipeType.STRAIGHT;for(let t=0;t<n.length;t++)if(s+=r[t],i<s){T=n[t];break}e.type=T,e.rotation=Math.floor(4*Math.random())}},scrambleRotations=t=>{for(const o of t)for(const t of o){if(t.fixed||t.type===PipeType.EMPTY)continue;if(t.type===PipeType.CROSS)continue;const o=t.rotation;let e=o;for(;e===o;)e=Math.floor(4*Math.random());t.rotation=e}};export const rotatePipe=t=>t.fixed||t.type===PipeType.EMPTY?t:{...t,rotation:(t.rotation+1)%4};const shuffleArray=t=>{const o=[...t];for(let t=o.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[o[t],o[e]]=[o[e],o[t]]}return o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat,shapeGeometry,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0x565756}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS,FLOW_STEP,PipeType,TURN_TIME,WIN_STEP}from"./PipeConnectConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("pipe-connect/PipeConnectScene:"+e,o),meshes.set(e,t)),t},STAND_UP=quat.x(Math.PI/2),BOARD_DEPTH=10,BACKDROP_DEPTH=25,TILE_HEIGHT=3,R=.15,FLANGE=[.52,.56,.62,1];export const pieceRotation=e=>quat.z(-e*Math.PI/2);const UP=[0,1],RIGHT=[1,0],DOWN=[0,-1],LEFT=[-1,0],flange=([e,o])=>({geometry:tube([[.4*e,.4*o,R],[.5*e,.5*o,R]],{radius:.195,sides:16,smoothness:1}),color:FLANGE}),arm=([e,o])=>({geometry:tube([[0,0,R],[.5*e,.5*o,R]],{radius:R,sides:16,smoothness:2})}),hub=()=>({geometry:shapeGeometry("sphere"),position:[0,0,R],scale:.345}),PIECES={[PipeType.STRAIGHT]:()=>[{geometry:tube([[0,.5,R],[0,-.5,R]],{radius:R,sides:16,smoothness:2})},flange(UP),flange(DOWN)],[PipeType.CORNER]:()=>[{geometry:tube(Array.from({length:9},(e,o)=>{const t=Math.PI+o/8*(Math.PI/2);return[.5+.5*Math.cos(t),.5+.5*Math.sin(t),R]}),{radius:R,sides:16,smoothness:3})},flange(UP),flange(RIGHT)],[PipeType.T_SHAPE]:()=>[arm(UP),arm(DOWN),arm(RIGHT),hub(),flange(UP),flange(DOWN),flange(RIGHT)],[PipeType.CROSS]:()=>[arm(UP),arm(DOWN),arm(LEFT),arm(RIGHT),hub(),flange(UP),flange(DOWN),flange(LEFT),flange(RIGHT)]},pieceMesh=e=>cached("pc-"+e,()=>e===PipeType.SOURCE||e===PipeType.SINK?endMesh(e===PipeType.SOURCE):_0x565756(merge(PIECES[e]()),{center:!1,shine:.75}));function endMesh(e){const o=[UP,RIGHT,DOWN,LEFT].flatMap(e=>[{...arm(e),color:[.82,.85,.9,1]},flange(e)]),t=e?{geometry:lathe([[.001,.5],[.24,.49],[.3,.44],[.32,.06],[.3,0]],{segments:28}),rotation:STAND_UP}:{geometry:lathe([[.001,.14],[.12,.15],[.18,.36],[.36,.42],[.34,.3],[.26,0]],{segments:28}),rotation:STAND_UP},s=e?[{geometry:tube(Array.from({length:17},(e,o)=>[.17*Math.cos(o/16*Math.PI*2),.17*Math.sin(o/16*Math.PI*2),.56]),{radius:.03,sides:8,smoothness:2}),color:[.85,.15,.12,1]},{geometry:shapeGeometry("cube"),position:[0,0,.53],scale:[.04,.04,.07],color:[.6,.6,.6,1]}]:[{geometry:shapeGeometry("sphere"),position:[0,0,.15],scale:[.2,.2,.02],color:[.1,.06,.05,1]}];return _0x565756(merge([...o,t,...s]),{center:!1,shine:.6})}const panelMesh=(e,o)=>cached("pc-panel:"+e+":"+o,()=>_0x565756(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:10}),{shine:.2})),panelColor=e=>toColor("classic"===e.mode?COLORS.CLASSIC_BOARD:e.BOARD.SURFACE),tileColor=e=>toColor("classic"===e.mode?COLORS.CLASSIC_CELL:e.BOARD.CELL_EMPTY),DRY=toColor(COLORS.PIPE),WET=toColor(COLORS.WATER);export const pieceColor=(e,o)=>e.type===PipeType.SOURCE?toColor(COLORS.SOURCE):e.type===PipeType.SINK?toColor(COLORS.SINK):o?WET:DRY;export function buildScene(e,o,t,s,a){const n=spawnBackdrop(e,o.width,o.height,-25,t);placeTiltedBackdrop(e,n,o,25);const r=e.spawn({mesh:panelMesh(o.board,"classic"===t.mode?16:8),position:[0,0,-5],color:panelColor(t),pickable:!1}),l=[],i=[],p=tileColor(t);for(const t of s)for(const s of t){const[t,n]=cellCentre(o,s.row,s.col);l.push(e.spawn({mesh:"roundedBox",position:[t,n,1.5],scale:[o.cell-2,o.cell-2,3],color:p,pickable:!1})),i.push(s.type===PipeType.EMPTY?null:e.spawn({mesh:pieceMesh(s.type),position:[t,n,3],rotation:pieceRotation(s.rotation),scale:o.cell,color:pieceColor(s,a.has(s.id)),pickable:!1}))}return{backdrop:n,panel:r,tiles:l,pieces:i}}export function removeScene(e,o){for(const t of[o.backdrop,o.panel,...o.tiles,...o.pieces])null!=t&&e.despawn(t)}export function setSceneTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s),e.set(t.panel,{mesh:panelMesh(o.board,"classic"===s.mode?16:8),color:panelColor(s)});const a=tileColor(s);for(const o of t.tiles)e.set(o,{color:a})}export function turnPiece(e,o,t){e.animate(o,{rotation:pieceRotation(t)},{duration:TURN_TIME,easing:"back"})}export function flow(e,o,t,s,a,n,r){if(!a)return void e.animate(t,{color:pieceColor(s,!1)},{duration:.15});const l=Math.max(0,n-r)*FLOW_STEP;e.animate(t,{color:pieceColor(s,!0)},{duration:.12,delay:l}),e.animate(t,[{scale:1.07*o.cell,at:.4},{scale:o.cell}],{duration:.22,delay:l})}export function winPulse(e,o,t,s){e.animate(t,[{scale:1.12*o.cell,at:.4},{scale:o.cell}],{duration:.25,delay:s*WIN_STEP})}export function splash(e,o,t,s){const[a,n]=cellCentre(o,t,s);effects.splash(e,{position:[a,n,.4*o.cell],count:24,size:.09*o.cell,speed:4*o.cell,direction:[0,0,1],spread:1.1,lifetime:.7,gravity:9*-o.cell,colors:[toColor("#4FC3F7"),toColor("#81D4FA"),[1,1,1,1]]})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{memo,useCallback,useEffect,useRef,useState}from"react";import{audio}from"@nayan-ui/engine";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS,playSoundVoice}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,textColumn}from"../shared/EngineHud.js";import{GameLoading}from"../shared/GameLoading.js";import{GameLoadingTransition}from"../shared/GameLoadingTransition.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{PLAY_WITH_TUA_ACTIONS,PLAY_WITH_TUA_LIGHT}from"./PlayWithTuaConstants.js";import{createGame,cycleMove,dispose,drag,reset,resize,selectMove,setAudible,setTheme,start,tick}from"./PlayWithTuaGame.js";import{getCachedCharacter,loadCharacter}from"./PlayWithTuaModel.js";import{jsx as _0x28ebd1}from"react/jsx-runtime";const SFX=GAME_SOUNDS.PLAY_WITH_TUA,Run=memo(function(e){const[t,s]=useLiveState(0,0),[a,r]=useLiveState("standing",0),o=useRef(e.settings);o.current=e.settings;const{game:i,screen:n}=useEngineGame(e,{gameId:GAME_IDS.PLAY_WITH_TUA,create:t=>createGame(e.model,t),start:start,reset:reset,dispose:dispose,tick:tick,resize:resize,drag:drag,setTheme:setTheme,sounds:SFX,reportData:e=>({action:e.move,moves:e.score}),wire:(e,t)=>{const a=[];return e.onSilence=()=>{for(const e of a)audio.stop(e);a.length=0},e.onSound=t=>{const s=o.current,r=playSoundVoice(SFX[t.sound],e.audible&&s.enableSounds&&!s.isVisible);null!=r&&(a.push(r),a.length>12&&audio.stop(a.shift()))},e.onScore=s,e.onMove=s=>{r(s),"playing"===e.phase&&t("standing"===s?SFX.STANDING:null,HapticType.LIGHT)},()=>e.onSilence()},onStart:e=>e(SFX.START,HapticType.LIGHT)}),m=useCallback(e=>setAudible(i,e),[i]);return _0x28ebd1(EngineGameScreen,{...n,light:PLAY_WITH_TUA_LIGHT,quality:"auto",onAudioChange:m,gameOver:null,onTap:()=>{"ready"===i.phase&&n.onStart(),cycleMove(i)},columns:[scoreColumn(t,"MOVES"),textColumn("ACTION",PLAY_WITH_TUA_ACTIONS.find(e=>e.id===a).label)],subtext:"Tap for next action \xb7 Drag to rotate",choices:PLAY_WITH_TUA_ACTIONS.map(t=>({id:t.id,label:t.label,selected:t.id===a,onPress:()=>{return s=t.id,void(e.settings.isVisible||("ready"===i.phase&&n.onStart(),selectMove(i,s)));var s}}))})});export const PlayWithTua=engineGame(GAME_IDS.PLAY_WITH_TUA,e=>{const[t,s]=useState(getCachedCharacter),[a,r]=useState(null);return useEffect(()=>{if(t)return;let e=!0;return loadCharacter().then(t=>{e&&s(t)}).catch(t=>{e&&r(t instanceof Error?t.message:String(t))}),()=>{e=!1}},[t]),_0x28ebd1(GameLoadingTransition,{ready:!!t,loader:_0x28ebd1(GameLoading,{gameId:GAME_IDS.PLAY_WITH_TUA,theme:e.settings.theme,offset:e.settings.offset,error:!!a,message:a??void 0}),children:t&&_0x28ebd1(Run,{...e,model:t})})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const PLAY_WITH_TUA_ANIMATIONS={standing:{duration:9.6,loop:!0},walking:{duration:3.75,loop:!0},running:{duration:3,loop:!0},jumping:{duration:2.5,loop:!1},waving:{duration:2.7,loop:!1},winking:{duration:1.65,loop:!1},dancing:{duration:5.25,loop:!0},laughing:{duration:3.6,loop:!0},fighting:{duration:7.8,loop:!1},falling:{duration:4.25,loop:!1}};export const PLAY_WITH_TUA_SOUND_CUES={standing:[],walking:[.63,1.13,1.63,2.13,2.63,3.12].map(n=>({at:n,sound:"WALKING"})),running:[.37,.67,.97,1.27,1.57,1.87,2.17,2.47,2.8].map(n=>({at:n,sound:"RUNNING"})),jumping:[{at:.42,sound:"JUMPING"},{at:1.45,sound:"LAND"}],waving:[{at:.25,sound:"WAVING"}],winking:[{at:.5,sound:"WINKING"}],dancing:[{at:0,sound:"DANCING",once:!0}],laughing:[{at:.65,sound:"LAUGHING"},{at:1.9,sound:"LAUGHING"}],fighting:[...[.73,1.43,2.75,3.03,3.78].map(n=>({at:n,sound:"FIGHTING"})),{at:5.1,sound:"JUMPING"},{at:5.72,sound:"FIGHTING"},{at:6.35,sound:"LAND"}],falling:[{at:.25,sound:"STUMBLE"},{at:.8,sound:"FALLING"}]};export const PLAY_WITH_TUA_HEIGHT=3.2;export const PLAY_WITH_TUA_MODEL_SCALE=1.21;export const PLAY_WITH_TUA_CAMERA_HEIGHT=2.057;export const PLAY_WITH_TUA_WORLD_CAPACITY=16;export const PLAY_WITH_TUA_ACTIONS=[{id:"standing",label:"Standing"},{id:"waving",label:"Waving"},{id:"winking",label:"Winking"},{id:"walking",label:"Walking"},{id:"running",label:"Running"},{id:"jumping",label:"Jumping"},{id:"dancing",label:"Dancing"},{id:"laughing",label:"Laughing"},{id:"fighting",label:"Fighting"},{id:"falling",label:"Falling"}];export const PLAY_WITH_TUA_LIGHT={direction:[-.5,1,1],ambient:.72,shadows:!0,shadowExtent:5};export const PLAY_WITH_TUA_CONTROLS_HEIGHT=156;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{quat,World}from"@nayan-ui/engine";import{PLAY_WITH_TUA_ACTIONS,PLAY_WITH_TUA_ANIMATIONS,PLAY_WITH_TUA_SOUND_CUES,PLAY_WITH_TUA_WORLD_CAPACITY}from"./PlayWithTuaConstants.js";import{playAnimation}from"./PlayWithTuaModel.js";import{buildScene,layoutScene,setSceneTheme}from"./PlayWithTuaScene.js";export function createGame(e,o){const n=new World(PLAY_WITH_TUA_WORLD_CAPACITY);try{return{world:n,...buildScene(n,e,o),phase:"ready",score:0,move:"standing",angle:0,dragStart:0,dragging:!1,inputTop:0,inputBottom:1/0,audible:!1,moveTime:0,soundTime:0,onSound:()=>{},onSilence:()=>{},onPhase:()=>{},onScore:()=>{},onMove:()=>{}}}catch(e){throw n.dispose(),e}}export function reset(e){e.world.isDisposed||(e.onSilence(),e.moveTime=e.soundTime=0,e.phase="ready",e.score=0,e.move="standing",e.angle=0,e.dragStart=0,e.dragging=!1,e.world.set(e.character,{rotation:quat.identity}),playAnimation(e.world,e.character,"standing",{speed:0,time:0,fade:0}),e.onMove(e.move),e.onScore(e.score),e.onPhase(e.phase))}export function start(e){e.world.isDisposed||"playing"===e.phase||(e.phase="playing",e.moveTime=e.soundTime=0,playAnimation(e.world,e.character,"standing",{time:0,fade:.15}),e.onPhase(e.phase))}export function selectMove(e,o){e.world.isDisposed||"playing"!==e.phase||playAnimation(e.world,e.character,o,{loop:!0,time:0,fade:.18})&&(e.onSilence(),e.moveTime=0,e.soundTime=-1e-6,e.move=o,"standing"!==o&&e.onScore(++e.score),e.onMove(o))}export function cycleMove(e){const o=PLAY_WITH_TUA_ACTIONS.findIndex(o=>o.id===e.move);selectMove(e,PLAY_WITH_TUA_ACTIONS[(o+1)%PLAY_WITH_TUA_ACTIONS.length].id)}const TURN=[0,0,0,1];export function drag(e,o){"start"===o.phase&&(e.dragging=o.y>=e.inputTop&&o.y<=e.inputBottom,e.dragging&&(e.dragStart=e.angle)),e.dragging&&(e.angle=o.cancelled?e.dragStart:e.dragStart+.01*o.dx,e.world.set(e.character,{rotation:quat.y(e.angle,TURN)}),"end"===o.phase&&(e.dragging=!1))}export function resize(e,o,n,t){const i=layoutScene(e,o,n,t);e.inputTop=i.top,e.inputBottom=i.bottom}export function setTheme(e,o){setSceneTheme(e.world,e,o)}export function tick(e,o){if(e.world.isDisposed)return;const n=Number.isFinite(o)?Math.max(0,Math.min(.05,o)):0;if(e.world.update(n),"playing"!==e.phase||n<=0)return;const t=e.soundTime;if(e.moveTime+=n,e.soundTime=e.moveTime,!e.audible)return;const i=PLAY_WITH_TUA_ANIMATIONS[e.move].duration;let a,r=-1/0;for(const o of PLAY_WITH_TUA_SOUND_CUES[e.move]){const n=o.once?0:Math.floor((e.moveTime-o.at)/i),s=n*i+o.at;n>=0&&s>t&&s<=e.moveTime&&e.moveTime-s<.12&&s>r&&(a=o,r=s)}a&&e.onSound(a)}export function setAudible(e,o){e.world.isDisposed||e.audible===o||(e.audible=o,o?"playing"===e.phase&&"dancing"===e.move&&(e.onSound({at:e.moveTime,sound:"DANCING",once:!0}),e.soundTime=e.moveTime):e.onSilence())}export function dispose(e){e.world.isDisposed||(e.onSilence(),e.audible=!1,e.world.dispose())}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{loadModel}from"@nayan-ui/engine";import{PLAY_WITH_TUA_ANIMATIONS,PLAY_WITH_TUA_MODEL_SCALE}from"./PlayWithTuaConstants.js";let modelLoading,cachedCharacter=null;export const getCachedCharacter=()=>cachedCharacter;export function loadCharacter(){return modelLoading??=(async()=>{const a=await loadModel(require("../../assets/models/play-with-tua/play-with-tua.glb"),{center:!1,shine:.08});if(20!==a.jointCount||Object.keys(PLAY_WITH_TUA_ANIMATIONS).some(t=>!a.animations.some(a=>a.name===t)))throw Error("Play With Tua is missing its skeletal rig or animation clips");return cachedCharacter=a,a})().catch(a=>{throw modelLoading=void 0,a}),modelLoading}export function spawnCharacter(a,t){const e=a.spawn({mesh:t,scale:[PLAY_WITH_TUA_MODEL_SCALE,PLAY_WITH_TUA_MODEL_SCALE,PLAY_WITH_TUA_MODEL_SCALE],pickable:!1});return playAnimation(a,e,"standing",{speed:0,time:0,fade:0}),e}export function playAnimation(a,t,e,o={}){return a.playClip(t,e,{loop:PLAY_WITH_TUA_ANIMATIONS[e].loop,...o})}export function*warmAssets(){yield loadCharacter}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{PLAY_WITH_TUA_CAMERA_HEIGHT,PLAY_WITH_TUA_CONTROLS_HEIGHT}from"./PlayWithTuaConstants.js";import{spawnCharacter}from"./PlayWithTuaModel.js";export function buildScene(t,e,o){return{character:spawnCharacter(t,e),floor:t.spawn({mesh:"cube",position:[0,-.055,0],scale:[200,.1,200],color:toRgb(o.BACKGROUND),pickable:!1}),camera:{eye:[0,PLAY_WITH_TUA_CAMERA_HEIGHT+.12,9],target:[0,PLAY_WITH_TUA_CAMERA_HEIGHT,0],fov:.7}}}export function layoutScene(t,e,o,a){const r=getScoreBoardTop(a)+88,T=o-PLAY_WITH_TUA_CONTROLS_HEIGHT,_=Math.max(80,T-r),n=Math.max(2.12*o/_,1.9*o/Math.max(1,e)),A=PLAY_WITH_TUA_CAMERA_HEIGHT+2*((r+T)/2/Math.max(1,o)-.5)*n;return t.camera.target=[0,A,0],t.camera.eye=[0,A+.12,n/Math.tan(t.camera.fov/2)],{top:r,bottom:T}}export function setSceneTheme(t,e,o){t.set(e.floor,{color:toRgb(o.BACKGROUND)})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x436ad1=_0x3ad4;!function(){const e=_0x3ad4,t=_0x51b4();for(;;)try{if(498217==parseInt(e(347,"G]Mp"))/1*(parseInt(e(460,"Ya(3"))/2)+parseInt(e(351,"wxRi"))/3*(-parseInt(e(371,"4tMN"))/4)+-parseInt(e(475,"RQ[F"))/5*(parseInt(e(346,"NTyN"))/6)+-parseInt(e(374,"iBvu"))/7+parseInt(e(416,"YzuZ"))/8+parseInt(e(378,"jG[#"))/9*(-parseInt(e(456,"&ee6"))/10)+parseInt(e(463,"i^[K"))/11)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x31643c,{useEffect,useRef,useCallback,useMemo}from"react";import{StyleSheet,View}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{usePopitFidgetStore}from"./PopitFidgetStore.js";function _0x3ad4(e,t){e-=336;const o=_0x51b4();let W=o[e];if(void 0===_0x3ad4.wqQTJT){const e=function(e,t){let o,W,d=[],r=0,n="";for(e=function(e){let t="",o="";for(let o,W,d=0,r=0;W=e.charAt(r++);~W&&(o=d%4?64*o+W:W,d++%4)?t+=String.fromCharCode(255&o>>(-2*d&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=t.length;e<W;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),W=0;W<256;W++)d[W]=W;for(W=0;W<256;W++)r=(r+d[W]+t.charCodeAt(W%t.length))%256,o=d[W],d[W]=d[r],d[r]=o;W=0,r=0;for(let t=0;t<e.length;t++)W=(W+1)%256,r=(r+d[W])%256,o=d[W],d[W]=d[r],d[r]=o,n+=String.fromCharCode(e.charCodeAt(t)^d[(d[W]+d[r])%256]);return n};_0x3ad4.eemyzn=e,_0x3ad4.Gktlzs={},_0x3ad4.wqQTJT=!0}const d=o[0];_0x3ad4.KEktSf!==d&&(_0x3ad4.Gktlzs={},_0x3ad4.KEktSf=d);const r=_0x3ad4.Gktlzs[e];return void 0===r?(void 0===_0x3ad4.BRdisM&&(_0x3ad4.BRdisM=!0),W=_0x3ad4.eemyzn(W,t),_0x3ad4.Gktlzs[e]=W):W=r,W}import{PopitFidgetService}from"./PopitFidgetService.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{POPIT_FIDGET_GAME_CONFIG}from"./PopitFidgetConstants.js";import _0x4e6a7f from"./components/FidgetGrid.js";import _0x9d25e7 from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x251457}from"../../helpers/index.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x2891a0,jsxs as _0x5423ea}from"react/jsx-runtime";const{width:width}=getGameDimensions(),BUBBLE_SIZE=POPIT_FIDGET_GAME_CONFIG[_0x436ad1(445,"jTuq")],PopitFidget=({settings:e,onSettingsChange:t,onEndGame:o,onReplayGame:W,onShare:d,onShareScreenshot:r,onShowLeaderboard:n,bannerAd:a})=>{const i="nK*q",s=_0x436ad1,u={HfLoZ:function(e,t){return e(t)},MJGoM:s(344,"!i0u"),rGCdZ:function(e,t){return e===t},WWFee:s(352,"G]Mp"),DStIX:function(e,t){return e!==t},HXRvW:s(458,"i^[K"),lHHBK:function(e){return e()},hlRdq:function(e,t){return e===t},mmVMw:function(e,t,o){return e(t,o)},ykMCg:function(e,t){return e(t)},XBbJj:function(e,t,o){return e(t,o)},sOSeG:function(e){return e()},QevSq:function(e,t,o){return e(t,o)},nZzJc:function(e){return e()},KyabC:function(e,t,o){return e(t,o)},Nkbwt:function(e,t){return e(t)},yQhcM:function(e,t){return e(t)},WOlzh:function(e,t,o){return e(t,o)},JpPiZ:function(e,t,o){return e(t,o)},eHNSi:function(e,t,o){return e(t,o)},mHjuq:function(e,t,o){return e(t,o)}},S=usePopitFidgetStore(e=>null!==e[s(341,"!i*O")]),x=u[s(443,"Ya(3")](usePopitFidgetStore,e=>e.isPlaying),f=usePopitFidgetStore(e=>e[s(357,"jG[#")]),m=u[s(449,"RQ[F")](usePopitFidgetStore,e=>e[s(451,"Zg%o")]),p=u[s(450,"wxRi")](useRef,!1),_=useRef(o);_[s(464,"iBvu")]=o;const k=useRef(e);k[s(465,"nK*q")]=e;const l=e?.[s(473,"$aCw")]??!0,G=e?.[s(468,i)]??!0,C=useCallback(e=>{const t=s;if(_.current&&!p[t(359,"PrA$")]){const o=usePopitFidgetStore[t(433,"sDvo")]();_.current({status:e,score:o[t(438,"p)ZK")][t(480,"vUpU")]()}),p.current=!0}},[]),P=usePopitFidgetStore(e=>e[s(448,"YzuZ")]),R=usePopitFidgetStore(e=>e.resetGame),O=u[s(435,"uM#W")](usePopitFidgetStore,e=>e[s(462,"J9KR")]),h=u.Nkbwt(usePopitFidgetStore,e=>e[s(420,"@TLl")]),M=u.Nkbwt(usePopitFidgetStore,e=>e[s(403,"K^kv")]),g=useRef(null);useEffect(()=>{const e=s,t={MQJom:function(e,t){return u.HfLoZ(e,t)}};if(u[e(436,"J9KR")]!==e(384,"K^kv")){const o=_0x4b24df[e(474,"NTyN")][e(400,"m!Wt")]();t[e(459,"wxRi")](_0x5c5d81,o)}else if(!g[e(366,"!UrF")]&&(g[e(397,"[)vn")]=new PopitFidgetService),g[e(373,"4tMN")]&&!S){const t=g.current[e(430,"G]Mp")]();O(t)}},[S,O]),useEffect(()=>{const e="uM#W";return()=>{const t=_0x3ad4,o={bGedj:function(e,t,o){return e(t,o)}};if(u.rGCdZ(t(338,"ePtg"),u[t(364,"tv@M")])){usePopitFidgetStore[t(363,")A8W")]()[t(457,"RQ[F")]&&!p[t(482,"p)ZK")]&&(u[t(479,"[)vn")](t(399,"PrA$"),u[t(422,"3lQ3")])?_0x23b1d2[t(394,")A8W")]=new _0x3aa930:C("cancel"));try{g[t(467,"Ya(3")]?.[t(461,"x3c[")]()}catch{}try{u[t(386,"MB@k")](R)}catch{}try{g[t(381,"ePtg")]?.[t(424,"&ee6")]()}catch{}}else{const W=_0x573727[t(407,"wxRi")]();if(!W[t(369,e)])return;const d=W[t(432,"NTyN")][t(392,"uM#W")][_0xb4a1e9]?.[_0x1d75e5];if(!d||W[t(481,"h8Cf")][d.id]?.isPopped)return;o.bGedj(_0x29ac2b,_0x470cd0[t(406,"Z4vC")][t(353,e)],_0x114b87.current?.[t(389,"Z4vC")]??!0),o[t(412,"^8&E")](_0x4f18a1,_0x35b7d1,_0x5df214),_0x1f048f(_0x2c2f60.LIGHT,_0x515d79[t(442,"Zg%o")]?.[t(418,"y]lk")]??!0)}}},[]);const N=useCallback(()=>{const e=s;!g[e(370,"nE$]")]&&(g[e(342,"&ee6")]=new PopitFidgetService);const t=g[e(442,"Zg%o")].generateFidgetGrid();O(t)},[O]);useEffect(()=>{const e=s;u[e(393,"i^[K")](e(439,"jG[#"),e(428,"Ya(3"))?(f&&!x&&!p[e(342,"&ee6")]&&(m?(u.mmVMw(playSound,GAME_SOUNDS.WELL_DONE,l),C(e(340,"^8&E"))):(playSound(GAME_SOUNDS[e(406,"Z4vC")][e(372,"hf6v")],l),u.HfLoZ(C,"lose"))),!f&&(p[e(409,"CKJA")]=!1)):(_0x1db3fc?.(),_0x34fba6[e(387,"G]Mp")]?.[e(350,")A8W")](),_0x3581f2(),u[e(454,"hf6v")](_0x170ecb))},[f,m,x,l,C]),useEffect(()=>{let e=null;return x&&(e=setGameInterval(()=>{var e;e=M,u[_0x3ad4(478,"@TLl")](e)},1e3)),()=>{const t=_0x3ad4,o={};o[t(375,"!i0u")]=t(425,"jTuq");const W=o;if(u[t(477,"J9KR")](t(417,"!i0u"),t(362,"^8&E")))e&&u[t(423,"X8rX")](clearGameInterval,e);else{const e=W[t(466,"YzuZ")].split("|");let o=0;for(;;){switch(e[o++]){case"0":_0x4f0f4(_0x117f2f[t(343,"4tMN")].START,_0x5a14d1[t(373,"4tMN")]?.enableSounds??!0);continue;case"1":_0x424661.current=!1;continue;case"2":_0x322f5f();continue;case"3":_0x4b142e();continue;case"4":_0xd32d1a(_0x2b3b3c[t(441,"ePtg")],_0x34b55b.current?.[t(431,"i^[K")]??!0);continue}break}}}},[x,M]);const b=u[s(429,"[)vn")](useCallback,()=>{const e=s;p.current=!1,N(),u.XBbJj(playSound,GAME_SOUNDS[e(455,"y]lk")].START,k[e(426,"MB@k")]?.[e(388,"RQ[F")]??!0),u[e(405,"RQ[F")](P),u[e(376,"sDvo")](playHaptic,HapticType[e(413,")rj(")],k[e(426,"MB@k")]?.enableHaptics??!0)},[N,P]),v=u[s(446,"iJ@(")](useCallback,()=>{const e=s;C(e(471,"uW5b")),g.current?.[e(354,"h8Cf")](),u[e(395,")rj(")](R),u.nZzJc(N)},[C,R,N]),F=useCallback(()=>{const e=s;"SaWYu"!==e(419,"p)ZK")?(W?.(),g.current?.[e(444,"Ya(3")](),R(),N()):_0x43a04b[e(465,"nK*q")]=!1},[R,N,W]),y=useCallback((e,t)=>{const o=s,W=usePopitFidgetStore[o(472,"h@LM")]();if(!W[o(356,"nE$]")])return;const d=W[o(368,"^8&E")][o(476,"MB@k")][e]?.[t];d&&!W[o(440,"nK*q")][d.id]?.isPopped&&(u.KyabC(playSound,GAME_SOUNDS[o(410,"iBvu")].POP,k.current?.[o(336,"h@LM")]??!0),h(e,t),playHaptic(HapticType[o(401,"NTyN")],k[o(442,"Zg%o")]?.[o(377,"x3c[")]??!0))},[h]),J=e?.[s(452,"iJ@(")]??0,I=u[s(404,"hf6v")](useMemo,()=>({isPlaying:x,gameOver:f,onStartGame:b,onStopGame:v,onShare:d,onShowLeaderboard:n,startButtonSubtext:s(385,"yzw9")}),[x,f,b,v,d,n]),K=useMemo(()=>({isVisible:f,score:f?usePopitFidgetStore[s(407,"wxRi")]().score:0,onPlayAgain:F,buttonText:s(349,"i^[K"),title:m?s(380,"y[#Z"):s(391,"X8rX"),message:m?s(470,"h8Cf"):s(390,"G]Mp")}),[f,F,m]),Q=useMemo(()=>({gameId:GAME_IDS[s(453,"J9KR")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),E={};E[s(437,"iJ@(")]=J;const T=u[s(402,"m!Wt")](useMemo,()=>[styles.gameArea,E],[J]),q={};q[s(382,i)]=J;const B={...I},H={...K};H[s(360,"!i0u")]=r,H.bannerAd=a;const j={...Q};return _0x2891a0(GestureHandlerRootView,{style:styles[s(398,")rj(")],children:_0x5423ea(_0x251457,{children:[_0x2891a0(_0x9d25e7,q),u[s(337,"PrA$")](_0x2891a0,View,{style:T,children:S&&_0x2891a0(_0x4e6a7f,{grid:usePopitFidgetStore[s(363,")A8W")]()[s(368,"^8&E")],bubbleSize:BUBBLE_SIZE,onBubblePop:y,hapticEnabled:G})}),_0x2891a0(GameControlButton,B),_0x2891a0(GameOverModal,H),_0x2891a0(GameSettingsModal,j)]})})},_0x200e29={};function _0x51b4(){const e=["W7BcKCkrW5ZdISoigq","A1BcRSo0WOZdTW3dUWS","vmkdygDWWQJdTmkq","CXaIWR9pmMS","W4yzFHpcMmor","WO8kBJ5MWO8eW63dLHtdKW","kWtdRvPn","dIBcIxxcNCkvWQddUCoOWORcTCoZxGm9lSoXW4/dTezs","WRtdHJxdO8kF","j8kpWQvXW73dVSkk","jxbVqHDSnZL0dComWOC","W4eMa3b5WQVcI09QW45tWQC","hCkvWQiJW6RdSCkqoJRdNLNcPJC5WOtdICoRWQ3cNCoe","W5CoWPFcGmkymCopW58","WQNcPSkKWQHQxSoO","ASofWRRcHgy","WPCoW7WugXv6","ExxcLmo2WQu","xSo1WPpdHmkYW45w","W55ol30ZWQya","AvxcQCoNWOpdJqBdSH8","WP7cLmoUWRVdHW","WPKjqc3dTdVcImk8WOiEW57dRgxdKh9DW79W","W6ThrmosCq","WPSKybVdRW","jdldHMLXWR/dSCkoFtBcQSoYsG","y8oOW7tdSSkI","m1fDrtW","W7qhmLTbWPhcNMLBW6DYWOa","WPxdJaaSFSkgq34","W5ihWR/dIHNdSq","W4m0W7rqWRhcGCkX","kmoMWORdHh3cOSoPW7JdGSoFxde","zmofWO3cMa","C1pcJCoWWPy","r3/cG8oAWRFdQq","ah8pk8oDW7egAMX/WRpcM1Oh","icFdNCkSW43cJKe9xxXDW6NdNW","W5VdVxOyWPGAomoTW75RW4C9","W58CWO/dMdq","W6pdP8kjW5iVW7DNitaSW7RdPM0","W6yeW45WzG","ibG/EmkjW4XVEba","CNhcHSoGWPNdHa","jMSrWPeS","W7OSWPFcHSoF","WRFcLvvgeGbl","w3zoi8keW6TmvtC","WRVdUW/dK8kXe28","W4OHW4HptquJtJpcKG","W5tcTKJcPfO","W5bwc0iH","i8kFWRLMW6RdSCkkFXpdGKNdOt0RW6pdJ8oRWQq","z8ohWONcGNVcTeDhC3BdKaXP","W4fNz8o9qmkUWRpcHKuu","W6hdISo7WO3dKZ4rkG","WQ3cV8kJWRi","WRlcGSkUWQLl","zmoIDCofra","qhjJaIldJICorCkS","W5GUW45ArG","WOBcQmkQW7BdMa","W4SkEGlcKCoaWQZcIM/cHSo9mW","xsauWOr/eq","rCk3W6fOW5RdGs4","W5xcS2JcRMS","W67cOuVcSxBcUCoOCmkajSoPW5VdGa","kf8+hCo4W5iGEKPlWOi","z1XRhcm","rCkTW71UW57dHJq8WPS","WP/cVc9zW5TRkSouW6i","oxvdyXW","WRZdGHyiFG","qCkJW75/W6JdGdq","x3vHfs7dLa","ECoNySoJxtLjseZcGh/cPq","rCoqW6ZdMCkZ","W5BdHSk4W7KxW41PcqqFW5BdKq","W6ddIaCwtK0lFmkflCo6W4hdLq","kw1EtbPWdtHM","zCoeWQZcKM4","WR/dUd4qzW","WQ/dPbFdSahcN8o1tmknimoC","kCkjvNJdG8oxWPJcKG8AWONdKHy","wSonrSoSyajOzhZcGeJcMdy","m8kCW57dKIpdQdOwsMRdKaXzfW","g8oCWQJdV0ZcK8oB","W4OkAHlcMmolWOS","WQ/cSIvXW64","W77cOfBcS1tcTSoX","W4WrEqlcKCoaWRFcN37cHSoXiX0","W73cSY/cNmkAWP9fEIv0W6hdRCkTW7LF","m8k9omkKhCk8WOaEx2PsW4pdRCoBW7lcGSoCWPtdJG","W7tdJehcNxOv","WPlcQmo4FmolW6KmyG","ymoPWQjFWQpdS3PSWQ7dISoqFq","W4r7CCoOqmk0WOa","Dw9SEHDQhq","WRRdUX/dG8k4ggG","qCoeymooEa","pd8hEmk3","W7LOkuyo","W6VcVr/cG8kpWOreAa","emkKnSoMe8kSWReiuNTeWPa","W4G4W5nArIiJ","WPdcO8oTtCotW60RAmkBoSoqW4i","WPtcSCoaWRZdJW","CWOOWOfS","WRxdRWxdTSk9gw/dQG","zN3cHG","dCoTWPxdUCk7W5LOWPS7aq","WRFcJejvgrTp","tH7dObNdSCo0WQ5MnmkdW5RdMq","W5OMWPldQJq","Eq3dSLrTWRBdGa","WPy9nSkIfmoIW4dcOLqsDejT","FmodWRzjW7tdOCk3tW","W5bNz8oUtq","uSogWPJdGfBcTM5pBsm","WOCpW6eworPJjLxcPJxcOdO","W4dcNufooCk9CeNdLbfg","j8kvWQ9pW54","WPVcNmkw","aCkLo8o0omkOWO8zz2zmWOBdRW","W4mPd3DuWRZcVue","oeP2WOfYtmoDdYPc","WQJcQSkRW7BdVmoAkmoK","h8kraSkEo1m7zh3cKNxcPIm","WPRcJmoyWRVdM8kbWRe","W54BWONdGWZdPSoe","WQJcTSkOWR5Jsq","F33cVCoNWQu","WPmEW7O1cHP6jG","W5GNWOfMWRy","W7BdQmkmW5qQW7Xicc8QW7RdV3hcSKmyW5m","W6hdLSo+c0XtW6G","WPrWWRetW6BdL8o1WPqsW7dcGSkIiG","D33cJmoZWPNdGJizthO","WQ3cUSkIWQ1Jt8oCWQFcQ8kY","pvzGWPrYvSoU","l2FcHbJdGmodWQfAjG","BSozW6NdNSkNW7zdE1a","FstdGIldGmofWPW","tSkqW6RcUrVdImkBW5tdS8onvJjL","W7ipWRhdSsW","W5FdISo5WO3dLG","p8ktwgRdQmotWR3cLIShWO3dLbC"];return(_0x51b4=function(){return e})()}_0x200e29[_0x436ad1(411,"i^[K")]=1,_0x200e29[_0x436ad1(469,"vUpU")]=BACKGROUND_COLOR;const _0x5f2a8f={};_0x5f2a8f[_0x436ad1(434,"uM#W")]=1,_0x5f2a8f[_0x436ad1(414,"jTuq")]=_0x436ad1(421,"^8&E"),_0x5f2a8f[_0x436ad1(427,"p)ZK")]=_0x436ad1(361,"uM#W"),_0x5f2a8f[_0x436ad1(365,"y]lk")]=20,_0x5f2a8f[_0x436ad1(348,"NTyN")]=width,_0x5f2a8f[_0x436ad1(339,"MB@k")]=width,_0x5f2a8f[_0x436ad1(379,")rj(")]="center";const _0x211a2a={};_0x211a2a[_0x436ad1(447,"Zg%o")]=_0x200e29,_0x211a2a[_0x436ad1(355,"Z4vC")]=_0x5f2a8f;const styles=StyleSheet[_0x436ad1(408,"!i0u")](_0x211a2a);export{PopitFidget};
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT,TIME_WARNING}from"./PopitFidgetConstants.js";import{createGame,dispose,press,reset,setLayout,setTheme,start,tick}from"./PopitFidgetGame.js";import{jsx as _0x186206}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.POPIT_FIDGET;export const PopitFidget=engineGame(GAME_IDS.POPIT_FIDGET,e=>{const[t,s]=useLiveState(0),[r,o]=useLiveState(TIME_LIMIT),{theme:i,status:m,screen:a,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.POPIT_FIDGET,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,r)=>{const o=getLayout(t,s,r);return setLayout(e,o),o.sheet},drag:(e,t)=>{"start"===t.phase&&press(e,t.x,t.y)},sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>e("win"===t?GAME_SOUNDS.WELL_DONE:SOUNDS.GAME_OVER),wire:(e,t)=>{e.onScore=s,e.onTime=o,e.onPop=()=>t(SOUNDS.POP,HapticType.LIGHT)}}),p=useMemo(()=>toRgb(i.BACKGROUND),[i.BACKGROUND]);return _0x186206(EngineGameScreen,{...a,light:LIGHT,background:p,columns:[scoreColumn(t),timerColumn(r,i,TIME_WARNING)],subtext:"Pop bubbles to relax!",gameOver:n({title:"win"===m?"YOU WON!":"TIME UP!",message:"win"===m?"All bubbles popped!":"You ran out of time!",scoreLabel:"Final Score",score:t,buttonText:"Pop Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID_SIZE=6;export const TIME_LIMIT=120;export const POINTS_PER_BUBBLE=250;export const TIME_WARNING=10;export const ROW_COLORS=["#FF3B3B","#32CD32","#FFD700","#4DA6FF","#BF5AF2","#FF9500"];export const PRESS_TIME=.07;export const FLIP_TIME=.16;export const TILT=.4;export const LIGHT=frontLight([0,.12,1],.72);const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,SPACING=1.12,GRID_PADDING=8;export function getLayout(t,o,e){const n=gameWidthFor(t),r=getScoreBoardTop(e)+82,s=Math.max(200,o-r-110),i=5*1.12+1,p=(n-16)/i,I=(s/Math.cos(.4)-16)/(i+.5*Math.tan(.4)),a=Math.min(p,I);return{width:t,height:o,centerY:r+s/2,tilt:.4,bubble:a,spacing:1.12*a,sheet:5*a*1.12+a+16}}export function bubbleCentre(t,o,e){const n=-5*t.spacing/2;return[n+e*t.spacing,-n-o*t.spacing]}
|
|
@@ -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{bubbleCentre,GRID_SIZE,POINTS_PER_BUBBLE,TIME_LIMIT}from"./PopitFidgetConstants.js";import{buildScene,celebrate,pop,removeScene,restore,setSceneTheme}from"./PopitFidgetScene.js";const BUBBLES=GRID_SIZE*GRID_SIZE,WORLD_CAPACITY=300,HIT_RADIUS=.45;export function createGame(e){const o=new World(300),r={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",popped:new Array(BUBBLES).fill(!1),count:0,get score(){return o.scoreboard.score},get timeLeft(){return o.scoreboard.shownSeconds},won:!1,onPhase:e=>{},onScore:e=>{},onTime:e=>{},onPop:()=>{}};return o.scoreboard.reset(0,TIME_LIMIT),o.scoreboard.handlers={onSecond:e=>r.onTime(e),onTimeUp:()=>{"playing"===r.phase&&(r.won=!1,r.phase="over",r.onPhase("over"))}},r}export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme,e.popped)}export function setTheme(e,o){e.theme=o,e.scene&&setSceneTheme(e.world,e.scene,o)}export function start(e){"ready"===e.phase&&(freshSheet(e),e.phase="playing",e.world.scoreboard.startCountdown(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){freshSheet(e),e.won=!1,e.phase="ready",e.onPhase("ready")}function freshSheet(e){e.popped.fill(!1),e.count=0,e.world.scoreboard.reset(0,TIME_LIMIT),e.layout&&e.scene&&restore(e.world,e.layout,e.scene),e.onScore(0),e.onTime(TIME_LIMIT)}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(o)}export function bubbleAt(e,o,r){const n=e.layout;if(!n)return null;const[t,s]=unproject(n,o,r,.17*n.bubble),a=-(GRID_SIZE-1)*n.spacing/2,l=Math.round((t-a)/n.spacing),p=Math.round((-a-s)/n.spacing);if(p<0||p>=GRID_SIZE||l<0||l>=GRID_SIZE)return null;const[i,d]=bubbleCentre(n,p,l),u=p*GRID_SIZE+l;return e.popped[u]||Math.hypot(t-i,s-d)>.45*n.bubble?null:u}export function press(e,o,r){if("playing"!==e.phase)return;const n=bubbleAt(e,o,r);if(null!=n){if(e.popped[n]=!0,e.count+=1,e.world.scoreboard.add(POINTS_PER_BUBBLE),e.layout&&e.scene&&pop(e.world,e.layout,e.scene,n),e.onPop(),e.count>=BUBBLES)return e.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-e.timeLeft,TIME_LIMIT,e.score)),e.world.scoreboard.stop(),e.won=!0,e.phase="over",e.layout&&celebrate(e.world,e.layout),e.onScore(e.score),void e.onPhase("over");e.onScore(e.score)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat}from"@nayan-ui/engine";import{darken,lighten}from"../../services/GamesConstants.js";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{popBurst}from"../shared/EngineBlasts.js";import{cacheGameAsset,createGameMesh as _0x11ab88}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{bubbleCentre,FLIP_TIME,GRID_SIZE,PRESS_TIME,ROW_COLORS}from"./PopitFidgetConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("popit-fidget/PopitFidgetScene:"+e,o),meshes.set(e,t)),t},STAND_UP=quat.x(Math.PI/2),SHEET_DEPTH=10,CORNER=22,BACKDROP_DEPTH=25,rgb=e=>{const[o,t,s]=toColor(e);return[o,t,s]},sheetShade=e=>rgb(lighten(ROW_COLORS[e],.22)),domeColor=e=>toColor(ROW_COLORS[e]),dimpleColor=e=>toColor(darken(ROW_COLORS[e],.12)),sheetMesh=e=>cached("pf-sheet:"+e.sheet.toFixed(1)+":"+e.spacing.toFixed(2),()=>{const o=e.sheet/2,t=Math.min(22,e.spacing/2),s=Array.from({length:GRID_SIZE},(s,n)=>{const[,a]=bubbleCentre(e,n,0),r=0===n?-o:-(a+e.spacing/2),i=n===GRID_SIZE-1?o:-(a-e.spacing/2),h=new Path;return 0===n?h.moveTo(-o,i).lineTo(-o,r+t).quadraticTo(-o,r,-o+t,r).lineTo(o-t,r).quadraticTo(o,r,o,r+t).lineTo(o,i).close():n===GRID_SIZE-1?h.moveTo(-o,r).lineTo(o,r).lineTo(o,i-t).quadraticTo(o,i,o-t,i).lineTo(-o+t,i).quadraticTo(-o,i,-o,i-t).close():h.addRect(-o,r,e.sheet,i-r),{geometry:extrude(h,{depth:10}),color:sheetShade(n)}});return _0x11ab88(merge(s),{shine:.25})}),lipMesh=e=>cached("pf-lip:"+e.sheet.toFixed(1),()=>{const o=e.sheet,t=Math.min(22,e.spacing/2);return _0x11ab88(extrude((new Path).addRoundedRect(-o/2,-o/2,o,o,t).addRoundedRect(-o/2+3,-o/2+3,o-6,o-6,t-3),{depth:2.5,fillRule:"evenodd"}),{shine:.6})}),smooth=(e,o,t)=>{const s=Math.min(1,Math.max(0,(t-e)/(o-e)));return s*s*(3-2*s)},grey=e=>[e,e,e],domeMesh=()=>cached("pf-dome-v4",()=>{const e=[];for(let o=0;o<=8;o++){const t=o/8*(Math.PI/2);e.push([.52-.06*Math.sin(t),.06*(1-Math.cos(t))])}e.reverse();const o=[];for(let e=0;e<=20;e++){const t=e/20*(Math.PI/2);o.push([Math.max(.001,.46*Math.cos(t)),.12+.3*Math.sin(t)])}return _0x11ab88(lathe([...o.reverse(),...e],{segments:64,color:({position:e})=>grey(.88+.12*smooth(0,.2,e[1])+.04*smooth(.3,.43,e[1]))}),{center:!1,shine:.38})}),dimpleMesh=()=>cached("pf-dimple-v4",()=>{const e=[];for(let o=0;o<=14;o++){const t=o/14;e.push([Math.max(.001,.44*t),.012+.14*t*t])}for(let o=1;o<=10;o++){const t=o/10*Math.PI;e.push([.475-.035*Math.cos(t)+o/10*.025,.152+.04*Math.sin(t)-.19*smooth(.5,1,o/10)])}return _0x11ab88(lathe(e,{segments:64,color:({position:e})=>grey(.8+.2*smooth(.02,.17,e[1]))}),{center:!1,shine:.3})});export function buildScene(e,o,t,s){const n=spawnBackdrop(e,o.width,o.height,-25,t);placeTiltedBackdrop(e,n,o,25);const a=e.spawn({mesh:sheetMesh(o),position:[0,0,-5],color:[1,1,1,1],pickable:!1}),r=e.spawn({mesh:lipMesh(o),position:[0,0,1.25],color:[1,1,1,.45],pickable:!1}),i=[],h=[];for(let t=0;t<GRID_SIZE;t++)for(let n=0;n<GRID_SIZE;n++){const[a,r]=bubbleCentre(o,t,n),l=!s[t*GRID_SIZE+n];i.push(e.spawn({mesh:domeMesh(),position:[a,r,0],rotation:STAND_UP,scale:l?o.bubble:0,color:domeColor(t),pickable:!1})),h.push(e.spawn({mesh:dimpleMesh(),position:[a,r,0],rotation:STAND_UP,scale:l?0:o.bubble,color:dimpleColor(t),pickable:!1}))}return{backdrop:n,sheet:a,lip:r,domes:i,dimples:h}}export function removeScene(e,o){for(const t of[o.backdrop,o.sheet,o.lip,...o.domes,...o.dimples])e.despawn(t)}export function setSceneTheme(e,o,t){setBackdropTheme(e,o.backdrop,t)}export function pop(e,o,t,s){const n=o.bubble,a=Math.floor(s/GRID_SIZE),r=t.domes[s],i=t.dimples[s];e.stopAnimation(r),e.stopAnimation(i),e.animate(r,[{scale:[1.1*n,.18*n,1.1*n],at:.75},{scale:0}],{duration:PRESS_TIME+.02,easing:"easeIn"}),e.set(i,{scale:0}),e.animate(i,[{scale:[1.08*n,1.4*n,1.08*n],at:.55},{scale:n}],{duration:FLIP_TIME,delay:PRESS_TIME,easing:"easeOut"});const[h,l]=bubbleCentre(o,a,s%GRID_SIZE);popBurst(e,{position:[h,l,.5*n],size:n,color:domeColor(a),glowZ:.05*n,count:7})}export function restore(e,o,t){t.domes.forEach((o,s)=>{e.stopAnimation(o),e.stopAnimation(t.dimples[s])});const s=e.transforms;t.domes.forEach((e,n)=>{s.scale(e,o.bubble),s.scale(t.dimples[n],0)}),s.flush()}export function celebrate(e,o){effects.confetti(e,{position:[0,0,o.bubble],count:60,size:.16*o.bubble,speed:1.4*o.sheet,lifetime:1.3,gravity:2.4*-o.sheet,colors:ROW_COLORS.slice(0,4).map(e=>toColor(e))})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,textColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{BOARD_BORDER_WIDTH,GAME_DURATION,getLayout,LIGHT}from"./ReversiConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./ReversiGame.js";import{jsx as _0x2844ea}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.REVERSI,FEEDBACK={place:{sound:SOUNDS.PLACE,haptic:HapticType.MEDIUM},robot:{sound:SOUNDS.PLACE,haptic:HapticType.LIGHT},invalid:{sound:SOUNDS.INVALID,haptic:HapticType.LIGHT},pass:{sound:SOUNDS.PASS},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.LOSE,haptic:HapticType.ERROR}};export const Reversi=engineGame(GAME_IDS.REVERSI,e=>{const[t,s]=useLiveState(0),[i,o]=useLiveState({black:2,white:2}),[r,a]=useLiveState(GAME_DURATION),{game:n,theme:m,status:S,screen:u,gameOver:E}=useEngineGame(e,{gameId:GAME_IDS.REVERSI,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,i)=>{const o=getLayout(t,s,i);return setLayout(e,o),o.size+2*BOARD_BORDER_WIDTH},drag:drag,outcome:e=>"black"===e.winner?"win":"lose",sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t,s)=>{s.timedOut&&e(SOUNDS.TIME_UP,HapticType.ERROR)},wire:(e,t)=>{e.onScore=s,e.onCounts=(e,t)=>o({black:e,white:t}),e.onTime=a,e.onEvent=s=>{"lose"!==s||null!==e.winner||e.timedOut?t(FEEDBACK[s].sound,FEEDBACK[s].haptic):t(GAME_SOUNDS.DRAW,HapticType.MEDIUM)}}}),{black:p,white:O,timedOut:D}=n,T=null===n.winner&&!D,l="win"===S?"YOU WON!":T?"IT'S A TIE!":D?"TIME UP!":"YOU LOST!",d="win"===S?"You finished "+p+"-"+O+"!":T?"Even at "+p+"-"+O+"!":D?"You ran out of time!":"The robot wins "+O+"-"+p+"!";return _0x2844ea(EngineGameScreen,{...u,light:LIGHT,columns:[scoreColumn(t),textColumn("YOU-AI",i.black+"-"+i.white),timerColumn(r,m)],subtext:"Outflank the robot!",gameOver:E({title:l,message:d,scoreLabel:"Score",score:t,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 GAME_DURATION=300;export const POINTS_PER_FLIP=200;export const WIN_BONUS=5e3;export const AI_DELAY=.5;export const TAP_SLOP=12;export const FLIP_TIME=.24;export const RIPPLE=.07;export const PLACE_LEAD=.09;export const COLORS={FELT:"#1F7A46",BOARD_BORDER:"#0F3D24",GRID:"#155a33",STAR:"#0d3b21",HINT:"rgba(255,255,255,0.75)",LAST_MOVE:"rgba(255,213,79,0.9)",BLACK:"#2A2A2A",WHITE:"#F2F2F2"};export const TILT=0;export const BOARD_BORDER_WIDTH=3;export const BOARD_SURFACE=.2;export const LIGHT=frontLight([-.4,.5,1],.45);const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120;export function getLayout(t,o,e){const r=getScoreBoardTop(e)+82,n=Math.max(200,o-r-120),s=Math.min(gameWidthFor(t),n/Math.cos(0)-20),a=Math.max(16,Math.floor((s-6)/8));return{width:t,height:o,tilt:0,centerY:r+n/2,cell:a,size:8*a}}export const cellCentre=(t,o)=>[(o%8-3.5)*t.cell,(3.5-Math.floor(o/8))*t.cell];export function cellAt(t,o,e){const r=Math.floor((o+t.size/2)/t.cell),n=Math.floor((t.size/2-e)/t.cell);return r<0||r>7||n<0||n>7?-1:8*n+r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{AI_DELAY,BOARD_SURFACE,cellAt,GAME_DURATION,POINTS_PER_FLIP,TAP_SLOP,WIN_BONUS}from"./ReversiConstants.js";import{AI,applyMove,chooseAIMove,counts,flipsFor,HUMAN,initialBoard,opponent,validMoves}from"./ReversiRules.js";import{buildScene,celebrate,flipDiscs,nudge,placeDisc,removeScene,setSceneTheme,showHints,showLast}from"./ReversiScene.js";const WORLD_CAPACITY=300;export function createGame(e){const n=new World(300),o=initialBoard(),t={world:n,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",board:o,turn:HUMAN,hints:validMoves(o,HUMAN).map(e=>e.index),last:-1,winner:null,timedOut:!1,black:2,white:2,get score(){return n.scoreboard.score},get timeLeft(){return n.scoreboard.shownSeconds},press:null,onPhase:e=>{},onScore:e=>{},onCounts:(e,n)=>{},onTurn:e=>{},onTime:e=>{},onEvent:e=>{}};return n.scoreboard.reset(0,GAME_DURATION),n.scoreboard.handlers={onSecond:e=>t.onTime(e),onTimeUp:()=>{"playing"===t.phase&&(t.timedOut=!0,t.winner=AI,end(t))}},t}export function setLayout(e,n){e.scene&&removeScene(e.world,e.scene),e.layout=n,aimTilted(e.camera,n),e.scene=buildScene(e.world,n,e.theme,e.board,e.hints,e.last)}export function setTheme(e,n){e.theme=n,e.scene&&setSceneTheme(e.world,e.scene,n)}const setHints=(e,n)=>{e.hints=n,e.layout&&e.scene&&showHints(e.world,e.layout,e.scene,n)};function fresh(e){e.world.cancelTimers(),e.board=initialBoard(),e.turn=HUMAN,e.last=-1,e.winner=null,e.timedOut=!1,e.black=2,e.white=2,e.world.scoreboard.reset(0,GAME_DURATION),e.press=null,e.layout&&setLayout(e,e.layout),setHints(e,validMoves(e.board,HUMAN).map(e=>e.index)),e.onScore(0),e.onCounts(2,2),e.onTurn(HUMAN),e.onTime(GAME_DURATION)}export function start(e){"ready"===e.phase&&(fresh(e),e.world.scoreboard.startCountdown(GAME_DURATION),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,n){e.world.isDisposed||e.world.update(n)}function end(e){e.world.cancelTimers(),e.world.scoreboard.stop(),e.press=null,setHints(e,[]),e.phase="over",e.winner===HUMAN&&e.layout&&e.scene&&celebrate(e.world,e.layout,e.scene,e.board),e.onPhase("over")}function play(e,n,o){e.board=applyMove(e.board,n,o);const t=counts(e.board);e.black=t.black,e.white=t.white,o===HUMAN&&e.world.scoreboard.add(n.flips.length*POINTS_PER_FLIP),e.last=n.index,e.turn=opponent(o);const{layout:r,scene:s}=e;r&&s&&(placeDisc(e.world,r,s,n.index,o),flipDiscs(e.world,r,s,n.index,n.flips,o),showLast(e.world,r,s,n.index)),setHints(e,[]),e.onCounts(t.black,t.white),o===HUMAN&&e.onScore(e.score),e.onEvent(o===HUMAN?"place":"robot"),resolveTurn(e)}export function select(e,n){if("playing"!==e.phase||e.turn!==HUMAN)return;const o=flipsFor(e.board,n,HUMAN);if(0===o.length)return e.layout&&e.scene&&nudge(e.world,e.layout,e.scene,n),void e.onEvent("invalid");play(e,{index:n,flips:o},HUMAN)}function robotMove(e){if("playing"!==e.phase||e.turn!==AI)return;const n=chooseAIMove(e.board);if(!n)return e.turn=HUMAN,e.onTurn(HUMAN),void resolveTurn(e);play(e,n,AI)}function resolveTurn(e){if("playing"!==e.phase)return;const n=e.turn,o=validMoves(e.board,n);if(o.length>0)return e.onTurn(n),void(n===HUMAN?setHints(e,o.map(e=>e.index)):(setHints(e,[]),e.world.cancelTimers(),e.world.after(AI_DELAY,()=>robotMove(e))));const t=opponent(n);if(0===validMoves(e.board,t).length)return finishByCount(e);e.turn=t,setHints(e,[]),e.onEvent("pass"),resolveTurn(e)}function finishByCount(e){const n=counts(e.board);e.black=n.black,e.white=n.white,e.winner=n.black>n.white?HUMAN:n.white>n.black?AI:null,e.winner===HUMAN&&e.onScore(e.world.scoreboard.add(WIN_BONUS)),e.onCounts(n.black,n.white),e.onEvent(e.winner===HUMAN?"win":"lose"),end(e)}export function cellUnder(e,n,o){const t=e.layout;if(!t)return-1;const[r,s]=unproject(t,n,o,BOARD_SURFACE);return cellAt(t,r,s)}export function drag(e,{phase:n,x:o,y:t}){if("start"===n)return void(e.press={x:o,y:t});const r=e.press;if(!r)return;if(Math.hypot(o-r.x,t-r.y)>TAP_SLOP)return void(e.press=null);if("end"!==n)return;e.press=null;const s=cellUnder(e,o,t);s>=0&&select(e,s)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const N=8;export const HUMAN="black";export const AI="white";export const opponent=o=>"black"===o?"white":"black";const AI_DEPTH=2,AI_RANDOM_MOVE_CHANCE=.2,AI_SCORE_MARGIN=12,DIRECTIONS=[[-1,-1],[-1,0],[-1,1],[0,-1],[0,1],[1,-1],[1,0],[1,1]],WEIGHTS=[120,-20,20,5,5,20,-20,120,-20,-40,-5,-5,-5,-5,-40,-20,20,-5,15,3,3,15,-5,20,5,-5,3,3,3,3,-5,5,5,-5,3,3,3,3,-5,5,20,-5,15,3,3,15,-5,20,-20,-40,-5,-5,-5,-5,-40,-20,120,-20,20,5,5,20,-20,120],inBounds=(o,t)=>o>=0&&o<8&&t>=0&&t<8;export function initialBoard(){const o=new Array(64).fill(null);return o[27]="white",o[28]="black",o[35]="black",o[36]="white",o}export function flipsFor(o,t,n){if(null!==o[t])return[];const e=Math.floor(t/8),r=t%8,l=opponent(n),i=[];for(const[t,s]of DIRECTIONS){let f=e+t,u=r+s;const a=i.length;for(;inBounds(f,u)&&o[8*f+u]===l;)i.push(8*f+u),f+=t,u+=s;inBounds(f,u)&&o[8*f+u]===n||(i.length=a)}return i}export function validMoves(o,t){const n=[];for(let e=0;e<o.length;e++){if(null!==o[e])continue;const r=flipsFor(o,e,t);r.length>0&&n.push({index:e,flips:r})}return n}export function applyMove(o,t,n){const e=o.slice();e[t.index]=n;for(const o of t.flips)e[o]=n;return e}export function counts(o){let t=0,n=0;for(const e of o)"black"===e?t++:"white"===e&&n++;return{black:t,white:n}}function evaluate(o){let t=0;for(let n=0;n<o.length;n++){const e=o[n];e&&(t+=e===AI?WEIGHTS[n]:-WEIGHTS[n])}return t+5*(mobility(o,AI)-mobility(o,HUMAN))}function mobility(o,t){const n=opponent(t);let e=0;for(let r=0;r<o.length;r++){if(null!==o[r])continue;const l=Math.floor(r/8),i=r%8;for(const[r,s]of DIRECTIONS){let f=l+r,u=i+s,a=!1;for(;inBounds(f,u)&&o[8*f+u]===n;)a=!0,f+=r,u+=s;if(a&&inBounds(f,u)&&o[8*f+u]===t){e++;break}}}return e}function search(o,t,n,e,r){if(0===n)return evaluate(o);const l=validMoves(o,t);if(0===l.length)return 0===validMoves(o,opponent(t)).length?evaluate(o):search(o,opponent(t),n-1,e,r);if(t===AI){let i=-1/0;for(const s of l){const l=search(applyMove(o,s,t),opponent(t),n-1,e,r);if(l>i&&(i=l),i>e&&(e=i),r<=e)break}return i}let i=1/0;for(const s of l){const l=search(applyMove(o,s,t),opponent(t),n-1,e,r);if(l<i&&(i=l),i<r&&(r=i),r<=e)break}return i}export function chooseAIMove(o){const t=validMoves(o,AI);if(0===t.length)return null;if(1===t.length)return t[0];if(Math.random()<.2)return t[Math.floor(Math.random()*t.length)];let n=-1/0;const e=[];for(const r of t){const t=search(applyMove(o,r,AI),HUMAN,1,-1/0,1/0);e.push({move:r,score:t}),t>n&&(n=t)}const r=e.filter(o=>o.score>=n-12);return r[Math.floor(Math.random()*r.length)].move}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{cacheGameAsset,createGameMesh as _0xad85c9}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{BOARD_BORDER_WIDTH,BOARD_SURFACE,cellCentre,COLORS,FLIP_TIME,PLACE_LEAD,RIPPLE}from"./ReversiConstants.js";const meshes=new Map,cached=(e,t)=>{let o=meshes.get(e);return!o&&(o=cacheGameAsset("reversi/ReversiScene:"+e,t),meshes.set(e,o)),o},STAND_UP=quat.x(Math.PI/2),WHITE_UP=[0,0,0,1],BLACK_UP=quat.x(Math.PI),EDGE_ON=quat.x(Math.PI/2),BACKDROP_DEPTH=30,FELT=BOARD_SURFACE,DISC=.8,THICK=.16,discMesh=()=>cached("rv-disc",()=>{const e=lathe([[.001,.5],[.36,.5],[.385,.46],[.41,.5],[.43,.5],[.465,.43],[.495,.28],[.5,.1],[.5,0],[.001,0]],{segments:36,color:({position:[e,t,o]})=>{const s=Math.hypot(e,o)>.43?.88:t<.49?.92:1;return[s,s,s,1]}});return _0xad85c9(merge([{geometry:e,rotation:STAND_UP,color:toColor(COLORS.WHITE)},{geometry:e,rotation:quat.x(-Math.PI/2),color:toColor(COLORS.BLACK)}]),{center:!1,shine:.45})}),ringMesh=()=>cached("rv-ring",()=>_0xad85c9(extrude((new Path).addCircle(0,0,.5).addCircle(0,0,.38),{depth:0,fillRule:"evenodd"}),{center:!1})),frameMesh=()=>cached("rv-frame",()=>_0xad85c9(extrude((new Path).addRect(-.5,-.5,1,1).addRect(-.44,-.44,.88,.88),{depth:0,fillRule:"evenodd"}),{center:!1})),feltMesh=()=>cached("rv-felt",()=>_0xad85c9(extrude((new Path).addRect(-.5,-.5,1,1),{depth:0}),{center:!1})),gridMesh=()=>cached("rv-grid",()=>{const e=new Path;for(let t=0;t<=8;t++){const o=Math.max(-3.9875,Math.min(3.9875,t-4));e.addRect(o-.0125,-4,.025,8).addRect(-4,o-.0125,8,.025)}const t=new Path;for(const e of[-2,2])for(const o of[-2,2])t.addCircle(e,o,.06);return _0xad85c9(merge([{geometry:extrude(e,{depth:0}),color:toColor(COLORS.GRID)},{geometry:extrude(t,{depth:0}),position:[0,0,.01],color:toColor(COLORS.STAR)}]),{center:!1})}),lying=e=>FELT+.16*e.cell/2,at=(e,t,o)=>{const[s,a]=cellCentre(e,t);return[s,a,o]},faceUp=e=>"white"===e?WHITE_UP:BLACK_UP;function spawnFelt(e,t){const o=[e.spawn({mesh:feltMesh(),position:[0,0,FELT],scale:[t.size,t.size,1],color:toColor(COLORS.FELT),pickable:!1}),e.spawn({mesh:gridMesh(),position:[0,0,FELT+.02],scale:[t.cell,t.cell,1],pickable:!1})],s=BOARD_BORDER_WIDTH,a=toColor(COLORS.BOARD_BORDER);for(const n of[-1,1])o.push(e.spawn({mesh:feltMesh(),position:[0,n*(t.size+s)/2,FELT],scale:[t.size+2*s,s,1],color:a,pickable:!1})),o.push(e.spawn({mesh:feltMesh(),position:[n*(t.size+s)/2,0,FELT],scale:[s,t.size,1],color:a,pickable:!1}));return o}export function buildScene(e,t,o,s,a,n){const i=spawnBackdrop(e,t.width,t.height,-30,o);placeTiltedBackdrop(e,i,t,30);const r={backdrop:i,felt:spawnFelt(e,t),discs:new Array(64).fill(null),hints:[],last:e.spawn({mesh:frameMesh(),scale:0,color:toColor(COLORS.LAST_MOVE),pickable:!1})};return s.forEach((o,s)=>{o&&placeDisc(e,t,r,s,o,!1)}),showHints(e,t,r,a),showLast(e,t,r,n),r}export function removeScene(e,t){for(const o of[t.backdrop,...t.felt,...t.discs,...t.hints,t.last])null!=o&&e.despawn(o)}export function setSceneTheme(e,t,o){setBackdropTheme(e,t.backdrop,o)}export function placeDisc(e,t,o,s,a,n=!0){const i=o.discs[s];null!=i&&e.despawn(i);const r=.8*t.cell,l=lying(t),d=e.spawn({mesh:discMesh(),position:at(t,s,n?l+.7*t.cell:l),rotation:faceUp(a),scale:[r,r,.16*t.cell],pickable:!1});n&&e.animate(d,{position:at(t,s,l)},{duration:.2,easing:"bounce"}),o.discs[s]=d}export function flipDiscs(e,t,o,s,a,n){const i=Math.floor(s/8),r=s%8,l=lying(t);for(const s of a){const a=o.discs[s];if(null==a)continue;const d=Math.max(Math.abs(Math.floor(s/8)-i),Math.abs(s%8-r));e.animate(a,[{position:at(t,s,l+.45*t.cell),rotation:EDGE_ON,at:.5},{position:at(t,s,l),rotation:faceUp(n)}],{duration:FLIP_TIME,delay:PLACE_LEAD+(d-1)*RIPPLE,easing:"easeInOut"})}}export function showHints(e,t,o,s){for(const t of o.hints)e.despawn(t);const a=toColor(COLORS.HINT);o.hints=s.map(o=>e.spawn({mesh:ringMesh(),position:at(t,o,FELT+.08),scale:.32*t.cell,color:a,pickable:!1}))}export function showLast(e,t,o,s){s<0?e.set(o.last,{scale:0}):e.set(o.last,{position:at(t,s,FELT+.06),scale:t.cell-2})}export function nudge(e,t,o,s){const a=o.discs[s];null!=a&&e.animate(a,{shake:.05*t.cell},{duration:.2})}export function celebrate(e,t,o,s){const a=lying(t);s.forEach((s,n)=>{const i=o.discs[n];if("black"!==s||null==i)return;const r=.3+.04*(Math.floor(n/8)+n%8);e.animate(i,[{position:at(t,n,a+.4*t.cell),at:.4},{position:at(t,n,a)}],{duration:.4,delay:r,easing:"easeOut"})}),effects.confetti(e,{position:[0,0,2*t.cell],count:60,size:.15*t.cell,speed:1.4*t.size,lifetime:1.3,gravity:2.4*-t.size,colors:["#FFD700","#4CAF50","#FFFFFF","#1F7A46"].map(e=>toColor(e))})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{toRgb}from"../shared/EngineUtils.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT}from"./SearchGridConstants.js";import{createGame,dispose,drag,entries,reset,setLayout,setTheme,start,tick}from"./SearchGridGame.js";import{drawEntryList}from"./SearchGridScene.js";import{jsx as _0x19e3ac}from"react/jsx-runtime";export function createSearchGame(e){const{sounds:t}=e;return engineGame(e.gameId,r=>{const[s,a]=useLiveState(0),[i,n]=useLiveState(TIME_LIMIT),{theme:o,status:m,screen:u,gameOver:g}=useEngineGame(r,{gameId:e.gameId,create:t=>createGame(t,e),start:start,reset:reset,dispose:dispose,tick:tick,hud:(e,t)=>{e.layout&&drawEntryList(t,entries(e),e.found,e.layout)},setTheme:setTheme,resize:(e,t,r,s)=>{const a=getLayout(t,r,s);return setLayout(e,a),a.boardSize},drag:drag,sounds:t,onStart:e=>e(t.START,HapticType.MEDIUM),onOver:(e,r)=>{"win"!==r&&e(t.GAME_OVER,HapticType.HEAVY)},wire:(e,r)=>{e.onScore=a,e.onTime=n,e.onFind=()=>r(t.FOUND,HapticType.MEDIUM),e.onWin=()=>r(t.WIN,HapticType.SUCCESS)}}),d=useMemo(()=>toRgb(o.BACKGROUND),[o.BACKGROUND]);return _0x19e3ac(EngineGameScreen,{...u,light:LIGHT,background:d,columns:[scoreColumn(s),timerColumn(i,o,0)],subtext:e.startSubtext,gameOver:g({title:"win"===m?e.winTitle:"TIME UP!",message:"win"===m?e.winMessage:"You ran out of time!",scoreLabel:"win"===m?"You Won!":"Game Over",score:s,buttonText:"win"===m?"Play Again!":"Try Again!"})})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID_SIZE=10;export const ITEMS=8;export const TIME_LIMIT=300;export const FIND_POINTS=1e3;const DIRECTIONS=[[1,0],[0,1],[1,1],[-1,1],[-1,0],[0,-1],[-1,-1],[1,-1]],shuffle=t=>{const o=[...t];for(let t=o.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1));[o[t],o[r]]=[o[r],o[t]]}return o};export function generate(t,o){const r=Array.from({length:10},()=>Array(10).fill("")),e=[],n=[];for(let t=0;t<10;t++)for(let o=0;o<10;o++)n.push({row:t,col:o});const a=(t,o,e,n,a)=>{for(let l=0;l<t.length;l++){const s=o+l*a,f=e+l*n;if(s<0||s>=10||f<0||f>=10)return!1;const i=r[s][f];if(i&&i!==t[l])return!1}return!0};for(const o of shuffle([...new Set(t.filter(t=>t.length<=10))])){if(e.length>=8)break;t:for(const[t,l]of shuffle(DIRECTIONS))for(const{row:s,col:f}of shuffle(n)){if(!a(o,s,f,t,l))continue;const n=Array.from(o,(o,e)=>{const n={row:s+e*l,col:f+e*t};return r[n.row][n.col]=o,n});e.push({text:o,cells:n});break t}}for(const t of r)for(let r=0;r<10;r++)t[r]||(t[r]=o[Math.floor(Math.random()*o.length)]);return{grid:r,placed:e}}export function lineCells(t,o){const r=o.row-t.row,e=o.col-t.col;if(0!==r&&0!==e&&Math.abs(r)!==Math.abs(e))return[];const n=Math.max(Math.abs(r),Math.abs(e)),a=Math.sign(r),l=Math.sign(e);return Array.from({length:n+1},(o,r)=>({row:t.row+r*a,col:t.col+r*l}))}export function matchOf(t,o,r,e){const n=t.map(t=>o[t.row]?.[t.col]??"").join(""),a=[...n].reverse().join("");return r.find(t=>!e.has(t.text)&&(t.text===n||t.text===a))??null}export const HIGHLIGHT_COLORS=["rgba(255, 59, 59, 1)","rgba(50, 205, 50, 1)","rgba(255, 215, 0, 1)","rgba(77, 166, 255, 1)","rgba(191, 90, 242, 1)","rgba(255, 149, 0, 1)"];export const SELECTION_COLOR="rgba(77, 166, 255, 0.85)";export const TILE_COLOR="#FFFFFF";export const INK_COLOR="#333333";export const CLASSIC_BOARD="rgba(255, 255, 255, 0.3)";export const TILT=.3;export const LIGHT=frontLight([-.4,.5,1],.5);export const SELECT_TIME=.12;export const FIND_TIME=.32;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,PADDING=8;export const LIST_HEIGHT=52;export function getLayout(t,o,r){const e=gameWidthFor(t),n=getScoreBoardTop(r)+82,a=Math.max(240,o-n-110),l=Math.min(e,(a-52)/Math.cos(.3)),s=n+(a-(52+l*Math.cos(.3)))/2,f=(l-16)/10;return{width:t,height:o,tilt:.3,centerY:s+52+l*Math.cos(.3)/2,boardSize:l,cell:f,padding:8,tileTop:Math.max(4,.16*f),listTop:s,listWidth:e}}export function cellCentre(t,o,r){const e=t.boardSize/2;return[-e+t.padding+(r+.5)*t.cell,e-t.padding-(o+.5)*t.cell]}export function cellAt(t,o,r){const e=t.boardSize/2,n=Math.floor((o+e-t.padding)/t.cell),a=Math.floor((e-t.padding-r)/t.cell);return a>=0&&a<10&&n>=0&&n<10?{row:a,col:n}:null}
|
|
@@ -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{cellAt,FIND_POINTS,generate,lineCells,matchOf,TIME_LIMIT}from"./SearchGridConstants.js";import{buildScene,celebrate,followSelection,hideSelection,markFound,relabel,removeScene,setSceneTheme,showSelection}from"./SearchGridScene.js";const WORLD_CAPACITY=400;export function createGame(e,o){const n=new World(400),{grid:t,placed:r}=generate(o.list,o.alphabet),l={world:n,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,content:o,layout:null,scene:null,phase:"ready",grid:t,placed:r,found:new Set,start:null,end:null,get score(){return n.scoreboard.score},get timeLeft(){return n.scoreboard.shownSeconds},won:!1,onPhase:e=>{},onScore:e=>{},onTime:e=>{},onEntries:e=>{},onFound:e=>{},onFind:()=>{},onWin:()=>{}};return n.scoreboard.reset(0,TIME_LIMIT),n.scoreboard.handlers={onSecond:e=>l.onTime(e),onTimeUp:()=>"playing"===l.phase&&end(l,!1)},l}export function setLayout(e,o){e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme,e.grid),e.placed.forEach((n,t)=>e.found.has(n.text)&&markFound(e.world,o,e.scene,n.cells,t,!1)),e.start&&e.end&&showSelection(e.world,o,e.scene,e.start,e.end,!0)}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.startCountdown(TIME_LIMIT),e.onPhase("playing"))}export function reset(e){const{grid:o,placed:n}=generate(e.content.list,e.content.alphabet);e.grid=o,e.placed=n,e.found=new Set,clearSelection(e),e.world.scoreboard.reset(0,TIME_LIMIT),e.won=!1,e.phase="ready",e.layout&&e.scene&&relabel(e.world,e.layout,e.scene,o),e.onEntries(entries(e)),e.onFound(e.found),e.onScore(0),e.onTime(TIME_LIMIT),e.onPhase("ready")}export const entries=e=>e.placed.map(e=>e.text);export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||(e.layout&&e.scene&&followSelection(e.world,e.layout,e.scene,o),e.world.update(o))}function end(e,o){e.world.scoreboard.stop(),clearSelection(e),e.won=o,e.phase="over",e.onPhase("over")}function clearSelection(e){e.start=null,e.end=null,e.scene&&hideSelection(e.world,e.scene)}export function cellUnder(e,o,n){const t=e.layout;if(!t)return null;const[r,l]=unproject(t,o,n,t.tileTop);return cellAt(t,r,l)}export function drag(e,{phase:o,x:n,y:t}){const{layout:r,scene:l}=e;if(r&&l){if("start"===o){if("playing"!==e.phase)return;const o=cellUnder(e,n,t);if(!o)return;return e.start=o,e.end=o,void showSelection(e.world,r,l,o,o,!0)}if("move"===o){if(!e.start||"playing"!==e.phase)return;const o=cellUnder(e,n,t);if(!o||o.row===e.end?.row&&o.col===e.end?.col||!lineCells(e.start,o).length)return;return e.end=o,void showSelection(e.world,r,l,e.start,o,!1)}release(e)}}function release(e){const{start:o,end:n}=e;if(clearSelection(e),!o||!n||"playing"!==e.phase)return;const t=lineCells(o,n),r=matchOf(t,e.grid,e.placed,e.found);r&&(r.cells=t,found(e,r))}function found(e,o){const{layout:n,scene:t}=e;if(e.found=new Set(e.found).add(o.text),e.world.scoreboard.add(FIND_POINTS),n&&t&&markFound(e.world,n,t,o.cells,e.placed.indexOf(o),!0),e.onFound(e.found),e.onFind(),e.found.size===e.placed.length)return e.world.scoreboard.set(calculateTimeBasedScore(TIME_LIMIT-e.timeLeft,TIME_LIMIT,e.score)),e.onScore(e.score),n&&celebrate(e.world,n),e.onWin(),void end(e,!0);e.onScore(e.score)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,Path,quat,tube}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{GLYPH_RADIUS,glyphMesh}from"../shared/EngineGlyphs.js";import{cacheGameAsset,createGameMesh as _0x5df314}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,CLASSIC_BOARD,FIND_TIME,GRID_SIZE,HIGHLIGHT_COLORS,INK_COLOR,SELECT_TIME,SELECTION_COLOR,TILE_COLOR}from"./SearchGridConstants.js";const meshes=new Map,cached=(e,t)=>{let o=meshes.get(e);return!o&&(o=cacheGameAsset("search-grid/SearchGridScene:"+e,t),meshes.set(e,o)),o},BOARD_DEPTH=10,BACKDROP_DEPTH=25,GLYPH_SIZE=.4,panelMesh=(e,t)=>cached("sg-panel:"+e.toFixed(1)+":"+t,()=>_0x5df314(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,t),{depth:10}),{shine:.2})),barMesh=()=>cached("sg-bar",()=>_0x5df314(tube([[-.5,0,0],[.5,0,0]],{radius:.5,sides:18,smoothness:1,caps:!1}),{shine:.5})),boardColor=e=>toColor("classic"===e.mode?CLASSIC_BOARD:e.BOARD.SURFACE),tileIndex=e=>e.row*GRID_SIZE+e.col;export function buildScene(e,t,o,l){const s=spawnBackdrop(e,t.width,t.height,-25,o);placeTiltedBackdrop(e,s,t,25);const a=e.spawn({mesh:panelMesh(t.boardSize,"classic"===o.mode?12:8),position:[0,0,-5],color:boardColor(o),pickable:!1}),n=[],r=[],i=toColor(INK_COLOR),p=toColor(TILE_COLOR);for(let o=0;o<GRID_SIZE;o++)for(let s=0;s<GRID_SIZE;s++){const[a,h]=cellCentre(t,o,s);n.push(e.spawn({mesh:"roundedBox",position:[a,h,t.tileTop/2],scale:[.88*t.cell,.88*t.cell,t.tileTop],color:p,pickable:!1})),r.push(spawnGlyph(e,t,l[o][s],a,h,i))}return{backdrop:s,panel:a,tiles:n,glyphs:r,selection:spawnPill(e,toColor(SELECTION_COLOR)),ends:{ax:0,ay:0,bx:0,by:0,tax:0,tay:0,tbx:0,tby:0,on:!1},found:[]}}function spawnGlyph(e,t,o,l,s,a){const n=.4*t.cell;return e.spawn({mesh:glyphMesh(o),position:[l,s,t.tileTop+GLYPH_RADIUS*n],scale:n,color:a,pickable:!1})}export function relabel(e,t,o,l){const s=toColor(INK_COLOR);o.glyphs.forEach((a,n)=>{e.despawn(a);const r=Math.floor(n/GRID_SIZE),i=n%GRID_SIZE,[p,h]=cellCentre(t,r,i);o.glyphs[n]=spawnGlyph(e,t,l[r][i],p,h,s)});for(const t of o.found)for(const o of t)e.despawn(o);o.found=[]}export function removeScene(e,t){for(const o of[t.backdrop,t.panel,...t.tiles,...t.glyphs,...t.selection,...t.found.flat()])e.despawn(o)}export function setSceneTheme(e,t,o,l){setBackdropTheme(e,o.backdrop,l),e.set(o.panel,{mesh:panelMesh(t.boardSize,"classic"===l.mode?12:8),color:boardColor(l)})}function spawnPill(e,t){return[e.spawn({mesh:barMesh(),scale:0,color:t,pickable:!1}),e.spawn({mesh:"sphere",scale:0,color:t,pickable:!1}),e.spawn({mesh:"sphere",scale:0,color:t,pickable:!1})]}function drawPill(e,t,o,l,s,a,n){const r=.8*t.cell,i=Math.max(.4,.12*t.tileTop),p=t.tileTop+.15*i,h=Math.hypot(a-l,n-s),[d,f,x]=o;e.set(d,{position:[(l+a)/2,(s+n)/2,p],rotation:quat.z(Math.atan2(n-s,a-l)),scale:[Math.max(h,.001),r,i]}),e.set(f,{position:[l,s,p],scale:[r,r,i]}),e.set(x,{position:[a,n,p],scale:[r,r,i]})}function layPill(e,t,o,l,s){const[a,n]=cellCentre(t,l.row,l.col),[r,i]=cellCentre(t,s.row,s.col);drawPill(e,t,o,a,n,r,i)}export function showSelection(e,t,o,l,s,a){const n=o.ends;[n.tax,n.tay]=cellCentre(t,l.row,l.col),[n.tbx,n.tby]=cellCentre(t,s.row,s.col),n.on=!0,a&&(n.ax=n.tax,n.ay=n.tay,n.bx=n.tbx,n.by=n.tby,drawPill(e,t,o.selection,n.ax,n.ay,n.bx,n.by))}export function followSelection(e,t,o,l){const s=o.ends;if(!s.on)return;if(Math.abs(s.tax-s.ax)+Math.abs(s.tay-s.ay)+Math.abs(s.tbx-s.bx)+Math.abs(s.tby-s.by)<.05)return;const a=1-Math.exp(-l/(SELECT_TIME/3));s.ax+=(s.tax-s.ax)*a,s.ay+=(s.tay-s.ay)*a,s.bx+=(s.tbx-s.bx)*a,s.by+=(s.tby-s.by)*a,drawPill(e,t,o.selection,s.ax,s.ay,s.bx,s.by)}export function hideSelection(e,t){t.ends.on=!1;for(const o of t.selection)e.set(o,{scale:0})}export function markFound(e,t,o,l,s,a){const[n,r,i,p]=toColor(HIGHLIGHT_COLORS[s%HIGHLIGHT_COLORS.length]),h=spawnPill(e,[n,r,i,p??1]);if(layPill(e,t,h,l[0],l[l.length-1]),o.found.push(h),!a)return;const d=[.88*t.cell,.88*t.cell,t.tileTop];e.animate(l.map(e=>o.tiles[tileIndex(e)]),[{scale:[1.15*d[0],1.15*d[1],1.6*d[2]],at:.4},{scale:d}],{duration:FIND_TIME,stagger:.04}),e.animate(l.map(e=>o.glyphs[tileIndex(e)]),[{scale:.4*t.cell*1.2,at:.4},{scale:.4*t.cell}],{duration:FIND_TIME,stagger:.04});const f=l[Math.floor(l.length/2)],[x,b]=cellCentre(t,f.row,f.col);effects.sparkle(e,{position:[x,b,t.tileTop+.3*t.cell],count:14,size:.12*t.cell,speed:4*t.cell,lifetime:.55,gravity:4*-t.cell,colors:[[n,r,i,1],[1,1,1,1]]})}export function celebrate(e,t){effects.confetti(e,{position:[0,0,2*t.cell],count:60,size:.22*t.cell,speed:1.4*t.boardSize,lifetime:1.3,gravity:2.4*-t.boardSize,colors:HIGHLIGHT_COLORS.slice(0,4).map(e=>{const[t,o,l]=toColor(e);return[t,o,l,1]})})}const entryStrips=new WeakMap;export function drawEntryList(e,t,o,l){if(!e.ready)return;const s=t.map((e,t)=>({text:e,color:HIGHLIGHT_COLORS[t%HIGHLIGHT_COLORS.length]})).sort((e,t)=>e.text.localeCompare(t.text)),a=s.map(e=>e.text).join("|")+":"+l.width+":"+l.listTop+":"+l.listWidth;let n=entryStrips.get(e);if(n?.key!==a){e.clearLayer("entries");const t=e.layer("entries"),o=Math.min(4,s.length),r=5,i=(l.listWidth-r*(o-1))/o,p=(l.width-l.listWidth)/2;n={key:a,chips:s.map((s,a)=>{const n=e.world.spawn({mesh:"none",parent:t,position:[p+a%o*(i+r)+i/2,-(l.listTop+24*Math.floor(a/o)+11),0],pickable:!1}),h=e.rectangle(n,0,0,i,21,toColor(s.color));return e.text(n,s.text,0,0,Math.min(12,(i-8)/s.text.length/.65),[1,1,1,1]),{root:n,face:h,strike:e.rectangle(n,0,0,i-12,1,[1,1,1,0],3),color:s.color,text:s.text,found:!1}})},entryStrips.set(e,n)}for(const t of n.chips){const l=o.has(t.text);l!==t.found&&(t.found=l,e.world.set(t.face,{color:toColor(l?"rgba(90,90,90,0.45)":t.color)}),e.world.set(t.strike,{color:[1,1,1,l?.85:0]}),l&&e.world.animate(t.root,[{scale:1.18},{scale:1}],{duration:.3}))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{c as _0x25c92b}from"react/compiler-runtime";import _0x21a571,{useCallback,useEffect,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{GameView,isEngineAvailable,World}from"@nayan-ui/engine";import{useGameTheme}from"../../helpers/GameTheme.js";import{BACKDROP_LIGHT,backdropMesh}from"./EngineBackdrop.js";import{toRgb}from"./EngineUtils.js";import{useGameResource}from"./useGameResource.js";import{jsx as _0x540a8d}from"react/jsx-runtime";const CardScene=_0x21a571.memo(e=>{const t=_0x25c92b(28),{width:o,height:r}=e,a=useGameTheme();let s;t[0]!==a?(s=()=>{const e=new World(4),t=e.spawn({mesh:backdropMesh(a),color:[1,1,1,1],pickable:!1});return{world:e,backdrop:t}},t[0]=a,t[1]=s):s=t[1];const n=useGameResource(s,_temp);let l,i;t[2]!==n.backdrop||t[3]!==n.world||t[4]!==a?(l=()=>{n.world.set(n.backdrop,{mesh:backdropMesh(a)})},t[2]=n.backdrop,t[3]=n.world,t[4]=a,t[5]=l):l=t[5],t[6]!==n||t[7]!==a?(i=[n,a],t[6]=n,t[7]=a,t[8]=i):i=t[8],useEffect(l,i);const d=o/2,m=-r/2;let h;t[9]!==d||t[10]!==m?(h=[d,m,100],t[9]=d,t[10]=m,t[11]=h):h=t[11];const p=o/2,u=-r/2;let w;t[12]!==p||t[13]!==u?(w=[p,u,0],t[12]=p,t[13]=u,t[14]=w):w=t[14];const b=r/2;let g;t[15]!==b||t[16]!==h||t[17]!==w?(g={eye:h,target:w,fov:1,ortho:b},t[15]=b,t[16]=h,t[17]=w,t[18]=g):g=t[18];const C=g;let G;t[19]!==a.BACKGROUND?(G=toRgb(a.BACKGROUND),t[19]=a.BACKGROUND,t[20]=G):G=t[20];const f=G;let _;t[21]!==n.world?(_=e=>n.world.update(e),t[21]=n.world,t[22]=_):_=t[22];const k=_;let x;return t[23]!==f||t[24]!==C||t[25]!==k||t[26]!==n.world?(x=_0x540a8d(GameView,{source:n.world,camera:C,light:BACKDROP_LIGHT,background:f,onUpdate:k}),t[23]=f,t[24]=C,t[25]=k,t[26]=n.world,t[27]=x):x=t[27],x});CardScene.displayName="CardScene";export const BackdropCard=_0x21a571.memo(()=>{const e=_0x25c92b(8),t=useGameTheme(),[o,r]=useState(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{const{width:t,height:o}=e.nativeEvent.layout;r(e=>e&&e.width===t&&e.height===o?e:{width:t,height:o})},e[0]=a):a=e[0];const s=a;let n,l,i;return e[1]!==t.BACKGROUND?(n=[StyleSheet.absoluteFill,styles.passThrough,{backgroundColor:t.BACKGROUND}],e[1]=t.BACKGROUND,e[2]=n):n=e[2],e[3]!==o?(l=isEngineAvailable&&o&&o.width>0&&o.height>0?_0x540a8d(CardScene,{width:o.width,height:o.height}):null,e[3]=o,e[4]=l):l=e[4],e[5]!==n||e[6]!==l?(i=_0x540a8d(View,{style:n,onLayout:s,children:l}),e[5]=n,e[6]=l,e[7]=i):i=e[7],i});BackdropCard.displayName="BackdropCard";const styles=StyleSheet.create({passThrough:{pointerEvents:"none"}});function _temp(e){return()=>e.world.dispose()}
|