@nayan-ui/games 1.19.0 → 1.21.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 +93 -73
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{block,ellipsoid,loft,merge,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x80e4cb}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{PERSON_COLORS}from"./CrossyRoadConstants.js";const part=(o,e,t)=>({geometry:o,position:e,color:t}),orb=(o,e,t,r=12)=>part(ellipsoid(o,void 0,r),e,t),pipe=(o,e,t,r=8)=>({geometry:tube(o,{radius:e,sides:r,smoothness:3}),color:t}),model=o=>_0x80e4cb(merge(o),{center:!1,shine:.08});let cached=null;export function pedestrianMeshes(){return cacheGameAsset("crossy-road/CrossyRoadPerson:pedestrianMeshes",()=>pedestrianMeshesUncached())}function pedestrianMeshesUncached(){if(cached)return cached;const o=toColor(PERSON_COLORS.SKIN),e=toColor(PERSON_COLORS.JACKET),t=toColor(PERSON_COLORS.PANTS),r=toColor(PERSON_COLORS.HAIR),s=toColor(PERSON_COLORS.SHOE),p=toColor(PERSON_COLORS.SOLE),i=toColor(PERSON_COLORS.BACKPACK),a=toColor(PERSON_COLORS.STRAP),n=[{geometry:loft([{z:.9,bottom:-.12,top:.13,width:.15,square:3},{z:1.05,bottom:-.135,top:.14,width:.165,square:3},{z:1.32,bottom:-.14,top:.15,width:.225,square:2.8},{z:1.43,bottom:-.105,top:.11,width:.2,square:2.6},{z:1.48,bottom:-.065,top:.07,width:.075,square:2.4}],{around:16,smoothness:2}),color:e},orb([.16,.135,.12],[0,0,.86],t),pipe([[0,0,1.46],[0,0,1.57]],.052,o),orb([.106,.105,.135],[0,.005,1.65],o,16),orb([.027,.033,.031],[0,.11,1.642],o),orb([.111,.108,.067],[0,-.012,1.75],r,16),orb([.103,.052,.09],[0,-.075,1.685],r),{geometry:loft([{z:1.02,bottom:-.23,top:-.115,width:.13,square:4},{z:1.08,bottom:-.27,top:-.12,width:.15,square:4},{z:1.35,bottom:-.265,top:-.115,width:.145,square:4},{z:1.41,bottom:-.2,top:-.11,width:.1,square:3}],{around:12,smoothness:2}),color:i},part(block(.21,.028,.11),[0,-.269,1.14],a),pipe([[-.09,-.278,1.28],[.09,-.278,1.28]],.008,p,6),pipe([[0,.145,1.02],[0,.155,1.33],[0,.08,1.45]],.007,a,6),pipe([[-.02,.107,1.605],[0,.113,1.6],[.02,.107,1.605]],.004,toColor("#8D5044"),6)];for(const e of[-1,1])n.push(orb([.019,.02,.035],[.108*e,-.002,1.65],o)),n.push(orb([.023,.013,.015],[.047*e,.099,1.682],p,8)),n.push(orb([.01,.009,.01],[.047*e,.111,1.681],toColor("#293341"),8)),n.push(pipe([[.026*e,.099,1.709],[.065*e,.094,1.71]],.006,r,6)),n.push(pipe([[.13*e,-.16,1.38],[.16*e,.02,1.44],[.13*e,.152,1.25],[.13*e,.14,1.03]],.019,a));const d=model([pipe([[0,0,0],[0,.01,-.15],[0,.04,-.28]],.071,e),pipe([[0,.04,-.27],[0,.07,-.38],[0,.085,-.49]],.042,o),orb([.038,.044,.062],[0,.085,-.49],o)]),h=model([pipe([[0,0,0],[0,.025,-.33],[0,-.01,-.72]],.072,t),orb([.073,.075,.08],[0,.025,-.33],t)]),l=model([orb([.068,.14,.063],[0,.075,-.06],s),part(block(.14,.275,.025),[0,.075,-.115],p),pipe([[-.04,.09,-.005],[.04,.09,-.005]],.008,p,6),pipe([[-.04,.13,-.01],[.04,.13,-.01]],.008,p,6)]);return cached={torso:model(n),arm:d,leg:h,shoe:l},cached}export function*warmAssets(){yield pedestrianMeshes}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{CAR_SPEED_MAX,CAR_SPEED_MIN,COLORS,COLS,colX,GOAL_ROW,LANE_TYPES,speedScale}from"./CrossyRoadConstants.js";const rnd=(o,t)=>o+Math.random()*(t-o);export function buildTraffic(o,t=0){const r=[];let e=t,n=[],s=-1;const a=()=>{if(!n.length){n=COLORS.CAR_COLORS.map((o,t)=>t);for(let o=n.length-1;o>0;o--){const t=Math.floor(Math.random()*(o+1));[n[o],n[t]]=[n[t],n[o]]}n[n.length-1]===s&&([n[0],n[n.length-1]]=[n[n.length-1],n[0]])}return s=n.pop(),s};return LANE_TYPES.forEach((t,n)=>{if("road"!==t)return;const s=Math.random()<.5?1:-1,d=Math.random()<.35,i=d?"bus":["compact","taxi","pickup"][Math.floor(3*Math.random())],l=rnd(CAR_SPEED_MIN,CAR_SPEED_MAX)*(d?.8:1)*s,h=(d?1:2)+(Math.random()<.3?1:0),p=o.tile*{compact:1.4,taxi:1.5,pickup:1.7,bus:2.4}[i],O=o.width/h+p,f=rnd(0,O);for(let o=0;o<h;o++)r.push({id:e++,row:n,x:-p+f+o*O,width:p,speed:l,colorIndex:a(),style:i})}),r}export function moveTraffic(o,t,r){const e=2*o.tile;for(const n of t){let t=n.x+n.speed*r;const s=n.width+e;n.speed>0&&t-n.width/2>o.width+s?t=-s-n.width/2:n.speed<0&&t+n.width/2<-s&&(t=o.width+s+n.width/2),n.x=t}}export function hit(o,t,r,e){const n=.4*o.tile*.65;return t.some(t=>Math.abs(t.row-r)*o.laneH<.53*o.tile&&Math.abs(t.x-e)<t.width/2+n)}export const startPlayer=()=>({row:0,col:Math.floor(COLS/2),maxRow:0,crossings:0});const NO_HOP={moved:!1,crossed:!1,goal:!1};export function hopForward(o){const t=o.row,r=Math.min(t+1,GOAL_ROW);if(r===t)return NO_HOP;o.row=r;let e=!1;return r>o.maxRow&&(o.maxRow=r,"road"===LANE_TYPES[t]&&(o.crossings++,e=!0)),{moved:!0,crossed:e,goal:r===GOAL_ROW}}export function hopBack(o){return o.row<=0?NO_HOP:(o.row-=1,{moved:!0,crossed:!1,goal:!1})}export function hopSide(o,t){const r=o.col+t;return r<0||r>=COLS?NO_HOP:(o.col=r,{moved:!0,crossed:!1,goal:!1})}export const playerX=(o,t)=>colX(o,t.col);export const scaleFor=o=>speedScale(o.crossings);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,quat}from"@nayan-ui/engine";import{toColor}from"../shared/EngineUtils.js";import{COLORS,COLS,colX,LANE_TYPES,MOVE_TIME,PERSON,TOTAL_LANES,WORLD_SCALE}from"./CrossyRoadConstants.js";import{pedestrianMeshes}from"./CrossyRoadPerson.js";const GROUND_DEPTH=8,ROAD_DROP=1.6,FACE_RIGHT=[0,0,0,1],FACE_LEFT=quat.z(Math.PI),STAND_UP=quat.x(Math.PI/2),k=WORLD_SCALE,world3=e=>[e[0]*k,e[1]*k,e[2]*k],seeded=e=>{const o=43758.5453*Math.sin(127.1*e+311.7);return o-Math.floor(o)},shade=(e,o,t=1)=>{const[s,a,i,n]=toColor(e);return[s*t,a*t,i*t,n??1]};export const laneY=(e,o)=>(o-(TOTAL_LANES-1)/2)*e.laneH;export const laneTop=e=>"road"===LANE_TYPES[Math.round(e)]?-1.6:0;export const worldX=(e,o)=>o-e.width/2;function spawnGround(e,o,t,s,a){const i=[],n=o=>i.push(e.spawn({pickable:!1,parent:a,...o})),l=2*Math.ceil((o.width+12*o.tile)/o.tile/2),r=l*o.tile,p=TOTAL_LANES*o.laneH;n({mesh:"cube",position:[0,0,-6.2],scale:[3*r,4*p,8],color:shade(COLORS.GRASS_DARK,0,.9)});const d=e=>-r/2+e*o.tile+o.tile/2;for(let e=0;e<TOTAL_LANES;e++){const a=laneY(o,e);if("road"===LANE_TYPES[e]){for(let t=0;t<l;t+=2)n({mesh:"cube",position:[d(t)+o.tile/2,a,-5.6],scale:[2*o.tile+.2,o.laneH,8],color:shade(COLORS.ROAD,0,.96+.06*seeded(3.1*e+t))});for(const e of[-1,1])n({mesh:"cube",position:[0,a+e*(o.laneH/2-3),-1.55],scale:[r,1.6,.1],color:shade(COLORS.LINE,0,.9)});for(let e=0;e<l;e++)n({mesh:"cube",position:[d(e),a,-1.54],scale:[.45*o.tile,1.8,.12],color:shade(COLORS.LINE,0,.85)});for(const t of[-1,1])"grass"===LANE_TYPES[e+t]&&n({mesh:"cube",position:[0,a+t*(o.laneH/2-.4),(.9-1.6)/2],scale:[r,3.6,2.5],color:shade(COLORS.CURB)});continue}const i=e%2==0?COLORS.GRASS_LIGHT:COLORS.GRASS_DARK;for(let t=0;t<l;t+=2)n({mesh:"cube",position:[d(t)+o.tile/2,a,-4],scale:[2*o.tile+.2,o.laneH,8],color:shade(i,0,.95+.12*seeded(7.7*e+1.3*t))});for(let e=0;e<COLS;e++)n({mesh:"cube",position:[worldX(o,colX(o,e)),a,.08],scale:[.42*o.tile,.34*o.laneH,.16],color:shade("#C8DF99",0,.94)});if(e===TOTAL_LANES-1)for(let e=0;e<2*COLS;e++)for(let t=0;t<2;t++)n({mesh:"cube",position:[-o.gridW/2+(e+.5)*o.tile/2,a-.36*o.laneH+t*o.laneH*.12,.15],scale:[o.tile/2,.12*o.laneH,.2],color:shade((e+t)%2?"#F8F6E9":"#34434A")});for(const e of[-1,1]){const t=e*(o.gridW/2+.85*o.tile),i=.075*o.tile;n({mesh:"cube",position:[t,a,.65*o.tile],scale:[i,i,1.3*o.tile],color:shade("#56676A")}),n({mesh:"cube",position:[t,a,1.33*o.tile],scale:[.26*o.tile,.26*o.tile,.13*o.tile],color:s?[2,1.65,.9,1]:[.98,.92,.71,1]}),n({mesh:"cube",position:[t,a,1.44*o.tile],scale:[.34*o.tile,.34*o.tile,.08*o.tile],color:shade("#45565A")})}for(let s=0;s<l;s++){const i=d(s);if(Math.abs(i)>o.gridW/2+.2*o.tile&&seeded(5.3*e+1.7*s)>.4){const l=seeded(2.9*e+4.1*s),r=(seeded(3*s+e)-.5)*o.tile*.3,p=(seeded(5*e+s)-.5)*o.laneH*.3;n(l<.7?{mesh:t.tree,position:[i+r,a+p,0],rotation:quat.z(seeded(s+9*e)*Math.PI/2),scale:o.tile*(.95+.45*seeded(e+2.1*s)),color:shade("#FFFFFF",0,.9+.15*seeded(s+e))}:l<.88?{mesh:t.bush,position:[i+r,a+p,0],scale:.85*o.tile,color:shade(COLORS.BUSH)}:{mesh:t.rock,position:[i+r,a+p,0],rotation:quat.z(3*seeded(e+7*s)),scale:[.7*o.tile,.5*o.tile,.75*o.tile],color:shade(COLORS.ROCK,0,.85+.2*seeded(5*s+e))});continue}if(seeded(13.1*e+3.7*s)>.62){const t=.14*o.tile;n({mesh:"cone",position:[i+(seeded(2*s+e)-.5)*o.tile*.3,a+(seeded(e+s)-.5)*o.laneH*.5,t/2],rotation:STAND_UP,scale:[t,t,t],color:shade(COLORS.GRASS_TUFT)})}if(seeded(7.3*e+9.1*s+5)>.9){const t=COLORS.FLOWERS[Math.floor(seeded(e+2*s)*COLORS.FLOWERS.length)],l=i+(seeded(e+3*s)-.5)*o.tile*.2,r=a+(seeded(2*e+s)-.5)*o.laneH*.5;n({mesh:"sphere",position:[l,r,1.5],scale:4.6,color:shade(t)}),n({mesh:"sphere",position:[l,r,2.6],scale:2.4,color:shade("#FFD93D")})}}}return i}function spawnVehicle(e,o,t,s,a,i){const n=e.spawn({mesh:"none",parent:i,rotation:s.speed>=0?FACE_RIGHT:FACE_LEFT,scale:[s.width,.66*o.tile,o.tile],pickable:!1}),l=t.vehicles[s.style],r=toColor(COLORS.CAR_COLORS[s.colorIndex]??COLORS.CAR_COLORS[0]);return e.spawn({mesh:l.body,parent:n,color:r,pickable:!1}),e.spawn({mesh:l.details,parent:n,pickable:!1}),e.spawn({mesh:l.lights,parent:n,color:a?[1.8,1.8,1.8,1]:[1,1,1,1],pickable:!1}),n}export function placeVehicles(e,o,t,s){const a=e.transforms;for(const e of s){const s=t.vehicles.get(e.id);null!=s&&a.position(s,worldX(o,e.x),laneY(o,e.row),laneTop(e.row))}a.flush()}function spawnPlayer(e,o,t){const s=e.spawn({mesh:"none",parent:t,pickable:!1}),a=e.spawn({mesh:"none",parent:s,pickable:!1}),i=e.spawn({mesh:"none",parent:a,scale:o.tile*PERSON.SCALE,pickable:!1}),n=pedestrianMeshes();e.spawn({mesh:n.torso,parent:i,pickable:!1});const l=[-1,1].map(o=>e.spawn({mesh:n.arm,parent:i,position:[.235*o,0,1.4],pickable:!1})),r=[-1,1].map(o=>e.spawn({mesh:n.leg,parent:i,position:[.105*o,0,.87],pickable:!1})),p=r.map(o=>e.spawn({mesh:n.shoe,parent:o,position:[0,-.01,-.72],pickable:!1}));return{root:s,body:a,arms:l,legs:r,feet:p}}function restLimbs(e,o){for(const t of[...o.arms,...o.legs,...o.feet])e.stopAnimation(t),e.set(t,{rotation:FACE_RIGHT});o.legs.forEach((o,t)=>e.set(o,{position:[.105*(0===t?-1:1),0,.87]}))}export function placePlayer(e,o,t,s,a){e.stopAnimation(t.player.root),e.stopAnimation(t.player.body),restLimbs(e,t.player),e.set(t.player.root,{position:[worldX(o,colX(o,a)),laneY(o,s),laneTop(s)],rotation:FACE_RIGHT}),e.set(t.player.body,{scale:1,rotation:[0,0,0,1],position:[0,0,0]})}export function hop(e,o,t,s,a,i){const n=[worldX(o,colX(o,s[1])),laneY(o,s[0]),laneTop(s[0])],l=[worldX(o,colX(o,a[1])),laneY(o,a[0]),laneTop(a[0])],r={up:0,down:Math.PI,left:Math.PI/2,right:-Math.PI/2}[i];e.stopAnimation(t.player.root),e.set(t.player.root,{position:n,rotation:quat.z(r)}),e.animate(t.player.root,{position:l},{duration:MOVE_TIME,easing:"linear"});const p={duration:MOVE_TIME,easing:"linear"};t.player.legs.forEach((o,s)=>{const a=PERSON.STRIDE*(0===s?1:-1),i=.105*(0===s?-1:1),n=[i,0,.87];e.animate(o,[{rotation:quat.x(a),position:[i,0,.87+(a>0?.12:0)],at:.25},{rotation:FACE_RIGHT,position:n,at:.5},{rotation:quat.x(-a),position:[i,0,.87+(a<0?.12:0)],at:.75},{rotation:FACE_RIGHT,position:n}],p),e.animate(t.player.feet[s],[{rotation:quat.x(-a),at:.25},{rotation:FACE_RIGHT,at:.5},{rotation:quat.x(a),at:.75},{rotation:FACE_RIGHT}],p)}),t.player.arms.forEach((o,t)=>{const s=-PERSON.STRIDE*(0===t?1:-1)*.8;e.animate(o,[{rotation:quat.x(s),at:.25},{rotation:FACE_RIGHT,at:.5},{rotation:quat.x(-s),at:.75},{rotation:FACE_RIGHT}],p)});const d=.72*(1-Math.cos(PERSON.STRIDE))*o.tile*PERSON.SCALE;e.animate(t.player.body,[{position:[0,0,-d],at:.25},{position:[0,0,0],at:.5},{position:[0,0,-d],at:.75},{position:[0,0,0]}],p)}export function stumble(e,o,t,s,a){restLimbs(e,t.player),e.animate(t.player.body,{rotation:quat.x(1.25),position:[0,0,.05*o.tile]},{duration:.24,easing:"easeOut"}),effects.shatter(e,{position:world3([worldX(o,colX(o,a)),laneY(o,s),laneTop(s)+.3*o.tile]),count:10,size:.08*o.tile*k,speed:3*o.tile*k,lifetime:.6,gravity:6*-o.tile*k,colors:[toColor(COLORS.ROAD_LINE),toColor(COLORS.CURB)]})}export function celebrate(e,o,t,s,a){const i=[worldX(o,colX(o,a)),laneY(o,s),laneTop(s)];restLimbs(e,t.player),e.animate(t.player.arms[0],[{rotation:quat.x(-2.5),at:.3},{rotation:quat.x(-2),at:.65},{rotation:FACE_RIGHT}],{duration:.96}),e.set(t.player.root,{position:i}),e.set(t.player.body,{position:[0,0,0]}),effects.confetti(e,{position:world3([i[0],i[1],o.tile]),count:50,size:.12*o.tile*k,speed:6*o.tile*k,lifetime:1.2,gravity:10*-o.tile*k,colors:COLORS.CAR_COLORS.slice(0,4).map(e=>toColor(e))})}export function buildScene(e,o,t,s,a){const i=e.spawn({mesh:"none",scale:k,pickable:!1}),n={root:i,ground:spawnGround(e,o,t,s,i),vehicles:new Map,player:spawnPlayer(e,o,i),night:s};return setTraffic(e,o,t,n,a),n}export function setTraffic(e,o,t,s,a){for(const o of s.vehicles.values())e.despawn(o);s.vehicles.clear();for(const i of a)s.vehicles.set(i.id,spawnVehicle(e,o,t,i,s.night,s.root));placeVehicles(e,o,s,a)}export function removeScene(e,o){e.despawn(o.root)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0xed0ac2=_0x49cb;!function(){const e=_0x49cb,t=_0x325b();for(;;)try{if(284180==-parseInt(e(530,"judb"))/1*(parseInt(e(559,"s&X5"))/2)+-parseInt(e(504,"]E&V"))/3*(parseInt(e(487,"46cK"))/4)+parseInt(e(502,"CO4f"))/5+parseInt(e(509,"m4P^"))/6*(-parseInt(e(549,"bv^I"))/7)+-parseInt(e(501,"elcb"))/8*(parseInt(e(527,"UTWq"))/9)+parseInt(e(498,"q45^"))/10*(-parseInt(e(538,"hjrF"))/11)+parseInt(e(535,"s&X5"))/12)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{c as _0x172ace}from"react/compiler-runtime";import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x2f88c4,{useEffect,useRef,useCallback,useMemo,useState}from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useDinoJumpStore,useIsPlaying,useIsGameOver,useIsWin}from"./DinoJumpStore.js";import{GameBackground}from"./components/GameBackground.js";import{GameArea}from"./components/GameArea.js";import{ScoreBoard}from"./components/ScoreBoard.js";function _0x325b(){const e=["hmkEuKeJ","xmosua","zeRdMSonFq","h2FcSG","rmkHbSkFAejrW7e","xtzhW7CM","zmoLzItcHCk/W7NcVCoybXBcOG","W7qfW77cUmobECkOW4JdIG","gSkIFLSWW5KdWRK","W5eiC8opW6roW4FdQq","WP49ASoPlW","lCosWPRcLZDjWRnJAW","WRldUCoitGRdPSkRW6jMpCkFW4T/W4S","uSkDWQuPW4fDWPRcPSowBCkR","W4KGWR8","WRTMC13cTq","W5hdMxXmwG","W5dcM8kzq8k8vJiaW6jFW4K","W5ldRCoCbCoDAGu","WOJdG8oGAdC","W64nhYldOr9eW4DiyCkm","W5yKWQ5OwmkrqCkcdSoKhWRcUCk6ACoYqmkOWPhcGCoJlmorw0C","W6NdQSk7zCkz","WPxcJSkxDmkPh13dTrC","zmkGpSouWR51W6KZ","kf5ZWPeJiWxcH8o8fCoRWOJcPSoa","sWldPmo7rCoSEq","fCoIb8k+EwfD","d8knfexcJG97e8k+","rZ3dM8kFga","sgnXfHFcPG","W5qxWOtdO8ofWOy6WPi","A8kNW49f","WPdcGSkk","WRFcO2VcHCoL","W5OraIxdHW","umo1WR7cT8k0","WOhcH8kbAq","WPnQg8oYe8okWQHJxY7cN8oiaW","dxCrWOHhaMD0WO3cGL4","tcjwW4SzpNfW","EqPfnYRdJXO","tdndW40ef3DUWQe","WRmLW6OwW50","kSouWOFcKZPbWQriEmoWW5W","WPpcHmk3zCkVmvldVW","qb/dQmkMpSovW5qtaq","WONcN3ZdTwtcVNPIW4pdQ2OMqG","WOGlsmozoCks","kfO3W7PVx0JdLq","sHNdISk4oSocW4K","AmkdW7fRW6G","W7hdSSo8WQ/dMSkr","cCobW4j3WPn9WPK","jhJcL8kUWP99E8oaWPfIWQRcPLJcLexdVsfdWQb8W6mMW5VdUq4","AH8Dxer2ia","W5VdNtNcTtpdPJO","bWdcQ0bG","uuldM8oku8kqBga","shDTbXFcPmoe","W5C4uCo1emoJWOvHsq","W5ldM8osDCkAh0RdQXe","a3/cPCo2WRa","wMn1WOZdHdH0jYJcPYLjW6CEAmogBmk5oCoO","nwJcHmk/WO49yG","WO9KgSoJ","gmkXp3ldLCo1W7NcUSoVjHZcMsy","bX/cMCkTxSksENv3W7W","W5/dJt/cLcldQtPj","W6ddH2r6rW","Bw7cGmk9BmkCCvqVv8kSWO8","W5C9W4VdRY4gEa","jhJcHCkOWP8uD8oiWPK","WPxdHMxcKue0","WRLqrwdcSYrmW5bY","W4ldRCkCn8kXqxC","W7PdFtZdVW","FwvQWPddGsPKbIFcIca","D8kQgCoZWRH9W7mX","hSkYEhOHW5yd","lmoCWOldSrRcI8k+AKu4BNpdIbWNdCkyCLFdTxRdJCo3cre","kSowW7fnW5xcTZy","bvldJCkG","W7JdNCkLzmkIFCo0W67dL8kaWQVcRSkwWQiEq8oHgJNcKa","WRHErxRcTZ9JW5e","W5VdIsxcPdpdPa","hqJcQuju","F8ouWPdcK8kehsBdTa","ne3cHmonWP1J","WP/cRuxcKCo2W7tdKCo3","emomW7yFW5JcSdBcMaXJWO3cP8oXk8kHW6BcNbPPWQK","ENLRWPldIcvP","WOf7WOFdHCkSbCojW4VdQHboWPre","cCo8WRNcPNzVWOTdsW","aCokW6vmWOzUWOJcSq","W6VdOCkqqSkZ","WOJcHCkNFSkWkfddVqBdPa","B8odW5q","W6RcOSkqdfBdKCk3W75rdSko","DSkvzctdVSk3W50","EGKaxeq","WQlcK8kwsmks","vgRcKCoBW63dTHXNWRpcKSkQWQhdJq","W5BdMSoqkmoKAfNdUWFdJmkNFG","W5uyDCoUW7vbW4C","WOVdLhVcU2FdThPqWOe","WQpcPCkMW7tdKCkbWR3dSq3cKa","vmkAWQyUW4C4W4ZcJSoTtSk3sSkT","EMn1WOZdHdH0jYJcPYLjW6CEAa","W4hcOwZdQ3Xsma","tg/dRr0SW4Tyix48W6m9rG","WQxdP8oMoSowsHC4W78","W5qwWONdOmoHWPu+WPvs","fmk0wMqLW4eEWRlcRW","WR0tkJ3dSfdcJG7cQG"];return(_0x325b=function(){return e})()}import{GameControlButton,GameOverModal,ParticleBlast}from"../../helpers/index.js";import{GameSettingsModal}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{jsx as _0xd77af0,Fragment as _0x17b85f,jsxs as _0x19683f}from"react/jsx-runtime";const BLAST_COLORS=[_0xed0ac2(536,"VJXr"),"#7A6B54","#8B7D66",_0xed0ac2(494,"9EN5"),_0xed0ac2(470,"UTWq")],MemoizedBlast=_0x2f88c4[_0xed0ac2(477,"VJXr")](e=>{const t=_0xed0ac2,o={yZqly:t(540,"Ymy["),OkZGg:function(e,t){return e(t)},bKmcN:function(e,t){return e!==t},uWLSs:t(561,"cGrw"),zwerx:function(e,t,o){return e(t,o)}},n=o[t(544,"jve9")](_0x172ace,7),{blast:r,onComplete:s}=e;let a;if(o.bKmcN(n[0],r.id)||n[1]!==s)a=()=>{s(r.id)},n[0]=r.id,n[1]=s,n[2]=a;else if(t(515,"bv^I")===o[t(520,"W5ds")]){const e=_0x58ded1.getState();e[t(556,"b33a")]&&!_0x317dd4.current&&_0x1e9e22(o[t(567,"@vAx")],e[t(495,"j9iM")]),_0x282571[t(489,"CO4f")]().resetGame()}else a=n[2];const W=a;let d;if(n[3]!==r.x||n[4]!==r.y||n[5]!==W){const e=t(500,"9ATE")[t(545,"Gv@T")]("|");let s=0;for(;;){switch(e[s++]){case"0":n[3]=r.x;continue;case"1":n[4]=r.y;continue;case"2":n[6]=d;continue;case"3":const e={};e.x=r.x,e.y=r.y,e[t(548,"[NvB")]=5,e[t(562,"elcb")]=BLAST_COLORS,e.duration=400,e[t(491,"q45^")]=W,d=o[t(572,"G@@w")](_0xd77af0,ParticleBlast,e);continue;case"4":n[5]=W;continue}break}}else d=n[6];return d});MemoizedBlast.displayName=_0xed0ac2(576,"9EN5");const CollisionBlastsLayer=_0x2f88c4[_0xed0ac2(542,"Dt^G")](()=>{const e=_0xed0ac2,t={};t[e(510,"*0$e")]=function(e,t){return e===t};const o=t,n=_0x172ace(8);let r;n[0]===Symbol[e(492,"i9]0")](e(531,"MtOP"))?(r=[],n[0]=r):r=n[0];const[s,a]=useState(r);let W,d;o[e(490,"rSiG")](n[1],Symbol[e(513,"G@@w")](e(564,"zICb")))?(W=()=>useDinoJumpStore[e(507,"r!*A")](_temp,e=>a(e)),d=[],n[1]=W,n[2]=d):(W=n[1],d=n[2]),useEffect(W,d);const u=_temp2;if(o[e(525,"judb")](s.length,0))return null;let i,m;if(n[3]!==s){let t;n[5]===Symbol[e(511,"hjrF")](e(475,"azi%"))?(t=e=>_0xd77af0(MemoizedBlast,{blast:e,onComplete:u},e.id),n[5]=t):t=n[5],i=s[e(524,"MtOP")](t),n[3]=s,n[4]=i}else i=n[4];if(n[6]!==i){const t={};t[e(482,"CM!L")]=i,m=_0xd77af0(_0x17b85f,t),n[6]=i,n[7]=m}else m=n[7];return m});CollisionBlastsLayer[_0xed0ac2(472,"#67K")]=_0xed0ac2(573,"#67K");export const DinoJump=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:n,onShare:r,onShareScreenshot:s,onShowLeaderboard:a,bannerAd:W})=>{const d=_0xed0ac2,u={oBXEf:d(526,"Xr$z"),RmuTZ:function(e,t,o){return e(t,o)},GOFiH:function(e,t,o){return e(t,o)},cRsnM:function(e,t,o){return e(t,o)},UGVzm:function(e,t,o){return e(t,o)},nQcUG:function(e){return e()},txuru:function(e,t){return e(t)},LqwKN:function(e,t,o){return e(t,o)},ExrYO:function(e,t,o){return e(t,o)},sVOQO:function(e,t,o){return e(t,o)}},i=useIsPlaying(),m=u[d(539,"b33a")](useIsGameOver),f=useIsWin(),S=useRef(!1),x=useRef(o);x[d(474,"*0$e")]=o;const l=e?.[d(583,"3JAN")]??0;u[d(481,"@vAx")](useEffect,()=>{useDinoJumpStore[d(518,"*0$e")]().setOffset(l)},[l]),useEffect(()=>{const e=d;return useDinoJumpStore[e(484,"jve9")]()[e(522,"](W[")](),()=>{const t=e;if("BHWgR"===u.oBXEf){const e=useDinoJumpStore.getState();e[t(508,"*0$e")]&&!S[t(551,"^o4y")]&&u[t(512,"Ptn(")](k,t(558,"W5ds"),e.score),useDinoJumpStore[t(519,"rxWd")]()[t(582,"zICb")]()}else _0x1b57bc[t(574,"zICb")]&&!_0x4146f5[t(569,"Ymy[")]&&(_0x1c0b32.current({status:_0x5c6b1e,score:_0x2efd7f[t(555,"q45^")]()}),_0x40db36[t(537,"D]4o")]=!0)}},[]);const k=useCallback((e,t)=>{const o=d;x.current&&!S[o(476,"kt@r")]&&(x[o(565,"j9iM")]({status:e,score:t[o(534,"U%o6")]()}),S.current=!0)},[]);useEffect(()=>{const e=d;if(m&&!S.current){const t=useDinoJumpStore.getState()[e(471,"m4P^")];u.GOFiH(k,f?e(543,"q45^"):e(575,"[NvB"),t)}!m&&(S[e(560,"b33a")]=!1)},[m,f]);const C=u.txuru(useRef,e);C[d(486,"#67K")]=e;const p=useCallback(()=>{const e=d;S[e(566,"9ATE")]=!1,useDinoJumpStore.getState()[e(552,"bv^I")](C[e(551,"^o4y")]),u[e(532,"rSiG")](playSound,GAME_SOUNDS[e(506,"UTWq")][e(529,"](W[")],C.current[e(580,"cu$F")]),u.UGVzm(playHaptic,HapticType[e(483,"G@@w")],C[e(499,"rxWd")].enableHaptics)},[]),b=u.LqwKN(useCallback,()=>{const e=d,t=useDinoJumpStore.getState()[e(553,"x(oP")];k(e(480,"9ATE"),t),useDinoJumpStore[e(568,"Ptn(")]()[e(541,"r!*A")]()},[k]),_=useCallback(()=>{const e=d;n?.(),S[e(565,"j9iM")]=!1,useDinoJumpStore[e(473,"U%o6")]()[e(533,"q45^")](),playHaptic(HapticType[e(546,"CM!L")],C[e(581,"lZt@")].enableHaptics)},[n]),O=useMemo(()=>({isPlaying:i,gameOver:m,onStartGame:p,onStopGame:b,onShare:r,onShowLeaderboard:a,startButtonSubtext:"Tap to jump over cacti!"}),[i,m,p,b,r,a]),G=useMemo(()=>m?useDinoJumpStore[d(578,"9ATE")]().score:0,[m]),P=useMemo(()=>({isVisible:m,score:G,onPlayAgain:_,buttonText:"Run Again!",title:f?d(497,"0J&]"):d(488,"FZnF"),message:f?"Great running!":d(485,"kt@r")}),[m,G,_,f]),R=useMemo(()=>({gameId:GAME_IDS[d(517,"46cK")],settings:e,onSettingsChange:t}),[e,t]),J={};J[d(550,"bv^I")]=e;const h={...O},q={...P};q[d(563,"CO4f")]=s,q[d(479,"judb")]=W;const H={...R};return _0xd77af0(GestureHandlerRootView,{style:styles[d(584,"judb")],children:_0x19683f(GameBackground,{offset:l,children:[u[d(496,"q45^")](_0xd77af0,GameArea,J),_0xd77af0(CollisionBlastsLayer,{}),_0xd77af0(ScoreBoard,{offset:l}),_0xd77af0(GameControlButton,h),u[d(579,"Xr$z")](_0xd77af0,GameOverModal,q),_0xd77af0(GameSettingsModal,H)]})})};const _0x46bff0={};_0x46bff0[_0xed0ac2(547,"q45^")]=1,_0x46bff0.backgroundColor=BACKGROUND_COLOR;const _0x52663d={};_0x52663d[_0xed0ac2(521,"FZnF")]=_0x46bff0;const styles=StyleSheet.create(_0x52663d);function _0x49cb(e,t){e-=470;const o=_0x325b();let n=o[e];if(void 0===_0x49cb.mZwtck){const e=function(e,t){let o,n,r=[],s=0,a="";for(e=function(e){let t="",o="";for(let o,n,r=0,s=0;n=e.charAt(s++);~n&&(o=r%4?64*o+n:n,r++%4)?t+=String.fromCharCode(255&o>>(-2*r&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(let e=0,n=t.length;e<n;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),n=0;n<256;n++)r[n]=n;for(n=0;n<256;n++)s=(s+r[n]+t.charCodeAt(n%t.length))%256,o=r[n],r[n]=r[s],r[s]=o;n=0,s=0;for(let t=0;t<e.length;t++)n=(n+1)%256,s=(s+r[n])%256,o=r[n],r[n]=r[s],r[s]=o,a+=String.fromCharCode(e.charCodeAt(t)^r[(r[n]+r[s])%256]);return a};_0x49cb.HdsHvR=e,_0x49cb.tSaLsK={},_0x49cb.mZwtck=!0}const r=o[0];_0x49cb.bqnWDS!==r&&(_0x49cb.tSaLsK={},_0x49cb.bqnWDS=r);const s=_0x49cb.tSaLsK[e];return void 0===s?(void 0===_0x49cb.YeIIPU&&(_0x49cb.YeIIPU=!0),n=_0x49cb.HdsHvR(n,t),_0x49cb.tSaLsK[e]=n):n=s,n}function _temp(e){return e[_0xed0ac2(503,"#67K")]}function _temp2(e){const t=_0xed0ac2;useDinoJumpStore.getState()[t(478,"rSiG")](e)}DinoJump[_0xed0ac2(554,"FZnF")]="DinoJump";
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,timerColumn}from"../shared/EngineHud.js";import{backgroundFor,lightFor}from"../shared/EngineMeadow.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIVES,TIME_LIMIT}from"./DinoJumpConstants.js";import{createGame,dispose,jump,reset,setLayout,setTheme,start,tick}from"./DinoJumpGame.js";import{jsx as _0x48fa00}from"react/jsx-runtime";const SFX=GAME_SOUNDS.DINO_JUMP,formatScore=e=>e.toLocaleString();export const DinoJump=engineGame(GAME_IDS.DINO_JUMP,e=>{const[t,r]=useLiveState(0),[o,s]=useLiveState(LIVES),[i,a]=useLiveState(TIME_LIMIT),{theme:n,status:m,screen:u,gameOver:S}=useEngineGame(e,{gameId:GAME_IDS.DINO_JUMP,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,o)=>setLayout(e,getLayout(t,r,o)),drag:(e,{phase:t})=>{"start"===t&&jump(e)},sounds:SFX,onStart:e=>e(SFX.START,HapticType.MEDIUM),onPlayAgain:e=>e(null,HapticType.LIGHT),onOver:(e,t)=>e("win"===t?SFX.WIN:SFX.GAME_OVER,"win"===t?HapticType.SUCCESS:HapticType.ERROR),wire:(e,t)=>{e.onScore=r,e.onLives=s,e.onTime=a,e.onJump=()=>t(SFX.JUMP,HapticType.LIGHT),e.onCollect=()=>t(SFX.COLLECT,HapticType.SUCCESS),e.onHit=()=>t(SFX.HIT,HapticType.HEAVY)}}),p=useMemo(()=>lightFor(n),[n]),E=useMemo(()=>backgroundFor(n),[n]);return _0x48fa00(EngineGameScreen,{...u,light:p,background:E,columns:[scoreColumn(t,"SCORE",formatScore),livesColumn(o,LIVES),timerColumn(i,n)],subtext:"Jump over the cacti!",gameOver:S({title:"win"===m?"YOU SURVIVED!":"GAME OVER",message:"win"===m?"Great running!":"You hit an obstacle!",scoreLabel:"Final Score",score:t,buttonText:"Run Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";export const TIME_LIMIT=120;export const LIVES=3;export const POINTS_PER_SECOND=200;export const MUSHROOM_POINTS=1e3;export const OBSTACLE_SIZE={cactus_small:{width:35,height:65},cactus_large:{width:45,height:85},mushroom:{width:45,height:65}};export const MUSHROOM_CHANCE=.05;export const SMALL_CHANCE=.5;export const STEP=1/60;export const STEP_TOLERANCE=.002;export const MAX_PENDING=.05;export const GRAVITY=1.4;export const JUMP_FORCE=-28;export const RUN_SPEED=6;export const DINO_X=50;export const DINO_WIDTH=70;export const DINO_HEIGHT=75;export const DINO_HIT_WIDTH=50;export const DINO_HIT_HEIGHT=60;export const MAX_OBSTACLES=5;export const MIN_OBSTACLE_GAP=300;export const REMOVE_X=-100;export const FIRST_OBSTACLE=1.5;export const SPAWN_MIN=2.5;export const SPAWN_SPREAD=2;export const STRIDE_TIME=.16;export const DUST_INTERVAL=.24;const FOV=.9,HORIZON=.6,PLAY_DEPTH=9;export const groundLine=(t,o)=>t-(o>0?150:250);export function rigFor(t,o){const e=Math.tan(.45),n=Math.atan(2*(.6-.5)*e),r=18*e/t;return{eyeHeight:-9*Math.sin(n)-(t/2-groundLine(t,o))*r*Math.cos(n),horizon:.6,playDepth:9}}export const MEADOW={biome:"desert",near:!1,sun:[.8,.22],clouds:[.1,.42]};export const TILE=80;export const getLayout=(t,o,e)=>({width:t,height:o,offset:e,groundY:groundLine(o,e)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{at,cameraFor,makeView,pointSize,sceneryTint,spawnWorld}from"../shared/EngineMeadow.js";import{DINO_HIT_HEIGHT,DINO_HIT_WIDTH,DINO_X,DUST_INTERVAL,FIRST_OBSTACLE,GRAVITY,JUMP_FORCE,LIVES,MAX_OBSTACLES,MAX_PENDING,MEADOW,MIN_OBSTACLE_GAP,MUSHROOM_CHANCE,MUSHROOM_POINTS,OBSTACLE_SIZE,POINTS_PER_SECOND,REMOVE_X,rigFor,RUN_SPEED,SMALL_CHANCE,SPAWN_MIN,SPAWN_SPREAD,STEP,STEP_TOLERANCE,TIME_LIMIT}from"./DinoJumpConstants.js";import{cheerDino,dinoCentre,dust,hitBurst,hurtDino,placeDesert,placeDino,placeObstacle,removeDesert,setGait,spawnDesert,spawnDino,spawnObstacle}from"./DinoJumpScene.js";const WORLD_CAPACITY=900;export function createGame(e){const o=new World(900),n={world:o,camera:{eye:[0,1,0],target:[0,1,-1],fov:.9},theme:e,tint:sceneryTint(e),layout:null,view:null,scenery:[],desert:null,dino:null,phase:"ready",get score(){return o.scoreboard.score},get lives(){return o.scoreboard.lives},get timeLeft(){return o.scoreboard.shownSeconds},won:!1,time:0,pending:0,jumpY:0,velocity:0,jumping:!1,scroll:0,dustTimer:0,obstacles:[],onPhase:e=>{},onScore:e=>{},onLives:e=>{},onTime:e=>{},onJump:()=>{},onHit:e=>{},onCollect:()=>{}};return o.scoreboard.reset(LIVES,TIME_LIMIT),o.scoreboard.handlers={onSecond:e=>{"playing"===n.phase&&(n.onTime(e),n.onScore(o.scoreboard.add(POINTS_PER_SECOND)))},onTimeUp:()=>"playing"===n.phase&&end(n,!0)},n}const after=(e,o,n)=>e.world.after(o,n);export function setLayout(e,o){const n=e.world;for(const o of e.scenery)n.despawn(o);e.desert&&removeDesert(n,e.desert),e.dino&&n.despawn(e.dino.root),clearObstacles(e),e.layout=o;const t=makeView(o.width,o.height,rigFor(o.height,o.offset));e.view=t;const r=cameraFor(t);e.camera.eye=r.eye,e.camera.target=r.target,e.camera.fov=r.fov,buildScenery(e),e.dino=spawnDino(n,t,dinoCentre(DINO_X),o.groundY+e.jumpY,e.tint),setGait(n,t,e.dino,"playing"===e.phase?e.jumping?"air":"run":"stand")}function buildScenery(e){const o=e.view,n=e.layout;e.scenery=spawnWorld(e.world,o,e.theme,MEADOW),e.desert=spawnDesert(e.world,e.theme,-at(o,0,n.groundY)[2]),placeDesert(e.world,e.desert,e.scroll*pointSize(o))}export function setTheme(e,o){if((o!==e.theme||!e.scenery.length)&&(e.theme=o,e.tint=sceneryTint(o),e.view&&e.layout&&!e.world.isDisposed)){for(const o of e.scenery)e.world.despawn(o);if(e.desert&&removeDesert(e.world,e.desert),buildScenery(e),e.dino)for(const o of[e.dino.body,e.dino.near,e.dino.far])e.world.set(o,{color:e.tint});for(const o of e.obstacles)e.world.set(o.root,{color:e.tint})}}function clearObstacles(e){for(const o of e.obstacles)e.world.despawn(o.root);e.obstacles=[]}export function start(e){"ready"===e.phase&&e.view&&(e.jumpY=0,e.velocity=0,e.jumping=!1,e.pending=0,e.phase="playing",e.world.scoreboard.startCountdown(TIME_LIMIT),e.dino&&setGait(e.world,e.view,e.dino,"run"),drawDino(e),e.onPhase("playing"),after(e,FIRST_OBSTACLE,()=>spawnLoop(e)))}function spawnLoop(e){"playing"===e.phase&&(spawn(e),after(e,SPAWN_MIN+Math.random()*SPAWN_SPREAD,()=>spawnLoop(e)))}function spawn(e){const o=e.layout,n=e.view;if(!o||!n||e.obstacles.length>=MAX_OBSTACLES)return;if(e.obstacles.some(e=>e.x>o.width-MIN_OBSTACLE_GAP))return;const t=Math.random(),r=t<MUSHROOM_CHANCE?"mushroom":t<MUSHROOM_CHANCE+SMALL_CHANCE?"cactus_small":"cactus_large";e.obstacles.push({kind:r,x:o.width,root:spawnObstacle(e.world,n,o,r,o.width,e.tint)})}export function reset(e){e.world.cancelTimers(),clearObstacles(e),e.jumpY=0,e.velocity=0,e.jumping=!1,e.pending=0,e.world.scoreboard.reset(LIVES,TIME_LIMIT),e.won=!1,e.phase="ready",e.dino&&e.view&&setGait(e.world,e.view,e.dino,"stand"),drawDino(e),e.onScore(0),e.onLives(LIVES),e.onTime(TIME_LIMIT),e.onPhase("ready")}export function dispose(e){e.world.cancelTimers(),e.world.dispose()}function end(e,o){e.world.scoreboard.stop(),e.world.cancelTimers(),e.won=o,e.phase="over",e.dino&&e.view&&setGait(e.world,e.view,e.dino,e.jumping?"air":"stand"),e.onPhase("over")}export function tick(e,o){if(!e.world.isDisposed){if(e.time+=o,"playing"===e.phase){e.pending=Math.min(e.pending+o,MAX_PENDING);let n=!1;for(;e.pending>=STEP-STEP_TOLERANCE&&"playing"===e.phase;)e.pending-=STEP,step(e),n=!0;n&&draw(e),e.dustTimer+=o,"playing"===e.phase&&!e.jumping&&e.dustTimer>=DUST_INTERVAL&&e.view&&e.layout&&(e.dustTimer=0,dust(e.world,e.view,DINO_X+12,e.layout.groundY,!1))}e.world.update(o)}}export function jump(e){"playing"!==e.phase||e.jumping||(e.jumping=!0,e.velocity=JUMP_FORCE,e.dino&&e.view&&setGait(e.world,e.view,e.dino,"air"),e.onJump())}function step(e){const o=e.layout;e.jumping&&(e.velocity+=GRAVITY,e.jumpY+=e.velocity,e.jumpY>=0&&(e.jumpY=0,e.velocity=0,e.jumping=!1,e.dino&&e.view&&(setGait(e.world,e.view,e.dino,"run"),dust(e.world,e.view,dinoCentre(DINO_X),o.groundY,!0)))),e.scroll+=RUN_SPEED,e.obstacles=e.obstacles.filter(o=>(o.x-=RUN_SPEED,!(o.x<REMOVE_X&&(e.world.despawn(o.root),1))));const n=o.groundY-DINO_HIT_HEIGHT+e.jumpY,t=e.obstacles.find(e=>{const{width:t,height:r}=OBSTACLE_SIZE[e.kind],i=o.groundY-r;return DINO_X<e.x+t&&DINO_X+DINO_HIT_WIDTH>e.x&&n<i+r&&n+DINO_HIT_HEIGHT>i});if(!t)return;e.obstacles=e.obstacles.filter(e=>e!==t),e.world.despawn(t.root);const{width:r,height:i}=OBSTACLE_SIZE[t.kind];if(e.view&&hitBurst(e.world,e.view,t.x+r/2,o.groundY-i/2,"mushroom"===t.kind),"mushroom"===t.kind)return e.lives<LIVES&&e.world.scoreboard.addLives(1),e.onLives(e.lives),e.onScore(e.world.scoreboard.add(MUSHROOM_POINTS)),e.dino&&cheerDino(e.world,e.dino,e.tint),void e.onCollect();e.onLives(e.world.scoreboard.addLives(-1)),e.dino&&hurtDino(e.world,e.dino,e.tint),e.onHit(e.lives<=0),e.lives<=0&&(draw(e),end(e,!1))}function drawDino(e){const o=e.layout,n=e.view;o&&n&&e.dino&&placeDino(e.world,n,e.dino,dinoCentre(DINO_X),o.groundY+e.jumpY)}function draw(e){const o=e.layout,n=e.view;if(!o||!n)return;const t=e.world.transforms;for(const r of e.obstacles)placeObstacle(e.world,n,o,r.root,r.kind,r.x,t);t.flush(),e.desert&&placeDesert(e.world,e.desert,e.scroll*pointSize(n)),drawDino(e)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,lathe,merge,quat,recolor,shapeGeometry,tube}from"@nayan-ui/engine";import{at,bushMesh,fbm,HAZE,noise,pointSize,random,rockMesh,sceneryTint,tuftMesh}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0x1c20f6}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{DINO_HEIGHT,DINO_WIDTH,OBSTACLE_SIZE,STRIDE_TIME,TILE}from"./DinoJumpConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("dino-jump/DinoJumpScene:"+e,o),meshes.set(e,t)),t},rgb=e=>{const[o,t,r]=toColor(e);return[o,t,r]},mix=(e,o,t)=>[e[0]+(o[0]-e[0])*t,e[1]+(o[1]-e[1])*t,e[2]+(o[2]-e[2])*t],sphere=()=>shapeGeometry("sphere"),ribbed=(e,o)=>({displace:t=>o*Math.cos(t*Math.PI*2*e),color:({u:o})=>mix(rgb("#2f6b2c"),rgb("#5aa646"),.5+.5*Math.cos(o*Math.PI*2*e))}),smallCactusMesh=()=>cached("dj-cactus-small",()=>_0x1c20f6(merge([{geometry:lathe([[.34,0],[.36,.55],[.33,.82],[.22,.96],[.001,1]],{segments:24,...ribbed(10,.025)})},{geometry:tube([[.25,.4,0],[.42,.42,0],[.45,.62,0]],{radius:.1,color:rgb("#3f8a38")})}]),{center:!1,shine:.25})),largeCactusMesh=()=>cached("dj-cactus-large",()=>_0x1c20f6(merge([{geometry:lathe([[.22,0],[.24,.6],[.22,.86],[.15,.97],[.001,1]],{segments:24,...ribbed(12,.018)})},{geometry:tube([[-.18,.36,0],[-.4,.38,0],[-.42,.66,0]],{radius:.085,color:rgb("#3f8a38")})},{geometry:tube([[.18,.46,0],[.38,.48,0],[.4,.76,0]],{radius:.08,color:rgb("#3f8a38")})}]),{center:!1,shine:.25})),mushroomMesh=()=>cached("dj-mushroom",()=>{const e=[],o=random(5);for(let t=0;t<9;t++){const t=o()*Math.PI*2,r=.25+.6*o(),s=.5*Math.cos(1.2*r);e.push({geometry:sphere(),position:[Math.cos(t)*s,.5+.48*r,Math.sin(t)*s],scale:.09+.05*o(),color:[1,1,1]})}return _0x1c20f6(merge([{geometry:lathe([[.15,0],[.17,.25],[.14,.52]],{segments:16,color:rgb("#f3e3c3")})},{geometry:lathe([[.001,.46],[.5,.48],[.47,.66],[.34,.86],[.16,.97],[.001,1]],{segments:24,color:rgb("#e23b33")})},...e]),{center:!1,shine:.5})}),OBSTACLE_MESH={cactus_small:smallCactusMesh,cactus_large:largeCactusMesh,mushroom:mushroomMesh};export function spawnObstacle(e,o,t,r,s,a){const n=pointSize(o),{width:i,height:h}=OBSTACLE_SIZE[r];return e.spawn({mesh:OBSTACLE_MESH[r](),position:at(o,s+i/2,t.groundY),scale:[i*n,h*n,i*n*("cactus_large"===r?.6:1)],rotation:quat.y("mushroom"===r?.5:0),color:a,pickable:!1})}export function placeObstacle(e,o,t,r,s,a,n){const i=at(o,a+OBSTACLE_SIZE[s].width/2,t.groundY);n?n.position(r,i[0],i[1],i[2]):e.set(r,{position:i})}const SKIN_TOP=rgb("#3a4527"),SKIN_SIDE=rgb("#6d7a43"),SKIN_BELLY=rgb("#cdbf8f"),SKIN_STRIPE=rgb("#262b17"),CLAW=rgb("#2a2418"),TOOTH=rgb("#efe5c8"),MOUTH=rgb("#3a1a14"),smooth=(e,o,t)=>{const r=Math.min(1,Math.max(0,(t-e)/(o-e)));return r*r*(3-2*r)},hide=(e=!1)=>({position:o,normal:t})=>{const r=.5+.5*t[1];let s=mix(SKIN_BELLY,SKIN_SIDE,smooth(.22,.5,r));s=mix(s,SKIN_TOP,smooth(.6,.95,r)),e&&r>.55&&o[0]<.14&&(s=mix(s,SKIN_STRIPE,smooth(.45,.8,Math.sin(46*o[0]))*smooth(.55,.8,r)*.75));const a=.86+.28*noise(22*o[0]+3,22*o[1]+11*o[2]);return[s[0]*a,s[1]*a,s[2]*a]},skin=e=>recolor(e,hide()),taper=e=>o=>{for(let t=0;t+1<e.length;t++){const[r,s]=e[t],[a,n]=e[t+1];if(o<=a)return s+(n-s)*smooth(r,a,o)}return e[e.length-1][1]},claw=(e,o,t=CLAW)=>lathe([[o,0],[.6*o,.5*e],[.001,e]],{segments:8,color:t}),dinoMesh=()=>cached("dj-dino-rex",()=>{const e=tube([[-.54,.41,0],[-.42,.44,0],[-.28,.5,0],[-.12,.55,0],[.03,.57,0],[.14,.63,0],[.21,.73,0],[.26,.83,0]],{radius:taper([[0,.01],[.16,.042],[.33,.095],[.5,.155],[.62,.165],[.76,.12],[.88,.078],[1,.072]]),sides:24,smoothness:10,color:hide(!0)}),o=e=>.072-.026*e,t=tube([[.29,.885,0],[.38,.877,0],[.475,.862,0]],{radius:o,sides:18,color:hide()}),r=tube([[.27,.84,0],[.36,.818,0],[.455,.8,0]],{radius:e=>.046-.016*e,sides:16,color:hide()}),s=[];for(let e=0;e<7;e++){const t=.335+.021*e,r=(t-.29)/.185,a=o(r),n=.885-.023*r-.72*a;for(const o of[1,-1])s.push({geometry:claw(.026,.008,TOOTH),position:[t,n,o*a*.62],rotation:quat.z(Math.PI),scale:1-.08*Math.abs(e-2)})}const a=e=>[e,{...e,position:[e.position[0],e.position[1],-e.position[2]]}],n=e=>({geometry:skin(tube([[.15,.57,e],[.19,.51,1.15*e],[.235,.515,1.15*e]],{radius:e=>.026-.01*e,sides:10}))}),i=e=>[.012,-.012].map(o=>({geometry:claw(.022,.006),position:[.235,.512,1.15*e+o],rotation:quat.z(-2)}));return _0x1c20f6(merge([{geometry:e,scale:[1,1,.8]},{geometry:skin(sphere()),position:[.01,.5,0],scale:[.36,.3,.25]},{geometry:skin(sphere()),position:[.3,.875,0],scale:[.2,.17,.16]},{geometry:t,scale:[1,1,.82]},{geometry:r,scale:[1,1,.78]},...s,...a({geometry:tube([[.28,.842,.046],[.37,.828,.042],[.455,.818,.032]],{radius:.006,sides:6,caps:!1}),position:[0,0,0],scale:1,color:MOUTH}),...a({geometry:skin(sphere()),position:[.335,.94,.05],scale:[.1,.032,.045]}),...a({geometry:sphere(),position:[.34,.91,.064],scale:.034,color:rgb("#d79a1c")}),...a({geometry:sphere(),position:[.345,.91,.079],scale:[.009,.026,.008],color:rgb("#0b0b0b")}),...a({geometry:sphere(),position:[.35,.918,.08],scale:.007,color:[1,1,1]}),...a({geometry:sphere(),position:[.462,.88,.026],scale:[.02,.012,.012],color:rgb("#1d1f12")}),n(.085),n(-.085),...i(.085),...i(-.085)]),{center:!1,shine:.18})}),legMesh=()=>cached("dj-leg-rex",()=>{const e=[-.032,0,.032].flatMap(e=>{const o=0===e?.1:.08,t=[.03+o,-.443,1.6*e];return[{geometry:skin(tube([[.03,-.438,.6*e],[.03+.55*o,-.44,1.2*e],t],{radius:e=>.021-.009*e,sides:8}))},{geometry:claw(.03,.011),position:t,rotation:quat.z(-1.75)}]});return _0x1c20f6(merge([{geometry:skin(sphere()),position:[.01,-.07,0],scale:[.25,.3,.17],rotation:quat.z(-.25)},{geometry:skin(tube([[0,-.1,0],[.065,-.2,0]],{radius:e=>.075-.03*e,sides:12}))},{geometry:skin(tube([[.065,-.2,0],[.02,-.27,0],[-.03,-.33,0]],{radius:e=>.045-.016*e,sides:12}))},{geometry:skin(tube([[-.03,-.33,0],[-.005,-.39,0],[.03,-.437,0]],{radius:e=>.028-.004*e,sides:10}))},...e]),{center:!1,shine:.15})}),HIP=[-.06,.46,0],SWING=.5;export function spawnDino(e,o,t,r,s){const a=DINO_HEIGHT*pointSize(o),n=e.spawn({mesh:"none",position:at(o,t,r),pickable:!1}),i=e.spawn({mesh:dinoMesh(),parent:n,scale:a,color:s,pickable:!1}),h=o=>e.spawn({mesh:legMesh(),parent:n,position:[HIP[0]*a,HIP[1]*a,o*a],scale:a,color:s,pickable:!1});return{root:n,body:i,near:h(.1),far:h(-.1)}}export const dinoCentre=e=>e+DINO_WIDTH/2;export function placeDino(e,o,t,r,s){e.set(t.root,{position:at(o,r,s)})}export function setGait(e,o,t,r){for(const o of[t.near,t.far])e.stopAnimation(o);const s=DINO_HEIGHT*pointSize(o);if("run"===r)return e.set(t.near,{rotation:quat.z(.5)}),e.set(t.far,{rotation:quat.z(-.5)}),e.animate(t.near,{rotation:quat.z(-.5)},{duration:STRIDE_TIME,easing:"easeInOut",repeat:"forever",yoyo:!0}),e.animate(t.far,{rotation:quat.z(.5)},{duration:STRIDE_TIME,easing:"easeInOut",repeat:"forever",yoyo:!0}),void e.set(t.root,{bob:{amplitude:[0,.025*s,0],speed:Math.PI/STRIDE_TIME}});e.set(t.root,{bob:null}),e.set(t.near,{rotation:quat.z("air"===r?.5:0)}),e.set(t.far,{rotation:quat.z("air"===r?-.25:0)})}export function hurtDino(e,o,t){e.animate(o.body,[{color:[1.8,.35,.35,1],at:.25},{color:t}],{duration:.4}),e.animate(o.root,{shake:.05},{duration:.3})}export function cheerDino(e,o,t){e.animate(o.body,[{color:[1.7,1.5,.7,1],at:.3},{color:t}],{duration:.45})}const SAND=[.86,.74,.55,.85],CACTUS_BITS=["#2f6b2c","#5aa646","#c9a063"].map(e=>toColor(e)),MUSHROOM_BITS=["#e23b33","#ffffff","#ffd54f"].map(e=>toColor(e));export function dust(e,o,t,r,s){const a=pointSize(o);effects.dust(e,{position:at(o,t,r),count:s?5:1,size:(s?22:14)*a,speed:(s?60:30)*a,direction:[-1,.5,0],spread:s?1.4:.6,lifetime:s?.5:.4,color:SAND,endSize:2.2})}export function hitBurst(e,o,t,r,s){const a=pointSize(o);effects.shatter(e,{position:at(o,t,r,o.playDepth-.3),count:12,mesh:s?"sphere":"cube",size:8*a,speed:220*a,lifetime:.55,gravity:-2200*a,colors:s?MUSHROOM_BITS:CACTUS_BITS})}const SAND_LIGHT=rgb("#ecd29a"),SAND_DARK=rgb("#cfa86a"),SAND_RED=rgb("#d89a62"),periodic=(e,o,t,r)=>{const s=(e%t+t)%t/t;return r(s*t,o)*(1-s)+r((s-1)*t,o)*s},floorMesh=e=>cached("dj-floor:"+e.toFixed(2),()=>{const o=[],t=[];for(let t=0;t<44;t++){const r=-(1.2+Math.pow(1.12,t)-1);for(let t=0;t<48;t++){const s=-TILE/2+t/47*TILE,a=periodic(s,r,TILE,(e,o)=>fbm(.07*e,.07*o)),n=periodic(s,r,TILE,(e,o)=>noise(.9*e,.35*o));let i=mix(SAND_DARK,SAND_LIGHT,a);i=mix(i,SAND_RED,.6*Math.max(0,.45-a)),i=mix(i,mix(i,[1,1,1],.12),.6*n);const h=Math.max(0,1-Math.abs(-r-e)/1.3);i=mix(i,rgb("#f2deb0"),.45*h);const m=1-Math.exp(-((-r/140)**2));i=mix(i,HAZE,.7*m),o.push(s,0,r,0,1,0,i[0],i[1],i[2],0,0)}}const r=(e,o)=>48*e+o;for(let e=0;e+1<44;e++)for(let o=0;o+1<48;o++)t.push(r(e,o),r(e,o+1),r(e+1,o+1),r(e,o),r(e+1,o+1),r(e+1,o));return _0x1c20f6({vertices:new Float32Array(o),indices:new Uint32Array(t)},{center:!1})}),saguaroMesh=()=>cached("dj-saguaro",()=>_0x1c20f6(merge([{geometry:lathe([[.07,0],[.075,.7],[.065,.92],[.035,.99],[.001,1]],{segments:18,...ribbed(12,.006)})},{geometry:tube([[-.06,.42,0],[-.2,.44,0],[-.22,.72,0]],{radius:.045,color:rgb("#3f8a38")})},{geometry:tube([[.06,.52,0],[.17,.54,0],[.18,.8,0]],{radius:.04,color:rgb("#3f8a38")})}]),{center:!1,shine:.2})),barrelMesh=()=>cached("dj-barrel",()=>_0x1c20f6(merge([{geometry:lathe([[.001,0],[.3,.04],[.4,.22],[.36,.42],[.2,.54],[.001,.56]],{segments:22,...ribbed(14,.02)})},...[0,1,2,3,4].map(e=>({geometry:sphere(),position:[.12*Math.cos(1.26*e),.56,.12*Math.sin(1.26*e)],scale:.09,color:rgb("#ff6fa8")}))]),{center:!1,shine:.25}));export function spawnDesert(e,o,t){const r=sceneryTint(o),s=e=>[e[0]*r[0],e[1]*r[1],e[2]*r[2],e[3]??1];return{roots:[0,1,2].map(o=>{const r=e.spawn({mesh:floorMesh(t),color:s([1,1,1,1]),pickable:!1}),a=random(100+17*o),n=(o,t,n,i,h=[1,1,1,1],m=quat.y(6.3*a()))=>e.spawn({mesh:o,parent:r,position:[t,0,n],scale:i,rotation:m,color:s(h),pickable:!1}),i=()=>(a()-.5)*TILE,h=(e,o)=>{let r=-(e+a()*(o-e));return Math.abs(-r-t)<4&&(r-=5),r};for(let e=0;e<6;e++)n(saguaroMesh(),i(),h(18,70),3+3.5*a(),[1,1,1,1],quat.y(.6*a()-.3));for(let e=0;e<6;e++)n(barrelMesh(),i(),h(13,40),.5+.6*a());for(let e=0;e<8;e++){const e=.3+1.4*a();n(rockMesh(),i(),h(12,60),[1.3*e,e,e],[.95,.78,.6,1])}for(let e=0;e<8;e++){const e=.5+.7*a();n(bushMesh(),i(),h(12,50),[1.2*e,.8*e,1.2*e],[.72,.62,.36,1])}for(let e=0;e<16;e++)n(tuftMesh(),i(),-(2.6+2.9*a()),.5+.3*a(),[.82,.72,.42,1]);for(let e=0;e<14;e++){const e=.05+.07*a();n(rockMesh(),i(),-(2.6+5.5*a()),[1.4*e,e,e],[.85,.72,.58,1])}return r})}}export function placeDesert(e,o,t){o.roots.forEach((o,r)=>{const s=3*TILE,a=((r*TILE-t+1.5*TILE)%s+s)%s-1.5*TILE;e.set(o,{position:[a,0,0]})})}export function removeDesert(e,o){for(const t of o.roots)e.despawn(t)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,OPPONENT_COLOR,PLAYER_COLOR}from"./DotsAndBoxesConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tap,tick}from"./DotsAndBoxesGame.js";import{jsx as _0x257e22}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.DOTS_AND_BOXES,playerColumn=(e,t,r,s)=>({label:e,value:r.toLocaleString(),color:s?t:void 0,valueColor:t});export const DotsAndBoxes=engineGame(GAME_IDS.DOTS_AND_BOXES,e=>{const[t,r]=useLiveState([0,0]),[s,o]=useLiveState("player"),{status:a,screen:n,gameOver:i}=useEngineGame(e,{gameId:GAME_IDS.DOTS_AND_BOXES,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,s)=>{const o=getLayout(t,r,s);return setLayout(e,o),o.boardSize},tap:tap,reportScore:e=>e.playerScore,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),onOver:(e,t)=>e("draw"===t?GAME_SOUNDS.DRAW:"win"===t?SOUNDS.WIN:SOUNDS.LOSE,"win"===t?HapticType.SUCCESS:HapticType.HEAVY),wire:(e,t)=>{e.onScores=(e,t)=>r([e,t]),e.onTurn=o,e.onEvent=(e,r)=>{const s="player"===r;"box"===e?t(s?SOUNDS.BOX_CLAIMED:SOUNDS.OPPONENT_BOX,s?HapticType.MEDIUM:HapticType.WARNING):t(s?SOUNDS.PLAYER_LINE:SOUNDS.OPPONENT_LINE,HapticType.LIGHT)}}}),S="player"===s;return _0x257e22(EngineGameScreen,{...n,light:LIGHT,columns:[playerColumn("YOU",PLAYER_COLOR,t[0],S),textColumn("TURN",S?"Your Turn":"AI Thinking...",S?PLAYER_COLOR:OPPONENT_COLOR),playerColumn("AI",OPPONENT_COLOR,t[1],!S)],subtext:"Complete boxes to win!",gameOver:i({title:"win"===a?"YOU WON!":"YOU LOST!",message:"Final score: "+t[0]+" - "+t[1],scoreLabel:"win"===a?"You Won!":"You Lost",score:t[0],buttonText:"win"===a?"Play Again!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID_SIZE=6;export const BOX_POINTS=2e3;export const PLAYER_COLOR="#34D399";export const OPPONENT_COLOR="#F87171";export const DOT_COLOR="#D5DCE6";export const CLASSIC_BOARD="rgba(255, 255, 255, 0.25)";export const CLASSIC_RIM="rgba(255, 255, 255, 0.3)";export const CLASSIC_SLOT="rgba(255, 255, 255, 0.3)";export const AI_FIRST_DELAY=1;export const AI_CHAIN_DELAY=.8;export const LINE_TIME=.22;export const BOX_TIME=.32;export const TILT=.3;export const LIGHT=frontLight([-.4,.35,1],.5);const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=110,PADDING=22;export function getLayout(t,o,r){const e=getScoreBoardTop(r)+82,n=Math.max(200,o-e-110),s=Math.min(gameWidthFor(t),n/Math.cos(.3)),a=(s-44)/6;return{width:t,height:o,tilt:.3,centerY:e+n/2,boardSize:s,padding:22,cell:a,dotRadius:Math.max(6,.12*a),lineWidth:Math.max(6,.12*a),boardTop:0}}export function dotPoint(t,o,r){const e=t.boardSize/2;return[-e+t.padding+r*t.cell,e-t.padding-o*t.cell]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{aimTilted,unproject}from"../shared/EngineTilt.js";import{AI_CHAIN_DELAY,AI_FIRST_DELAY,BOX_POINTS,dotPoint,GRID_SIZE}from"./DotsAndBoxesConstants.js";import{buildBoard,celebrate,removeBoard,setBoardTheme,showSlot,spawnRod,spawnTile}from"./DotsAndBoxesScene.js";const G=GRID_SIZE,H_COUNT=(G+1)*G,LINE_COUNT=2*H_COUNT,WORLD_CAPACITY=800,MAX_STEP=.1,HIT_REACH=.4,LINES=Array.from({length:LINE_COUNT},(o,e)=>e<H_COUNT?{kind:"h",row:Math.floor(e/G),col:e%G}:{kind:"v",row:Math.floor((e-H_COUNT)/(G+1)),col:(e-H_COUNT)%(G+1)}),hIndex=(o,e)=>o*G+e,vIndex=(o,e)=>H_COUNT+o*(G+1)+e,BORDERS=LINES.map(({kind:o,row:e,col:n})=>{const r=[];return"h"===o?(e>0&&r.push((e-1)*G+n),e<G&&r.push(e*G+n)):(n>0&&r.push(e*G+n-1),n<G&&r.push(e*G+n)),r});export function createGame(o){return{world:new World(800),camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,board:null,phase:"ready",turn:"player",lines:new Uint8Array(LINE_COUNT),boxes:new Uint8Array(G*G),sideCounts:new Uint8Array(G*G),drawn:0,rods:[],tiles:[],playerScore:0,opponentScore:0,won:!1,onPhase:o=>{},onScores:(o,e)=>{},onTurn:o=>{},onEvent:(o,e)=>{}}}const after=(o,e,n)=>o.world.after(e,n),sidesDrawn=(o,e)=>o.sideCounts[e];export function setLayout(o,e){clearPieces(o),o.board&&removeBoard(o.world,o.board),o.layout=e,aimTilted(o.camera,e),o.board=buildBoard(o.world,e,o.theme,LINES),o.lines.forEach((e,n)=>e&&drawLine(o,n,e,!1)),o.boxes.forEach((e,n)=>e&&drawTile(o,n,e,!1))}export function setTheme(o,e){o.theme=e,o.layout&&o.board&&setBoardTheme(o.world,o.layout,o.board,e)}function clearPieces(o){for(const e of[...o.rods,...o.tiles])o.world.despawn(e);o.rods=[],o.tiles=[]}function drawLine(o,e,n,r){const{layout:t,board:a}=o;if(!t||!a)return;const{kind:l,row:s,col:i}=LINES[e];showSlot(o.world,a,e,!1),o.rods.push(spawnRod(o.world,t,l,s,i,n,r))}function drawTile(o,e,n,r){o.layout&&o.tiles.push(spawnTile(o.world,o.layout,Math.floor(e/G),e%G,n,r))}export function start(o){"ready"===o.phase&&(o.phase="playing",o.onPhase("playing"))}export function reset(o){if(o.world.cancelTimers(),clearPieces(o),o.board)for(let e=0;e<LINE_COUNT;e++)showSlot(o.world,o.board,e,!0);o.lines.fill(0),o.sideCounts.fill(0),o.boxes.fill(0),o.drawn=0,o.turn="player",o.playerScore=0,o.opponentScore=0,o.won=!1,o.phase="ready",o.onScores(0,0),o.onTurn("player"),o.onPhase("ready")}export function dispose(o){o.world.dispose()}export function tick(o,e){o.world.isDisposed||o.world.update(Math.min(e,.1))}export function lineAt(o,e,n){const r=o.layout;if(!r)return null;const[t,a]=unproject(r,e,n,0),[l,s]=dotPoint(r,0,0),i=(t-l)/r.cell,d=(s-a)/r.cell;let u=null,p=.4;const f=(e,n)=>{!o.lines[e]&&n<p&&(u=e,p=n)},h=Math.round(d),w=Math.floor(i);h>=0&&h<=G&&w>=0&&w<G&&f(hIndex(h,w),Math.abs(d-h));const y=Math.floor(d),T=Math.round(i);return y>=0&&y<G&&T>=0&&T<=G&&f(vIndex(y,T),Math.abs(i-T)),u}export function tap(o,e,n){if("playing"!==o.phase||"player"!==o.turn)return;const r=lineAt(o,e,n);if(null==r)return;const t=play(o,r,"player");"playing"!==o.phase||t>0||(setTurn(o,"opponent"),after(o,AI_FIRST_DELAY,()=>aiMove(o)))}function play(o,e,n){const r="player"===n?1:2;o.lines[e]=r,o.drawn++,drawLine(o,e,r,!0);let t=0;for(const n of BORDERS[e])o.sideCounts[n]++,!o.boxes[n]&&4===sidesDrawn(o,n)&&(o.boxes[n]=r,drawTile(o,n,r,!0),t++);return"player"===n?o.playerScore+=t*BOX_POINTS:o.opponentScore+=t*BOX_POINTS,t&&o.onScores(o.playerScore,o.opponentScore),o.onEvent(t?"box":"line",n),o.drawn===LINE_COUNT&&end(o),t}function aiMove(o){if("playing"!==o.phase||"opponent"!==o.turn)return;const e=chooseLine(o);if(null==e)return void setTurn(o,"player");const n=play(o,e,"opponent");"playing"===o.phase&&(n>0?after(o,AI_CHAIN_DELAY,()=>aiMove(o)):setTurn(o,"player"))}function chooseLine(o){const e=[];for(let n=0;n<LINE_COUNT;n++)o.lines[n]||e.push(n);if(!e.length)return null;const n=e.find(e=>BORDERS[e].some(e=>3===sidesDrawn(o,e)));if(void 0!==n)return n;const r=e.filter(e=>BORDERS[e].every(e=>2!==sidesDrawn(o,e))),t=r.length?r:e;return t[Math.floor(Math.random()*t.length)]}function setTurn(o,e){o.turn=e,o.onTurn(e)}function end(o){o.world.cancelTimers();let e=0,n=0;for(const r of o.boxes)1===r?e++:2===r&&n++;o.won=e>n,o.phase="over",o.won&&o.layout&&celebrate(o.world,o.layout),o.onPhase("over")}
|
|
@@ -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 _0x3bf28b}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{BOX_TIME,CLASSIC_BOARD,CLASSIC_RIM,CLASSIC_SLOT,DOT_COLOR,dotPoint,GRID_SIZE,LINE_TIME,OPPONENT_COLOR,PLAYER_COLOR}from"./DotsAndBoxesConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("dots-and-boxes/DotsAndBoxesScene:"+e,o),meshes.set(e,t)),t},STAND_UP=quat.x(Math.PI/2),ACROSS=quat.z(0),DOWN=quat.z(Math.PI/2),BOARD_DEPTH=10,BACKDROP_DEPTH=25,ownerColor=e=>toColor(1===e?PLAYER_COLOR:OPPONENT_COLOR),glow=(e,o)=>[e[0]*o,e[1]*o,e[2]*o,1],panelMesh=(e,o)=>cached("dab-panel:"+e.toFixed(1)+":"+o,()=>_0x3bf28b(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:10}),{shine:.25})),rimMesh=(e,o)=>cached("dab-rim:"+e.toFixed(1)+":"+o,()=>_0x3bf28b(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o).addRoundedRect(-e/2+1.5,-e/2+1.5,e-3,e-3,o-1.5),{depth:0,fillRule:"evenodd"}))),slotMesh=(e,o)=>cached("dab-slot:"+e.toFixed(1)+":"+o.toFixed(1),()=>_0x3bf28b(extrude((new Path).addRoundedRect(-e/2,-o/2,e,o,o/2),{depth:0}))),studMesh=()=>cached("dab-stud",()=>_0x3bf28b(lathe([[.001,0],[.5,0],[.5,.22],[.46,.38],[.34,.52],[.16,.6],[.001,.62]],{segments:24}),{center:!1,shine:.85})),rodMesh=()=>cached("dab-rod",()=>_0x3bf28b(tube([[-.5,0,0],[.5,0,0]],{radius:.5,sides:16,smoothness:1}),{shine:.7})),tileMesh=()=>cached("dab-tile",()=>_0x3bf28b(merge([{geometry:shapeGeometry("roundedBox",{color:[.78,.78,.78]}),position:[0,0,.5]},{geometry:shapeGeometry("roundedBox"),position:[0,0,.62],scale:[.72,.72,.9]}]),{center:!1,shine:.55}));function linePlace(e,o,t,s){const[n,i]=dotPoint(e,t,s),[a,r]="h"===o?dotPoint(e,t,s+1):dotPoint(e,t+1,s);return{x:(n+a)/2,y:(i+r)/2}}export function boxCentre(e,o,t){const[s,n]=dotPoint(e,o,t);return[s+e.cell/2,n-e.cell/2]}const tileSize=e=>[.76*e.cell,.76*e.cell,.14*e.cell],slotColor=e=>toColor("classic"===e.mode?CLASSIC_SLOT:e.BOARD.CELL_HIGHLIGHT);export function buildBoard(e,o,t,s){const n="classic"===t.mode,i=n?16:8,a=spawnBackdrop(e,o.width,o.height,-25,t);placeTiltedBackdrop(e,a,o,25);const r=e.spawn({mesh:panelMesh(o.boardSize,i),position:[0,0,-5],color:toColor(n?CLASSIC_BOARD:t.BOARD.SURFACE),pickable:!1}),l=toColor(n?CLASSIC_RIM:t.BOARD.BORDER),d=l[3]>0?e.spawn({mesh:rimMesh(o.boardSize,i),position:[0,0,.2],color:l,pickable:!1}):null,p=[],h=toColor(DOT_COLOR);for(let t=0;t<=GRID_SIZE;t++)for(let s=0;s<=GRID_SIZE;s++){const[n,i]=dotPoint(o,t,s);p.push(e.spawn({mesh:studMesh(),position:[n,i,0],rotation:STAND_UP,scale:2*o.dotRadius,color:h,pickable:!1}))}const m=slotMesh(o.cell-2.4*o.dotRadius,.75*o.lineWidth),u=slotColor(t);return{backdrop:a,panel:r,rim:d,studs:p,slots:s.map(({kind:t,row:s,col:n})=>{const{x:i,y:a}=linePlace(o,t,s,n);return e.spawn({mesh:m,position:[i,a,.3],rotation:"h"===t?ACROSS:DOWN,color:u,pickable:!1})})}}export function removeBoard(e,o){for(const t of[o.backdrop,o.panel,...null!=o.rim?[o.rim]:[],...o.studs,...o.slots])e.despawn(t)}export function setBoardTheme(e,o,t,s){const n="classic"===s.mode,i=n?16:8;setBackdropTheme(e,t.backdrop,s),e.set(t.panel,{mesh:panelMesh(o.boardSize,i),color:toColor(n?CLASSIC_BOARD:s.BOARD.SURFACE)}),null!=t.rim&&e.despawn(t.rim);const a=toColor(n?CLASSIC_RIM:s.BOARD.BORDER);t.rim=a[3]>0?e.spawn({mesh:rimMesh(o.boardSize,i),position:[0,0,.2],color:a,pickable:!1}):null;const r=slotColor(s);for(const o of t.slots)e.set(o,{color:r})}export function spawnRod(e,o,t,s,n,i,a){const{x:r,y:l}=linePlace(o,t,s,n),d=o.lineWidth,p=ownerColor(i),h=[r,l,d/2],m=e.spawn({mesh:rodMesh(),position:a?[r,l,2.5*d]:h,rotation:"h"===t?ACROSS:DOWN,scale:[a?d:o.cell,d,d],color:a?glow(p,1.6):p,pickable:!1});return a&&(e.animate(m,{scale:[o.cell,d,d]},{duration:LINE_TIME,easing:"back"}),e.animate(m,{position:h},{duration:LINE_TIME,easing:"bounce"}),e.animate(m,{color:p},{duration:2*LINE_TIME})),m}export function spawnTile(e,o,t,s,n,i){const[a,r]=boxCentre(o,t,s),l=ownerColor(n),d=e.spawn({mesh:tileMesh(),position:[a,r,0],scale:i?[.01,.01,.01]:tileSize(o),color:l,pickable:!1});return i&&(e.animate(d,{scale:tileSize(o)},{duration:BOX_TIME,easing:"back"}),effects.sparkle(e,{position:[a,r,.2*o.cell],count:12,size:.08*o.cell,speed:3*o.cell,lifetime:.5,gravity:6*-o.cell,colors:[l,glow(l,1.3),[1,1,1,1]]})),d}export function celebrate(e,o){effects.confetti(e,{position:[0,0,o.cell],count:60,size:.12*o.cell,speed:1.4*o.boardSize,lifetime:1.4,gravity:2.4*-o.boardSize,colors:["#34D399","#FFD740","#448AFF","#FF5252"].map(e=>toColor(e))})}export function showSlot(e,o,t,s){e.set(o.slots[t],{scale:s?1: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}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,timerColumn}from"../shared/EngineHud.js";import{backgroundFor,lightFor}from"../shared/EngineMeadow.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIVES,TIME_LIMIT}from"./FallingSticksConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./FallingSticksGame.js";import{jsx as _0x49d454}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.FALLING_STICKS,FEEDBACK={catch:{sound:SOUNDS.CATCH,haptic:HapticType.LIGHT},miss:{sound:SOUNDS.MISS,haptic:HapticType.WARNING},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const FallingSticks=engineGame(GAME_IDS.FALLING_STICKS,e=>{const[t,s]=useLiveState(0),[i,r]=useLiveState(LIVES),[a,o]=useLiveState(TIME_LIMIT),{theme:n,status:m,screen:S,gameOver:u}=useEngineGame(e,{gameId:GAME_IDS.FALLING_STICKS,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,i)=>setLayout(e,getLayout(t,s,i)),resultsDelay:e=>"win"===e?650:350,drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=s,e.onLives=r,e.onTime=o,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x49d454(EngineGameScreen,{...S,light:lightFor(n),background:backgroundFor(n),columns:[scoreColumn(t),livesColumn(i,LIVES),timerColumn(a,n,15)],subtext:"Catch the falling sticks!",gameOver:u({title:"win"===m?"YOU WIN!":"GAME OVER",message:"win"===m?"You survived the 2 minutes!":"The sticks got away!",scoreLabel:"Final Score",score:t,buttonText:"Play Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{gameWidthFor}from"../shared/EngineUtils.js";export const TIME_LIMIT=120;export const LIVES=3;export const POINTS_PER_CATCH=500;export const MAX_STICKS=18;export const BASE_FALL_SPEED=2.4;export const SPEED_INC_PER_POINT=6e-5;export const MAX_FALL_SPEED=3.8;export const BASE_SPAWN_MS=1450;export const SPAWN_DEC_PER_POINT=.012;export const MIN_SPAWN_MS=1e3;export const SPIN_MAX=2.2;export const LAND_TILT_MAX=6;export const FIRST_SPAWN_TIMER=1300;export const STEP_MS=1e3/60;export const MAX_PENDING_MS=50;export const STICK_COLORS=["#E53935","#1E88E5","#43A047","#FB8C00","#8E24AA","#00ACC1","#F4511E","#FDD835"];export function getLayout(t,o,r=0){const e=gameWidthFor(t),n=Math.min(108,Math.round(.24*e)),s=Math.max(12,Math.round(.15*n));return{width:t,height:o,left:(t-e)/2,right:(t+e)/2,spawnY:getScoreBoardTop(r)+82+.55*n,stickLen:n,stickW:s,hitRadius:Math.max(18,1.5*s),spawnMargin:.6*n,floorY:o-145}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{cameraFor}from"../shared/EngineMeadow.js";import{LIVES,MAX_PENDING_MS,POINTS_PER_CATCH,STEP_MS,TIME_LIMIT}from"./FallingSticksConstants.js";import{catchAlong,FALLING,FREE,newField,step}from"./FallingSticksRules.js";import{buildScene,celebrate,drawTrail,fadeTrail,hideStick,landStick,placeStick,popStick,removeScene,showStick}from"./FallingSticksScene.js";const WORLD_CAPACITY=500,TRAIL_POINTS=10;export function createGame(e){const o=new World(500),t={world:o,camera:{eye:[0,1,0],target:[0,1,-1],fov:.9},theme:e,layout:null,scene:null,phase:"ready",field:newField(),get lives(){return o.scoreboard.lives},get score(){return o.scoreboard.score},get timeLeft(){return o.scoreboard.shownSeconds},won:!1,trail:[],pending:0,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onTime:e=>{},onEvent:e=>{}};return o.scoreboard.reset(LIVES,TIME_LIMIT),o.scoreboard.handlers={onScore:e=>t.onScore(e),onSecond:e=>t.onTime(e),onTimeUp:()=>"playing"===t.phase&&end(t,!0)},t}export function setLayout(e,o){const t=e.layout;if(t)for(const r of e.field.sticks)r.state!==FREE&&(r.x=o.left+(r.x-t.left)/(t.right-t.left)*(o.right-o.left),r.y=o.spawnY+(r.y-t.spawnY)/Math.max(1,t.floorY-t.spawnY)*(o.floorY-o.spawnY),r.restY=o.floorY-(t.floorY-r.restY)*(o.stickLen/t.stickLen));e.scene&&removeScene(e.world,e.scene),e.layout=o,e.scene=buildScene(e.world,o,e.theme),Object.assign(e.camera,cameraFor(e.scene.view)),e.trail=[];const r=e.scene;e.field.sticks.forEach((t,n)=>{t.state!==FREE&&(showStick(e.world,o,r,n,t),t.state!==FALLING&&placeStick(e.world,o,r,n,{...t,y:t.restY,rot:t.restRot},!1))})}export function setTheme(e,o){e.theme===o||e.world.isDisposed||(e.theme=o,e.layout&&setLayout(e,e.layout))}function clear(e){if(e.world.cancelTimers(),e.field=newField(),e.world.scoreboard.reset(LIVES,TIME_LIMIT),e.won=!1,e.pending=0,e.trail=[],e.scene){for(let o=0;o<e.scene.sticks.length;o++)hideStick(e.world,e.scene,o);drawTrail(e.world,e.layout,e.scene,[])}e.onScore(0),e.onLives(LIVES),e.onTime(TIME_LIMIT)}export function start(e){"ready"===e.phase&&(clear(e),e.world.scoreboard.startCountdown(TIME_LIMIT),e.phase="playing",e.onPhase("playing"))}export function reset(e){clear(e),e.phase="ready",e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){if(e.world.isDisposed)return;const t=Math.max(0,Math.min(o,MAX_PENDING_MS/1e3)),{layout:r,scene:n}=e;if("playing"===e.phase&&r&&n){let o=Math.min(e.pending+1e3*t,MAX_PENDING_MS);for(;"playing"===e.phase&&o+1e-6>=STEP_MS;)o-=STEP_MS,frame(e,r,n);if(e.pending=Math.max(0,o),"playing"===e.phase){const o=e.world.transforms;e.field.sticks.forEach((t,a)=>t.state===FALLING&&placeStick(e.world,r,n,a,t,!0,o)),o.flush()}}e.world.update(t)}function frame(e,o,t){const{landed:r,spawned:n}=step(e.field,o,e.lives);for(const n of r)landStick(e.world,o,t,n,e.field.sticks[n]);if(n>=0&&showStick(e.world,o,t,n,e.field.sticks[n]),r.length)for(let o=0;o<r.length&&"playing"===e.phase;o++)e.onEvent("miss"),e.onLives(e.world.scoreboard.addLives(-1)),e.lives<=0&&end(e,!1)}function end(e,o){e.world.scoreboard.stop(),e.won=o,e.phase="over",e.layout&&e.scene&&(e.trail=[],fadeTrail(e.world,e.scene),o&&celebrate(e.world,e.layout,e.scene)),e.onEvent(o?"win":"lose"),e.onPhase("over")}export function drag(e,{phase:o,x:t,y:r,cancelled:n}){const{layout:a,scene:s}=e;if(!a||!s)return;if(n)return e.trail=[],void fadeTrail(e.world,s);if("playing"!==e.phase)return;if("start"!==o&&e.trail.length<2)return;const i="start"===o?t:e.trail[e.trail.length-2],l="start"===o?r:e.trail[e.trail.length-1];e.trail="start"===o?[t,r]:[...e.trail.slice(-18),t,r],drawTrail(e.world,a,s,e.trail);const d=catchAlong(e.field,a,i,l,t,r);for(const o of d)popStick(e.world,a,s,o,e.field.sticks[o]),e.world.scoreboard.add(POINTS_PER_CATCH),e.onEvent("catch");"end"===o&&(e.trail=[],fadeTrail(e.world,s))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{BASE_FALL_SPEED,BASE_SPAWN_MS,FIRST_SPAWN_TIMER,LAND_TILT_MAX,MAX_FALL_SPEED,MAX_STICKS,MIN_SPAWN_MS,POINTS_PER_CATCH,SPAWN_DEC_PER_POINT,SPEED_INC_PER_POINT,SPIN_MAX,STEP_MS,STICK_COLORS}from"./FallingSticksConstants.js";export const FREE=0;export const FALLING=1;export const LANDED=2;export const newField=()=>({sticks:Array.from({length:MAX_STICKS},()=>({state:0,color:0,x:0,y:0,speed:0,rot:0,rotSpeed:0,restY:0,restRot:0})),spawnTimer:FIRST_SPAWN_TIMER,score:0,nextColor:0});function spawn(t,n){const a=t.sticks.findIndex(t=>0===t.state);if(a<0)return-1;const s=t.sticks[a];return s.state=1,s.color=t.nextColor,t.nextColor=(t.nextColor+1+Math.floor(3*Math.random()))%STICK_COLORS.length,s.x=n.left+n.spawnMargin+Math.random()*Math.max(0,n.right-n.left-2*n.spawnMargin),s.y=n.spawnY,s.speed=Math.min((BASE_FALL_SPEED+t.score*SPEED_INC_PER_POINT)*(.85+.3*Math.random()),MAX_FALL_SPEED),s.rot=360*Math.random(),s.rotSpeed=(2*Math.random()-1)*SPIN_MAX,a}function land(t,n){t.state=2,t.restRot=180*Math.round(t.rot/180)+(2*Math.random()-1)*LAND_TILT_MAX,t.restY=n.floorY-.55*n.stickW-Math.abs(Math.sin(t.restRot*Math.PI/180))*n.stickLen*.5}export function step(t,n,a){const s=[];t.sticks.forEach((t,a)=>{if(1!==t.state)return;t.y+=t.speed,t.rot+=t.rotSpeed;const e=Math.abs(Math.sin(t.rot*Math.PI/180))*n.stickLen*.5+.5*n.stickW;t.y+e>=n.floorY&&(land(t,n),s.push(a))});let e=-1;if((a=Math.max(0,a-s.length))<=0)return{landed:s,spawned:e,lives:a};const o=Math.max(BASE_SPAWN_MS-t.score*SPAWN_DEC_PER_POINT,MIN_SPAWN_MS);return t.spawnTimer+=STEP_MS,t.spawnTimer>=o&&(t.spawnTimer-=o,e=spawn(t,n)),{landed:s,spawned:e,lives:a}}const pointDistance=(t,n,a,s,e,o)=>{const r=e-a,i=o-s,M=r*r+i*i,_=M>0?Math.max(0,Math.min(1,((t-a)*r+(n-s)*i)/M)):0;return(t-a-_*r)**2+(n-s-_*i)**2};function segmentDistance(t,n,a,s,e,o,r,i){const M=(t,n,a,s)=>t*s-n*a,_=M(a-t,s-n,e-t,o-n),h=M(a-t,s-n,r-t,i-n),S=M(r-e,i-o,t-e,n-o),A=M(r-e,i-o,a-e,s-o);return Math.max(t,a)>=Math.min(e,r)&&Math.max(e,r)>=Math.min(t,a)&&Math.max(n,s)>=Math.min(o,i)&&Math.max(o,i)>=Math.min(n,s)&&_*h<=0&&S*A<=0?0:Math.min(pointDistance(t,n,e,o,r,i),pointDistance(a,s,e,o,r,i),pointDistance(e,o,t,n,a,s),pointDistance(r,i,t,n,a,s))}export function catchAlong(t,n,a,s,e,o){const r=[],i=n.hitRadius*n.hitRadius;return t.sticks.forEach((M,_)=>{if(1!==M.state)return;const h=M.rot*Math.PI/180,S=Math.cos(h)*n.stickLen*.5,A=Math.sin(h)*n.stickLen*.5;segmentDistance(a,s,e,o,M.x-S,M.y-A,M.x+S,M.y+A)>i||(M.state=0,t.score+=POINTS_PER_CATCH,r.push(_))}),r}export const catchAt=(t,n,a,s)=>catchAlong(t,n,a,s,a,s);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,lathe,merge,quat}from"@nayan-ui/engine";import{stickBlast}from"../shared/EngineBlasts.js";import{at,facing,flowerMesh,makeView,pineMesh,pointSize,random,sceneryTint,spawnWorld,tuftMesh}from"../shared/EngineMeadow.js";import{createGameMesh as _0x5eea5d}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{MAX_STICKS,STICK_COLORS}from"./FallingSticksConstants.js";const DEG=Math.PI/180,TRAIL=10,SIDEWAYS=quat.z(-Math.PI/2);let baton=null,bands=null;const batonMesh=()=>baton??=_0x5eea5d(merge([{geometry:lathe([[.08,-.5],[.31,-.49],[.44,-.465],[.47,-.43],[.47,.43],[.44,.465],[.31,.49],[.08,.5]],{segments:20}),rotation:SIDEWAYS}]),{center:!1,shine:.35}),bandMesh=()=>bands??=_0x5eea5d(merge([-1,1].map(t=>({geometry:lathe([[.475,-.038],[.51,-.026],[.51,.026],[.475,.038]],{segments:20}),rotation:SIDEWAYS,position:[.34*t,0,0],color:toColor("#FFF3D9")}))),{center:!1,shine:.25}),stickColor=t=>toColor(STICK_COLORS[t.color%STICK_COLORS.length]),depthFor=(t,e)=>t.view.playDepth-.003*e,stickScale=(t,e,o)=>{const i=pointSize(e.view,depthFor(e,o));return[t.stickLen*i,t.stickW*i,t.stickW*i]};function meadowView(t){const e=Math.min(.64,t.floorY/t.height-.18),o=makeView(t.width,t.height,{horizon:e,eyeHeight:1,playDepth:3.6});return o.eye=[o.eye[0],o.eye[1]+.025-at(o,t.width/2,t.floorY)[1],o.eye[2]],o}export function buildScene(t,e,o){const i=meadowView(e),s=spawnWorld(t,i,o,{sun:[.8,.28],clouds:[.25,.48],groundDetails:!1}),n=random(73),a=sceneryTint(o);for(let o=0;o<13;o++){const r=-(55+40*n()),l=(o/12*2-1)*(-r*i.tanHalf*(e.width/e.height))*1.15,h=3.5+2.5*n();s.push(t.spawn({mesh:pineMesh(),position:[l,0,r],scale:h,color:a,pickable:!1}))}for(let o=0;o<28;o++){const r=at(i,(o+n())/28*e.width,e.floorY+6+5*n());s.push(t.spawn({mesh:o%5==0?flowerMesh():tuftMesh(),position:[r[0],0,r[2]],rotation:quat.y(n()*Math.PI*2),scale:pointSize(i)*(32+20*n()),color:a,pickable:!1}))}const r=Array.from({length:MAX_STICKS},()=>{const e=t.spawn({mesh:batonMesh(),scale:0,pickable:!1});return t.spawn({mesh:bandMesh(),parent:e,pickable:!1}),e});return{view:i,scenery:s,sticks:r,trail:Array.from({length:10},()=>t.spawn({mesh:"roundedBox",scale:0,pickable:!1})),tumble:r.map(()=>0)}}export function removeScene(t,e){for(const o of[...e.scenery,...e.sticks,...e.trail])t.despawn(o)}const turn=(t,e,o)=>quat.multiply(facing(t,-e*DEG),quat.x(o));export function placeStick(t,e,o,i,s,n=!0,a){const r=n?o.tumble[i]+s.rot*DEG*.6:o.tumble[i];(a??t).set(o.sticks[i],{position:at(o.view,s.x,s.y,depthFor(o,i)),rotation:turn(o.view,s.rot,r)})}export function showStick(t,e,o,i,s){const n=o.sticks[i];t.stopAnimation(n),o.tumble[i]=.73*s.color,t.set(n,{scale:stickScale(e,o,i),color:stickColor(s)}),placeStick(t,e,o,i,s)}export function hideStick(t,e,o){t.stopAnimation(e.sticks[o]),t.set(e.sticks[o],{scale:0})}export function landStick(t,e,o,i,s){const n=o.sticks[i],a=Math.min(6*s.speed,24),r=depthFor(o,i),l=Math.round((o.tumble[i]+s.rot*DEG*.6)/Math.PI)*Math.PI;o.tumble[i]=l,t.animate(n,[{position:at(o.view,s.x,s.restY-a,r),at:.3},{position:at(o.view,s.x,s.restY,r),rotation:turn(o.view,s.restRot,l)}],{duration:.45,easing:"easeOut",path:"smooth"});const h=pointSize(o.view);effects.shatter(t,{position:at(o.view,s.x,e.floorY,r),count:7,mesh:"sphere",size:e.stickW*h*.3,speed:75*h,lifetime:.45,gravity:-260*h,direction:[0,1,0],spread:.9,colors:[toColor("#8DA35D"),toColor("#5F9141")],flash:!1,dust:!1})}export function popStick(t,e,o,i,s){stickBlast(t,o.sticks[i],{scale:stickScale(e,o,i),position:at(o.view,s.x,s.y,depthFor(o,i)),rotation:facing(o.view,-s.rot*DEG),color:stickColor(s)})}export function drawTrail(t,e,o,i){const s=t.transforms,n=i.length/2,a=o.view.playDepth-.2,r=pointSize(o.view,a);o.trail.forEach((e,l)=>{t.stopAnimation(e);const h=n-1-l;if(h<0)return void s.scale(e,0);const p=i[2*h],m=i[2*h+1],f=i[2*Math.max(0,h-1)],u=i[2*Math.max(0,h-1)+1],d=4*(1-l/10),w=at(o.view,(p+f)/2,(m+u)/2,a),S=facing(o.view,Math.atan2(u-m,p-f));s.transform(e,w[0],w[1],w[2],S[0],S[1],S[2],S[3]),s.scale(e,(Math.hypot(p-f,m-u)+d)*r,d*r,d*r),s.color(e,1.7,1.6,1.35,.7*(1-l/10))}),s.flush()}export function fadeTrail(t,e){t.animate(e.trail,{color:[1.7,1.6,1.35,0],scale:0},{duration:.18})}export function celebrate(t,e,o){const i=pointSize(o.view);effects.confetti(t,{position:at(o.view,e.width/2,.45*e.height),count:64,size:5*i,speed:e.right*i,lifetime:1.2,gravity:-260*i,colors:STICK_COLORS.map(t=>toColor(t))})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x56225d=_0x4c66;!function(){const e="Yn[k",o=_0x4c66,t=_0x61db();for(;;)try{if(971192==-parseInt(o(336,"lG%a"))/1*(parseInt(o(331,"9bHD"))/2)+parseInt(o(276,e))/3*(parseInt(o(375,"9bHD"))/4)+parseInt(o(347,"ac1N"))/5+-parseInt(o(357,"K3TT"))/6+parseInt(o(371,e))/7*(-parseInt(o(266,"8z8o"))/8)+-parseInt(o(356,"bpa^"))/9*(parseInt(o(309,"*(dC"))/10)+parseInt(o(312,"i7V6"))/11*(parseInt(o(286,"(hEo"))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x37e763,{useEffect,useRef,useMemo,useCallback}from"react";import{View,StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{useFindDiffStore}from"./FindDifferentNumberStore.js";import{FindDifferentNumberService}from"./FindDifferentNumberService.js";import{GameGrid}from"./components/GameGrid.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x7306a7}from"../../helpers/index.js";import{GAME_IDS,DEFAULT_GAME_SETTINGS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{jsx as _0x3b734c,jsxs as _0x247db6}from"react/jsx-runtime";export const FindDifferentNumber=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:d,onShowLeaderboard:n,bannerAd:s})=>{const i="4a!L",a=_0x4c66,f={mEAra:function(e,o){return e(o)},QjoXQ:function(e,o,t){return e(o,t)},AFVWo:function(e,o){return e(o)},WokuC:a(342,"$PCi"),ioedv:function(e,o){return e===o},OUZZT:"AscfF",IbHjq:a(373,"ak6m"),QueLv:a(332,"iJ9D"),ksLxN:"You found all the different numbers!",BoqkT:function(e,o){return e(o)},xItCD:function(e,o){return e(o)},oDipW:function(e,o,t){return e(o,t)},aNRxk:function(e,o,t){return e(o,t)},JnIZi:function(e,o,t){return e(o,t)}},S=useFindDiffStore(e=>e[a(313,"]2dW")]),u=useFindDiffStore(e=>e[a(344,"$PCi")]),m=useFindDiffStore(e=>e[a(350,"@AP&")]),k=f[a(333,"SXfc")](useRef,!1);useEffect(()=>{const e=a;return k.current=useFindDiffStore[e(259,"yPxj")]()[e(270,"i7V6")],useFindDiffStore[e(287,"iJ9D")](o=>o[e(254,"K3TT")],o=>{const t=e;k[t(343,"K3TT")]=o,o?p[t(335,"BAAI")][t(358,"MK4B")](()=>{const e=t;useFindDiffStore[e(301,"i7V6")]()[e(346,"ti3&")]()}):p.current[t(267,"q*ia")]()})},[]);const x=useRef(!1),C=f[a(307,"Op$W")](useRef,0),R=f[a(264,"Yn[k")](useRef,t);R[a(362,"ti3&")]=t;const _=f.AFVWo(useRef,W);_[a(277,"N3$C")]=W;const l=useCallback(e=>{const o=a;if(R.current&&!x[o(359,"@AP&")]){const t=useFindDiffStore[o(317,"N3$C")]();R[o(369,"egZQ")]({status:e,score:t.score[o(360,"ti3&")]()}),x[o(327,"T$(h")]=!0}},[]),p=f.xItCD(useRef,new FindDifferentNumberService);f[a(325,"ZFoN")](useEffect,()=>{const e=a;return useFindDiffStore[e(306,"%)Ys")]()[e(368,"Op$W")](),()=>{const o=e;var t,W;useFindDiffStore[o(271,"H87W")]().isPlaying&&!x.current&&(t=l,W=o(330,"!nrD"),f.mEAra(t,W)),p[o(337,"H87W")][o(367,"MOE[")](),useFindDiffStore.getState()[o(355,"q*ia")]()}},[l]),useEffect(()=>{const e=a;S&&!x[e(327,"T$(h")]&&(f[e(329,"egZQ")](playSound,GAME_SOUNDS[e(316,"q*ia")].WIN,I[e(359,"@AP&")]),playHaptic(HapticType[e(275,"BAAI")],Q[e(352,"Yn[k")]),l(e(278,"ZFoN"))),u&&!x[e(361,"ac1N")]&&(playSound(GAME_SOUNDS[e(300,"CSf&")][e(323,"bpa^")],I[e(369,"egZQ")]),f[e(329,"egZQ")](playHaptic,HapticType.ERROR,Q[e(334,"84!X")]),f[e(282,"bpa^")](l,e(260,"H87W"))),!S&&!u&&(x.current=!1)},[S,u,l]);const O=useCallback(()=>{const e=a;x[e(376,"5$n4")]=!1,0===useFindDiffStore[e(285,"$O&7")]()[e(363,"7Pj@")][e(257,"^6KF")]&&useFindDiffStore[e(372,"egZQ")]()[e(280,"]2dW")](),useFindDiffStore.getState()[e(365,"N3$C")](),playSound(GAME_SOUNDS.FIND_DIFFERENT_NUMBER.START,I.current)},[]),G=useCallback(()=>{const e=a;l(f[e(318,"ZFoN")]),useFindDiffStore.getState().resetGame(),useFindDiffStore[e(364,"JP#l")]().generateRound()},[l]),D=useCallback(()=>{const e=a;e(296,"JP#l"),f[e(283,"ul#A")](f[e(353,"ac1N")],f[e(262,"LxSv")])?(x.current=!1,_.current?.(),useFindDiffStore[e(279,"iJ9D")]()[e(340,i)](),useFindDiffStore[e(261,"lG%a")]()[e(284,"MK4B")]()):(_0x91442(_0x2170a4.FIND_DIFFERENT_NUMBER.GAME_OVER,_0x242e11[e(255,"leaq")]),IODNRz.jqqbk(_0x4a550a,_0x124cef.ERROR,_0x31733b[e(305,i)]),_0x414177(IODNRz[e(310,"teBP")]))},[]),h=S||u;h&&0===C[a(315,"^z$i")]&&(C[a(324,"$O&7")]=useFindDiffStore[a(258,"Ef0Y")]().score),!h&&(C.current=0);const F=useMemo(()=>({isPlaying:m,gameOver:h,onStartGame:O,onStopGame:G,onShare:r,onShowLeaderboard:n,startButtonSubtext:"Find the 10 different numbers!"}),[m,h,O,G,r,n]),b=f[a(251,"q*ia")](useMemo,()=>{const e=a,o=S,t={};return t[e(269,"ti3&")]=h,t[e(281,"^z$i")]=C[e(255,"leaq")],t.scoreLabel=f[e(308,"84!X")],t[e(292,"]2dW")]=D,t[e(294,"7Pj@")]=o?e(252,"egZQ"):e(297,"9bHD"),t[e(366,"bpa^")]=o?f[e(263,"T$(h")]:e(345,"hf[R"),t[e(253,"8z8o")]=o?f[e(314,"(hEo")]:e(298,"SXfc"),t},[S,h,D]),N=useMemo(()=>({gameId:GAME_IDS.FIND_DIFFERENT_NUMBER,settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]),I=useRef(e?.[a(293,"ac1N")]??!0);I[a(248,"hL7f")]=e?.[a(250,"H87W")]??!0;const Q=useRef(e?.[a(290,"BAAI")]??!0);Q[a(249,"Y0)O")]=e?.[a(256,"ZFoN")]??!0;const P=e?.offset??0,E=useMemo(()=>({...styles[a(274,"lG%a")],marginTop:P}),[P]),y={};y[a(304,"leaq")]=I,y[a(295,"Y0)O")]=Q;const H={};H[a(349,"hf[R")]=P;const T={...F},v={...b};v[a(328,"K3TT")]=d,v[a(272,"H87W")]=s;const M={...N};return _0x3b734c(View,{style:styles[a(265,"%)Ys")],children:_0x3b734c(GestureHandlerRootView,{style:styles[a(268,"@AP&")],children:_0x247db6(_0x7306a7,{children:[_0x3b734c(View,{style:E,children:_0x3b734c(GameGrid,y)}),f[a(273,"%9CW")](_0x3b734c,ScoreBoard,H),_0x3b734c(GameControlButton,T),f[a(302,"MK4B")](_0x3b734c,GameOverModal,v),f[a(377,"LxSv")](_0x3b734c,GameSettingsModal,M)]})})})};const _0x32d742={};function _0x61db(){const e=["jCo4W7JdOsxcTCkEfYi","WQWSW5/dTmk8wCot","kCoqFwLW","khTWdWHvWRJdMmo+W6Ons1zT","W7DQWQJcOmoVWP5D","WORdNSkdWQZcRCkpW7W","W7bDW6RcLdW","WORdGbVdR8oFW5K","FSoNnmo2WOZcJGnKEarb","WRtcTCkRW4O9eSoaW6xdUd4","W4P+uvtcQa","emowWOFdG8kvWRvh","oxmICsqIW5e","zKtdTLRcGSktW5hdQHe","x2VdLJffW6RcQG","W4rbWQ7cSCoaW6y","WOX/imoxxmku","WQqWW4auW5xcKSk9pr0","cSo4vd5Ddmk9oW","EcWMxLWk","WOBdHCkIWRBcQCktW60","CJ4pxfqdW4BcMmoTW68","EaOpD8kVtJK1","W4NdLHtcK8k1zCk8W7tcUXzlqSkj","WPnHW6xcRmo0ySk6WQNdNSk0E8o8WQa","c0xcUmkTWOrbuW","qYuKqCoQBW","EbhdQSk3mMjRW4TX","xhJcKSkmWRTRtG7cULza","qCkoW5z/W5TnW4a","W6qgWO/dG8kx","s8oSWOZcSq","cCo3W5hdKCkxpv5Opa","u8kjWOlcLKpdImo7yqPdW4dcLmoHyq","W5FcHCoOW7tdV8omWQhdPvxcGHr2W7C","WPX5jmoexmkLWQVcSSkEiq","CHFdImkPnNv2","W5NdNctcLCkIyCk3W70","W4GMWQFdQ8kMo8o+","W47dHGxcK8k1zSkT","p04xWPVcQ3bd","WOvbBmkVWQLThG4","WQrHASkNWPZcRs9jqq","fSoqW4hdIb8","rmoRkCovWPmwW4C","vCkpwhldHtpdSweyWPVcHcRdHa","W4jcW7FcVGGriW","lCk3yCkTW5pcLI9FCW5BWR/cOH4L","fComW6PMW7zpW4Di","W4zsW7hcNXKEi8oA","W5RcICkmW5BcKq","xsqMwx0pW6/cImoTW68FDvbalmkkWQFdJ8ow","FCoLnSoXWOddNhryEc5jWPpcRa","iu/cK27cQSoYaW","WOvtWOxdH38","W4rrWRlcT8oaW7RcNa","WOydv13dQSoSW6u","wxddHsfmW6hcJCkZu8kcyYy","gSoCW7ddJmki","W7fBW6tcTu0+mmoEWPjRha","WOJdRY7cHmozW74j","WOZdG8kaWQJcRCkeW7ddHvq","W4tcI09KWRWaeW","i8o6DxTlWQRdNSkwbrxcR3/dKq","vhtcJ8kBWQnI","sSoLWP3cMSk5bM0b","WQ/dHCk3hSoqDSo2WOi","uhhdLYy","mbBcSwFcVSkXW63dLG","WObOWPBdH0i","W4vQWR/cNSo8","t8k+W6v/W58","xSkGDcf0cCkGdsC","W5tcUg7dGSkoWQPEb8oaWQJcPWLw","cmoMW43dHmk3e1jGkW","DGFdICkVjMLNW7D5WRNdPG","W4tdGchcImkJyCk7W7BcQG","yCkClmkZWRyoWOGSya","w3VdKbbuW6xcQSk5","xN/dII1fW7BcN8k4","oSouWQXgWP8","mblcQfhcI8kIW7ZdKG","cvmtqaqFW7y","eCkVW71CW61OW5a","WRrGECkNWO3cHdO","mCo9EG","WPtcGSkAW5GDu8o+W48","l8kaWO7dRf7dOCkMpgFcLCkVqCoj","umoXsvz8","i8o/W6pdSXu","W69PWPJdRSos","WOHOk8otwSkqWRBcUSkPpdeIWQu","WQG8W5NdLCkTvSotWQ0","W45yomowkmk7FLRcNmoSW43cU07dSW","WOdcKSkmW7GkqmoJW4JdNW","W5JcK0BcUCkmWOyIWR1ZWPzDwba","dMmhuG","p2GXys0PW63dQLCyWRpdVCoo","rJyXrSoMFrbxz8oqWQ3cJ8omBa","j8klWRddPu3dUCktpLtcK8k0","W449WRtdU8kVmmozWQ7dUCkpCCo8","m04oWO3cOwXKWOJdHCor","WO0xvvVdPSoHW5qTCHxcJ3iAC07cUa","WO5lA8kz","g8kKE8oMW7xcGYfdC0S","W5f+vr/cJSoIW5RdQ8o+AfzxW4hcSSoJW4lcP31ohq","WOqAteJdOColW6uMFGq","lKySBMxdI23cLCodWRWQWQSzWQNdRY9PFmoEWO7dOW","B8kkcmkmWQmwWPuN","WO5df8ooqW","xSkWW5NdNSoDWPjrW6RcS8orAG7dGW","W5tcKuH4WR0RcCoEq8kaWOere8ovWR4","WRuGW4edW4tcU8kO","wSkQBGzHaCk6dq","C8kSyeddMa","oSobWR3dM8kb","yYudW6CqWQyPdG","dSoJWOZcUmkE","W7n6WQNcPSo/WOjmuCkUW5v+","oCoEeSkzWOaCWPuY","iCkwWQpdPKhdSmk+pehcN8k+","WPyDtmkCvW","qmoNvfz8W6ldOa","pCoBW6ZdSmk8pNzdh8kCdSoribZcGCk6jmkmWRPwvG","WRbWF8kgWPZcIZPb","eCo7F2XK","W4hcKLHU","WPmeWRhdU1Lhy8onWP5bBmkeW6m","W5tcUMRdHCkbWQTFy8oIWQxcRJrDWPW","WRrWzCkHWO3cMa"];return(_0x61db=function(){return e})()}_0x32d742[_0x56225d(354,"Ef0Y")]=1,_0x32d742[_0x56225d(370,"9bHD")]=BACKGROUND_COLOR;const _0x3dad39={};_0x3dad39[_0x56225d(289,"CSf&")]=1;const _0x333c7d={};function _0x4c66(e,o){e-=248;const t=_0x61db();let W=t[e];if(void 0===_0x4c66.HnAxSl){const e=function(e,o){let t,W,r=[],d=0,n="";for(e=function(e){let o="",t="";for(let t,W,r=0,d=0;W=e.charAt(d++);~W&&(t=r%4?64*t+W:W,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=o.length;e<W;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),W=0;W<256;W++)r[W]=W;for(W=0;W<256;W++)d=(d+r[W]+o.charCodeAt(W%o.length))%256,t=r[W],r[W]=r[d],r[d]=t;W=0,d=0;for(let o=0;o<e.length;o++)W=(W+1)%256,d=(d+r[W])%256,t=r[W],r[W]=r[d],r[d]=t,n+=String.fromCharCode(e.charCodeAt(o)^r[(r[W]+r[d])%256]);return n};_0x4c66.RyCUIk=e,_0x4c66.BDFRrZ={},_0x4c66.HnAxSl=!0}const r=t[0];_0x4c66.dlJhUY!==r&&(_0x4c66.BDFRrZ={},_0x4c66.dlJhUY=r);const d=_0x4c66.BDFRrZ[e];return void 0===d?(void 0===_0x4c66.dLIooQ&&(_0x4c66.dLIooQ=!0),W=_0x4c66.RyCUIk(W,o),_0x4c66.BDFRrZ[e]=W):W=d,W}_0x333c7d[_0x56225d(319,"leaq")]=1,_0x333c7d[_0x56225d(291,"hf[R")]=_0x56225d(338,"hL7f"),_0x333c7d[_0x56225d(299,"Y0)O")]=_0x56225d(322,"N3$C");const _0x474fd9={};_0x474fd9.container=_0x32d742,_0x474fd9[_0x56225d(311,"T$(h")]=_0x3dad39,_0x474fd9.gameArea=_0x333c7d;const styles=StyleSheet[_0x56225d(339,"MK4B")](_0x474fd9);FindDifferentNumber[_0x56225d(351,"^6KF")]=_0x56225d(374,"$PCi");
|
|
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{scoreColumn,textColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{GAME_DURATION,getLayout,LIGHT}from"./FindDifferentNumberConstants.js";import{createGame,dispose,drag,reset,setLayout,setTheme,start,tick}from"./FindDifferentNumberGame.js";import{DIFFERENT_COUNT}from"./FindDifferentNumberRules.js";import{jsx as _0x1fafb1}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.FIND_DIFFERENT_NUMBER,FEEDBACK={correct:{sound:SOUNDS.CORRECT,haptic:HapticType.SUCCESS},wrong:{sound:SOUNDS.WRONG,haptic:HapticType.WARNING},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS},lose:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR}};export const FindDifferentNumber=engineGame(GAME_IDS.FIND_DIFFERENT_NUMBER,e=>{const[t,r]=useLiveState(0),[s,i]=useLiveState(GAME_DURATION),[n,o]=useLiveState(DIFFERENT_COUNT),{game:a,theme:m,status:u,screen:E,gameOver:S}=useEngineGame(e,{gameId:GAME_IDS.FIND_DIFFERENT_NUMBER,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,s)=>{const i=getLayout(t,r,s,isTablet);return setLayout(e,i),i.size+2*i.pad},drag:drag,sounds:SOUNDS,onStart:e=>e(SOUNDS.START),wire:(e,t)=>{e.onScore=r,e.onTime=i,e.onLeft=o,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}});return _0x1fafb1(EngineGameScreen,{...E,light:LIGHT,columns:[scoreColumn(t),textColumn("LEFT",n),timerColumn(s,m)],subtext:"Find the different numbers!",gameOver:S({title:"win"===u?"GREAT JOB!":"TIME UP!",message:"win"===u?"You found all the different numbers!":"You ran out of time!",scoreLabel:"Score",score:a.score,buttonText:"win"===u?"Play Again!":"Try Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{getScoreBoardTop}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";import{GRID}from"./FindDifferentNumberRules.js";export const GAME_DURATION=120;export const POINTS_PER_FIND=500;export const WRONG_PENALTY=3;export const COLORS={CLASSIC_BOARD:"rgba(255, 255, 255, 0.10)",CLASSIC_RIM:"rgba(255, 255, 255, 0.35)",LIGHT_BOARD:"#D3DBE8",LIGHT_RIM:"#AEBBD0",TILE:"#FFFFFF",TEXT:"#0D1757",FOUND:"#4FC562",FOUND_TEXT:"#FFFFFF",WRONG:"#FF5252"};export const TILT=0;export const LIGHT=frontLight([0,0,1],1);export const TILE_HEIGHT=.2;export const FOUND_SCALE=1.18;const SCOREBOARD_HEIGHT=82,CONTROLS_HEIGHT=120;export function getLayout(t,o,r,e){const i=e?6:4,n=e?10:6,I=getScoreBoardTop(r)+82,s=Math.max(200,o-I-120),D=(gameWidthFor(t)-2*n-i*(GRID-1))/GRID,R=(s/Math.cos(0)-2*n-i*(GRID-1))/GRID,p=Math.max(18,Math.floor(Math.min(D,R)));return{width:t,height:o,tilt:0,centerY:I+s/2,tile:p,gap:i,pitch:p+i,pad:n,size:p*GRID+i*(GRID-1)}}export const cellCentre=(t,o)=>{const r=(GRID-1)/2;return[(o%GRID-r)*t.pitch,(r-Math.floor(o/GRID))*t.pitch]};export function cellAt(t,o,r){const e=o+t.size/2,i=t.size/2-r,n=Math.floor(e/t.pitch),I=Math.floor(i/t.pitch);return I<0||I>=GRID||n<0||n>=GRID?-1:e-n*t.pitch<=t.tile&&i-I*t.pitch<=t.tile?I*GRID+n:-1}
|
|
@@ -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,GAME_DURATION,POINTS_PER_FIND,TILE_HEIGHT,WRONG_PENALTY}from"./FindDifferentNumberConstants.js";import{DIFFERENT_COUNT,generatePuzzle}from"./FindDifferentNumberRules.js";import{buildScene,celebrate,dim,intro,markFound,markWrong,paint,removeScene,setSceneTheme,showNumbers}from"./FindDifferentNumberScene.js";const WORLD_CAPACITY=500;export function createGame(e){const o=new World(500),n={world:o,camera:{eye:[0,0,240],target:[0,0,0],fov:1,ortho:1},theme:e,layout:null,scene:null,phase:"ready",puzzle:generatePuzzle(),found:new Set,won:!1,get score(){return o.scoreboard.score},get timeLeft(){return o.scoreboard.shownSeconds},onPhase:e=>{},onScore:e=>{},onTime:e=>{},onLeft:e=>{},onEvent:e=>{}};return o.scoreboard.reset(0,GAME_DURATION),o.scoreboard.handlers={onSecond:e=>n.onTime(e),onTimeUp:()=>"playing"===n.phase&&end(n,!1)},n}const left=e=>DIFFERENT_COUNT-e.found.size;export function setLayout(e,o){const n=!e.scene;e.scene&&removeScene(e.world,e.scene),e.layout=o,aimTilted(e.camera,o),e.scene=buildScene(e.world,o,e.theme,e.puzzle.numbers,e.found),n&&intro(e.world,e.scene)}export function setTheme(e,o){e.theme=o,e.layout&&e.scene&&setSceneTheme(e.world,e.layout,e.scene,o,e.found)}export function start(e){"ready"===e.phase&&(e.phase="playing",e.world.scoreboard.startCountdown(GAME_DURATION),e.onPhase("playing"))}export function reset(e){e.puzzle=generatePuzzle(),e.found=new Set,e.won=!1,e.world.scoreboard.reset(0,GAME_DURATION),e.phase="ready",e.scene&&(showNumbers(e.world,e.scene,e.puzzle.numbers),paint(e.world,e.scene,e.theme,e.found),intro(e.world,e.scene)),e.onScore(0),e.onTime(GAME_DURATION),e.onLeft(DIFFERENT_COUNT),e.onPhase("ready")}export function dispose(e){e.world.dispose()}export function tick(e,o){e.world.isDisposed||e.world.update(o)}function end(e,o){e.world.scoreboard.stop(),e.won=o,e.phase="over";const{layout:n,scene:r}=e;n&&r&&(o?celebrate(e.world,n,r):dim(e.world,r,e.theme,e.found)),e.onPhase("over"),e.onEvent(o?"win":"lose")}export function tapCell(e,o){if("playing"!==e.phase||o<0||o>=e.puzzle.numbers.length||e.found.has(o))return;const{layout:n,scene:r}=e;if(e.puzzle.different.has(o)){e.found.add(o),e.world.scoreboard.add(POINTS_PER_FIND);const n=left(e)<=0;return n&&e.world.scoreboard.set(calculateTimeBasedScore(GAME_DURATION-e.timeLeft,GAME_DURATION,e.score)),r&&markFound(e.world,r,o),e.onScore(e.score),e.onLeft(left(e)),e.onEvent("correct"),void(n&&end(e,!0))}e.world.scoreboard.addTime(-Math.min(WRONG_PENALTY,e.world.scoreboard.seconds)),n&&r&&markWrong(e.world,n,r,e.camera,o,e.theme),e.onTime(e.timeLeft),e.onEvent("wrong"),e.timeLeft<=0&&end(e,!1)}export function cellUnder(e,o,n){const r=e.layout;if(!r)return-1;const[t,s]=unproject(r,o,n,1+r.tile*TILE_HEIGHT);return cellAt(r,t,s)}export function drag(e,{phase:o,x:n,y:r}){"start"===o&&tapCell(e,cellUnder(e,n,r))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export const GRID=10;export const CELLS=100;export const DIFFERENT_COUNT=10;const SIMILAR=[[8,9,6,3],[7,4,2],[7,1,3],[8,9,5,0,2],[1,9,7,6],[6,9,3,8],[9,5,0,8,4],[1,2,4],[0,3,6,9,5],[6,0,4,3,8,5]];export function generatePuzzle(){const o=10+Math.floor(90*Math.random()),t=Math.floor(o/10),r=o%10,n=[];for(const e of SIMILAR[t]){const t=10*e+r;t>=10&&t<=99&&t!==o&&n.push(t)}for(const e of SIMILAR[r]){const r=10*t+e;r>=10&&r<=99&&r!==o&&n.push(r)}const e=n[Math.floor(Math.random()*n.length)],s=new Set;for(;s.size<10;)s.add(Math.floor(100*Math.random()));return{numbers:Array.from({length:100},(t,r)=>s.has(r)?e:o),different:s}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,Path}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{flatGlyphMesh,GLYPH_ADVANCE}from"../shared/EngineGlyphs.js";import{cacheGameAsset,createGameMesh as _0x4c7036}from"../shared/EngineMeshes.js";import{placeTiltedBackdrop}from"../shared/EngineTilt.js";import{toColor}from"../shared/EngineUtils.js";import{cellCentre,COLORS,FOUND_SCALE,TILE_HEIGHT}from"./FindDifferentNumberConstants.js";import{CELLS,GRID}from"./FindDifferentNumberRules.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("find-different-number/FindDifferentNumberScene:"+e,o),meshes.set(e,t)),t},BOARD_DEPTH=10,BACKDROP_DEPTH=30,SURFACE=1,panelMesh=(e,o,t)=>cached("fdn-panel:"+e+":"+o+":"+t,()=>_0x4c7036(extrude((new Path).addRoundedRect(-e/2,-e/2,e,e,o),{depth:t}),{shine:0}));function skin(e){return{tile:toColor(COLORS.TILE),text:toColor(COLORS.TEXT)}}const FOUND=toColor(COLORS.FOUND),FOUND_TEXT=toColor(COLORS.FOUND_TEXT),WRONG=toColor(COLORS.WRONG);function spawnBoard(e,o,t){const s=o.size+2*o.pad,n="classic"===t.mode,i=[e.spawn({mesh:panelMesh(s,n?14:8,10),position:[0,0,-5],color:toColor(n?COLORS.CLASSIC_BOARD:"light"===t.mode?COLORS.LIGHT_BOARD:t.BOARD.SURFACE),pickable:!1})];return i.push(e.spawn({mesh:panelMesh(s+3,n?15:9,8),position:[0,0,-6.2],color:toColor(n?COLORS.CLASSIC_RIM:"light"===t.mode?COLORS.LIGHT_RIM:t.BOARD.BORDER),pickable:!1})),i}const digitSize=e=>.34*e.tile,WEIGHT=1.2;export function buildScene(e,o,t,s,n){const i=spawnBackdrop(e,o.width,o.height,-30,t);placeTiltedBackdrop(e,i,o,30);const r=o.tile*TILE_HEIGHT,a=digitSize(o),l=a*GLYPH_ADVANCE/2,p=[];for(let t=0;t<CELLS;t++){const[s,n]=cellCentre(o,t),i=e.spawn({mesh:"none",position:[s,n,1],pickable:!1}),d=spawnRaisedBlock(e,{parent:i,position:[0,0,r/2],size:[o.tile,o.tile,r],color:[1,1,1,1],gloss:!1,shadow:!1}),f=o=>e.spawn({mesh:flatGlyphMesh("0",1.2),parent:i,position:[o,0,r+.6],scale:a,pickable:!1});p.push({root:i,block:d,digits:[f(-l),f(l)]})}const d={backdrop:i,board:spawnBoard(e,o,t),tiles:p};return showNumbers(e,d,s),paint(e,d,t,n),d}export function removeScene(e,o){for(const t of[o.backdrop,...o.board,...o.tiles.map(e=>e.root)])e.despawn(t)}export function paint(e,o,t,s){const n=skin(t),i=e.transforms;o.tiles.forEach((e,o)=>{const t=s.has(o),r=t?FOUND:n.tile,a=t?FOUND_TEXT:n.text;i.color(e.block,r[0],r[1],r[2],r[3]??1);for(const o of e.digits)i.color(o,a[0],a[1],a[2],a[3]??1)}),i.flush()}export function setSceneTheme(e,o,t,s,n){setBackdropTheme(e,t.backdrop,s);for(const o of t.board)e.despawn(o);t.board=spawnBoard(e,o,s),paint(e,t,s,n)}export function showNumbers(e,o,t){o.tiles.forEach((o,s)=>{const n=t[s],i=void 0===n?"":String(n).padStart(2,"0");o.digits.forEach((o,t)=>e.set(o,{mesh:i?flatGlyphMesh(i[t],1.2):"none"}))})}export function intro(e,o){o.tiles.forEach((o,t)=>{e.stopAnimation(o.root),e.set(o.root,{scale:.01}),e.animate(o.root,{scale:1},{duration:.22,delay:.018*(Math.floor(t/GRID)+t%GRID),easing:"back"})})}export function markFound(e,o,t){const s=o.tiles[t];if(s){e.set(s.block,{color:FOUND});for(const o of s.digits)e.set(o,{color:FOUND_TEXT});e.animate(s.root,[{scale:FOUND_SCALE,at:.4},{scale:1}],{duration:.3,easing:"easeOut"})}}export function markWrong(e,o,t,s,n,i){const r=t.tiles[n];if(!r)return;const a=skin(i).tile;e.stopAnimation(r.block),e.animate(r.block,[{color:blend(a,WRONG,.65),at:.18},{color:a}],{duration:.4,easing:"easeOut"}),e.animate(r.root,{shake:.12*o.tile},{duration:.25}),s.shake=.08*o.tile}const blend=(e,o,t)=>[e[0]+(o[0]-e[0])*t,e[1]+(o[1]-e[1])*t,e[2]+(o[2]-e[2])*t,1];export function celebrate(e,o,t){t.tiles.forEach((t,s)=>{const[n,i]=cellCentre(o,s);e.animate(t.root,[{position:[n,i,1+.4*o.tile],at:.4},{position:[n,i,1]}],{duration:.4,delay:.25+.025*(Math.floor(s/GRID)+s%GRID),easing:"easeOut"})}),effects.confetti(e,{position:[0,0,2*o.tile],count:70,size:.22*o.tile,speed:1.4*o.size,lifetime:1.3,gravity:2.4*-o.size,colors:["#FFD700","#4CAF50","#2196F3","#E74C3C"].map(e=>toColor(e))})}export function dim(e,o,t,s){const n=skin(t).tile,i=o.tiles.filter((e,o)=>!s.has(o)).map(e=>e.block);i.length&&e.animate(i,{color:[.55*n[0],.55*n[1],.6*n[2],n[3]??1]},{duration:.4})}
|
|
@@ -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{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{backgroundFor,lightFor}from"../shared/EngineMeadow.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,TIME_LIMIT}from"./FlappyBirdConstants.js";import{createGame,dispose,flap,reset,setLayout,setTheme,start,tick}from"./FlappyBirdGame.js";import{jsx as _0x3f8813}from"react/jsx-runtime";const SFX=GAME_SOUNDS.FLAPPY_BIRD;export const FlappyBird=engineGame(GAME_IDS.FLAPPY_BIRD,e=>{const[t,r]=useLiveState(0),[s,o]=useLiveState(TIME_LIMIT),{theme:i,status:a,screen:m,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.FLAPPY_BIRD,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,r,s)=>setLayout(e,getLayout(t,r,s)),drag:(e,{phase:t})=>{"start"===t&&flap(e)},sounds:SFX,onStart:e=>e(SFX.START,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=r,e.onTime=o,e.onFlap=()=>t(SFX.FLAP,HapticType.LIGHT),e.onPass=()=>t(SFX.PASS,HapticType.LIGHT),e.onCrash=()=>t(SFX.GAME_OVER,HapticType.HEAVY),e.onWin=()=>t(SFX.WIN,HapticType.SUCCESS)}}),p=useMemo(()=>lightFor(i),[i]),u=useMemo(()=>backgroundFor(i),[i]);return _0x3f8813(EngineGameScreen,{...m,light:p,background:u,columns:[scoreColumn(t),timerColumn(s,i,10)],subtext:"Tap to flap!",gameOver:n({title:"win"===a?"YOU WON!":"GAME OVER",message:"win"===a?"You survived the flight!":"You hit a pipe!",scoreLabel:"Final Score",score:t,buttonText:"Fly Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{isTablet}from"../../services/UtilsService.js";export const TIME_LIMIT=120;export const PASS_SCORE=500;export const STEP=1/60;export const STEP_TOLERANCE=.002;export const MAX_PENDING=.05;export const BIRD_SIZE=isTablet?56:40;export const GRAVITY=isTablet?.4:.3;export const JUMP_VELOCITY=isTablet?-6.5:-4.5;export const MAX_FALL_SPEED=isTablet?8:6;export const DAMPING=.98;export const PIPE_WIDTH=isTablet?80:60;export const PIPE_GAP=isTablet?260:200;export const PIPE_SPEED=isTablet?5:4;export const MIN_PIPE_HEIGHT=isTablet?130:100;export const FIRST_PIPE=.5;export const PIPE_INTERVAL=2.5;export const BRICK_WIDTH=isTablet?56:40;export const BRICK_HEIGHT=isTablet?28:20;export const tiltFor=t=>(120*Math.max(0,Math.min(1,(t+15)/30))-30)*Math.PI/180;export const wingFor=t=>{const o=Math.max(-6,Math.min(7,t));return o<0?o/-6*-.65:o/7*.25};export const RIG={eyeHeight:1.6,horizon:.68,playDepth:4};export const meadowFor=t=>({sun:[.8,t],clouds:[.24,.55],framingTrees:!0,foreground:!1,hotAirBalloons:2});export function getLayout(t,o,e){return{width:t,height:o,offset:e,birdX:.2*t,birdStartY:.4*o,topWall:150+e,bottomWallTop:o-(e>0?150:250)}}export function randomGapTop(t){const o=t.bottomWallTop-t.topWall;if(isTablet){const e=.15*o;return t.topWall+o/2-PIPE_GAP/2-e+Math.random()*e*2}const e=t.topWall+MIN_PIPE_HEIGHT,r=t.topWall+.6*o;return e+Math.random()*(r-e)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{cameraFor,makeView,spawnWorld}from"../shared/EngineMeadow.js";import{BIRD_SIZE,DAMPING,FIRST_PIPE,GRAVITY,JUMP_VELOCITY,MAX_FALL_SPEED,MAX_PENDING,meadowFor,PASS_SCORE,PIPE_GAP,PIPE_INTERVAL,PIPE_SPEED,PIPE_WIDTH,randomGapTop,RIG,STEP,STEP_TOLERANCE,tiltFor,TIME_LIMIT,wingFor}from"./FlappyBirdConstants.js";import{blink,crashBurst,dazeBird,flapPop,hoverBird,placeBird,placePipe,placeWalls,spawnBird,spawnPipe,spawnWalls,wakeBird}from"./FlappyBirdScene.js";const WORLD_CAPACITY=900;export function createGame(o){const r=new World(900),e={world:r,camera:{eye:[0,1.6,0],target:[0,1.6,-1],fov:.9},theme:o,layout:null,view:null,scenery:[],walls:null,scroll:0,bird:null,phase:"ready",get score(){return r.scoreboard.score},get timeLeft(){return r.scoreboard.shownSeconds},won:!1,time:0,pending:0,birdY:0,velocity:0,tiltShown:0,wingPhase:0,wingLift:0,farLift:0,flapT:1,blinkIn:2,pipes:[],onPhase:o=>{},onScore:o=>{},onTime:o=>{},onFlap:()=>{},onPass:()=>{},onCrash:()=>{},onWin:()=>{}};return r.scoreboard.reset(0,TIME_LIMIT),r.scoreboard.handlers={onSecond:o=>e.onTime(o),onTimeUp:()=>"playing"===e.phase&&end(e,!0)},e}const after=(o,r,e)=>o.world.after(r,e);export function setLayout(o,r){const e=o.world;for(const r of o.scenery)e.despawn(r);o.walls&&(e.despawn(o.walls.top),e.despawn(o.walls.bottom)),clearPipes(o),o.bird&&e.despawn(o.bird.root);const a=!o.layout;o.layout=r;const n=makeView(r.width,r.height,RIG);o.view=n;const i=cameraFor(n);o.camera.eye=i.eye,o.camera.target=i.target,o.camera.fov=i.fov,o.scenery=spawnWorld(e,n,o.theme,meadowFor(sunY(r))),o.walls=spawnWalls(e,n,r),placeWalls(e,n,r,o.walls,o.scroll),(a||"playing"!==o.phase)&&(o.birdY=r.birdStartY),o.bird=spawnBird(e,n,r.birdX+BIRD_SIZE/2,o.birdY+BIRD_SIZE/2),hoverBird(e,o.bird,"ready"===o.phase,n),drawBird(o)}const sunY=o=>.25+.9*o.offset/o.height;export function setTheme(o,r){if(r===o.theme&&o.scenery.length)return;o.theme=r;const e=o.view,a=o.layout;if(e&&a&&!o.world.isDisposed){for(const r of o.scenery)o.world.despawn(r);o.scenery=spawnWorld(o.world,e,r,meadowFor(sunY(a)))}}function clearPipes(o){for(const r of o.pipes)o.world.despawn(r.root);o.pipes=[]}function drawBird(o){const r=o.layout,e=o.view;r&&e&&o.bird&&placeBird(o.world,e,o.bird,r.birdX+BIRD_SIZE/2,o.birdY+BIRD_SIZE/2,o.tiltShown,o.wingLift,o.farLift)}const FLAP_BEAT_TIME=.32,TILT_FOLLOW=12;function animateBird(o,r){const e=o.bird;if(!e)return;const a=o=>1-Math.exp(-r*o);if("over"===o.phase)o.wingLift+=(-.55-o.wingLift)*a(8),o.farLift+=(-.55-o.farLift)*a(8);else{const n="ready"===o.phase;o.flapT+=r;const i=!n&&o.flapT<.32,t=o.velocity<0,[s,l,d]=i?[13,.95-o.flapT/.32*.35,-.1]:n?[6.5,.75,.1]:t?[7,.45,-.15]:[2.5,.12,.15+1.6*wingFor(o.velocity)];o.wingPhase+=r*s*Math.PI*2,o.wingLift=d+Math.sin(o.wingPhase)*l,o.farLift=d+Math.sin(o.wingPhase-.6)*l,o.tiltShown+=((n?0:tiltFor(o.velocity))-o.tiltShown)*a(12),o.blinkIn-=r,o.blinkIn<=0&&(blink(o.world,e),o.blinkIn=2+3*Math.random())}drawBird(o)}export function start(o){const r=o.layout;"ready"===o.phase&&r&&(o.birdY=r.birdStartY,o.velocity=0,o.pending=0,o.phase="playing",o.world.scoreboard.startCountdown(TIME_LIMIT),o.bird&&o.view&&hoverBird(o.world,o.bird,!1,o.view),drawBird(o),o.onPhase("playing"),after(o,FIRST_PIPE,()=>spawn(o)),after(o,PIPE_INTERVAL,()=>spawnLoop(o)))}function spawnLoop(o){"playing"===o.phase&&(spawn(o),after(o,PIPE_INTERVAL,()=>spawnLoop(o)))}function spawn(o){const r=o.layout,e=o.view;if(!r||!e||"playing"!==o.phase)return;const a=randomGapTop(r),n=r.width;o.pipes.push({x:n,gapTop:a,gapBottom:a+PIPE_GAP,passed:!1,root:spawnPipe(o.world,e,r,n,a,a+PIPE_GAP)})}export function reset(o){o.world.cancelTimers(),clearPipes(o);const r=o.layout;r&&(o.birdY=r.birdStartY),o.velocity=0,o.pending=0,o.world.scoreboard.reset(0,TIME_LIMIT),o.won=!1,o.phase="ready",o.tiltShown=0,o.bird&&wakeBird(o.world,o.bird),o.bird&&o.view&&hoverBird(o.world,o.bird,!0,o.view),drawBird(o),o.onScore(0),o.onTime(TIME_LIMIT),o.onPhase("ready")}export function dispose(o){o.world.cancelTimers(),o.world.dispose()}function end(o,r){o.world.scoreboard.stop(),o.world.cancelTimers(),o.won=r,o.phase="over",!r&&o.bird&&dazeBird(o.world,o.bird),r?o.onWin():o.onCrash(),o.onPhase("over")}export function tick(o,r){if(!o.world.isDisposed){if(o.time+=r,"playing"===o.phase){o.pending=Math.min(o.pending+r,MAX_PENDING);let e=!1;for(;o.pending>=STEP-STEP_TOLERANCE&&"playing"===o.phase;)o.pending-=STEP,step(o),e=!0;e&&drawWorld(o)}animateBird(o,r),o.world.update(r)}}export function flap(o){"playing"===o.phase&&(o.velocity=JUMP_VELOCITY,o.flapT=0,o.bird&&flapPop(o.world,o.bird),o.onFlap())}function step(o){const r=o.layout;let e=(o.velocity+GRAVITY)*DAMPING;e>MAX_FALL_SPEED&&(e=MAX_FALL_SPEED);let a=o.birdY+e,n=!1,i=!1;a<r.topWall&&(a=r.topWall,e=0,n=!0),a+BIRD_SIZE>r.bottomWallTop&&(a=r.bottomWallTop-BIRD_SIZE,i=!0),o.birdY=a,o.velocity=e,o.scroll+=PIPE_SPEED;let t=0;o.pipes=o.pipes.filter(e=>(e.x-=PIPE_SPEED,!e.passed&&e.x+PIPE_WIDTH<r.birdX&&(e.passed=!0,t++),!(e.x+PIPE_WIDTH<0&&(o.world.despawn(e.root),1)))),t&&(o.onScore(o.world.scoreboard.add(t*PASS_SCORE)),o.onPass());const s=r.birdX+BIRD_SIZE/2;let l=null;n?l=r.topWall+BIRD_SIZE/2:i?l=r.bottomWallTop-BIRD_SIZE/2:o.pipes.some(o=>r.birdX+BIRD_SIZE>o.x&&r.birdX<o.x+PIPE_WIDTH&&(a<o.gapTop||a+BIRD_SIZE>o.gapBottom))&&(l=a+BIRD_SIZE/2),null!==l&&(drawWorld(o),o.view&&crashBurst(o.world,o.view,s,l),end(o,!1))}function drawWorld(o){const r=o.view,e=o.layout;if(!r||!e)return;const a=o.world.transforms;for(const e of o.pipes)placePipe(o.world,r,e.root,e.x,a);a.flush(),o.walls&&placeWalls(o.world,r,e,o.walls,o.scroll),drawBird(o)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,lathe,merge,Path,quat,recolor,shapeGeometry,tube}from"@nayan-ui/engine";import{at,facing,pointSize}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0xd0e9e}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{BIRD_SIZE,BRICK_HEIGHT,BRICK_WIDTH,PIPE_WIDTH}from"./FlappyBirdConstants.js";const meshes=new Map,cached=(e,t)=>{let o=meshes.get(e);return!o&&(o=cacheGameAsset("flappy-bird/FlappyBirdScene:"+e,t),meshes.set(e,o)),o},rgb=e=>{const[t,o,a]=toColor(e);return[t,o,a]},mix=(e,t,o)=>[e[0]+(t[0]-e[0])*o,e[1]+(t[1]-e[1])*o,e[2]+(t[2]-e[2])*o],sphere=()=>shapeGeometry("sphere"),beakPart=(e,t,o,a,s)=>({geometry:lathe([[t,0],[.6*t,.5*e],[.001,e]],{segments:12,color:o}),position:a,rotation:quat.multiply(quat.z(s),quat.z(-Math.PI/2))}),clamp01=e=>Math.max(0,Math.min(1,e)),smoothstep=e=>{const t=clamp01(e);return t*t*(3-2*t)},BODY_TOP=rgb("#FFE14D"),BODY_BOTTOM=rgb("#FFAA1F"),BELLY=rgb("#FFF4CC"),BLUSH=rgb("#FF8C9A"),FEATHER=rgb("#F08A12"),feather=(e,t,o)=>tube(e,{radius:e=>t*Math.max(.08,1-.85*e),shape:e=>.35+.65*Math.abs(Math.cos(e*Math.PI*2)),sides:8,smoothness:5,color:[...o,1]}),birdMesh=()=>cached("fb-bird",()=>{const e=Array.from({length:17},(e,t)=>{const o=t/16;return[Math.max(.001,.47*Math.sin(Math.PI*o)**.75*(1-.16*o)),.5-o]}),t=merge([{geometry:lathe(e,{segments:28}),rotation:quat.z(-Math.PI/2),scale:[1,.92,.86]}]),o=recolor(t,({position:[e,t,o]})=>{let a=mix(BODY_BOTTOM,BODY_TOP,clamp01(.5+1.3*t+.25*e));return a=mix(a,BELLY,smoothstep(4*(.06-t))*smoothstep(3*o+.3)*smoothstep(3*(e+.32))*.95),a=mix(a,BLUSH,.8*smoothstep(1-Math.hypot(e-.2,t+.06,o-.33)/.11)),[...a,1]});return _0xd0e9e(merge([{geometry:o},{geometry:sphere(),position:[.22,.15,.26],scale:.32,color:[1,1,1]},{geometry:sphere(),position:[.3,.16,.38],scale:.15,color:rgb("#151515")},{geometry:sphere(),position:[.33,.2,.445],scale:.05,color:[1,1,1]},beakPart(.3,.1,rgb("#FF7B3A"),[.4,0,.06],.12),beakPart(.24,.08,rgb("#D9531A"),[.39,-.07,.06],-.2),{geometry:feather([[.02,.36,0],[0,.52,0],[-.1,.6,0]],.07,rgb("#FF9500"))},{geometry:feather([[.1,.36,.02],[.12,.5,.02],[.06,.6,.02]],.06,rgb("#FFB300"))},{geometry:feather([[-.06,.34,-.02],[-.14,.46,-.02],[-.24,.5,-.02]],.055,FEATHER)},...[.2,.02,-.16].map((e,t)=>({geometry:tube([[-.34,.02,0],[-.52,.04+.6*e,0],[-.68,.06+e,0]],{radius:e=>.13*(.55+.45*Math.sin(Math.PI*(.25+.6*e))),shape:e=>.45+.55*Math.abs(Math.cos(e*Math.PI*2)),sides:10,smoothness:5,color:[...mix(FEATHER,rgb("#C2600A"),.35*t),1]})})),...[.12,-.12].map(e=>({geometry:feather([[.02,-.36,e],[-.08,-.46,e],[-.2,-.48,e]],.035,rgb("#FF7B3A"))}))]),{center:!1,shine:.35})}),wingMesh=e=>cached("fb-wing:"+e,()=>{const t=[[.06,.06],[-.12,.14],[-.34,.12],[-.56,.02],[-.5,-.04],[-.55,-.09],[-.44,-.11],[-.47,-.17],[-.34,-.17],[-.12,-.12],[.06,-.05]],o=(new Path).moveTo(t[0][0],-t[0][1]);for(const[e,a]of t.slice(1))o.lineTo(e,-a);o.close();const[a,s]=e?[rgb("#B86A08"),rgb("#D9901F")]:[rgb("#F59E0B"),rgb("#FFD35C")];return _0xd0e9e(recolor(extrude(o,{depth:.07}),({position:[e]})=>[...mix(a,s,clamp01(-e/.55)),1]),{center:!1,shine:.25})}),lidMesh=()=>cached("fb-lid",()=>_0xd0e9e(merge([{geometry:sphere(),color:BODY_TOP}]),{shine:.35})),pipeMesh=()=>cached("fb-pipe",()=>_0xd0e9e(lathe([[.5,-.5],[.5,.5]],{segments:24,color:rgb("#4CA840")}),{center:!1,shine:.55})),capMesh=()=>cached("fb-cap",()=>_0xd0e9e(merge([{geometry:lathe([[.001,.5],[.5,.5],[.52,.42],[.52,-.42],[.5,-.5]],{segments:24,color:rgb("#3A8A2A")})},{geometry:sphere(),position:[0,.5,0],scale:[.78,.02,.78],color:rgb("#123d10")}]),{center:!1,shine:.6})),SHADE_PERIOD=12;function brickShade(e,t){const o=(t%12+12)%12,a=43758.5453*Math.sin(127.1*e+311.7*o),s=a-Math.floor(a),n=rgb("#9E5428");return s<.5?mix(rgb("#6E3412"),n,2*s):mix(n,rgb("#B8693A"),2*(s-.5))}function wallGeometry(e,t,o,a){const s=BRICK_WIDTH*o,n=BRICK_HEIGHT*o,r=e*o,i=t*o,l=COPING*o,p=.35*n,h=.12*n,m=[],g=(e,t,o,a,s,n,r)=>m.push({geometry:shapeGeometry("cube"),position:[(e+t)/2,(o+a)/2,(s+n)/2],scale:[t-e,a-o,n-s],color:r});g(-r/2,r/2,l,i,0,a,rgb("#3a1d0c")),g(-r/2,r/2,0,l,-.01,a+p+.025,rgb("#c8b896")),g(-r/2,r/2,.78*l,l,a+p+.005,a+p+.03,rgb("#a9987a"));const u=Math.ceil((i-l)/n);for(let e=0;e<u;e++){const t=l+e*n,o=Math.min(i,t+n);for(let n=0,i=-r/2-(e%2?s/2:0);i<r/2;n++,i+=s){const l=Math.max(i,-r/2),m=Math.min(i+s,r/2);m-l<=h||o-t<=h||g(l+h/2,m-h/2,t+h/2,o-h/2,a-.01,a+p,brickShade(e,n))}}return merge(m)}const local=(e,t,o,a=0)=>[t*e,-o*e,a],CAP_HEIGHT=26,CAP_OVER=5,COPING=12,WALL_MARGIN=160,PIPE_INTO_WALL=220,wallDepth=e=>{const t=(PIPE_WIDTH+PIPE_WIDTH/60*10)/2*pointSize(e);return{back:e.playDepth+t+.04,thickness:2*t+.08,front:e.playDepth-t-.04}};function prism(e,t,o,a){const s=[],n=[],r=e.reduce((e,t)=>e+t[0],0)/e.length,i=e.reduce((e,t)=>e+t[1],0)/e.length,l=[(t+o)/2,i,r],p=e=>{const[t,o,r]=e,i=[o[0]-t[0],o[1]-t[1],o[2]-t[2]],p=[r[0]-t[0],r[1]-t[1],r[2]-t[2]];let h=[i[1]*p[2]-i[2]*p[1],i[2]*p[0]-i[0]*p[2],i[0]*p[1]-i[1]*p[0]];const m=e.reduce((t,o)=>[t[0]+o[0]/e.length,t[1]+o[1]/e.length,t[2]+o[2]/e.length],[0,0,0]);h[0]*(m[0]-l[0])+h[1]*(m[1]-l[1])+h[2]*(m[2]-l[2])<0&&(e=[...e].reverse(),h=[-h[0],-h[1],-h[2]]);const g=Math.hypot(h[0],h[1],h[2])||1,u=s.length/11;for(const t of e)s.push(t[0],t[1],t[2],h[0]/g,h[1]/g,h[2]/g,a[0],a[1],a[2],0,0);for(let t=1;t+1<e.length;t++)n.push(u,u+t,u+t+1)};return p(e.map(([e,o])=>[t,o,e])),p(e.map(([e,t])=>[o,t,e])),e.forEach(([a,s],n)=>{const[r,i]=e[(n+1)%e.length];p([[t,s,a],[o,s,a],[o,i,r],[t,i,r]])}),{vertices:new Float32Array(s),indices:new Uint32Array(n)}}function topWallGeometry(e,t,o,a){const s=BRICK_WIDTH*o,n=BRICK_HEIGHT*o,r=e*o,i=t*o,l=COPING*o,p=.35*n,h=p+.025,m=.12*n,g=1.05*a,u=-r/2,b=r/2,d=[{geometry:prism([[-h,g*h],[-h,i],[-.25,i],[-.25,.25*g]],u,b,rgb("#3a1d0c"))},{geometry:prism([[0,0],[0,l],[-h,l],[-h,g*h]],u,b,rgb("#c8b896"))},{geometry:shapeGeometry("cube"),position:[0,.11*l,.004],scale:[r,.22*l,.008],color:rgb("#a9987a")}],I=Math.ceil((i-l)/n);for(let e=0;e<I;e++){const t=l+e*n,o=Math.min(i,t+n);for(let a=0,n=u-(e%2?s/2:0);n<b;a++,n+=s){const r=Math.max(n,u),i=Math.min(n+s,b);i-r<=m||o-t<=m||d.push({geometry:shapeGeometry("cube"),position:[(r+i)/2,(t+o)/2,p/2-h],scale:[i-r-m,o-t-m,p+.01],color:brickShade(e+7,a)})}}return merge(d)}export function spawnWalls(e,t,o){const{back:a,front:s,thickness:n}=wallDepth(t),r=pointSize(t,a),i=pointSize(t,s),l=(o.height/2-o.topWall)/(o.height/2)*t.tanHalf,p=o.width+12*BRICK_WIDTH+4*BRICK_WIDTH,h=cached("fb-top-wall:"+Math.round(o.width)+"x"+Math.round(o.topWall)+":"+i.toFixed(6)+":"+l.toFixed(5),()=>_0xd0e9e(topWallGeometry(p,o.topWall+160,i,l),{center:!1,shine:.05})),m=o.height-o.bottomWallTop,g=cached("fb-wall:"+Math.round(o.width)+"x"+Math.round(m)+":"+r.toFixed(6)+":"+n.toFixed(4),()=>_0xd0e9e(wallGeometry(p,m+160,r,n),{center:!1,shine:.05})),u={top:e.spawn({mesh:h,color:[1,1,1,1],pickable:!1}),bottom:e.spawn({mesh:g,color:[1,1,1,1],pickable:!1})};return placeWalls(e,t,o,u,0),u}export function placeWalls(e,t,o,a,s){const{back:n,front:r}=wallDepth(t),i=s*pointSize(t),l=(a,s,n,r)=>{const l=12*BRICK_WIDTH*pointSize(t,n),p=at(t,o.width/2+12*BRICK_WIDTH/2,s,n);e.set(a,{position:[p[0]-i%l,p[1],p[2]],rotation:facing(t,r)})};l(a.top,o.topWall,r,0),l(a.bottom,o.bottomWallTop,n,Math.PI)}export function spawnPipe(e,t,o,a,s,n){const r=pointSize(t),i=PIPE_WIDTH/60,l=26*i,p=PIPE_WIDTH+10*i,h=a+PIPE_WIDTH/2,m=e.spawn({mesh:"none",position:at(t,h,0),rotation:facing(t),pickable:!1}),g=(t,o,a,s,n=!1)=>e.spawn({mesh:t,parent:m,position:local(r,0,o),scale:[s*r,a*r,s*r],...n?{rotation:quat.z(Math.PI)}:{},color:[1,1,1,1],pickable:!1}),u=Math.max(o.topWall,Math.min(s,o.bottomWallTop)),b=Math.max(o.topWall,Math.min(n,o.bottomWallTop)),d=o.topWall-220,I=o.bottomWallTop+220;return u-o.topWall>.5&&(g(pipeMesh(),(d+u)/2,u-d,PIPE_WIDTH),g(capMesh(),u-l/2,l,p,!0)),o.bottomWallTop-b>.5&&(g(pipeMesh(),(b+I)/2,I-b,PIPE_WIDTH),g(capMesh(),b+l/2,l,p)),m}export function placePipe(e,t,o,a,s){const n=at(t,a+PIPE_WIDTH/2,0);s?s.position(o,n[0],n[1],n[2]):e.set(o,{position:n})}const EYE=[.22,.15,.27],EYE_SIZE=.34;export function spawnBird(e,t,o,a){const s=BIRD_SIZE*pointSize(t),n=e.spawn({mesh:"none",position:at(t,o,a),rotation:facing(t),pickable:!1}),r=e.spawn({mesh:wingMesh(!0),parent:n,position:[.04*-s,.04*s,.3*-s],scale:s,color:[1,1,1,1],pickable:!1}),i=e.spawn({mesh:birdMesh(),parent:n,scale:s,color:[1,1,1,1],pickable:!1}),l=e.spawn({mesh:lidMesh(),parent:n,position:[EYE[0]*s,EYE[1]*s,EYE[2]*s],scale:0,color:[1,1,1,1],pickable:!1});return{root:n,body:i,wing:e.spawn({mesh:wingMesh(!1),parent:n,position:[.02*-s,.04*-s,.38*s],scale:s,color:[1,1,1,1],pickable:!1}),farWing:r,lid:l,size:s}}const NEAR_WING_TILT=quat.x(-.25),FAR_WING_TILT=quat.x(.25),wingTurn=[0,0,0,1];export function placeBird(e,t,o,a,s,n,r,i=r){e.set(o.root,{position:at(t,a,s),rotation:facing(t,-n)}),e.set(o.wing,{rotation:quat.multiply(NEAR_WING_TILT,quat.z(-r,wingTurn),wingTurn)}),e.set(o.farWing,{rotation:quat.multiply(FAR_WING_TILT,quat.z(-i,wingTurn),wingTurn)})}export function flapPop(e,t){const o=t.size;e.stopAnimation(t.body),e.animate(t.body,[{scale:[.86*o,1.16*o,o],at:.3},{scale:[1.05*o,.96*o,o],at:.65},{scale:o}],{duration:.26,easing:"easeOut"})}export function blink(e,t){const o=.34*t.size;e.animate(t.lid,[{scale:[o,o,o],at:.4},{scale:[o,o,o],at:.6},{scale:0}],{duration:.16,easing:"linear"})}export function dazeBird(e,t){const o=.34*t.size;e.stopAnimation(t.lid),e.set(t.lid,{scale:[o,.55*o,o],position:[EYE[0]*t.size,(EYE[1]+.06)*t.size,EYE[2]*t.size]}),e.animate(t.root,{shake:.12*t.size},{duration:.35})}export function wakeBird(e,t){e.stopAnimation(t.lid),e.set(t.lid,{scale:0,position:[EYE[0]*t.size,EYE[1]*t.size,EYE[2]*t.size]})}export function hoverBird(e,t,o,a){const s=BIRD_SIZE*pointSize(a)*.12;e.set(t.root,{bob:o?{amplitude:[0,s,0],speed:3.2}:null})}const FEATHERS=["#FFD700","#FF8C00","#FFE850","#FFFFFF","#A0522D"].map(e=>toColor(e));export function crashBurst(e,t,o,a){const s=pointSize(t),n=BIRD_SIZE*s,r=at(t,o,a,t.playDepth-.6*n);effects.shatter(e,{position:r,count:16,mesh:"sphere",size:.12*n,speed:7*n,lifetime:.7,gravity:18*-n,colors:FEATHERS,dust:!1}),effects.dust(e,{position:r,count:5,size:.9*n,speed:2*n,lifetime:.5,color:[1,1,1,.75]})}
|