@nayan-ui/games 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -191
- package/lib/module/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/lib/module/assets/models/explorer/explorer.glb +0 -0
- package/lib/module/assets/models/explorer/params.json +51 -0
- package/lib/module/assets/models/explorer/source.json +222 -0
- package/lib/module/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/lib/module/assets/models/play-with-tua/sources.json +141 -0
- package/lib/module/assets/sfx/balloon_pop.wav +0 -0
- package/lib/module/assets/sfx/blocked.wav +0 -0
- package/lib/module/assets/sfx/boing.wav +0 -0
- package/lib/module/assets/sfx/bonus.wav +0 -0
- package/lib/module/assets/sfx/boom.wav +0 -0
- package/lib/module/assets/sfx/bump.wav +0 -0
- package/lib/module/assets/sfx/cannon.wav +0 -0
- package/lib/module/assets/sfx/capture.wav +0 -0
- package/lib/module/assets/sfx/card_flip.wav +0 -0
- package/lib/module/assets/sfx/card_place.wav +0 -0
- package/lib/module/assets/sfx/catch.wav +0 -0
- package/lib/module/assets/sfx/chime.wav +0 -0
- package/lib/module/assets/sfx/chomp.wav +0 -0
- package/lib/module/assets/sfx/chomp_alt.wav +0 -0
- package/lib/module/assets/sfx/clack.wav +0 -0
- package/lib/module/assets/sfx/clang.wav +0 -0
- package/lib/module/assets/sfx/clash.wav +0 -0
- package/lib/module/assets/sfx/click.wav +0 -0
- package/lib/module/assets/sfx/coin.wav +0 -0
- package/lib/module/assets/sfx/combo.wav +0 -0
- package/lib/module/assets/sfx/crash.wav +0 -0
- package/lib/module/assets/sfx/crunch.wav +0 -0
- package/lib/module/assets/sfx/dance.wav +0 -0
- package/lib/module/assets/sfx/deselect.wav +0 -0
- package/lib/module/assets/sfx/dice_roll.wav +0 -0
- package/lib/module/assets/sfx/die.wav +0 -0
- package/lib/module/assets/sfx/draw.wav +0 -0
- package/lib/module/assets/sfx/drop.wav +0 -0
- package/lib/module/assets/sfx/eat.wav +0 -0
- package/lib/module/assets/sfx/engine.wav +0 -0
- package/lib/module/assets/sfx/error.wav +0 -0
- package/lib/module/assets/sfx/flag.wav +0 -0
- package/lib/module/assets/sfx/flap.wav +0 -0
- package/lib/module/assets/sfx/flip_disc.wav +0 -0
- package/lib/module/assets/sfx/footstep_run.wav +0 -0
- package/lib/module/assets/sfx/footstep_walk.wav +0 -0
- package/lib/module/assets/sfx/game_over.wav +0 -0
- package/lib/module/assets/sfx/gate.wav +0 -0
- package/lib/module/assets/sfx/hit.wav +0 -0
- package/lib/module/assets/sfx/hop.wav +0 -0
- package/lib/module/assets/sfx/hurt.wav +0 -0
- package/lib/module/assets/sfx/invalid.wav +0 -0
- package/lib/module/assets/sfx/jump.wav +0 -0
- package/lib/module/assets/sfx/ladder.wav +0 -0
- package/lib/module/assets/sfx/land.wav +0 -0
- package/lib/module/assets/sfx/laugh.wav +0 -0
- package/lib/module/assets/sfx/lose.wav +0 -0
- package/lib/module/assets/sfx/merge.wav +0 -0
- package/lib/module/assets/sfx/miss.wav +0 -0
- package/lib/module/assets/sfx/nitro.wav +0 -0
- package/lib/module/assets/sfx/pew.wav +0 -0
- package/lib/module/assets/sfx/place.wav +0 -0
- package/lib/module/assets/sfx/pling.wav +0 -0
- package/lib/module/assets/sfx/point.wav +0 -0
- package/lib/module/assets/sfx/pop.wav +0 -0
- package/lib/module/assets/sfx/pop_soft.wav +0 -0
- package/lib/module/assets/sfx/power_up.wav +0 -0
- package/lib/module/assets/sfx/reveal.wav +0 -0
- package/lib/module/assets/sfx/robot.wav +0 -0
- package/lib/module/assets/sfx/rotate.wav +0 -0
- package/lib/module/assets/sfx/run_steps.wav +0 -0
- package/lib/module/assets/sfx/select.wav +0 -0
- package/lib/module/assets/sfx/shuffle.wav +0 -0
- package/lib/module/assets/sfx/six.wav +0 -0
- package/lib/module/assets/sfx/slice.wav +0 -0
- package/lib/module/assets/sfx/slide.wav +0 -0
- package/lib/module/assets/sfx/snake.wav +0 -0
- package/lib/module/assets/sfx/snap.wav +0 -0
- package/lib/module/assets/sfx/splash.wav +0 -0
- package/lib/module/assets/sfx/star.wav +0 -0
- package/lib/module/assets/sfx/start.wav +0 -0
- package/lib/module/assets/sfx/swoosh.wav +0 -0
- package/lib/module/assets/sfx/tap.wav +0 -0
- package/lib/module/assets/sfx/thud.wav +0 -0
- package/lib/module/assets/sfx/thunk.wav +0 -0
- package/lib/module/assets/sfx/tick.wav +0 -0
- package/lib/module/assets/sfx/time_up.wav +0 -0
- package/lib/module/assets/sfx/tock.wav +0 -0
- package/lib/module/assets/sfx/walk_steps.wav +0 -0
- package/lib/module/assets/sfx/warning.wav +0 -0
- package/lib/module/assets/sfx/whack.wav +0 -0
- package/lib/module/assets/sfx/whoosh.wav +0 -0
- package/lib/module/assets/sfx/win.wav +0 -0
- package/lib/module/assets/sfx/zap.wav +0 -0
- package/lib/module/assets/textures/ad_bolt.png +0 -0
- package/lib/module/assets/textures/ad_bubbles.png +0 -0
- package/lib/module/assets/textures/ad_chevrons.png +0 -0
- package/lib/module/assets/textures/asphalt.png +0 -0
- package/lib/module/assets/textures/bark.jpg +0 -0
- package/lib/module/assets/textures/explorer-atlas.png +0 -0
- package/lib/module/assets/textures/facade.png +0 -0
- package/lib/module/assets/textures/grass.png +0 -0
- package/lib/module/assets/textures/leaves.png +0 -0
- package/lib/module/assets/textures/limestone.jpg +0 -0
- package/lib/module/assets/textures/meadow.jpg +0 -0
- package/lib/module/assets/textures/nature-sources.json +87 -0
- package/lib/module/assets/textures/pine.png +0 -0
- package/lib/module/assets/textures/river.jpg +0 -0
- package/lib/module/assets/textures/soft_glow.png +0 -0
- package/lib/module/games/arrows/Arrows.js +1 -1
- package/lib/module/games/arrows/ArrowsConstants.js +1 -1
- package/lib/module/games/arrows/ArrowsGame.js +1 -0
- package/lib/module/games/arrows/ArrowsScene.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterGame.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterPhysics.js +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterScene.js +1 -0
- package/lib/module/games/bike-racing/BikeMeshes.js +1 -0
- package/lib/module/games/bike-racing/BikeRacing.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingConstants.js +1 -1
- package/lib/module/games/bike-racing/BikeRacingGame.js +1 -0
- package/lib/module/games/bike-racing/BikeRacingScene.js +1 -0
- package/lib/module/games/block-blast/BlockBlast.js +1 -1
- package/lib/module/games/block-blast/BlockBlastConstants.js +1 -1
- package/lib/module/games/block-blast/BlockBlastGame.js +1 -0
- package/lib/module/games/block-blast/BlockBlastScene.js +1 -0
- package/lib/module/games/block-breaker/BlockBreaker.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerConstants.js +1 -1
- package/lib/module/games/block-breaker/BlockBreakerGame.js +1 -0
- package/lib/module/games/block-breaker/BlockBreakerScene.js +1 -0
- package/lib/module/games/bluk/Bluk.js +1 -1
- package/lib/module/games/bluk/BlukConstants.js +1 -1
- package/lib/module/games/bluk/BlukGame.js +1 -0
- package/lib/module/games/bluk/BlukRules.js +1 -0
- package/lib/module/games/bluk/BlukScene.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooter.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterConstants.js +1 -1
- package/lib/module/games/bubble-shooter/BubbleShooterGame.js +1 -0
- package/lib/module/games/bubble-shooter/BubbleShooterScene.js +1 -0
- package/lib/module/games/candy-crush/CandyCrush.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -1
- package/lib/module/games/candy-crush/CandyCrushGame.js +1 -0
- package/lib/module/games/candy-crush/CandyCrushScene.js +1 -0
- package/lib/module/games/car-racing/CarMeshes.js +1 -0
- package/lib/module/games/car-racing/CarRacing.js +1 -1
- package/lib/module/games/car-racing/CarRacingConstants.js +1 -1
- package/lib/module/games/car-racing/CarRacingFacade.js +1 -0
- package/lib/module/games/car-racing/CarRacingGame.js +1 -0
- package/lib/module/games/car-racing/CarRacingScene.js +1 -0
- package/lib/module/games/car-racing/CarRacingScenery.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRun.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunBackdrop.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunConstants.js +1 -1
- package/lib/module/games/chameleon-run/ChameleonRunGame.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunMeshes.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunRules.js +1 -0
- package/lib/module/games/chameleon-run/ChameleonRunScene.js +1 -0
- package/lib/module/games/checkers/Checkers.js +1 -1
- package/lib/module/games/checkers/CheckersAI.js +1 -0
- package/lib/module/games/checkers/CheckersConstants.js +1 -1
- package/lib/module/games/checkers/CheckersGame.js +1 -0
- package/lib/module/games/checkers/CheckersRules.js +1 -0
- package/lib/module/games/checkers/CheckersScene.js +1 -0
- package/lib/module/games/color-switch/ColorSwitch.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchConstants.js +1 -1
- package/lib/module/games/color-switch/ColorSwitchGame.js +1 -0
- package/lib/module/games/color-switch/ColorSwitchScene.js +1 -0
- package/lib/module/games/colors-sort/ColorsSort.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -1
- package/lib/module/games/colors-sort/ColorsSortGame.js +1 -0
- package/lib/module/games/colors-sort/ColorsSortScene.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAll.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllConstants.js +1 -1
- package/lib/module/games/connect-em-all/ConnectEmAllGame.js +1 -0
- package/lib/module/games/connect-em-all/ConnectEmAllScene.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoad.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadCamera.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadConstants.js +1 -1
- package/lib/module/games/crossy-road/CrossyRoadGame.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadMeshes.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadPerson.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadRules.js +1 -0
- package/lib/module/games/crossy-road/CrossyRoadScene.js +1 -0
- package/lib/module/games/dino-jump/DinoJump.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -1
- package/lib/module/games/dino-jump/DinoJumpGame.js +1 -0
- package/lib/module/games/dino-jump/DinoJumpScene.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxes.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesConstants.js +1 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesGame.js +1 -0
- package/lib/module/games/dots-and-boxes/DotsAndBoxesScene.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticks.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksConstants.js +1 -1
- package/lib/module/games/falling-sticks/FallingSticksGame.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksRules.js +1 -0
- package/lib/module/games/falling-sticks/FallingSticksScene.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumber.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberConstants.js +1 -1
- package/lib/module/games/find-different-number/FindDifferentNumberGame.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberRules.js +1 -0
- package/lib/module/games/find-different-number/FindDifferentNumberScene.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdGame.js +1 -0
- package/lib/module/games/flappy-bird/FlappyBirdScene.js +1 -0
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -1
- package/lib/module/games/fruit-merger/FruitMergerGame.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerRules.js +1 -0
- package/lib/module/games/fruit-merger/FruitMergerScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaGame.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaScene.js +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaWorld.js +1 -0
- package/lib/module/games/game-2048/Game2048.js +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -1
- package/lib/module/games/game-2048/Game2048Game.js +1 -0
- package/lib/module/games/game-2048/Game2048Rules.js +1 -0
- package/lib/module/games/game-2048/Game2048Scene.js +1 -0
- package/lib/module/games/knife-hit/KnifeHit.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitConstants.js +1 -1
- package/lib/module/games/knife-hit/KnifeHitGame.js +1 -0
- package/lib/module/games/knife-hit/KnifeHitScene.js +1 -0
- package/lib/module/games/ludo-king/LudoKing.js +1 -1
- package/lib/module/games/ludo-king/LudoKingConstants.js +1 -1
- package/lib/module/games/ludo-king/LudoKingGame.js +1 -0
- package/lib/module/games/ludo-king/LudoKingRules.js +1 -0
- package/lib/module/games/ludo-king/LudoKingScene.js +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -1
- package/lib/module/games/maze-runner/MazeRunnerGame.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerRules.js +1 -0
- package/lib/module/games/maze-runner/MazeRunnerScene.js +1 -0
- package/lib/module/games/memory-match/MemoryMatch.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchConstants.js +1 -1
- package/lib/module/games/memory-match/MemoryMatchGame.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchRules.js +1 -0
- package/lib/module/games/memory-match/MemoryMatchScene.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeper.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperConstants.js +1 -1
- package/lib/module/games/mine-sweeper/MineSweeperGame.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperRules.js +1 -0
- package/lib/module/games/mine-sweeper/MineSweeperScene.js +1 -0
- package/lib/module/games/mob-control/MobControl.js +1 -1
- package/lib/module/games/mob-control/MobControlConstants.js +1 -1
- package/lib/module/games/mob-control/MobControlGame.js +1 -0
- package/lib/module/games/mob-control/MobControlMeshes.js +1 -0
- package/lib/module/games/mob-control/MobControlRenderer.js +1 -0
- package/lib/module/games/mob-control/MobControlRules.js +1 -0
- package/lib/module/games/mob-control/MobControlScene.js +1 -0
- package/lib/module/games/number-search/NumberSearch.js +1 -1
- package/lib/module/games/number-search/NumberSearchNumbers.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBolts.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsConstants.js +1 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsGame.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsRules.js +1 -0
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsScene.js +1 -0
- package/lib/module/games/pac-man/PacMan.js +1 -1
- package/lib/module/games/pac-man/PacManConstants.js +1 -1
- package/lib/module/games/pac-man/PacManGame.js +1 -0
- package/lib/module/games/pac-man/PacManRules.js +1 -0
- package/lib/module/games/pac-man/PacManScene.js +1 -0
- package/lib/module/games/paper-io/PaperIo.js +1 -1
- package/lib/module/games/paper-io/PaperIoConstants.js +1 -1
- package/lib/module/games/paper-io/PaperIoGame.js +1 -0
- package/lib/module/games/paper-io/PaperIoMeshes.js +1 -0
- package/lib/module/games/paper-io/PaperIoRules.js +1 -0
- package/lib/module/games/paper-io/PaperIoScene.js +1 -0
- package/lib/module/games/penguin-run/PenguinMeshes.js +1 -0
- package/lib/module/games/penguin-run/PenguinModel.js +1 -0
- package/lib/module/games/penguin-run/PenguinRun.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunConstants.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunGame.js +1 -0
- package/lib/module/games/penguin-run/PenguinRunScene.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircle.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleConstants.js +1 -1
- package/lib/module/games/perfect-circle/PerfectCircleGame.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleRules.js +1 -0
- package/lib/module/games/perfect-circle/PerfectCircleScene.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnect.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectConstants.js +1 -1
- package/lib/module/games/pipe-connect/PipeConnectGame.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectRules.js +1 -0
- package/lib/module/games/pipe-connect/PipeConnectScene.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTua.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaConstants.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaGame.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaModel.js +1 -0
- package/lib/module/games/play-with-tua/PlayWithTuaScene.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetGame.js +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetScene.js +1 -0
- package/lib/module/games/reversi/Reversi.js +1 -1
- package/lib/module/games/reversi/ReversiConstants.js +1 -1
- package/lib/module/games/reversi/ReversiGame.js +1 -0
- package/lib/module/games/reversi/ReversiRules.js +1 -0
- package/lib/module/games/reversi/ReversiScene.js +1 -0
- package/lib/module/games/search-grid/SearchGrid.js +1 -0
- package/lib/module/games/search-grid/SearchGridConstants.js +1 -0
- package/lib/module/games/search-grid/SearchGridGame.js +1 -0
- package/lib/module/games/search-grid/SearchGridScene.js +1 -0
- package/lib/module/games/shared/BackdropCard.js +1 -0
- package/lib/module/games/shared/EngineBackdrop.js +1 -0
- package/lib/module/games/shared/EngineBlasts.js +1 -0
- package/lib/module/games/shared/EngineBlocks.js +1 -0
- package/lib/module/games/shared/EngineControlText.js +1 -0
- package/lib/module/games/shared/EngineDice.js +1 -0
- package/lib/module/games/shared/EngineFootprint.js +1 -0
- package/lib/module/games/shared/EngineFruits.js +1 -0
- package/lib/module/games/shared/EngineGameLoader.js +1 -0
- package/lib/module/games/shared/EngineGameScreen.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.js +1 -0
- package/lib/module/games/shared/EngineGameWidth.web.js +1 -0
- package/lib/module/games/shared/EngineGlyphs.js +1 -0
- package/lib/module/games/shared/EngineHud.js +1 -0
- package/lib/module/games/shared/EngineLoading.js +1 -0
- package/lib/module/games/shared/EngineMeadow.js +1 -0
- package/lib/module/games/shared/EngineMeshCache.js +1 -0
- package/lib/module/games/shared/EngineMeshes.js +1 -0
- package/lib/module/games/shared/EngineRacingChase.js +1 -0
- package/lib/module/games/shared/EngineRacingHandling.js +1 -0
- package/lib/module/games/shared/EngineReadyContext.js +1 -0
- package/lib/module/games/shared/EngineTilt.js +1 -0
- package/lib/module/games/shared/EngineTouchSurface.js +1 -0
- package/lib/module/games/shared/EngineUtils.js +1 -0
- package/lib/module/games/shared/GameActivity.js +1 -0
- package/lib/module/games/shared/GameLoading.js +1 -0
- package/lib/module/games/shared/GameLoadingTransition.js +1 -0
- package/lib/module/games/shared/ProceduralCacheVersion.js +1 -0
- package/lib/module/games/shared/useEngineGame.js +1 -0
- package/lib/module/games/shared/useGameResource.js +1 -0
- package/lib/module/games/shared/useLiveState.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersGame.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersRules.js +1 -0
- package/lib/module/games/sliding-numbers/SlidingNumbersScene.js +1 -0
- package/lib/module/games/snake-3d/Snake3D.js +1 -1
- package/lib/module/games/snake-3d/Snake3DConstants.js +1 -1
- package/lib/module/games/snake-3d/Snake3DGame.js +1 -0
- package/lib/module/games/snake-3d/Snake3DMotion.js +1 -0
- package/lib/module/games/snake-3d/Snake3DRules.js +1 -0
- package/lib/module/games/snake-3d/Snake3DScene.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLadders.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersConstants.js +1 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersGame.js +1 -0
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersScene.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -1
- package/lib/module/games/space-fighter/SpaceFighterGame.js +1 -0
- package/lib/module/games/space-fighter/SpaceFighterScene.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaire.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireConstants.js +1 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireGame.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireRules.js +1 -0
- package/lib/module/games/spider-solitaire/SpiderSolitaireScene.js +1 -0
- package/lib/module/games/stack-tower/StackTower.js +1 -1
- package/lib/module/games/stack-tower/StackTowerConstants.js +1 -1
- package/lib/module/games/stack-tower/StackTowerGame.js +1 -0
- package/lib/module/games/stack-tower/StackTowerScene.js +1 -0
- package/lib/module/games/sudoku/Sudoku.js +1 -1
- package/lib/module/games/sudoku/SudokuConstants.js +1 -1
- package/lib/module/games/sudoku/SudokuGame.js +1 -0
- package/lib/module/games/sudoku/SudokuRules.js +1 -0
- package/lib/module/games/sudoku/SudokuScene.js +1 -0
- package/lib/module/games/tangram/Tangram.js +1 -1
- package/lib/module/games/tangram/TangramConstants.js +1 -1
- package/lib/module/games/tangram/TangramGame.js +1 -0
- package/lib/module/games/tangram/TangramRules.js +1 -0
- package/lib/module/games/tangram/TangramScene.js +1 -0
- package/lib/module/games/tank-1990/Tank1990.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Constants.js +1 -1
- package/lib/module/games/tank-1990/Tank1990Game.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Rules.js +1 -0
- package/lib/module/games/tank-1990/Tank1990Scene.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToe.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeConstants.js +1 -1
- package/lib/module/games/tic-tac-toe/TicTacToeGame.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeRules.js +1 -0
- package/lib/module/games/tic-tac-toe/TicTacToeScene.js +1 -0
- package/lib/module/games/tile-home/TileHome.js +1 -1
- package/lib/module/games/tile-home/TileHomeConstants.js +1 -1
- package/lib/module/games/tile-home/TileHomeGame.js +1 -0
- package/lib/module/games/tile-home/TileHomeScene.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHunt.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntConstants.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntControls.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntGame.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntMeshes.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntModel.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntRules.js +1 -0
- package/lib/module/games/treasure-hunt/TreasureHuntScene.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleGame.js +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleScene.js +1 -0
- package/lib/module/games/word-search/WordSearch.js +1 -1
- package/lib/module/games/word-search/WordSearchWords.js +1 -0
- package/lib/module/helpers/GamePatternData.js +1 -0
- package/lib/module/helpers/GameSettingsModal.js +1 -1
- package/lib/module/helpers/GameTheme.js +1 -0
- package/lib/module/helpers/IconPaths.js +1 -0
- package/lib/module/helpers/index.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/GameAssetLoader.js +1 -0
- package/lib/module/services/GameAssets.js +1 -0
- package/lib/module/services/GameLoaders.js +1 -0
- package/lib/module/services/GamesConstants.js +1 -1
- package/lib/module/services/GamesMetadata.js +1 -1
- package/lib/module/services/GamesService.js +1 -1
- package/lib/module/services/HapticsService.js +1 -1
- package/lib/module/services/ScoringService.js +1 -1
- package/lib/module/services/SfxSources.js +1 -0
- package/lib/module/services/SoundsService.js +1 -1
- package/lib/module/services/ThemeService.js +1 -0
- package/lib/module/services/UtilsService.js +1 -1
- package/lib/module/services/index.js +1 -1
- package/lib/typescript/src/games/arrows/Arrows.d.ts +1 -3
- package/lib/typescript/src/games/arrows/ArrowsConstants.d.ts +48 -32
- package/lib/typescript/src/games/arrows/ArrowsGame.d.ts +60 -0
- package/lib/typescript/src/games/arrows/ArrowsScene.d.ts +67 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +1 -3
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +39 -131
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterGame.d.ts +57 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterPhysics.d.ts +16 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterScene.d.ts +31 -0
- package/lib/typescript/src/games/bike-racing/BikeMeshes.d.ts +14 -0
- package/lib/typescript/src/games/bike-racing/BikeRacing.d.ts +2 -1
- package/lib/typescript/src/games/bike-racing/BikeRacingConstants.d.ts +38 -29
- package/lib/typescript/src/games/bike-racing/BikeRacingGame.d.ts +104 -0
- package/lib/typescript/src/games/bike-racing/BikeRacingScene.d.ts +25 -0
- package/lib/typescript/src/games/block-blast/BlockBlast.d.ts +1 -3
- package/lib/typescript/src/games/block-blast/BlockBlastConstants.d.ts +48 -30
- package/lib/typescript/src/games/block-blast/BlockBlastGame.d.ts +77 -0
- package/lib/typescript/src/games/block-blast/BlockBlastScene.d.ts +36 -0
- package/lib/typescript/src/games/block-breaker/BlockBreaker.d.ts +1 -3
- package/lib/typescript/src/games/block-breaker/BlockBreakerConstants.d.ts +88 -35
- package/lib/typescript/src/games/block-breaker/BlockBreakerGame.d.ts +82 -0
- package/lib/typescript/src/games/block-breaker/BlockBreakerScene.d.ts +48 -0
- package/lib/typescript/src/games/bluk/Bluk.d.ts +1 -3
- package/lib/typescript/src/games/bluk/BlukConstants.d.ts +65 -54
- package/lib/typescript/src/games/bluk/BlukGame.d.ts +65 -0
- package/lib/typescript/src/games/bluk/BlukRules.d.ts +51 -0
- package/lib/typescript/src/games/bluk/BlukScene.d.ts +54 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooter.d.ts +1 -3
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterConstants.d.ts +56 -24
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterGame.d.ts +70 -0
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterScene.d.ts +26 -0
- package/lib/typescript/src/games/candy-crush/CandyCrush.d.ts +1 -3
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +63 -32
- package/lib/typescript/src/games/candy-crush/CandyCrushGame.d.ts +65 -0
- package/lib/typescript/src/games/candy-crush/CandyCrushScene.d.ts +28 -0
- package/lib/typescript/src/games/car-racing/CarMeshes.d.ts +44 -0
- package/lib/typescript/src/games/car-racing/CarRacing.d.ts +2 -1
- package/lib/typescript/src/games/car-racing/CarRacingConstants.d.ts +60 -29
- package/lib/typescript/src/games/car-racing/CarRacingFacade.d.ts +5 -0
- package/lib/typescript/src/games/car-racing/CarRacingGame.d.ts +96 -0
- package/lib/typescript/src/games/car-racing/CarRacingScene.d.ts +97 -0
- package/lib/typescript/src/games/car-racing/CarRacingScenery.d.ts +22 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRun.d.ts +1 -3
- package/lib/typescript/src/games/chameleon-run/ChameleonRunBackdrop.d.ts +14 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunConstants.d.ts +44 -42
- package/lib/typescript/src/games/chameleon-run/ChameleonRunGame.d.ts +60 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunMeshes.d.ts +20 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunRules.d.ts +52 -0
- package/lib/typescript/src/games/chameleon-run/ChameleonRunScene.d.ts +44 -0
- package/lib/typescript/src/games/checkers/Checkers.d.ts +1 -3
- package/lib/typescript/src/games/checkers/CheckersAI.d.ts +11 -0
- package/lib/typescript/src/games/checkers/CheckersConstants.d.ts +32 -72
- package/lib/typescript/src/games/checkers/CheckersGame.d.ts +56 -0
- package/lib/typescript/src/games/checkers/CheckersRules.d.ts +48 -0
- package/lib/typescript/src/games/checkers/CheckersScene.d.ts +41 -0
- package/lib/typescript/src/games/color-switch/ColorSwitch.d.ts +1 -3
- package/lib/typescript/src/games/color-switch/ColorSwitchConstants.d.ts +27 -31
- package/lib/typescript/src/games/color-switch/ColorSwitchGame.d.ts +61 -0
- package/lib/typescript/src/games/color-switch/ColorSwitchScene.d.ts +43 -0
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts +1 -3
- package/lib/typescript/src/games/colors-sort/ColorsSortConstants.d.ts +37 -44
- package/lib/typescript/src/games/colors-sort/ColorsSortGame.d.ts +41 -0
- package/lib/typescript/src/games/colors-sort/ColorsSortScene.d.ts +33 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAll.d.ts +1 -3
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllConstants.d.ts +43 -17
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllGame.d.ts +54 -0
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllScene.d.ts +49 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoad.d.ts +1 -3
- package/lib/typescript/src/games/crossy-road/CrossyRoadCamera.d.ts +14 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadConstants.d.ts +82 -50
- package/lib/typescript/src/games/crossy-road/CrossyRoadGame.d.ts +64 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadMeshes.d.ts +16 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadPerson.d.ts +10 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadRules.d.ts +36 -0
- package/lib/typescript/src/games/crossy-road/CrossyRoadScene.d.ts +38 -0
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts +1 -3
- package/lib/typescript/src/games/dino-jump/DinoJumpConstants.d.ts +48 -72
- package/lib/typescript/src/games/dino-jump/DinoJumpGame.d.ts +60 -0
- package/lib/typescript/src/games/dino-jump/DinoJumpScene.d.ts +35 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxes.d.ts +1 -3
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesConstants.d.ts +31 -36
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesGame.d.ts +44 -0
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesScene.d.ts +31 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticks.d.ts +1 -3
- package/lib/typescript/src/games/falling-sticks/FallingSticksConstants.d.ts +31 -43
- package/lib/typescript/src/games/falling-sticks/FallingSticksGame.d.ts +42 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksRules.d.ts +36 -0
- package/lib/typescript/src/games/falling-sticks/FallingSticksScene.d.ts +26 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumber.d.ts +1 -3
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberConstants.d.ts +33 -29
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberGame.d.ts +43 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberRules.d.ts +8 -0
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberScene.d.ts +31 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts +1 -3
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts +39 -35
- package/lib/typescript/src/games/flappy-bird/FlappyBirdGame.d.ts +66 -0
- package/lib/typescript/src/games/flappy-bird/FlappyBirdScene.d.ts +41 -0
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts +1 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts +71 -44
- package/lib/typescript/src/games/fruit-merger/FruitMergerGame.d.ts +63 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerRules.d.ts +39 -0
- package/lib/typescript/src/games/fruit-merger/FruitMergerScene.d.ts +49 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +1 -3
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +51 -76
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaGame.d.ts +76 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaScene.d.ts +52 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaWorld.d.ts +8 -0
- package/lib/typescript/src/games/game-2048/Game2048.d.ts +1 -3
- package/lib/typescript/src/games/game-2048/Game2048Constants.d.ts +25 -120
- package/lib/typescript/src/games/game-2048/Game2048Game.d.ts +45 -0
- package/lib/typescript/src/games/game-2048/Game2048Rules.d.ts +32 -0
- package/lib/typescript/src/games/game-2048/Game2048Scene.d.ts +34 -0
- package/lib/typescript/src/games/knife-hit/KnifeHit.d.ts +1 -3
- package/lib/typescript/src/games/knife-hit/KnifeHitConstants.d.ts +41 -49
- package/lib/typescript/src/games/knife-hit/KnifeHitGame.d.ts +49 -0
- package/lib/typescript/src/games/knife-hit/KnifeHitScene.d.ts +37 -0
- package/lib/typescript/src/games/ludo-king/LudoKing.d.ts +1 -3
- package/lib/typescript/src/games/ludo-king/LudoKingConstants.d.ts +50 -28
- package/lib/typescript/src/games/ludo-king/LudoKingGame.d.ts +40 -0
- package/lib/typescript/src/games/ludo-king/LudoKingRules.d.ts +42 -0
- package/lib/typescript/src/games/ludo-king/LudoKingScene.d.ts +53 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +1 -3
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +34 -10
- package/lib/typescript/src/games/maze-runner/MazeRunnerGame.d.ts +44 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerRules.d.ts +34 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerScene.d.ts +29 -0
- package/lib/typescript/src/games/memory-match/MemoryMatch.d.ts +1 -3
- package/lib/typescript/src/games/memory-match/MemoryMatchConstants.d.ts +42 -42
- package/lib/typescript/src/games/memory-match/MemoryMatchGame.d.ts +53 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchRules.d.ts +14 -0
- package/lib/typescript/src/games/memory-match/MemoryMatchScene.d.ts +35 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeper.d.ts +1 -3
- package/lib/typescript/src/games/mine-sweeper/MineSweeperConstants.d.ts +43 -82
- package/lib/typescript/src/games/mine-sweeper/MineSweeperGame.d.ts +59 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperRules.d.ts +18 -0
- package/lib/typescript/src/games/mine-sweeper/MineSweeperScene.d.ts +23 -0
- package/lib/typescript/src/games/mob-control/MobControl.d.ts +1 -3
- package/lib/typescript/src/games/mob-control/MobControlConstants.d.ts +99 -85
- package/lib/typescript/src/games/mob-control/MobControlGame.d.ts +45 -0
- package/lib/typescript/src/games/mob-control/MobControlMeshes.d.ts +2 -0
- package/lib/typescript/src/games/mob-control/MobControlRenderer.d.ts +20 -0
- package/lib/typescript/src/games/mob-control/MobControlRules.d.ts +68 -0
- package/lib/typescript/src/games/mob-control/MobControlScene.d.ts +58 -0
- package/lib/typescript/src/games/number-search/NumberSearch.d.ts +1 -3
- package/lib/typescript/src/games/number-search/NumberSearchNumbers.d.ts +1 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBolts.d.ts +1 -3
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsConstants.d.ts +27 -79
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsGame.d.ts +56 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsRules.d.ts +65 -0
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsScene.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacMan.d.ts +1 -3
- package/lib/typescript/src/games/pac-man/PacManConstants.d.ts +66 -106
- package/lib/typescript/src/games/pac-man/PacManGame.d.ts +48 -0
- package/lib/typescript/src/games/pac-man/PacManRules.d.ts +52 -0
- package/lib/typescript/src/games/pac-man/PacManScene.d.ts +44 -0
- package/lib/typescript/src/games/paper-io/PaperIo.d.ts +1 -3
- package/lib/typescript/src/games/paper-io/PaperIoConstants.d.ts +60 -40
- package/lib/typescript/src/games/paper-io/PaperIoGame.d.ts +49 -0
- package/lib/typescript/src/games/paper-io/PaperIoMeshes.d.ts +13 -0
- package/lib/typescript/src/games/paper-io/PaperIoRules.d.ts +71 -0
- package/lib/typescript/src/games/paper-io/PaperIoScene.d.ts +39 -0
- package/lib/typescript/src/games/penguin-run/PenguinMeshes.d.ts +9 -0
- package/lib/typescript/src/games/penguin-run/PenguinModel.d.ts +42 -0
- package/lib/typescript/src/games/penguin-run/PenguinRun.d.ts +1 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunConstants.d.ts +58 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunGame.d.ts +64 -0
- package/lib/typescript/src/games/penguin-run/PenguinRunScene.d.ts +65 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircle.d.ts +1 -3
- package/lib/typescript/src/games/perfect-circle/PerfectCircleConstants.d.ts +23 -45
- package/lib/typescript/src/games/perfect-circle/PerfectCircleGame.d.ts +40 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleRules.d.ts +55 -0
- package/lib/typescript/src/games/perfect-circle/PerfectCircleScene.d.ts +32 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnect.d.ts +1 -3
- package/lib/typescript/src/games/pipe-connect/PipeConnectConstants.d.ts +36 -32
- package/lib/typescript/src/games/pipe-connect/PipeConnectGame.d.ts +40 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectRules.d.ts +16 -0
- package/lib/typescript/src/games/pipe-connect/PipeConnectScene.d.ts +28 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTua.d.ts +2 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaConstants.d.ts +64 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaGame.d.ts +34 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaModel.d.ts +9 -0
- package/lib/typescript/src/games/play-with-tua/PlayWithTuaScene.d.ts +13 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +1 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +25 -36
- package/lib/typescript/src/games/popit-fidget/PopitFidgetGame.d.ts +37 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetScene.d.ts +19 -0
- package/lib/typescript/src/games/reversi/Reversi.d.ts +1 -3
- package/lib/typescript/src/games/reversi/ReversiConstants.d.ts +31 -62
- package/lib/typescript/src/games/reversi/ReversiGame.d.ts +54 -0
- package/lib/typescript/src/games/reversi/ReversiRules.d.ts +22 -0
- package/lib/typescript/src/games/reversi/ReversiScene.d.ts +27 -0
- package/lib/typescript/src/games/search-grid/SearchGrid.d.ts +20 -0
- package/lib/typescript/src/games/search-grid/SearchGridConstants.d.ts +60 -0
- package/lib/typescript/src/games/search-grid/SearchGridGame.d.ts +52 -0
- package/lib/typescript/src/games/search-grid/SearchGridScene.d.ts +43 -0
- package/lib/typescript/src/games/shared/BackdropCard.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineBackdrop.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineBlasts.d.ts +26 -0
- package/lib/typescript/src/games/shared/EngineBlocks.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineControlText.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineDice.d.ts +24 -0
- package/lib/typescript/src/games/shared/EngineFootprint.d.ts +17 -0
- package/lib/typescript/src/games/shared/EngineFruits.d.ts +27 -0
- package/lib/typescript/src/games/shared/EngineGameLoader.d.ts +4 -0
- package/lib/typescript/src/games/shared/EngineGameScreen.d.ts +48 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGameWidth.web.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineGlyphs.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineHud.d.ts +138 -0
- package/lib/typescript/src/games/shared/EngineLoading.d.ts +77 -0
- package/lib/typescript/src/games/shared/EngineMeadow.d.ts +90 -0
- package/lib/typescript/src/games/shared/EngineMeshCache.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineMeshes.d.ts +3 -0
- package/lib/typescript/src/games/shared/EngineRacingChase.d.ts +11 -0
- package/lib/typescript/src/games/shared/EngineRacingHandling.d.ts +15 -0
- package/lib/typescript/src/games/shared/EngineReadyContext.d.ts +2 -0
- package/lib/typescript/src/games/shared/EngineTilt.d.ts +19 -0
- package/lib/typescript/src/games/shared/EngineTouchSurface.d.ts +20 -0
- package/lib/typescript/src/games/shared/EngineUtils.d.ts +18 -0
- package/lib/typescript/src/games/shared/GameActivity.d.ts +3 -0
- package/lib/typescript/src/games/shared/GameLoading.d.ts +14 -0
- package/lib/typescript/src/games/shared/GameLoadingTransition.d.ts +9 -0
- package/lib/typescript/src/games/shared/ProceduralCacheVersion.d.ts +1 -0
- package/lib/typescript/src/games/shared/useEngineGame.d.ts +69 -0
- package/lib/typescript/src/games/shared/useGameResource.d.ts +2 -0
- package/lib/typescript/src/games/shared/useLiveState.d.ts +4 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts +1 -3
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersConstants.d.ts +32 -40
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersGame.d.ts +48 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersRules.d.ts +22 -0
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersScene.d.ts +30 -0
- package/lib/typescript/src/games/snake-3d/Snake3D.d.ts +1 -3
- package/lib/typescript/src/games/snake-3d/Snake3DConstants.d.ts +31 -68
- package/lib/typescript/src/games/snake-3d/Snake3DGame.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DMotion.d.ts +3 -0
- package/lib/typescript/src/games/snake-3d/Snake3DRules.d.ts +42 -0
- package/lib/typescript/src/games/snake-3d/Snake3DScene.d.ts +35 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLadders.d.ts +1 -3
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersConstants.d.ts +58 -50
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersGame.d.ts +45 -0
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersScene.d.ts +50 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +1 -3
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +33 -23
- package/lib/typescript/src/games/space-fighter/SpaceFighterGame.d.ts +58 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterScene.d.ts +51 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaire.d.ts +1 -3
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireConstants.d.ts +52 -35
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireGame.d.ts +67 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireRules.d.ts +39 -0
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireScene.d.ts +60 -0
- package/lib/typescript/src/games/stack-tower/StackTower.d.ts +1 -3
- package/lib/typescript/src/games/stack-tower/StackTowerConstants.d.ts +31 -23
- package/lib/typescript/src/games/stack-tower/StackTowerGame.d.ts +58 -0
- package/lib/typescript/src/games/stack-tower/StackTowerScene.d.ts +27 -0
- package/lib/typescript/src/games/sudoku/Sudoku.d.ts +1 -3
- package/lib/typescript/src/games/sudoku/SudokuConstants.d.ts +50 -55
- package/lib/typescript/src/games/sudoku/SudokuGame.d.ts +56 -0
- package/lib/typescript/src/games/sudoku/SudokuRules.d.ts +23 -0
- package/lib/typescript/src/games/sudoku/SudokuScene.d.ts +44 -0
- package/lib/typescript/src/games/tangram/Tangram.d.ts +1 -3
- package/lib/typescript/src/games/tangram/TangramConstants.d.ts +33 -52
- package/lib/typescript/src/games/tangram/TangramGame.d.ts +68 -0
- package/lib/typescript/src/games/tangram/TangramRules.d.ts +61 -0
- package/lib/typescript/src/games/tangram/TangramScene.d.ts +42 -0
- package/lib/typescript/src/games/tank-1990/Tank1990.d.ts +1 -3
- package/lib/typescript/src/games/tank-1990/Tank1990Constants.d.ts +44 -127
- package/lib/typescript/src/games/tank-1990/Tank1990Game.d.ts +50 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Rules.d.ts +67 -0
- package/lib/typescript/src/games/tank-1990/Tank1990Scene.d.ts +38 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToe.d.ts +1 -3
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeConstants.d.ts +35 -72
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeGame.d.ts +54 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeRules.d.ts +10 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeScene.d.ts +26 -0
- package/lib/typescript/src/games/tile-home/TileHome.d.ts +1 -3
- package/lib/typescript/src/games/tile-home/TileHomeConstants.d.ts +72 -70
- package/lib/typescript/src/games/tile-home/TileHomeGame.d.ts +72 -0
- package/lib/typescript/src/games/tile-home/TileHomeScene.d.ts +28 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHunt.d.ts +3 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntConstants.d.ts +144 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntControls.d.ts +75 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntGame.d.ts +41 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntMeshes.d.ts +26 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntModel.d.ts +57 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntRules.d.ts +198 -0
- package/lib/typescript/src/games/treasure-hunt/TreasureHuntScene.d.ts +40 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +1 -3
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +35 -45
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleGame.d.ts +51 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleScene.d.ts +31 -0
- package/lib/typescript/src/games/word-search/WordSearch.d.ts +1 -3
- package/lib/typescript/src/games/word-search/WordSearchWords.d.ts +1 -0
- package/lib/typescript/src/helpers/GamePatternData.d.ts +46 -0
- package/lib/typescript/src/helpers/GameSettingsModal.d.ts +1 -1
- package/lib/typescript/src/helpers/GameTheme.d.ts +18 -0
- package/lib/typescript/src/helpers/IconPaths.d.ts +4 -0
- package/lib/typescript/src/helpers/index.d.ts +1 -19
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/services/GameAssetLoader.d.ts +32 -0
- package/lib/typescript/src/services/GameAssets.d.ts +11 -0
- package/lib/typescript/src/services/GameLoaders.d.ts +18 -0
- package/lib/typescript/src/services/GamesConstants.d.ts +11 -0
- package/lib/typescript/src/services/GamesMetadata.d.ts +2 -0
- package/lib/typescript/src/services/HapticsService.d.ts +1 -1
- package/lib/typescript/src/services/SfxSources.d.ts +79 -0
- package/lib/typescript/src/services/SoundsService.d.ts +487 -1566
- package/lib/typescript/src/services/ThemeService.d.ts +117 -0
- package/lib/typescript/src/services/UtilsService.d.ts +20 -2
- package/lib/typescript/src/services/index.d.ts +3 -0
- package/lib/web/assets/005ea2045b17-explorer.glb +0 -0
- package/lib/web/assets/01e2f0a0bbf6-hurt.wav +0 -0
- package/lib/web/assets/01fc0ecf658c-explorer-atlas.png +0 -0
- package/lib/web/assets/029329b2c7c0-asphalt.png +0 -0
- package/lib/web/assets/0376bda32be3-robot.wav +0 -0
- package/lib/web/assets/0719fb0bb38e-soft_glow.png +0 -0
- package/lib/web/assets/0b21278bffba-boing.wav +0 -0
- package/lib/web/assets/1333c9d1273c-flip_disc.wav +0 -0
- package/lib/web/assets/15785f62ee5f-time_up.wav +0 -0
- package/lib/web/assets/177f00502e08-bonus.wav +0 -0
- package/lib/web/assets/19e47dcfda1f-pling.wav +0 -0
- package/lib/web/assets/1a677e0f7f6c-laugh.wav +0 -0
- package/lib/web/assets/1ad2914478b1-eat.wav +0 -0
- package/lib/web/assets/1b0d703ddd1a-dance.wav +0 -0
- package/lib/web/assets/1e4330fddd74-chime.wav +0 -0
- package/lib/web/assets/2432a97b0af1-cannon.wav +0 -0
- package/lib/web/assets/2574370d6aa0-blocked.wav +0 -0
- package/lib/web/assets/2699065037ad-select.wav +0 -0
- package/lib/web/assets/28d30f53ad73-ladder.wav +0 -0
- package/lib/web/assets/2c1ec05270b2-point.wav +0 -0
- package/lib/web/assets/2e1dd99a0213-tick.wav +0 -0
- package/lib/web/assets/3084575cecdb-card_flip.wav +0 -0
- package/lib/web/assets/308bc31b6af5-engine.wav +0 -0
- package/lib/web/assets/336d63b739b5-combo.wav +0 -0
- package/lib/web/assets/3a369e2596e4-clash.wav +0 -0
- package/lib/web/assets/3a816e20212f-capture.wav +0 -0
- package/lib/web/assets/40240217810a-nitro.wav +0 -0
- package/lib/web/assets/46edaa54d1ea-crunch.wav +0 -0
- package/lib/web/assets/501994226995-coin.wav +0 -0
- package/lib/web/assets/5525d7f6a4b8-rotate.wav +0 -0
- package/lib/web/assets/5e816e1f0929-dice_roll.wav +0 -0
- package/lib/web/assets/60e2dec3cf41-deselect.wav +0 -0
- package/lib/web/assets/6ab86ea29e5c-six.wav +0 -0
- package/lib/web/assets/6da3b101926d-merge.wav +0 -0
- package/lib/web/assets/6e686dea513c-bark.jpg +0 -0
- package/lib/web/assets/6ff9a6a13714-limestone.jpg +0 -0
- package/lib/web/assets/735c4a1cd22e-invalid.wav +0 -0
- package/lib/web/assets/73f75c35ff5d-snake.wav +0 -0
- package/lib/web/assets/7506e3efe264-catch.wav +0 -0
- package/lib/web/assets/76493a2ada2d-ad_bolt.png +0 -0
- package/lib/web/assets/793abe620201-card_place.wav +0 -0
- package/lib/web/assets/7da09c57f52d-facade.png +0 -0
- package/lib/web/assets/7e1a902176f6-pine.png +0 -0
- package/lib/web/assets/7eb943b85c21-play-with-tua.glb +0 -0
- package/lib/web/assets/837d43c06dba-ad_bubbles.png +0 -0
- package/lib/web/assets/84f1a7dfa368-game_over.wav +0 -0
- package/lib/web/assets/850e26ce3b0a-flap.wav +0 -0
- package/lib/web/assets/854b31683cb2-draw.wav +0 -0
- package/lib/web/assets/8616150393b7-error.wav +0 -0
- package/lib/web/assets/87cc6d503ec6-river.jpg +0 -0
- package/lib/web/assets/88755845922c-hop.wav +0 -0
- package/lib/web/assets/8ec8f469492d-chomp_alt.wav +0 -0
- package/lib/web/assets/8f17f89b138c-pew.wav +0 -0
- package/lib/web/assets/9210a24472d1-place.wav +0 -0
- package/lib/web/assets/930d833ebf89-splash.wav +0 -0
- package/lib/web/assets/970f7c59265d-swoosh.wav +0 -0
- package/lib/web/assets/9900b8d1b6ad-flag.wav +0 -0
- package/lib/web/assets/9ab04403898b-clang.wav +0 -0
- package/lib/web/assets/9d8b97a10d45-drop.wav +0 -0
- package/lib/web/assets/9d9c02ddc7ed-boom.wav +0 -0
- package/lib/web/assets/9e1b5114d56d-pop_soft.wav +0 -0
- package/lib/web/assets/a01f22d6dbb3-thud.wav +0 -0
- package/lib/web/assets/a44a1cf1a1a8-bump.wav +0 -0
- package/lib/web/assets/a76940a48c68-hit.wav +0 -0
- package/lib/web/assets/a98ddb724460-leaves.png +0 -0
- package/lib/web/assets/aa0960e8bee6-footstep_run.wav +0 -0
- package/lib/web/assets/aa570c9d3e15-star.wav +0 -0
- package/lib/web/assets/aacb999f3c49-tock.wav +0 -0
- package/lib/web/assets/aae0c16c5e89-reveal.wav +0 -0
- package/lib/web/assets/ab37cd128509-click.wav +0 -0
- package/lib/web/assets/b0bc66f49005-warning.wav +0 -0
- package/lib/web/assets/b1edd756ac43-zap.wav +0 -0
- package/lib/web/assets/b3894545cf71-slice.wav +0 -0
- package/lib/web/assets/b3c6225d055a-meadow.jpg +0 -0
- package/lib/web/assets/b60ca65cdfcb-gate.wav +0 -0
- package/lib/web/assets/b8900bb2c5c7-win.wav +0 -0
- package/lib/web/assets/baff6feda846-lose.wav +0 -0
- package/lib/web/assets/bed31305d60d-ad_chevrons.png +0 -0
- package/lib/web/assets/c26f4a624e7d-shuffle.wav +0 -0
- package/lib/web/assets/c3a9edfad195-die.wav +0 -0
- package/lib/web/assets/c4aa9d773f2a-footstep_walk.wav +0 -0
- package/lib/web/assets/c5ab3ff0003f-crash.wav +0 -0
- package/lib/web/assets/c5eb07deddd4-start.wav +0 -0
- package/lib/web/assets/c6c58d9ae452-pop.wav +0 -0
- package/lib/web/assets/cea48c3cd9c7-balloon_pop.wav +0 -0
- package/lib/web/assets/d15591767778-tap.wav +0 -0
- package/lib/web/assets/d1781a52234f-slide.wav +0 -0
- package/lib/web/assets/d3bf2d9f793b-snap.wav +0 -0
- package/lib/web/assets/d8f59ebd3537-jump.wav +0 -0
- package/lib/web/assets/dafea2f28854-power_up.wav +0 -0
- package/lib/web/assets/e2e7f5ae2d1b-whoosh.wav +0 -0
- package/lib/web/assets/e2f90a23e1bd-chomp.wav +0 -0
- package/lib/web/assets/e454e56df89a-clack.wav +0 -0
- package/lib/web/assets/e8cbc2b88bc4-Inter-SemiBold.ttf +0 -0
- package/lib/web/assets/ed6496b891fc-land.wav +0 -0
- package/lib/web/assets/f21920200a81-thunk.wav +0 -0
- package/lib/web/assets/f753b43be89d-whack.wav +0 -0
- package/lib/web/assets/f798c4b5cf4d-miss.wav +0 -0
- package/lib/web/assets/fbe299716916-grass.png +0 -0
- package/lib/web/chunk-52ez2s9z.js +15 -0
- package/lib/web/chunk-8675t224.js +1 -0
- package/lib/web/index.js +2 -0
- package/lib/web/package.json +1 -0
- package/lib/web/services.js +2 -0
- package/package.json +94 -73
- package/src/assets/fonts/Inter-SemiBold.ttf +0 -0
- package/src/assets/models/explorer/explorer.glb +0 -0
- package/src/assets/models/explorer/params.json +51 -0
- package/src/assets/models/explorer/source.json +222 -0
- package/src/assets/models/play-with-tua/play-with-tua.glb +0 -0
- package/src/assets/models/play-with-tua/sources.json +141 -0
- package/src/assets/sfx/balloon_pop.wav +0 -0
- package/src/assets/sfx/blocked.wav +0 -0
- package/src/assets/sfx/boing.wav +0 -0
- package/src/assets/sfx/bonus.wav +0 -0
- package/src/assets/sfx/boom.wav +0 -0
- package/src/assets/sfx/bump.wav +0 -0
- package/src/assets/sfx/cannon.wav +0 -0
- package/src/assets/sfx/capture.wav +0 -0
- package/src/assets/sfx/card_flip.wav +0 -0
- package/src/assets/sfx/card_place.wav +0 -0
- package/src/assets/sfx/catch.wav +0 -0
- package/src/assets/sfx/chime.wav +0 -0
- package/src/assets/sfx/chomp.wav +0 -0
- package/src/assets/sfx/chomp_alt.wav +0 -0
- package/src/assets/sfx/clack.wav +0 -0
- package/src/assets/sfx/clang.wav +0 -0
- package/src/assets/sfx/clash.wav +0 -0
- package/src/assets/sfx/click.wav +0 -0
- package/src/assets/sfx/coin.wav +0 -0
- package/src/assets/sfx/combo.wav +0 -0
- package/src/assets/sfx/crash.wav +0 -0
- package/src/assets/sfx/crunch.wav +0 -0
- package/src/assets/sfx/dance.wav +0 -0
- package/src/assets/sfx/deselect.wav +0 -0
- package/src/assets/sfx/dice_roll.wav +0 -0
- package/src/assets/sfx/die.wav +0 -0
- package/src/assets/sfx/draw.wav +0 -0
- package/src/assets/sfx/drop.wav +0 -0
- package/src/assets/sfx/eat.wav +0 -0
- package/src/assets/sfx/engine.wav +0 -0
- package/src/assets/sfx/error.wav +0 -0
- package/src/assets/sfx/flag.wav +0 -0
- package/src/assets/sfx/flap.wav +0 -0
- package/src/assets/sfx/flip_disc.wav +0 -0
- package/src/assets/sfx/footstep_run.wav +0 -0
- package/src/assets/sfx/footstep_walk.wav +0 -0
- package/src/assets/sfx/game_over.wav +0 -0
- package/src/assets/sfx/gate.wav +0 -0
- package/src/assets/sfx/hit.wav +0 -0
- package/src/assets/sfx/hop.wav +0 -0
- package/src/assets/sfx/hurt.wav +0 -0
- package/src/assets/sfx/invalid.wav +0 -0
- package/src/assets/sfx/jump.wav +0 -0
- package/src/assets/sfx/ladder.wav +0 -0
- package/src/assets/sfx/land.wav +0 -0
- package/src/assets/sfx/laugh.wav +0 -0
- package/src/assets/sfx/lose.wav +0 -0
- package/src/assets/sfx/merge.wav +0 -0
- package/src/assets/sfx/miss.wav +0 -0
- package/src/assets/sfx/nitro.wav +0 -0
- package/src/assets/sfx/pew.wav +0 -0
- package/src/assets/sfx/place.wav +0 -0
- package/src/assets/sfx/pling.wav +0 -0
- package/src/assets/sfx/point.wav +0 -0
- package/src/assets/sfx/pop.wav +0 -0
- package/src/assets/sfx/pop_soft.wav +0 -0
- package/src/assets/sfx/power_up.wav +0 -0
- package/src/assets/sfx/reveal.wav +0 -0
- package/src/assets/sfx/robot.wav +0 -0
- package/src/assets/sfx/rotate.wav +0 -0
- package/src/assets/sfx/run_steps.wav +0 -0
- package/src/assets/sfx/select.wav +0 -0
- package/src/assets/sfx/shuffle.wav +0 -0
- package/src/assets/sfx/six.wav +0 -0
- package/src/assets/sfx/slice.wav +0 -0
- package/src/assets/sfx/slide.wav +0 -0
- package/src/assets/sfx/snake.wav +0 -0
- package/src/assets/sfx/snap.wav +0 -0
- package/src/assets/sfx/splash.wav +0 -0
- package/src/assets/sfx/star.wav +0 -0
- package/src/assets/sfx/start.wav +0 -0
- package/src/assets/sfx/swoosh.wav +0 -0
- package/src/assets/sfx/tap.wav +0 -0
- package/src/assets/sfx/thud.wav +0 -0
- package/src/assets/sfx/thunk.wav +0 -0
- package/src/assets/sfx/tick.wav +0 -0
- package/src/assets/sfx/time_up.wav +0 -0
- package/src/assets/sfx/tock.wav +0 -0
- package/src/assets/sfx/walk_steps.wav +0 -0
- package/src/assets/sfx/warning.wav +0 -0
- package/src/assets/sfx/whack.wav +0 -0
- package/src/assets/sfx/whoosh.wav +0 -0
- package/src/assets/sfx/win.wav +0 -0
- package/src/assets/sfx/zap.wav +0 -0
- package/src/assets/textures/ad_bolt.png +0 -0
- package/src/assets/textures/ad_bubbles.png +0 -0
- package/src/assets/textures/ad_chevrons.png +0 -0
- package/src/assets/textures/asphalt.png +0 -0
- package/src/assets/textures/bark.jpg +0 -0
- package/src/assets/textures/explorer-atlas.png +0 -0
- package/src/assets/textures/facade.png +0 -0
- package/src/assets/textures/grass.png +0 -0
- package/src/assets/textures/leaves.png +0 -0
- package/src/assets/textures/limestone.jpg +0 -0
- package/src/assets/textures/meadow.jpg +0 -0
- package/src/assets/textures/nature-sources.json +87 -0
- package/src/assets/textures/pine.png +0 -0
- package/src/assets/textures/river.jpg +0 -0
- package/src/assets/textures/soft_glow.png +0 -0
- package/src/games/arrows/Arrows.tsx +69 -0
- package/src/games/arrows/ArrowsConstants.ts +107 -0
- package/src/games/arrows/ArrowsGame.ts +735 -0
- package/src/games/arrows/ArrowsScene.ts +395 -0
- package/src/games/balloon-blaster/BalloonBlaster.tsx +75 -0
- package/src/games/balloon-blaster/BalloonBlasterConstants.ts +79 -0
- package/src/games/balloon-blaster/BalloonBlasterGame.ts +287 -0
- package/src/games/balloon-blaster/BalloonBlasterPhysics.ts +95 -0
- package/src/games/balloon-blaster/BalloonBlasterScene.ts +225 -0
- package/src/games/bike-racing/BikeMeshes.ts +273 -0
- package/src/games/bike-racing/BikeRacing.tsx +211 -0
- package/src/games/bike-racing/BikeRacingConstants.ts +103 -0
- package/src/games/bike-racing/BikeRacingGame.ts +557 -0
- package/src/games/bike-racing/BikeRacingScene.ts +119 -0
- package/src/games/block-blast/BlockBlast.tsx +73 -0
- package/src/games/block-blast/BlockBlastConstants.ts +179 -0
- package/src/games/block-blast/BlockBlastGame.ts +471 -0
- package/src/games/block-blast/BlockBlastScene.ts +156 -0
- package/src/games/block-breaker/BlockBreaker.tsx +79 -0
- package/src/games/block-breaker/BlockBreakerConstants.ts +139 -0
- package/src/games/block-breaker/BlockBreakerGame.ts +459 -0
- package/src/games/block-breaker/BlockBreakerScene.ts +257 -0
- package/src/games/bluk/Bluk.tsx +82 -0
- package/src/games/bluk/BlukConstants.ts +121 -0
- package/src/games/bluk/BlukGame.ts +323 -0
- package/src/games/bluk/BlukRules.ts +154 -0
- package/src/games/bluk/BlukScene.ts +514 -0
- package/src/games/bubble-shooter/BubbleShooter.tsx +76 -0
- package/src/games/bubble-shooter/BubbleShooterConstants.ts +103 -0
- package/src/games/bubble-shooter/BubbleShooterGame.ts +459 -0
- package/src/games/bubble-shooter/BubbleShooterScene.ts +158 -0
- package/src/games/candy-crush/CandyCrush.tsx +77 -0
- package/src/games/candy-crush/CandyCrushConstants.ts +94 -0
- package/src/games/candy-crush/CandyCrushGame.ts +477 -0
- package/src/games/candy-crush/CandyCrushScene.ts +209 -0
- package/src/games/car-racing/CarMeshes.ts +440 -0
- package/src/games/car-racing/CarRacing.tsx +211 -0
- package/src/games/car-racing/CarRacingConstants.ts +167 -0
- package/src/games/car-racing/CarRacingFacade.ts +40 -0
- package/src/games/car-racing/CarRacingGame.ts +539 -0
- package/src/games/car-racing/CarRacingScene.ts +1026 -0
- package/src/games/car-racing/CarRacingScenery.ts +265 -0
- package/src/games/chameleon-run/ChameleonRun.tsx +96 -0
- package/src/games/chameleon-run/ChameleonRunBackdrop.ts +186 -0
- package/src/games/chameleon-run/ChameleonRunConstants.ts +47 -0
- package/src/games/chameleon-run/ChameleonRunGame.ts +309 -0
- package/src/games/chameleon-run/ChameleonRunMeshes.ts +305 -0
- package/src/games/chameleon-run/ChameleonRunRules.ts +252 -0
- package/src/games/chameleon-run/ChameleonRunScene.ts +310 -0
- package/src/games/checkers/Checkers.tsx +83 -0
- package/src/games/checkers/CheckersAI.ts +255 -0
- package/src/games/checkers/CheckersConstants.ts +68 -0
- package/src/games/checkers/CheckersGame.ts +322 -0
- package/src/games/checkers/CheckersRules.ts +167 -0
- package/src/games/checkers/CheckersScene.ts +308 -0
- package/src/games/color-switch/ColorSwitch.tsx +75 -0
- package/src/games/color-switch/ColorSwitchConstants.ts +61 -0
- package/src/games/color-switch/ColorSwitchGame.ts +329 -0
- package/src/games/color-switch/ColorSwitchScene.ts +220 -0
- package/src/games/colors-sort/ColorsSort.tsx +82 -0
- package/src/games/colors-sort/ColorsSortConstants.ts +119 -0
- package/src/games/colors-sort/ColorsSortGame.ts +246 -0
- package/src/games/colors-sort/ColorsSortScene.ts +315 -0
- package/src/games/connect-em-all/ConnectEmAll.tsx +70 -0
- package/src/games/connect-em-all/ConnectEmAllConstants.ts +77 -0
- package/src/games/connect-em-all/ConnectEmAllGame.ts +401 -0
- package/src/games/connect-em-all/ConnectEmAllScene.ts +235 -0
- package/src/games/crossy-road/CrossyRoad.tsx +74 -0
- package/src/games/crossy-road/CrossyRoadCamera.ts +59 -0
- package/src/games/crossy-road/CrossyRoadConstants.ts +132 -0
- package/src/games/crossy-road/CrossyRoadGame.ts +293 -0
- package/src/games/crossy-road/CrossyRoadMeshes.ts +195 -0
- package/src/games/crossy-road/CrossyRoadPerson.ts +198 -0
- package/src/games/crossy-road/CrossyRoadRules.ts +99 -0
- package/src/games/crossy-road/CrossyRoadScene.ts +355 -0
- package/src/games/dino-jump/DinoJump.tsx +77 -0
- package/src/games/dino-jump/DinoJumpConstants.ts +80 -0
- package/src/games/dino-jump/DinoJumpGame.ts +344 -0
- package/src/games/dino-jump/DinoJumpScene.ts +686 -0
- package/src/games/dots-and-boxes/DotsAndBoxes.tsx +83 -0
- package/src/games/dots-and-boxes/DotsAndBoxesConstants.ts +77 -0
- package/src/games/dots-and-boxes/DotsAndBoxesGame.ts +271 -0
- package/src/games/dots-and-boxes/DotsAndBoxesScene.ts +249 -0
- package/src/games/falling-sticks/FallingSticks.tsx +72 -0
- package/src/games/falling-sticks/FallingSticksConstants.ts +62 -0
- package/src/games/falling-sticks/FallingSticksGame.ts +220 -0
- package/src/games/falling-sticks/FallingSticksRules.ts +145 -0
- package/src/games/falling-sticks/FallingSticksScene.ts +245 -0
- package/src/games/find-different-number/FindDifferentNumber.tsx +74 -0
- package/src/games/find-different-number/FindDifferentNumberConstants.ts +74 -0
- package/src/games/find-different-number/FindDifferentNumberGame.ts +174 -0
- package/src/games/find-different-number/FindDifferentNumberRules.ts +43 -0
- package/src/games/find-different-number/FindDifferentNumberScene.ts +193 -0
- package/src/games/flappy-bird/FlappyBird.tsx +73 -0
- package/src/games/flappy-bird/FlappyBirdConstants.ts +95 -0
- package/src/games/flappy-bird/FlappyBirdGame.ts +375 -0
- package/src/games/flappy-bird/FlappyBirdScene.ts +630 -0
- package/src/games/fruit-merger/FruitMerger.tsx +73 -0
- package/src/games/fruit-merger/FruitMergerConstants.ts +102 -0
- package/src/games/fruit-merger/FruitMergerGame.ts +285 -0
- package/src/games/fruit-merger/FruitMergerRules.ts +286 -0
- package/src/games/fruit-merger/FruitMergerScene.ts +498 -0
- package/src/games/fruit-ninja/FruitNinja.tsx +129 -0
- package/src/games/fruit-ninja/FruitNinjaConstants.ts +107 -0
- package/src/games/fruit-ninja/FruitNinjaGame.ts +391 -0
- package/src/games/fruit-ninja/FruitNinjaScene.ts +319 -0
- package/src/games/fruit-ninja/FruitNinjaWorld.ts +17 -0
- package/src/games/game-2048/Game2048.tsx +84 -0
- package/src/games/game-2048/Game2048Constants.ts +68 -0
- package/src/games/game-2048/Game2048Game.ts +181 -0
- package/src/games/game-2048/Game2048Rules.ts +101 -0
- package/src/games/game-2048/Game2048Scene.ts +206 -0
- package/src/games/knife-hit/KnifeHit.tsx +78 -0
- package/src/games/knife-hit/KnifeHitConstants.ts +89 -0
- package/src/games/knife-hit/KnifeHitGame.ts +264 -0
- package/src/games/knife-hit/KnifeHitScene.ts +360 -0
- package/src/games/ludo-king/LudoKing.tsx +86 -0
- package/src/games/ludo-king/LudoKingConstants.ts +212 -0
- package/src/games/ludo-king/LudoKingGame.ts +326 -0
- package/src/games/ludo-king/LudoKingRules.ts +143 -0
- package/src/games/ludo-king/LudoKingScene.ts +397 -0
- package/src/games/maze-runner/MazeRunner.tsx +88 -0
- package/src/games/maze-runner/MazeRunnerConstants.ts +65 -0
- package/src/games/maze-runner/MazeRunnerGame.ts +176 -0
- package/src/games/maze-runner/MazeRunnerRules.ts +161 -0
- package/src/games/maze-runner/MazeRunnerScene.ts +245 -0
- package/src/games/memory-match/MemoryMatch.tsx +77 -0
- package/src/games/memory-match/MemoryMatchConstants.ts +105 -0
- package/src/games/memory-match/MemoryMatchGame.ts +222 -0
- package/src/games/memory-match/MemoryMatchRules.ts +38 -0
- package/src/games/memory-match/MemoryMatchScene.ts +268 -0
- package/src/games/mine-sweeper/MineSweeper.tsx +77 -0
- package/src/games/mine-sweeper/MineSweeperConstants.ts +94 -0
- package/src/games/mine-sweeper/MineSweeperGame.ts +234 -0
- package/src/games/mine-sweeper/MineSweeperRules.ts +67 -0
- package/src/games/mine-sweeper/MineSweeperScene.ts +262 -0
- package/src/games/mob-control/MobControl.tsx +73 -0
- package/src/games/mob-control/MobControlConstants.ts +106 -0
- package/src/games/mob-control/MobControlGame.ts +176 -0
- package/src/games/mob-control/MobControlMeshes.ts +85 -0
- package/src/games/mob-control/MobControlRenderer.ts +108 -0
- package/src/games/mob-control/MobControlRules.ts +522 -0
- package/src/games/mob-control/MobControlScene.ts +399 -0
- package/src/games/number-search/NumberSearch.tsx +18 -0
- package/src/games/number-search/NumberSearchNumbers.ts +623 -0
- package/src/games/nuts-and-bolts/NutsAndBolts.tsx +85 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsConstants.ts +75 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsGame.ts +298 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsRules.ts +474 -0
- package/src/games/nuts-and-bolts/NutsAndBoltsScene.ts +498 -0
- package/src/games/pac-man/PacMan.tsx +86 -0
- package/src/games/pac-man/PacManConstants.ts +169 -0
- package/src/games/pac-man/PacManGame.ts +406 -0
- package/src/games/pac-man/PacManRules.ts +255 -0
- package/src/games/pac-man/PacManScene.ts +387 -0
- package/src/games/paper-io/PaperIo.tsx +91 -0
- package/src/games/paper-io/PaperIoConstants.ts +86 -0
- package/src/games/paper-io/PaperIoGame.ts +193 -0
- package/src/games/paper-io/PaperIoMeshes.ts +233 -0
- package/src/games/paper-io/PaperIoRules.ts +315 -0
- package/src/games/paper-io/PaperIoScene.ts +310 -0
- package/src/games/penguin-run/PenguinMeshes.ts +269 -0
- package/src/games/penguin-run/PenguinModel.ts +712 -0
- package/src/games/penguin-run/PenguinRun.tsx +77 -0
- package/src/games/penguin-run/PenguinRunConstants.ts +69 -0
- package/src/games/penguin-run/PenguinRunGame.ts +406 -0
- package/src/games/penguin-run/PenguinRunScene.ts +949 -0
- package/src/games/perfect-circle/PerfectCircle.tsx +74 -0
- package/src/games/perfect-circle/PerfectCircleConstants.ts +52 -0
- package/src/games/perfect-circle/PerfectCircleGame.ts +153 -0
- package/src/games/perfect-circle/PerfectCircleRules.ts +111 -0
- package/src/games/perfect-circle/PerfectCircleScene.ts +176 -0
- package/src/games/pipe-connect/PipeConnect.tsx +69 -0
- package/src/games/pipe-connect/PipeConnectConstants.ts +101 -0
- package/src/games/pipe-connect/PipeConnectGame.ts +179 -0
- package/src/games/pipe-connect/PipeConnectRules.ts +326 -0
- package/src/games/pipe-connect/PipeConnectScene.ts +271 -0
- package/src/games/play-with-tua/PlayWithTua.tsx +123 -0
- package/src/games/play-with-tua/PlayWithTuaConstants.ts +70 -0
- package/src/games/play-with-tua/PlayWithTuaGame.ts +167 -0
- package/src/games/play-with-tua/PlayWithTuaModel.ts +42 -0
- package/src/games/play-with-tua/PlayWithTuaScene.ts +36 -0
- package/src/games/popit-fidget/PopitFidget.tsx +72 -0
- package/src/games/popit-fidget/PopitFidgetConstants.ts +71 -0
- package/src/games/popit-fidget/PopitFidgetGame.ts +148 -0
- package/src/games/popit-fidget/PopitFidgetScene.ts +242 -0
- package/src/games/reversi/Reversi.tsx +94 -0
- package/src/games/reversi/ReversiConstants.ts +67 -0
- package/src/games/reversi/ReversiGame.ts +266 -0
- package/src/games/reversi/ReversiRules.ts +176 -0
- package/src/games/reversi/ReversiScene.ts +240 -0
- package/src/games/search-grid/SearchGrid.tsx +92 -0
- package/src/games/search-grid/SearchGridConstants.ts +178 -0
- package/src/games/search-grid/SearchGridGame.ts +209 -0
- package/src/games/search-grid/SearchGridScene.ts +301 -0
- package/src/games/shared/BackdropCard.tsx +54 -0
- package/src/games/shared/EngineBackdrop.ts +300 -0
- package/src/games/shared/EngineBlasts.ts +136 -0
- package/src/games/shared/EngineBlocks.ts +91 -0
- package/src/games/shared/EngineControlText.ts +17 -0
- package/src/games/shared/EngineDice.ts +250 -0
- package/src/games/shared/EngineFootprint.ts +35 -0
- package/src/games/shared/EngineFruits.ts +1435 -0
- package/src/games/shared/EngineGameLoader.tsx +88 -0
- package/src/games/shared/EngineGameScreen.tsx +325 -0
- package/src/games/shared/EngineGameWidth.ts +3 -0
- package/src/games/shared/EngineGameWidth.web.ts +3 -0
- package/src/games/shared/EngineGlyphs.ts +178 -0
- package/src/games/shared/EngineHud.ts +815 -0
- package/src/games/shared/EngineLoading.ts +477 -0
- package/src/games/shared/EngineMeadow.ts +725 -0
- package/src/games/shared/EngineMeshCache.ts +15 -0
- package/src/games/shared/EngineMeshes.ts +10 -0
- package/src/games/shared/EngineRacingChase.ts +21 -0
- package/src/games/shared/EngineRacingHandling.ts +48 -0
- package/src/games/shared/EngineReadyContext.ts +4 -0
- package/src/games/shared/EngineTilt.ts +44 -0
- package/src/games/shared/EngineTouchSurface.tsx +103 -0
- package/src/games/shared/EngineUtils.ts +52 -0
- package/src/games/shared/GameActivity.ts +13 -0
- package/src/games/shared/GameLoading.tsx +202 -0
- package/src/games/shared/GameLoadingTransition.tsx +61 -0
- package/src/games/shared/ProceduralCacheVersion.ts +2 -0
- package/src/games/shared/useEngineGame.ts +240 -0
- package/src/games/shared/useGameResource.ts +21 -0
- package/src/games/shared/useLiveState.ts +58 -0
- package/src/games/sliding-numbers/SlidingNumbers.tsx +71 -0
- package/src/games/sliding-numbers/SlidingNumbersConstants.ts +65 -0
- package/src/games/sliding-numbers/SlidingNumbersGame.ts +192 -0
- package/src/games/sliding-numbers/SlidingNumbersRules.ts +79 -0
- package/src/games/sliding-numbers/SlidingNumbersScene.ts +193 -0
- package/src/games/snake-3d/Snake3D.tsx +76 -0
- package/src/games/snake-3d/Snake3DConstants.ts +61 -0
- package/src/games/snake-3d/Snake3DGame.ts +192 -0
- package/src/games/snake-3d/Snake3DMotion.ts +22 -0
- package/src/games/snake-3d/Snake3DRules.ts +116 -0
- package/src/games/snake-3d/Snake3DScene.ts +322 -0
- package/src/games/snakes-and-ladders/SnakesAndLadders.tsx +87 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersConstants.ts +136 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersGame.ts +310 -0
- package/src/games/snakes-and-ladders/SnakesAndLaddersScene.ts +515 -0
- package/src/games/space-fighter/SpaceFighter.tsx +74 -0
- package/src/games/space-fighter/SpaceFighterConstants.ts +86 -0
- package/src/games/space-fighter/SpaceFighterGame.ts +292 -0
- package/src/games/space-fighter/SpaceFighterScene.ts +550 -0
- package/src/games/spider-solitaire/SpiderSolitaire.tsx +80 -0
- package/src/games/spider-solitaire/SpiderSolitaireConstants.ts +107 -0
- package/src/games/spider-solitaire/SpiderSolitaireGame.ts +387 -0
- package/src/games/spider-solitaire/SpiderSolitaireRules.ts +123 -0
- package/src/games/spider-solitaire/SpiderSolitaireScene.ts +352 -0
- package/src/games/stack-tower/StackTower.tsx +76 -0
- package/src/games/stack-tower/StackTowerConstants.ts +74 -0
- package/src/games/stack-tower/StackTowerGame.ts +236 -0
- package/src/games/stack-tower/StackTowerScene.ts +186 -0
- package/src/games/sudoku/Sudoku.tsx +73 -0
- package/src/games/sudoku/SudokuConstants.ts +127 -0
- package/src/games/sudoku/SudokuGame.ts +250 -0
- package/src/games/sudoku/SudokuRules.ts +125 -0
- package/src/games/sudoku/SudokuScene.ts +304 -0
- package/src/games/tangram/Tangram.tsx +79 -0
- package/src/games/tangram/TangramConstants.ts +64 -0
- package/src/games/tangram/TangramGame.ts +356 -0
- package/src/games/tangram/TangramRules.ts +409 -0
- package/src/games/tangram/TangramScene.ts +203 -0
- package/src/games/tank-1990/Tank1990.tsx +78 -0
- package/src/games/tank-1990/Tank1990Constants.ts +81 -0
- package/src/games/tank-1990/Tank1990Game.ts +331 -0
- package/src/games/tank-1990/Tank1990Rules.ts +390 -0
- package/src/games/tank-1990/Tank1990Scene.ts +434 -0
- package/src/games/tic-tac-toe/TicTacToe.tsx +98 -0
- package/src/games/tic-tac-toe/TicTacToeConstants.ts +69 -0
- package/src/games/tic-tac-toe/TicTacToeGame.ts +200 -0
- package/src/games/tic-tac-toe/TicTacToeRules.ts +103 -0
- package/src/games/tic-tac-toe/TicTacToeScene.ts +245 -0
- package/src/games/tile-home/TileHome.tsx +92 -0
- package/src/games/tile-home/TileHomeConstants.ts +139 -0
- package/src/games/tile-home/TileHomeGame.ts +435 -0
- package/src/games/tile-home/TileHomeScene.ts +154 -0
- package/src/games/treasure-hunt/TreasureHunt.tsx +206 -0
- package/src/games/treasure-hunt/TreasureHuntConstants.ts +266 -0
- package/src/games/treasure-hunt/TreasureHuntControls.ts +280 -0
- package/src/games/treasure-hunt/TreasureHuntGame.ts +402 -0
- package/src/games/treasure-hunt/TreasureHuntMeshes.ts +422 -0
- package/src/games/treasure-hunt/TreasureHuntModel.ts +506 -0
- package/src/games/treasure-hunt/TreasureHuntRules.ts +1210 -0
- package/src/games/treasure-hunt/TreasureHuntScene.ts +586 -0
- package/src/games/whack-a-mole/WhackAMole.tsx +79 -0
- package/src/games/whack-a-mole/WhackAMoleConstants.ts +94 -0
- package/src/games/whack-a-mole/WhackAMoleGame.ts +233 -0
- package/src/games/whack-a-mole/WhackAMoleScene.ts +349 -0
- package/src/games/word-search/WordSearch.tsx +18 -0
- package/src/games/word-search/WordSearchWords.ts +1642 -0
- package/src/helpers/GamePatternData.ts +120 -0
- package/src/helpers/GameSettingsModal.tsx +384 -0
- package/src/helpers/GameTheme.tsx +37 -0
- package/src/helpers/IconPaths.ts +6 -0
- package/src/helpers/index.ts +2 -0
- package/src/index.tsx +60 -0
- package/src/services/GameAssetLoader.ts +111 -0
- package/src/services/GameAssets.ts +149 -0
- package/src/services/GameLoaders.ts +93 -0
- package/src/services/GamesConstants.ts +193 -0
- package/src/services/GamesMetadata.ts +711 -0
- package/src/services/GamesService.ts +116 -0
- package/src/services/HapticsService.ts +48 -0
- package/src/services/ScoringService.ts +19 -0
- package/src/services/SfxSources.ts +81 -0
- package/src/services/SoundsService.ts +582 -0
- package/src/services/ThemeService.ts +281 -0
- package/src/services/UtilsService.ts +134 -0
- package/src/services/index.ts +6 -0
- package/lib/module/games/arrows/ArrowsService.js +0 -1
- package/lib/module/games/arrows/ArrowsStore.js +0 -1
- package/lib/module/games/arrows/components/ArrowsGrid.js +0 -1
- package/lib/module/games/arrows/components/ScoreBoard.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +0 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +0 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +0 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +0 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingService.js +0 -1
- package/lib/module/games/bike-racing/BikeRacingStore.js +0 -1
- package/lib/module/games/bike-racing/components/BikeComponent.js +0 -1
- package/lib/module/games/bike-racing/components/GameBackground.js +0 -1
- package/lib/module/games/bike-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-blast/BlockBlastService.js +0 -1
- package/lib/module/games/block-blast/BlockBlastStore.js +0 -1
- package/lib/module/games/block-blast/components/BlockPieceComponent.js +0 -1
- package/lib/module/games/block-blast/components/GameArea.js +0 -1
- package/lib/module/games/block-blast/components/GridComponent.js +0 -1
- package/lib/module/games/block-blast/components/ScoreBoard.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerService.js +0 -1
- package/lib/module/games/block-breaker/BlockBreakerStore.js +0 -1
- package/lib/module/games/block-breaker/components/BlastAnimation.js +0 -1
- package/lib/module/games/block-breaker/components/GameArea.js +0 -1
- package/lib/module/games/block-breaker/components/ScoreBoard.js +0 -1
- package/lib/module/games/bluk/BlukService.js +0 -1
- package/lib/module/games/bluk/BlukStore.js +0 -1
- package/lib/module/games/bluk/components/GameArea.js +0 -1
- package/lib/module/games/bluk/components/GameBackground.js +0 -1
- package/lib/module/games/bluk/components/ScoreBoard.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterService.js +0 -1
- package/lib/module/games/bubble-shooter/BubbleShooterStore.js +0 -1
- package/lib/module/games/bubble-shooter/components/GameArea.js +0 -1
- package/lib/module/games/bubble-shooter/components/ScoreBoard.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +0 -1
- package/lib/module/games/candy-crush/CandyCrushStore.js +0 -1
- package/lib/module/games/candy-crush/components/CandyItem.js +0 -1
- package/lib/module/games/candy-crush/components/GameGrid.js +0 -1
- package/lib/module/games/candy-crush/components/ScoreBoard.js +0 -1
- package/lib/module/games/car-racing/CarRacingService.js +0 -1
- package/lib/module/games/car-racing/CarRacingStore.js +0 -1
- package/lib/module/games/car-racing/components/CarComponent.js +0 -1
- package/lib/module/games/car-racing/components/GameBackground.js +0 -1
- package/lib/module/games/car-racing/components/ScoreBoard.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunService.js +0 -1
- package/lib/module/games/chameleon-run/ChameleonRunStore.js +0 -1
- package/lib/module/games/chameleon-run/components/GameArea.js +0 -1
- package/lib/module/games/chameleon-run/components/GameBackground.js +0 -1
- package/lib/module/games/chameleon-run/components/ScoreBoard.js +0 -1
- package/lib/module/games/checkers/CheckersService.js +0 -1
- package/lib/module/games/checkers/CheckersStore.js +0 -1
- package/lib/module/games/checkers/components/GameBoard.js +0 -1
- package/lib/module/games/checkers/components/ScoreBoard.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchService.js +0 -1
- package/lib/module/games/color-switch/ColorSwitchStore.js +0 -1
- package/lib/module/games/color-switch/components/GameArea.js +0 -1
- package/lib/module/games/color-switch/components/ScoreBoard.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +0 -1
- package/lib/module/games/colors-sort/ColorsSortStore.js +0 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +0 -1
- package/lib/module/games/colors-sort/components/ScoreBoard.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllService.js +0 -1
- package/lib/module/games/connect-em-all/ConnectEmAllStore.js +0 -1
- package/lib/module/games/connect-em-all/components/GameBoard.js +0 -1
- package/lib/module/games/connect-em-all/components/ScoreBoard.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadService.js +0 -1
- package/lib/module/games/crossy-road/CrossyRoadStore.js +0 -1
- package/lib/module/games/crossy-road/components/GameArea.js +0 -1
- package/lib/module/games/crossy-road/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +0 -1
- package/lib/module/games/dino-jump/DinoJumpStore.js +0 -1
- package/lib/module/games/dino-jump/components/DinoSprite.js +0 -1
- package/lib/module/games/dino-jump/components/GameArea.js +0 -1
- package/lib/module/games/dino-jump/components/GameBackground.js +0 -1
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +0 -1
- package/lib/module/games/dino-jump/components/ScoreBoard.js +0 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesService.js +0 -1
- package/lib/module/games/dots-and-boxes/DotsAndBoxesStore.js +0 -1
- package/lib/module/games/dots-and-boxes/components/GameBoard.js +0 -1
- package/lib/module/games/dots-and-boxes/components/ScoreBoard.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksService.js +0 -1
- package/lib/module/games/falling-sticks/FallingSticksStore.js +0 -1
- package/lib/module/games/falling-sticks/components/GameArea.js +0 -1
- package/lib/module/games/falling-sticks/components/GameBackground.js +0 -1
- package/lib/module/games/falling-sticks/components/ScoreBoard.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberService.js +0 -1
- package/lib/module/games/find-different-number/FindDifferentNumberStore.js +0 -1
- package/lib/module/games/find-different-number/components/GameGrid.js +0 -1
- package/lib/module/games/find-different-number/components/ScoreBoard.js +0 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +0 -1
- package/lib/module/games/flappy-bird/components/Bird.js +0 -1
- package/lib/module/games/flappy-bird/components/GameArea.js +0 -1
- package/lib/module/games/flappy-bird/components/GameBackground.js +0 -1
- package/lib/module/games/flappy-bird/components/Pipes.js +0 -1
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +0 -1
- package/lib/module/games/fruit-merger/FruitMergerStore.js +0 -1
- package/lib/module/games/fruit-merger/components/FruitItem.js +0 -1
- package/lib/module/games/fruit-merger/components/GameArea.js +0 -1
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +0 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +0 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +0 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +0 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +0 -1
- package/lib/module/games/game-2048/Game2048Service.js +0 -1
- package/lib/module/games/game-2048/Game2048Store.js +0 -1
- package/lib/module/games/game-2048/components/GameGrid.js +0 -1
- package/lib/module/games/game-2048/components/ScoreBoard.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitService.js +0 -1
- package/lib/module/games/knife-hit/KnifeHitStore.js +0 -1
- package/lib/module/games/knife-hit/components/GameArea.js +0 -1
- package/lib/module/games/knife-hit/components/ScoreBoard.js +0 -1
- package/lib/module/games/ludo-king/LudoKingService.js +0 -1
- package/lib/module/games/ludo-king/LudoKingStore.js +0 -1
- package/lib/module/games/ludo-king/components/Dice.js +0 -1
- package/lib/module/games/ludo-king/components/GameBoard.js +0 -1
- package/lib/module/games/ludo-king/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/MazeRunnerStore.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +0 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +0 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +0 -1
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +0 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchService.js +0 -1
- package/lib/module/games/memory-match/MemoryMatchStore.js +0 -1
- package/lib/module/games/memory-match/components/Card.js +0 -1
- package/lib/module/games/memory-match/components/GameBoard.js +0 -1
- package/lib/module/games/memory-match/components/ScoreBoard.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperService.js +0 -1
- package/lib/module/games/mine-sweeper/MineSweeperStore.js +0 -1
- package/lib/module/games/mine-sweeper/components/GameArea.js +0 -1
- package/lib/module/games/mine-sweeper/components/ScoreBoard.js +0 -1
- package/lib/module/games/mob-control/MobControlService.js +0 -1
- package/lib/module/games/mob-control/MobControlStore.js +0 -1
- package/lib/module/games/mob-control/components/GameArea.js +0 -1
- package/lib/module/games/mob-control/components/ScoreBoard.js +0 -1
- package/lib/module/games/number-search/NumberSearchConstants.js +0 -1
- package/lib/module/games/number-search/NumberSearchService.js +0 -1
- package/lib/module/games/number-search/NumberSearchStore.js +0 -1
- package/lib/module/games/number-search/components/GameBoard.js +0 -1
- package/lib/module/games/number-search/components/NumberList.js +0 -1
- package/lib/module/games/number-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsService.js +0 -1
- package/lib/module/games/nuts-and-bolts/NutsAndBoltsStore.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/GameBoard.js +0 -1
- package/lib/module/games/nuts-and-bolts/components/ScoreBoard.js +0 -1
- package/lib/module/games/pac-man/PacManService.js +0 -1
- package/lib/module/games/pac-man/PacManStore.js +0 -1
- package/lib/module/games/pac-man/components/GameCanvas.js +0 -1
- package/lib/module/games/pac-man/components/ScoreBoard.js +0 -1
- package/lib/module/games/paper-io/PaperIoService.js +0 -1
- package/lib/module/games/paper-io/PaperIoStore.js +0 -1
- package/lib/module/games/paper-io/components/GameArea.js +0 -1
- package/lib/module/games/paper-io/components/ScoreBoard.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleService.js +0 -1
- package/lib/module/games/perfect-circle/PerfectCircleStore.js +0 -1
- package/lib/module/games/perfect-circle/components/DrawingCanvas.js +0 -1
- package/lib/module/games/perfect-circle/components/ScoreBoard.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectService.js +0 -1
- package/lib/module/games/pipe-connect/PipeConnectStore.js +0 -1
- package/lib/module/games/pipe-connect/components/GameArea.js +0 -1
- package/lib/module/games/pipe-connect/components/ScoreBoard.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +0 -1
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +0 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +0 -1
- package/lib/module/games/reversi/ReversiStore.js +0 -1
- package/lib/module/games/reversi/components/GameBoard.js +0 -1
- package/lib/module/games/reversi/components/ScoreBoard.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +0 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +0 -1
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +0 -1
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +0 -1
- package/lib/module/games/snake-3d/Snake3DService.js +0 -1
- package/lib/module/games/snake-3d/Snake3DStore.js +0 -1
- package/lib/module/games/snake-3d/components/GameGrid.js +0 -1
- package/lib/module/games/snake-3d/components/ScoreBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersService.js +0 -1
- package/lib/module/games/snakes-and-ladders/SnakesAndLaddersStore.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/Dice.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/GameBoard.js +0 -1
- package/lib/module/games/snakes-and-ladders/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +0 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +0 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +0 -1
- package/lib/module/games/space-fighter/components/GameArea.js +0 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +0 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +0 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +0 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireService.js +0 -1
- package/lib/module/games/spider-solitaire/SpiderSolitaireStore.js +0 -1
- package/lib/module/games/spider-solitaire/components/Card.js +0 -1
- package/lib/module/games/spider-solitaire/components/CardPile.js +0 -1
- package/lib/module/games/spider-solitaire/components/ScoreBoard.js +0 -1
- package/lib/module/games/stack-tower/StackTowerService.js +0 -1
- package/lib/module/games/stack-tower/StackTowerStore.js +0 -1
- package/lib/module/games/stack-tower/components/GameArea.js +0 -1
- package/lib/module/games/stack-tower/components/ScoreBoard.js +0 -1
- package/lib/module/games/sudoku/SudokuService.js +0 -1
- package/lib/module/games/sudoku/SudokuStore.js +0 -1
- package/lib/module/games/sudoku/components/GameArea.js +0 -1
- package/lib/module/games/sudoku/components/ScoreBoard.js +0 -1
- package/lib/module/games/tangram/TangramService.js +0 -1
- package/lib/module/games/tangram/TangramStore.js +0 -1
- package/lib/module/games/tangram/components/GameBoard.js +0 -1
- package/lib/module/games/tangram/components/ScoreBoard.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Service.js +0 -1
- package/lib/module/games/tank-1990/Tank1990Store.js +0 -1
- package/lib/module/games/tank-1990/components/Controls.js +0 -1
- package/lib/module/games/tank-1990/components/GameBoard.js +0 -1
- package/lib/module/games/tank-1990/components/ScoreBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeService.js +0 -1
- package/lib/module/games/tic-tac-toe/TicTacToeStore.js +0 -1
- package/lib/module/games/tic-tac-toe/components/GameBoard.js +0 -1
- package/lib/module/games/tic-tac-toe/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/TileHomeService.js +0 -1
- package/lib/module/games/tile-home/TileHomeStore.js +0 -1
- package/lib/module/games/tile-home/components/AnimatingTile.js +0 -1
- package/lib/module/games/tile-home/components/FlyingTile.js +0 -1
- package/lib/module/games/tile-home/components/GameBoard.js +0 -1
- package/lib/module/games/tile-home/components/ScoreBoard.js +0 -1
- package/lib/module/games/tile-home/components/TileItem.js +0 -1
- package/lib/module/games/tile-home/components/TileSlot.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +0 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameBackground.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameGrid.js +0 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +0 -1
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +0 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/WordSearchConstants.js +0 -1
- package/lib/module/games/word-search/WordSearchService.js +0 -1
- package/lib/module/games/word-search/WordSearchStore.js +0 -1
- package/lib/module/games/word-search/components/GameBoard.js +0 -1
- package/lib/module/games/word-search/components/ScoreBoard.js +0 -1
- package/lib/module/games/word-search/components/WordList.js +0 -1
- package/lib/module/helpers/AnimatedScore.js +0 -1
- package/lib/module/helpers/AnimationFrame.js +0 -1
- package/lib/module/helpers/AnimationTracker.js +0 -1
- package/lib/module/helpers/BlastAnimation.js +0 -1
- package/lib/module/helpers/ErrorHandler.js +0 -1
- package/lib/module/helpers/GameBackgroundPattern.js +0 -1
- package/lib/module/helpers/GameControlButton.js +0 -1
- package/lib/module/helpers/GameOverModal.js +0 -1
- package/lib/module/helpers/GameTimer.js +0 -1
- package/lib/module/helpers/Icons.js +0 -1
- package/lib/module/helpers/ParticleBlast.js +0 -1
- package/lib/module/helpers/ScoreBoardContainer.js +0 -1
- package/lib/module/helpers/assets/apple-fruit.js +0 -1
- package/lib/module/helpers/assets/avocado-item.js +0 -1
- package/lib/module/helpers/assets/banana-fruit.js +0 -1
- package/lib/module/helpers/assets/bomb-item.js +0 -1
- package/lib/module/helpers/assets/broccoli-item.js +0 -1
- package/lib/module/helpers/assets/cherries-fruit.js +0 -1
- package/lib/module/helpers/assets/donut-item.js +0 -1
- package/lib/module/helpers/assets/dragonfruit-item.js +0 -1
- package/lib/module/helpers/assets/fries-item.js +0 -1
- package/lib/module/helpers/assets/fruit-helpers.js +0 -1
- package/lib/module/helpers/assets/grapes-fruit.js +0 -1
- package/lib/module/helpers/assets/icecream-item.js +0 -1
- package/lib/module/helpers/assets/index.js +0 -1
- package/lib/module/helpers/assets/kiwi-fruit.js +0 -1
- package/lib/module/helpers/assets/mango-fruit.js +0 -1
- package/lib/module/helpers/assets/orange-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-fruit.js +0 -1
- package/lib/module/helpers/assets/papaya-full-fruit.js +0 -1
- package/lib/module/helpers/assets/peach-fruit.js +0 -1
- package/lib/module/helpers/assets/pineapple-fruit.js +0 -1
- package/lib/module/helpers/assets/pomegranate-fruit.js +0 -1
- package/lib/module/helpers/assets/pumpkin-fruit.js +0 -1
- package/lib/module/helpers/assets/raspberry-item.js +0 -1
- package/lib/module/helpers/assets/star-item.js +0 -1
- package/lib/module/helpers/assets/strawberry-fruit.js +0 -1
- package/lib/module/helpers/assets/watermelon-fruit.js +0 -1
- package/lib/module/types.d.js +0 -1
- package/lib/typescript/src/games/arrows/ArrowsService.d.ts +0 -6
- package/lib/typescript/src/games/arrows/ArrowsStore.d.ts +0 -51
- package/lib/typescript/src/games/arrows/components/ArrowsGrid.d.ts +0 -13
- package/lib/typescript/src/games/arrows/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -80
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +0 -30
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bike-racing/BikeRacingService.d.ts +0 -44
- package/lib/typescript/src/games/bike-racing/BikeRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/bike-racing/components/BikeComponent.d.ts +0 -12
- package/lib/typescript/src/games/bike-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/bike-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-blast/BlockBlastService.d.ts +0 -16
- package/lib/typescript/src/games/block-blast/BlockBlastStore.d.ts +0 -70
- package/lib/typescript/src/games/block-blast/components/BlockPieceComponent.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/block-blast/components/GridComponent.d.ts +0 -8
- package/lib/typescript/src/games/block-blast/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/block-breaker/BlockBreakerService.d.ts +0 -88
- package/lib/typescript/src/games/block-breaker/BlockBreakerStore.d.ts +0 -47
- package/lib/typescript/src/games/block-breaker/components/BlastAnimation.d.ts +0 -15
- package/lib/typescript/src/games/block-breaker/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/block-breaker/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bluk/BlukService.d.ts +0 -71
- package/lib/typescript/src/games/bluk/BlukStore.d.ts +0 -52
- package/lib/typescript/src/games/bluk/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/bluk/components/GameBackground.d.ts +0 -9
- package/lib/typescript/src/games/bluk/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterService.d.ts +0 -35
- package/lib/typescript/src/games/bubble-shooter/BubbleShooterStore.d.ts +0 -63
- package/lib/typescript/src/games/bubble-shooter/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/bubble-shooter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/candy-crush/CandyCrushService.d.ts +0 -37
- package/lib/typescript/src/games/candy-crush/CandyCrushStore.d.ts +0 -53
- package/lib/typescript/src/games/candy-crush/components/CandyItem.d.ts +0 -11
- package/lib/typescript/src/games/candy-crush/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/candy-crush/components/ScoreBoard.d.ts +0 -5
- package/lib/typescript/src/games/car-racing/CarRacingService.d.ts +0 -44
- package/lib/typescript/src/games/car-racing/CarRacingStore.d.ts +0 -68
- package/lib/typescript/src/games/car-racing/components/CarComponent.d.ts +0 -12
- package/lib/typescript/src/games/car-racing/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/car-racing/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/chameleon-run/ChameleonRunService.d.ts +0 -76
- package/lib/typescript/src/games/chameleon-run/ChameleonRunStore.d.ts +0 -48
- package/lib/typescript/src/games/chameleon-run/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/chameleon-run/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/chameleon-run/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersService.d.ts +0 -6
- package/lib/typescript/src/games/checkers/CheckersStore.d.ts +0 -48
- package/lib/typescript/src/games/checkers/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/checkers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/color-switch/ColorSwitchService.d.ts +0 -63
- package/lib/typescript/src/games/color-switch/ColorSwitchStore.d.ts +0 -43
- package/lib/typescript/src/games/color-switch/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/color-switch/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/colors-sort/ColorsSortService.d.ts +0 -61
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts +0 -56
- package/lib/typescript/src/games/colors-sort/components/ColorContainer.d.ts +0 -7
- package/lib/typescript/src/games/colors-sort/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllService.d.ts +0 -20
- package/lib/typescript/src/games/connect-em-all/ConnectEmAllStore.d.ts +0 -48
- package/lib/typescript/src/games/connect-em-all/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/connect-em-all/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/crossy-road/CrossyRoadService.d.ts +0 -89
- package/lib/typescript/src/games/crossy-road/CrossyRoadStore.d.ts +0 -39
- package/lib/typescript/src/games/crossy-road/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/crossy-road/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/DinoJumpService.d.ts +0 -39
- package/lib/typescript/src/games/dino-jump/DinoJumpStore.d.ts +0 -97
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts +0 -2
- package/lib/typescript/src/games/dino-jump/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/dino-jump/components/ObstacleSprite.d.ts +0 -8
- package/lib/typescript/src/games/dino-jump/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/dino-jump/components/StarSprite.d.ts +0 -2
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesService.d.ts +0 -45
- package/lib/typescript/src/games/dots-and-boxes/DotsAndBoxesStore.d.ts +0 -37
- package/lib/typescript/src/games/dots-and-boxes/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/dots-and-boxes/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/FallingSticksService.d.ts +0 -40
- package/lib/typescript/src/games/falling-sticks/FallingSticksStore.d.ts +0 -31
- package/lib/typescript/src/games/falling-sticks/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/falling-sticks/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/falling-sticks/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberService.d.ts +0 -6
- package/lib/typescript/src/games/find-different-number/FindDifferentNumberStore.d.ts +0 -36
- package/lib/typescript/src/games/find-different-number/components/GameGrid.d.ts +0 -7
- package/lib/typescript/src/games/find-different-number/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/flappy-bird/FlappyBirdStore.d.ts +0 -68
- package/lib/typescript/src/games/flappy-bird/components/Bird.d.ts +0 -2
- package/lib/typescript/src/games/flappy-bird/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/flappy-bird/components/Pipes.d.ts +0 -8
- package/lib/typescript/src/games/flappy-bird/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-merger/FruitMergerService.d.ts +0 -3
- package/lib/typescript/src/games/fruit-merger/FruitMergerStore.d.ts +0 -66
- package/lib/typescript/src/games/fruit-merger/components/FruitItem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/fruit-merger/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +0 -73
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +0 -38
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/game-2048/Game2048Service.d.ts +0 -102
- package/lib/typescript/src/games/game-2048/Game2048Store.d.ts +0 -44
- package/lib/typescript/src/games/game-2048/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/game-2048/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/knife-hit/KnifeHitService.d.ts +0 -48
- package/lib/typescript/src/games/knife-hit/KnifeHitStore.d.ts +0 -41
- package/lib/typescript/src/games/knife-hit/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/knife-hit/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/ludo-king/LudoKingService.d.ts +0 -33
- package/lib/typescript/src/games/ludo-king/LudoKingStore.d.ts +0 -34
- package/lib/typescript/src/games/ludo-king/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/ludo-king/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/maze-runner/MazeRunnerStore.d.ts +0 -62
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts +0 -33
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/SkiaPipeComponent.d.ts +0 -24
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts +0 -9
- package/lib/typescript/src/games/memory-match/MemoryMatchService.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/MemoryMatchStore.d.ts +0 -42
- package/lib/typescript/src/games/memory-match/components/Card.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/memory-match/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mine-sweeper/MineSweeperService.d.ts +0 -22
- package/lib/typescript/src/games/mine-sweeper/MineSweeperStore.d.ts +0 -73
- package/lib/typescript/src/games/mine-sweeper/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/mine-sweeper/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/mob-control/MobControlService.d.ts +0 -74
- package/lib/typescript/src/games/mob-control/MobControlStore.d.ts +0 -66
- package/lib/typescript/src/games/mob-control/components/GameArea.d.ts +0 -11
- package/lib/typescript/src/games/mob-control/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/number-search/NumberSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/number-search/NumberSearchService.d.ts +0 -34
- package/lib/typescript/src/games/number-search/NumberSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/number-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/number-search/components/NumberList.d.ts +0 -2
- package/lib/typescript/src/games/number-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsService.d.ts +0 -67
- package/lib/typescript/src/games/nuts-and-bolts/NutsAndBoltsStore.d.ts +0 -45
- package/lib/typescript/src/games/nuts-and-bolts/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/nuts-and-bolts/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pac-man/PacManService.d.ts +0 -73
- package/lib/typescript/src/games/pac-man/PacManStore.d.ts +0 -89
- package/lib/typescript/src/games/pac-man/components/GameCanvas.d.ts +0 -2
- package/lib/typescript/src/games/pac-man/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/paper-io/PaperIoService.d.ts +0 -70
- package/lib/typescript/src/games/paper-io/PaperIoStore.d.ts +0 -51
- package/lib/typescript/src/games/paper-io/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/paper-io/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/perfect-circle/PerfectCircleService.d.ts +0 -15
- package/lib/typescript/src/games/perfect-circle/PerfectCircleStore.d.ts +0 -55
- package/lib/typescript/src/games/perfect-circle/components/DrawingCanvas.d.ts +0 -8
- package/lib/typescript/src/games/perfect-circle/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/pipe-connect/PipeConnectService.d.ts +0 -17
- package/lib/typescript/src/games/pipe-connect/PipeConnectStore.d.ts +0 -31
- package/lib/typescript/src/games/pipe-connect/components/GameArea.d.ts +0 -7
- package/lib/typescript/src/games/pipe-connect/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -30
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +0 -33
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +0 -10
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/ReversiStore.d.ts +0 -46
- package/lib/typescript/src/games/reversi/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/reversi/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersService.d.ts +0 -6
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbersStore.d.ts +0 -38
- package/lib/typescript/src/games/sliding-numbers/components/NumbersGrid.d.ts +0 -7
- package/lib/typescript/src/games/sliding-numbers/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snake-3d/Snake3DService.d.ts +0 -29
- package/lib/typescript/src/games/snake-3d/Snake3DStore.d.ts +0 -49
- package/lib/typescript/src/games/snake-3d/components/GameGrid.d.ts +0 -2
- package/lib/typescript/src/games/snake-3d/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersService.d.ts +0 -22
- package/lib/typescript/src/games/snakes-and-ladders/SnakesAndLaddersStore.d.ts +0 -40
- package/lib/typescript/src/games/snakes-and-ladders/components/Dice.d.ts +0 -7
- package/lib/typescript/src/games/snakes-and-ladders/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/snakes-and-ladders/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts +0 -117
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts +0 -54
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts +0 -11
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts +0 -9
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireService.d.ts +0 -23
- package/lib/typescript/src/games/spider-solitaire/SpiderSolitaireStore.d.ts +0 -71
- package/lib/typescript/src/games/spider-solitaire/components/Card.d.ts +0 -10
- package/lib/typescript/src/games/spider-solitaire/components/CardPile.d.ts +0 -12
- package/lib/typescript/src/games/spider-solitaire/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/stack-tower/StackTowerService.d.ts +0 -51
- package/lib/typescript/src/games/stack-tower/StackTowerStore.d.ts +0 -52
- package/lib/typescript/src/games/stack-tower/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/stack-tower/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/sudoku/SudokuService.d.ts +0 -24
- package/lib/typescript/src/games/sudoku/SudokuStore.d.ts +0 -65
- package/lib/typescript/src/games/sudoku/components/GameArea.d.ts +0 -8
- package/lib/typescript/src/games/sudoku/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramService.d.ts +0 -6
- package/lib/typescript/src/games/tangram/TangramStore.d.ts +0 -34
- package/lib/typescript/src/games/tangram/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tangram/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tank-1990/Tank1990Service.d.ts +0 -80
- package/lib/typescript/src/games/tank-1990/Tank1990Store.d.ts +0 -48
- package/lib/typescript/src/games/tank-1990/components/Controls.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/GameBoard.d.ts +0 -2
- package/lib/typescript/src/games/tank-1990/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeService.d.ts +0 -0
- package/lib/typescript/src/games/tic-tac-toe/TicTacToeStore.d.ts +0 -51
- package/lib/typescript/src/games/tic-tac-toe/components/GameBoard.d.ts +0 -6
- package/lib/typescript/src/games/tic-tac-toe/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/TileHomeService.d.ts +0 -1
- package/lib/typescript/src/games/tile-home/TileHomeStore.d.ts +0 -57
- package/lib/typescript/src/games/tile-home/components/AnimatingTile.d.ts +0 -9
- package/lib/typescript/src/games/tile-home/components/FlyingTile.d.ts +0 -16
- package/lib/typescript/src/games/tile-home/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/tile-home/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/tile-home/components/TileItem.d.ts +0 -11
- package/lib/typescript/src/games/tile-home/components/TileSlot.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +0 -32
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +0 -39
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts +0 -7
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts +0 -10
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts +0 -11
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +0 -6
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/WordSearchConstants.d.ts +0 -63
- package/lib/typescript/src/games/word-search/WordSearchService.d.ts +0 -34
- package/lib/typescript/src/games/word-search/WordSearchStore.d.ts +0 -70
- package/lib/typescript/src/games/word-search/components/GameBoard.d.ts +0 -7
- package/lib/typescript/src/games/word-search/components/ScoreBoard.d.ts +0 -6
- package/lib/typescript/src/games/word-search/components/WordList.d.ts +0 -2
- package/lib/typescript/src/helpers/AnimatedScore.d.ts +0 -36
- package/lib/typescript/src/helpers/AnimationFrame.d.ts +0 -40
- package/lib/typescript/src/helpers/AnimationTracker.d.ts +0 -44
- package/lib/typescript/src/helpers/BlastAnimation.d.ts +0 -16
- package/lib/typescript/src/helpers/ErrorHandler.d.ts +0 -123
- package/lib/typescript/src/helpers/GameBackgroundPattern.d.ts +0 -7
- package/lib/typescript/src/helpers/GameControlButton.d.ts +0 -11
- package/lib/typescript/src/helpers/GameOverModal.d.ts +0 -15
- package/lib/typescript/src/helpers/GameTimer.d.ts +0 -26
- package/lib/typescript/src/helpers/Icons.d.ts +0 -12
- package/lib/typescript/src/helpers/ParticleBlast.d.ts +0 -11
- package/lib/typescript/src/helpers/ScoreBoardContainer.d.ts +0 -85
- package/lib/typescript/src/helpers/assets/apple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/avocado-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/banana-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/bomb-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/broccoli-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/cherries-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/donut-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/dragonfruit-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fries-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/fruit-helpers.d.ts +0 -154
- package/lib/typescript/src/helpers/assets/grapes-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/icecream-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/index.d.ts +0 -31
- package/lib/typescript/src/helpers/assets/kiwi-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/mango-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/orange-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/papaya-full-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/peach-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pineapple-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pomegranate-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/pumpkin-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/raspberry-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/star-item.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/strawberry-fruit.d.ts +0 -4
- package/lib/typescript/src/helpers/assets/watermelon-fruit.d.ts +0 -4
|
@@ -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 _0x7c4ec5=_0x3896;!function(){const o=_0x3896,e=_0x157c();for(;;)try{if(580135==-parseInt(o(181,"hxuc"))/1+-parseInt(o(207,"$V]2"))/2+parseInt(o(222,"Ff0y"))/3+parseInt(o(174,"Z1P%"))/4*(parseInt(o(245,"yjtt"))/5)+parseInt(o(276,"eN)8"))/6*(parseInt(o(186,"zzTG"))/7)+parseInt(o(249,"ABKu"))/8+-parseInt(o(190,"MQ6g"))/9*(parseInt(o(225,"Z1P%"))/10))break;e.push(e.shift())}catch(o){e.push(e.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0x397656 from"react";import{StyleSheet}from"react-native";import{GestureHandlerRootView}from"react-native-gesture-handler";function _0x3896(o,e){o-=160;const t=_0x157c();let W=t[o];if(void 0===_0x3896.PEIwXk){const o=function(o,e){let t,W,r=[],n=0,d="";for(o=function(o){let e="",t="";for(let t,W,r=0,n=0;W=o.charAt(n++);~W&&(t=r%4?64*t+W:W,r++%4)?e+=String.fromCharCode(255&t>>(-2*r&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let o=0,W=e.length;o<W;o++)t+="%"+("00"+e.charCodeAt(o).toString(16)).slice(-2);return decodeURIComponent(t)}(o),W=0;W<256;W++)r[W]=W;for(W=0;W<256;W++)n=(n+r[W]+e.charCodeAt(W%e.length))%256,t=r[W],r[W]=r[n],r[n]=t;W=0,n=0;for(let e=0;e<o.length;e++)W=(W+1)%256,n=(n+r[W])%256,t=r[W],r[W]=r[n],r[n]=t,d+=String.fromCharCode(o.charCodeAt(e)^r[(r[W]+r[n])%256]);return d};_0x3896.eJWrTL=o,_0x3896.TYdXth={},_0x3896.PEIwXk=!0}const r=t[0];_0x3896.WPGHwh!==r&&(_0x3896.TYdXth={},_0x3896.WPGHwh=r);const n=_0x3896.TYdXth[o];return void 0===n?(void 0===_0x3896.UWESwx&&(_0x3896.UWESwx=!0),W=_0x3896.eJWrTL(W,e),_0x3896.TYdXth[o]=W):W=n,W}import{GameControlButton,GameOverModal,GameSettingsModal,GameBackgroundPattern as _0xa7c90a}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";import{ScoreBoard}from"./components/ScoreBoard.js";import{GameArea}from"./components/GameArea.js";import{jsx as _0x1b0276,jsxs as _0x409298}from"react/jsx-runtime";const BubbleShooterComponent=({settings:o=DEFAULT_GAME_SETTINGS,onSettingsChange:e,onEndGame:t,onReplayGame:W,onShare:r,onShareScreenshot:n,onShowLeaderboard:d,bannerAd:S})=>{const a="qBsw",s=_0x3896,u={bvqEQ:function(o,e,t){return o(e,t)},KjFDB:function(o,e,t,W){return o(e,t,W)},svcgR:function(o,e,t,W){return o(e,t,W)},aPtDB:function(o,e){return o===e},RAPdw:s(244,a),BzHQl:function(o,e,t){return o(e,t)},yvfqv:function(o,e){return o(e)},LIdYl:function(o){return o()},ZNaNH:function(o){return o()},SqrDU:function(o,e,t){return o(e,t)}},m=o?.[s(205,"I@5W")]??!0,i=o?.[s(175,"z@Du")]??!0,k=o?.offset??0,x=_0x397656[s(238,"9AR*")](m);x[s(228,"fc5e")]=m;const _=_0x397656[s(208,"PUB1")](i);_[s(243,"fx0o")]=i;const f=_0x397656[s(263,"u0Ds")](t);f[s(282,"3bZk")]=t;const l=useScore(),C=u[s(254,"eN)8")](useIsPlaying),b=useGameOver(),O=u.ZNaNH(useGameWon),p=_0x397656[s(257,"9HSJ")](!1),G=_0x397656.useCallback(o=>{const e=s;if(f[e(253,"x4eK")]&&!p[e(271,"gdKq")]){const t=useBubbleShooterStore[e(231,"w@U%")]().score;f[e(251,"9AR*")]({status:o,score:t[e(252,"I@5W")]()}),p[e(184,"5U0&")]=!0}},[]),B=_0x397656.useMemo(()=>new BubbleShooterService,[]);_0x397656.useEffect(()=>{B[s(281,"x4eK")](BUBBLE_SHOOTER_ROW_COUNT,BUBBLE_SHOOTER_COLOR_COUNT)},[B]),_0x397656[s(274,"hxuc")](()=>{const o=s;return useBubbleShooterStore[o(265,"(fV[")](e=>e[o(196,"b2#P")],e=>{B[o(165,"QZ8b")](e)})},[B]);const h=_0x397656.useCallback(()=>{const o=s;u[o(163,"(fV[")](playSound,GAME_SOUNDS[o(198,"HcCv")][o(203,"PUB1")],x.current),playHaptic(HapticType[o(285,"wP$2")],_[o(251,"9AR*")])},[]),P=_0x397656[s(166,"1i#q")](()=>{const o=s;u[o(234,"%i2r")](playSound,GAME_SOUNDS[o(213,"8n$1")][o(264,"hxuc")],x[o(167,"wP$2")],!0),playHaptic(HapticType[o(176,"P68a")],_.current)},[]),R=_0x397656[s(242,"ABKu")](()=>{const o=s;u.svcgR(playSound,GAME_SOUNDS[o(202,"z@Du")][o(191,"PUB1")],x[o(258,"P68a")],!0),playHaptic(HapticType[o(224,"QZ8b")],_[o(211,")Afm")])},[]);_0x397656.useEffect(()=>{B.setCallbacks(h,P,R)},[B,h,P,R]),_0x397656[s(200,"MQ6g")](()=>{const o=s;if((b||O)&&!p[o(168,"Q^Mq")]){const e=O?o(223,")j(c"):o(280,"wP$2");!O&&(playSound(GAME_SOUNDS[o(256,"zzTG")][o(260,"8n$1")],x.current,!0),playHaptic(HapticType[o(173,"3bZk")],_[o(288,"ABKu")])),G(e)}!b&&!O&&(p[o(209,"$V]2")]=!1)},[b,O,G]),_0x397656[s(255,"9HSJ")](()=>{B[s(232,"Ff0y")]()},[B]),_0x397656[s(227,"WcN!")](()=>()=>{const o=_0x3896;useBubbleShooterStore[o(287,"gdKq")]()[o(180,"eN)8")]&&!p.current&&G("cancel"),B[o(183,"PUB1")](),useBubbleShooterStore[o(273,"4Dj%")]()[o(197,"9HSJ")]()},[B]),_0x397656.useEffect(()=>{const o=s,e={SWfXG:function(o,e){return o(e)},dfZOg:function(o,e){return o/e},AekcI:function(o,e){return u[_0x3896(179,"wP$2")](o,e)},sEdOv:function(o){return o()}};let t=null;const W=()=>{if(null!==t)return;let o=0;const W=e.dfZOg(1e3,60),r=n=>{const d=_0x3896;n-o>=W&&(o=n,B[d(233,"bEa&")]()),t=e[d(194,"ABKu")](requestAnimationFrame,r)};t=requestAnimationFrame(r)},r=()=>{const o=_0x3896;u[o(267,"$V]2")](o(162,"YN!G"),u.RAPdw)?(_0x229cea=_0x21a0f8,_0x3591b3[o(206,"mD^L")]()):null!==t&&(cancelAnimationFrame(t),t=null)};useBubbleShooterStore.getState()[o(196,"b2#P")]&&W();const n=useBubbleShooterStore[o(216,"%i2r")](e=>e[o(217,"$V]2")],t=>{const n=o;e[n(268,"QZ8b")](n(187,"Ff0y"),n(218,"2QK#"))?_0xf5c314.setCallbacks(_0x2d50df,_0x446aa8,_0x222fd1):t?W():r()});return()=>{const t=o;"wfxPS"===t(160,"4ppy")?(e.sEdOv(n),r()):(_0x25388f(t(266,"x4eK")),_0x104fb9[t(212,"(fV[")]()[t(261,"QZ8b")](),_0x3f2e0f[t(214,")Afm")](),_0x907653[t(195,"eN)8")]())}},[B]);const E=_0x397656[s(235,"P&x3")](()=>{const o=s;p[o(189,"HcCv")]=!1,B[o(230,"PUB1")](!0),useBubbleShooterStore.getState().startGame(BUBBLE_SHOOTER_ROW_COUNT,BUBBLE_SHOOTER_COLOR_COUNT,BUBBLE_SHOOTER_TIME_LIMIT),B[o(262,"3bZk")](),playSound(GAME_SOUNDS[o(229,"bEa&")][o(199,"HcCv")],x.current),u[o(247,"aE9X")](playHaptic,HapticType[o(272,"1i#q")],_[o(164,"YN!G")])},[B]),U=_0x397656.useCallback(()=>{const o=s;if(o(215,"HcCv")!==o(275,"yjtt"))return _0x2b45d1[o(201,"aE9X")](o=>o.isPlaying,e=>{_0x257251[o(278,"4Dj%")](e)});u[o(172,"QZ8b")](G,o(226,"I@5W")),useBubbleShooterStore.getState()[o(221,")j(c")](),B[o(246,"Gbqz")](),B[o(193,"x4eK")]()},[B,G]),H=_0x397656[s(241,"HcCv")](()=>{const o=s;p[o(204,"g^ic")]=!1,W?.(),useBubbleShooterStore[o(220,"4ppy")]().resetGame(),B[o(178,"98ak")](),B[o(232,"Ff0y")]()},[B,W]),N={..._0x397656[s(284,")j(c")](()=>({isPlaying:C,gameOver:b,onStartGame:E,onStopGame:U,onShare:r,onShowLeaderboard:d,startButtonSubtext:"Match 3+ bubbles of same color!"}),[C,b,E,U,r,d])},v={..._0x397656[s(239,"Q^Mq")](()=>({isVisible:b,score:l,onPlayAgain:H,buttonText:s(210,"I@5W"),title:O?s(236,"isNo"):s(177,"g^ic"),message:O?s(185,"YN!G"):s(250,"b2#P")}),[b,l,H,O])};v.onShare=n,v.bannerAd=S;const y={};return y[s(277,"yjtt")]=GAME_IDS[s(248,"mD^L")],y.settings=o||DEFAULT_GAME_SETTINGS,y[s(161,"fx0o")]=e,_0x1b0276(GestureHandlerRootView,{style:styles[s(188,a)],children:_0x409298(_0xa7c90a,{offset:k,children:[_0x1b0276(GameArea,{gameService:B,offset:k}),_0x1b0276(ScoreBoard,{offset:k}),u[s(182,"(fV[")](_0x1b0276,GameControlButton,N),_0x1b0276(GameOverModal,v),_0x1b0276(GameSettingsModal,y)]})})},_0x179f14={flex:1};_0x179f14[_0x7c4ec5(170,"bwMM")]=BACKGROUND_COLOR;const _0xf472c8={};function _0x157c(){const o=["dSoYWOzWt8o2wXBcOqPX","tWxcUdfIoCk5","W6NdV8kSW4ZdUwer","sbNcUtnRnSk0emofW7zY","cwZcTSkEWRbhW4S1jhKnv8kgsSkn","kM7cUmk2WQdcMdtdL8oRWPXQBW","W7ldMCkatmow","W5Smocip","W5ykd8kOWQaevmo3lxZcMW","W7zvWQpcVMXKpCkAzKVcVcpdMG","tqVdGSodW5pdSZy","W5tcS8kjDSkoWRxdLgpdLW","WPtdGXtdTCoAhmkTBmk3","tsdcVGDf","l21lWQGxmXK3WQi","rCo8a0BcKfFcLmkEhwVcVwxcKq","W4ZdIru1ua","m0yVmSoFAIi","umo/W4arWOJcVmkc","cHr/luujW75MnmoAWQFcUrVdLCk2W685xSooW4q","emohWOe6ASk+WQa9DCk9W7Oc","WQJdJZFdQSkU","BSo7aCkXBSohjYhcIq","q0BdQCoCdIpdLa","BmkupCkGnWdcMCk1bCos","b2me","WQldGSoZbmkCW4VcSeddNmk0W65DcW","W4qWyZ/dKCovW6y9WOv1CYblzg7dLSon","vWJdPSkPdq","l3bYWRaFkXWWWR85nM/dUSolWO8iea","e3KJwSowWPJcOmovW5q","W61fW4xdV2BdV8oreKK","yMBdMCoSjWJdV8kajSkGdCkwhSoY","C2FdMSo8pW","kmorBSoqgYVcU8khpG","W63dSCkfW63cQCoixsRcPG","W5fUWOdcNKXekSkOxNdcMHtdRaW","a2ifhmoL","W7dcH8k2qColWPtdTG","WPrrDSkCzgX1p8oIomoGlG","W67dJmoitmkSAa7cGGi+W61AW7zCz8kVvhldPGC","W5xcTSk2AcBcJmoLW4ZcUHZcPZxcSG","jvKVaCouEq","WOFdTmoYkhRdMSkL","WQjxEmkrFcLNn8o2p8oQFa","sKzstvZcSbG","W7JdNrmICuxdHcm","iuZdSSokWPZcVbaiiqxdHr3cVJ8","w1ztwK3cMq3dOSkZ","v1ZdKmo8hG","W5CjWPO3yG/cU8kIDq","WO3dSSoqnN7dJCk4W6JcHW","W4ZdU8oDnY4","aSk6WOftWOFcQSkxAmkfWO8","b8knWRS6WQJdNb/dIG","W58Sm8o1W73dSKufxG","W5dcR2JcQCoKgSk4s8ouW4ddSCkYWR0","W5OGlG","W5JdUSkLFSoLW5Px","W5ypaSkOWQqODSoxihFcMq","WPjEECkDBwu","WPPZW4vqgSoJWRtdQmoN","W4meW5JdRCocW64L","WO3dO8kPWRhdMCoHW77cRCoCkKRdSSkMWP8","i08+a8oDFIVdQCkcaa","gJhcGSoNWOmWoKu","WOVdSJhdRmk/tmoTumoQW6ZdSCkqWRNdLeOgWQm","WRRdHSkpWPldOCobW7lcLSo7cNhdJ8knWQOcW7hcRGGSvW","W68wWR4aqW","WPVcLCo9W6Dsn2VcG8kwWOSF","u8oTzt9PW6eUWPu","WOLxkmkJiKWXCCo1WRSio1m","DmooqHbFyW","W7/dUCk7W7pdUwik","W6JdNCkdxmouW6W","vuddVSoTcIhdJmkXd8kmkq","CsZdPCkYk1BcIwNdGu4V","WPJdPSkxeSkqoSkf","qCosdmknqa","WRuFf8kFWOzFv1mtWOC","u1PUWP5Avd7dTmon","W5ZdVSkVW4/cPG","W5NdQCoUB8kusalcUsuEW5zNW51P","nwFcSmohCGpdK0/dKfGcWPldQa","pxGwv8odW4hcUSotW5ZcUXCbWP/dUr8","ySoivtbFA8kf","WOvqrmkkEMbinW","W44REdNdNCoAW74","cLD/WP0A","W6PtW5pdN3tdNSovhfG","zSkIW7PoemodWQ4CDCkNW6CUW4VdHq","W6PtW5pdIhFdNG","FsVdS8oYW7pdJHe","W4all8okpePqnmoZgmo3","jfJdVConWO/cTHKEoW","W7NdISkvwmouW45LBCkJ","W60QcX8PmW8veq","qdCRW6pcMmo4","jmkdza","W6ZdJquczLBdMsq7","W44/zcJdNCoy","WOxdKCo0hL0","W4RdISknxSoP","W5xcUCkWBcFcJCoNW4lcKcVcHsRcGq","gwuDqSowWOJcP8oEW4e","tmkGW5rAlSouW5C","kmouWQbWA8ojza","WOrFW5HPE8k2nCkJ","aCk/uttdHaddG8kBma","W7naB8o9WPK","DY4PWQ45mYKRWO4","W6nosCokWQvd","WPbFW5HQy8k2omkVW4/dLq","WQldHmoYbSoKWRFdHxFdISk7","qb/cUsy","W547FG/dKCosW6W9WPXLxsfq","W70Rgb84gHO","m8kof3mimSoiW5hdTSkZW7Xseq","W5G6jCoDW6ZdMeS","ydNcJqTt","l27cS8oQW5NdMtZdL8oO","smkWW5j7p8oBW5Cj","zYRdSSkdl1tcKq","f8koWRC5WO8","WPtdVCk2bCkbimkyWQpdHcZcVgtdICkfWRddTG","etjXyu4","W73dJHy0va","ka1HF0isW6G","W7JdISksBComW6H9ACkOW6m"];return(_0x157c=function(){return o})()}_0xf472c8[_0x7c4ec5(270,"b2#P")]=_0x179f14;const styles=StyleSheet[_0x7c4ec5(240,"QZ8b")](_0xf472c8);export const BubbleShooter=BubbleShooterComponent;BubbleShooter[_0x7c4ec5(169,"wP$2")]=_0x7c4ec5(237,"NK!W");
|
|
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 _0x1b53ca=_0xf098;!function(){const e=_0xf098,t=_0x197a();for(;;)try{if(431730==parseInt(e(500,"Q^W2"))/1*(-parseInt(e(493,"sc*u"))/2)+-parseInt(e(477,"9]g8"))/3+-parseInt(e(498,"9]g8"))/4*(-parseInt(e(562,"3U2K"))/5)+parseInt(e(595,"&YKV"))/6+parseInt(e(592,"$F&y"))/7+parseInt(e(532,"yS#$"))/8*(parseInt(e(455,"*E0F"))/9)+-parseInt(e(599,"046b"))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();import _0x540e6b,{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";import{GAME_IDS,DEFAULT_GAME_SETTINGS,getGameDimensions}from"../../services/UtilsService.js";function _0x197a(){const e=["WOldN37cMCkMWRqdW7ZcTq","WP7cSmoMW5nmnZO","W7ddUmobra","WRDQzgbdf8oAbXG","ymkkWQzSW7RdVCoHuSksySoQ","gSoNaSoydffRaSkz","WO0CA3a3","W6NcONK+oCo2WRtcMvJcRhK","phPwl8oW","c31ba8o3W5zuWPJdIW8","WRrHjt3cRSkYj8oZdbGm","gSopo8kOWPySWPBcKG","l1LNd8olW7jPWRO","E8oMkCkiEa","W7xdOCowtSkxmCkF","par2rbtcOtG","iYXZh2ZdRaC","W43cGSo3W7hdTSovcSo8jq","WRZcLtxdSCkXwCoDha","hb58Eca","dmoHfCoVd1L6","W7WLW58AWRi","vSkoWQLSWQ7dMq","W4aQWRvG","W4qGWQ9IW4BcVa","e8kVWO5AW64","WRxdTsVcPCo8W6NdSrW","WRvdyNfA","nSoksrT5sSk+tWXF","W7pcJmoPW4DhjW","WPpcNx/dOJ5BW5j9WQ8w","WOi1yNi+W4G","WROAW57dUCo9","W4tdOmkR","WOSGkf50W64jWRyR","WP/dMWzkumovWRpcH1RcQKDIWRO","W7JcHSoSW49D","F14aW49IW4vU","obrWzqxcRJJdTq","xdhcLLPFm0tdTSkjoeP1","cxBdRYFdMrNdPW","WQRcKSokWQRcJG","dmkXhdCSW4H9","W5tcMmoKW6z7","bH5XfGpcRIlcSmoscSoJCCk6WPnGWOxcKvmcW7dcHW","jdXYgxVdRqO","cSoynSk+WP09WPVdVmka","W7ldSCoiwCkgoG","W4BcLcNdRCo2WRu0W5pcGGRdPa","BConeCkoFCorWRhdOa","WO7cPSo7W5nm","WP/cQ8oMWOBcUCoKlW","W5lcMSoaDmo/WQH8WPVdIW","WOiLFNq+W5tcHG","k8o4cCkEWQOUWRpdNSkR","pHtdVJ0zWPFdN8of","oWndWPr3W43dUCkCWRldIarUWQnipLJdJxWAWOnhW6ddLa","WRFcUvNdRHH7W6vr","W7NdSSoct8kxkW","fSo+AtzozCkj","or7dMq","aSoIFZbd","d8kcWO9tWRfWDSkw","WRSbh1ra","W7HaWO7cU8kKWQRdQmkKsSo3xCkuqa","fsnJWQ9AW7VdGCk8WQVdSJHd","kL1Wn8oyW6fYWQRdRt8JWP7dTmoVeG","WPL2W7iZWP/dUSkjiCoJrWujWR0","E20nbZ/cQXFdOSoF","W6ZcGmoKW5rh","W7hcVGisWRldJ3j0WRe4hCo2WPW","kmk2cYq9WOzTC8oJxCoUD8oRsW","WOzjfsxcTa","W4lcJ8opzCoUWOm","WOhdSCo9W5CtBSo2W73cVHxdVSoRoq","cmk4W6KZWPq","pCkllWewW6Pit8opEa","fZrIWRjtW6ddGq","ptuIFSoRpNG","WO02ovHZW6qaWRC+WPS+W4S","WQFdRKa","p8kilXWmW7rwqSolEq","aH7dVaWj","W7WjWODCW6VcMSoIe8oDvb0wWPpdGmkyyqZcHbqs","W4z0ittcUmkKcG","W5xdLCo2y8kGhSkOECk6WOe","W4tdM8oLEmkTe8kQFSkXWPu","WPtdMwNcRSkLWRWs","xmkNvCkSm0bkeCk0W7K","WOJdV1SelXFdM8oaWPtdPG","lGrgWOL3","W4dcLmolW6pdNa","W43cV8o0W4hdGq","WONdIsRcHSoz","y1arpI8","WPfRkclcJq","pSo4dSkOWQOiWQBdLG","p8kSWQb5WOTrz8k3fCkG","xJ7cML1YjhldUa","W7tdHmknWPG9k1FdLCoVWR0","eYrKWPncW6/dGCk8","WQOAaf4YW508W7q","nSoZl8klWROiWQBdLG","WQSFW5/dTq","WRDWEgzhemoa","AmkmW45uW6JdVCoi","nSoZkCktWR8BWRC","WRisa15nW5S7WPWlWRSD","jabdWPm","ose9ACoziM3dUcWhna","W4BcMsNdRCo3W6jEW77cHsldP2TI","WQbNjtZcQq","W7FcLh4","W69Cf8oQcsjXz8kAW68","W5RdQSkPWQi/bNxdPCoeWOJdRSk9dwJdGmkw","W7xcL2BdOfq4C8okWRFcIW","cJXMEGa","l8kgWR1R","W7SGW5OxWR/cTG","b8kRW6yLWOpcNSk1W4y/ia","W67cJ8osySoe","xL8tlGhcHtFdImoSWPu","nwpdUvCj","gSoUfSowiW","WQ7cR8o1","g8oneSkSWOO","E8oAW68KWP41WRSxW5ZcICoXoq","k8kRcIiSWOz9C8oRtCoHCmoVsIVcL8o8W508o8k0WQfr","WQ/cTJtdHCk2","WRfjW5jAW5WnW7S","vv8qlGhcLIVdNSo5WONcPN3cSG","W4BcNIZdQSoZW6zEW73cKqNdVeXJ","W7FcImoUW4v4oMn1WOC","W6xcMeJdJdvoW58","W4bbW7tcHb7dPSoR","WOW2ihrKW608WRqTWOW8W5TrWOToW5ZcQSkdW4Sr","WOK6iW","WPC2W6ZdHmou","lSkIWRnIWOzdDmk7hSkJ","WPVdPLWSlXtdVa","WQ3cKSomWQlcKSoKgxCC","qSk5lNeBm8onstjug8keW5u","WPRdJwpcI8kPWRysW7C","fmonCYft","WPiKy3yCW5VcN8oy","W4pcPvhdUMaFvCoGWO0","pCo4gCkjWRSeWRFdNCk6WQ3cNgTR","W6tdKmkCWOqQouC","W77cPSkzWQDb","kmkFW5OsWRNcP8ki","W6FcR8omW5FdMq","W4dcJmosACoNWPPPWPpdTG","xmkSW5CbWQVcPa","WPBcU8oZWOZcVq","W7NcGhZcSSkPW5D7","ymkIW5m4WOu","WPddIw/cJ8k0WRmsW7O","eGKxrmoA"];return(_0x197a=function(){return e})()}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 _0x4d5aef,jsxs as _0x542538}from"react/jsx-runtime";const{width:width,height:height}=getGameDimensions(),PARTICLE_COLORS=[_0x1b53ca(472,"o^u*"),"#ff6b6b",_0x1b53ca(496,"ACoM"),"#ffaa00","#ffcc00","#ffffff"];export const CarRacing=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:t,onEndGame:o,onReplayGame:W,onShare:a,onShareScreenshot:r,onShowLeaderboard:n,bannerAd:s})=>{const d="hr*L",i=_0x1b53ca,S={ZEVIA:function(e,t,o){return e(t,o)},HeQEb:function(e,t){return e-t},ShbJK:function(e,t,o){return e(t,o)},uzqKI:function(e,t,o){return e(t,o)},tFugs:function(e,t){return e(t)},qNLUq:function(e,t){return e(t)},IBURN:function(e,t){return e(t)},lLgvl:function(e,t){return e===t},RDTKh:i(510,"2%#A"),BPhWT:function(e,t){return e/t},CKDvY:function(e,t){return e!==t},OHnSb:function(e){return e()},CoxNQ:function(e){return e()},kFcWq:function(e){return e()},bXLLp:function(e,t){return e(t)},PoQTG:function(e,t,o){return e(t,o)},yFXOY:function(e,t,o){return e(t,o)},tFEsO:function(e,t,o){return e(t,o)},UMbLq:function(e,t,o){return e(t,o)},OasdO:function(e,t,o){return e(t,o)},yDniI:i(485,d)},C=e?.[i(564,"w7vg")]??!0,u=e?.enableHaptics??!0,R=e?.[i(583,"N@tG")]??0,m=S[i(460,"dQYD")](useScore),f=useIsPlaying(),x=S[i(544,"LA0i")](useGameOver),_=S.kFcWq(useLives),l=useObstacles(),G=usePlayerCar(),O=useParticleEffects(),k=S[i(462,"FNOk")](useRef,!1),p=useRef(o);p.current=o;const b=S.bXLLp(useRef,C);b.current=C;const A=useRef(u);A[i(454,"9]g8")]=u;const g=S.PoQTG(useCallback,e=>{const t=i;if(p.current&&!k.current){const o=useCarRacingStore[t(523,"9]g8")]()[t(575,"B#pg")];p[t(516,"o^u*")]({status:e,score:o[t(580,"Azd%")]()}),k[t(578,"N%At")]=!0}},[]),h=S[i(520,"OE7*")](useCallback,(e,t)=>useCarRacingStore[i(563,"LA0i")]().startGame(e,t),[]),P=useCallback(()=>useCarRacingStore[i(463,"]5mv")]()[i(511,"N%At")](),[]),N=useCallback(()=>useCarRacingStore[i(523,"9]g8")]()[i(579,"]5mv")](),[]),I=useCallback(e=>{const t=i;t(568,"gmPI")===t(459,"Wwdy")?(_0x2b57da[t(526,"B#pg")]=!1,_0x390ca9(_0x52e0f1[t(497,"ydFE")],_0x7b58a2),_0x1f6251.startGame(),S[t(504,"Qr46")](_0x5e2166,_0x1a9bbd[t(466,"z$!g")][t(478,"FNOk")],_0x1d6c75.current),_0x2f4378(_0x5085b4[t(576,"OE7*")],_0x225c9b.current)):useCarRacingStore[t(467,"OaP*")]()[t(502,"(sH*")](e)},[]),y=_0x540e6b.useMemo(()=>new CarRacingService(CAR_RACING_GAME_CONFIG[i(464,"zLlG")],CAR_RACING_GAME_CONFIG[i(581,"OaP*")]),[]);_0x540e6b.useEffect(()=>{const e=i;useCarRacingStore[e(582,"Q^W2")]().setOffset(R);const t=S[e(515,"046b")](height-CAR_RACING_GAME_CONFIG[e(608,"$F&y")],CAR_RACING_GAME_CONFIG[e(534,"2Z6a")]);y.setPlayerY(t)},[R,y]),_0x540e6b[i(530,"*E0F")](()=>{y[i(604,"(sH*")](()=>{const e=_0xf098;S[e(550,"sc*u")](playSound,GAME_SOUNDS[e(505,"zLlG")][e(600,"o^u*")],b.current),S[e(522,"3[v$")](playHaptic,HapticType[e(588,"(sH*")],A[e(545,"*E0F")])},()=>{const e=_0xf098;var t,o,W;t=playSound,o=GAME_SOUNDS[e(452,"N@tG")][e(475,"OaP*")],W=b[e(540,"LA0i")],S[_0xf098(490,"*E0F")](t,o,W),playHaptic(HapticType[e(524,"gofU")],A[e(602,"OaP*")])})},[y]),_0x540e6b[i(559,"(sH*")](()=>{if(!f)return;const e=setGameInterval(()=>{const e=_0xf098;useCarRacingStore[e(574,"]OoS")]()[e(513,"]5mv")]()},1e3);return()=>clearGameInterval(e)},[f]),_0x540e6b[i(512,"hcjx")](()=>{const e=i;if(x&&!k[e(501,"NDog")]){const t=_>0?e(503,"(sH*"):e(548,"$F&y");S[e(495,"yS)a")](g,t)}!x&&(k[e(567,"rVbY")]=!1)},[x,_,g]),_0x540e6b[i(525,"9]g8")](()=>{const e={nyRfK:function(e,t){return S[_0xf098(538,"]OoS")](e,t)}};return()=>{const t=_0xf098;useCarRacingStore[t(543,"yS)a")]().isPlaying&&!k[t(603,"gofU")]&&e[t(458,"Wwdy")](g,"cancel"),y[t(541,"N)bu")](),N()}},[y]);const E=useCallback(()=>{const e=i;k[e(471,"^#ao")]=!1,h(CAR_RACING_GAME_CONFIG[e(560,"yS#$")],R),y[e(577,")HOD")](),playSound(GAME_SOUNDS[e(555,"Q^W2")].START,b.current),playHaptic(HapticType[e(514,"z$!g")],A.current)},[h,R,y]),F=useCallback(()=>{const e=i;S[e(517,"Wwdy")](g,e(598,")HOD")),P(),y[e(551,"dQYD")]()},[g,P,y]),M=useCallback(()=>{const e=i;S[e(531,"N%At")](S.RDTKh,e(552,"^#ao"))?(W?.(),N(),y.cleanup()):(_0x15d76c=()=>{const t=e;_0x5e3f03(_0x12f992),_0x8ad06c[t(584,"2%#A")][t(572,"N@tG")](_0x9dfeb0)},_0x11884f[e(578,"N%At")][e(558,"z$!g")](_0xabd319,_0x206599))},[N,y,W]),v=S[i(461,"ydFE")](useRef,new Map),L=useCallback(e=>{const t=i;let o=v[t(602,"OaP*")][t(605,"&YKV")](e);return!o&&(o=()=>{const o=t;S.qNLUq(I,e),v[o(454,"9]g8")][o(547,"3!5K")](e)},v[t(545,"*E0F")][t(585,"Azd%")](e,o)),o},[I]),Q=useRef(1),H=useMemo(()=>{const e=i,t=CAR_RACING_GAME_CONFIG[e(486,"o^u*")]*CAR_RACING_GAME_CONFIG[e(601,"rVbY")];return{roadWidth:t,roadStartX:(width-t)/2,laneWidth:CAR_RACING_GAME_CONFIG[e(488,"ydFE")],maxLane:S.HeQEb(CAR_RACING_GAME_CONFIG[e(453,"N@tG")],1)}},[]),V=useMemo(()=>Gesture.Pan()[i(469,"]5mv")](e=>{const t=i;if(!useCarRacingStore[t(537,"2Z6a")]()[t(593,"ydFE")])return;const o=S[t(607,"Azd%")](e[t(518,")HOD")],H.roadStartX),W=Math[t(566,"OE7*")](S[t(492,"]5mv")](o,H[t(499,"gmPI")])),a=Math.max(0,Math[t(491,"Y^*d")](H[t(565,"@&q2")],W));S.CKDvY(a,Q[t(570,"N)bu")])&&(Q[t(539,"N@tG")]=a,playSound(GAME_SOUNDS[t(482,"hcjx")][t(474,"(sH*")],b[t(540,"LA0i")]),playHaptic(HapticType[t(571,"]5mv")],A[t(521,"PR^8")])),y[t(481,"z$!g")](a)})[i(506,"Y^%W")](!0),[H,y]),T=useMemo(()=>({isPlaying:f,gameOver:x,onStartGame:E,onStopGame:F,onShare:a,onShowLeaderboard:n,startButtonSubtext:i(494,"rVbY")}),[f,x,E,F,a,n]),j=useMemo(()=>({isVisible:x,score:m,onPlayAgain:M,buttonText:i(529,"3!5K"),title:_>0?i(468,"(sH*"):i(536,"]5mv"),message:_>0?i(596,"rVbY"):i(569,"LA0i")}),[x,m,M,_]),q={};q[i(586,"2%#A")]=width,q[i(509,"9]g8")]=width;const D=S.yFXOY(useMemo,()=>[styles.gameWrapper,q],[]),w=S[i(457,"OaP*")](useMemo,()=>({gameId:GAME_IDS[i(553,"2%#A")],settings:e||DEFAULT_GAME_SETTINGS,onSettingsChange:t}),[e,t]),J={};J[i(594,"gmPI")]=width,J[i(549,"$F&y")]=height;const K={};K[i(519,"3[v$")]=R;const U={...T},z={...j};z[i(473,"]5mv")]=r,z[i(587,"zLlG")]=s;const B={...w};return _0x4d5aef(GestureHandlerRootView,{style:styles[i(528,"^#ao")],children:_0x542538(View,{style:D,children:[_0x4d5aef(View,{style:StyleSheet[i(590,"OaP*")],children:_0x4d5aef(GameBackground,J)}),S[i(533,"2Z6a")](_0x4d5aef,ScoreBoard,K),S[i(483,"LA0i")](_0x4d5aef,GestureDetector,{gesture:V,children:S[i(487,")HOD")](_0x542538,View,{style:styles[i(465,"w7vg")],children:[l[i(479,"PR^8")](e=>_0x4d5aef(CarComponent,{id:e.id,x:e.x,y:e.y,width:e[i(557,"Qr46")],height:e[i(554,"gmPI")],color:e[i(561,"gmPI")],isPlayer:!1},e.id)),S[i(597,"FNOk")](_0x4d5aef,CarComponent,{id:S.yDniI,x:G.x,y:G.y,width:G[i(546,d)],height:G.height,color:CAR_RACING_COLORS[i(606,"rVbY")],isPlayer:!0})]})}),O.map(e=>_0x4d5aef(ParticleBlast,{x:e.x,y:e.y,particleCount:5,colors:PARTICLE_COLORS,duration:600,onComplete:L(e.id)},e.id)),S[i(489,"CRr(")](_0x4d5aef,GameControlButton,U),S.tFEsO(_0x4d5aef,GameOverModal,z),_0x4d5aef(GameSettingsModal,B)]})})};const _0x23bd10={};_0x23bd10[_0x1b53ca(470,"Qr46")]=1,_0x23bd10[_0x1b53ca(591,"2Z6a")]=CAR_RACING_COLORS[_0x1b53ca(535,"FNOk")],_0x23bd10[_0x1b53ca(456,"Y^%W")]="center";const _0x45bad4={};function _0xf098(e,t){e-=452;const o=_0x197a();let W=o[e];if(void 0===_0xf098.FGchrA){const e=function(e,t){let o,W,a=[],r=0,n="";for(e=function(e){let t="",o="";for(let o,W,a=0,r=0;W=e.charAt(r++);~W&&(o=a%4?64*o+W:W,a++%4)?t+=String.fromCharCode(255&o>>(-2*a&6)):0)W="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(W);for(let e=0,W=t.length;e<W;e++)o+="%"+("00"+t.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(o)}(e),W=0;W<256;W++)a[W]=W;for(W=0;W<256;W++)r=(r+a[W]+t.charCodeAt(W%t.length))%256,o=a[W],a[W]=a[r],a[r]=o;W=0,r=0;for(let t=0;t<e.length;t++)W=(W+1)%256,r=(r+a[W])%256,o=a[W],a[W]=a[r],a[r]=o,n+=String.fromCharCode(e.charCodeAt(t)^a[(a[W]+a[r])%256]);return n};_0xf098.SpJGnI=e,_0xf098.iYlARm={},_0xf098.FGchrA=!0}const a=o[0];_0xf098.EMgtxb!==a&&(_0xf098.iYlARm={},_0xf098.EMgtxb=a);const r=_0xf098.iYlARm[e];return void 0===r?(void 0===_0xf098.vxpets&&(_0xf098.vxpets=!0),W=_0xf098.SpJGnI(W,t),_0xf098.iYlARm[e]=W):W=r,W}_0x45bad4[_0x1b53ca(484,"sc*u")]=1,_0x45bad4[_0x1b53ca(507,"OE7*")]=_0x1b53ca(556,"N%At");const _0xe65786={};_0xe65786[_0x1b53ca(527,"N@tG")]=1;const _0xc63227={};_0xc63227[_0x1b53ca(542,"Wwdy")]=_0x23bd10,_0xc63227[_0x1b53ca(476,"gofU")]=_0x45bad4,_0xc63227.gameArea=_0xe65786;const styles=StyleSheet.create(_0xc63227);
|
|
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";const _0x4c67b5=_0x315d;!function(){const e=_0x315d,o=_0x3457();for(;;)try{if(178005==parseInt(e(487,"2%iJ"))/1+parseInt(e(540,"3(%5"))/2+-parseInt(e(524,"PNm!"))/3+-parseInt(e(500,"Wjcl"))/4+-parseInt(e(526,"KU(K"))/5*(-parseInt(e(494,"SUQs"))/6)+parseInt(e(458,"XkCn"))/7*(parseInt(e(547,"WXcr"))/8)+-parseInt(e(531,"PNm!"))/9)break;o.push(o.shift())}catch(e){o.push(o.shift())}}();import{BACKGROUND_COLOR}from"../../services/GamesConstants.js";import _0xbd85b4 from"react";import{StyleSheet}from"react-native";function _0x3457(){const e=["WROEW6tdQtqvWQpcMSku","jSoNW4LpW5NdNCo5WOJdIW","W77dO07cOfHd","WROEW6tdVJCv","pKpcLeJdKW","B8olqMPj","m8oSW5BcMCkufmoHW7dcUmkQW7VcGW","c8keC8oCWQGRWPVcKc1OWOCr","WRNdQr7cH23dMgJcGwO","W6eEoSkmhuhdU8kAW50","B8kOW7anwSoEqHu","j8kyemo7FW","WPpdUXlcUtPhxSki","wCoyAxfb","o8krbmoCW6eDWQNcUG07W4NcIG","x8k6WPlcJCovtCkOW5BcTCkJW6hdUG","WQbEW4G3meu","WRldLSkDj0GqWQBdRCoL","wCoajxpcHmo/sa","WQ9WfdldICo6","W6L4i8korwxdT3hcM8oRWPn+","nSkQWOxcG8kKW7BcJCkjoG","mCoSW5TiW4hdV8oqWOtdNSkkWQNcQCkw","W6PtW7OFW4LqvW","f8okW7TNW6JdLSoDWQRdOmkHWPlcN8kR","WOBdLx9ge8oYWRTotq","k8kOWPBdJmot","WPVdUadcMsTs","tmkHWONdQCoU","WRL2aXldICoYWRi","WQ9WfcpdJCoWWQRcJSktomkw","W6qHBSkpCcpdM2CZohq","hSkmFmkdya","W6JdSuxcKvHj","W7hcL8onWQzE","hCkhd2NcRSoRCmk7","W7eAo8kfhuRdOSkrW4O","W5RcU8o+WR1+W6pcRcy","hSkDACkYCJPeAMPNDSoN","W6mnjCkgea","W4NdPseZWPW8W6ZdSG","ovRcJe3dGG","lfLjWQpcPZtcMG","gaRdQhBdQCkniW","g8kWb8oaFW","smohjmkUW7T3WR7cTX5fWOO","A8oYdxVcVSoDCCkuW6a","AmkUWPddN8oetmo8","WR9nW4RdSGtcSve","jKjsWQxcQZVcGL7dKCkQ","W48Sj8kLi3FdHmkXW6G","WOtdIxVcNvO","qW7dQCk2W6ddMSoNWOSA","hMFcUxm","WRnwW6VdQadcRua","WQhcM29Yc2/cMqWY","Au7cLXbpEvi","tSobkgZcUa","ACk6WOZdG8oeumojW5G","WOhcOmkDg8oq","wSo7WRdcIghcNSkmWODr","AmoliYKYW7TD","W6ddLbZcQfjf","aNJcGgJdGG","FmksW7mlsW","F8o/suX2WRjR","WRRcPgtcPxjCWOyp","s8oKbvdcJq","qSoMW4zJpCkLaa","W57cJCkQpbSSWQK","kLBcJhldK1FdJMK","kSk5umk0mXL+tvK","WONdKZpcSeNdOLu","WQLlW53dKGtcUq","owVcPSk6","WPxcRKnfigFcRIqf","W7ZdIrdcJL5ceGO6W7O","W6uxnSkeb0ldQmkqW4fsW43dKmo0","Ds4gWRhcV8o/yYXXCCo/W6BdKmoS","WOT0FG","vmoTWPlcSMBcLSkAWO4","WR7cGh1L","c8oLqCofAdmoWRe","qCoTWPxcHgBcSmkpWOzr","WRFcGw9Ie03cQW4IrxNdLa","gmklEmkYCJPeAMPNDG","yCohu8kdWRnzWQ/cGXS7W6dcVvGtBq","t2JcSrbRrM3dTCowW4FdKa","t8ogmKZcHmo8uW","zSoZmupdR1aypSoaW4e6W4W","zmodrmk7WQbkWRtcKW","Bmoiy8knWQbFWQNcMbiSW6dcULusEmkL","k8kffq/dHq","WR3dJH3cGM8","W7lcLCoYWQDV","oCoRW5FcN8kqfmoKW6VcHSk6W4VcLW","WPZcLCkzhSoe","WQL3ebldNW","wINdKYxdNIhcJW","rWtdS8krW7xdKSo9WOS","rcNdLaBdKYFcK0yZW5i","zmoqatC2W6XOWOy2W70E","WOVcHmoYWQ1sW7xcQW","umo9WPtcK3FcMCkA","W78WaSoPmxVdN8kPW6z7W7RdOCkBpvOwpCoIWRJcUSkZWOlcHSof","gqRdRNddO8kna0vqFa","wxRcUJbVrG","WRjmW4axh0DzWOv7","FHWmW6BdTg3dMhhdH8kFtarb","W6KXsftcMCkSWQJcLSkEn8kPra","W5JdHgRcOgK","rSo2W4bclmkQamkq","W7yftSkIFq","W5NcVYVdPmojWOVdOaC","pCkOks3dH8kJzY4","W53dH8oexmkyD8o4WPBdMSkCW59U","WReHF8kTyW","W6NcGWxdMColWQBdIc3dR8omlCk4ea","ECoBiJ4JW5jiWOWY","WOzqW6aCtefr","W69JmmkEtg7dKa","W6ddLbZcUvzpeGeHW7Xv","W4FdRJWuWOe8W7tdVSoNvG","Bmo+WOTwWPVdPSkQWPNcMCkcW7xcTSowACkhiua","WR4ID8oFedlcLL/cNCo1WRz6WQO","vSoRpeFdVG","kSk3WONcSSkRW7hcHmkdnmkN","dGZdV0FdRCkpo0jjA8kc","WQFcNgTsgK4","x8ocENnwWPbAWPxdUMevuG4","j8kphSo7BNOjWQ3cIG","WP9OySoFFSotmG","e8kIWOyHyCo/mSkSW7Giidu","lmopy8oYlq","W68kWOhcTftdR0VcJs4/W6L/","vd7dHtFdIYm","emkmWQpcHCkhW4pcUW","W57cQ8o4WPXVW6ZcRa","EmkYW5eltCozwa","e8kNWOeIyCo5rSk0W6iScdtdPG","iCkigSokE1eeWQlcJSoTW7i"];return(_0x3457=function(){return e})()}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";function _0x315d(e,o){e-=411;const t=_0x3457();let n=t[e];if(void 0===_0x315d.BVDcLO){const e=function(e,o){let t,n,W=[],a=0,d="";for(e=function(e){let o="",t="";for(let t,n,W=0,a=0;n=e.charAt(a++);~n&&(t=W%4?64*t+n:n,W++%4)?o+=String.fromCharCode(255&t>>(-2*W&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(let e=0,n=o.length;e<n;e++)t+="%"+("00"+o.charCodeAt(e).toString(16)).slice(-2);return decodeURIComponent(t)}(e),n=0;n<256;n++)W[n]=n;for(n=0;n<256;n++)a=(a+W[n]+o.charCodeAt(n%o.length))%256,t=W[n],W[n]=W[a],W[a]=t;n=0,a=0;for(let o=0;o<e.length;o++)n=(n+1)%256,a=(a+W[n])%256,t=W[n],W[n]=W[a],W[a]=t,d+=String.fromCharCode(e.charCodeAt(o)^W[(W[n]+W[a])%256]);return d};_0x315d.JdmEJM=e,_0x315d.JYNnaW={},_0x315d.BVDcLO=!0}const W=t[0];_0x315d.TYKMpP!==W&&(_0x315d.JYNnaW={},_0x315d.TYKMpP=W);const a=_0x315d.JYNnaW[e];return void 0===a?(void 0===_0x315d.fdaGtb&&(_0x315d.fdaGtb=!0),n=_0x315d.JdmEJM(n,o),_0x315d.JYNnaW[e]=n):n=a,n}import{jsx as _0x34f72d,jsxs as _0x9c6e5e}from"react/jsx-runtime";const ChameleonRunComponent=({settings:e=DEFAULT_GAME_SETTINGS,onSettingsChange:o,onEndGame:t,onReplayGame:n,onShare:W,onShareScreenshot:a,onShowLeaderboard:d,bannerAd:r})=>{const s="g]Vv",m="9J9F",S="zkSX",u="2%iJ",i=_0x315d,k={OKxIe:function(e,o,t){return e(o,t)},RRiyp:function(e,o){return e(o)},GzkDO:i(471,"nPtD"),YJajx:i(449,"y3bW"),CndPZ:i(515,"KfqQ"),gHmqc:function(e,o,t){return e(o,t)},jZYHJ:function(e,o,t){return e(o,t)},gUPrc:function(e,o,t){return e(o,t)}},p=_0xbd85b4[i(465,"KU(K")](e?.[i(412,"aTRe")]??!0);p[i(512,"aTRe")]=e?.[i(476,"z(ah")]??!0;const C=_0xbd85b4[i(535,"XkCn")](e?.enableHaptics??!0);C[i(480,"y3bW")]=e?.[i(414,"KfqQ")]??!0;const x=e?.[i(419,"zcX9")]??0,l=_0xbd85b4[i(411,s)](t);l[i(435,m)]=t;const b=_0xbd85b4.useRef(n);b.current=n;const f=useGameOver(),R=useGameWon(),h=useIsPlaying(),_=f||R,G=_0xbd85b4[i(520,"z(ah")](!1),O=_0xbd85b4[i(454,S)](0),Q=_0xbd85b4[i(536,"DpJK")](0),N=_0xbd85b4.useRef(!1),M=_0xbd85b4.useCallback(e=>{const o=i;if(l.current&&!N[o(511,"lz@f")]){const t=useChameleonRunStore[o(429,"SUQs")]()[o(544,"^^Pt")];l[o(421,"g]Vv")]({status:e,score:t[o(543,"qVLY")]()}),N[o(460,"PNm!")]=!0}},[]),P=_0xbd85b4[i(551,"y3bW")](()=>new ChameleonRunService,[]),g=_0xbd85b4[i(513,S)](()=>{const e=i;k[e(486,"SUQs")](playSound,GAME_SOUNDS[e(521,"Ql!(")][e(466,"g3j9")],p[e(523,"nPtD")]),playHaptic(HapticType[e(426,"SUQs")],C[e(415,"mM8N")])},[]),y=_0xbd85b4[i(423,"[5^Q")](()=>{const e=i,o={xnpQT:function(e,o){return e(o)},hiHjM:e(473,"z(ah")};"qHHqv"!==e(484,"GKPE")?o.xnpQT(_0x5c9715,_0x39f71c?"win":o.hiHjM):(k[e(436,"^^Pt")](playSound,GAME_SOUNDS[e(416,"KfqQ")][e(445,"]e9W")],p[e(530,"qVLY")]),playHaptic(HapticType[e(528,"a^Ps")],C[e(434,"Wjcl")]))},[]),H=_0xbd85b4[i(519,m)](()=>{playHaptic(HapticType.LIGHT,C.current)},[]),J=_0xbd85b4[i(422,s)](()=>{const e=i;k[e(455,"]e9W")](playSound,GAME_SOUNDS.CHAMELEON_RUN[e(438,"y3bW")],p.current),playHaptic(HapticType[e(546,"Ql!(")],C.current)},[]),v=_0xbd85b4[i(477,"CW*M")](()=>{const e=i;useChameleonRunStore.getState().setGameWon(),playSound(GAME_SOUNDS[e(428,"^M)h")],p[e(495,"vC[g")]),playHaptic(HapticType[e(464,"Y2zd")],C.current)},[]);_0xbd85b4[i(499,"s72%")](()=>{P[i(430,"CW*M")](g,y,H,J,v)},[P,g,y,H,J,v]),_0xbd85b4[i(413,"a^Ps")](()=>{const e=i;if("ZvZvf"!==e(538,"Ql!("))return useChameleonRunStore.subscribe(e=>e.isPlaying,o=>{const t=e;G.current=o,P[t(492,"W)pb")](o)});_0x5a7d6e[e(441,"Wjcl")]()},[P]),_0xbd85b4.useEffect(()=>{const e=i;if(f&&!N[e(529,"SUQs")]&&k[e(443,"ojr5")](M,R?k[e(420,u)]:"lose"),_){const o=useChameleonRunStore[e(503,"PNm!")]();O[e(439,u)]=o[e(525,"p5T(")],Q.current=o[e(489,"g]Vv")]}!f&&(N[e(453,"A2E2")]=!1)},[f,R,_,M]),_0xbd85b4.useEffect(()=>{P[i(518,"a^Ps")]()},[P]),_0xbd85b4[i(533,"DpJK")](()=>{const e=i,o={};o[e(459,"y3bW")]=e(498,"ZgpH");const t=o;return()=>{const o=e;useChameleonRunStore[o(462,"]e9W")]()[o(442,"^M)h")]&&!N[o(460,"PNm!")]&&M(t[o(504,"[5^Q")]),useChameleonRunStore.getState()[o(505,"zUfd")](),P.cleanup(),useChameleonRunStore[o(472,"vC[g")]()[o(534,"KfqQ")]()}},[P,M]);const K=_0xbd85b4[i(437,"3(%5")](()=>{const e=i;if(e(451,"Ja8b")===k.YJajx)_0x3201f4(_0x396d69[e(521,"Ql!(")][e(542,"^M)h")],_0x919a26[e(457,"Ql!(")]),_0x2f3d97(_0x138e90[e(431,"^M)h")],_0x450629[e(439,"2%iJ")]);else{const o=k.CndPZ[e(517,"4sXv")]("|");let t=0;for(;;){switch(o[t++]){case"0":playSound(GAME_SOUNDS[e(509,"zUfd")][e(502,"XkCn")],p[e(440,"KU(K")]);continue;case"1":P.resetGame();continue;case"2":P.initialize();continue;case"3":P[e(522,"^^Pt")]();continue;case"4":playHaptic(HapticType[e(448,"ZgpH")],C.current);continue;case"5":P.setPlaying(!0);continue;case"6":useChameleonRunStore[e(491,"bAxI")]()[e(417,"@61Q")]();continue;case"7":useChameleonRunStore[e(545,"zcX9")]()[e(447,"z(ah")]();continue;case"8":N[e(523,"nPtD")]=!1;continue}break}}},[P]),L=_0xbd85b4[i(532,"^^Pt")](()=>{const e=i;k.RRiyp(M,e(425,"XkCn")),k.OKxIe(playSound,GAME_SOUNDS.CHAMELEON_RUN[e(467,"z(ah")],p[e(461,"rkpB")]),k.OKxIe(playHaptic,HapticType.MEDIUM,C.current),P[e(550,"xM7R")](),useChameleonRunStore[e(482,"WXcr")]()[e(475,"vC[g")](),P[e(514,"RpmL")]()},[P,M]),A=_0xbd85b4[i(479,"ZgpH")](()=>{const e=i,o="4|3|1|2|0"[e(537,"]e9W")]("|");let t=0;for(;;){switch(o[t++]){case"0":P[e(468,"zkSX")]();continue;case"1":P[e(510,"A2E2")]();continue;case"2":useChameleonRunStore[e(506,"GKPE")]()[e(534,"KfqQ")]();continue;case"3":N[e(495,"vC[g")]=!1;continue;case"4":b.current?.();continue}break}},[P]),U={..._0xbd85b4.useMemo(()=>({isPlaying:!_&&h,gameOver:f,onStartGame:K,onStopGame:L,onShare:W,onShowLeaderboard:d,startButtonSubtext:i(548,"2%iJ")}),[_,h,f,K,L,W,d])},E={..._0xbd85b4.useMemo(()=>{const e=i,o=useChameleonRunStore[e(432,"RpmL")](),t=f?o.score:0,n=f?o[e(424,"CW*M")]:0,W={};return W[e(452,"vC[g")]=f,W[e(488,"Ja8b")]=t,W[e(493,"A2E2")]=A,W[e(497,"9J9F")]="Run Again!",W[e(433,"]e9W")]=R?e(474,"p5T("):e(463,"CW*M"),W[e(490,"W)pb")]=R?e(496,"^M)h")+n+e(418,"2%iJ")+(1===n?"":"s")+"!":e(470,"Rah%")+n+e(508,"[5^Q")+(1===n?"":"s")+"!",W},[f,R,A])};E[i(446,"KU(K")]=a,E[i(450,"2%iJ")]=r;const j={};return j[i(549,"s72%")]=GAME_IDS[i(469,"^M)h")],j.settings=e||DEFAULT_GAME_SETTINGS,j[i(483,"WXcr")]=o,k[i(485,"Y2zd")](_0x34f72d,GestureHandlerRootView,{style:styles[i(541,"Y2zd")],children:_0x9c6e5e(GameBackground,{offset:x,children:[k.jZYHJ(_0x34f72d,GameArea,{gameService:P,offset:x}),_0x34f72d(ScoreBoard,{offset:x}),k.gHmqc(_0x34f72d,GameControlButton,U),k[i(456,"qVLY")](_0x34f72d,GameOverModal,E),_0x34f72d(GameSettingsModal,j)]})})},_0x3ca1bb={flex:1};_0x3ca1bb[_0x4c67b5(478,"WXcr")]=BACKGROUND_COLOR;const _0x3bff3c={};_0x3bff3c[_0x4c67b5(444,"bAxI")]=_0x3ca1bb;const styles=StyleSheet[_0x4c67b5(527,"W)pb")](_0x3bff3c);export const ChameleonRun=ChameleonRunComponent;ChameleonRun.displayName=_0x4c67b5(481,"4sXv");
|
|
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))}
|