@nayan-ui/games 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -191
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/assets/models/explorer/explorer.glb +0 -0
- package/lib/module/assets/models/explorer/params.json +51 -0
- package/lib/module/assets/models/explorer/source.json +222 -0
- package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/lib/module/assets/models/play-with-tua/sources.json +141 -0
- package/lib/module/assets/sfx/balloon_pop.wav +0 -0
- package/lib/module/assets/sfx/blocked.wav +0 -0
- package/lib/module/assets/sfx/boing.wav +0 -0
- package/lib/module/assets/sfx/bonus.wav +0 -0
- package/lib/module/assets/sfx/boom.wav +0 -0
- package/lib/module/assets/sfx/bump.wav +0 -0
- package/lib/module/assets/sfx/cannon.wav +0 -0
- package/lib/module/assets/sfx/capture.wav +0 -0
- package/lib/module/assets/sfx/card_flip.wav +0 -0
- package/lib/module/assets/sfx/card_place.wav +0 -0
- package/lib/module/assets/sfx/catch.wav +0 -0
- package/lib/module/assets/sfx/chime.wav +0 -0
- package/lib/module/assets/sfx/chomp.wav +0 -0
- package/lib/module/assets/sfx/chomp_alt.wav +0 -0
- package/lib/module/assets/sfx/clack.wav +0 -0
- package/lib/module/assets/sfx/clang.wav +0 -0
- package/lib/module/assets/sfx/clash.wav +0 -0
- package/lib/module/assets/sfx/click.wav +0 -0
- package/lib/module/assets/sfx/coin.wav +0 -0
- package/lib/module/assets/sfx/combo.wav +0 -0
- package/lib/module/assets/sfx/crash.wav +0 -0
- package/lib/module/assets/sfx/crunch.wav +0 -0
- package/lib/module/assets/sfx/dance.wav +0 -0
- package/lib/module/assets/sfx/deselect.wav +0 -0
- package/lib/module/assets/sfx/dice_roll.wav +0 -0
- package/lib/module/assets/sfx/die.wav +0 -0
- package/lib/module/assets/sfx/draw.wav +0 -0
- package/lib/module/assets/sfx/drop.wav +0 -0
- package/lib/module/assets/sfx/eat.wav +0 -0
- package/lib/module/assets/sfx/engine.wav +0 -0
- package/lib/module/assets/sfx/error.wav +0 -0
- package/lib/module/assets/sfx/flag.wav +0 -0
- package/lib/module/assets/sfx/flap.wav +0 -0
- package/lib/module/assets/sfx/flip_disc.wav +0 -0
- package/lib/module/assets/sfx/footstep_run.wav +0 -0
- package/lib/module/assets/sfx/footstep_walk.wav +0 -0
- package/lib/module/assets/sfx/game_over.wav +0 -0
- package/lib/module/assets/sfx/gate.wav +0 -0
- package/lib/module/assets/sfx/hit.wav +0 -0
- package/lib/module/assets/sfx/hop.wav +0 -0
- package/lib/module/assets/sfx/hurt.wav +0 -0
- package/lib/module/assets/sfx/invalid.wav +0 -0
- package/lib/module/assets/sfx/jump.wav +0 -0
- package/lib/module/assets/sfx/ladder.wav +0 -0
- package/lib/module/assets/sfx/land.wav +0 -0
- package/lib/module/assets/sfx/laugh.wav +0 -0
- package/lib/module/assets/sfx/lose.wav +0 -0
- package/lib/module/assets/sfx/merge.wav +0 -0
- package/lib/module/assets/sfx/miss.wav +0 -0
- package/lib/module/assets/sfx/nitro.wav +0 -0
- package/lib/module/assets/sfx/pew.wav +0 -0
- package/lib/module/assets/sfx/place.wav +0 -0
- package/lib/module/assets/sfx/pling.wav +0 -0
- package/lib/module/assets/sfx/point.wav +0 -0
- package/lib/module/assets/sfx/pop.wav +0 -0
- package/lib/module/assets/sfx/pop_soft.wav +0 -0
- package/lib/module/assets/sfx/power_up.wav +0 -0
- package/lib/module/assets/sfx/reveal.wav +0 -0
- package/lib/module/assets/sfx/robot.wav +0 -0
- package/lib/module/assets/sfx/rotate.wav +0 -0
- package/lib/module/assets/sfx/run_steps.wav +0 -0
- package/lib/module/assets/sfx/select.wav +0 -0
- package/lib/module/assets/sfx/shuffle.wav +0 -0
- package/lib/module/assets/sfx/six.wav +0 -0
- package/lib/module/assets/sfx/slice.wav +0 -0
- package/lib/module/assets/sfx/slide.wav +0 -0
- package/lib/module/assets/sfx/snake.wav +0 -0
- package/lib/module/assets/sfx/snap.wav +0 -0
- package/lib/module/assets/sfx/splash.wav +0 -0
- package/lib/module/assets/sfx/star.wav +0 -0
- package/lib/module/assets/sfx/start.wav +0 -0
- package/lib/module/assets/sfx/swoosh.wav +0 -0
- package/lib/module/assets/sfx/tap.wav +0 -0
- package/lib/module/assets/sfx/thud.wav +0 -0
- package/lib/module/assets/sfx/thunk.wav +0 -0
- package/lib/module/assets/sfx/tick.wav +0 -0
- package/lib/module/assets/sfx/time_up.wav +0 -0
- package/lib/module/assets/sfx/tock.wav +0 -0
- package/lib/module/assets/sfx/walk_steps.wav +0 -0
- package/lib/module/assets/sfx/warning.wav +0 -0
- package/lib/module/assets/sfx/whack.wav +0 -0
- package/lib/module/assets/sfx/whoosh.wav +0 -0
- package/lib/module/assets/sfx/win.wav +0 -0
- package/lib/module/assets/sfx/zap.wav +0 -0
- package/lib/module/assets/textures/ad_bolt.png +0 -0
- package/lib/module/assets/textures/ad_bubbles.png +0 -0
- package/lib/module/assets/textures/ad_chevrons.png +0 -0
- package/lib/module/assets/textures/asphalt.png +0 -0
- package/lib/module/assets/textures/bark.jpg +0 -0
- package/lib/module/assets/textures/explorer-atlas.png +0 -0
- package/lib/module/assets/textures/facade.png +0 -0
- package/lib/module/assets/textures/grass.png +0 -0
- package/lib/module/assets/textures/leaves.png +0 -0
- package/lib/module/assets/textures/limestone.jpg +0 -0
- package/lib/module/assets/textures/meadow.jpg +0 -0
- package/lib/module/assets/textures/nature-sources.json +87 -0
- package/lib/module/assets/textures/pine.png +0 -0
- package/lib/module/assets/textures/river.jpg +0 -0
- package/lib/module/assets/textures/soft_glow.png +0 -0
- package/lib/module/games/arrows/Arrows.js +1 -1
- package/lib/module/games/arrows/ArrowsConstants.js +1 -1
- package/lib/module/games/arrows/ArrowsGame.js +1 -0
- package/lib/module/games/arrows/ArrowsScene.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
- package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -1
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
- package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
- package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
- package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
- package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
- package/lib/module/games/bluk/Bluk.js +1 -1
- package/lib/module/games/bluk/BlukConstants.js +1 -1
- package/lib/module/games/bluk/BlukGame.js +1 -0
- package/lib/module/games/bluk/BlukRules.js +1 -0
- package/lib/module/games/bluk/BlukScene.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
- package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
- package/lib/module/games/car-racing/CarMeshes.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js +1 -1
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
- package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
- package/lib/module/games/car-racing/CarRacingGame.js +1 -0
- package/lib/module/games/car-racing/CarRacingScene.js +1 -0
- package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
- package/lib/module/games/checkers/Checkers.js +1 -1
- package/lib/module/games/checkers/CheckersAI.js +1 -0
- package/lib/module/games/checkers/CheckersConstants.js +1 -1
- package/lib/module/games/checkers/CheckersGame.js +1 -0
- package/lib/module/games/checkers/CheckersRules.js +1 -0
- package/lib/module/games/checkers/CheckersScene.js +1 -0
- package/lib/module/games/color-switch/ColorSwitch.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
- package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
- package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
- package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
- package/lib/module/games/game-2048/Game2048.js +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -1
- package/lib/module/games/game-2048/Game2048Game.js +1 -0
- package/lib/module/games/game-2048/Game2048Rules.js +1 -0
- package/lib/module/games/game-2048/Game2048Scene.js +1 -0
- package/lib/module/games/knife-hit/KnifeHit.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
- package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
- package/lib/module/games/ludo-king/LudoKing.js +1 -1
- package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
- package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
- package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
- package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
- package/lib/module/games/memory-match/MemoryMatch.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
- package/lib/module/games/mob-control/MobControl.js +1 -1
- package/lib/module/games/mob-control/MobControlConstants.js +1 -1
- package/lib/module/games/mob-control/MobControlGame.js +1 -0
- package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
- package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
- package/lib/module/games/mob-control/MobControlRules.js +1 -0
- package/lib/module/games/mob-control/MobControlScene.js +1 -0
- package/lib/module/games/number-search/NumberSearch.js +1 -1
- package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
- package/lib/module/games/pac-man/PacMan.js +1 -1
- package/lib/module/games/pac-man/PacManConstants.js +1 -1
- package/lib/module/games/pac-man/PacManGame.js +1 -0
- package/lib/module/games/pac-man/PacManRules.js +1 -0
- package/lib/module/games/pac-man/PacManScene.js +1 -0
- package/lib/module/games/paper-io/PaperIo.js +1 -1
- package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
- package/lib/module/games/paper-io/PaperIoGame.js +1 -0
- package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
- package/lib/module/games/paper-io/PaperIoRules.js +1 -0
- package/lib/module/games/paper-io/PaperIoScene.js +1 -0
- package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
- package/lib/module/games/penguin-run/PenguinModel.js +1 -0
- package/lib/module/games/penguin-run/PenguinRun.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
- package/lib/module/games/reversi/Reversi.js +1 -1
- package/lib/module/games/reversi/ReversiConstants.js +1 -1
- package/lib/module/games/reversi/ReversiGame.js +1 -0
- package/lib/module/games/reversi/ReversiRules.js +1 -0
- package/lib/module/games/reversi/ReversiScene.js +1 -0
- package/lib/module/games/search-grid/SearchGrid.js +1 -0
- package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
- package/lib/module/games/search-grid/SearchGridGame.js +1 -0
- package/lib/module/games/search-grid/SearchGridScene.js +1 -0
- package/lib/module/games/shared/BackdropCard.js +1 -0
- package/lib/module/games/shared/EngineBackdrop.js +1 -0
- package/lib/module/games/shared/EngineBlasts.js +1 -0
- package/lib/module/games/shared/EngineBlocks.js +1 -0
- package/lib/module/games/shared/EngineControlText.js +1 -0
- package/lib/module/games/shared/EngineDice.js +1 -0
- package/lib/module/games/shared/EngineFootprint.js +1 -0
- package/lib/module/games/shared/EngineFruits.js +1 -0
- package/lib/module/games/shared/EngineGameLoader.js +1 -0
- package/lib/module/games/shared/EngineGameScreen.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
- package/lib/module/games/shared/EngineGlyphs.js +1 -0
- package/lib/module/games/shared/EngineHud.js +1 -0
- package/lib/module/games/shared/EngineLoading.js +1 -0
- package/lib/module/games/shared/EngineMeadow.js +1 -0
- package/lib/module/games/shared/EngineMeshCache.js +1 -0
- package/lib/module/games/shared/EngineMeshes.js +1 -0
- package/lib/module/games/shared/EngineRacingChase.js +1 -0
- package/lib/module/games/shared/EngineRacingHandling.js +1 -0
- package/lib/module/games/shared/EngineReadyContext.js +1 -0
- package/lib/module/games/shared/EngineTilt.js +1 -0
- package/lib/module/games/shared/EngineTouchSurface.js +1 -0
- package/lib/module/games/shared/EngineUtils.js +1 -0
- package/lib/module/games/shared/GameActivity.js +1 -0
- package/lib/module/games/shared/GameLoading.js +1 -0
- package/lib/module/games/shared/GameLoadingTransition.js +1 -0
- package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
- package/lib/module/games/shared/useEngineGame.js +1 -0
- package/lib/module/games/shared/useGameResource.js +1 -0
- package/lib/module/games/shared/useLiveState.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
- package/lib/module/games/snake-3d/Snake3D.js +1 -1
- package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
- package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
- package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
- package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
- package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
- package/lib/module/games/stack-tower/StackTower.js +1 -1
- package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
- package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
- package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
- package/lib/module/games/sudoku/Sudoku.js +1 -1
- package/lib/module/games/sudoku/SudokuConstants.js +1 -1
- package/lib/module/games/sudoku/SudokuGame.js +1 -0
- package/lib/module/games/sudoku/SudokuRules.js +1 -0
- package/lib/module/games/sudoku/SudokuScene.js +1 -0
- package/lib/module/games/tangram/Tangram.js +1 -1
- package/lib/module/games/tangram/TangramConstants.js +1 -1
- package/lib/module/games/tangram/TangramGame.js +1 -0
- package/lib/module/games/tangram/TangramRules.js +1 -0
- package/lib/module/games/tangram/TangramScene.js +1 -0
- package/lib/module/games/tank-1990/Tank1990.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
- package/lib/module/games/tile-home/TileHome.js +1 -1
- package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
- package/lib/module/games/tile-home/TileHomeGame.js +1 -0
- package/lib/module/games/tile-home/TileHomeScene.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
- package/lib/module/games/word-search/WordSearch.js +1 -1
- package/lib/module/games/word-search/WordSearchWords.js +1 -0
- package/lib/module/helpers/GamePatternData.js +1 -0
- package/lib/module/helpers/GameSettingsModal.js +1 -1
- package/lib/module/helpers/GameTheme.js +1 -0
- package/lib/module/helpers/IconPaths.js +1 -0
- package/lib/module/helpers/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/GameAssetLoader.js +1 -0
- package/lib/module/services/GameAssets.js +1 -0
- package/lib/module/services/GameLoaders.js +1 -0
- package/lib/module/services/GamesConstants.js +1 -1
- package/lib/module/services/GamesMetadata.js +1 -1
- package/lib/module/services/GamesService.js +1 -1
- package/lib/module/services/HapticsService.js +1 -1
- package/lib/module/services/ScoringService.js +1 -1
- package/lib/module/services/SfxSources.js +1 -0
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/ThemeService.js +1 -0
- package/lib/module/services/UtilsService.js +1 -1
- package/lib/module/services/index.js +1 -1
- package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
- package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
- package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
- package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
- package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
- package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
- package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
- package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
- package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
- package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
- package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
- package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
- package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
- package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
- package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
- package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
- package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
- package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
- package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
- package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
- package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
- package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
- package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
- package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
- package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
- package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
- package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
- package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
- package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
- package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
- package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
- package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
- package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
- package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
- package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
- package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
- package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
- package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
- package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
- package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
- package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
- package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
- package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
- package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
- package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
- package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
- package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
- package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
- package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
- package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
- package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
- package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
- package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
- package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
- package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
- package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
- package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
- package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
- package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
- package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
- package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
- package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
- package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
- package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
- package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
- package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
- package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
- package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
- package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
- package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
- package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
- package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
- package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
- package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
- package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
- package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
- package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
- package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
- package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
- package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
- package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
- package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
- package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
- package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
- package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
- package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
- package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
- package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
- package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
- package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
- package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
- package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
- package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
- package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
- package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
- package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
- package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
- package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
- package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
- package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
- package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
- package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
- package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
- package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
- package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
- package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
- package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
- package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
- package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
- package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
- package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
- package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
- package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
- package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
- package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
- package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
- package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
- package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
- package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
- package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
- package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
- package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
- package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
- package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
- package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
- package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
- package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
- package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
- package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
- package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
- package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
- package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
- package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
- package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
- package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
- package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
- package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
- package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
- package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
- package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
- package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
- package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
- package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
- package/lib/typescript/src/helpers/index.d.ts +1 -19
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
- package/lib/typescript/src/services/GameAssets.d.ts +11 -0
- package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
- package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
- package/lib/typescript/src/services/HapticsService.d.ts +1 -1
- package/lib/typescript/src/services/SfxSources.d.ts +79 -0
- package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
- package/lib/typescript/src/services/ThemeService.d.ts +117 -0
- package/lib/typescript/src/services/UtilsService.d.ts +20 -2
- package/lib/typescript/src/services/index.d.ts +3 -0
- package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
- package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
- package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
- package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
- package/lib/web/assets/0376bda32be3-robot.wav +0 -0
- package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
- package/lib/web/assets/0b21278bffba-boing.wav +0 -0
- package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
- package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
- package/lib/web/assets/177f00502e08-bonus.wav +0 -0
- package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
- package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
- package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
- package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
- package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
- package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
- package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
- package/lib/web/assets/2699065037ad-select.wav +0 -0
- package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
- package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
- package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
- package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
- package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
- package/lib/web/assets/336d63b739b5-combo.wav +0 -0
- package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
- package/lib/web/assets/3a816e20212f-capture.wav +0 -0
- package/lib/web/assets/40240217810a-nitro.wav +0 -0
- package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
- package/lib/web/assets/501994226995-coin.wav +0 -0
- package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
- package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
- package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
- package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
- package/lib/web/assets/6da3b101926d-merge.wav +0 -0
- package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
- package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
- package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
- package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
- package/lib/web/assets/7506e3efe264-catch.wav +0 -0
- package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
- package/lib/web/assets/793abe620201-card_place.wav +0 -0
- package/lib/web/assets/7da09c57f52d-facade.png +0 -0
- package/lib/web/assets/7e1a902176f6-pine.png +0 -0
- package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
- package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
- package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
- package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
- package/lib/web/assets/854b31683cb2-draw.wav +0 -0
- package/lib/web/assets/8616150393b7-error.wav +0 -0
- package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
- package/lib/web/assets/88755845922c-hop.wav +0 -0
- package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
- package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
- package/lib/web/assets/9210a24472d1-place.wav +0 -0
- package/lib/web/assets/930d833ebf89-splash.wav +0 -0
- package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
- package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
- package/lib/web/assets/9ab04403898b-clang.wav +0 -0
- package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
- package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
- package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
- package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
- package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
- package/lib/web/assets/a76940a48c68-hit.wav +0 -0
- package/lib/web/assets/a98ddb724460-leaves.png +0 -0
- package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
- package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
- package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
- package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
- package/lib/web/assets/ab37cd128509-click.wav +0 -0
- package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
- package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
- package/lib/web/assets/b3894545cf71-slice.wav +0 -0
- package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
- package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
- package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
- package/lib/web/assets/baff6feda846-lose.wav +0 -0
- package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
- package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
- package/lib/web/assets/c3a9edfad195-die.wav +0 -0
- package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
- package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
- package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
- package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
- package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
- package/lib/web/assets/d15591767778-tap.wav +0 -0
- package/lib/web/assets/d1781a52234f-slide.wav +0 -0
- package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
- package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
- package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
- package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
- package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
- package/lib/web/assets/e454e56df89a-clack.wav +0 -0
- package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
- package/lib/web/assets/ed6496b891fc-land.wav +0 -0
- package/lib/web/assets/f21920200a81-thunk.wav +0 -0
- package/lib/web/assets/f753b43be89d-whack.wav +0 -0
- package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
- package/lib/web/assets/fbe299716916-grass.png +0 -0
- package/lib/web/chunk-52ez2s9z.js +15 -0
- package/lib/web/chunk-8675t224.js +1 -0
- package/lib/web/index.js +2 -0
- package/lib/web/package.json +1 -0
- package/lib/web/services.js +2 -0
- package/package.json +94 -73
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/models/explorer/explorer.glb +0 -0
- package/src/assets/models/explorer/params.json +51 -0
- package/src/assets/models/explorer/source.json +222 -0
- package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/src/assets/models/play-with-tua/sources.json +141 -0
- package/src/assets/sfx/balloon_pop.wav +0 -0
- package/src/assets/sfx/blocked.wav +0 -0
- package/src/assets/sfx/boing.wav +0 -0
- package/src/assets/sfx/bonus.wav +0 -0
- package/src/assets/sfx/boom.wav +0 -0
- package/src/assets/sfx/bump.wav +0 -0
- package/src/assets/sfx/cannon.wav +0 -0
- package/src/assets/sfx/capture.wav +0 -0
- package/src/assets/sfx/card_flip.wav +0 -0
- package/src/assets/sfx/card_place.wav +0 -0
- package/src/assets/sfx/catch.wav +0 -0
- package/src/assets/sfx/chime.wav +0 -0
- package/src/assets/sfx/chomp.wav +0 -0
- package/src/assets/sfx/chomp_alt.wav +0 -0
- package/src/assets/sfx/clack.wav +0 -0
- package/src/assets/sfx/clang.wav +0 -0
- package/src/assets/sfx/clash.wav +0 -0
- package/src/assets/sfx/click.wav +0 -0
- package/src/assets/sfx/coin.wav +0 -0
- package/src/assets/sfx/combo.wav +0 -0
- package/src/assets/sfx/crash.wav +0 -0
- package/src/assets/sfx/crunch.wav +0 -0
- package/src/assets/sfx/dance.wav +0 -0
- package/src/assets/sfx/deselect.wav +0 -0
- package/src/assets/sfx/dice_roll.wav +0 -0
- package/src/assets/sfx/die.wav +0 -0
- package/src/assets/sfx/draw.wav +0 -0
- package/src/assets/sfx/drop.wav +0 -0
- package/src/assets/sfx/eat.wav +0 -0
- package/src/assets/sfx/engine.wav +0 -0
- package/src/assets/sfx/error.wav +0 -0
- package/src/assets/sfx/flag.wav +0 -0
- package/src/assets/sfx/flap.wav +0 -0
- package/src/assets/sfx/flip_disc.wav +0 -0
- package/src/assets/sfx/footstep_run.wav +0 -0
- package/src/assets/sfx/footstep_walk.wav +0 -0
- package/src/assets/sfx/game_over.wav +0 -0
- package/src/assets/sfx/gate.wav +0 -0
- package/src/assets/sfx/hit.wav +0 -0
- package/src/assets/sfx/hop.wav +0 -0
- package/src/assets/sfx/hurt.wav +0 -0
- package/src/assets/sfx/invalid.wav +0 -0
- package/src/assets/sfx/jump.wav +0 -0
- package/src/assets/sfx/ladder.wav +0 -0
- package/src/assets/sfx/land.wav +0 -0
- package/src/assets/sfx/laugh.wav +0 -0
- package/src/assets/sfx/lose.wav +0 -0
- package/src/assets/sfx/merge.wav +0 -0
- package/src/assets/sfx/miss.wav +0 -0
- package/src/assets/sfx/nitro.wav +0 -0
- package/src/assets/sfx/pew.wav +0 -0
- package/src/assets/sfx/place.wav +0 -0
- package/src/assets/sfx/pling.wav +0 -0
- package/src/assets/sfx/point.wav +0 -0
- package/src/assets/sfx/pop.wav +0 -0
- package/src/assets/sfx/pop_soft.wav +0 -0
- package/src/assets/sfx/power_up.wav +0 -0
- package/src/assets/sfx/reveal.wav +0 -0
- package/src/assets/sfx/robot.wav +0 -0
- package/src/assets/sfx/rotate.wav +0 -0
- package/src/assets/sfx/run_steps.wav +0 -0
- package/src/assets/sfx/select.wav +0 -0
- package/src/assets/sfx/shuffle.wav +0 -0
- package/src/assets/sfx/six.wav +0 -0
- package/src/assets/sfx/slice.wav +0 -0
- package/src/assets/sfx/slide.wav +0 -0
- package/src/assets/sfx/snake.wav +0 -0
- package/src/assets/sfx/snap.wav +0 -0
- package/src/assets/sfx/splash.wav +0 -0
- package/src/assets/sfx/star.wav +0 -0
- package/src/assets/sfx/start.wav +0 -0
- package/src/assets/sfx/swoosh.wav +0 -0
- package/src/assets/sfx/tap.wav +0 -0
- package/src/assets/sfx/thud.wav +0 -0
- package/src/assets/sfx/thunk.wav +0 -0
- package/src/assets/sfx/tick.wav +0 -0
- package/src/assets/sfx/time_up.wav +0 -0
- package/src/assets/sfx/tock.wav +0 -0
- package/src/assets/sfx/walk_steps.wav +0 -0
- package/src/assets/sfx/warning.wav +0 -0
- package/src/assets/sfx/whack.wav +0 -0
- package/src/assets/sfx/whoosh.wav +0 -0
- package/src/assets/sfx/win.wav +0 -0
- package/src/assets/sfx/zap.wav +0 -0
- package/src/assets/textures/ad_bolt.png +0 -0
- package/src/assets/textures/ad_bubbles.png +0 -0
- package/src/assets/textures/ad_chevrons.png +0 -0
- package/src/assets/textures/asphalt.png +0 -0
- package/src/assets/textures/bark.jpg +0 -0
- package/src/assets/textures/explorer-atlas.png +0 -0
- package/src/assets/textures/facade.png +0 -0
- package/src/assets/textures/grass.png +0 -0
- package/src/assets/textures/leaves.png +0 -0
- package/src/assets/textures/limestone.jpg +0 -0
- package/src/assets/textures/meadow.jpg +0 -0
- package/src/assets/textures/nature-sources.json +87 -0
- package/src/assets/textures/pine.png +0 -0
- package/src/assets/textures/river.jpg +0 -0
- package/src/assets/textures/soft_glow.png +0 -0
- package/src/games/arrows/Arrows.tsx +69 -0
- package/src/games/arrows/ArrowsConstants.ts +107 -0
- package/src/games/arrows/ArrowsGame.ts +735 -0
- package/src/games/arrows/ArrowsScene.ts +395 -0
- package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
- package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
- package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
- package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
- package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
- package/src/games/bike-racing/BikeMeshes.ts +273 -0
- package/src/games/bike-racing/BikeRacing.tsx +211 -0
- package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
- package/src/games/bike-racing/BikeRacingGame.ts +557 -0
- package/src/games/bike-racing/BikeRacingScene.ts +119 -0
- package/src/games/block-blast/BlockBlast.tsx +73 -0
- package/src/games/block-blast/BlockBlastConstants.ts +179 -0
- package/src/games/block-blast/BlockBlastGame.ts +471 -0
- package/src/games/block-blast/BlockBlastScene.ts +156 -0
- package/src/games/block-breaker/BlockBreaker.tsx +79 -0
- package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
- package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
- package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
- package/src/games/bluk/Bluk.tsx +82 -0
- package/src/games/bluk/BlukConstants.ts +121 -0
- package/src/games/bluk/BlukGame.ts +323 -0
- package/src/games/bluk/BlukRules.ts +154 -0
- package/src/games/bluk/BlukScene.ts +514 -0
- package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
- package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
- package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
- package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
- package/src/games/candy-crush/CandyCrush.tsx +77 -0
- package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
- package/src/games/candy-crush/CandyCrushGame.ts +477 -0
- package/src/games/candy-crush/CandyCrushScene.ts +209 -0
- package/src/games/car-racing/CarMeshes.ts +440 -0
- package/src/games/car-racing/CarRacing.tsx +211 -0
- package/src/games/car-racing/CarRacingConstants.ts +167 -0
- package/src/games/car-racing/CarRacingFacade.ts +40 -0
- package/src/games/car-racing/CarRacingGame.ts +539 -0
- package/src/games/car-racing/CarRacingScene.ts +1026 -0
- package/src/games/car-racing/CarRacingScenery.ts +265 -0
- package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
- package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
- package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
- package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
- package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
- package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
- package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
- package/src/games/checkers/Checkers.tsx +83 -0
- package/src/games/checkers/CheckersAI.ts +255 -0
- package/src/games/checkers/CheckersConstants.ts +68 -0
- package/src/games/checkers/CheckersGame.ts +322 -0
- package/src/games/checkers/CheckersRules.ts +167 -0
- package/src/games/checkers/CheckersScene.ts +308 -0
- package/src/games/color-switch/ColorSwitch.tsx +75 -0
- package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
- package/src/games/color-switch/ColorSwitchGame.ts +329 -0
- package/src/games/color-switch/ColorSwitchScene.ts +220 -0
- package/src/games/colors-sort/ColorsSort.tsx +82 -0
- package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
- package/src/games/colors-sort/ColorsSortGame.ts +246 -0
- package/src/games/colors-sort/ColorsSortScene.ts +315 -0
- package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
- package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
- package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
- package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
- package/src/games/crossy-road/CrossyRoad.tsx +74 -0
- package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
- package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
- package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
- package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
- package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
- package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
- package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
- package/src/games/dino-jump/DinoJump.tsx +77 -0
- package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
- package/src/games/dino-jump/DinoJumpGame.ts +344 -0
- package/src/games/dino-jump/DinoJumpScene.ts +686 -0
- package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
- package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
- package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
- package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
- package/src/games/falling-sticks/FallingSticks.tsx +72 -0
- package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
- package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
- package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
- package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
- package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
- package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
- package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
- package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
- package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
- package/src/games/flappy-bird/FlappyBird.tsx +73 -0
- package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
- package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
- package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
- package/src/games/fruit-merger/FruitMerger.tsx +73 -0
- package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
- package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
- package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
- package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
- package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
- package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
- package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
- package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
- package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
- package/src/games/game-2048/Game2048.tsx +84 -0
- package/src/games/game-2048/Game2048Constants.ts +68 -0
- package/src/games/game-2048/Game2048Game.ts +181 -0
- package/src/games/game-2048/Game2048Rules.ts +101 -0
- package/src/games/game-2048/Game2048Scene.ts +206 -0
- package/src/games/knife-hit/KnifeHit.tsx +78 -0
- package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
- package/src/games/knife-hit/KnifeHitGame.ts +264 -0
- package/src/games/knife-hit/KnifeHitScene.ts +360 -0
- package/src/games/ludo-king/LudoKing.tsx +86 -0
- package/src/games/ludo-king/LudoKingConstants.ts +212 -0
- package/src/games/ludo-king/LudoKingGame.ts +326 -0
- package/src/games/ludo-king/LudoKingRules.ts +143 -0
- package/src/games/ludo-king/LudoKingScene.ts +397 -0
- package/src/games/maze-runner/MazeRunner.tsx +88 -0
- package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
- package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
- package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
- package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
- package/src/games/memory-match/MemoryMatch.tsx +77 -0
- package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
- package/src/games/memory-match/MemoryMatchGame.ts +222 -0
- package/src/games/memory-match/MemoryMatchRules.ts +38 -0
- package/src/games/memory-match/MemoryMatchScene.ts +268 -0
- package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
- package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
- package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
- package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
- package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
- package/src/games/mob-control/MobControl.tsx +73 -0
- package/src/games/mob-control/MobControlConstants.ts +106 -0
- package/src/games/mob-control/MobControlGame.ts +176 -0
- package/src/games/mob-control/MobControlMeshes.ts +85 -0
- package/src/games/mob-control/MobControlRenderer.ts +108 -0
- package/src/games/mob-control/MobControlRules.ts +522 -0
- package/src/games/mob-control/MobControlScene.ts +399 -0
- package/src/games/number-search/NumberSearch.tsx +18 -0
- package/src/games/number-search/NumberSearchNumbers.ts +623 -0
- package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
- package/src/games/pac-man/PacMan.tsx +86 -0
- package/src/games/pac-man/PacManConstants.ts +169 -0
- package/src/games/pac-man/PacManGame.ts +406 -0
- package/src/games/pac-man/PacManRules.ts +255 -0
- package/src/games/pac-man/PacManScene.ts +387 -0
- package/src/games/paper-io/PaperIo.tsx +91 -0
- package/src/games/paper-io/PaperIoConstants.ts +86 -0
- package/src/games/paper-io/PaperIoGame.ts +193 -0
- package/src/games/paper-io/PaperIoMeshes.ts +233 -0
- package/src/games/paper-io/PaperIoRules.ts +315 -0
- package/src/games/paper-io/PaperIoScene.ts +310 -0
- package/src/games/penguin-run/PenguinMeshes.ts +269 -0
- package/src/games/penguin-run/PenguinModel.ts +712 -0
- package/src/games/penguin-run/PenguinRun.tsx +77 -0
- package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
- package/src/games/penguin-run/PenguinRunGame.ts +406 -0
- package/src/games/penguin-run/PenguinRunScene.ts +949 -0
- package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
- package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
- package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
- package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
- package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
- package/src/games/pipe-connect/PipeConnect.tsx +69 -0
- package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
- package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
- package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
- package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
- package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
- package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
- package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
- package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
- package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
- package/src/games/popit-fidget/PopitFidget.tsx +72 -0
- package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
- package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
- package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
- package/src/games/reversi/Reversi.tsx +94 -0
- package/src/games/reversi/ReversiConstants.ts +67 -0
- package/src/games/reversi/ReversiGame.ts +266 -0
- package/src/games/reversi/ReversiRules.ts +176 -0
- package/src/games/reversi/ReversiScene.ts +240 -0
- package/src/games/search-grid/SearchGrid.tsx +92 -0
- package/src/games/search-grid/SearchGridConstants.ts +178 -0
- package/src/games/search-grid/SearchGridGame.ts +209 -0
- package/src/games/search-grid/SearchGridScene.ts +301 -0
- package/src/games/shared/BackdropCard.tsx +54 -0
- package/src/games/shared/EngineBackdrop.ts +300 -0
- package/src/games/shared/EngineBlasts.ts +136 -0
- package/src/games/shared/EngineBlocks.ts +91 -0
- package/src/games/shared/EngineControlText.ts +17 -0
- package/src/games/shared/EngineDice.ts +250 -0
- package/src/games/shared/EngineFootprint.ts +35 -0
- package/src/games/shared/EngineFruits.ts +1435 -0
- package/src/games/shared/EngineGameLoader.tsx +88 -0
- package/src/games/shared/EngineGameScreen.tsx +325 -0
- package/src/games/shared/EngineGameWidth.ts +3 -0
- package/src/games/shared/EngineGameWidth.web.ts +3 -0
- package/src/games/shared/EngineGlyphs.ts +178 -0
- package/src/games/shared/EngineHud.ts +815 -0
- package/src/games/shared/EngineLoading.ts +477 -0
- package/src/games/shared/EngineMeadow.ts +725 -0
- package/src/games/shared/EngineMeshCache.ts +15 -0
- package/src/games/shared/EngineMeshes.ts +10 -0
- package/src/games/shared/EngineRacingChase.ts +21 -0
- package/src/games/shared/EngineRacingHandling.ts +48 -0
- package/src/games/shared/EngineReadyContext.ts +4 -0
- package/src/games/shared/EngineTilt.ts +44 -0
- package/src/games/shared/EngineTouchSurface.tsx +103 -0
- package/src/games/shared/EngineUtils.ts +52 -0
- package/src/games/shared/GameActivity.ts +13 -0
- package/src/games/shared/GameLoading.tsx +202 -0
- package/src/games/shared/GameLoadingTransition.tsx +61 -0
- package/src/games/shared/ProceduralCacheVersion.ts +2 -0
- package/src/games/shared/useEngineGame.ts +240 -0
- package/src/games/shared/useGameResource.ts +21 -0
- package/src/games/shared/useLiveState.ts +58 -0
- package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
- package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
- package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
- package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
- package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
- package/src/games/snake-3d/Snake3D.tsx +76 -0
- package/src/games/snake-3d/Snake3DConstants.ts +61 -0
- package/src/games/snake-3d/Snake3DGame.ts +192 -0
- package/src/games/snake-3d/Snake3DMotion.ts +22 -0
- package/src/games/snake-3d/Snake3DRules.ts +116 -0
- package/src/games/snake-3d/Snake3DScene.ts +322 -0
- package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
- package/src/games/space-fighter/SpaceFighter.tsx +74 -0
- package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
- package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
- package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
- package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
- package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
- package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
- package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
- package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
- package/src/games/stack-tower/StackTower.tsx +76 -0
- package/src/games/stack-tower/StackTowerConstants.ts +74 -0
- package/src/games/stack-tower/StackTowerGame.ts +236 -0
- package/src/games/stack-tower/StackTowerScene.ts +186 -0
- package/src/games/sudoku/Sudoku.tsx +73 -0
- package/src/games/sudoku/SudokuConstants.ts +127 -0
- package/src/games/sudoku/SudokuGame.ts +250 -0
- package/src/games/sudoku/SudokuRules.ts +125 -0
- package/src/games/sudoku/SudokuScene.ts +304 -0
- package/src/games/tangram/Tangram.tsx +79 -0
- package/src/games/tangram/TangramConstants.ts +64 -0
- package/src/games/tangram/TangramGame.ts +356 -0
- package/src/games/tangram/TangramRules.ts +409 -0
- package/src/games/tangram/TangramScene.ts +203 -0
- package/src/games/tank-1990/Tank1990.tsx +78 -0
- package/src/games/tank-1990/Tank1990Constants.ts +81 -0
- package/src/games/tank-1990/Tank1990Game.ts +331 -0
- package/src/games/tank-1990/Tank1990Rules.ts +390 -0
- package/src/games/tank-1990/Tank1990Scene.ts +434 -0
- package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
- package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
- package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
- package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
- package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
- package/src/games/tile-home/TileHome.tsx +92 -0
- package/src/games/tile-home/TileHomeConstants.ts +139 -0
- package/src/games/tile-home/TileHomeGame.ts +435 -0
- package/src/games/tile-home/TileHomeScene.ts +154 -0
- package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
- package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
- package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
- package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
- package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
- package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
- package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
- package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
- package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
- package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
- package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
- package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
- package/src/games/word-search/WordSearch.tsx +18 -0
- package/src/games/word-search/WordSearchWords.ts +1642 -0
- package/src/helpers/GamePatternData.ts +120 -0
- package/src/helpers/GameSettingsModal.tsx +384 -0
- package/src/helpers/GameTheme.tsx +37 -0
- package/src/helpers/IconPaths.ts +6 -0
- package/src/helpers/index.ts +2 -0
- package/src/index.tsx +60 -0
- package/src/services/GameAssetLoader.ts +111 -0
- package/src/services/GameAssets.ts +149 -0
- package/src/services/GameLoaders.ts +93 -0
- package/src/services/GamesConstants.ts +193 -0
- package/src/services/GamesMetadata.ts +711 -0
- package/src/services/GamesService.ts +116 -0
- package/src/services/HapticsService.ts +48 -0
- package/src/services/ScoringService.ts +19 -0
- package/src/services/SfxSources.ts +81 -0
- package/src/services/SoundsService.ts +582 -0
- package/src/services/ThemeService.ts +281 -0
- package/src/services/UtilsService.ts +134 -0
- package/src/services/index.ts +6 -0
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -38
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{GRAVITY,LOOKAHEAD,MIN_LAUNCH_SPEED,PERFECT_BONUS,POINTS_PER_LAND,POWER_MULTIPLIER,TRAJECTORY_DOTS,TRAJECTORY_STEP}from"./BlukConstants.js";export function launchVelocity(t,n,r){let a=Math.max(n*POWER_MULTIPLIER,0),e=Math.min(r*POWER_MULTIPLIER,-3),i=Math.sqrt(a*a+e*e);if(i<1)return null;if(i<MIN_LAUNCH_SPEED){const t=MIN_LAUNCH_SPEED/i;a*=t,e*=t,i=MIN_LAUNCH_SPEED}if(i>t.maxLaunchSpeed){const n=t.maxLaunchSpeed/i;a*=n,e*=n}return{vx:a,vy:e}}export function landingOn(t,n,r,a,e){const i=t.blockSize/2;for(let t=0;t<n.length;t++){const l=n[t];if(a+i<=l.topY&&e+i>=l.topY&&Math.abs(r-l.worldX)<=l.width/2+.4*i)return t}return-1}export function stepFlight(t,n,r){const a=n.y;if(n.vy+=GRAVITY,n.x+=n.vx,n.y+=n.vy,n.vy>0){const e=landingOn(t,r,n.x,a,n.y);if(e>=0)return n.y=r[e].topY-t.blockSize/2,{landed:e,fell:!1}}return{landed:-1,fell:n.y>t.fallThresholdY}}export const tiltFor=t=>Math.max(-.35,Math.min(.35,.025*t));export function trajectory(t,n,r,a,e){const i=[];let l=r,o=a,p=n.vy;for(let r=0;r<TRAJECTORY_DOTS*TRAJECTORY_STEP;r++){const a=o;if(p+=GRAVITY,l+=n.vx,o+=p,p>0){const n=landingOn(t,e,l,a,o);if(n>=0){i.push(l,e[n].topY-t.blockSize/2);break}}if(r%TRAJECTORY_STEP===0&&i.push(l,o),o>t.fallThresholdY)break}return i}function makePillar(t,n,r,a){const e=t.pillarTopMin+Math.random()*(t.pillarTopMax-t.pillarTopMin),i={id:"pillar-"+n.seq,worldX:r,topY:Math.round(e),width:Math.round(a),colorIndex:n.seq%8};return n.seq++,i}function appendPillar(t,n){const r=n.pillars[n.pillars.length-1],a=Math.min(n.landed*t.widthShrinkPerScore,t.widthShrinkMax),e=Math.max(t.pillarMinWidth,t.pillarMaxWidth-a),i=t.pillarMinWidth+Math.random()*(e-t.pillarMinWidth),l=Math.min(n.landed*t.gapGrowthPerScore,t.gapGrowthMax),o=t.gapMin+l+Math.random()*(t.gapMax-t.gapMin),p=t.width-t.viewportMargin-t.pillarDepth-i-(t.anchorX+r.width/2),h=Math.max(t.gapMin,Math.min(o,p));n.pillars.push(makePillar(t,n,r.worldX+r.width/2+h+i/2,i))}function ensureAhead(t,n){for(;n.pillars.length-1-n.current<LOOKAHEAD;)appendPillar(t,n)}export function newCourse(t){const n={pillars:[],current:0,landed:0,seq:0};return n.pillars.push(makePillar(t,n,t.anchorX,t.pillarMaxWidth)),ensureAhead(t,n),n}export const targetsAhead=t=>t.pillars.slice(t.current+1);export function landOn(t,n,r){n.current=r,n.landed++,ensureAhead(t,n);const a=Math.max(0,n.current-1);a>0&&(n.pillars.splice(0,a),n.current-=a)}export function landingPoints(t,n,r,a){const e=Math.abs(r-n.worldX)<=t.sweetSpotWidth/2;if(!e)return{perfect:e,points:POINTS_PER_LAND,combo:0};const i=a+1;return{perfect:e,points:POINTS_PER_LAND+PERFECT_BONUS+5*(i-1),combo:i}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{effects,extrude,merge,Path,quat,recolor,shapeGeometry,tube}from"@nayan-ui/engine";import{noise}from"../shared/EngineMeadow.js";import{cacheGameAsset,createGameMesh as _0x50bbe2}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{BLOCK_COLORS,COLORS,PITCH,SKIES,SKY_POSITIONS,TRAJECTORY_DOTS,YAW}from"./BlukConstants.js";const meshes=new Map,cached=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("bluk/BlukScene:"+e,o),meshes.set(e,t)),t},EYE_DISTANCE=300,SKY_DEPTH=220,TOWER_DEPTH=150,FLAT_UP=quat.x(-Math.PI/2),rgb=e=>{const[o,t,s]=toColor(e);return[o,t,s]};export function skyFor(e){if("classic"===e.mode)return SKIES.classic;const o=SKIES[e.isDark?"dark":"light"],t=o.stops[0]===o.stops[o.stops.length-1]?o.stops[0]:null;return{...o,stops:o.stops.map(o=>o===t?e.BACKGROUND:o)}}const skyMesh=e=>cached("bluk-sky:"+e.stops.join(","),()=>{const o=e.stops.map(rgb),t=recolor(extrude((new Path).addRect(-.5,-.5,1,1),{depth:0}),({position:e})=>{const t=Math.min(1,Math.max(0,.5-e[1]));let s=0;for(;s<SKY_POSITIONS.length-2&&t>SKY_POSITIONS[s+1];)s++;const r=SKY_POSITIONS[s],i=(t-r)/(SKY_POSITIONS[s+1]-r||1),n=o[s],a=o[s+1];return[n[0]+(a[0]-n[0])*i,n[1]+(a[1]-n[1])*i,n[2]+(a[2]-n[2])*i,1]});return _0x50bbe2(t,{center:!1})}),bodyMesh=()=>cached("bluk-body-v2",()=>{const e=e=>({geometry:tube([[.13*e,.68,0],[.19*e,.6,.01]],{radius:.055,sides:12,caps:!0})});return _0x50bbe2(merge([{geometry:tube([[0,.42,0],[0,.56,0],[0,.7,0]],{radius:e=>.1+.035*Math.sin(Math.PI*Math.min(1,1.3*e)),sides:18,caps:!0}),scale:[1.25,1,.85]},e(-1),e(1)]),{center:!1,shine:.3})}),headMesh=()=>cached("bluk-head-v2",()=>{const e=toColor(COLORS.SKIN),o=[.2,.26,.42,1],t=[.16,.12,.1,1],s=[.24,.15,.09,1],r=(e,o,t,s)=>({geometry:tube([e,o],{radius:t,sides:12,caps:!0}),color:s}),i=Array.from({length:9},(e,o)=>{const t=1.2*Math.PI+.6*Math.PI*o/8;return[.05*Math.cos(t),.835+.035*Math.sin(t),.15]}),n=[r([-.055,.44,0],[-.065,.07,.01],.05,o),r([.055,.44,0],[.065,.07,.01],.05,o),{geometry:shapeGeometry("roundedBox"),position:[0,.43,0],scale:[.25,.04,.2],color:[.18,.14,.12,1]},{geometry:shapeGeometry("roundedBox"),position:[-.068,.035,.03],scale:[.09,.07,.16],color:t},{geometry:shapeGeometry("roundedBox"),position:[.068,.035,.03],scale:[.09,.07,.16],color:t},r([-.19,.6,.01],[-.22,.47,.03],.04,e),r([.19,.6,.01],[.22,.47,.03],.04,e),{geometry:shapeGeometry("sphere"),position:[-.225,.45,.035],scale:.075,color:e},{geometry:shapeGeometry("sphere"),position:[.225,.45,.035],scale:.075,color:e},r([0,.7,0],[0,.76,0],.04,e),{geometry:shapeGeometry("sphere"),position:[0,.86,0],scale:[.27,.3,.27],color:e},{geometry:shapeGeometry("sphere"),position:[-.135,.86,0],scale:[.05,.08,.05],color:e},{geometry:shapeGeometry("sphere"),position:[.135,.86,0],scale:[.05,.08,.05],color:e},{geometry:shapeGeometry("sphere"),position:[0,.855,.135],scale:[.04,.05,.04],color:[.92*e[0],.86*e[1],.82*e[2],1]},{geometry:shapeGeometry("sphere"),position:[0,.92,-.015],scale:[.29,.22,.29],color:s},{geometry:shapeGeometry("roundedBox"),position:[.02,.965,.11],scale:[.2,.05,.06],color:s},...[-1,1].flatMap(e=>[{geometry:shapeGeometry("sphere"),position:[.05*e,.885,.118],scale:[.055,.06,.03],color:[1,1,1,1]},{geometry:shapeGeometry("sphere"),position:[.05*e,.882,.13],scale:[.034,.038,.015],color:[.27,.45,.62,1]},{geometry:shapeGeometry("sphere"),position:[.05*e,.882,.137],scale:[.018,.02,.01],color:toColor(COLORS.PUPIL)},{geometry:shapeGeometry("sphere"),position:[.05*e+.008,.89,.142],scale:.008,color:[1.4,1.4,1.4,1]},{geometry:shapeGeometry("roundedBox"),position:[.05*e,.925,.125],rotation:quat.z(-.15*e),scale:[.05,.011,.012],color:s}]),{geometry:tube(i,{radius:.007,sides:6,caps:!0}),color:toColor(COLORS.SMILE)}];return _0x50bbe2(merge(n),{center:!1,shine:.25})}),ringMesh=()=>cached("bluk-ring",()=>_0x50bbe2(extrude((new Path).addCircle(0,0,.5).addCircle(0,0,.42),{depth:0,fillRule:"evenodd"}),{center:!1})),rockMesh=()=>cached("bluk-rock",()=>{const e=[];for(let o=0;o<26;o++){const t=-(o+.5)/26,s=.12*(noise(3.1*o,1.7)-.5),r=.12*(noise(2.3*o,8.9)-.5),i=.78+.3*noise(1.9*o,4.2);e.push({geometry:shapeGeometry("roundedBox"),position:[.3*s,t,.3*r],scale:[1+s,1/26-.004,1+r],color:[i,i,i,1]}),e.push({geometry:shapeGeometry("cube"),position:[0,t-.5/26,0],scale:[.97,.004,.97],color:[.45,.45,.45,1]})}return _0x50bbe2(merge(e),{center:!1,shine:.12})}),capMesh=()=>cached("bluk-cap",()=>{const e=toColor(COLORS.GRASS),o=toColor(COLORS.GRASS_DARK),t=toColor(COLORS.MOSS),s=[{geometry:shapeGeometry("roundedBox"),position:[0,.5,0],scale:[1.06,1,1.06],color:e},{geometry:shapeGeometry("roundedBox"),position:[0,-.1,0],scale:[1.02,.4,1.02],color:t}];for(let t=0;t<9;t++){const r=.115*t-.46,i=.5+.9*noise(2.7*t,3.3);s.push({geometry:shapeGeometry("roundedBox"),position:[r,-i/2+.1,.5],scale:[.09,i,.06],color:t%2?o:e})}for(const t of[-1,1])for(let r=0;r<6;r++){const i=.16*r-.4,n=.4+.8*noise(3.9*r+t,7.1);s.push({geometry:shapeGeometry("roundedBox"),position:[.52*t,-n/2+.1,i],scale:[.06,n,.1],color:r%2?e:o})}return _0x50bbe2(merge(s),{center:!1,shine:.08})}),cloudMesh=()=>cached("bluk-cloud",()=>_0x50bbe2(merge([[0,0,.5],[-.28,-.06,.38],[.3,-.05,.4],[-.12,.12,.42],[.14,.14,.36],[.45,-.1,.26],[-.48,-.1,.26]].map(([e,o,t])=>({geometry:shapeGeometry("sphere"),position:[e,o,0],scale:[t,.75*t,.6*t]}))),{center:!1,shine:0}));export const toWorld=(e,o,t=0)=>[e,-o,t];function spawnPillar(e,o,t){const s=o.height+400-t.topY,r=.85*t.width,i=e.spawn({mesh:"none",position:toWorld(t.worldX,t.topY),pickable:!1}),n=o=>e.spawn({parent:i,pickable:!1,...o});return n({mesh:rockMesh(),position:[0,-3,0],scale:[t.width,s,r],color:toColor(COLORS.ROCK)}),n({mesh:capMesh(),position:[0,-5,0],scale:[t.width,6,r],color:[1,1,1,1]}),n({mesh:"roundedBox",position:[0,1.2,0],scale:[o.sweetSpotWidth+8,1.2,.62*r],color:toColor(COLORS.SWEET_RECESS)}),n({mesh:"roundedBox",position:[0,1.8,0],scale:[o.sweetSpotWidth,1,.42*r],color:[1.5,1.3,.25,1]}),{root:i}}export function buildScene(e,o,t,s,r,i){const n=skyFor(t),a=e.spawn({mesh:skyMesh(n),scale:[2.4*o.width,1.8*o.height,1],pickable:!1});if(n.stars){let t=7;const s=()=>{const e=43758.5453*Math.sin(12.9898*t++);return e-Math.floor(e)};for(let t=0;t<48;t++){const t=.4+.9*s();e.spawn({mesh:"sphere",parent:a,position:[.9*(s()-.5),(.4-.64*s())/1.8,.5],scale:[(1.2+2.4*s())/(2.4*o.width),(1.2+2.4*s())/(1.8*o.height),.01],color:[1.4*t,1.3*t,1.6*t,1],pickable:!1})}}const l=[],h=toColor(n.tower);for(let t=0;t<10;t++){const s=t/10*o.width*1.8-.2*o.width,r=o.height*(.3+37*t%11*.025),i=22+53*t%20,n=1.3*o.height-r,a=t%2==0,p=a?1:.85,d=e.spawn({mesh:rockMesh(),position:[s,-r,-150*(a?1:.7)],scale:[i,n,i],color:[h[0]*p,h[1]*p,h[2]*p,1],pickable:!1});l.push({entity:d,x:s,y:-r,z:-150*(a?1:.7)})}const p=n.stars?[.55,.52,.75,.35]:[1,1,1,.85];for(let t=0;t<6;t++){const s=t/6*o.width*1.8-.2*o.width,r=o.height*(.1+29*t%7*.04),i=60+41*t%50,n=e.spawn({mesh:cloudMesh(),position:[s,-r,-60],scale:[i,.6*i,.5*i],color:p,pickable:!1});l.push({entity:n,x:s,y:-r,z:-60})}const d={sky:a,towers:l,pillars:new Map,block:e.spawn({mesh:"none",position:toWorld(r[0],r[1]),pickable:!1}),figure:0,body:0,dots:[],ring:e.spawn({mesh:ringMesh(),rotation:FLAT_UP,scale:0,color:[1.6,1.4,.3,0],pickable:!1})};d.figure=e.spawn({mesh:"none",parent:d.block,position:[0,-o.blockSize/2,0],scale:o.blockSize,pickable:!1}),d.body=e.spawn({mesh:bodyMesh(),parent:d.figure,color:toColor(BLOCK_COLORS[i]),pickable:!1}),e.spawn({mesh:headMesh(),parent:d.figure,pickable:!1});const m=toColor(COLORS.TRAJECTORY);for(let o=0;o<=TRAJECTORY_DOTS;o++)d.dots.push(e.spawn({mesh:"sphere",scale:0,color:[1.4*m[0],1.4*m[1],1.4*m[2],.92],pickable:!1}));return syncPillars(e,o,d,s),d}export function removeScene(e,o){for(const t of[o.sky,...o.towers.map(e=>e.entity),...Array.from(o.pillars.values(),e=>e.root),o.block,...o.dots,o.ring])e.despawn(t)}export function syncPillars(e,o,t,s){const r=new Set(s.map(e=>e.id));for(const[o,s]of t.pillars)!r.has(o)&&(e.despawn(s.root),t.pillars.delete(o));for(const r of s)t.pillars.has(r.id)||t.pillars.set(r.id,spawnPillar(e,o,r))}export function frame(e,o,t,s,r){if(t.frameX===r&&t.frameWidth===o.width&&t.frameHeight===o.height)return;t.frameX=r,t.frameWidth=o.width,t.frameHeight=o.height;const i=e.transforms,n=r+o.width/2,a=-o.height/2,l=Math.cos(PITCH);s.target=[n,a,0],s.eye=[n+Math.sin(YAW)*l*300,a+300*Math.sin(PITCH),Math.cos(YAW)*l*300],s.ortho=o.height/2,i.position(t.sky,n-220*Math.sin(YAW),a+.1*o.height-220*Math.sin(PITCH),-220);for(const e of t.towers){const t=1.8*o.width;let s=e.x+.9*r;s=r-.2*o.width+((s-r+.2*o.width)%t+t)%t,i.position(e.entity,s-150*Math.sin(YAW)*.6,e.y,e.z)}i.flush()}export function placeBlock(e,o,t,s,r){e.set(o.block,{position:toWorld(t,s),rotation:quat.z(-r)})}export function squash(e,o,t,s){const r=o.blockSize;e.set(t.figure,{scale:[r*(1-.6*s),r*(1+s),r*(1-.6*s)]})}const squashed=(e,o)=>[e.blockSize*(1-.6*o),e.blockSize*(1+o),e.blockSize*(1-.6*o)];export function stretch(e,o,t){e.animate(t.figure,[{scale:squashed(o,.14),at:.26},{scale:squashed(o,0)}],{duration:.35,easing:"easeInOut"})}export function relax(e,o,t){e.animate(t.figure,{scale:squashed(o,0)},{duration:.16,easing:"easeOut"})}export function land(e,o,t,s,r,i,n){e.animate(t.block,{rotation:[0,0,0,1]},{duration:.22,easing:"easeOut"}),e.animate(t.figure,[{scale:squashed(o,-.2),at:.2},{scale:squashed(o,0)}],{duration:.36,easing:"back"}),e.set(t.body,{color:toColor(BLOCK_COLORS[n])}),effects.dust(e,{position:toWorld(s,r,6),count:10,size:.22*o.blockSize,speed:1.6*o.blockSize,lifetime:.48,direction:[0,1,0],spread:1.3,color:[.85,.9,.95,.6],endSize:1.8}),i&&(e.stopAnimation(t.ring),e.set(t.ring,{position:toWorld(s,r-1.5),scale:.4*o.blockSize,color:[1.6,1.4,.3,.9]}),e.animate(t.ring,{scale:2.6*o.blockSize,color:[1.6,1.4,.3,0]},{duration:.56,easing:"easeOut"}),effects.sparkle(e,{position:toWorld(s,r-4,6),count:20,size:.08*o.blockSize,speed:3*o.blockSize,lifetime:.6,gravity:4*-o.blockSize,colors:[[1,.83,.17,1],[1,1,1,1]]}))}export function fall(e,o,t,s){const r=toColor(BLOCK_COLORS[s]);e.animate(o.block,{rotation:quat.z(-(t+1.6))},{duration:.42,easing:"easeIn"}),e.animate(o.body,{color:[r[0],r[1],r[2],0]},{duration:.3}),e.animate(o.figure,{scale:.01},{duration:.3,delay:.1,easing:"easeIn"})}export function resetBlock(e,o,t,s){for(const o of[t.block,t.figure,t.body,t.ring])e.stopAnimation(o);e.set(t.block,{rotation:[0,0,0,1]}),e.set(t.figure,{scale:squashed(o,0)}),e.set(t.body,{color:toColor(BLOCK_COLORS[s])}),e.set(t.ring,{scale:0})}export function showArc(e,o,t,s){const r=s.length/2;for(let i=0;i<t.dots.length;i++)if(i<r){const n=o.blockSize*(.16-.08*i/Math.max(1,r));e.set(t.dots[i],{position:toWorld(s[2*i],s[2*i+1],4),scale:n})}else e.set(t.dots[i],{scale:0})}export const hideArc=(e,o,t)=>showArc(e,o,t,[]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0x297d21=_0x24ae;function _0x24ae(e,o){e-=207;const t=_0xb99f();let r=t[e];if(void 0===_0x24ae.hmDFCD){const e=function(e,o){let t,r,W=[],n=0,a="";for(e=function(e){let o="",t="";for(let t,r,W=0,n=0;r=e.charAt(n++);~r&&(t=W%4?64*t+r:r,W++%4)?o+=String.fromCharCode(255&t>>(-2*W&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(let e=0,r=o.length;e<r;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),r=0;r<256;r++)W[r]=r;for(r=0;r<256;r++)n=(n+W[r]+o.charCodeAt(r%o.length))%256,t=W[r],W[r]=W[n],W[n]=t;r=0,n=0;for(let o=0;o<e.length;o++)r=(r+1)%256,n=(n+W[r])%256,t=W[r],W[r]=W[n],W[n]=t,a+=String.fromCharCode(e.charCodeAt(o)^W[(W[r]+W[n])%256]);return a};_0x24ae.AFBTOJ=e,_0x24ae.mseTBC={},_0x24ae.hmDFCD=!0}const W=t[0];_0x24ae.VZbWub!==W&&(_0x24ae.mseTBC={},_0x24ae.VZbWub=W);const n=_0x24ae.mseTBC[e];return void 0===n?(void 0===_0x24ae.PLlzEK&&(_0x24ae.PLlzEK=!0),r=_0x24ae.AFBTOJ(r,o),_0x24ae.mseTBC[e]=r):r=n,r}!function(){const e=_0x24ae,o=_0xb99f();for(;;)try{if(465916==-parseInt(e(297,"O83P"))/1+-parseInt(e(218,"rZZ#"))/2+parseInt(e(247,"vGkb"))/3*(-parseInt(e(304,"bBR8"))/4)+-parseInt(e(295,"CMu["))/5+-parseInt(e(225,"SY1E"))/6+-parseInt(e(319,"twGy"))/7+parseInt(e(236,"twGy"))/8)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x5779e3 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0x36e9e2}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useBubbleShooterStore,useScore,useIsPlaying,useGameOver,useGameWon}from"./BubbleShooterStore.js";import{BubbleShooterService}from"./BubbleShooterService.js";import{BUBBLE_SHOOTER_ROW_COUNT,BUBBLE_SHOOTER_COLOR_COUNT,BUBBLE_SHOOTER_TIME_LIMIT}from"./BubbleShooterConstants.js";function _0xb99f(){const e=["WQ0GFSkXjmkPWOTM","W6LPW4jKsLhdTNC","bZanyKyTp8oECSkCWP95W78AW6lcOmoqWR/dSXu","n8kitmo0WPW","Bmk9W4FdIJvkW5bZWOi","hNWeWOe","umocr3aHW7b+W5SNWQquW5TuWRpdVq","ACkIv8oMW5GaW74","o8kDWQpcNCk+o8opWRPp","amoCq2ddHYiWlCkzC17cNZNcJSkb","WQ85W74KW5NcLxe6WOS","zmkihfFcVComB8kaWQyDWRBdICo9W4ZdRqxdOmoBW6yYWOmehHtdNXNdHmkxDCkPaq","v8o6WO7dOYO","t8oEECoaj27cPZvI","W6bamJ4qWPbksq","tSkmhgFcOCknkmoo","y2NdLYxdUmoujXZdGW","wSkJkrXru15QbCkcmSo1","W6tcNCk8WR7cOCkaW5KiW6mdf8oR","nYbcW6qFASo8f3a","b2asWQhdSSkegSoyW4S","gw3dLf8GW6eTvCkjW6RdGdO","ngtdR1hdTXDL","EMauWPLpoCotowRcVSkLWP4","b8o6dSkikmoOW6a","W65wfGefWOHxqSoq","W5rWbs4HWQjT","vmoiwSojmLdcRZzG","F8kKqmozW5GdW6u","WOxcOrRdSSod","WOeSzSoJdxFcGCkm","zSojlq","qSoKW58UFq","qCo/W44","jsKtmee2kq","W4VdGLWKmW","WR0lr8khia","DmofugmWWR55","ySoQswya","W4hcMSofnmoW","m8kvWQu","ySodr1i0WRXHW5ePWQGl","DgLzDHvRACoVuSkHWQS4W4W","WOrEkmk1DHiMD8o1W6O3","WOrEkmkZCrGVDSoG","CYlcSIJcO0K+zSowW4n7W6e9","iNBdPh/dTXy","imkZF8oxWQFdUSk5W6/dSW","W6rqnb8bWP9k","mY8eauu0mCoEF8kAWOC","gbS5W7zI","jSoJcCklkSo4W4pdSmkreWuGiW","pmkPtConWRldJ8k9","WRGrWROBgq","W6jUW5XkBq","FSowW7Gptdy","zmovvKe5WRf0W5OMWQW","W5VcHd/dNX3dMKP3WOHMW4VdPZm","hmomWQ8OsG","hIhcP8kImSkhCSki","WQ85W74IW57cN3G7WP4KWOG","W57cM8onm8oW","WOpcNbRdKSoFWQhdImkjv8onhXpcHMKfb8oQ","DvS9lmoKW7PL","wt/cMdP0WRucuCk+W5q","vCkLx8ozF8kLWQJdJmkCkZmdiW","f8onrgRdLdummmkyEgNcMtVcHSkXWPavWPWgWP8","a0ldIf7dNJ9vzSosW5rZW5qOdW","u8o5WPJdQr9BWQldMmkrWPldNSkv","WQddSmkxvMvPW47cJ8obW63dUW0","u8osW7bAWRCwlNJcRCoramklW4Cv","vSkPy8orW6G","qmoMWOVdSIjUWPdcVcOpA1NcHG","n8odkmkQa8ooW4m","W7dcNCk8WQ7cTmknW4ep","n8kjWQHhW6aPfa","imofW6y/W78XBCoTWOS","ySotW7eota","mYWfi1a9dSouCCkwWPGWW7irW4xcTmoaWRJdU1e","WR4vWRtdQxKTW4i","W4tcKmkNWPlcTmomW7qnW6mjeSk5","mmkOCmorWRldLmk2W6FdPa","sCouwCoriudcQd8","CIBcUs/cO0G7a8oRW7LpW6mEhW","m8kqWQeJF8k5tG","CSofW6WotcWE","CSoblCkYWRtcHa","qvRdVX/dLG","W7rqjb4hWOnxtSos","zmo0W5DBWPO/huNcHmo9ja","W7vanqGqWRzFqCos","CeiQjG","lmoXWPivE8kiWPW","amk1WPH0W4KBpSourSkyxa","wxLJWRebWPxcGuNdGX3cSmoK","W4vWbc8OWRrHF8o/dLDxgeG","WR82B8kHmCkKWPnHWQ0DW6a","WPjyp8keCHa+","WQJcVISvWPOJWPdcTW","WQldU8kcz31TW6NcHq","W7RcGSooW7zr","W6lcI8kTWQ/cPCkk","W4mDiSkXwHiMEW","jbVcGmoWamkMsa","hJqWW7juW5/cM1ZdSG","WPNcLWFdTSoAWQhdNCkjq8op","W7L5W4rIrLhdPq","cdiyW69b","xSkeCmoPW7eOW47dO8o4A1ecxNS","W7dcMCkLWPJcICki","ssJcIqTSWRe","iszvW5mCySoT","b2asWRBdSCke","AmokrCo1mG","ss/cNHH9WROp","o8kDWQpcM8k5mCogWRTAWRfN","j8kDWPBcTmk5jmodWRDC","mCovW6COW64yEa","ESo6r8oGC2BcKb1v","bCkKvCoXWPe","ySojWQ7dQdjYWPhdQCk4WR7dUSkYnJ0"];return(_0xb99f=function(){return e})()}import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{jsx as _0x3d4814,jsxs as _0xb15819}from"react/jsx-runtime";const BubbleShooterComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:r,onShare:W,onShareScreenshot:n,onShowLeaderboard:a,bannerAd:s})=>{const S="@8#R",d=_0x24ae,m={dORQO:function(e,o,t){return e(o,t)},UqOPa:d(279,"HrUO"),PqumS:function(e,o){return e(o)},NYzfR:function(e,o){return e-o},bazRK:"wfbIT",uZkwU:function(e){return e()},ETfbI:function(e,o){return e===o}},i=e?.[d(222,"$o0A")]??!0,u=e?.[d(210,"7kas")]??!0,_=e?.[d(208,"909L")]??0,x=_0x5779e3[d(254,"xEVg")](i);x.current=i;const l=_0x5779e3[d(265,"HrUO")](u);l.current=u;const O=_0x5779e3.useRef(t);O[d(259,"4uQa")]=t;const b=useScore(),k=m[d(253,"VKUO")](useIsPlaying),C=useGameOver(),f=m[d(324,"vGkb")](useGameWon),G=_0x5779e3.useRef(!1),p=_0x5779e3[d(213,"lD1f")](e=>{const o=d;if(O[o(237,"vE^4")]&&!G.current){const t=useBubbleShooterStore[o(251,"t!U6")]()[o(230,"909L")];O.current({status:e,score:t[o(235,"mGUV")]()}),G[o(216,"&s&g")]=!0}},[]),B=_0x5779e3.useMemo(()=>new BubbleShooterService,[]);_0x5779e3[d(284,"lD1f")](()=>{B.setDifficulty(BUBBLE_SHOOTER_ROW_COUNT,BUBBLE_SHOOTER_COLOR_COUNT)},[B]),_0x5779e3[d(293,"O83P")](()=>{const e=d;return useBubbleShooterStore.subscribe(o=>o[e(269,"#VP5")],o=>{const t=e;var r,W,n;"wNMep"===t(310,"PpO]")?B[t(217,"CMu[")](o):(r=_0x44480d,W=_0x516bfc[t(223,"Yr%y")][t(211,"au1p")],n=_0xc78306[t(264,"O83P")],m[_0x24ae(277,"*SNl")](r,W,n),_0x491ccf(_0xca492f[t(313,"&t6q")],_0x13130b[t(232,"wasQ")]))})},[B]);const R=_0x5779e3[d(323,"GVy&")](()=>{const e=d;playSound(GAME_SOUNDS[e(220,"twGy")][e(214,"&t6q")],x[e(250,"un]A")]),playHaptic(HapticType.LIGHT,l[e(322,"l5i^")])},[]),h=_0x5779e3[d(315,"hvSd")](()=>{const e=d;playSound(GAME_SOUNDS[e(248,"l5i^")][e(307,"909L")],x[e(256,"kKMI")],!0),playHaptic(HapticType.SUCCESS,l[e(264,"O83P")])},[]),T=_0x5779e3[d(268,"#VP5")](()=>{const e=d;playSound(GAME_SOUNDS.BUBBLE_SHOOTER[e(314,"dTx#")],x[e(311,"hvSd")],!0),m[e(309,"ZYFr")](playHaptic,HapticType[e(300,"l5i^")],l[e(267,"CMu[")])},[]);_0x5779e3[d(294,"HrUO")](()=>{B[d(292,"xEVg")](R,h,T)},[B,R,h,T]),_0x5779e3.useEffect(()=>{const e=d;if((C||f)&&!G[e(245,"au1p")]){const o=f?e(305,"PfMy"):m[e(266,"mGUV")];!f&&(playSound(GAME_SOUNDS[e(273,"bu5x")].GAME_OVER,x[e(238,"909L")],!0),playHaptic(HapticType.ERROR,l[e(302,"CW^E")])),p(o)}!C&&!f&&(G.current=!1)},[C,f,p]),_0x5779e3.useEffect(()=>{B.initializeBubbles()},[B]),_0x5779e3[d(318,"un]A")](()=>()=>{const e=_0x24ae;useBubbleShooterStore[e(288,"l5i^")]()[e(299,"l5i^")]&&!G[e(308,"GVy&")]&&p(e(320,"twGy")),B[e(298,"rZZ#")](),useBubbleShooterStore[e(252,"$o0A")]()[e(243,"l5i^")]()},[B]),_0x5779e3[d(282,"#VP5")](()=>{const e=d,o={JxQzU:function(e,o){return m.NYzfR(e,o)},oSiTu:function(e,o){return e===o},VcKTB:function(e,o){return e(o)}};if(e(286,"bu5x")===m.bazRK){let t=null;const r=()=>{if(null!==t)return;let r=0;const W=1e3/60,n=e=>{const a=_0x24ae;o[a(224,"CW^E")](e,r)>=W&&(o[a(303,"J@[&")](a(207,"4uQa"),"NNZfe")?_0xfc2f47[a(221,"bu5x")](_0x3bda83,_0x52ebcd,_0x1ffcef):(r=e,B[a(231,"GVy&")]())),t=requestAnimationFrame(n)};t=m[e(327,"H4xi")](requestAnimationFrame,n)},W=()=>{null!==t&&(o[e(272,"*SNl")](cancelAnimationFrame,t),t=null)};useBubbleShooterStore.getState().isPlaying&&m[e(312,"hvSd")](r);const n=useBubbleShooterStore[e(241,"l5i^")](o=>o[e(301,"mGUV")],e=>{e?r():W()});return()=>{n(),W()}}_0x1922d2=_0x240fe6,_0x48df3b[e(219,"YNGT")]()},[B]);const E=_0x5779e3[d(249,"PpO]")](()=>{const e=d;G[e(250,"un]A")]=!1,B[e(209,"hvSd")](!0),useBubbleShooterStore[e(227,"xEVg")]().startGame(BUBBLE_SHOOTER_ROW_COUNT,BUBBLE_SHOOTER_COLOR_COUNT,BUBBLE_SHOOTER_TIME_LIMIT),B[e(290,"%*w$")](),playSound(GAME_SOUNDS.BUBBLE_SHOOTER[e(306,"909L")],x[e(216,"&s&g")]),m.dORQO(playHaptic,HapticType[e(226,"rZZ#")],l.current)},[B]),P=_0x5779e3[d(317,"un]A")](()=>{const e=d;p(e(239,"PfMy")),useBubbleShooterStore[e(288,"l5i^")]()[e(243,"l5i^")](),B[e(243,"l5i^")](),B.initializeBubbles()},[B,p]),y=_0x5779e3[d(242,"Yr%y")](()=>{const e=d;if(m.ETfbI("jXjOO",e(240,"%*w$"))){const o="2|5|3|4|1|0".split("|");let t=0;for(;;){switch(o[t++]){case"0":_0x432c51(_0x560c44[e(228,"dTx#")],_0x4513fd[e(308,"GVy&")]);continue;case"1":MVrfps[e(260,"vGkb")](_0x2845ea,_0x47a101[e(223,"Yr%y")].START,_0xdb7e4a[e(322,"l5i^")]);continue;case"2":_0x5b307e[e(270,S)]=!1;continue;case"3":_0x19670d[e(274,"PpO]")]()[e(321,"*SNl")](_0x2543c1,_0x426a23,_0x878ac1);continue;case"4":_0x4b2734.startGame();continue;case"5":_0x5e49c8[e(258,"J@[&")](!0);continue}break}}else G[e(232,"wasQ")]=!1,r?.(),useBubbleShooterStore[e(289,"Qb@f")]()[e(229,S)](),B[e(287,"mGUV")](),B[e(215,"J@[&")]()},[B,r]),v={..._0x5779e3[d(296,"twGy")](()=>({isPlaying:k,gameOver:C,onStartGame:E,onStopGame:P,onShare:W,onShowLeaderboard:a,startButtonSubtext:d(285,"Qb@f")}),[k,C,E,P,W,a])},N={..._0x5779e3[d(281,"CW^E")](()=>({isVisible:C,score:b,onPlayAgain:y,buttonText:d(233,"xEVg"),title:f?d(212,"kKMI"):d(271,"mGUV"),message:f?d(276,"GVy&"):d(280,"hvSd")}),[C,b,y,f])};N[d(326,"*SNl")]=n,N.bannerAd=s;const H={};return H[d(262,"xEVg")]=GAME_IDS[d(261,"CW^E")],H[d(275,"4uQa")]=e||DEFAULT_GAME_SETTINGS,H.onSettingsChange=o,_0x3d4814(GestureHandlerRootView,{style:styles[d(234,"*SNl")],children:_0xb15819(_0x36e9e2,{offset:_,children:[_0x3d4814(GameArea,{gameService:B,offset:_}),_0x3d4814(ScoreBoard,{offset:_}),_0x3d4814(GameControlButton,v),_0x3d4814(GameOverModal,N),_0x3d4814(GameSettingsModal,H)]})})},_0x44782d={};_0x44782d[_0x297d21(244,"&s&g")]=1,_0x44782d[_0x297d21(283,"YNGT")]=BACKGROUND_COLOR;const _0x521dcb={};_0x521dcb[_0x297d21(278,"FiXi")]=_0x44782d;const styles=StyleSheet[_0x297d21(263,"CMu[")](_0x521dcb);export const BubbleShooter=BubbleShooterComponent;BubbleShooter[_0x297d21(246,"dTx#")]=_0x297d21(325,"rZZ#");
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT}from"./BubbleShooterConstants.js";import{aimAt,createGame,dispose,fire,reset,setLayout,setTheme,start,tick}from"./BubbleShooterGame.js";import{jsx as _0x513b84}from"react/jsx-runtime";const SFX=GAME_SOUNDS.BUBBLE_SHOOTER;export const BubbleShooter=engineGame(GAME_IDS.BUBBLE_SHOOTER,e=>{const[t,s]=useLiveState(0),[r,o]=useLiveState(0),[i,a]=useLiveState(TIME_LIMIT),{theme:n,status:m,screen:S,gameOver:u}=useEngineGame(e,{gameId:GAME_IDS.BUBBLE_SHOOTER,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,resize:(e,t,s,r)=>{const o=getLayout(t,s,r);return setLayout(e,o),o.boardWidth},drag:(e,{phase:t,x:s,y:r,cancelled:o})=>{"end"!==t?aimAt(e,s,r):o||fire(e)},tap:(e,t,s)=>{aimAt(e,t,s),fire(e)},sounds:SFX,onStart:e=>e(SFX.START,HapticType.SUCCESS),wire:(e,t)=>{e.onScore=s,e.onTime=a,e.onBubbles=o,e.onShoot=()=>t(SFX.SHOOT,HapticType.LIGHT),e.onPop=()=>t(SFX.POP,HapticType.SUCCESS),e.onWin=()=>t(SFX.WIN,HapticType.SUCCESS),e.onLose=()=>t(SFX.GAME_OVER,HapticType.ERROR)}});return _0x513b84(EngineGameScreen,{...S,light:LIGHT,columns:[scoreColumn(t),scoreColumn(r,"BUBBLES"),timerColumn(i,n)],subtext:"Match three colored bubbles!",gameOver:u({title:"win"===m?"YOU WON!":"GAME OVER",message:"win"===m?"All bubbles cleared!":"Great shooting!",scoreLabel:"Final Score",score:t,buttonText:"Shoot Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{isTablet}from"../../services/UtilsService.js";import{getSceneInputInsets}from"../shared/EngineHud.js";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const ROW_COUNT=5;export const COLS_PER_ROW=9;export const COLOR_COUNT=4;export const MIN_MATCH=3;export const POINTS_PER_BUBBLE=200;export const TIME_LIMIT=300;export const BUBBLE_COLORS=["#FF3B3B","#32CD32","#FFD700","#4DA6FF","#BF5AF2"];export const SHOT_SPEED=20;export const FRAME_TIME=1/60;export const MAX_AIM_ANGLE=.4*Math.PI;export const TOP_BOUNDARY=10;const BUBBLE_SPACING=2;export const SNAP_FROM=.55;export const POP_SPRING={damping:9,stiffness:280};export const INTRO_SPRING={damping:12,stiffness:200};export const INTRO_ROW_STAGGER=.055;export const INTRO_SWEEP=6e-4;export const LOAD_FROM=.4;export const NEXT_DELAY=.08;export const BURST_TIME=.45;export const AIM_DOT_COUNT=40;export const AIM_DOT_SPACING=18;export const AIM_DOT_RADIUS_START=3;export const AIM_DOT_RADIUS_END=1.5;export const AIM_ALPHA_NEAR=.6;export const AIM_ALPHA_FAR=.3;export const LIGHT=frontLight([-.45,.6,1],.45);export const BUBBLE_SHINE=.4;export const CLASSIC_BOARD="rgba(255, 255, 255, 0.30)";export const CLASSIC_BORDER="rgba(255, 255, 255, 0.35)";export const CLASSIC_AIM="#ffffff";export const CLASSIC_RADIUS=16;export const THEMED_RADIUS=8;const GRID_HEIGHT=isTablet?650:500;export function getLayout(t,o,e){const r=gameWidthFor(t),s=getSceneInputInsets(e),n=s.top+4,_=Math.max(1,o-n-s.bottom-10),p=(t-r)/2,I=Math.floor(r/9/2-2),A=Math.min(GRID_HEIGHT,_);return{width:t,height:o,boardLeft:p,boardTop:n+(_-A)/2,boardWidth:r,boardHeight:A,radius:I,diameter:2*(I+2),shooterX:r/2,shooterY:A-40,minX:I,maxX:r-I}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{introPlayed}from"../shared/EngineUtils.js";import{AIM_DOT_COUNT,AIM_DOT_RADIUS_END,AIM_DOT_RADIUS_START,AIM_DOT_SPACING,COLOR_COUNT,COLS_PER_ROW,FRAME_TIME,INTRO_ROW_STAGGER,INTRO_SPRING,INTRO_SWEEP,LOAD_FROM,MAX_AIM_ANGLE,MIN_MATCH,NEXT_DELAY,POINTS_PER_BUBBLE,POP_SPRING,ROW_COUNT,SHOT_SPEED,SNAP_FROM,TIME_LIMIT,TOP_BOUNDARY}from"./BubbleShooterConstants.js";import{aimColor,bubbleColor,bubblePosition,bubbleSize,buildScenery,placeAimDots,popBubble,removeScenery,setSceneryTheme,spawnAimDots,spawnBubble}from"./BubbleShooterScene.js";const WORLD_CAPACITY=600,NEXT_SCALE=.6,pick=o=>o[Math.floor(Math.random()*o.length)],randomColor=()=>Math.floor(Math.random()*COLOR_COUNT);function generateBoard(o){const e=o.diameter,t=(o.boardWidth-COLS_PER_ROW*e)/2+o.radius,n=[];for(let r=0;r<ROW_COUNT;r++)for(let s=0;s<COLS_PER_ROW-r;s++)n.push({x:t+r*(e/2)+s*e,y:r*e*.866+o.radius+5,color:randomColor(),row:r,entity:null});return n}export function createGame(o){const e=new World(600),t={world:e,camera:{eye:[0,0,400],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,scenery:null,phase:"ready",get score(){return e.scoreboard.score},get timeLeft(){return e.scoreboard.shownSeconds},won:!1,bubbles:null,current:0,next:0,currentEntity:null,nextEntity:null,aimDots:[],angle:0,shot:null,intro:!0,introAge:-1,onPhase:o=>{},onScore:o=>{},onTime:o=>{},onBubbles:o=>{},onShoot:()=>{},onPop:()=>{},onWin:()=>{},onLose:()=>{}};return e.scoreboard.reset(0,TIME_LIMIT),e.scoreboard.handlers={onSecond:o=>t.onTime(o),onTimeUp:()=>"playing"===t.phase&&end(t,!1)},t}export function setLayout(o,e){const t=o.world,n=o.layout;o.scenery&&removeScenery(t,o.scenery);for(const e of[...o.aimDots,o.currentEntity,o.nextEntity])null!=e&&t.despawn(e);if(cancelShot(o),o.layout=e,o.camera.ortho=e.height/2,o.scenery=buildScenery(t,e,o.theme),o.aimDots=spawnAimDots(t),o.bubbles){const r=n?e.diameter/n.diameter:1;for(const e of o.bubbles)null!=e.entity&&t.despawn(e.entity),e.x*=r,e.y*=r;spawnBubbles(o)}else newBoard(o);spawnShooter(o),drawAim(o)}export function setTheme(o,e){o.theme=e,o.layout&&o.scenery&&!o.world.isDisposed&&(setSceneryTheme(o.world,o.layout,o.scenery,e),drawAim(o))}function spawnBubbles(o){const e=o.layout;if(!e||!o.bubbles)return;const t=o.intro;t&&(o.introAge=0);for(const n of o.bubbles)if(n.entity=spawnBubble(o.world,e,n.color,n.x,n.y,t?0:1),t){const t=n.row*INTRO_ROW_STAGGER+Math.abs(n.x-e.shooterX)*INTRO_SWEEP;o.world.animate(n.entity,{scale:bubbleSize(e)},{spring:INTRO_SPRING,delay:t})}}function spawnShooter(o){const e=o.layout,t=o.world;o.currentEntity=spawnBubble(t,e,o.current,e.shooterX,e.shooterY+20),o.nextEntity=spawnBubble(t,e,o.next,e.shooterX+50,e.shooterY+20,.6)}function showShooter(o,e){const t=o.layout,n=o.world;if(!t||null==o.currentEntity||null==o.nextEntity)return;const r=bubbleSize(t);n.set(o.currentEntity,{color:bubbleColor(o.current)}),n.set(o.nextEntity,{color:bubbleColor(o.next)}),e&&(n.set(o.currentEntity,{scale:r*LOAD_FROM}),n.animate(o.currentEntity,{scale:r},{spring:POP_SPRING}),n.set(o.nextEntity,{scale:0}),n.animate(o.nextEntity,{scale:.6*r},{spring:POP_SPRING,delay:NEXT_DELAY}))}function newBoard(o){const e=o.layout;if(!e)return void(o.bubbles=null);if(o.bubbles)for(const e of o.bubbles)null!=e.entity&&o.world.despawn(e.entity);o.bubbles=generateBoard(e);const t=boardColors(o);o.current=pick(t),o.next=pick(t),o.intro=!0,spawnBubbles(o),o.onBubbles(o.bubbles.length)}const boardColors=o=>[...new Set((o.bubbles??[]).map(o=>o.color))];export function start(o){"ready"===o.phase&&(o.layout&&!o.bubbles?.length&&(newBoard(o),showShooter(o,!1)),o.phase="playing",o.world.scoreboard.startCountdown(TIME_LIMIT),o.onPhase("playing"))}export function reset(o){cancelShot(o),newBoard(o),showShooter(o,!1),o.angle=0,drawAim(o),o.world.scoreboard.reset(0,TIME_LIMIT),o.won=!1,o.phase="ready",o.onScore(0),o.onTime(TIME_LIMIT),o.onPhase("ready")}export function dispose(o){o.shot=null,o.world.dispose()}function end(o,e){o.world.scoreboard.stop(),cancelShot(o),o.won=e,o.phase="over",o.angle=0,drawAim(o),e?o.onWin():o.onLose(),o.onPhase("over")}export function tick(o,e){o.world.isDisposed||(introPlayed(o,e),o.shot&&stepShot(o,Math.min(e,3*FRAME_TIME)/FRAME_TIME),o.world.update(e))}export function aimAt(o,e,t){const n=o.layout;if(!n||"playing"!==o.phase)return;const r=e-n.boardLeft-n.shooterX,s=t-n.boardTop-n.shooterY;o.angle=Math.max(-MAX_AIM_ANGLE,Math.min(MAX_AIM_ANGLE,Math.atan2(r,-s))),drawAim(o)}function drawAim(o){const e=o.layout;if(!e)return;const t=[];if(!o.shot){const n=(2*e.radius)**2;let r=e.shooterX,s=e.shooterY,l=o.angle;for(let a=1;a<=AIM_DOT_COUNT;a++){let i=r+Math.sin(l)*AIM_DOT_SPACING;const u=s-Math.cos(l)*AIM_DOT_SPACING;if(i<e.minX?(i=e.minX+(e.minX-i),l=-l):i>e.maxX&&(i=e.maxX-(i-e.maxX),l=-l),u<TOP_BOUNDARY)break;if(t.push(i,u,AIM_DOT_RADIUS_START-a/AIM_DOT_COUNT*(AIM_DOT_RADIUS_START-AIM_DOT_RADIUS_END)),o.bubbles?.some(o=>(i-o.x)**2+(u-o.y)**2<n))break;r=i,s=u}}placeAimDots(o.world,e,o.aimDots,t,aimColor(o.theme))}export function fire(o){const e=o.layout;if(!e||"playing"!==o.phase||o.shot)return;o.shot={x:e.shooterX,y:e.shooterY,vx:Math.sin(o.angle)*SHOT_SPEED,vy:-Math.cos(o.angle)*SHOT_SPEED,color:o.current,entity:spawnBubble(o.world,e,o.current,e.shooterX,e.shooterY)};const t=boardColors(o);o.current=o.next,t.length&&(t.includes(o.current)||(o.current=pick(t)),o.next=pick(t)),showShooter(o,!0),drawAim(o),o.onShoot()}function cancelShot(o){o.shot&&o.world.despawn(o.shot.entity),o.shot=null}function stepShot(o,e){const t=o.layout,n=o.shot,r=(2*t.radius)**2,s=n.vx*e,l=n.vy*e,a=Math.max(1,Math.ceil(Math.hypot(s,l)/(.5*t.radius)));let i=1;for(let e=0;e<a;e++){n.x+=s/a*i,n.y+=l/a,n.x<t.minX?(n.x=t.minX+(t.minX-n.x),i=-i):n.x>t.maxX&&(n.x=t.maxX-(n.x-t.maxX),i=-i);let e=n.y-t.radius<=TOP_BOUNDARY;if(e?n.y=TOP_BOUNDARY+t.radius:e=o.bubbles.some(o=>(n.x-o.x)**2+(n.y-o.y)**2<=r),e)return void land(o,n.x,n.y)}i<0&&(n.vx=-n.vx),o.world.set(n.entity,{position:bubblePosition(t,n.x,n.y)})}function snapPoint(o,e,t){const n=o.layout,r=n.diameter,s=TOP_BOUNDARY+n.radius,l=Math.max(n.minX,Math.min(n.maxX,e)),a=Math.max(s,t);let i=null,u=1/0;for(const e of o.bubbles){const o=(l-e.x)**2+(a-e.y)**2;o<u&&(u=o,i=e)}if(!i||u>(2*r)**2)return[l,a];const b=l-i.x,h=a-i.y,d=Math.hypot(b,h);let y=d<.1?i.x:i.x+b/d*r,m=d<.1?i.y+r:i.y+h/d*r;return y=Math.max(n.minX,Math.min(n.maxX,y)),m=Math.max(s,Math.min(i.y+2*r,m)),[y,m]}function connected(o,e){const t=(2.5*o.layout.radius)**2,n=new Set([e]),r=[e];for(let s=0;s<r.length;s++){const l=r[s];for(const s of o.bubbles)s.color!==e.color||n.has(s)||(l.x-s.x)**2+(l.y-s.y)**2<t&&(n.add(s),r.push(s))}return[...n]}function land(o,e,t){const n=o.layout,r=o.world,s=o.shot;o.shot=null;const[l,a]=snapPoint(o,e,t),i={x:l,y:a,color:s.color,row:0,entity:s.entity};r.set(s.entity,{position:bubblePosition(n,l,a),scale:bubbleSize(n)*SNAP_FROM}),r.animate(s.entity,{scale:bubbleSize(n)},{spring:POP_SPRING}),o.bubbles.push(i);const u=connected(o,i);if(u.length>=MIN_MATCH){const e=new Set(u);o.bubbles=o.bubbles.filter(o=>!e.has(o));for(const o of u)null!=o.entity&&popBubble(r,n,o.entity,o.color,o.x,o.y),o.entity=null;o.onScore(o.world.scoreboard.add(u.length*POINTS_PER_BUBBLE)),o.onPop();const t=boardColors(o);!t.length||t.includes(o.current)&&t.includes(o.next)||(t.includes(o.current)||(o.current=pick(t)),t.includes(o.next)||(o.next=pick(t)),showShooter(o,!0))}o.onBubbles(o.bubbles.length),0!==o.bubbles.length||"playing"!==o.phase?drawAim(o):end(o,!0)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{extrude,Path,shapeGeometry}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{cacheGameAsset,createGameMesh as _0x25ff43}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{AIM_ALPHA_FAR,AIM_ALPHA_NEAR,AIM_DOT_COUNT,BUBBLE_COLORS,BUBBLE_SHINE,BURST_TIME,CLASSIC_AIM,CLASSIC_BOARD,CLASSIC_BORDER,CLASSIC_RADIUS,THEMED_RADIUS,TOP_BOUNDARY}from"./BubbleShooterConstants.js";const Z_BACKDROP=-20,Z_BOARD=0,Z_RIM=.2,Z_AIM=.5,HIDDEN=0;export const toWorld=(e,o,t,s=0)=>[e.boardLeft+o-e.width/2,e.height/2-(e.boardTop+t),s];const bubbleZ=e=>e.radius+1;export const bubblePosition=(e,o,t)=>toWorld(e,o,t,bubbleZ(e));export const bubbleSize=e=>2*e.radius;const meshes=new Map,mesh=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("bubble-shooter/BubbleShooterScene:"+e,o),meshes.set(e,t)),t},bubbleMesh=()=>mesh("dot",()=>_0x25ff43(shapeGeometry("sphere"),{shine:BUBBLE_SHINE})),discMesh=()=>mesh("disc",()=>_0x25ff43(extrude((new Path).addCircle(0,0,.5),{depth:0}))),panelMesh=(e,o,t,s=0)=>mesh("panel:"+e+":"+o+":"+t+":"+s,()=>{const r=(new Path).addRoundedRect(0,0,e,o,t);return s>0&&r.addRoundedRect(s,s,e-2*s,o-2*s,t-s),_0x25ff43(extrude(r,{depth:0,fillRule:"evenodd"}),{center:!1})}),BUBBLES=BUBBLE_COLORS.map(e=>toColor(e));export const bubbleColor=e=>BUBBLES[e%BUBBLES.length];export const aimColor=e=>toColor("classic"===e.mode?CLASSIC_AIM:e.TEXT);function spawnBoard(e,o,t){const s="classic"===t.mode,r=s?CLASSIC_RADIUS:THEMED_RADIUS,n=e=>toWorld(o,0,0,e);return[e.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,r),position:n(0),color:toColor(s?CLASSIC_BOARD:t.BOARD.SURFACE),pickable:!1}),e.spawn({mesh:panelMesh(o.boardWidth,o.boardHeight,r,1.5),position:n(.2),color:toColor(s?CLASSIC_BORDER:t.BOARD.BORDER),pickable:!1})]}export function buildScenery(e,o,t){return{backdrop:spawnBackdrop(e,o.width,o.height,-20,t),parts:spawnBoard(e,o,t)}}export function removeScenery(e,o){e.despawn(o.backdrop);for(const t of o.parts)e.despawn(t)}export function setSceneryTheme(e,o,t,s){setBackdropTheme(e,t.backdrop,s);for(const o of t.parts)e.despawn(o);t.parts=spawnBoard(e,o,s)}export function spawnBubble(e,o,t,s,r,n=1){return e.spawn({mesh:bubbleMesh(),position:bubblePosition(o,s,r),scale:bubbleSize(o)*n,color:bubbleColor(t),pickable:!1})}export function popBubble(e,o,t,s,r,n){const a=bubblePosition(o,r,n);popAndBurst(e,t,{scale:bubbleSize(o),color:bubbleColor(s),duration:BURST_TIME},{position:[a[0],a[1],a[2]+o.radius],size:bubbleSize(o),color:bubbleColor(s),glowZ:.5}).then(()=>e.despawn(t))}export function spawnAimDots(e){return Array.from({length:AIM_DOT_COUNT},()=>e.spawn({mesh:discMesh(),scale:0,pickable:!1}))}export function placeAimDots(e,o,t,s,r){const n=Math.max(1,o.shooterY-TOP_BOUNDARY);t.forEach((t,a)=>{if(3*a>=s.length)return void e.set(t,{scale:0});const i=s[3*a],p=s[3*a+1],b=Math.max(0,Math.min(1,(o.shooterY-p)/n));e.set(t,{position:toWorld(o,i,p,.5),scale:2*s[3*a+2],color:[r[0],r[1],r[2],AIM_ALPHA_NEAR+(AIM_ALPHA_FAR-AIM_ALPHA_NEAR)*b]})})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{scoreColumn,timerColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{getLayout,LIGHT,TIME_LIMIT}from"./CandyCrushConstants.js";import{createGame,dispose,reset,setLayout,setTheme,start,tick,touchEnd,touchMove,touchStart}from"./CandyCrushGame.js";import{jsx as _0x57d102}from"react/jsx-runtime";const SFX=GAME_SOUNDS.CANDY_CRUSH,scoreFormatter=e=>""+e;export const CandyCrush=engineGame(GAME_IDS.CANDY_CRUSH,e=>{const[t,r]=useLiveState(0),[s,o]=useLiveState(TIME_LIMIT),{theme:a,screen:i,gameOver:n}=useEngineGame(e,{gameId:GAME_IDS.CANDY_CRUSH,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},drag:(e,{phase:t,x:r,y:s,dx:o,dy:a,cancelled:i})=>{"start"===t?touchStart(e,r,s):"move"===t?touchMove(e,o,a):touchEnd(e,o,a,i)},outcome:()=>"win",sounds:SFX,onStart:e=>e(SFX.START,HapticType.MEDIUM),wire:(e,t)=>{e.onScore=r,e.onTime=o,e.onSelect=()=>t(SFX.SELECT,HapticType.LIGHT),e.onSwap=()=>t(SFX.SWAP,HapticType.MEDIUM),e.onInvalid=()=>t(SFX.INVALID_SWAP,HapticType.WARNING),e.onMatch=e=>t(e>1?SFX.COMBO:SFX.MATCH,e>1?HapticType.HEAVY:HapticType.MEDIUM),e.onBomb=()=>t(SFX.BOMB,HapticType.HEAVY),e.onBlast=()=>t(SFX.BLAST,HapticType.HEAVY),e.onWarning=e=>t(SFX.WARNING,e<=10?HapticType.HEAVY:HapticType.MEDIUM),e.onTimeUp=()=>t(SFX.TIME_UP,HapticType.HEAVY)}});return _0x57d102(EngineGameScreen,{...i,light:LIGHT,columns:[scoreColumn(t),timerColumn(s,a,0)],subtext:"Match 3 or more",gameOver:n({title:"TIME UP!",message:"Great crushing!",scoreLabel:"Final Score",score:t,formatter:scoreFormatter,buttonText:"Crush Again!"})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{frontLight,gameWidthFor}from"../shared/EngineUtils.js";export const GRID_SIZE=7;export const CANDY_TYPES=4;export const MIN_MATCH=3;export const BOMB_MATCH=5;export const BOMB=-1;export const BOMB_MULTIPLIER=2;export const ZAP_TIME=.25;export const POINTS_PER_CANDY=50;export const COMBO_MULTIPLIER=1.25;export const TIME_LIMIT=300;export const WARNING_TIMES=[30,10];export const CANDY_COLORS=["#EF2D36","#2DC84E","#3B9FFF","#FFD020","#B44CFF","#FF8820"];export const SWAP_TIME=.2;export const MATCH_TIME=.42;export const CLEAR_RIPPLE=.025;export const FALL_TIME=.4;export const FALL_SPRING={damping:13,stiffness:170,mass:.9};export const LIFT_SPRING={damping:14,stiffness:300};export const RETURN_SPRING={damping:16,stiffness:260};export const LIFT_SCALE=1.1;export const NUDGE_TIME=.09;export const NUDGE_SPRING={damping:9,stiffness:320};export const NUDGE_DISTANCE=.28;export const INTRO_COL_STAGGER=.028;export const INTRO_ROW_STAGGER=.022;export const LIGHT=frontLight([-.35,.6,1],.5);export const CANDY_SHINE=.55;export const CLASSIC_BOARD="rgba(255, 255, 255, 0.13)";export const CLASSIC_BORDER="rgba(255, 255, 255, 0.25)";export const CLASSIC_CELL="rgba(255, 255, 255, 0.10)";export const CLASSIC_RADIUS=16;export const THEMED_RADIUS=8;export const CELL_GAP=3;export function getLayout(t,o,e){const s=gameWidthFor(t),r=Math.floor((s-24)/7),n=7*r+24;return{width:t,height:o,boardLeft:(t-n)/2,boardTop:e+(o-e-n)/2,boardSize:n,cell:r,step:r+3,swipeThreshold:.3*r}}export const cellCenter=(t,o,e)=>[t.boardLeft+3+e*t.step+t.cell/2,t.boardTop+3+o*t.step+t.cell/2];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{introPlayed}from"../shared/EngineUtils.js";import{BOMB,BOMB_MATCH,BOMB_MULTIPLIER,CANDY_TYPES,CELL_GAP,CLEAR_RIPPLE,COMBO_MULTIPLIER,FALL_SPRING,FALL_TIME,GRID_SIZE,INTRO_COL_STAGGER,INTRO_ROW_STAGGER,LIFT_SCALE,LIFT_SPRING,MATCH_TIME,MIN_MATCH,NUDGE_DISTANCE,NUDGE_SPRING,NUDGE_TIME,POINTS_PER_CANDY,RETURN_SPRING,SWAP_TIME,TIME_LIMIT,WARNING_TIMES,ZAP_TIME}from"./CandyCrushConstants.js";import{buildScenery,candyPosition,crushCandy,dragZ,popInBomb,removeScenery,setSceneryTheme,spawnCandy,zap}from"./CandyCrushScene.js";const WORLD_CAPACITY=1e3,at=(o,n)=>o*GRID_SIZE+n,randomType=()=>Math.floor(Math.random()*CANDY_TYPES);function wouldMatch(o,n,t,r){const e=(e,a)=>{let l=0;for(let i=n+e,s=t+a;i>=0&&i<GRID_SIZE&&s>=0&&s<GRID_SIZE&&o[at(i,s)]?.type===r;i+=e,s+=a)l++;return l};return 1+e(0,-1)+e(0,1)>=MIN_MATCH||1+e(-1,0)+e(1,0)>=MIN_MATCH}function generateGrid(){const o=new Array(GRID_SIZE*GRID_SIZE).fill(null);for(let n=0;n<GRID_SIZE;n++)for(let t=0;t<GRID_SIZE;t++){let r=randomType();for(let e=1;e<10&&wouldMatch(o,n,t,r);e++)r=randomType();o[at(n,t)]={type:r,row:n,col:t,root:null}}return o}function findMatches(o){const n=new Set,t=[],r=o=>{for(let r=0;r<GRID_SIZE;r++){let e=0;for(;e<GRID_SIZE;){const a=o(r,e);let l=e+1;for(;a&&a.type!==BOMB&&l<GRID_SIZE&&o(r,l)?.type===a.type;)l++;if(a&&a.type!==BOMB&&l-e>=MIN_MATCH){for(let t=e;t<l;t++)n.add(o(r,t));l-e>=BOMB_MATCH&&t.push(Array.from({length:l-e},(n,t)=>o(r,e+t)))}e=l}}};return r((n,t)=>o[at(n,t)]??null),r((n,t)=>o[at(t,n)]??null),{matched:[...n],fives:t}}export function createGame(o){const n=new World(1e3),t={world:n,camera:{eye:[0,0,400],target:[0,0,0],fov:1,ortho:1},theme:o,layout:null,scenery:null,phase:"ready",get score(){return n.scoreboard.score},get timeLeft(){return n.scoreboard.shownSeconds},time:0,grid:generateGrid(),busy:!1,combo:0,dragging:null,intro:!0,introAge:-1,onPhase:o=>{},onScore:o=>{},onTime:o=>{},onSelect:()=>{},onSwap:()=>{},onInvalid:()=>{},onMatch:o=>{},onBomb:()=>{},onBlast:()=>{},onWarning:o=>{},onTimeUp:()=>{}};return n.scoreboard.reset(0,TIME_LIMIT),n.scoreboard.handlers={onSecond:o=>{t.onTime(o),o>0&&WARNING_TIMES.includes(o)&&t.onWarning(o)},onTimeUp:()=>"playing"===t.phase&&end(t)},t}const after=(o,n,t)=>o.world.after(n,t);export function setLayout(o,n){o.scenery&&removeScenery(o.world,o.scenery),o.layout=n,o.camera.ortho=n.height/2,o.scenery=buildScenery(o.world,n,o.theme),o.dragging=null,spawnAll(o)}export function setTheme(o,n){o.theme=n,o.layout&&o.scenery&&!o.world.isDisposed&&setSceneryTheme(o.world,o.layout,o.scenery,n)}function despawnCandy(o,n){null!=n.root&&o.world.despawn(n.root),n.root=null}function spawnAll(o){const n=o.layout;if(!n)return;const t=o.intro;t&&(o.introAge=0);for(const r of o.grid){if(!r)continue;if(despawnCandy(o,r),!t){r.root=spawnCandy(o.world,n,r.type,candyPosition(n,r.row,r.col),1);continue}r.root=spawnCandy(o.world,n,r.type,candyPosition(n,r.row-2,r.col),0);const e=r.col*INTRO_COL_STAGGER+(GRID_SIZE-1-r.row)*INTRO_ROW_STAGGER;o.world.animate(r.root,{position:candyPosition(n,r.row,r.col)},{spring:FALL_SPRING,delay:e}),o.world.animate(r.root,{scale:1},{duration:.6*FALL_TIME,delay:e,easing:"back"})}}export function start(o){"ready"===o.phase&&(o.phase="playing",o.world.scoreboard.startCountdown(TIME_LIMIT),o.onPhase("playing"))}export function reset(o){o.world.cancelTimers();for(const n of o.grid)n&&despawnCandy(o,n);o.grid=generateGrid(),o.busy=!1,o.combo=0,o.dragging=null,o.intro=!0,spawnAll(o),o.world.scoreboard.reset(0,TIME_LIMIT),o.phase="ready",o.onScore(0),o.onTime(TIME_LIMIT),o.onPhase("ready")}export function dispose(o){o.world.cancelTimers(),o.world.dispose()}function end(o){o.world.scoreboard.stop(),o.dragging&&release(o),o.phase="over",o.onTimeUp(),o.onPhase("over")}export function tick(o,n){o.world.isDisposed||(introPlayed(o,n),o.time+=n,o.world.update(n))}function cellAt(o,n,t){const r=Math.floor((n-o.boardLeft-CELL_GAP)/o.step),e=Math.floor((t-o.boardTop-CELL_GAP)/o.step);return e<0||e>=GRID_SIZE||r<0||r>=GRID_SIZE?null:[e,r]}export function touchStart(o,n,t){const r=o.layout;if(!r||"playing"!==o.phase||o.busy)return;const e=cellAt(r,n,t),a=e?o.grid[at(e[0],e[1])]:null;a&&null!=a.root&&(o.dragging=a,o.onSelect(),o.world.stopAnimation(a.root),o.world.set(a.root,{position:candyPosition(r,a.row,a.col,dragZ(r))}),o.world.animate(a.root,{scale:LIFT_SCALE},{spring:LIFT_SPRING}))}export function touchMove(o,n,t){const r=o.layout,e=o.dragging;if(!r||!e||null==e.root)return;const a=candyPosition(r,e.row,e.col,dragZ(r));o.world.set(e.root,{position:[a[0]+n,a[1]-t,a[2]]})}export function touchEnd(o,n,t,r=!1){const e=o.dragging,a=o.layout;if(!e||!a)return;o.dragging=null;const l=Math.abs(n),i=Math.abs(t);!r&&"playing"===o.phase&&Math.max(l,i)>a.swipeThreshold?swap(o,e,l>i?n>0?"right":"left":t>0?"down":"up"):settle(o,e)}function release(o){const n=o.dragging;o.dragging=null,n&&settle(o,n)}function settle(o,n){const t=o.layout;t&&null!=n.root&&(o.world.animate(n.root,{position:candyPosition(t,n.row,n.col)},{spring:RETURN_SPRING}),o.world.animate(n.root,{scale:1},{spring:RETURN_SPRING}))}const STEP={up:[-1,0],down:[1,0],left:[0,-1],right:[0,1]};function place(o,n,t,r){n.row=t,n.col=r,o.grid[at(t,r)]=n}function swap(o,n,t){const r=o.layout,e=o.world,[a,l]=STEP[t],i=n.row+a,s=n.col+l,d=i>=0&&i<GRID_SIZE&&s>=0&&s<GRID_SIZE?o.grid[at(i,s)]:null;if(!d||o.busy)return d||o.busy||o.onInvalid(),void settle(o,n);const[u,p]=[n.row,n.col];place(o,n,i,s),place(o,d,u,p);const I=n.type===BOMB?n:d.type===BOMB?d:null;if(I||findMatches(o.grid).matched.length)return o.busy=!0,o.combo=0,null!=n.root&&(e.animate(n.root,{position:candyPosition(r,n.row,n.col)},{duration:SWAP_TIME,easing:"easeOut"}),e.animate(n.root,{scale:1},{spring:RETURN_SPRING})),null!=d.root&&e.animate(d.root,{position:candyPosition(r,d.row,d.col)},{duration:SWAP_TIME,easing:"easeOut"}),o.onSwap(),void after(o,SWAP_TIME,()=>I?blastColor(o,I,I===n?d:n):resolve(o,[n,d]));place(o,d,i,s),place(o,n,u,p),settle(o,n);const y=d.root;if(null!=y){const n=candyPosition(r,d.row,d.col),t=[n[0]-l*NUDGE_DISTANCE*r.step,n[1]+a*NUDGE_DISTANCE*r.step,n[2]];e.animate(y,{position:t},{duration:NUDGE_TIME,easing:"easeOut"}).then(()=>{d.root===y&&o.dragging!==d&&e.animate(y,{position:n},{spring:NUDGE_SPRING})})}o.onInvalid()}function resolve(o,n=[]){const t=o.layout,{matched:r,fives:e}=findMatches(o.grid);if(!t||!r.length)return o.busy=!1,void(o.combo=0);o.combo++,"playing"===o.phase&&o.onScore(o.world.scoreboard.add(Math.floor(r.length*POINTS_PER_CANDY*Math.pow(COMBO_MULTIPLIER,o.combo-1)))),o.onMatch(o.combo);const a=new Set(e.map(o=>o.find(o=>n.includes(o))??o[Math.floor(o.length/2)])),l=o.world,i=n.find(o=>r.includes(o))??r[0];for(const n of r)a.has(n)||(o.grid[at(n.row,n.col)]=null,crush(o,t,n,Math.hypot(n.row-i.row,n.col-i.col)*CLEAR_RIPPLE));for(const o of a)null!=o.root&&l.despawn(o.root),o.type=BOMB,o.root=spawnCandy(l,t,BOMB,candyPosition(t,o.row,o.col),1),popInBomb(l,o.root);a.size&&o.onBomb();const s=Math.max(...r.map(o=>Math.hypot(o.row-i.row,o.col-i.col)))*CLEAR_RIPPLE;after(o,MATCH_TIME+s,()=>{drop(o),after(o,FALL_TIME,()=>resolve(o))})}function crush(o,n,t,r){const e=t.root;t.root=null,null!=e&&crushCandy(o.world,n,e,t.type,candyPosition(n,t.row,t.col),.95*MATCH_TIME,r).then(()=>{o.world.despawn(e)})}function blastColor(o,n,t){const r=o.layout;if(!r)return;const e=t.type===BOMB,a=o.grid.filter(o=>!!o&&o!==n&&(e||o.type===t.type));o.combo=1,"playing"===o.phase&&o.onScore(o.world.scoreboard.add((a.length+1)*POINTS_PER_CANDY*BOMB_MULTIPLIER)),o.onBlast();const l=candyPosition(r,n.row,n.col),i=Math.min(.012,.3/Math.max(1,a.length));a.forEach((n,t)=>{zap(o.world,r,l,candyPosition(r,n.row,n.col),e?BOMB:n.type,t*i),o.grid[at(n.row,n.col)]=null,crush(o,r,n,ZAP_TIME+t*i)}),o.grid[at(n.row,n.col)]=null,crush(o,r,n,ZAP_TIME),after(o,ZAP_TIME+a.length*i+MATCH_TIME,()=>{drop(o),after(o,FALL_TIME,()=>resolve(o))})}function drop(o){const n=o.layout;if(!n)return;const t=o.world;for(let r=0;r<GRID_SIZE;r++){let e=GRID_SIZE-1;for(let a=GRID_SIZE-1;a>=0;a--){const l=o.grid[at(a,r)];l&&(o.grid[at(a,r)]=null,place(o,l,e,r),a!==e&&null!=l.root&&t.animate(l.root,{position:candyPosition(n,e,r)},{spring:FALL_SPRING}),e--)}for(;e>=0;e--){const a={type:randomType(),row:e,col:r,root:null};o.grid[at(e,r)]=a,a.root=spawnCandy(t,n,a.type,candyPosition(n,e-1,r),0),t.animate(a.root,{position:candyPosition(n,e,r)},{spring:FALL_SPRING}),t.animate(a.root,{scale:1},{duration:.6*FALL_TIME,easing:"back"})}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{extrude,loft,Path,quat}from"@nayan-ui/engine";import{setBackdropTheme,spawnBackdrop}from"../shared/EngineBackdrop.js";import{popAndBurst}from"../shared/EngineBlasts.js";import{spawnRaisedBlock}from"../shared/EngineBlocks.js";import{cacheGameAsset,createGameMesh as _0x2167c5}from"../shared/EngineMeshes.js";import{toColor}from"../shared/EngineUtils.js";import{BOMB,CANDY_COLORS,CELL_GAP,cellCenter,CLASSIC_BOARD,CLASSIC_BORDER,CLASSIC_CELL,CLASSIC_RADIUS,GRID_SIZE,THEMED_RADIUS}from"./CandyCrushConstants.js";const Z_BACKDROP=-20,Z_BOARD=0,Z_CELLS=.2,Z_RIM=.4;export const toWorld=(e,o,t,n=0)=>[o-e.width/2,e.height/2-t,n];const candyDepth=e=>.4*e.cell,candyZ=e=>.4+candyDepth(e)/2+1;export const dragZ=e=>candyZ(e)+2*candyDepth(e);export const candyPosition=(e,o,t,n=candyZ(e))=>{const[a,s]=cellCenter(e,o,t);return toWorld(e,a,s,n)};const meshes=new Map,mesh=(e,o)=>{let t=meshes.get(e);return!t&&(t=cacheGameAsset("candy-crush/CandyCrushScene:"+e,o),meshes.set(e,t)),t},panelMesh=(e,o,t=0)=>mesh("panel:"+e+":"+o+":"+t,()=>{const n=(new Path).addRoundedRect(0,0,e,e,o);return t>0&&n.addRoundedRect(t,t,e-2*t,e-2*t,o-t),_0x2167c5(extrude(n,{depth:0,fillRule:"evenodd"}),{center:!1})}),cellsMesh=e=>mesh("candy-cells:"+e.cell,()=>{const o=new Path;for(let t=0;t<GRID_SIZE;t++)for(let n=0;n<GRID_SIZE;n++)o.addRoundedRect(CELL_GAP+n*e.step,CELL_GAP+t*e.step,e.cell,e.cell,.2*e.cell);return _0x2167c5(extrude(o,{depth:0}),{center:!1})});function spawnBoard(e,o,t){const n="classic"===t.mode,a=n?CLASSIC_RADIUS:THEMED_RADIUS,s=(t,n,a)=>{return e.spawn({mesh:t,position:(s=n,toWorld(o,o.boardLeft,o.boardTop,s)),color:toColor(a),pickable:!1});var s};return[s(panelMesh(o.boardSize,a),0,n?CLASSIC_BOARD:t.BOARD.SURFACE),s(cellsMesh(o),.2,n?CLASSIC_CELL:t.BOARD.CELL_EMPTY),s(panelMesh(o.boardSize,a,1.5),.4,n?CLASSIC_BORDER:t.BOARD.BORDER)]}export function buildScenery(e,o,t){return{backdrop:spawnBackdrop(e,o.width,o.height,-20,t),parts:spawnBoard(e,o,t)}}export function removeScenery(e,o){e.despawn(o.backdrop);for(const t of o.parts)e.despawn(t)}export function setSceneryTheme(e,o,t,n){setBackdropTheme(e,t.backdrop,n);for(const o of t.parts)e.despawn(o);t.parts=spawnBoard(e,o,n)}const BODY=CANDY_COLORS.map(e=>toColor(e)),WHITE=[1,1,1,1],BOMB_BURST=[1,.85,.4,1],WHITE_HOT=[2,2,2,1],blocks=new Map;export const candyColor=e=>e===BOMB?BOMB_BURST:BODY[e%BODY.length];let bomb=null;function bombMesh(){if(bomb)return bomb;const e=e=>BODY[e%BODY.length],[o,t,n,a]=[e(0),e(1),e(2),e(3)],s=(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];return bomb=_0x2167c5(loft([{z:-.5,bottom:-.5,top:.5,width:.5,square:7},{z:.2,bottom:-.5,top:.5,width:.5,square:7},{z:.4,bottom:-.465,top:.465,width:.465,square:6.5},{z:.5,bottom:-.39,top:.39,width:.39,square:5.5}],{around:64,smoothness:3,color:([e,r])=>{const l=Math.max(0,Math.min(1,e+.5)),d=Math.max(0,Math.min(1,r+.5));return s(s(a,n,l),s(o,t,l),d)}}),{center:!1}),bomb}export function spawnCandy(e,o,t,n,a){const s=o.cell-4,r=candyDepth(o),l=e.spawn({mesh:"none",position:n,scale:a,pickable:!1});if(t!==BOMB)return blocks.set(l,spawnRaisedBlock(e,{parent:l,position:[0,0,0],size:[s,s,r],color:candyColor(t),gloss:!1,shadow:!1})),l;const d=e.spawn({mesh:bombMesh(),parent:l,scale:[s,s,r],color:WHITE,pickable:!1});return blocks.set(l,d),e.animate(d,{scale:[1.07*s,1.07*s,r]},{duration:.5,repeat:"forever",yoyo:!0,easing:"easeInOut"}),l}export function popInBomb(e,o){e.animate(o,[{scale:.3},{scale:1.25,at:.6},{scale:1}],{duration:.35,easing:"easeOut"})}export function zap(e,o,t,n,a,s){const r=n[0]-t[0],l=n[1]-t[1],d=Math.atan2(l,r),p=Math.hypot(r,l),[i,h,u]=a===BOMB?[1,1,1]:candyColor(a),m=t[2]+candyDepth(o);e.after(s,()=>{const a=e.spawn({mesh:"cube",position:[(t[0]+n[0])/2,(t[1]+n[1])/2,m],rotation:quat.z(d),scale:[p,.08*o.cell,1],color:[i,h,u,.9],pickable:!1});e.animate(a,{scale:[p,.01,1],color:[i,h,u,0]},{duration:.3}).then(()=>{e.has(a)&&e.despawn(a)})})}export function crushCandy(e,o,t,n,a,s,r=0){const l=n===BOMB?BOMB_BURST:candyColor(n),d=blocks.get(t);return blocks.delete(t),null!=d&&e.animate(d,[{color:WHITE_HOT,at:.33},{color:n===BOMB?WHITE:l}],{duration:.3*s,delay:r}),popAndBurst(e,t,{scale:1,delay:r,duration:s},{position:[a[0],a[1],a[2]+candyDepth(o)],size:o.cell,color:l,glowZ:.4+.2})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{block,ellipsoid,lathe,loft,merge,quat,smoothCurve,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x350795}from"../shared/EngineMeshes.js";const TAU=2*Math.PI,GLASS=[.05,.065,.09],TREAD=[.035,.035,.04],SIDEWALL=[.07,.07,.075],GUNMETAL=[.14,.14,.16],SPOKE=[.72,.73,.77],DISC=[.32,.32,.34],CALIPER=[.85,.08,.06],CARBON=[.055,.055,.065],BLACK=[.025,.025,.03],HEADLIGHT=[.95,.97,1],DRL=[1.4,1.4,1.45],TAIL_LIGHT=[.8,.03,.03],TAIL_LED=[1.2,.08,.06],CHROME=[.8,.81,.84];export const AXLE_X=[0,0,Math.SQRT1_2,Math.SQRT1_2];export function wheel(t,o,e={}){const r=o/2,s=t*(e.rim??.7),i=e.spokes??10,n=e.rimColor??GUNMETAL,a=e.spokeColor??SPOKE,h=e.gapColor??DISC;return lathe([[.001,.45*r],[.18*s,.5*r],[.92*s,.86*r],[1.02*s,.98*r],[1.04*s,r],[.94*t,.97*r],[.995*t,.7*r],[1.005*t,0],[.995*t,.7*-r],[.94*t,.97*-r],[1.04*s,-r],[1.02*s,.98*-r],[.92*s,.86*-r],[.18*s,.5*-r],[.001,.45*-r]],{segments:48,color:({u:o,position:[r,,m]})=>{const p=Math.hypot(r,m);return p>.97*t?TREAD:p>1.05*s?SIDEWALL:p>.94*s?a:p<.14*s?BLACK:p<.26*s?n:Math.cos(o*TAU*i)>.55?a:e.caliper&&p>.58*s&&p<.86*s&&r>0&&m<0&&Math.atan2(r,-m)>.35&&Math.atan2(r,-m)<1.2?CALIPER:p>.42*s?h:n}})}const WHEEL_R=.36,FRONT_AXLE=-1.36,REAR_AXLE=1.38,ARCH_R=.41,SKIRT=.17,topLine=smoothCurve([[-2.18,.48],[-2.06,.58],[-1.75,.69],[-1.36,.8],[-1.05,.78],[-.3,.8],[.55,.86],[1.38,.92],[1.9,.92],[2.1,.86],[2.18,.78]]),halfWidth=smoothCurve([[-2.18,.84],[-2.02,1.04],[-1.6,1.15],[-1.36,1.17],[-.95,1.11],[-.15,1.06],[.6,1.12],[1.1,1.19],[1.4,1.2],[1.85,1.16],[2.18,1]]),floorAt=t=>{let o=smoothCurve([[-2.18,.24],[-1.95,.17],[1.95,.17],[2.18,.3]])(t);for(const e of[-1.36,1.38]){const r=t-e;Math.abs(r)<.41&&(o=Math.max(o,.36+Math.sqrt(.41*.41-r*r)))}return o};function bodySections(){const t=new Set;for(let o=-2.18;o<2.18;o+=.1)t.add(Math.round(1e3*o)/1e3);t.add(2.18);for(const o of[-1.36,1.38])for(let e=0;e<=20;e++)t.add(Math.round(1e3*(o-.41*Math.cos(e/20*Math.PI)))/1e3);for(const o of[-1.36,1.38])for(const e of[-.425,.425])t.add(Math.round(1e3*(o+e))/1e3);return[...t].sort((t,o)=>t-o).map(sectionAt)}function sectionAt(t){const o=topLine(t),e=Math.min(floorAt(t),o-.06),r=halfWidth(t);return{z:t,bottom:e,top:o,width:r,topWidth:.86*r,square:3+1.8*Math.max(0,Math.min(1,(t+2.18)/.3))}}function surfaceX(t,o){const{bottom:e,top:r,width:s,topWidth:i=s,square:n=4}=sectionAt(t),a=Math.max(-1,Math.min(1,(o-(e+r)/2)/((r-e)/2)));return(1-Math.abs(a)**n)**(1/n)*(a>0?s+(i-s)*a:s)}const MIRROR_Z=-.9,MIRROR_BASE_Y=.7,mirrorBase=t=>[t*(surfaceX(-.9,.7)-.02),.7,-.9],mirrorCap=t=>[t*(surfaceX(-.9,.7)+.15),.7+.08,-.86],CABIN=[{z:-1.06,bottom:.55,top:.79,width:.82,topWidth:.78},{z:-.72,bottom:.55,top:.95,width:.8,topWidth:.62},{z:-.3,bottom:.55,top:1.09,width:.79,topWidth:.55},{z:.05,bottom:.55,top:1.12,width:.78,topWidth:.53},{z:.45,bottom:.55,top:1.1,width:.79,topWidth:.55},{z:.95,bottom:.6,top:1,width:.8,topWidth:.62},{z:1.4,bottom:.7,top:.93,width:.86,topWidth:.8}],ROOF=[{z:-.36,bottom:1.07,top:1.09,width:.44,square:6},{z:-.2,bottom:1.09,top:1.13,width:.52,square:6},{z:.42,bottom:1.09,top:1.125,width:.53,square:6},{z:.66,bottom:1.05,top:1.07,width:.46,square:6}];function wingGeometry(t,o,e){const r=[-1,-.92,0,.92,1].map(r=>({z:r*t/2,bottom:-e/2,top:e/2,width:o/2*(Math.abs(r)>.95?.94:1),square:2.6}));return loft(r,{around:20,smoothness:2,color:CARBON})}let car=null;export function carMeshes(){return cacheGameAsset("car-racing/CarMeshes:carMeshes",()=>carMeshesUncached())}function carMeshesUncached(){if(car)return car;const t=[{geometry:loft(bodySections(),{around:56,smoothness:2,color:([,t])=>{const o=.62+.38*Math.max(0,Math.min(1,(t-.18)/.34));return[o,o,o]}})},{geometry:loft(ROOF,{around:32,smoothness:3})}];for(const o of[-1,1])t.push({geometry:ellipsoid([.09,.05,.12]),position:mirrorCap(o)});const o=_0x350795(merge(t),{center:!1,shine:.9}),e=_0x350795(loft(CABIN,{around:40,smoothness:4,color:GLASS}),{center:!1,shine:.95}),r=[],s=wheel(.36,.26,{rim:.76,spokes:10,caliper:!0}),i=wheel(.36,.31,{rim:.76,spokes:10,caliper:!0}),n=lathe([[.001,.01],[.39,.01],[.39,-.01],[.001,-.01]],{segments:24,color:BLACK}),a=t=>topLine(t)+.004;for(const t of[-1,1]){r.push({geometry:s,position:[.98*t,.36,-1.36],rotation:AXLE_X},{geometry:i,position:[.97*t,.36,1.38],rotation:AXLE_X},{geometry:n,position:[.8*t,.39,-1.36],rotation:AXLE_X},{geometry:n,position:[.78*t,.39,1.38],rotation:AXLE_X},{geometry:ellipsoid([.3,.05,.09],BLACK),position:[.64*t,.555,-2.04],rotation:quat.y(.32*t)},{geometry:ellipsoid([.26,.034,.08],HEADLIGHT),position:[.64*t,.555,-2.06],rotation:quat.y(.32*t)},{geometry:block(.32,.012,.02,6,DRL),position:[.62*t,.585,-2.08],rotation:quat.y(.32*t)},{geometry:block(.46,.14,.08,6,BLACK),position:[.52*t,.34,-2.14],rotation:quat.y(.15*t)},{geometry:block(.3,.012,.16,6,BLACK),position:[.36*t,a(-1.58),-1.58],rotation:quat.x(-.27)},...[.47,.53,.59].map(o=>({geometry:block(.016,.022,.2,6,BLACK),position:[t*(halfWidth(-.84)-.01),o,.4*(o-.53)-.84]})),{geometry:ellipsoid([.02,.08,.3],BLACK),position:[1.115*t,.58,.72]},{geometry:block(.06,.06,2,6,CARBON),position:[1.05*t,.2,.01]},{geometry:tube([mirrorBase(t),[t*(surfaceX(-.9,.7)+.05),.76,-.88],mirrorCap(t)],{radius:.02,sides:8,smoothness:3}),color:CARBON},{geometry:block(.012,.16,.34,6,CARBON),position:[.87*t,1.07,1.98]},{geometry:tube([[.42*t,.93,2.04],[.42*t,1.08,1.96],[.42*t,1.115,1.99]],{radius:.018,shape:t=>.45+.55*Math.abs(Math.cos(t*TAU)),sides:10,smoothness:4}),color:CARBON},{geometry:tube([[.62*t,.79,2.17],[.86*t,.79,2.15],[.96*t,.72,2.11],[.94*t,.62,2.09]],{radius:.022,sides:8,smoothness:4}),color:TAIL_LED});for(const o of[.2,.34])r.push({geometry:tube([[t*o,.3,2.04],[t*o,.3,2.2]],{radius:.042,sides:14,smoothness:1,color:CHROME,capColor:BLACK})})}r.push({geometry:wingGeometry(1.74,.3,.035),position:[0,1.1,1.98],rotation:quat.multiply(quat.x(.08),quat.y(Math.PI/2))},{geometry:block(1.85,.035,.26,8,CARBON),position:[0,.19,-2.04]},{geometry:block(.5,.09,.06,6,BLACK),position:[0,.31,-2.18]},{geometry:block(1.24,.03,.04,8,TAIL_LIGHT),position:[0,.79,2.18]},{geometry:block(1.1,.08,.03,6,BLACK),position:[0,.5,2.18]},{geometry:block(1.62,.13,.26,6,CARBON),position:[0,.24,2.06]},{geometry:block(1.84,.12,3.5,4,BLACK),position:[0,.22,0]});for(let t=-2;t<=2;t++)r.push({geometry:block(.02,.1,.22,4,BLACK),position:[.28*t,.25,2.08]});for(let t=0;t<6;t++)r.push({geometry:block(.9,.012,.035,4,BLACK),position:[0,.93,1.48+.075*t]});const h=_0x350795(merge(r),{center:!1,shine:.4});return car={body:o,glass:e,trim:h},car}export const CAR_FOOTPRINT={length:4.36,halfWidth:t=>Math.max(0,halfWidth(t)-.03)};export const CAR_LAMPS={headlights:[-.64,.64].map(t=>[t,.555,-2.08]),headlightSize:[.46,.06,.04],tail:[0,.79,2.2],tailSize:[1.9,.04,.03]};const BARK=[.45,.3,.18],NEEDLES_DARK=[.25,.6,.3],NEEDLES=[.32,.7,.35];let tree=null;export function treeMesh(){return cacheGameAsset("car-racing/CarMeshes:treeMesh",()=>treeMeshUncached())}function treeMeshUncached(){if(tree)return tree;const t=lathe([[.001,.4],[.07,.4],[.09,0],[.001,0]],{segments:8,color:BARK}),o=(t,o,e,r)=>({geometry:lathe([[.001,o],[e,t],[.001,t]],{segments:7,color:r})});return tree=_0x350795(merge([{geometry:t},o(.22,.72,.75,NEEDLES_DARK),o(.5,.98,.56,NEEDLES),o(.76,1.2,.36,NEEDLES_DARK)]),{center:!1}),tree}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const _0xa01341=_0x5a98;function _0x5080(){const e=["a1hcL8kZAX/dNW","W6ddPCo0WORdMComDq","WQ8OW6HlWOif","WQhdVtdcG8o/jMC","WPSSW6O","WO/cUCoSWQVdQmkTW5K","W5KiWPpdLa1dfmkReZO","W5OfWPNdMar4d8k7ec0abCkDuCo9","WQxdTMFdLCkxEvVdUGuZ","y2xcSmkgrq","e8oZWO45WPaJWQq","W6dcUmkZW63dJmk9o8kEmW","cSoOWP/dKqG","W5pcTIpcNSo4e8kAW5GQfeRcJW","ymouWRSj","cXqesmoEkXi","WQVcHf5EWQa","eCooWQTYWOuXja","W4dcSuVcGCoFeSoYWRm","fahcNmoNA8oNnq","W5FcHxtdHSkrE3BdUG","q1lcN8kHAaS","W5BcO8k+bfJdM1m","WPxcOmkSW4XXWOhcHG","DsNcNSoXwmoynSolaa","fSk3W5XnWP8fnW","WRDRzSkgBW","W6ddTCoOWOZdMCoq","zaOYW53dIJ7dO27dKa","WR13p0epAZywd8k+","eCoxWRXHWO4Qia","WQJdNLVdQ8kl","ErW+W7/dHcW","W5jQemoLW7ZdOJBdVa","tfVdISkBpSkf","WQrPzv7cP1mDbJyA","hmoLWP1zWQe","W6ypA8ouWPdcRddcVYfYW5TpW7zJrSo6aSoOdSk9","mqq6EmoY","euBcMmofkrdcGCkdW5aNW6Ooma","dcDBWO/cUq","W5ZcM8kyW5ZcTfnlhGK","W4BcN8kAW7fJ","bmkRW5rhWRe","W4ddJCohrmkF","W6pdUhGmWPr8rmo0cW","WOLug30","wmkVwSkEf8kerw1yW5aGoG","g8ojcePYdCkO","W6tcSSkPW4RdMCk1iCkE","zd/dOSkYqx7dUmk/W4C2","kfVcRYCHW47cJJT9BW","uXPeCha","nCoVW6pcRmk9WPibuhimpCkvWRy","W5SrWOJdGqzKfa","WObnq1lcGxmQkG","e3hcVCk6iG","A8oDhg5M","uvLccmkmFfyKW6GeqmkrgG","gHpdOSkKBKldUW","jcGXCSoV","WOlcOCkTW7RcRfnn","W6RdNqWDW7NdT8kIWPRdLmojW6dcTSoS","WPZcICkVW7tdT8kvWP9EWRhcTq","fmkUW4DyWPq4jSoznW","dmosy8klWPJcHHlcVZy","v8ojcfH2sq","WOjrea","WOZdRc3dJCkysCoTWP9Tk8oPW5S","lW5gWPxcLNSYzq","WOzls8kTqSknWP3dMCosta","W5pcV3xcKmo6cCo9WQrVn8oV","iXvHWPFcL3qY","DdX4","mCogWRpdJYS","W7NdPu4HWPnOra","dmo9gW","vrJcVCoexmoTeSoH","rrNcOmogFSoIcW","W5ZdTCo+z8kF","W4FcU2ZcUSolhCoVWRfR","zdbIDgXulZm","fIetvCo5WP8CWQfqwwTf","ffZdOSkbl8k+sSoJgSoLAwhcHW","W7JdIdpdLmkojSo7","eG/dRCkKd8kYESok","f8o4kmo4zq","WQG4W7zCWPmova","aSoZbCoEqCoAEvPH","f8odA8kEWOtcTq","sWZdICkwAKW","z1y8WQzvW5DHW4iZ","a2xcNW7cTGK","rMnyfmkKW4qN","e8o8W6emESkyW4tcJs1uFa","W6xcO8koW4PJ","W5pdQCoAAa","W4JcQYnPFYpdMW","WRhdVcpcG8oUd3lcG8oK","W6xdNGSEW7/dSSoaWQ3dSSoHW6pcJa","chVcKXSwW6m","ogJcJZ0g","WQTxgMi1gbiHk8kCEb3cR8k+imk1WQldKxNdLuhcQSkm","WOdcTSk9D1ZcI1tdHmk6","WQNcO8kAW6pdNmk4WQP1","dmo9e8o9sCoxy1C","CGWLW6RdItBdSG","W5BcNCk6W4lcSerw","WPNcV8o7WPtdQmkUW4i","amkXW4T6WPWnjSowjq","W5SlWPBdNbe","aNpcPGxcVWq3W6JcHW","W4hcNmk7W7rTWPBcNq","W4xcImkKW6njWORcJbm","dNtcNbOFW6RcNH1grIVcSG","W5xdMvWAWRPFzCk2","W5FcICkMW57cSfHJfa","u1tcNSkNAa","WOddM1RdPCk3","WPxdVSk2dCoRsdy","W5xcGmkTW7jG","vI/dRSo8FsXVvfzFWORcHWK","WPG/W7zRWOm","W6BdVSoNWPRdKmohss0zWPqiWOFcSW","zs3cGmoRsConpmonamoG","a8oMWQpdQY8","W6ZcNXXErqNdUSoQFKZcNL/cNq","WQRdTNVdJ8kAB1hdTX88","i8krern/bmoFdK5EcG","gWqc","amohWQn8WP0Hbbf2bxBdO3VcU8kXtsToW4tdIq","x8okgG","eWddImoMnuZdTMvAW4VcLqW","W7ddTCoYWRVdNCooBs4iWOmkWPC","jmorW40WAmk4W7RcVHXJ","uCo3WPS1WP9MW6bYDW","mfhcLmklAKWnbG","eCodWQbWWO4O","ufJdMmk4n8kqBCoMW6Oo","AIzgs3LmpIq","W4BdLmo7xSk2","a33cRCkDpNGPqG","k1RcISkAc1OryKDoWQ7cJtPCmCoMW7hdJ8k4qg/dMLS","BWZdICkwAGNdLCkjW7OiW7enpSkG","WOGmW5zXWR4LACobW7fc","emo4W78Dx8kfW5W","W6xcRSkkdSos","CCkQWRVdLmoIW6PI","WOrDrxpcKhWQ","WRhcJejMWQNcQ8o3"];return(_0x5080=function(){return e})()}!function(){const e="KCG%",o=_0x5a98,t=_0x5080();for(;;)try{if(771029==-parseInt(o(463,e))/1*(-parseInt(o(533,"Qn4k"))/2)+-parseInt(o(432,"*lHg"))/3+parseInt(o(426,e))/4+-parseInt(o(496,"A7X@"))/5*(-parseInt(o(449,"Dt(r"))/6)+-parseInt(o(537,"h#b%"))/7*(parseInt(o(485,"cnWo"))/8)+-parseInt(o(447,"Qn4k"))/9+-parseInt(o(553,"aRGn"))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import _0x149e12,{useRef,useCallback,useMemo}from"react";import{View,StyleSheet}from"react-native";import{GestureDetector,Gesture,GestureHandlerRootView}from"react-native-gesture-handler";import{useCarRacingStore,useScore,useIsPlaying,useGameOver,useObstacles,usePlayerCar,useParticleEffects,useLives}from"./CarRacingStore.js";import{CarRacingService}from"./CarRacingService.js";import{GameBackground}from"./components/GameBackground.js";import{CarComponent}from"./components/CarComponent.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameControlButton,GameOverModal,GameSettingsModal,ParticleBlast}from"../../helpers/index.js";function _0x5a98(e,o){e-=421;const t=_0x5080();let a=t[e];if(void 0===_0x5a98.jKZzJQ){const e=function(e,o){let t,a,r=[],n=0,W="";for(e=function(e){let o="",t="";for(let t,a,r=0,n=0;a=e.charAt(n++);~a&&(t=r%4?64*t+a:a,r++%4)?o+=String.fromCharCode(255&t>>(-2*r&6)):0)a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(a);for(let e=0,a=o.length;e<a;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),a=0;a<256;a++)r[a]=a;for(a=0;a<256;a++)n=(n+r[a]+o.charCodeAt(a%o.length))%256,t=r[a],r[a]=r[n],r[n]=t;a=0,n=0;for(let o=0;o<e.length;o++)a=(a+1)%256,n=(n+r[a])%256,t=r[a],r[a]=r[n],r[n]=t,W+=String.fromCharCode(e.charCodeAt(o)^r[(r[a]+r[n])%256]);return W};_0x5a98.kaKFAZ=e,_0x5a98.soehAE={},_0x5a98.jKZzJQ=!0}const r=t[0];_0x5a98.wNTRhd!==r&&(_0x5a98.soehAE={},_0x5a98.wNTRhd=r);const n=_0x5a98.soehAE[e];return void 0===n?(void 0===_0x5a98.pzTsAE&&(_0x5a98.pzTsAE=!0),a=_0x5a98.kaKFAZ(a,o),_0x5a98.soehAE[e]=a):a=n,a}import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";import{CAR_RACING_COLORS,CAR_RACING_GAME_CONFIG}from"./CarRacingConstants.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{setGameInterval,clearGameInterval}from"../../helpers/GameTimer.js";import{jsx as _0x6de7a4,jsxs as _0x5b38c9}from"react/jsx-runtime";const{width:width,height:height}=getGameDimensions(),PARTICLE_COLORS=[_0xa01341(483,"mVDp"),_0xa01341(536,"jfWZ"),"#ff8888",_0xa01341(562,"3UzB"),_0xa01341(524,"D0x("),_0xa01341(514,"A7X@")];export const CarRacing=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:a,onShare:r,onShareScreenshot:n,onShowLeaderboard:W,bannerAd:s})=>{const d="KCG%",i="9S%W",C=_0xa01341,S={fLVeq:function(e,o){return e-o},LGHjK:function(e,o,t){return e(o,t)},GJGLk:C(437,"9xdI"),WIuFq:"lose",PORWh:function(e,o){return e(o)},SrrEu:function(e){return e()},qqhnM:function(e){return e?.()},dvSwk:function(e,o){return e-o},vdCRE:function(e,o){return e-o},EOeXe:function(e,o){return e-o},qizxK:function(e,o){return e/o},ipAwk:function(e,o){return e!==o},sQDNB:function(e,o,t){return e(o,t)},uHxTk:function(e,o,t){return e(o,t)},NinaN:function(e,o,t){return e(o,t)},HvNsR:function(e,o,t){return e(o,t)},EItPl:function(e,o,t){return e(o,t)},nGSJJ:function(e,o,t){return e(o,t)}},m=e?.[C(478,"%4ZP")]??!0,u=e?.[C(487,"USC7")]??!0,k=e?.[C(430,"3UzB")]??0,G=useScore(),x=S[C(486,"ombe")](useIsPlaying),l=S[C(421,"3UzB")](useGameOver),_=useLives(),R=useObstacles(),f=usePlayerCar(),p=useParticleEffects(),A=useRef(!1),h=useRef(t);h[C(470,"G5qi")]=t;const O=useRef(m);O[C(476,"h#b%")]=m;const N=useRef(u);N[C(461,"0QJ7")]=u;const I=useCallback(e=>{const o=C;if(h[o(457,"rj4^")]&&!A[o(544,"RrIM")]){const t=useCarRacingStore[o(505,"cnWo")]()[o(481,"A7X@")];h[o(448,"$jwq")]({status:e,score:t[o(532,"*lHg")]()}),A[o(539,"N!LC")]=!0}},[]),g=useCallback((e,o)=>useCarRacingStore[C(468,"Yp#c")]()[C(462,"l(kO")](e,o),[]),P=useCallback(()=>useCarRacingStore.getState().stopGame(),[]),M=S[C(504,"Skj7")](useCallback,()=>useCarRacingStore.getState()[C(455,"AgxN")](),[]),E=S[C(558,"Skj7")](useCallback,e=>{const o=C;useCarRacingStore[o(563,")*4S")]()[o(494,"RrIM")](e)},[]),b=_0x149e12[C(472,"1!5i")](()=>new CarRacingService(CAR_RACING_GAME_CONFIG[C(543,"SLNL")],CAR_RACING_GAME_CONFIG[C(506,"cnWo")]),[]);_0x149e12[C(473,"N!LC")](()=>{const e=C;useCarRacingStore.getState()[e(444,"*lHg")](k);const o=S.fLVeq(height,CAR_RACING_GAME_CONFIG[e(551,"&Oi6")])-CAR_RACING_GAME_CONFIG[e(508,"ombe")];b[e(502,"Dt(r")](o)},[k,b]),_0x149e12[C(542,"G5qi")](()=>{b[C(497,"USC7")](()=>{const e=_0x5a98;playSound(GAME_SOUNDS[e(488,"Qn4k")][e(523,"A7X@")],O[e(436,"nu[i")]),playHaptic(HapticType.ERROR,N.current)},()=>{const e=_0x5a98;var o,t,a;playSound(GAME_SOUNDS[e(565,"%4ZP")][e(528,"D0x(")],O[e(519,"1!5i")]),o=playHaptic,t=HapticType[e(424,"@GC3")],a=N[e(529,"@GC3")],S[_0x5a98(526,"rztj")](o,t,a)})},[b]),_0x149e12.useEffect(()=>{if(!x)return;const e=setGameInterval(()=>{useCarRacingStore[_0x5a98(569,"9S%W")]().decrementTime()},1e3);return()=>clearGameInterval(e)},[x]),_0x149e12[C(559,"iSe*")](()=>{const e=C;if(l&&!A.current){const o=_>0?S[e(459,"h#b%")]:S.WIuFq;I(o)}!l&&(A[e(471,"8KJ(")]=!1)},[l,_,I]),_0x149e12[C(467,"jfWZ")](()=>()=>{const e=_0x5a98;useCarRacingStore.getState()[e(475,"*siK")]&&!A[e(442,"Qn4k")]&&I(e(464,"%4ZP")),b[e(509,"dDTz")](),M()},[b]);const y=S[C(545,"p6G(")](useCallback,()=>{const e=C;A[e(568,"Iuq8")]=!1,g(CAR_RACING_GAME_CONFIG[e(490,"0QJ7")],k),b[e(429,"8bE^")](),playSound(GAME_SOUNDS[e(549,i)].START,O[e(512,i)]),playHaptic(HapticType.SUCCESS,N[e(539,"N!LC")])},[g,k,b]),T=S.uHxTk(useCallback,()=>{const e=C;S[e(566,"9xdI")](I,e(501,"RrIM")),S[e(465,"%4ZP")](P),b[e(441,"Qn4k")]()},[I,P,b]),L=useCallback(()=>{const e=C;S.qqhnM(a),M(),b[e(531,"RrIM")]()},[M,b,a]),q=useRef(new Map),Q=S[C(510,"[K#L")](useCallback,e=>{const o=C,t={YeLBI:function(e,o){return e(o)}};let a=q.current[o(495,"3UzB")](e);return!a&&(a=()=>{const a=o;t[a(552,"@GC3")](E,e),q[a(515,"USC7")][a(516,"ombe")](e)},q.current[o(493,"@GC3")](e,a)),a},[E]),H=useRef(1),v=useMemo(()=>{const e=C,o=CAR_RACING_GAME_CONFIG[e(491,"p6G(")]*CAR_RACING_GAME_CONFIG[e(427,"Yp#c")];return{roadWidth:o,roadStartX:S[e(556,"h#b%")](width,o)/2,laneWidth:CAR_RACING_GAME_CONFIG[e(564,"aRGn")],maxLane:S[e(450,"d2s8")](CAR_RACING_GAME_CONFIG[e(434,"ovl[")],1)}},[]),j=useMemo(()=>Gesture[C(518,"ombe")]()[C(433,"nu[i")](e=>{const o=C;if(!useCarRacingStore[o(445,"9xdI")]()[o(555,"8KJ(")])return;const t=S.EOeXe(e[o(499,"D0x(")],v.roadStartX),a=Math[o(482,"p6G(")](S[o(557,"N!LC")](t,v.laneWidth)),r=Math.max(0,Math[o(431,"SLNL")](v[o(513,"KCG%")],a));S[o(443,"Skj7")](r,H[o(451,"ombe")])&&(H.current=r,playSound(GAME_SOUNDS[o(488,"Qn4k")].LANE_SWITCH,O.current),playHaptic(HapticType[o(538,"Qn4k")],N[o(517,"l(kO")])),b.movePlayerToLane(r)})[C(511,"B)M]")](!0),[v,b]),J=useMemo(()=>({isPlaying:x,gameOver:l,onStartGame:y,onStopGame:T,onShare:r,onShowLeaderboard:W,startButtonSubtext:C(466,"SLNL")}),[x,l,y,T,r,W]),V=useMemo(()=>({isVisible:l,score:G,onPlayAgain:L,buttonText:"Race Again!",title:_>0?C(500,"cnWo"):C(479,"iSe*"),message:_>0?C(507,"aRGn"):"You ran out of lives!"}),[l,G,L,_]),D={};D[C(484,"h#b%")]=width,D[C(469,"d2s8")]=width;const B=useMemo(()=>[styles[C(458,"dDTz")],D],[]),K=S[C(489,"rztj")](useMemo,()=>({gameId:GAME_IDS[C(522,"p6G(")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:o}),[e,o]),z={};z[C(530,d)]=width,z[C(453,"8bE^")]=height;const F={};F[C(548,"Dt(r")]=k;const Z={id:"player"};Z.x=f.x,Z.y=f.y,Z[C(570,"cnWo")]=f[C(530,d)],Z[C(456,"*siK")]=f[C(546,"G5qi")],Z[C(540,"ovl[")]=CAR_RACING_COLORS[C(498,"dDTz")],Z[C(503,"9xdI")]=!0;const w={...J},U={...V};U[C(439,"iSe*")]=n,U[C(480,"8KJ(")]=s;const X={...K};return _0x6de7a4(GestureHandlerRootView,{style:styles[C(525,")*4S")],children:_0x5b38c9(View,{style:B,children:[_0x6de7a4(View,{style:StyleSheet[C(527,"06W&")],children:S.HvNsR(_0x6de7a4,GameBackground,z)}),_0x6de7a4(ScoreBoard,F),S[C(554,"nu[i")](_0x6de7a4,GestureDetector,{gesture:j,children:_0x5b38c9(View,{style:styles[C(547,"8^Q0")],children:[R.map(e=>_0x6de7a4(CarComponent,{id:e.id,x:e.x,y:e.y,width:e[C(438,"rztj")],height:e.height,color:e[C(474,"Iuq8")],isPlayer:!1},e.id)),S[C(550,"RrIM")](_0x6de7a4,CarComponent,Z)]})}),p[C(440,"d2s8")](e=>_0x6de7a4(ParticleBlast,{x:e.x,y:e.y,particleCount:5,colors:PARTICLE_COLORS,duration:600,onComplete:Q(e.id)},e.id)),_0x6de7a4(GameControlButton,w),_0x6de7a4(GameOverModal,U),_0x6de7a4(GameSettingsModal,X)]})})};const _0x53d0d9={flex:1};_0x53d0d9[_0xa01341(521,"Iuq8")]=CAR_RACING_COLORS[_0xa01341(492,"Bfxk")],_0x53d0d9[_0xa01341(520,"Iuq8")]=_0xa01341(541,"USC7");const _0xbec44a={};_0xbec44a[_0xa01341(560,"SLNL")]=1,_0xbec44a[_0xa01341(428,"N!LC")]=_0xa01341(535,"A7X@");const _0x53f932={};_0x53f932[_0xa01341(460,"Skj7")]=1;const _0x4e6b60={};_0x4e6b60[_0xa01341(452,"d2s8")]=_0x53d0d9,_0x4e6b60[_0xa01341(435,"*lHg")]=_0xbec44a,_0x4e6b60[_0xa01341(477,"h#b%")]=_0x53f932;const styles=StyleSheet[_0xa01341(454,"aRGn")](_0x4e6b60);
|
|
1
|
+
"use strict";import _0x566bbf,{useCallback,useEffect,useRef,useState}from"react";import{haptics}from"@nayan-ui/engine";import{resolveGameTheme}from"../../services/ThemeService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{GameLoading}from"../shared/GameLoading.js";import{GameLoadingTransition}from"../shared/GameLoadingTransition.js";import{useGameResource}from"../shared/useGameResource.js";import{AUTOPLAY,DAY_LIGHT,EDGE,getCachedAssets,LIVES,loadAssets,NIGHT_LIGHT,NIGHT_SKY,SKY,STEER_WIDTH,TRACK_LENGTH}from"./CarRacingConstants.js";import{createGame,dispose,setAudible,setNight,start,steer,tick}from"./CarRacingGame.js";import{jsx as _0x58c380}from"react/jsx-runtime";export{preloadRacing as preloadCarRacing}from"./CarRacingConstants.js";const RESULTS_DELAY=1200,Run=_0x566bbf.memo(({assets:e,night:t,onRestart:s,settings:a,onSettingsChange:r,onEndGame:n,onReplayGame:o,onShare:i,onShareScreenshot:u,onShowLeaderboard:m,bannerAd:l})=>{const g=useRef(t),d=useGameResource(()=>createGame(e,g.current),e=>()=>{"playing"===e.phase&&I("cancel"),dispose(e)});useEffect(()=>{setNight(d,t)},[d,t]);const f=useRef(1),[S,G]=useState("ready"),[h,C]=useState(!1),[R,E]=useState(0),[T,A]=useState(LIVES),[p,b]=useState(TRACK_LENGTH),_=useRef(!1),L=useRef(n);L.current=n;const I=useCallback(e=>{L.current&&!_.current&&(_.current=!0,L.current({status:e,score:d.score.toString()}))},[d]);useEffect(()=>{haptics.enabled=a.enableHaptics},[a.enableHaptics]),useEffect(()=>{d.onPhase=G,d.onLives=A,d.onDistance=b,d.onScore=E},[d]),useEffect(()=>{if("over"!==S)return;I(d.lives>0?"win":"lose");const e=setTimeout(()=>C(!0),1200);return()=>clearTimeout(e)},[S,d,I]),useEffect(()=>{if(!AUTOPLAY||"playing"===S)return;const e=setTimeout("ready"===S?()=>start(d):s,"ready"===S?1500:3e3);return()=>clearTimeout(e)},[S,d,s]);const H=useCallback(e=>setAudible(d,e),[d]),D=useCallback(e=>tick(d,e),[d]),x=useCallback(({phase:e,dx:t})=>steer(d,e,t,2*EDGE/(STEER_WIDTH*f.current)),[d]),k=useCallback(()=>{_.current=!1,start(d)},[d]),v=useCallback(()=>{I("cancel"),s()},[I,s]),N=useCallback(()=>{o?.(),s()},[o,s]),j=T>0;return _0x58c380(EngineGameScreen,{onAudioChange:H,gameId:GAME_IDS.CAR_RACING,settings:a,onSettingsChange:r,onShare:u??i,onShowLeaderboard:m,bannerAd:l,source:d.world,feedback:d.hudFeedback,camera:d.camera,light:t?NIGHT_LIGHT:DAY_LIGHT,background:t?NIGHT_SKY:SKY,fog:.0075,onUpdate:D,onDrag:x,onResize:e=>{f.current=e},columns:[scoreColumn(R),livesColumn(T,LIVES),textColumn("TRACK",p+" m")],playing:"playing"===S,subtext:"Dodge traffic to score!",onStart:k,onStop:v,gameOver:h?{title:j?"FINISHED!":"CRASHED!",message:j?"You crossed the finish line! Great driving!":"Out of lives "+(TRACK_LENGTH-p)+" m into the "+TRACK_LENGTH+" m race.",scoreLabel:"Final Score",score:R,buttonText:"Race Again!",onPlayAgain:N,onShare:u}:null})});Run.displayName="CarRacingRun";export const CarRacing=engineGame(GAME_IDS.CAR_RACING,e=>{const t=e.settings,s=resolveGameTheme(t.theme),[a,r]=useState(0),[n,o]=useState(getCachedAssets),[i,u]=useState(null);useEffect(()=>{if(n)return;let e=!0;return loadAssets().then(t=>e&&o(t)).catch(t=>e&&u(t.message)),()=>{e=!1}},[n]);const m=useCallback(()=>r(e=>e+1),[]),l=s.isDark;return _0x58c380(GameLoadingTransition,{ready:!!n,loader:_0x58c380(GameLoading,{gameId:GAME_IDS.CAR_RACING,theme:t.theme,offset:t.offset,error:!!i,message:i??void 0}),children:n&&_0x58c380(Run,{...e,settings:t,assets:n,night:l,onRestart:m},a)})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";import{audio,loadTexture,warmUpEngine}from"@nayan-ui/engine";import{loadHudFonts}from"../shared/EngineHud.js";import{carMeshes,treeMesh}from"./CarMeshes.js";import{sceneryMeshes}from"./CarRacingScenery.js";export const TRACK_LENGTH=2e3;export const LIVES=3;export const POINTS_PER_CAR_PASSED=500;export const FINISH_CLEAR=30;export const LANE_W=3.4;export const LANES=[-3.4,0,3.4];export const ROAD_HALF=5.1;export const EDGE=4.05;export const START_SPEED=20;export const CAMERA_FOV=.95;export const LATERAL_SPEED=9;export const STEER_RESPONSE=10.5;export const STEER_WIDTH=.6;export const TRAFFIC_SPEED=12;export const SPAWN_AHEAD=170;export const CRASH_SLOWDOWN=.55;export const INVULNERABLE=1.6;export const SEG_LEN=6;export const SEGMENTS=42;export const RS=.2;export const BEHIND=8;export const SKY=[.62,.78,.95];export const NIGHT_SKY=[.227,.192,.376];export const DAY_LIGHT={direction:[.45,.85,.3],ambient:.5,shadowExtent:26};export const NIGHT_LIGHT={direction:[.25,.9,.35],ambient:.66,shadowExtent:26,color:[.84,.88,1]};export const LAMP=[1,.97,.82];export const LAMP_LIT=[2,1.85,1.3];export const LINE=[.95,.95,.9];export const RAIL=[.72,.74,.78];export const PAINTS=[[.15,.32,.95],[.1,.75,.35],[1,.8,.15],[.92,.92,.95],[.12,.12,.14],[.95,.45,.1],[.55,.2,.75]];export const PLAYER_PAINT=[.92,.08,.1];export const AUTOPLAY="1"===process.env.EXPO_PUBLIC_AUTOPLAY;let racingSounds;export const getRacingSounds=()=>racingSounds??=audio.load({engine:require("../../assets/sfx/engine.wav"),nitro:require("../../assets/sfx/nitro.wav"),point:require("../../assets/sfx/point.wav"),hit:require("../../assets/sfx/hit.wav"),win:require("../../assets/sfx/win.wav"),die:require("../../assets/sfx/die.wav"),bump:require("../../assets/sfx/bump.wav")});let assets,cachedAssets=null;export const getCachedAssets=()=>cachedAssets;export function loadAssets(){return assets??=warmUpEngine().then(()=>Promise.all([loadHudFonts(),loadTexture(require("../../assets/textures/asphalt.png")),loadTexture(require("../../assets/textures/facade.png")),loadTexture(require("../../assets/textures/grass.png")),Promise.all([loadTexture(require("../../assets/textures/ad_chevrons.png")),loadTexture(require("../../assets/textures/ad_bubbles.png")),loadTexture(require("../../assets/textures/ad_bolt.png"))])])).then(([e,s,t,r,o])=>{const{body:a,glass:n,trim:i}=carMeshes();return{car:{body:a,glass:n,trim:i,size:[Math.max(a.size[0],i.size[0]),Math.max(a.size[1],i.size[1]),Math.max(a.size[2],i.size[2])]},asphalt:s,facade:t,grass:r,ads:o,tree:treeMesh(),scenery:sceneryMeshes(),font:e.semi}}),assets.then(e=>{cachedAssets=e},()=>{}),assets.catch(()=>assets=void 0),assets}export function preloadRacing(){loadAssets().catch(()=>{})}export function*warmAssets(){yield carMeshes,yield treeMesh,yield sceneryMeshes,yield()=>loadTexture(require("../../assets/textures/asphalt.png")),yield()=>loadTexture(require("../../assets/textures/facade.png")),yield()=>loadTexture(require("../../assets/textures/grass.png")),yield()=>loadTexture(require("../../assets/textures/ad_chevrons.png")),yield()=>loadTexture(require("../../assets/textures/ad_bubbles.png")),yield()=>loadTexture(require("../../assets/textures/ad_bolt.png")),yield loadAssets,yield()=>getRacingSounds().ready}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const LIT_ROWS=[18,132,131,192,101,130,43,0,112,144,21,32],FACES=[{normal:[1,0,0],right:[0,0,-1]},{normal:[-1,0,0],right:[0,0,1]},{normal:[0,0,1],right:[1,0,0]},{normal:[0,0,-1],right:[-1,0,0]}];export function*facadeWindowQuads(){for(const o of FACES){const r=(r,n)=>[.5005*o.normal[0]+o.right[0]*(r-.5),.5-n,.5005*o.normal[2]+o.right[2]*(r-.5)];for(let n=0;n<LIT_ROWS.length;n++)for(let t=0;t<8;t++){if(!(LIT_ROWS[n]&1<<t))continue;const i=(8*t+2.5)/64,l=(8*t+6.5)/64,a=(10*n+3.5)/128,e=(10*n+8.5)/128;yield{normal:o.normal,corners:[r(i,a),r(l,a),r(l,e),r(i,e)]}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{audio,effects,haptics,World}from"@nayan-ui/engine";import{playBankSound}from"../../services/SoundsService.js";import{frontHit,overlapAcross}from"../shared/EngineFootprint.js";import{createChase,updateChase}from"../shared/EngineRacingChase.js";import{sideImpactSpeed,smoothSteeringPose,stepSteering}from"../shared/EngineRacingHandling.js";import{CAR_FOOTPRINT}from"./CarMeshes.js";import{AUTOPLAY,CAMERA_FOV,CRASH_SLOWDOWN,EDGE,FINISH_CLEAR,getRacingSounds,INVULNERABLE,LANES,LATERAL_SPEED,LIVES,PAINTS,PLAYER_PAINT,POINTS_PER_CAR_PASSED,ROAD_HALF,SPAWN_AHEAD,START_SPEED,STEER_RESPONSE,TRACK_LENGTH,TRAFFIC_SPEED}from"./CarRacingConstants.js";import{buildHorizon,buildRoad,burn,burning,clamp,explode,forwardOf,newSample,orient,pick,placeAt,placeSegment,rand,recycleRoad,rightOf,setCarNight,setHorizonNight,spawnCar,spawnProps,spawnRaceMarkers,Track}from"./CarRacingScene.js";const tmp=[0,0,0],driveRotation=[0,0,0,1],at=[0,0,0],sample=newSample(),look=newSample();export function createGame(e,a){const s=new World(2600),t={eye:[6,3,6],target:[0,.6,0],fov:CAMERA_FOV},o=buildRoad(s,e),n=buildHorizon(s,a),i=spawnCar(s,e,PLAYER_PAINT,[0,e.car.size[1]/2,0],a);s.listener=i.root;const r={world:s,night:a,track:new Track,chase:createChase(),assets:e,camera:t,player:i,horizon:n,segments:o,traffic:[],burning:[],phase:"ready",time:0,s:0,d:0,target:0,dragX:0,speed:0,lateral:0,steeringPose:{yaw:0,roll:0},steeringGoal:0,spawnTimer:.5,invulnerable:0,scrape:0,orbit:0,get score(){return s.scoreboard.score},get lives(){return s.scoreboard.lives},left:TRACK_LENGTH,shake:0,engine:null,audible:!0,onPhase:e=>{},onScore:e=>{},onLives:e=>{},onDistance:e=>{},hudFeedback:{}};for(const e of o)placeSegment(r,e),spawnProps(r,e);return s.scoreboard.reset(LIVES),spawnRaceMarkers(s,r.track,0,TRACK_LENGTH,e.font),r}export function start(e){if(!e.world.isDisposed&&"ready"===e.phase){e.phase="playing",e.speed=START_SPEED;for(let a=50;a<Math.min(SPAWN_AHEAD,TRACK_LENGTH-FINISH_CLEAR);a+=rand(18,26))spawnTraffic(e,a);e.engine=e.audible?getRacingSounds().play("engine",{volume:.32,loop:!0}):null,!e.engine&&getRacingSounds().ready.then(()=>{e.world.isDisposed||!e.audible||"playing"!==e.phase||e.engine||(e.engine=getRacingSounds().play("engine",{volume:.32,loop:!0}))}),e.onPhase("playing"),playBankSound(getRacingSounds(),"nitro",{volume:.6}),haptics.impact(.6,.4)}}export function setAudible(e,a){if(e.audible=a,!a)return audio.stop(e.engine),void(e.engine=null);if("playing"!==e.phase||e.engine||e.world.isDisposed)return;const s=()=>{e.world.isDisposed||!e.audible||"playing"!==e.phase||e.engine||(e.engine=getRacingSounds().play("engine",{volume:.32,loop:!0}))};s(),e.engine||getRacingSounds().ready.then(s)}export function setNight(e,a){if(!e.world.isDisposed&&e.night!==a){e.night=a,setHorizonNight(e.world,e.horizon,a),setCarNight(e.world,e.player,a,e.assets.car.size[1]);for(const s of e.traffic)setCarNight(e.world,s,a,e.assets.car.size[1]);for(const s of e.segments)for(const t of s.lights)e.world.set(t.entity,{color:a?t.night:t.day})}}export function steer(e,a,s,t){e.world.isDisposed||"playing"!==e.phase||("start"===a&&(e.dragX=0),"end"!==a&&(e.target=clamp(e.target+(s-e.dragX)*t,-EDGE-.6,EDGE+.6),e.dragX=s))}export function dispose(e){audio.stop(e.engine),e.world.dispose()}function drive(e,a,s,t,o,n=0,i=0){const r=e.track.sample(s,sample);placeAt(r,t,o,at),e.world.set(a,{position:at,velocity:[0,0,0],rotation:orient(r.heading,r.pitch,n,i,driveRotation)})}function crash(e,a,s=!0){a.crashed=!0,a.passed=!0;const t=e.track.sample(a.s,sample),o=rightOf(t.heading),n=Math.sign(a.d-e.d)||(Math.random()<.5?-1:1),i=e.assets.car.size;e.world.set(a.root,{physics:{type:"dynamic",size:[.95*i[0],i[1],.95*i[2]],layer:8,mask:12,bounce:.25,friction:.6,density:.4},spin:[rand(-2,2),rand(-5,5),-n*rand(2,5)],impact:{sound:getRacingSounds().get("bump"),minSpeed:2,maxSpeed:14,volume:.8,haptic:.3},lifetime:3.6}),e.speed=s?Math.max(.6*START_SPEED,e.speed*CRASH_SLOWDOWN):.9*e.speed;const r=1.1*e.speed,d=e.track.sample(a.s,sample),p=d.x,l=d.z,h=e.track.sample(a.s+1,sample),g=Math.hypot(h.x-p,h.z-l)||1,u=[(h.x-p)/g,0,(h.z-l)/g],f=s?3:6;e.world.set(a.root,{velocity:[u[0]*r+o[0]*n*f,s?4:3,u[2]*r+o[2]*n*f]});const m=e.world.position(a.root);if(m&&explode(e.world,m),e.burning.push(burning(a.root,e.time+3.2)),e.shake=.5,s&&e.onLives(e.world.scoreboard.addLives(-1)),e.hudFeedback.flash=!0,playBankSound(getRacingSounds(),"hit",{volume:1}),haptics.impact(1,.8),e.lives<=0)return e.burning.push(burning(e.player.root,1/0)),void end(e);e.invulnerable=INVULNERABLE}function sideswipe(e,a,s){if(sideImpactSpeed(e.lateral,a.vd,a.d-e.d)>=2.5)return a.bumped=!0,e.lateral*=.55,void crash(e,a,!1);const t=Math.sign(a.d-e.d)||1;if(a.d+=t*s*.65,e.d-=t*s*.35,a.vd=t*(4+.8*Math.abs(e.lateral)),e.lateral=-t*Math.abs(e.lateral)*.3,a.bumped=!0,e.speed*=.97,e.shake=Math.max(e.shake,.15),a.bumpCooldown>0)return;a.bumpCooldown=.3;const o=e.track.sample((a.s+e.s)/2,sample);placeAt(o,(a.d+e.d)/2,.6,at),effects.sparks(e.world,{position:[at[0],at[1],at[2]],count:14,speed:7,size:.07,lifetime:.4,gravity:-9.81,colors:[[1,.9,.4],[1,.65,.2]]}),playBankSound(getRacingSounds(),"bump",{volume:.9}),haptics.impact(.6,.7)}function end(e){"playing"===e.phase&&(e.world.scoreboard.stop(),e.phase="over",audio.stop(e.engine),e.engine=null,e.lives>0?(playBankSound(getRacingSounds(),"win",{volume:.8}),haptics.notify("success")):(playBankSound(getRacingSounds(),"die",{volume:.8}),haptics.notify("error")),e.onPhase("over"))}export function tick(e,a){if(e.world.isDisposed)return;a=Math.max(0,Math.min(a,.05)),e.time+=a;const s="playing"===e.phase;s?(e.speed+=(START_SPEED-e.speed)*(1-Math.exp(1.2*-a)),e.invulnerable=Math.max(0,e.invulnerable-a),e.spawnTimer-=a,e.spawnTimer<=0&&(e.spawnTimer=Math.max(.4,1-.02*(e.speed-START_SPEED))*rand(.8,1.2),spawnTraffic(e)),AUTOPLAY&&autopilot(e)):"over"===e.phase&&(e.speed=Math.max(0,e.speed-25*a));const t=clamp(e.target,-EDGE-.6,EDGE+.6);if(stepSteering(e,s?t:e.d,a,LATERAL_SPEED,STEER_RESPONSE,s),e.scrape-=a,Math.abs(e.d)>EDGE&&(e.d=Math.sign(e.d)*EDGE,Math.sign(e.lateral)===Math.sign(e.d)&&(e.lateral=0),s&&Math.abs(t)>EDGE+.2&&e.scrape<=0)){e.scrape=.06,e.speed*=.985;const a=e.track.sample(e.s+1.5,sample);placeAt(a,Math.sign(e.d)*(ROAD_HALF+.9),.6,at),effects.sparks(e.world,{position:[at[0],at[1],at[2]],count:6,speed:6,size:.08,lifetime:.35,gravity:-9.81,colors:[[1,.85,.3],[1,.55,.1]],flash:!1}),haptics.impact(.25,1)}if(e.s+=e.speed*a,"playing"===e.phase){const a=Math.max(0,Math.ceil(TRACK_LENGTH-e.s));a!==e.left&&(e.left=a,e.onDistance(a)),e.s>=TRACK_LENGTH&&end(e)}const o=e.assets.car.size;smoothSteeringPose(e.steeringPose,e.lateral,e.speed,a),drive(e,e.player.root,e.s,e.d,o[1]/2,e.steeringPose.yaw,e.steeringPose.roll);for(let s=e.traffic.length-1;s>=0;s--){const t=e.traffic[s];if(t.crashed){e.world.has(t.root)||e.traffic.splice(s,1);continue}const o=e.assets.car.size;t.s+=TRAFFIC_SPEED*a,t.bumpCooldown-=a,t.d+=t.vd*a,t.vd*=Math.exp(2.5*-a),Math.abs(t.d)>EDGE&&(t.d=Math.sign(t.d)*EDGE,t.vd=.3*-t.vd),drive(e,t.root,t.s,t.d,o[1]/2,.9*Math.atan2(t.vd,TRAFFIC_SPEED));const n=t.s-e.s,i=CAR_FOOTPRINT.length,r=Math.abs(t.d-e.d);Math.abs(n)<i&&(t.closest=Math.min(t.closest,r));const d=overlapAcross(CAR_FOOTPRINT,CAR_FOOTPRINT,n,r);if("playing"===e.phase&&d>0)if(!t.touching&&frontHit(CAR_FOOTPRINT,CAR_FOOTPRINT,t.wasAhead,n)&&(t.headOn=!0),t.touching=!0,t.headOn){if(e.invulnerable<=0){crash(e,t);continue}}else sideswipe(e,t,d);else t.touching=!1,t.headOn=!1;t.wasAhead=n,!t.passed&&"playing"===e.phase&&n<-i&&(t.passed=!0,e.onScore(e.world.scoreboard.add(POINTS_PER_CAR_PASSED)),playBankSound(getRacingSounds(),"point",{volume:.5}),haptics.impact(.25,.9),t.closest<2.9&&!t.bumped&&(e.hudFeedback.message="NEAR MISS!")),n<-30&&(e.world.despawn(t.root),e.traffic.splice(s,1))}burn(e.world,e.camera,e.burning,e.time,a),e.world.update(a),recycleRoad(e,e.segments,e.s),followCamera(e,a)}function followCamera(e,a){const s=e.world.worldPosition(e.player.root,tmp);if(!s)return;const t=e.track.sample(e.s,look),o=forwardOf(t.heading);if("ready"===e.phase){e.orbit+=.35*a;const t=e.orbit+.9;updateChase(e.chase,e.camera,s,[9*Math.sin(t),3,9*Math.cos(t)],[0,.2,0],a)}else updateChase(e.chase,e.camera,s,[9*-o[0],3.2+2*Math.max(0,-t.pitch),9*-o[2]],[12*o[0],.5+12*Math.tan(t.pitch),12*o[2]],a);e.camera.fov=CAMERA_FOV,e.shake*=Math.exp(6*-a),e.world.set(e.horizon,{position:[s[0],0,s[2]]})}const spawnSample=newSample(),spawnAt=[0,0,0];export function spawnTraffic(e,a=SPAWN_AHEAD){const s=e.s+a;if(s>TRACK_LENGTH-FINISH_CLEAR)return;const t=14+.35*e.speed,o=new Set;for(const a of e.traffic)!a.crashed&&Math.abs(a.s-s)<t&&o.add(a.lane);const n=[0,1,2].filter(e=>!o.has(e));if(n.length<=1)return;const i=LANES[pick(n)],r=e.track.sample(s,spawnSample);placeAt(r,i,e.assets.car.size[1]/2,spawnAt);const{root:d,lights:p}=spawnCar(e.world,e.assets,pick(PAINTS),[spawnAt[0],spawnAt[1],spawnAt[2]],e.night);e.world.set(d,{rotation:orient(r.heading,r.pitch)}),e.traffic.push({root:d,lights:p,s:s,d:i,lane:LANES.indexOf(i),vd:0,passed:!1,crashed:!1,bumped:!1,bumpCooldown:0,closest:1/0,wasAhead:a,touching:!1,headOn:!1})}export function autopilot(e){const a=[1/0,1/0,1/0];for(const s of e.traffic){if(s.crashed)continue;const t=s.s-e.s,o=s.lane;t>-4&&o>=0&&(a[o]=Math.min(a[o],t))}let s=0;for(let a=1;a<3;a++)Math.abs(LANES[a]-e.d)<Math.abs(LANES[s]-e.d)&&(s=a);let t=s;if(a[s]<40)for(const e of[s-1,s+1])e>=0&&e<3&&a[e]>a[t]+6&&(t=e);e.target=LANES[t]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{block,merge,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x59d587}from"../shared/EngineMeshes.js";import{CAR_LAMPS}from"./CarMeshes.js";import{BEHIND,LAMP,LAMP_LIT,LANE_W,LINE,RAIL,ROAD_HALF,RS,SEG_LEN,SEGMENTS}from"./CarRacingConstants.js";import{sceneryMeshes}from"./CarRacingScenery.js";export const rand=(e,o)=>e+Math.random()*(o-e);export const pick=e=>e[Math.floor(Math.random()*e.length)];export const clamp=(e,o,s)=>Math.max(o,Math.min(s,e));const fadeIn=e=>Math.min(1,Math.max(0,(e-60)/200)),curvature=e=>(.0052*Math.sin(e/95)+.0034*Math.sin(e/41+1.3))*fadeIn(e),elevation=e=>(7*Math.sin(e/150)+2.5*Math.sin(e/57+.7))*fadeIn(e);export const newSample=()=>({x:0,y:0,z:0,heading:0,pitch:0});export class Track{xs=[0];zs=[0];hs=[0];ensure(e){for(let o=this.xs.length;o<=e+1;o++){const e=this.hs[o-1]+curvature(o);this.hs.push(e),this.xs.push(this.xs[o-1]+Math.sin(e)),this.zs.push(this.zs[o-1]-Math.cos(e))}}sample(e,o){if(e<0)return o.x=0,o.y=0,o.z=-e,o.heading=0,o.pitch=0,o;const s=e;this.ensure(s);const t=Math.floor(s),n=s-t;return o.x=this.xs[t]+(this.xs[t+1]-this.xs[t])*n,o.z=this.zs[t]+(this.zs[t+1]-this.zs[t])*n,o.heading=this.hs[t]+(this.hs[t+1]-this.hs[t])*n,o.y=elevation(s),o.pitch=Math.atan(elevation(s+.5)-elevation(s-.5)),o}}export const forwardOf=e=>[Math.sin(e),0,-Math.cos(e)];export const rightOf=e=>[Math.cos(e),0,Math.sin(e)];export function placeAt(e,o,s,t){return t[0]=e.x+Math.cos(e.heading)*o,t[1]=e.y+s,t[2]=e.z+Math.sin(e.heading)*o,t}export function orient(e,o,s=0,t=0,n=[0,0,0,1]){const i=-(e+s)/2,r=Math.sin(i),a=Math.cos(i),h=Math.sin(o/2),p=Math.cos(o/2),l=Math.sin(t/2),m=Math.cos(t/2),d=a*h,S=r*p,f=-r*h,R=a*p;return n[0]=d*m+S*l,n[1]=-d*l+S*m,n[2]=R*l+f*m,n[3]=R*m-f*l,n}export function spawnCar(e,o,s,t,n){const i=o.car,r=e.spawn({mesh:"none",position:t}),a=[0,-i.size[1]/2,0],h={root:r,body:e.spawn({mesh:i.body,parent:r,position:a,color:s}),glass:e.spawn({mesh:i.glass,parent:r,position:a}),trim:e.spawn({mesh:i.trim,parent:r,position:a}),lights:[]};return setCarNight(e,h,n,i.size[1]),h}export function setCarNight(e,o,s,t){for(const s of o.lights)e.despawn(s);if(o.lights.length=0,!s||!e.has(o.root))return;const n=-t/2;for(const[s,t,i]of CAR_LAMPS.headlights)o.lights.push(e.spawn({mesh:"cube",parent:o.root,position:[s,n+t,i],scale:CAR_LAMPS.headlightSize,color:[2,1.95,1.7],pickable:!1}));const[i,r,a]=CAR_LAMPS.tail;o.lights.push(e.spawn({mesh:"cube",parent:o.root,position:[i,n+r,a],scale:CAR_LAMPS.tailSize,color:[2,.16,.1],pickable:!1}))}const segmentSample=newSample();export function buildRoad(e,o){const s=[];for(let t=0;t<SEGMENTS;t++){const n=e.spawn({mesh:"none",physics:{type:"fixed",size:[90,.4,SEG_LEN+.4],layer:4,mask:0,friction:.7}}),i=(o,s,t,i,r)=>e.spawn({mesh:o,parent:n,position:s,scale:t,color:i,texture:r,pickable:!1}),r=t%2*.004,a=SEG_LEN+.35;i("cube",[0,RS-.05+r,0],[2*ROAD_HALF+.6,.1,a],[1,1,1],o.asphalt);for(const e of[-1,1]){i(o.scenery.grassGround,[e*(ROAD_HALF+31),RS-.04+r,0],[62,1,SEG_LEN+4],t%2?[1,1,1]:[.94,.97,.92],o.grass);for(const o of[-SEG_LEN/4,SEG_LEN/4])i("cube",[e*(ROAD_HALF+.2),RS+.01+r,o],[.5,.08,SEG_LEN/2],(2*t+(o>0?1:0))%2==0?[.85,.12,.1]:[.95,.95,.95]);i("cube",[e*(ROAD_HALF-.12),RS+.004+r,0],[.14,.02,a],LINE),i("cube",[e*(LANE_W/2),RS+.004+r,0],[.14,.02,2.6],LINE),i("cube",[e*(ROAD_HALF+1.1),RS+.55,0],[.1,.26,a],RAIL),i("cube",[e*(ROAD_HALF+1.15),RS+.3,0],[.12,.6,.12],[.45,.46,.5])}s.push({root:n,s:(t-BEHIND)*SEG_LEN,props:[],lights:[]})}return s}export function buildHorizon(e,o){const s=e.spawn({mesh:"none"});for(let o=0;o<26;o++){const t=o/26*Math.PI*2+rand(-.08,.08),n=rand(150,210),i=rand(40,75);e.spawn({mesh:"sphere",parent:s,position:[Math.sin(t)*n,.32*-i,-Math.cos(t)*n],scale:[1.6*i,.9*i,1.6*i],color:[.3+rand(0,.06),.52+rand(0,.08),.24],pickable:!1})}for(let o=0;o<18;o++){const t=o/18*Math.PI*2+rand(-.1,.1),n=rand(45,80);e.spawn({mesh:"cone",parent:s,position:[330*Math.sin(t),.35*n-10,330*-Math.cos(t)],scale:[1.7*n,n,1.7*n],color:[.45+rand(0,.08),.55+rand(0,.06),.68],pickable:!1})}return setHorizonNight(e,s,o),s}const nightSkies=new WeakMap;export function setHorizonNight(e,o,s){let t=nightSkies.get(e);!t&&(t=new Map,nightSkies.set(e,t));const n=t.get(o)??[];for(const o of n)e.despawn(o);n.length=0;for(let t=0;t<5;t++){const i=1.256*t+.7;n.push(e.spawn({mesh:sceneryMeshes().cloud,parent:o,position:[160*Math.sin(i),35+t%3*8,160*-Math.cos(i)],scale:[1.4+t%2*.5,1,1.1],color:s?[.55,.58,.68]:[1.4,1.43,1.45],pickable:!1}))}if(s){n.push(e.spawn({mesh:"sphere",parent:o,position:[-120,120,-230],scale:26,color:[2,1.95,1.8],pickable:!1}));for(let s=0;s<70;s++){const s=rand(0,2*Math.PI);n.push(e.spawn({mesh:"sphere",parent:o,position:[280*Math.sin(s),rand(50,190),280*-Math.cos(s)],scale:rand(.6,1.4),color:[2,2,2.2],pickable:!1}))}}t.set(o,n)}export function placeSegment(e,o){const s=e.track.sample(o.s,segmentSample);e.world.set(o.root,{position:[s.x,s.y-RS,s.z],rotation:orient(s.heading,s.pitch)})}const zoneAt=e=>["city","suburb","country"][Math.floor(Math.max(0,e+300)/600)%3],HOUSE_WALLS=[[.95,.9,.78],[.86,.9,.95],[.95,.82,.75],[.9,.93,.82]],ROOFS=[[.62,.2,.15],[.35,.25,.2],[.3,.32,.38]];export function spawnProps(e,o){const{world:s,assets:t}=e,n=e=>{const t=s.spawn({parent:o.root,pickable:!1,...e});return o.props.push(t),t},i=(s,t,i)=>{const r=n({...s,color:e.night?i:t});o.lights.push({entity:r,day:t,night:i})},r=Math.round(o.s/SEG_LEN),a=zoneAt(o.s),h=()=>rand(-SEG_LEN/2,SEG_LEN/2),p=Math.abs(r),l=t.scenery,m=(e,o,s,t,r,a)=>{n({mesh:l.podium,position:[e,RS,o],scale:[s,1,r]}),n({mesh:l.roofs[a%2],position:[e,RS+t,o],scale:[s,1,r]}),n({mesh:l.facades[a%3],position:[e,RS+t/2,o],scale:[s,t,r]}),i({mesh:l.windows,position:[e,RS+t/2,o],scale:[s,t,r]},[1,1,1,0],[1,1,1])};for(const e of[-1,1]){if(Math.random()<.55&&n({mesh:"sphere",position:[e*(ROAD_HALF+rand(2.2,3.4)),RS+.25,h()],scale:[rand(1,1.8),rand(.7,1.1),rand(1,1.8)],color:[.18+rand(0,.08),.4+rand(0,.12),.14]}),"city"===a){if(n({mesh:l.pavement,position:[e*(ROAD_HALF+3.2),RS+.05,0]}),(r+(e>0?1:0))%2==0){const o=rand(14,42),s=rand(.72,1),i=e*(ROAD_HALF+rand(10,15)),r=rand(-1,1),a=rand(8,12),h=rand(8,11);if(n({mesh:"cube",texture:t.facade,position:[i,RS+o/2,r],scale:[a,o,h],color:[s,s*rand(.92,1),s*rand(.86,1)]}),m(i,r,a,o,h,p+(e>0?1:0)),Math.random()<.5){const o=rand(20,55);n({mesh:"cube",texture:t.facade,position:[e*(ROAD_HALF+rand(24,32)),RS+o/2,rand(-2,2)],scale:[rand(9,14),o,rand(9,12)],color:[.8,.82,.88]})}}const o=p+(e>0?2:0),s=e*(ROAD_HALF+3.2);o%5==1?(n({mesh:l.planter,position:[s,RS+.1,0]}),n({mesh:"cylinder",position:[s,RS+1.7,0],scale:[.28,2.7,.28],color:[.35,.26,.16]}),n({mesh:"sphere",position:[s,RS+3.6,0],scale:[2.1,2.7,2],color:[.23,.41,.19]}),n({mesh:"sphere",position:[s+.45*e,RS+3.2,.35],scale:[1.5,1.8,1.5],color:[.27,.44,.2]})):o%5==3&&(n({mesh:l.planter,position:[s,RS+.1,0]}),n({mesh:l.flowers,position:[s,RS+.67,0],scale:[1.3,1.2,1.3]})),o%9==4&&(n({mesh:l.bench,position:[s,RS+.12,0],rotation:[0,Math.sin(e*Math.PI/4),0,Math.cos(e*Math.PI/4)]}),n({mesh:l.bin,position:[s,RS+.12,1.8]})),o%19==8&&n({mesh:l.shelter,position:[s,RS+.12,0]})}else if("suburb"===a)if((r+(e>0?1:0))%3==0){const t=e*(ROAD_HALF+rand(10,14)),i=pick(HOUSE_WALLS),r=t-2.52*e;n({mesh:"cube",position:[t,RS+1.6,0],scale:[5,3.2,5.6],color:i}),n({mesh:l.house,position:[t,RS,0]}),n({mesh:l.flowers,position:[r-.45*e,RS,-1],scale:[.8,1,1.4]}),n({mesh:"cube",position:[e*(ROAD_HALF+7.3),RS-.005,.9],scale:[4.5,.035,1.8],color:[.48,.49,.46]}),n({mesh:"cube",position:[r,RS+.95,.9],scale:[.06,1.9,.9],color:[.35,.22,.14]});for(const e of[-1.4,2.2])n({mesh:"cube",position:[r,RS+2,e],scale:[.06,.8,.9],color:[.55,.7,.85]});const a=s.spawn({mesh:"none",parent:o.root,pickable:!1,position:[t,RS+3.2,0],scale:[1,.55,1]});o.props.push(a),o.props.push(s.spawn({mesh:"cube",parent:a,pickable:!1,rotation:[0,0,Math.sin(Math.PI/8),Math.cos(Math.PI/8)],scale:[4,4,6.2],color:pick(ROOFS)})),n({mesh:"cube",position:[e*(ROAD_HALF+6.5),RS+.35,0],scale:[.08,.6,SEG_LEN],color:[.95,.95,.95]})}else{const o=e*(ROAD_HALF+rand(7,16)),s=h(),t=rand(1.6,2.6);n({mesh:"cylinder",position:[o,RS+t/2,s],scale:[.35,t,.35],color:[.42,.29,.17]}),n({mesh:"sphere",position:[o,RS+t+1.1,s],scale:rand(2.6,3.6),color:[.24+rand(0,.08),.5+rand(0,.12),.2]})}else{for(let o=0;o<3;o++)n({mesh:t.tree,position:[e*(ROAD_HALF+rand(5,28)),RS,h()],scale:rand(2.4,4.2),color:[1,1,1]});Math.random()<.35&&n({mesh:"sphere",position:[e*(ROAD_HALF+rand(4,12)),RS,h()],scale:[rand(.8,1.8),rand(.5,.9),rand(.8,1.6)],color:[.52,.5,.48]});for(const o of[.45,.85])n({mesh:"cube",position:[e*(ROAD_HALF+4.2),RS+o,0],scale:[.07,.1,SEG_LEN+.3],color:[.48,.34,.2]});n({mesh:"cube",position:[e*(ROAD_HALF+4.2),RS+.5,0],scale:[.12,1,.12],color:[.4,.28,.16]}),r%6==(e>0?0:3)&&(n({mesh:"cylinder",position:[e*(ROAD_HALF+7),RS+4.5,0],scale:[.22,9,.22],color:[.38,.27,.18]}),n({mesh:"cube",position:[e*(ROAD_HALF+7),RS+8.4,0],scale:[2.2,.14,.14],color:[.38,.27,.18]}))}if(p%2==0){const o=e*(ROAD_HALF+("city"===a?1.8:3.2));n({mesh:l.grass,position:[o,RS-.025,-1.6],scale:"city"===a?.8:1.4}),"city"!==a&&n({mesh:l.grass,position:[o+.8*e,RS-.025,1.6],scale:1.1})}"country"===a&&p%4==1&&n({mesh:l.flowers,position:[e*(ROAD_HALF+3.1),RS-.02,0],scale:1.1}),"city"===a&&p%3==0&&n({mesh:l.drain,position:[e*(ROAD_HALF-.4),RS+.008,0]}),p%2==1&&i({mesh:"cube",position:[e*(ROAD_HALF+1.04),RS+.61,0],scale:[.1,.08,.07]},[.9,.88,.75],[1.45,1.3,.8])}const d=r%2?1:-1;if(r%("city"===a?2:4)==0&&(n({mesh:"cylinder",position:[d*(ROAD_HALF+1.7),RS+3.2,0],scale:[.16,6.4,.16],color:[.35,.36,.4]}),n({mesh:"cube",position:[d*(ROAD_HALF+.8),RS+6.35,0],scale:[1.9,.1,.12],color:[.35,.36,.4]}),i({mesh:"cube",position:[d*(ROAD_HALF-.05),RS+6.25,0],scale:[.7,.1,.32]},LAMP,LAMP_LIT)),p%17==7){const e=d*(ROAD_HALF+4.6);for(const o of[-1.65,1.65])n({mesh:"cylinder",position:[e+o,RS+2,0],scale:[.1,4,.1],color:[.4,.44,.42]});n({mesh:l.routeSign,position:[e,RS+4.15,0]}),i({text:"city"===a?"CITY":"suburb"===a?"HILLS":"FOREST",font:t.font,position:[e-.35,RS+3.92,.09],scale:.48,letterSpacing:.04},[.94,.95,.88],[1.4,1.4,1.25])}if(r%11==5){const e=-d*(ROAD_HALF+6);for(const o of[-2.2,2.2])n({mesh:"cylinder",position:[e+o,RS+2.5,0],scale:[.25,5,.25],color:[.3,.3,.34]});i({mesh:"cube",texture:pick(t.ads),position:[e,RS+6,0],scale:[7.5,3.6,.25],rotation:[0,Math.sin(.35*d/2),0,Math.cos(.35*d/2)]},[1,1,1],[1.7,1.7,1.7])}}export function recycleRoad(e,o,s){for(const t of o)if(!(t.s>=s-SEG_LEN*BEHIND)){t.s+=SEGMENTS*SEG_LEN,placeSegment(e,t);for(const o of t.props)e.world.despawn(o);t.props.length=0,t.lights.length=0,spawnProps(e,t)}}const FLASH=[2,1.95,1.7,.9],FIREBALL=[[2,1.7,.8,.6],[2,1.45,.5,.6],[2,1.2,.35,.6]],FLAME_CORE=[[2,1.85,1.1,.5],[2,1.7,.75,.5]],FLAME=[[2,1.6,.55,.42],[2,1.35,.38,.42],[2,1.1,.25,.42]],COOLED=[2,.35,.08,0],SMOKE=[[.1,.095,.09,.5],[.14,.13,.12,.45],[.18,.17,.16,.4]],SMOKE_END=[.45,.44,.43,0],EMBER=[[2,1.4,.5],[2,1,.25]],DEBRIS=[[.06,.06,.07],[.18,.18,.2]];export const burning=(e,o)=>({root:e,until:o,flame:0,smoke:0,ember:0});export function explode(e,o){const s=[0,1,0];e.burst({position:o,mesh:"flame",count:3,size:3.2,speed:.5,lifetime:.22,gravity:0,color:FLASH,endSize:1.8,endColor:[2,1.4,.4,0]}),e.burst({position:o,mesh:"flame",count:30,size:1.1,speed:4.5,lifetime:.85,gravity:3,color:FIREBALL,endSize:2.2,endColor:COOLED}),e.burst({position:[o[0],o[1]+.4,o[2]],mesh:"flame",count:14,size:.9,speed:5.5,lifetime:.9,gravity:5,direction:s,spread:.55,color:FLAME,endSize:1.4,endColor:COOLED}),e.burst({position:o,mesh:"flame",count:30,size:.16,speed:14,lifetime:.7,gravity:-9.81,color:EMBER,endSize:.3,endColor:[2,.3,.05,0]}),e.burst({position:o,count:10,size:.14,speed:8,lifetime:1.4,gravity:-9.81,direction:s,spread:1.2,color:DEBRIS}),e.burst({position:[o[0],o[1]+1.4,o[2]],mesh:"puff",count:6,size:1,speed:2,lifetime:2,gravity:2,direction:s,spread:.6,color:SMOKE,endSize:3,endColor:SMOKE_END})}const firePosition=[0,0,0],wreckVelocity=[0,0,0],FLAMES_PER_SECOND=120,SMOKE_PER_SECOND=10,EMBERS_PER_SECOND=14,FIRE_MIN_DISTANCE=5;export function burn(e,o,s,t,n){const{eye:i,target:r}=o,a=r[0]-i[0],h=r[1]-i[1],p=r[2]-i[2],l=Math.hypot(a,h,p)||1;for(let o=s.length-1;o>=0;o--){const r=s[o],m=e.worldPosition(r.root,firePosition);if(!m||t>r.until){s.splice(o,1);continue}if(((m[0]-i[0])*a+(m[1]-i[1])*h+(m[2]-i[2])*p)/l<5)continue;const d=e.velocity(r.root,wreckVelocity)??[0,0,0],S=(o,s,t,n,i)=>{const r=[d[0],d[1]+o,d[2]],a=Math.hypot(r[0],r[1],r[2]);e.burst({position:[m[0]+rand(-t,t),m[1]+s,m[2]+rand(-n,n)],mesh:i.mesh,count:1,size:i.size,speed:a,lifetime:i.lifetime,gravity:1.5*o,direction:[r[0]/a,r[1]/a,r[2]/a],spread:i.spread,color:i.color,endSize:i.endSize,endColor:i.endColor})};for(r.flame+=120*n;r.flame>=1;)r.flame-=1,S(4.2,.8,.75,1.5,{mesh:"flame",size:rand(.8,1.1),lifetime:rand(.45,.65),color:FLAME,endSize:.25,endColor:COOLED,spread:.2}),Math.random()<.5&&S(1.5,.7,.55,1.2,{mesh:"flame",size:rand(.7,.95),lifetime:rand(.18,.28),color:FLAME_CORE,endSize:.7,endColor:[2,1.4,.4,0],spread:.2});for(r.smoke+=10*n;r.smoke>=1;)r.smoke-=1,S(2.6,2,.5,1,{mesh:"puff",size:rand(1,1.3),lifetime:rand(1.6,2.1),color:SMOKE,endSize:3,endColor:SMOKE_END,spread:.35});for(r.ember+=14*n;r.ember>=1;)r.ember-=1,S(4.5,1,.6,1.3,{mesh:"flame",size:.14,lifetime:rand(.8,1.3),color:EMBER,endSize:.3,endColor:[2,.3,.05,0],spread:.6})}}const GANTRY_X=ROAD_HALF+1.7,GANTRY_H=6.4,BANNER_Y=5.5,markerMeshes=new Map,markerMesh=(e,o)=>{let s=markerMeshes.get(e);return s||markerMeshes.set(e,s=cacheGameAsset("car-racing/CarRacingScene:"+e,o)),s};function gantryParts(e,o){const s=[];for(const o of[-1,1])s.push({geometry:block(.55,6.4,.55,6),position:[o*GANTRY_X,3.2,0],color:e}),s.push({geometry:block(.9,.3,.9,6),position:[o*GANTRY_X,.15,0],color:e});return s.push({geometry:block(2*GANTRY_X+.9,.45,.6),position:[0,6.5,0],color:e},{geometry:block(2*GANTRY_X-1.4,1.25,.12),position:[0,5.5,.08],color:o},{geometry:block(2*GANTRY_X-2.2,.08,.04),position:[0,5,.15],color:[1,.9,.5]},{geometry:block(2*GANTRY_X-2.2,.08,.04),position:[0,6,.15],color:[1,.9,.5]}),s}const finishMesh=()=>markerMesh("finish",()=>{const e=[],o=.7,s=Math.ceil((2*ROAD_HALF+.6)/o);for(let t=0;t<s;t++)for(let n=0;n<2;n++)e.push({geometry:block(o,.03,o,8),position:[(t-(s-1)/2)*o,.016,(n-.5)*o],color:(t+n)%2?[.96,.96,.94]:[.08,.08,.1]});const t=[-4,-2,0,2,4].map((e,o)=>({geometry:tube([[e,6.25,.32],[e+.06,6.4-.8,.33]],{radius:e=>.2*(1-e),shape:e=>.2+.8*Math.abs(Math.cos(e*Math.PI*2)),sides:6}),color:[[.2,.5,.95],[1,.8,.15],[.2,.75,.3]][o%3]}));return _0x59d587(merge([...e,...gantryParts([.95,.72,.2],[.85,.12,.14]),...t]),{center:!1,shine:.5})}),startMesh=()=>markerMesh("start",()=>_0x59d587(merge([{geometry:block(2*ROAD_HALF+.4,.03,.5,8),position:[0,.016,0],color:[.96,.96,.92]}]),{center:!1,shine:.3})),markerSample=newSample(),markerAt=[0,0,0];export function spawnRaceMarkers(e,o,s,t,n){const i=(s,t,i)=>{const r=o.sample(t,markerSample);placeAt(r,0,0,markerAt);const a=e.spawn({mesh:s,position:[markerAt[0],markerAt[1],markerAt[2]],rotation:orient(r.heading,r.pitch),pickable:!1});return i?(e.spawn({text:i,font:n,parent:a,position:[0,5.14,.16],scale:.78,color:[1,1,1],letterSpacing:.12,pickable:!1}),a):a};return{start:i(startMesh(),s),finish:i(finishMesh(),t,"FINISH")}}export function*warmAssets(){yield finishMesh,yield startMesh}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{ellipsoid,merge}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh}from"../shared/EngineMeshes.js";import{facadeWindowQuads}from"./CarRacingFacade.js";class Details{vertices=[];indices=[];quad(o,e,t,n,r,s,i=[1,1]){const a=this.vertices.length/11;for(const[a,f]of[[o,[0,0]],[e,[i[0],0]],[t,i],[n,[0,i[1]]]])this.vertices.push(...a,...r,s[0],s[1],s[2],f[0],f[1]);const f=[e[0]-o[0],e[1]-o[1],e[2]-o[2]],u=[t[0]-o[0],t[1]-o[1],t[2]-o[2]],d=(f[1]*u[2]-f[2]*u[1])*r[0]+(f[2]*u[0]-f[0]*u[2])*r[1]+(f[0]*u[1]-f[1]*u[0])*r[2];this.indices.push(...(d>=0?[0,1,2,0,2,3]:[0,2,1,0,3,2]).map(o=>a+o))}box(o,e,t){const[n,r,s]=e,[i,a,f]=o.map(o=>o/2);this.quad([n-i,r-a,s+f],[n+i,r-a,s+f],[n+i,r+a,s+f],[n-i,r+a,s+f],[0,0,1],t),this.quad([n+i,r-a,s-f],[n-i,r-a,s-f],[n-i,r+a,s-f],[n+i,r+a,s-f],[0,0,-1],t),this.quad([n+i,r-a,s+f],[n+i,r-a,s-f],[n+i,r+a,s-f],[n+i,r+a,s+f],[1,0,0],t),this.quad([n-i,r-a,s-f],[n-i,r-a,s+f],[n-i,r+a,s+f],[n-i,r+a,s-f],[-1,0,0],t),this.quad([n-i,r+a,s+f],[n+i,r+a,s+f],[n+i,r+a,s-f],[n-i,r+a,s-f],[0,1,0],t),this.quad([n-i,r-a,s-f],[n+i,r-a,s-f],[n+i,r-a,s+f],[n-i,r-a,s+f],[0,-1,0],t)}geometry(){return{vertices:new Float32Array(this.vertices),indices:new Uint32Array(this.indices)}}}const STONE=[.57,.57,.53],METAL=[.2,.24,.23],WOOD=[.43,.31,.2];function detail(o,e,t=.1){return cacheGameAsset("car-racing/scenery-details-v1/"+o,()=>{const o=new Details;return e(o),createGameMesh(o.geometry(),{center:!1,shine:t})})}function podium(){return detail("podium",o=>{o.box([1.025,.32,1.025],[0,.16,0],STONE),o.box([1.012,2.6,1.012],[0,1.5,0],[.2,.28,.3]),o.box([1.055,.18,1.055],[0,2.9,0],[.49,.48,.43]);for(const e of[-1,1]){for(const t of[-.48,-.24,0,.24,.48])o.box([.025,2.5,.035],[.514*e,1.5,t],[.39,.41,.39]),o.box([.035,2.5,.025],[t,1.5,.514*e],[.39,.41,.39]);o.box([.095,.12,.66],[.55*e,2.55,0],[.31,.36,.31]),o.box([.025,.08,.015],[.534*e,1.28,.065],[.72,.73,.69])}},.25)}function roof(o){return detail("roof-"+o,e=>{e.box([1.045,.25,1.045],[0,.03,0],[.57,.56,.52]);for(const o of[-1,1])e.box([1.03,.55,.018],[0,.36,.507*o],[.46,.47,.44]),e.box([.018,.55,1.03],[.507*o,.36,0],[.46,.47,.44]);e.box([.25,.8,.25],[-.17,.52,.16],[.49,.53,.53]);for(let o=0;o<4;o++)e.box([.255,.035,.025],[-.17,.96,.07+.055*o],METAL);e.box([.12,o?1.5:.65,.15],[.24,o?.95:.52,-.18],[.52,.43,.35]),o&&e.box([.18,.1,.21],[.24,1.72,-.18],[.63,.61,.56])})}function facade(o){return detail("trim-"+o,e=>{const t=1===o?[.58,.61,.61]:[.72,.7,.64];for(const n of[-1,1]){for(const o of[-1,1])e.box([.025,.985,.025],[.496*n,0,.496*o],t);if(0===o)for(const o of[-.25,.25])e.box([.013,.98,.012],[o,0,.504*n],t),e.box([.012,.98,.013],[.504*n,0,o],t)}for(const n of 2===o?[-.25,0,.25,.49]:[.49])e.box([1.025,.009,1.025],[0,n,0],t)})}function windows(){return detail("night-windows-aligned-v2",o=>{for(const{corners:[e,t,n,r],normal:s}of facadeWindowQuads())o.quad(e,t,n,r,s,[1.6,1.46,1.02])},0)}function bench(){return detail("bench",o=>{for(const e of[-.2,-.07,.06,.19])o.box([1.7,.07,.1],[0,.52,e],WOOD);for(const e of[.77,.91,1.05])o.box([1.7,.1,.07],[0,e,-.24],WOOD);for(const e of[-.59,.59])o.box([.08,.52,.45],[e,.26,0],METAL),o.box([.065,1.06,.065],[e,.53,-.23],METAL),o.box([.07,.07,.45],[e,.72,0],METAL)})}function planter(){return detail("planter",o=>{o.box([1.5,.48,1.8],[0,.24,0],[.43,.44,.39]),o.box([1.6,.08,1.9],[0,.5,0],[.65,.64,.58]),o.box([1.32,.035,1.62],[0,.55,0],[.21,.18,.12])})}function bin(){return detail("bin",o=>{o.box([.5,.85,.5],[0,.43,0],[.23,.29,.25]),o.box([.56,.08,.56],[0,.9,0],[.39,.41,.35]),o.box([.36,.15,.02],[0,.76,.257],[.055,.07,.06]);for(const e of[-.18,-.06,.06,.18])o.box([.012,.63,.025],[e,.4,.26],[.12,.18,.15])})}function shelter(){return detail("shelter",o=>{o.box([2.15,.16,4.4],[0,3,0],[.39,.42,.4]),o.box([2.3,.08,4.6],[0,3.13,0],[.58,.61,.57]);for(const e of[-1.9,1.9])for(const t of[-.85,.85])o.box([.08,2.95,.08],[t,1.5,e],METAL);o.box([.035,2.25,3.6],[.88,1.65,0],[.34,.48,.51]),o.box([1.7,.06,.5],[0,.62,0],WOOD);for(const e of[-1.1,1.1])o.box([.5,.58,.08],[0,.29,e],METAL);o.box([.06,.95,.65],[-.86,1.8,1.4],[.85,.86,.79]);for(let e=0;e<5;e++)o.box([.07,.035,.42],[-.9,2.1-.12*e,1.4],[.21,.35,.3])})}function grass(){return detail("grass",o=>{for(let e=0;e<14;e++){const t=2.39996*e,n=Math.cos(t)*(.15+e%3*.08),r=Math.sin(t)*(.15+e%3*.08),s=.22+e%4*.07,i=.13*Math.cos(t),a=.13*Math.sin(t),f=[Math.cos(t),0,Math.sin(t)],u=[.025*-f[2],0,.025*f[0]],d=[.22+e%3*.035,.34+e%4*.025,.12],b=[[n+u[0],0,r+u[2]],[n-u[0],0,r-u[2]],[n+i,s,r+a],[n+i,s,r+a]];o.quad(b[0],b[1],b[2],b[3],f,d),o.quad(b[3],b[2],b[1],b[0],[-f[0],0,-f[2]],d)}})}function flowers(){return detail("flowers",o=>{for(let e=0;e<9;e++){const t=.44*Math.cos(2.4*e),n=.5*Math.sin(2.4*e),r=.3+e%3*.09;o.box([.018,r,.018],[t,r/2,n],[.19,.32,.12]);const s=e%3?[.9,.78,.32]:[.86,.86,.79];o.box([.17,.035,.055],[t,r,n],s),o.box([.055,.04,.17],[t,r,n],s),o.box([.045,.048,.045],[t,r+.01,n],[.59,.38,.1])}})}function pavement(){return detail("pavement",o=>{o.box([2.6,.12,6.35],[0,0,0],[.65,.65,.61]);for(let e=0;e<6;e++)o.box([2.6,.006,.015],[0,.063,-2.5+e],[.5,.51,.47]);for(const e of[-.43,.43])o.box([.015,.006,6.3],[e,.063,0],[.5,.51,.47]);for(const e of[-1.27,1.27])o.box([.065,.06,6.35],[e,.08,0],[.74,.73,.67])})}function drain(){return detail("drain",o=>{o.box([.31,.014,.65],[0,0,0],[.29,.3,.27]);for(let e=0;e<7;e++)o.box([.23,.006,.035],[0,.009,.08*e-.25],[.085,.1,.09])})}function houseDetails(){return detail("house-details",o=>{o.box([5.2,.16,5.8],[0,3.14,0],[.64,.62,.53]),o.box([.55,1.4,.55],[1.3,4,-.9],[.49,.35,.28]),o.box([.68,.12,.68],[1.3,4.73,-.9],[.58,.56,.51]);for(const e of[-2.55,2.55])o.box([.07,1.2,1.2],[e,.64,.9],[.31,.35,.29]),o.box([.9,.1,1.45],[e,1.35,.9],[.5,.36,.24])})}function routeSign(){return detail("route-sign",o=>{o.box([4.2,1.5,.12],[0,0,0],[.16,.29,.22]);for(const e of[-1,1])o.box([4.12,.035,.015],[0,.69*e,.072],[.79,.83,.73]),o.box([.035,1.36,.015],[2.03*e,0,.072],[.79,.83,.73]);o.box([.7,.12,.02],[1.25,-.05,.08],[.94,.95,.86]),o.quad([1.42,-.31,.094],[1.8,-.05,.094],[1.42,.21,.094],[1.42,.21,.094],[0,0,1],[.94,.95,.86])})}function grassGround(){return detail("grass-ground-v2",o=>o.quad([-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,1,0],[1,1,1],[1,1]))}function cloud(){return cacheGameAsset("car-racing/scenery-details-v1/cloud",()=>createGameMesh(merge([{geometry:ellipsoid([14,2.4,6],[1,1,1],10)},{geometry:ellipsoid([8,3.8,5],[1,1,1],10),position:[-4,1.1,0]},{geometry:ellipsoid([7,2.8,5],[1,1,1],10),position:[8,.4,1]}]),{center:!1,shine:0}))}let scenery;function buildScenery(){return{podium:podium(),roofs:[roof(0),roof(1)],facades:[facade(0),facade(1),facade(2)],windows:windows(),bench:bench(),planter:planter(),bin:bin(),shelter:shelter(),grass:grass(),flowers:flowers(),pavement:pavement(),drain:drain(),house:houseDetails(),grassGround:grassGround(),routeSign:routeSign(),cloud:cloud()}}export function sceneryMeshes(){return scenery??=buildScenery()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _0x2a16(){const e=["taxcOqCvW7ucn8oiW7tcGhy","WR/cLHyJfvTyDxtdTvNcRs4","W6lcUrlcUhS","W7lcOH3cVMNcQCkLW4/cNW","tmoQW5lcOSo7oG","WO3dPcRdKmomWPzFW5aVs8kvWQJdHG","tmoQW5lcS8o/mmkTgCoSAhC","WPKNrr9Y","WOfPuZ58","W43cSwRcG8knW6qoW5ya","juSnFNTuW5O","WQxcMNu","pY7cJ2xdUb3cSq","FSoWW6D3W4rxf8kNua","WQdcLMJdJXddNCktiX4","i8k3WRVdUCojbCoLf8k2WOmaWQe","W7yfW6hcNSoxW57dOSo9uCou","WOXYWQ/dGmoY","dsBdJSoXWRaUWPH+WRDipCoJra","W5xdRd5mWOZcUCoFBJai","WPzRrc1bW6mPoa","WOD8WR8SasldTCkWWRm","W6TLDCofW7y","ataKW5ZdH25KwZO","lSoNWR8yWOq","WOrDWP1LW7i","amk0iCkNWQ3dHSo2","WO7dVMreW5tcPmkhE3O","pCk1EWWEWOWaW5yJ","WO1St8oOW7u","amkQACo6W4i","ksJcMftdVb/cQCoMcCkVWPm","F8kZW5ddNmog","WOOHnwFcQSoNWR4","nczoWRSTxCkDxG","W4lcMtlcMa","f8oukqb9gaNcGG","W5iSgM98W5uqg8kMWRu","fKldPubhWQiK","WOBdLSoRz1xcNNmdW5fEi2RdKa","WPFcQmklsrC6WQS","W7bnWP/dHCkJ","emk9mmkbWQldNSoJoSo4W6y","W7yaW6ZcK8kNW6FdNCopDCoPAq","mCkpuxxcSwSeW6DPdhS","W7blWRJdNCk0xSk9W5i","eSoqpJHUcXlcKSkpWQfIqSk7zCk7","WRRcP8kmCbS","WP3cRSkPvXmTWRBdOCoe","W5ddRsrD","cmknWRbxsrpcReDc","C8okdJddHhmAW5C","smolW4n/W6D9n8klASk5hgrP","p8oYWRaeWPi/lWm","WPiUWOJcUL98jW","cLddUCoiWRnJW4S","cSk2lCkYWQRdKSoQbmoTW60","zSovWO5QW4znWOa","cmovWP0yWPi","meRdVSkAWQv4W43dRCknCaFcQvq5WQeIWR0VWPRdVCoRhSkgeW","y8oxW4FcM8oh","cCo6bCkJWQZdMq","qSkbBMu8te3cJmkRWOTeB8kz","W43dR8opdKvTWO3dNmonsmkvW4u","l8oEWQPvW4VcKrX2","FeldJfn9vhS","iCkPrSkgmSobimk9cmkS","WO4CWQhdVNtdPqP1","xwlcISkZW6zYW5W","WOzQws9JW6WW","m8kNWR3dImonb8o9","AConnYNdShSvW55o","WRrvWRRdMmo0","WQ/cIXimhfn/","iCkNFa0pWR8","mtC5W5e/W6hcRIjUj8oRdG","WQSeCJ5JzG5i","p8obiCk8WOZdS8oEW4tdQryGW4/cQa","ueBdVgjm","WOqOWP/cJvX0nKxcIG","f0ldO0znWQieaCoEW5i","WP3cUtOewxfguvy","g8oOdCkuWOddMW","FSofmmogpG","bmo8WQTkWPqIaGVcKmoswmo1W7RdNa","W7uAbJBcQ8oaWOa","WPy+WO7cM05Zj0m","W7KNW64zW6aedmogFuS","lGhcHXGUALuyWOiQuG","WQX4W6tdJLBcJIWDDZ3dIsGH","WOT/WPldOSof","pmkKArSEWOWaW5yJ","W5BcUNdcKSkqW4idW5iFya","CmotWPLkW4zf","bIyYW7RdKKvPvd7cSSoI","WPFdQ8oecLhcTvCLW7eG","FsdcLWHpfq","W7lcUahcUg3cRSk/","xCo/WRHSWQNcVWJcTG","hSobWQRcN8kBWQpdSNtdPSknW47cVH0","wCkfW7/dH8ox","oSk/WPHaCZO","W7PAD8ofW5HpW7LEfa","W40cbbpcPa","bSoUahRdVNPBd0pdM0S","WPzXWRqCba","oSo2WQO5WOmSgGi","eCoSe8kcWQJdMmo+","nSk+WQRdGG","WQpcQ8kODHW","W7KbjYZcR8oCWPe","C8omW7RcOa","gLNdHfDwWRG5cSobW5xcQwzpw8obCa","W4RcP3ZcQ8kCW44a","oSk/WPHFCZhcLq","rCoSmW/dKq","fdaJW6RdH0HXuW","WQFcGh7dQqxdTSkElbRcQc4","tCkPWOaMW67dOq","W4VdKmoVEY0","g0ddUmoFWQjkW57dTSkb","cSkSW47cVSoWfSkYeW","dSoKWOjvWO3cOIK0W6i","WPfWWR85gqtdRCktWRDzbq","AKtdM2r+xgOHWRS","W5/dTYvkWOdcTSoh","W6fhWQSvWPJdJbdcVNHg","FttcIXLpf8kP","W6DrWPNdM8kJwCkN","WO7cMqDHdveWFNhdReddRW","h20Euv9+W6bCW4e","WPrIWPtdUmof","W5/dLSo0wJZdSSk8WRa","e8kWWQldGSog","WRhcHMNdMahdTmkg","sSo8W4pcOmoYpCk4eSoJBa","WPKbWOddI3q","W7BdIW98WPi","rSoelWZdSG","WR8hW4PlWOpdOI3cLN0","cLFdRSoBWQjO","lmkTWPnXCZa","WPOAWRRdN2u","lqjaWQ0P","y8oleZldPNWd","W45QsCo7W6jLW4i","W68hmaZcR8ou","WQBdV8oesxxcVG","WPb3WQ0RgqddNmk8WQzacw9R","WRddRCopAxhcVLOUW75IgG","qSoBlHFdIq","WRW/WPBdN2u","W7/dQJzvWOdcTmowAcq/WRRdTa","WR1NWR9UW4CbbComDveU"];return(_0x2a16=function(){return e})()}function _0x4326(e,o){e-=349;const W=_0x2a16();let t=W[e];if(void 0===_0x4326.bNHzpv){const e=function(e,o){let W,t,n=[],a=0,r="";for(e=function(e){let o="",W="";for(let W,t,n=0,a=0;t=e.charAt(a++);~t&&(W=n%4?64*W+t:t,n++%4)?o+=String.fromCharCode(255&W>>(-2*n&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(let e=0,t=o.length;e<t;e++)W+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(W)}(e),t=0;t<256;t++)n[t]=t;for(t=0;t<256;t++)a=(a+n[t]+o.charCodeAt(t%o.length))%256,W=n[t],n[t]=n[a],n[a]=W;t=0,a=0;for(let o=0;o<e.length;o++)t=(t+1)%256,a=(a+n[t])%256,W=n[t],n[t]=n[a],n[a]=W,r+=String.fromCharCode(e.charCodeAt(o)^n[(n[t]+n[a])%256]);return r};_0x4326.vkCetf=e,_0x4326.WbSRZD={},_0x4326.bNHzpv=!0}const n=W[0];_0x4326.MynRKr!==n&&(_0x4326.WbSRZD={},_0x4326.MynRKr=n);const a=_0x4326.WbSRZD[e];return void 0===a?(void 0===_0x4326.fIAVpa&&(_0x4326.fIAVpa=!0),t=_0x4326.vkCetf(t,o),_0x4326.WbSRZD[e]=t):t=a,t}const _0x401649=_0x4326;!function(){const e=_0x4326,o=_0x2a16();for(;;)try{if(790014==parseInt(e(444,"R@kn"))/1+parseInt(e(443,"f^pG"))/2+-parseInt(e(470,"W0BO"))/3+parseInt(e(485,"wH%W"))/4*(-parseInt(e(502,"M(sD"))/5)+-parseInt(e(468,"AN98"))/6*(-parseInt(e(424,"X9Q3"))/7)+parseInt(e(418,"U&su"))/8*(-parseInt(e(447,"Z$QM"))/9)+parseInt(e(399,"2GR%"))/10)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x4367e7 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";import{GameControlButton,GameOverModal,GameSettingsModal}from"../../helpers/index.js";import{DEFAULT_GAME_SETTINGS,GAME_IDS}from"../../services/UtilsService.js";import{playSound,GAME_SOUNDS}from"../../services/SoundsService.js";import{playHaptic,HapticType}from"../../services/HapticsService.js";import{useChameleonRunStore,useGameOver,useGameWon,useIsPlaying}from"./ChameleonRunStore.js";import{ChameleonRunService}from"./ChameleonRunService.js";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{GameBackground}from"./components/GameBackground.js";import{jsx as _0x5e7bff,jsxs as _0x19eda1}from"react/jsx-runtime";const ChameleonRunComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:W,onReplayGame:t,onShare:n,onShareScreenshot:a,onShowLeaderboard:r,bannerAd:d})=>{const s=_0x4326,S={UFCre:function(e,o,W){return e(o,W)},NzuKi:function(e,o){return e(o)},BeOWJ:s(360,"Cwvf"),dvxcz:s(486,"rg2N"),ZNpkY:s(392,"s@1a"),IsKAG:function(e,o){return e(o)},KDzjc:s(374,"MAeN"),FzNLq:function(e,o,W){return e(o,W)},OqBCT:function(e,o){return e===o},kUFux:s(490,"R@kn"),jAzbm:s(408,"*[T2"),JIXDw:function(e){return e()}},u=_0x4367e7.useRef(e?.[s(456,"i387")]??!0);u[s(419,"V!m3")]=e?.enableSounds??!0;const m=_0x4367e7[s(442,"dlh&")](e?.[s(382,"(I7B")]??!0);m[s(450,"U&su")]=e?.[s(375,"rg2N")]??!0;const i=e?.[s(455,"!Y[Q")]??0,R=_0x4367e7[s(474,"7$Nj")](W);R.current=W;const x=_0x4367e7[s(499,"ogt@")](t);x[s(491,"!173")]=t;const C=S[s(364,"*[T2")](useGameOver),l=useGameWon(),f=useIsPlaying(),p=C||l,k=_0x4367e7[s(482,"H6R]")](!1),_=_0x4367e7[s(373,"!173")](0),b=_0x4367e7[s(385,"M(sD")](0),O=_0x4367e7.useRef(!1),h=_0x4367e7[s(498,"s@1a")](e=>{const o=s;if(R[o(451,"Cwvf")]&&!O[o(355,"![B8")]){const W=useChameleonRunStore[o(417,"f^pG")]().score;R.current({status:e,score:W[o(426,"![B8")]()}),O[o(436,"aAt(")]=!0}},[]),N=_0x4367e7[s(495,"H6R]")](()=>new ChameleonRunService,[]),G=_0x4367e7[s(376,"MAeN")](()=>{const e=s;playSound(GAME_SOUNDS[e(433,"(Id6")][e(492,"M(sD")],u[e(478,"dezR")]),S.UFCre(playHaptic,HapticType[e(471,"X9Q3")],m.current)},[]),Q=_0x4367e7.useCallback(()=>{const e=s;S[e(439,"o4eL")](playSound,GAME_SOUNDS.CHAMELEON_RUN[e(416,"dezR")],u[e(438,"7$Nj")]),playHaptic(HapticType[e(391,"E!HX")],m[e(478,"dezR")])},[]),P=_0x4367e7[s(380,"AN98")](()=>{playHaptic(HapticType[s(406,"AN98")],m.current)},[]),M=_0x4367e7[s(387,"M(sD")](()=>{const e=s;playSound(GAME_SOUNDS[e(458,"dlh&")].GAME_OVER,u[e(438,"7$Nj")]),S[e(413,"IPIC")](playHaptic,HapticType[e(496,"2Mb)")],m[e(449,"2GR%")])},[]),y=_0x4367e7.useCallback(()=>{const e=s,o={pxUft:function(e,o){return S[_0x4326(428,"R@kn")](e,o)},OEhJy:e(368,"H6R]")};if(S[e(377,"2Mb)")]===S[e(389,"U&su")]){const W={_0x72b902:"WlKM",_0x997c76:401,_0xa8bbac:"U&su",_0x2d4791:390,_0x466a37:"0Rd["};return()=>{const t=e;_0x15ab9d.getState()[t(357,"E!HX")]&&!_0x3fdb42[t(352,"*[T2")]&&o[t(363,"cKjz")](_0x362893,o.OEhJy),_0x234baf[t(457,W._0x72b902)]()[t(W._0x997c76,W._0xa8bbac)](),_0x4f56ba.cleanup(),_0x45b3b4.getState()[t(W._0x2d4791,W._0x466a37)]()}}useChameleonRunStore[e(497,"x*da")]()[e(423,"*0l2")](),S[e(388,"WlKM")](playSound,GAME_SOUNDS[e(483,"Kj$v")],u.current),playHaptic(HapticType.SUCCESS,m[e(421,"R@kn")])},[]);_0x4367e7[s(460,"ZkbP")](()=>{N[s(396,"Cwvf")](G,Q,P,M,y)},[N,G,Q,P,M,y]),_0x4367e7[s(351,"ge$m")](()=>{const e=s;return useChameleonRunStore.subscribe(o=>o[e(429,"R@kn")],o=>{k[e(371,"2Mb)")]=o,N.setPlaying(o)})},[N]),_0x4367e7[s(349,"[yoy")](()=>{const e=s;if(C&&!O[e(414,"4Qj(")]&&S[e(411,"uFr]")](h,l?S[e(441,"M(sD")]:e(430,"*[T2")),p){const o=useChameleonRunStore.getState();_[e(361,"s@1a")]=o[e(453,"X9Q3")],b.current=o[e(405,"o4eL")]}!C&&(O.current=!1)},[C,l,p,h]),_0x4367e7.useEffect(()=>{N[s(437,"*0l2")]()},[N]),_0x4367e7[s(394,"(Id6")](()=>{const e=s;if(S[e(459,"ge$m")](e(484,"!173"),S[e(464,"Z$QM")]))return()=>{const o=e;useChameleonRunStore.getState()[o(366,"YuF@")]&&!O.current&&S.IsKAG(h,S[o(398,"X9Q3")]),useChameleonRunStore[o(448,"cKjz")]()[o(432,"2Mb)")](),N[o(407,"*0l2")](),useChameleonRunStore[o(359,"@B9X")]().resetGame()};S[e(365,"2Mb)")](_0x10c11d,_0x38b9db.LIGHT,_0x156b28[e(361,"s@1a")])},[N,h]);const g=_0x4367e7[s(475,"x*da")](()=>{const e=s,o="6|8|5|0|1|3|2|7|4".split("|");let W=0;for(;;){switch(o[W++]){case"0":N[e(473,"0Rd[")]();continue;case"1":useChameleonRunStore.getState()[e(409,"!Y[Q")]();continue;case"2":N.startGame();continue;case"3":N[e(362,"M(sD")](!0);continue;case"4":S[e(378,"cKjz")](playHaptic,HapticType.SUCCESS,m.current);continue;case"5":useChameleonRunStore[e(487,"o4eL")]()[e(404,"x*da")]();continue;case"6":O[e(446,"ge$m")]=!1;continue;case"7":playSound(GAME_SOUNDS.CHAMELEON_RUN[e(358,"X9Q3")],u[e(372,"Kj$v")]);continue;case"8":N[e(402,"rg2N")]();continue}break}},[N]),A=_0x4367e7[s(376,"MAeN")](()=>{const e=s;h(e(477,"e%!Q")),playSound(GAME_SOUNDS[e(420,"MAeN")][e(431,"H6R]")],u[e(435,"ZkbP")]),playHaptic(HapticType.MEDIUM,m[e(393,"pnkg")]),N[e(395,"s@1a")](),useChameleonRunStore.getState()[e(501,"aAt(")](),N[e(473,"0Rd[")]()},[N,h]),v=_0x4367e7[s(412,"pnkg")](()=>{const e=s,o=S[e(370,"S)^b")][e(481,"IPIC")]("|");let W=0;for(;;){switch(o[W++]){case"0":N[e(400,"*[T2")]();continue;case"1":N[e(472,"!Y[Q")]();continue;case"2":x.current?.();continue;case"3":O[e(354,"e%!Q")]=!1;continue;case"4":useChameleonRunStore[e(479,"95Dz")]().resetGame();continue}break}},[N]),H={..._0x4367e7[s(494,"0Rd[")](()=>({isPlaying:!p&&f,gameOver:C,onStartGame:g,onStopGame:A,onShare:n,onShowLeaderboard:r,startButtonSubtext:s(356,"(I7B")}),[p,f,C,g,A,n,r])},I={..._0x4367e7[s(454,"(I7B")](()=>{const e=s,o=useChameleonRunStore[e(467,"ZkbP")](),W=C?o[e(369,"cKjz")]:0,t=C?o[e(383,"dezR")]:0,n={};return n[e(452,"2Mb)")]=C,n[e(500,"@B9X")]=W,n.onPlayAgain=v,n[e(461,"V!m3")]=e(476,"MAeN"),n[e(422,"![B8")]=l?e(445,"[yoy"):e(462,"(I7B"),n[e(488,"dlh&")]=l?e(440,"aAt(")+t+e(410,"Kj$v")+(1===t?"":"s")+"!":e(465,"o4eL")+t+" star"+(1===t?"":"s")+"!",n},[C,l,v])};I[s(466,"!173")]=a,I[s(434,"o4eL")]=d;const U={};return U[s(463,"dlh&")]=GAME_IDS.CHAMELEON_RUN,U[s(415,"S)^b")]=e||DEFAULT_GAME_SETTINGS,U[s(493,"V!m3")]=o,_0x5e7bff(GestureHandlerRootView,{style:styles[s(384,"dezR")],children:_0x19eda1(GameBackground,{offset:i,children:[_0x5e7bff(GameArea,{gameService:N,offset:i}),_0x5e7bff(ScoreBoard,{offset:i}),_0x5e7bff(GameControlButton,H),S[s(403,"Kj$v")](_0x5e7bff,GameOverModal,I),_0x5e7bff(GameSettingsModal,U)]})})},_0x27f8ee={};_0x27f8ee[_0x401649(489,"Cwvf")]=1,_0x27f8ee[_0x401649(427,"f^pG")]=BACKGROUND_COLOR;const _0x6b0718={};_0x6b0718.container=_0x27f8ee;const styles=StyleSheet[_0x401649(367,"aAt(")](_0x6b0718);export const ChameleonRun=ChameleonRunComponent;ChameleonRun[_0x401649(350,"rg2N")]=_0x401649(379,"*[T2");
|
|
1
|
+
"use strict";import{useMemo}from"react";import{HapticType}from"../../services/HapticsService.js";import{GAME_SOUNDS}from"../../services/SoundsService.js";import{GAME_IDS}from"../../services/UtilsService.js";import{engineGame,EngineGameScreen}from"../shared/EngineGameScreen.js";import{livesColumn,scoreColumn,textColumn}from"../shared/EngineHud.js";import{useEngineGame}from"../shared/useEngineGame.js";import{useLiveState}from"../shared/useLiveState.js";import{backgroundFor,lightFor}from"./ChameleonRunBackdrop.js";import{MAX_LIVES,RESULTS_DELAY_LOSE,RESULTS_DELAY_WIN,TRACK_LENGTH}from"./ChameleonRunConstants.js";import{changeColor,createGame,dispose,INITIAL_HUD,reset,setActive,setLayout,setTheme,start,steer,tick}from"./ChameleonRunGame.js";import{jsx as _0x559aae}from"react/jsx-runtime";const SOUNDS=GAME_SOUNDS.CHAMELEON_RUN,FEEDBACK={jump:{sound:SOUNDS.JUMP,haptic:HapticType.LIGHT},land:{sound:SOUNDS.LAND,haptic:HapticType.LIGHT},swap:{sound:SOUNDS.SWAP,haptic:HapticType.LIGHT},star:{sound:SOUNDS.STAR,haptic:HapticType.SUCCESS},hurt:{sound:SOUNDS.HURT,haptic:HapticType.HEAVY},fall:{sound:SOUNDS.GAME_OVER,haptic:HapticType.ERROR},win:{sound:SOUNDS.WIN,haptic:HapticType.SUCCESS}};export const ChameleonRun=engineGame(GAME_IDS.CHAMELEON_RUN,e=>{const[t,s]=useLiveState(0),[o,r]=useLiveState(0),[a,i]=useLiveState(0),[n,S]=useLiveState(MAX_LIVES),[m,u]=useLiveState(INITIAL_HUD,0),{game:p,theme:E,status:T,screen:L,gameOver:A}=useEngineGame(e,{gameId:GAME_IDS.CHAMELEON_RUN,create:createGame,start:start,reset:reset,dispose:dispose,tick:tick,setTheme:setTheme,setActive:setActive,resize:setLayout,tap:changeColor,drag:steer,reportScore:e=>e.run?.score??0,sounds:SOUNDS,onStart:e=>e(SOUNDS.START,HapticType.SUCCESS),onStop:e=>e(void 0,HapticType.MEDIUM),resultsDelay:e=>"win"===e?RESULTS_DELAY_WIN:RESULTS_DELAY_LOSE,wire:(e,t)=>{e.onScore=s,e.onStars=r,e.onDistance=i,e.onLives=S,e.onHud=u,e.onEvent=e=>t(FEEDBACK[e].sound,FEEDBACK[e].haptic)}}),l=useMemo(()=>lightFor(E),[E]),h=useMemo(()=>backgroundFor(E),[E]),C="color"===m.failure?"Match your color to the platform before landing.":"Use the second jump to save a long leap.";return _0x559aae(EngineGameScreen,{...L,light:l,background:h,fog:0,columns:[scoreColumn(t),livesColumn(n,MAX_LIVES),textColumn("TRACK",TRACK_LENGTH-a+" m")],subtext:"Change colors and jump!",gameOver:A({title:"win"===T?"YOU MADE IT!":"OUT OF LIVES!",message:"win"===T?"Finished "+TRACK_LENGTH+" m with "+o+" stars! Best streak \xd7"+(p.run?.bestCombo??0)+".":"Out of lives after "+a+" of "+TRACK_LENGTH+" m. "+C,scoreLabel:"Run Score",score:t,buttonText:"win"===T?"Run Again!":"Try Again!"})})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{cacheGameAsset,createGameMesh as _0x2cc7ee}from"../shared/EngineMeshes.js";const DAY_LIGHT={direction:[-.6,.75,.25],ambient:.48,color:[1.04,1.02,1],shadows:!0,shadowExtent:28},NIGHT_LIGHT={direction:[-.25,.75,.45],ambient:.6,color:[.78,.86,1.05],shadows:!0,shadowExtent:28};export const lightFor=e=>"dark"===e.mode?NIGHT_LIGHT:DAY_LIGHT;export const backgroundFor=e=>"dark"===e.mode?[.055,.085,.13]:[.63,.73,.81];const meshes=new Map,clamp=(e,t=0,o=1)=>Math.max(t,Math.min(o,e)),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],smooth=(e,t,o)=>{const n=clamp((o-e)/(t-e));return n*n*(3-2*n)},normalize=e=>{const t=Math.hypot(...e)||1;return[e[0]/t,e[1]/t,e[2]/t]},hash=(e,t)=>{const o=43758.5453*Math.sin(127.1*e+311.7*t);return o-Math.floor(o)};function noise(e,t){const o=Math.floor(e),n=Math.floor(t),s=smooth(0,1,e-o),r=smooth(0,1,t-n),a=hash(o,n),i=hash(o+1,n),h=hash(o,n+1);return a+(i-a)*s+(h-a)*r+(a-i-h+hash(o+1,n+1))*s*r}const fbm=(e,t)=>.55*noise(e,t)+.28*noise(2.13*e+7,2.13*t)+.12*noise(4.57*e,4.57*t+11)+.05*noise(9.1*e,9.1*t);function heightAt(e,t){const o=-t,n=12*Math.sin(.014*o)+7*Math.sin(.027*o+1),s=1-Math.exp(-((Math.abs(e-n)/(48+.14*o))**1.8)),r=19*(fbm(.014*e+9,.011*t)-.5);return s*(28+(1-Math.abs(2*noise(.018*(e+r),.014*t+13)-1))**3*88+12*(1-Math.abs(2*noise(.047*e+5,.033*t)-1)))-44+smooth(210,405,o)*(20+46*fbm(.022*e+30,.017*t))+(fbm(.11*e,.09*t)-.5)*s*5}function surface(e,t,o,n,s){const r=lightFor(o),a=normalize(r.direction),i=r.ambient*(.6+.4*(.5*a[1]+.5))+1-r.ambient,h=r.color??[1,1,1],m=new Float32Array((e+1)*(t+1)*11),l=new Uint32Array(e*t*6);let d=0,M=0;for(let o=0;o<=e;o++)for(let r=0;r<=t;r++){const{position:u,color:p}=s(r/t,o/e);if(m.set([u[0],u[1],u[2],a[0],a[1],a[2],p[0]/(i*h[0]),p[1]/(i*h[1]),p[2]/(i*h[2]),0,0],d),d+=11,o===e||r===t)continue;const f=o*(t+1)+r,x=f+t+1;l.set(n?[f,f+1,x,f+1,x+1,x]:[f,x,f+1,f+1,x,x+1],M),M+=6}return{vertices:m,indices:l}}function skyMesh(e){return cacheGameAsset("chameleon-run/ChameleonRunBackdrop:skyMesh"+JSON.stringify([e]),()=>skyMeshUncached(e))}function skyMeshUncached(e){const t="sky-"+("dark"===e.mode?"night":"day");let o=meshes.get(t);if(o)return o;const n="dark"===e.mode,s=n?[.12,.17,.24]:[.76,.82,.85],r=n?[.018,.035,.075]:[.25,.43,.65];return o=_0x2cc7ee(surface(48,96,e,!1,(e,t)=>{const o=3.2*(e-.5),a=.95-1.8*t;let i=mix(s,r,smooth(-.04,.82,a));const h=smooth(.08,.23,a)*(1-smooth(.56,.76,a)),m=smooth(.52,.82,fbm(2*o+3*a,33*a));i=mix(i,n?[.22,.28,.36]:[.91,.92,.91],m*h*.5);const l=Math.exp(-((o+.6)**2/.5+(a-.18)**2/.04));n||(i=mix(i,[.93,.87,.73],.12*l));const d=430*Math.cos(a);return{position:[Math.sin(o)*d,430*Math.sin(a),-Math.cos(o)*d],color:i}}),{center:!1,shine:0}),meshes.set(t,o),o}function terrainMesh(e){return cacheGameAsset("chameleon-run/ChameleonRunBackdrop:terrainMesh"+JSON.stringify([e]),()=>terrainMeshUncached(e))}function terrainMeshUncached(e){const t="terrain-"+("dark"===e.mode?"night":"day");let o=meshes.get(t);if(o)return o;const n="dark"===e.mode,s=lightFor(e),r=normalize(s.direction),a=s.color??[1,1,1],i=n?[.1,.145,.21]:[.65,.74,.8];return o=_0x2cc7ee(surface(96,128,e,!0,(e,t)=>{const o=8+t**1.3*400,h=2*(e-.5)*(72+.95*o),m=-o,l=heightAt(h,m),d=.4,M=normalize([-(heightAt(h+d,m)-heightAt(h-d,m))/.8,1,-(heightAt(h,m+d)-heightAt(h,m-d))/.8]),u=1-M[1],p=fbm(.15*h,.13*m),f=.5*Math.sin(2.4*l+8*noise(.09*h,.07*m))+.5;let x=mix([.34,.36,.35],[.56,.53,.47],.7*p+.15*f);const k=(1-smooth(.15,.55,u))*(1-smooth(10,45,l));x=mix(x,mix([.18,.28,.22],[.38,.43,.28],noise(.23*h,.19*m)),.8*k);const b=smooth(34,67,l+12*(p-.5))*(1-smooth(.28,.68,u));x=mix(x,[.84,.86,.86],b);const g=Math.max(0,M[0]*r[0]+M[1]*r[1]+M[2]*r[2]),y=s.ambient*(.6+.4*(.5*M[1]+.5))+(1-s.ambient)*g;let A=[x[0]*y*a[0],x[1]*y*a[1],x[2]*y*a[2]];n&&(A=[.31*A[0],.39*A[1],.55*A[2]]);const w=1-Math.exp(-((o/280)**1.5));return A=mix(A,i,.88*w),{position:[h,l,m],color:A}}),{center:!1,shine:0}),meshes.set(t,o),o}export function spawnBackdrop(e,t){const o=e.spawn({mesh:"none",pickable:!1});return e.spawn({mesh:skyMesh(t),parent:o,position:[0,3.1,5.4],pickable:!1}),e.spawn({mesh:terrainMesh(t),parent:o,pickable:!1}),{root:o,alive:!0}}export function removeBackdrop(e,t){t.alive&&(t.alive=!1,e.despawn(t.root))}export function*warmAssets(e){yield()=>skyMesh(e),yield()=>terrainMesh(e)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export const TRACK_LENGTH=500;export const MAX_LIVES=3;export const HURT_INVULNERABLE=2.2;export const RESULTS_DELAY_LOSE=1700;export const RESULTS_DELAY_WIN=2600;export const POINTS_PER_METRE=1;export const DRAG_THRESHOLD=18;export const STEP_SECONDS=1/60;export const MAX_FRAME_SECONDS=.05;export const SCORE_SYNC=.1;export const STAR_POINTS=250;export const MAX_JUMPS=2;export const JUMP_BUFFER=.12;export const COYOTE_TIME=.1;export const COLOR_GRACE=.12;export const BASE_SPEED=7;export const RUN_COLORS={yellow:"#FFD447",pink:"#F653A6"};export const COLOR_NAMES={yellow:"YELLOW \xb7 STRIPES",pink:"PINK \xb7 DOTS"};export function configFor(t,o){return{width:t,height:o,trackWidth:3.8,lookAhead:85,gravity:19,jump:7.8,doubleJump:7,fallY:-7}}export const COLORS={STONE:"#496578",STONE_DARK:"#304556",NEUTRAL:"#D6E9EC",STAR:"#FFF09A",BELLY:"#FFF5DC",EYE:"#16243A",RIM:"#F5FCFF"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{World}from"@nayan-ui/engine";import{BASE_SPEED,configFor,DRAG_THRESHOLD,MAX_FRAME_SECONDS,MAX_LIVES,SCORE_SYNC,STEP_SECONDS,TRACK_LENGTH}from"./ChameleonRunConstants.js";import{jump,newRun,nextPlatform,platformUnder,step,switchColor}from"./ChameleonRunRules.js";import{buildScene,cheer,clearPlatforms,collectStar,drawScene,frameCamera,hop,land,removeScene,resetChameleon,setStride,stumble,tintChameleon,tumble}from"./ChameleonRunScene.js";export const INITIAL_HUD={color:"yellow",next:"yellow",combo:0,jumps:2,progress:0,failure:null};export function createGame(e){return{world:new World(1100),camera:{eye:[0,3.1,5.4],target:[0,1.1,-6],fov:.85},theme:e,config:null,scene:null,run:null,phase:"ready",running:!1,won:!1,active:!0,pending:0,clock:0,lastScoreSync:-1,syncedScore:-1,shownDistance:0,shownLives:MAX_LIVES,finishSpeed:0,coast:0,dragFired:!1,hudKey:"",cameraLift:0,onPhase:e=>{},onScore:e=>{},onStars:e=>{},onDistance:e=>{},onLives:e=>{},onHud:e=>{},onEvent:e=>{}}}export function setLayout(e,n,o){if(n<=0||o<=0||e.world.isDisposed)return;if(e.scene&&e.config?.width===n&&e.config.height===o)return;const r=configFor(n,o);e.scene&&e.config?.trackWidth!==r.trackWidth&&clearPlatforms(e.world,e.scene),e.config=r,e.run||(e.run=newRun(e.config)),e.scene??=buildScene(e.world,e.theme),frameCamera(e.camera,e.config,e.cameraLift),draw(e),"yellow"!==e.run.color&&tintChameleon(e.world,e.scene,e.run.color,e.run.y),setStride(e.world,e.scene,e.running&&e.run.onGround),syncHud(e)}export function setTheme(e,n){n===e.theme||e.world.isDisposed||(e.theme=n,e.scene&&removeScene(e.world,e.scene),e.scene=null,e.config&&setLayout(e,e.config.width,e.config.height))}function draw(e){e.config&&e.scene&&e.run&&drawScene(e.world,e.config,e.scene,e.run)}function syncHud(e){const n=e.run;if(!n)return;const o=nextPlatform(n)?.color??null,r=Math.min(100,Math.floor(n.distance/TRACK_LENGTH*100)),t={color:n.color,next:o,combo:n.combo,jumps:2-n.jumpsUsed,progress:r,failure:n.failure},s=t.color+"/"+o+"/"+t.combo+"/"+t.jumps+"/"+r+"/"+n.failure;s!==e.hudKey&&(e.hudKey=s,e.onHud(t))}function fresh(e){e.world.cancelTimers(),e.running=!1,e.won=!1,e.pending=0,e.syncedScore=0,e.shownDistance=0,e.shownLives=MAX_LIVES,e.finishSpeed=0,e.coast=0,e.dragFired=!1,e.camera.shake=0,e.cameraLift=0,e.hudKey="",e.config&&(e.run=newRun(e.config),e.scene&&(clearPlatforms(e.world,e.scene),resetChameleon(e.world,e.scene)),frameCamera(e.camera,e.config),draw(e),e.onScore(0),e.onStars(0),e.onDistance(0),e.onLives(MAX_LIVES),syncHud(e))}export function start(e){"ready"===e.phase&&e.config&&e.run&&!e.world.isDisposed&&(e.pending=0,e.dragFired=!1,e.lastScoreSync=e.clock,e.running=!0,e.phase="playing",e.scene&&setStride(e.world,e.scene,!0),e.onPhase("playing"))}export function reset(e){e.world.isDisposed||(fresh(e),e.phase="ready",e.onPhase("ready"))}export function dispose(e){e.scene&&removeScene(e.world,e.scene),e.scene=null,e.world.dispose()}export function setActive(e,n){e.active=n,e.pending=0}function syncScore(e,n=!1){!e.run||e.run.score===e.syncedScore||!n&&e.clock-e.lastScoreSync<SCORE_SYNC||(e.lastScoreSync=e.clock,e.syncedScore=e.run.score,e.onScore(e.run.score))}export function tick(e,n){if(e.world.isDisposed||!e.active||!Number.isFinite(n)||n<=0)return;const o=Math.min(n,MAX_FRAME_SECONDS);if(e.clock+=o,e.running&&e.config&&e.run&&e.scene){for(e.pending=Math.min(e.pending+o,MAX_FRAME_SECONDS);e.running&&e.pending+1e-9>=STEP_SECONDS;)e.pending=Math.max(0,e.pending-STEP_SECONDS),stepOnce(e);draw(e),syncScore(e),syncHud(e);const n=platformUnder(e.run)?.height??e.cameraLift;e.cameraLift+=(n-e.cameraLift)*Math.min(1,2*o),frameCamera(e.camera,e.config,Math.max(-.5,Math.min(1.5,e.cameraLift)))}"over"===e.phase&&e.won&&e.scene&&e.run&&e.finishSpeed>0&&(e.finishSpeed=Math.max(0,e.finishSpeed-22*o),e.coast+=e.finishSpeed*o,e.world.set(e.scene.field,{position:[0,0,e.run.distance+e.coast]})),e.world.update(o)}function stepOnce(e){const{config:n,run:o,scene:r}=e;if(!n||!o||!r)return;const t=step(n,o,STEP_SECONDS),s=Math.min(TRACK_LENGTH,Math.floor(o.distance));s!==e.shownDistance&&(e.shownDistance=s,e.onDistance(s)),o.lives!==e.shownLives&&(e.shownLives=o.lives,e.onLives(o.lives)),t.hurt&&(tintChameleon(e.world,r,o.color,o.y),stumble(e.world,r,o),e.camera.shake=.22,e.onEvent("hurt")),e.world.set(r.field,{position:[0,0,o.distance]}),t.landed&&(land(e.world,r,t.landed),e.onEvent("land")),t.jumped&&(hop(e.world,r,"double"===t.jumped),e.onEvent("jump")),t.star&&(collectStar(e.world,r,t.star,o.distance),e.onStars(o.stars),syncScore(e,!0),e.onEvent("star")),setStride(e.world,r,o.onGround),(t.failure||t.won)&&(e.running=!1,e.won=t.won,e.finishSpeed=t.won?BASE_SPEED:0,syncScore(e,!0),syncHud(e),draw(e),t.won?(cheer(e.world,r,o),e.onEvent("win")):(tumble(e.world,r,o),e.onEvent("fall")),e.phase="over",e.onPhase("over"))}export function tap(e){if(!(e.active&&e.running&&e.config&&e.run&&e.scene))return;const n=jump(e.config,e.run);n&&(setStride(e.world,e.scene,!1),hop(e.world,e.scene,"double"===n),syncHud(e),e.onEvent("jump"))}export function swap(e){e.active&&e.running&&e.run&&e.scene&&(switchColor(e.run),tintChameleon(e.world,e.scene,e.run.color,e.run.y),syncHud(e),e.onEvent("swap"))}export function steer(e,n){"start"!==n.phase?n.cancelled?e.dragFired=!0:"move"!==n.phase||e.dragFired||n.dy>-DRAG_THRESHOLD||Math.abs(n.dy)<=Math.abs(n.dx)||(e.dragFired=!0,tap(e)):e.dragFired=!1}export function changeColor(e){e.dragFired||swap(e)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{ellipsoid,extrude,loft,merge,Path,smoothCurve,tube}from"@nayan-ui/engine";import{cacheGameAsset,createGameMesh as _0x482b57}from"../shared/EngineMeshes.js";const meshes=new Map,cached=(e,t)=>{let o=meshes.get(e);return!o&&(o=cacheGameAsset("chameleon-run/ChameleonRunMeshes:"+e,t),meshes.set(e,o)),o},clamp=(e,t,o)=>Math.max(t,Math.min(o,e)),hash=(e,t,o)=>{const s=43758.5453*Math.sin(127.1*e+311.7*t+74.7*o);return s-Math.floor(s)},normalize=e=>{const t=Math.hypot(...e)||1;return[e[0]/t,e[1]/t,e[2]/t]},cross=(e,t)=>[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]],ball=(e,t,o=[1,1,1],s=20)=>({geometry:ellipsoid(t,o,s),position:e});function skin(e,t=!1){const o=e.vertices;for(let e=0;e<o.length;e+=11){const s=o[e],r=o[e+1],a=o[e+2],h=hash(Math.floor(95*s),Math.floor(95*r),Math.floor(95*a)),i=hash(Math.floor(24*s),Math.floor(24*r),Math.floor(24*a)),n=t?Math.exp(-(Math.sin(12*(s+.08)+2.5*r)**2)/.12):0,l=clamp(.94+.06*i+.025*(h-.5)-.15*n,.75,1);o[e+6]=l,o[e+7]=.985*l,o[e+8]=.94*l,o[e+9]=0,o[e+10]=0}return e}function granules(e,t=4,o=.0065,s=.0012){const r=[],a=[];for(let h=0;h<e.vertices.length;h+=11*t){const t=e.vertices,i=[t[h],t[h+1],t[h+2]],n=normalize([t[h+3],t[h+4],t[h+5]]),l=normalize(cross(n,Math.abs(n[1])>.9?[1,0,0]:[0,1,0])),d=cross(n,l),u=o*(.7+.6*hash(...i)),m=r.length/11,p=[1.025*t[h+6],1.025*t[h+7],1.025*t[h+8]];r.push(i[0]+n[0]*s,i[1]+n[1]*s,i[2]+n[2]*s,...n,...p,t[h+9],t[h+10]);for(let e=0;e<6;e++){const t=e*Math.PI/3,o=[0,1,2].map(e=>(l[e]*Math.cos(t)+d[e]*Math.sin(t))*u),s=normalize([n[0]+o[0]/u*.22,n[1]+o[1]/u*.22,n[2]+o[2]/u*.22]);r.push(i[0]+o[0],i[1]+o[1],i[2]+o[2],...s,.86*p[0],.86*p[1],.86*p[2],0,0),a.push(m,m+1+e,m+1+(e+1)%6)}}return{vertices:Float32Array.from(r),indices:Uint32Array.from(a)}}function alongBody(e){const t=loft(e,{around:36,smoothness:4});for(let e=0;e<t.vertices.length;e+=11){const o=t.vertices[e],s=t.vertices[e+3];t.vertices[e]=t.vertices[e+2],t.vertices[e+2]=-o,t.vertices[e+3]=t.vertices[e+5],t.vertices[e+5]=-s}return skin(t,!0)}function crestTooth(e,t,o){const s=Math.abs(o);return{geometry:loft([{z:-.013,bottom:0,top:.15*s,width:.46*s,square:2},{z:0,bottom:0,top:s,width:.36*s,topWidth:.001,square:2},{z:.013,bottom:0,top:.15*s,width:.46*s,square:2}],{around:10,smoothness:1,color:[.66,.68,.62]}),position:[e,t,0],rotation:o<0?[0,0,1,0]:[0,0,0,1]}}export const bodyMesh=()=>cached("body-realistic",()=>{const e=[{z:-.54,bottom:-.07,top:.08,width:.035,square:2},{z:-.43,bottom:-.17,top:.2,width:.105,square:2},{z:-.22,bottom:-.25,top:.3,width:.165,square:2},{z:.02,bottom:-.24,top:.33,width:.175,square:2},{z:.21,bottom:-.18,top:.27,width:.14,square:2},{z:.36,bottom:-.1,top:.19,width:.105,square:2},{z:.44,bottom:-.055,top:.15,width:.08,square:2}],t=alongBody(e),o=smoothCurve(e.map(e=>[e.z,e.top])),s=alongBody([{z:.29,bottom:-.02,top:.18,width:.075,square:2.2},{z:.36,bottom:-.065,top:.33,width:.125,topWidth:.035,square:2.2},{z:.44,bottom:-.075,top:.59,width:.14,topWidth:.016,square:2.4},{z:.5,bottom:-.075,top:.65,width:.135,topWidth:.014,square:2.4},{z:.56,bottom:-.07,top:.39,width:.14,topWidth:.055,square:2.2},{z:.66,bottom:-.06,top:.2,width:.125,square:2},{z:.78,bottom:-.03,top:.13,width:.08,square:2},{z:.835,bottom:.005,top:.08,width:.015,square:2}]),r=[{geometry:t},{geometry:granules(t,3)},{geometry:s},{geometry:granules(s,3,.003,8e-4)}];for(let e=0;e<17;e++){const t=.044*e-.44,s=o(t)-.014;r.push(crestTooth(t,s,.033+.022*Math.sin(e/16*Math.PI)))}return _0x482b57(merge(r),{center:!1,shine:.14})});export const detailsMesh=()=>cached("details-realistic",()=>{const e=[ball([-.01,-.225,0],[.31,.038,.12],[.58,.59,.45],28),ball([.46,-.06,0],[.15,.035,.075],[.64,.63,.49])];for(const t of[-1,1])e.push({geometry:tube([[.4,-.015,.123*t],[.54,-.016,.14*t],[.69,.002,.113*t],[.815,.026,.045*t]],{radius:.0038,sides:5,smoothness:3,color:[.18,.2,.14]})}),e.push(ball([.758,.098,.074*t],[.012,.008,.006],[.13,.16,.11],12)),e.push({geometry:tube([[-.41,-.045,.108*t],[-.22,-.058,.163*t],[.01,-.045,.177*t],[.19,-.03,.14*t],[.31,.015,.113*t]],{radius:e=>.004+.004*Math.sin(e*Math.PI),sides:5,smoothness:3,color:[.77,.76,.6]})});for(let t=0;t<6;t++)e.push(crestTooth(.35+.047*t,-.062,-.018));return _0x482b57(merge(e),{center:!1,shine:.12})});export const eyeMesh=()=>cached("eye-lid-realistic",()=>{const e=skin(ellipsoid([.086,.086,.074],void 0,32)),t=[];for(let e=0;e<=24;e++){const o=e/24*Math.PI*2;t.push([.027*Math.cos(o),.027*Math.sin(o),.071])}return _0x482b57(merge([{geometry:e},{geometry:granules(e,3,.0024,6e-4)},{geometry:tube(t,{radius:.003,sides:5,smoothness:1,color:[.62,.65,.56]})}]),{center:!1,shine:.15})});export const eyeDetailsMesh=()=>cached("eye-aperture-realistic",()=>_0x482b57(merge([ball([0,0,.074],[.025,.025,.006],[.39,.32,.15],24),ball([.002,0,.08],[.011,.011,.003],[.025,.035,.02],24),ball([.005,.005,.083],[.003,.003,.001],[1.1,1.1,1.05],12)]),{center:!1,shine:.5}));export const tailMesh=()=>cached("tail-realistic",()=>{const e=[[0,0,0],[-.16,-.015,0],[-.29,.03,0]];for(let t=0;t<=48;t++){const o=t/48,s=Math.PI/2+o*Math.PI*2.5,r=.26*(1-.83*o);e.push([Math.cos(s)*r-.42,Math.sin(s)*r-.2,0])}const t=skin(tube(e,{radius:e=>.068*(1-e)**1.15+.008,sides:12,smoothness:2,caps:!0}),!0);return _0x482b57(merge([{geometry:t},{geometry:granules(t,10,.0025,7e-4)}]),{center:!1,shine:.13})});export const LIMBS=[{x:.28,y:-.1,side:1,hind:!1},{x:.28,y:-.1,side:-1,hind:!1},{x:-.3,y:-.09,side:1,hind:!0},{x:-.3,y:-.09,side:-1,hind:!0}];export const legMesh=(e,t=!1)=>cached("leg-realistic-"+e+"-"+t,()=>{const o=[t?.12:-.1,-.16,.16*e],s=[t?-.065:.07,-.36,.14*e],r=skin(tube([[0,0,0],o,s],{radius:e=>.054-.03*e,sides:12,smoothness:5,caps:!0}),!1),a=[{geometry:r},{geometry:granules(r,5,.0025,7e-4)},ball(o,[.041,.046,.043],[.84,.85,.78]),ball([s[0],-.374,s[2]],[.052,.023,.041],[.87,.88,.8])];for(const o of[-1,1]){const r=o===e!==t?2:3;for(let e=0;e<r;e++){const t=.019*(e-(r-1)/2),h=[s[0]+.047+t,-.385,s[2]+.048*o];a.push({geometry:tube([[s[0],-.37,s[2]],[s[0]+.025+t,-.372,s[2]+.035*o],h],{radius:e=>.013-.006*e,sides:6,smoothness:2,caps:!0,color:[.85,.86,.77]})}),a.push({geometry:tube([h,[h[0]+.016,-.399,h[2]-.008*o]],{radius:e=>.006*(1-e)+.001,sides:5,smoothness:1,color:[.3,.27,.19]})})}}return _0x482b57(merge(a),{center:!1,shine:.12})});export const starMesh=()=>cached("star",()=>_0x482b57(extrude((new Path).addStar(0,0,.5,.23),{depth:.18}),{fit:1,shine:.85}));export function*warmAssets(){yield bodyMesh,yield detailsMesh,yield eyeMesh,yield eyeDetailsMesh,yield tailMesh,yield starMesh;for(const e of[-1,1])for(const t of[!1,!0])yield()=>legMesh(e,t)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{BASE_SPEED,COLOR_GRACE,COYOTE_TIME,HURT_INVULNERABLE,JUMP_BUFFER,MAX_JUMPS,MAX_LIVES,POINTS_PER_METRE,STAR_POINTS,TRACK_LENGTH}from"./ChameleonRunConstants.js";const PHRASES=[[null,"yellow","yellow","pink","pink",null],["yellow","pink","yellow","pink",null,"yellow"],["pink","pink","yellow",null,"pink","yellow"]],noise=e=>{const o=43758.5453*Math.sin(127.1*e+19.7);return o-Math.floor(o)};export function jumpReach(e,o){const t=e.jump*e.jump-2*e.gravity*o;return t<=0?0:BASE_SPEED*(e.jump+Math.sqrt(t))/e.gravity}export function ensureAhead(e,o){let t=o.platforms[o.platforms.length-1];for(;t.end<Math.min(TRACK_LENGTH+18,o.distance+e.lookAhead);){const n=o.seq++,l=Math.min(1,t.end/TRACK_LENGTH),r=n<4?0:(noise(n+4+o.seed)-.5)*(.35+.5*l),a=Math.max(-.45,Math.min(.9,t.height+r)),s=Math.min(1.7+noise(n+1+o.seed)*(.6+.9*l),jumpReach(e,a-t.height)-1.8);let i=t.end+s,u=i+(n<4?11:7.5+4.5*noise(n+2+o.seed)-l),m=PHRASES[(Math.floor(n/6)+(n<4?0:o.seed))%PHRASES.length][n%6]??null;u>=TRACK_LENGTH-20&&(i=Math.min(i,TRACK_LENGTH-20),u=TRACK_LENGTH+18,m=null),o.platforms.push({id:n,start:i,end:u,height:a,color:m,star:n>1&&null!==m,starCollected:!1}),t=o.platforms[o.platforms.length-1]}}export function newRun(e,o=Math.floor(1e9*Math.random())){const t={seed:o,platforms:[{id:0,start:-10,end:12,height:0,color:null,star:!1,starCollected:!1}],seq:1,distance:0,y:0,vy:0,onGround:!0,jumpsUsed:0,currentPlatformId:0,color:"yellow",coyote:COYOTE_TIME,jumpBuffer:0,mismatchTime:0,score:0,stars:0,combo:0,bestCombo:0,lives:MAX_LIVES,invulnerable:0,failure:null,finished:!1};return ensureAhead(e,t),t}export const platformUnder=(e,o=e.distance)=>e.platforms.find(e=>o>=e.start&&o<=e.end)??null;export const nextPlatform=e=>e.platforms.find(o=>o.end>=e.distance&&o.id!==e.currentPlatformId)??null;export function switchColor(e){e.failure||e.finished||(e.color="yellow"===e.color?"pink":"yellow",e.mismatchTime=0)}export function jump(e,o){if(o.failure||o.finished)return null;if(o.jumpsUsed>=MAX_JUMPS)return o.jumpBuffer=JUMP_BUFFER,null;const t=o.onGround||o.coyote>0&&0===o.jumpsUsed;return o.vy=t?e.jump:e.doubleJump,o.jumpsUsed=t?1:MAX_JUMPS,o.onGround=!1,o.coyote=0,o.jumpBuffer=0,o.mismatchTime=0,t?"jump":"double"}export function step(e,o,t){const n={landed:null,star:null,jumped:null,failure:null,hurt:null,won:!1};if(t<=0||o.failure||o.finished)return n;const l=o.distance,r=o.y;o.jumpBuffer=Math.max(0,o.jumpBuffer-t),o.coyote=Math.max(0,o.coyote-t),o.invulnerable=Math.max(0,o.invulnerable-t),o.distance=Math.min(TRACK_LENGTH,o.distance+BASE_SPEED*t);let a=platformUnder(o);if(o.onGround&&!a&&(o.onGround=!1,o.coyote=COYOTE_TIME,o.vy=0),!o.onGround&&(o.vy-=e.gravity*t,o.y+=o.vy*t,o.vy<=0))for(const e of o.platforms){if(r<e.height||o.y>e.height)continue;const t=(r-e.height)/Math.max(1e-6,r-o.y),s=l+(o.distance-l)*t;if(!(s<e.start||s>e.end||o.distance>e.end)){o.y=e.height,o.vy=0,o.onGround=!0,o.coyote=COYOTE_TIME,o.jumpsUsed=0,o.currentPlatformId=e.id,n.landed=e,a=e;break}}o.onGround&&a?.color&&a.color!==o.color&&0===o.invulnerable?o.mismatchTime+=t:o.mismatchTime=0,n.landed&&o.jumpBuffer>0&&(!n.landed.color||n.landed.color===o.color)&&(n.jumped=jump(e,o));for(const e of o.platforms){const t=(e.start+e.end)/2;e.star&&!e.starCollected&&Math.abs(o.distance-t)<.7&&Math.abs(o.y+.5-(e.height+1.05))<.95&&!o.failure&&(e.starCollected=!0,o.stars++,o.combo=Math.min(5,o.combo+1),o.bestCombo=Math.max(o.bestCombo,o.combo),o.score+=STAR_POINTS*o.combo,n.star=e),e.star&&!e.starCollected&&l<=t+.7&&o.distance>t+.7&&(o.combo=0)}const s=o.y<e.fallY?"fall":o.mismatchTime>=COLOR_GRACE?"color":null;for(s&&(0===o.invulnerable&&(o.lives=Math.max(0,o.lives-1),o.combo=0,o.mismatchTime=0,0===o.lives?o.failure=s:(o.invulnerable=HURT_INVULNERABLE,n.hurt=s)),"fall"!==s||o.failure||recover(o)),o.failure?n.failure=o.failure:o.distance>=TRACK_LENGTH&&(o.finished=!0,n.won=!0),o.score+=(Math.floor(o.distance)-Math.floor(l))*POINTS_PER_METRE,ensureAhead(e,o);o.platforms.length>1&&o.platforms[0].end<o.distance-18;)o.platforms.shift();return n}function recover(e){const o=platformUnder(e)??nextPlatform(e);o&&(e.distance=Math.min(TRACK_LENGTH,Math.max(e.distance,o.start+.5)),e.y=o.height,e.vy=0,e.onGround=!0,e.jumpsUsed=0,e.jumpBuffer=0,e.coyote=COYOTE_TIME,e.currentPlatformId=o.id,o.color&&(e.color=o.color))}
|