react-native-games 0.3.0 → 0.5.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 +134 -130
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +116 -343
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +182 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -0
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +123 -101
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +119 -92
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +123 -113
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +137 -23
- package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/GameBackground.js +8 -83
- package/lib/module/games/balloon-blaster/components/GameBackground.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +15 -22
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/index.js +0 -4
- package/lib/module/games/balloon-blaster/components/index.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinja.js +143 -0
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +148 -0
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -0
- package/lib/module/games/{fruit-slicer/FruitSlicerService.js → fruit-ninja/FruitNinjaService.js} +43 -21
- package/lib/module/games/fruit-ninja/FruitNinjaService.js.map +1 -0
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +191 -0
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -0
- package/lib/module/games/{fruit-slicer → fruit-ninja}/components/FruitComponent.js +1 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js.map +1 -0
- package/lib/module/games/fruit-ninja/components/GameArea.js +215 -0
- package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -0
- package/lib/module/games/{fruit-slicer → fruit-ninja}/components/GameBackground.js +250 -304
- package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -0
- package/lib/module/games/{fruit-slicer → fruit-ninja}/components/ScoreBoard.js +17 -47
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/fruit-ninja/components/index.js +7 -0
- package/lib/module/games/fruit-ninja/components/index.js.map +1 -0
- package/lib/module/games/maze-runner/MazeRunner.js +184 -169
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +100 -0
- package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -0
- package/lib/module/games/maze-runner/MazeRunnerService.js +37 -14
- package/lib/module/games/maze-runner/MazeRunnerService.js.map +1 -1
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +5 -4
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js.map +1 -1
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +20 -15
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -1
- package/lib/module/games/maze-runner/components/GameBackground.js +151 -192
- package/lib/module/games/maze-runner/components/GameBackground.js.map +1 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +15 -25
- package/lib/module/games/maze-runner/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/maze-runner/components/WallComponent.js +3 -2
- package/lib/module/games/maze-runner/components/WallComponent.js.map +1 -1
- package/lib/module/games/maze-runner/components/index.js +0 -2
- package/lib/module/games/maze-runner/components/index.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidget.js +294 -0
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +113 -0
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetService.js +132 -0
- package/lib/module/games/popit-fidget/PopitFidgetService.js.map +1 -0
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +163 -0
- package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -0
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +198 -0
- package/lib/module/games/popit-fidget/components/BubbleComponent.js.map +1 -0
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +165 -0
- package/lib/module/games/popit-fidget/components/FidgetGrid.js.map +1 -0
- package/lib/module/games/popit-fidget/components/GameBackground.js +177 -0
- package/lib/module/games/popit-fidget/components/GameBackground.js.map +1 -0
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +75 -0
- package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/popit-fidget/components/index.js +7 -0
- package/lib/module/games/popit-fidget/components/index.js.map +1 -0
- package/lib/module/games/space-fighter/SpaceFighter.js +169 -0
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -0
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +108 -0
- package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -0
- package/lib/module/games/{space-traveller/SpaceTravellerService.js → space-fighter/SpaceFighterService.js} +48 -21
- package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -0
- package/lib/module/games/space-fighter/SpaceFighterStore.js +195 -0
- package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -0
- package/lib/module/games/{space-traveller → space-fighter}/components/AsteroidComponent.js +7 -5
- package/lib/module/games/space-fighter/components/AsteroidComponent.js.map +1 -0
- package/lib/module/games/space-fighter/components/GameArea.js +295 -0
- package/lib/module/games/space-fighter/components/GameArea.js.map +1 -0
- package/lib/module/games/{space-traveller → space-fighter}/components/GameBackground.js +10 -65
- package/lib/module/games/space-fighter/components/GameBackground.js.map +1 -0
- package/lib/module/games/{space-traveller → space-fighter}/components/ScoreBoard.js +20 -26
- package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/{space-traveller → space-fighter}/components/Spacecraft3D.js +72 -111
- package/lib/module/games/space-fighter/components/Spacecraft3D.js.map +1 -0
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +52 -0
- package/lib/module/games/space-fighter/components/SpacecraftPath.js.map +1 -0
- package/lib/module/games/{space-traveller → space-fighter}/components/index.js +0 -4
- package/lib/module/games/space-fighter/components/index.js.map +1 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js +263 -0
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +115 -0
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +120 -0
- package/lib/module/games/whack-a-mole/WhackAMoleService.js.map +1 -0
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +172 -0
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js.map +1 -0
- package/lib/module/games/{cat-popper → whack-a-mole}/components/GameBackground.js +31 -91
- package/lib/module/games/whack-a-mole/components/GameBackground.js.map +1 -0
- package/lib/module/games/whack-a-mole/components/GameGrid.js +97 -0
- package/lib/module/games/whack-a-mole/components/GameGrid.js.map +1 -0
- package/lib/module/games/{cat-popper → whack-a-mole}/components/GameHole.js +67 -54
- package/lib/module/games/whack-a-mole/components/GameHole.js.map +1 -0
- package/lib/module/games/{cat-popper/components/CatCharacter.js → whack-a-mole/components/MoleCharacter.js} +75 -115
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js.map +1 -0
- package/lib/module/games/{cat-popper → whack-a-mole}/components/ScoreBoard.js +13 -17
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -0
- package/lib/module/games/{cat-popper → whack-a-mole}/components/index.js +1 -3
- package/lib/module/games/whack-a-mole/components/index.js.map +1 -0
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +41 -519
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +35 -23
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/HapticsService.js +77 -0
- package/lib/module/services/HapticsService.js.map +1 -0
- package/lib/module/services/SoundsService.js +171 -0
- package/lib/module/services/SoundsService.js.map +1 -0
- package/lib/module/shared/helpers/AnimationFrame.js +120 -0
- package/lib/module/shared/helpers/AnimationFrame.js.map +1 -0
- package/lib/module/shared/helpers/AnimationTracker.js +89 -0
- package/lib/module/shared/helpers/AnimationTracker.js.map +1 -0
- package/lib/module/shared/helpers/ErrorHandler.js +269 -0
- package/lib/module/shared/helpers/ErrorHandler.js.map +1 -0
- package/lib/module/shared/helpers/GameControlButton.js +219 -0
- package/lib/module/shared/helpers/GameControlButton.js.map +1 -0
- package/lib/module/{games/balloon-blaster/components → shared/helpers}/GameOverModal.js +25 -17
- package/lib/module/shared/helpers/GameOverModal.js.map +1 -0
- package/lib/module/shared/helpers/GameSettingsModal.js +287 -0
- package/lib/module/shared/helpers/GameSettingsModal.js.map +1 -0
- package/lib/module/shared/helpers/ParticleBlast.js +133 -0
- package/lib/module/shared/helpers/ParticleBlast.js.map +1 -0
- package/lib/module/shared/helpers/ResponsiveScoreBoard.js +81 -0
- package/lib/module/shared/helpers/ResponsiveScoreBoard.js.map +1 -0
- package/lib/module/shared/helpers/index.js +12 -0
- package/lib/module/shared/helpers/index.js.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts +2 -14
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +144 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts +12 -2
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterStore.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/BalloonComponent.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts +1 -15
- package/lib/typescript/src/games/balloon-blaster/components/GameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts +1 -7
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/index.d.ts +0 -4
- package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +4 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +112 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/{fruit-slicer/FruitSlicerService.d.ts → fruit-ninja/FruitNinjaService.d.ts} +13 -5
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts.map +1 -0
- package/lib/typescript/src/games/{fruit-slicer/FruitSlicerStore.d.ts → fruit-ninja/FruitNinjaStore.d.ts} +13 -4
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts.map +1 -0
- package/lib/typescript/src/games/{fruit-slicer → fruit-ninja}/components/FruitComponent.d.ts +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/FruitComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +3 -0
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/fruit-ninja/components/index.d.ts +5 -0
- package/lib/typescript/src/games/fruit-ninja/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +2 -16
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +41 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts +4 -2
- package/lib/typescript/src/games/maze-runner/MazeRunnerService.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/EnhancedBallComponent.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/EnhancedGameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts +2 -1
- package/lib/typescript/src/games/maze-runner/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/WallComponent.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/components/index.d.ts +0 -2
- package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +5 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +45 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +33 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +36 -0
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts +12 -0
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts +12 -0
- package/lib/typescript/src/games/popit-fidget/components/FidgetGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts +9 -0
- package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +8 -0
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/popit-fidget/components/index.d.ts +5 -0
- package/lib/typescript/src/games/popit-fidget/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +4 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +71 -0
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/{space-traveller/SpaceTravellerService.d.ts → space-fighter/SpaceFighterService.d.ts} +7 -4
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -0
- package/lib/typescript/src/games/{space-traveller/SpaceTravellerStore.d.ts → space-fighter/SpaceFighterStore.d.ts} +12 -4
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +8 -0
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +3 -0
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +3 -0
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/{space-traveller → space-fighter}/components/Spacecraft3D.d.ts +1 -1
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts.map +1 -0
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts.map +1 -0
- package/lib/typescript/src/games/{space-traveller → space-fighter}/components/index.d.ts +0 -4
- package/lib/typescript/src/games/space-fighter/components/index.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +4 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +79 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts +33 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleService.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts +41 -0
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/GameBackground.d.ts.map +1 -0
- package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/GameGrid.d.ts +2 -2
- package/lib/typescript/src/games/whack-a-mole/components/GameGrid.d.ts.map +1 -0
- package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/GameHole.d.ts +3 -2
- package/lib/typescript/src/games/whack-a-mole/components/GameHole.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts +7 -0
- package/lib/typescript/src/games/whack-a-mole/components/MoleCharacter.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/games/whack-a-mole/components/index.d.ts +6 -0
- package/lib/typescript/src/games/whack-a-mole/components/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +61 -340
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +21 -3
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
- package/lib/typescript/src/services/HapticsService.d.ts +16 -0
- package/lib/typescript/src/services/HapticsService.d.ts.map +1 -0
- package/lib/typescript/src/services/SoundsService.d.ts +154 -0
- package/lib/typescript/src/services/SoundsService.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts +41 -0
- package/lib/typescript/src/shared/helpers/AnimationFrame.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts +45 -0
- package/lib/typescript/src/shared/helpers/AnimationTracker.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts +124 -0
- package/lib/typescript/src/shared/helpers/ErrorHandler.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/GameControlButton.d.ts +17 -0
- package/lib/typescript/src/shared/helpers/GameControlButton.d.ts.map +1 -0
- package/lib/typescript/src/{games/cat-popper/components → shared/helpers}/GameOverModal.d.ts +5 -0
- package/lib/typescript/src/shared/helpers/GameOverModal.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts +9 -0
- package/lib/typescript/src/shared/helpers/GameSettingsModal.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts +12 -0
- package/lib/typescript/src/shared/helpers/ParticleBlast.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts +42 -0
- package/lib/typescript/src/shared/helpers/ResponsiveScoreBoard.d.ts.map +1 -0
- package/lib/typescript/src/shared/helpers/index.d.ts +13 -0
- package/lib/typescript/src/shared/helpers/index.d.ts.map +1 -0
- package/package.json +9 -6
- package/lib/module/games/balloon-blaster/components/GameControls.js +0 -229
- package/lib/module/games/balloon-blaster/components/GameControls.js.map +0 -1
- package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +0 -1
- package/lib/module/games/balloon-blaster/components/ParticleSystem.js +0 -52
- package/lib/module/games/balloon-blaster/components/ParticleSystem.js.map +0 -1
- package/lib/module/games/balloon-blaster/components/SliceTrail.js +0 -58
- package/lib/module/games/balloon-blaster/components/SliceTrail.js.map +0 -1
- package/lib/module/games/cat-popper/CatPopper.js +0 -230
- package/lib/module/games/cat-popper/CatPopper.js.map +0 -1
- package/lib/module/games/cat-popper/CatPopperService.js +0 -100
- package/lib/module/games/cat-popper/CatPopperService.js.map +0 -1
- package/lib/module/games/cat-popper/CatPopperStore.js +0 -113
- package/lib/module/games/cat-popper/CatPopperStore.js.map +0 -1
- package/lib/module/games/cat-popper/components/CatCharacter.js.map +0 -1
- package/lib/module/games/cat-popper/components/GameBackground.js.map +0 -1
- package/lib/module/games/cat-popper/components/GameControls.js +0 -230
- package/lib/module/games/cat-popper/components/GameControls.js.map +0 -1
- package/lib/module/games/cat-popper/components/GameGrid.js +0 -66
- package/lib/module/games/cat-popper/components/GameGrid.js.map +0 -1
- package/lib/module/games/cat-popper/components/GameHole.js.map +0 -1
- package/lib/module/games/cat-popper/components/GameOverModal.js +0 -131
- package/lib/module/games/cat-popper/components/GameOverModal.js.map +0 -1
- package/lib/module/games/cat-popper/components/ScoreBoard.js.map +0 -1
- package/lib/module/games/cat-popper/components/index.js.map +0 -1
- package/lib/module/games/fruit-slicer/FruitSlicer.js +0 -411
- package/lib/module/games/fruit-slicer/FruitSlicer.js.map +0 -1
- package/lib/module/games/fruit-slicer/FruitSlicerService.js.map +0 -1
- package/lib/module/games/fruit-slicer/FruitSlicerStore.js +0 -156
- package/lib/module/games/fruit-slicer/FruitSlicerStore.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/FruitComponent.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/GameArea.js +0 -50
- package/lib/module/games/fruit-slicer/components/GameArea.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/GameBackground.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/GameControls.js +0 -230
- package/lib/module/games/fruit-slicer/components/GameControls.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/GameOverModal.js +0 -189
- package/lib/module/games/fruit-slicer/components/GameOverModal.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/ParticleSystem.js +0 -52
- package/lib/module/games/fruit-slicer/components/ParticleSystem.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/ScoreBoard.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/SliceTrail.js +0 -58
- package/lib/module/games/fruit-slicer/components/SliceTrail.js.map +0 -1
- package/lib/module/games/fruit-slicer/components/index.js +0 -11
- package/lib/module/games/fruit-slicer/components/index.js.map +0 -1
- package/lib/module/games/maze-runner/components/GameControls.js +0 -129
- package/lib/module/games/maze-runner/components/GameControls.js.map +0 -1
- package/lib/module/games/maze-runner/components/GameOverModal.js +0 -134
- package/lib/module/games/maze-runner/components/GameOverModal.js.map +0 -1
- package/lib/module/games/space-traveller/SpaceTraveller.js +0 -393
- package/lib/module/games/space-traveller/SpaceTraveller.js.map +0 -1
- package/lib/module/games/space-traveller/SpaceTravellerService.js.map +0 -1
- package/lib/module/games/space-traveller/SpaceTravellerStore.js +0 -139
- package/lib/module/games/space-traveller/SpaceTravellerStore.js.map +0 -1
- package/lib/module/games/space-traveller/components/AsteroidComponent.js.map +0 -1
- package/lib/module/games/space-traveller/components/GameArea.js +0 -75
- package/lib/module/games/space-traveller/components/GameArea.js.map +0 -1
- package/lib/module/games/space-traveller/components/GameBackground.js.map +0 -1
- package/lib/module/games/space-traveller/components/GameControls.js +0 -177
- package/lib/module/games/space-traveller/components/GameControls.js.map +0 -1
- package/lib/module/games/space-traveller/components/GameOverModal.js +0 -182
- package/lib/module/games/space-traveller/components/GameOverModal.js.map +0 -1
- package/lib/module/games/space-traveller/components/ParticleComponent.js +0 -34
- package/lib/module/games/space-traveller/components/ParticleComponent.js.map +0 -1
- package/lib/module/games/space-traveller/components/ScoreBoard.js.map +0 -1
- package/lib/module/games/space-traveller/components/SettingsModal.js +0 -222
- package/lib/module/games/space-traveller/components/SettingsModal.js.map +0 -1
- package/lib/module/games/space-traveller/components/Spacecraft3D.js.map +0 -1
- package/lib/module/games/space-traveller/components/SpacecraftPath.js +0 -37
- package/lib/module/games/space-traveller/components/SpacecraftPath.js.map +0 -1
- package/lib/module/games/space-traveller/components/index.js.map +0 -1
- package/lib/module/shared/settings/GameSettings.js +0 -295
- package/lib/module/shared/settings/GameSettings.js.map +0 -1
- package/lib/module/shared/settings/SettingsService.js +0 -119
- package/lib/module/shared/settings/SettingsService.js.map +0 -1
- package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts +0 -10
- package/lib/typescript/src/games/balloon-blaster/components/GameControls.d.ts.map +0 -1
- package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/balloon-blaster/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts +0 -8
- package/lib/typescript/src/games/balloon-blaster/components/ParticleSystem.d.ts.map +0 -1
- package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts +0 -11
- package/lib/typescript/src/games/balloon-blaster/components/SliceTrail.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/CatPopper.d.ts +0 -13
- package/lib/typescript/src/games/cat-popper/CatPopper.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts +0 -32
- package/lib/typescript/src/games/cat-popper/CatPopperService.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts +0 -21
- package/lib/typescript/src/games/cat-popper/CatPopperStore.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts +0 -7
- package/lib/typescript/src/games/cat-popper/components/CatCharacter.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/GameBackground.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts +0 -10
- package/lib/typescript/src/games/cat-popper/components/GameControls.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/GameGrid.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/GameHole.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/ScoreBoard.d.ts.map +0 -1
- package/lib/typescript/src/games/cat-popper/components/index.d.ts +0 -8
- package/lib/typescript/src/games/cat-popper/components/index.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts +0 -16
- package/lib/typescript/src/games/fruit-slicer/FruitSlicer.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/FruitSlicerService.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/FruitSlicerStore.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/FruitComponent.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/fruit-slicer/components/GameArea.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/GameBackground.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts +0 -10
- package/lib/typescript/src/games/fruit-slicer/components/GameControls.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/fruit-slicer/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-slicer/components/ParticleSystem.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts +0 -9
- package/lib/typescript/src/games/fruit-slicer/components/ScoreBoard.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts +0 -11
- package/lib/typescript/src/games/fruit-slicer/components/SliceTrail.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-slicer/components/index.d.ts +0 -9
- package/lib/typescript/src/games/fruit-slicer/components/index.d.ts.map +0 -1
- package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts +0 -10
- package/lib/typescript/src/games/maze-runner/components/GameControls.d.ts.map +0 -1
- package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts +0 -11
- package/lib/typescript/src/games/maze-runner/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts +0 -17
- package/lib/typescript/src/games/space-traveller/SpaceTraveller.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/SpaceTravellerService.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/SpaceTravellerStore.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts +0 -9
- package/lib/typescript/src/games/space-traveller/components/AsteroidComponent.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts +0 -17
- package/lib/typescript/src/games/space-traveller/components/GameArea.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/GameBackground.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts +0 -10
- package/lib/typescript/src/games/space-traveller/components/GameControls.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/space-traveller/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts +0 -8
- package/lib/typescript/src/games/space-traveller/components/ParticleComponent.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts +0 -8
- package/lib/typescript/src/games/space-traveller/components/ScoreBoard.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts +0 -9
- package/lib/typescript/src/games/space-traveller/components/SettingsModal.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/Spacecraft3D.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/SpacecraftPath.d.ts.map +0 -1
- package/lib/typescript/src/games/space-traveller/components/index.d.ts.map +0 -1
- package/lib/typescript/src/shared/settings/GameSettings.d.ts +0 -36
- package/lib/typescript/src/shared/settings/GameSettings.d.ts.map +0 -1
- package/lib/typescript/src/shared/settings/SettingsService.d.ts +0 -32
- package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +0 -1
- /package/lib/typescript/src/games/{cat-popper → fruit-ninja}/components/GameBackground.d.ts +0 -0
- /package/lib/typescript/src/games/{fruit-slicer → space-fighter}/components/GameBackground.d.ts +0 -0
- /package/lib/typescript/src/games/{space-traveller → space-fighter}/components/SpacecraftPath.d.ts +0 -0
- /package/lib/typescript/src/games/{space-traveller → whack-a-mole}/components/GameBackground.d.ts +0 -0
- /package/lib/typescript/src/games/{cat-popper → whack-a-mole}/components/ScoreBoard.d.ts +0 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
import { subscribeWithSelector } from 'zustand/middleware';
|
|
5
|
+
import { GAME_CONFIG } from "./PopitFidgetService.js";
|
|
6
|
+
import { immerMiddleware } from "../../services/GamesService.js";
|
|
7
|
+
// Optimized store with selective subscriptions for low-end devices
|
|
8
|
+
export const usePopitFidgetStore = create()(subscribeWithSelector(immerMiddleware((set, get) => ({
|
|
9
|
+
// Initial state
|
|
10
|
+
score: 0,
|
|
11
|
+
timeLeft: 60,
|
|
12
|
+
// Default duration, will be set based on difficulty
|
|
13
|
+
isPlaying: false,
|
|
14
|
+
gameOver: false,
|
|
15
|
+
gameWon: false,
|
|
16
|
+
fidgetGrid: null,
|
|
17
|
+
bubblesPopped: 0,
|
|
18
|
+
totalBubbles: 0,
|
|
19
|
+
bubbleStates: {},
|
|
20
|
+
// Actions
|
|
21
|
+
startGame: _gameDuration => {
|
|
22
|
+
// Always use fixed duration regardless of difficulty or passed duration
|
|
23
|
+
const duration = 60;
|
|
24
|
+
set(draft => {
|
|
25
|
+
draft.isPlaying = true;
|
|
26
|
+
draft.gameOver = false;
|
|
27
|
+
draft.gameWon = false;
|
|
28
|
+
draft.timeLeft = duration;
|
|
29
|
+
draft.score = 0;
|
|
30
|
+
draft.bubblesPopped = 0;
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
stopGame: () => {
|
|
34
|
+
set(draft => {
|
|
35
|
+
draft.isPlaying = false;
|
|
36
|
+
draft.gameOver = true;
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
resetGame: () => {
|
|
40
|
+
set(draft => {
|
|
41
|
+
draft.score = 0;
|
|
42
|
+
draft.timeLeft = 60; // Fixed 60 seconds
|
|
43
|
+
draft.isPlaying = false;
|
|
44
|
+
draft.gameOver = false;
|
|
45
|
+
draft.gameWon = false;
|
|
46
|
+
draft.fidgetGrid = null;
|
|
47
|
+
draft.bubblesPopped = 0;
|
|
48
|
+
draft.totalBubbles = 0;
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
setFidgetGrid: grid => {
|
|
52
|
+
// For square grids, total bubbles = size * size
|
|
53
|
+
const totalCount = grid.size * grid.size;
|
|
54
|
+
set(draft => {
|
|
55
|
+
draft.fidgetGrid = grid;
|
|
56
|
+
draft.totalBubbles = totalCount;
|
|
57
|
+
draft.bubblesPopped = 0;
|
|
58
|
+
|
|
59
|
+
// Initialize bubble states for all bubbles
|
|
60
|
+
draft.bubbleStates = {};
|
|
61
|
+
for (let row = 0; row < grid.size; row++) {
|
|
62
|
+
for (let col = 0; col < grid.size; col++) {
|
|
63
|
+
const bubble = grid.bubbles[row]?.[col];
|
|
64
|
+
if (bubble) {
|
|
65
|
+
draft.bubbleStates[bubble.id] = {
|
|
66
|
+
isPopped: bubble.isPopped || false,
|
|
67
|
+
popTime: bubble.popTime
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
popBubble: (row, col) => {
|
|
75
|
+
set(draft => {
|
|
76
|
+
if (!draft.fidgetGrid) return;
|
|
77
|
+
const bubble = draft.fidgetGrid.bubbles[row]?.[col];
|
|
78
|
+
if (!bubble) return;
|
|
79
|
+
|
|
80
|
+
// Check if bubble is already popped using bubbleStates
|
|
81
|
+
const bubbleState = draft.bubbleStates[bubble.id];
|
|
82
|
+
if (bubbleState?.isPopped) return;
|
|
83
|
+
|
|
84
|
+
// Update only the bubbleStates, not the fidgetGrid
|
|
85
|
+
// This prevents the entire fidgetGrid array from changing references
|
|
86
|
+
draft.bubbleStates[bubble.id] = {
|
|
87
|
+
isPopped: true,
|
|
88
|
+
popTime: Date.now()
|
|
89
|
+
};
|
|
90
|
+
draft.bubblesPopped = draft.bubblesPopped + 1;
|
|
91
|
+
|
|
92
|
+
// Only update score if game is actively playing
|
|
93
|
+
if (draft.isPlaying) {
|
|
94
|
+
// Simple scoring - just add base points per bubble
|
|
95
|
+
const points = GAME_CONFIG.POINTS_PER_BUBBLE;
|
|
96
|
+
draft.score = draft.score + points;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// Check if game is won (only if actively playing)
|
|
101
|
+
const state = get();
|
|
102
|
+
if (state.isPlaying) {
|
|
103
|
+
get().checkGameWon();
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
updateScore: points => {
|
|
107
|
+
set(draft => {
|
|
108
|
+
draft.score = draft.score + points;
|
|
109
|
+
});
|
|
110
|
+
},
|
|
111
|
+
decrementTime: () => {
|
|
112
|
+
set(draft => {
|
|
113
|
+
const newTimeLeft = Math.max(0, draft.timeLeft - 1);
|
|
114
|
+
draft.timeLeft = newTimeLeft;
|
|
115
|
+
if (newTimeLeft === 0 && draft.isPlaying) {
|
|
116
|
+
draft.isPlaying = false;
|
|
117
|
+
draft.gameOver = true;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
setTimeLeft: timeLeft => {
|
|
122
|
+
set(draft => {
|
|
123
|
+
const newTimeLeft = Math.max(0, timeLeft);
|
|
124
|
+
draft.timeLeft = newTimeLeft;
|
|
125
|
+
if (newTimeLeft === 0 && draft.isPlaying) {
|
|
126
|
+
draft.isPlaying = false;
|
|
127
|
+
draft.gameOver = true;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
checkGameWon: () => {
|
|
132
|
+
const state = get();
|
|
133
|
+
if (!state.fidgetGrid) return;
|
|
134
|
+
|
|
135
|
+
// Check if all bubbles are popped using bubbleStates
|
|
136
|
+
let allPopped = true;
|
|
137
|
+
for (let row = 0; row < state.fidgetGrid.size; row++) {
|
|
138
|
+
for (let col = 0; col < state.fidgetGrid.size; col++) {
|
|
139
|
+
const bubble = state.fidgetGrid.bubbles[row]?.[col];
|
|
140
|
+
if (bubble) {
|
|
141
|
+
const bubbleState = state.bubbleStates[bubble.id];
|
|
142
|
+
if (!bubbleState?.isPopped) {
|
|
143
|
+
allPopped = false;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (!allPopped) break;
|
|
149
|
+
}
|
|
150
|
+
if (allPopped && state.isPlaying) {
|
|
151
|
+
// Bonus points for completing the fidget
|
|
152
|
+
const completionBonus = GAME_CONFIG.COMPLETION_BONUS;
|
|
153
|
+
const timeBonus = Math.floor(state.timeLeft * GAME_CONFIG.TIME_BONUS_MULTIPLIER);
|
|
154
|
+
set(draft => {
|
|
155
|
+
draft.isPlaying = false;
|
|
156
|
+
draft.gameWon = true;
|
|
157
|
+
draft.gameOver = true;
|
|
158
|
+
draft.score = state.score + completionBonus + timeBonus;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}))));
|
|
163
|
+
//# sourceMappingURL=PopitFidgetStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["create","subscribeWithSelector","GAME_CONFIG","immerMiddleware","usePopitFidgetStore","set","get","score","timeLeft","isPlaying","gameOver","gameWon","fidgetGrid","bubblesPopped","totalBubbles","bubbleStates","startGame","_gameDuration","duration","draft","stopGame","resetGame","setFidgetGrid","grid","totalCount","size","row","col","bubble","bubbles","id","isPopped","popTime","popBubble","bubbleState","Date","now","points","POINTS_PER_BUBBLE","state","checkGameWon","updateScore","decrementTime","newTimeLeft","Math","max","setTimeLeft","allPopped","completionBonus","COMPLETION_BONUS","timeBonus","floor","TIME_BONUS_MULTIPLIER"],"sourceRoot":"../../../../src","sources":["games/popit-fidget/PopitFidgetStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,qBAAqB,QAAQ,oBAAoB;AAE1D,SAASC,WAAW,QAAQ,yBAAsB;AAClD,SAASC,eAAe,QAAQ,gCAA6B;AA6B7D;AACA,OAAO,MAAMC,mBAAmB,GAAGJ,MAAM,CAAmB,CAAC,CAC3DC,qBAAqB,CACnBE,eAAe,CAAC,CAACE,GAAQ,EAAEC,GAAQ,MAAM;EAC3C;EACAC,KAAK,EAAE,CAAC;EACRC,QAAQ,EAAE,EAAE;EAAE;EACdC,SAAS,EAAE,KAAK;EAChBC,QAAQ,EAAE,KAAK;EACfC,OAAO,EAAE,KAAK;EACdC,UAAU,EAAE,IAAI;EAChBC,aAAa,EAAE,CAAC;EAChBC,YAAY,EAAE,CAAC;EACfC,YAAY,EAAE,CAAC,CAAC;EAEhB;EACAC,SAAS,EAAGC,aAAsB,IAAK;IACrC;IACA,MAAMC,QAAQ,GAAG,EAAE;IACnBb,GAAG,CAAEc,KAAU,IAAK;MAClBA,KAAK,CAACV,SAAS,GAAG,IAAI;MACtBU,KAAK,C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AAGa,KAAK,CAAC3B,UAAU,CAACa,IAAI,EAAEC,GAAG,EAAE,EAAE;MACpD,KAAK,IAAIC,GAAG,GAAG,CAAC,EAAEA,GAAG,GAAGY,KAAK,CAAC3B,UAAU,CAACa,IAAI,EAAEE,GAAG,EAAE,EAAE;QACpD,MAAMC,MAAM,GAAGW,KAAK,CAAC3B,UAAU,CAACiB,OAAO,CAACH,GAAG,CAAC,GAAGC,GAAG,CAAC;QACnD,IAAIC,MAAM,EAAE;UACV,MAAMM,WAAW,GAAGK,KAAK,CAACxB,YAAY,CAACa,MAAM,CAACE,EAAE,CAAC;UACjD,IAAI,CAACI,WAAW,EAAEH,QAAQ,EAAE;YAC1BgB,SAAS,GAAG,KAAK;YACjB;UACF;QACF;MACF;MACA,IAAI,CAACA,SAAS,EAAE;IAClB;IAEA,IAAIA,SAAS,IAAIR,KAAK,CAAC9B,SAAS,EAAE;MAChC;MACA,MAAMuC,eAAe,GAAG9C,WAAW,CAAC+C,gBAAgB;MACpD,MAAMC,SAAS,GAAGN,IAAI,CAACO,KAAK,CAACZ,KAAK,CAAC/B,QAAQ,GAAGN,WAAW,CAACkD,qBAAqB,CAAC;MAEhF/C,GAAG,CAAEc,KAAU,IAAK;QAClBA,KAAK,CAACV,SAAS,GAAG,KAAK;QACvBU,KAAK,CAACR,OAAO,GAAG,IAAI;QACpBQ,KAAK,CAACT,QAAQ,GAAG,IAAI;QACrBS,KAAK,CAACZ,KAAK,GAAGgC,KAAK,CAAChC,KAAK,GAAGyC,eAAe,GAAGE,SAAS;MACzD,CAAC,CAAC;IACJ;EACF;AACF,CAAC,CAAC,CACA,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useCallback, useMemo } from 'react';
|
|
4
|
+
import { View, TouchableOpacity } from 'react-native';
|
|
5
|
+
import { Canvas, Circle, LinearGradient, vec, Shadow } from '@shopify/react-native-skia';
|
|
6
|
+
import { playHaptic, HapticType } from "../../../services/HapticsService.js";
|
|
7
|
+
import { usePopitFidgetStore } from "../PopitFidgetStore.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const BubbleComponent = ({
|
|
10
|
+
bubble,
|
|
11
|
+
size,
|
|
12
|
+
onPop,
|
|
13
|
+
hapticEnabled = true,
|
|
14
|
+
isPlaying
|
|
15
|
+
}) => {
|
|
16
|
+
// Get bubble state from store to prevent re-renders when other bubbles change
|
|
17
|
+
const bubbleState = usePopitFidgetStore(state => state.bubbleStates[bubble.id]);
|
|
18
|
+
const isPopped = bubbleState?.isPopped || false;
|
|
19
|
+
// Simple state for press feedback - no animations to prevent crashes
|
|
20
|
+
const [isPressed, setIsPressed] = useState(false);
|
|
21
|
+
|
|
22
|
+
// Memoize callbacks to prevent unnecessary re-renders
|
|
23
|
+
const handlePop = useCallback(() => {
|
|
24
|
+
// Only allow popping when game is actively playing
|
|
25
|
+
if (!isPlaying || isPopped) return;
|
|
26
|
+
|
|
27
|
+
// Enhanced haptic feedback - stronger for more satisfaction
|
|
28
|
+
playHaptic(HapticType.MEDIUM, hapticEnabled || false);
|
|
29
|
+
|
|
30
|
+
// Trigger pop callback
|
|
31
|
+
onPop();
|
|
32
|
+
}, [onPop, hapticEnabled, isPlaying, isPopped]);
|
|
33
|
+
const handlePressIn = useCallback(() => {
|
|
34
|
+
if (!isPopped && isPlaying) {
|
|
35
|
+
setIsPressed(true);
|
|
36
|
+
// Haptic feedback on press
|
|
37
|
+
playHaptic(HapticType.LIGHT, hapticEnabled || false);
|
|
38
|
+
}
|
|
39
|
+
}, [isPopped, isPlaying, hapticEnabled]);
|
|
40
|
+
const handlePressOut = useCallback(() => {
|
|
41
|
+
setIsPressed(false);
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
// Memoize bubble style to prevent recalculation
|
|
45
|
+
const bubbleStyle = useMemo(() => ({
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
left: bubble.x - size / 2,
|
|
48
|
+
top: bubble.y - size / 2,
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
transform: [{
|
|
52
|
+
scale: isPressed ? 0.95 : 1
|
|
53
|
+
}]
|
|
54
|
+
}), [bubble.x, bubble.y, size, isPressed]);
|
|
55
|
+
|
|
56
|
+
// Simplified popped state rendering
|
|
57
|
+
if (isPopped) {
|
|
58
|
+
return /*#__PURE__*/_jsx(View, {
|
|
59
|
+
style: bubbleStyle,
|
|
60
|
+
children: /*#__PURE__*/_jsxs(Canvas, {
|
|
61
|
+
style: {
|
|
62
|
+
width: size,
|
|
63
|
+
height: size
|
|
64
|
+
},
|
|
65
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
66
|
+
cx: size / 2,
|
|
67
|
+
cy: size / 2,
|
|
68
|
+
r: size / 2,
|
|
69
|
+
color: bubble.color,
|
|
70
|
+
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
71
|
+
start: vec(0, 0),
|
|
72
|
+
end: vec(size, size),
|
|
73
|
+
colors: [`${bubble.color}60`,
|
|
74
|
+
// Muted to show flatness
|
|
75
|
+
`${bubble.color}40`,
|
|
76
|
+
// More muted
|
|
77
|
+
`${bubble.color}30` // Very muted to show depression
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
81
|
+
cx: size / 2,
|
|
82
|
+
cy: size / 2 + 1,
|
|
83
|
+
r: size / 2 - 6,
|
|
84
|
+
color: bubble.color,
|
|
85
|
+
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
86
|
+
start: vec(size * 0.7, size * 0.7),
|
|
87
|
+
end: vec(size * 0.3, size * 0.3),
|
|
88
|
+
colors: ['#FFFFFF30',
|
|
89
|
+
// Light highlight
|
|
90
|
+
`${bubble.color}80`,
|
|
91
|
+
// Bubble color
|
|
92
|
+
'#00000020' // Subtle shadow
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
96
|
+
cx: size / 2 + size * 0.15,
|
|
97
|
+
cy: size / 2 + size * 0.2,
|
|
98
|
+
r: size * 0.06,
|
|
99
|
+
color: "#FFFFFF",
|
|
100
|
+
opacity: 0.6
|
|
101
|
+
})]
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Simplified unpopped bubble rendering with TouchableOpacity wrapper for iOS/Android compatibility
|
|
107
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
108
|
+
style: bubbleStyle,
|
|
109
|
+
children: [/*#__PURE__*/_jsxs(Canvas, {
|
|
110
|
+
style: {
|
|
111
|
+
width: size,
|
|
112
|
+
height: size
|
|
113
|
+
},
|
|
114
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
115
|
+
cx: size / 2,
|
|
116
|
+
cy: size / 2,
|
|
117
|
+
r: size / 2,
|
|
118
|
+
color: bubble.color,
|
|
119
|
+
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
120
|
+
start: vec(0, 0),
|
|
121
|
+
end: vec(size, size),
|
|
122
|
+
colors: [`${bubble.color}E0`, `${bubble.color}A0`, `${bubble.color}80`]
|
|
123
|
+
})
|
|
124
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
125
|
+
cx: size / 2,
|
|
126
|
+
cy: size / 2 + 2,
|
|
127
|
+
r: size / 2 - 4,
|
|
128
|
+
color: "rgba(0,0,0,0.15)"
|
|
129
|
+
}), /*#__PURE__*/_jsxs(Circle, {
|
|
130
|
+
cx: size / 2,
|
|
131
|
+
cy: size / 2 - 1,
|
|
132
|
+
r: size / 2 - 4,
|
|
133
|
+
color: bubble.color,
|
|
134
|
+
children: [/*#__PURE__*/_jsx(LinearGradient, {
|
|
135
|
+
start: vec(size * 0.2, size * 0.2),
|
|
136
|
+
end: vec(size * 0.8, size * 0.8),
|
|
137
|
+
colors: ['#FFFFFF', '#FFFFFFA0', bubble.color, `${bubble.color}C0`, '#00000020']
|
|
138
|
+
}), /*#__PURE__*/_jsx(Shadow, {
|
|
139
|
+
dx: 0,
|
|
140
|
+
dy: 3,
|
|
141
|
+
blur: 6,
|
|
142
|
+
color: "rgba(0,0,0,0.2)"
|
|
143
|
+
})]
|
|
144
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
145
|
+
cx: size / 2 - size * 0.15,
|
|
146
|
+
cy: size / 2 - size * 0.2,
|
|
147
|
+
r: size * 0.12,
|
|
148
|
+
color: "#FFFFFF",
|
|
149
|
+
opacity: 0.8,
|
|
150
|
+
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
151
|
+
start: vec(0, 0),
|
|
152
|
+
end: vec(size * 0.24, size * 0.24),
|
|
153
|
+
colors: ['#FFFFFF', '#FFFFFF80', '#FFFFFF00']
|
|
154
|
+
})
|
|
155
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
156
|
+
cx: size / 2 + size * 0.1,
|
|
157
|
+
cy: size / 2 - size * 0.15,
|
|
158
|
+
r: size * 0.06,
|
|
159
|
+
color: "#FFFFFF",
|
|
160
|
+
opacity: 0.6
|
|
161
|
+
})]
|
|
162
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
163
|
+
style: {
|
|
164
|
+
position: 'absolute',
|
|
165
|
+
top: 0,
|
|
166
|
+
left: 0,
|
|
167
|
+
width: size,
|
|
168
|
+
height: size,
|
|
169
|
+
backgroundColor: 'transparent'
|
|
170
|
+
},
|
|
171
|
+
onPress: handlePop,
|
|
172
|
+
onPressIn: handlePressIn,
|
|
173
|
+
onPressOut: handlePressOut,
|
|
174
|
+
activeOpacity: 1,
|
|
175
|
+
disabled: isPopped || !isPlaying,
|
|
176
|
+
hitSlop: {
|
|
177
|
+
top: 10,
|
|
178
|
+
bottom: 10,
|
|
179
|
+
left: 10,
|
|
180
|
+
right: 10
|
|
181
|
+
},
|
|
182
|
+
delayPressIn: 0,
|
|
183
|
+
delayPressOut: 0
|
|
184
|
+
})]
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// Memoized BubbleComponent with custom comparison to prevent unnecessary re-renders
|
|
189
|
+
// Note: We don't compare onPop function reference as it may change but functionality remains the same
|
|
190
|
+
// Note: We don't compare bubble.isPopped as we now use store state which is subscribed individually
|
|
191
|
+
const MemoizedBubbleComponent = /*#__PURE__*/React.memo(BubbleComponent, (prevProps, nextProps) => {
|
|
192
|
+
return prevProps.bubble.id === nextProps.bubble.id && prevProps.bubble.x === nextProps.bubble.x && prevProps.bubble.y === nextProps.bubble.y && prevProps.bubble.color === nextProps.bubble.color && prevProps.size === nextProps.size && prevProps.hapticEnabled === nextProps.hapticEnabled && prevProps.isPlaying === nextProps.isPlaying
|
|
193
|
+
// Removed bubble.isPopped comparison as we now use individual store subscriptions
|
|
194
|
+
// Removed onPop comparison as function reference may change but behavior is the same
|
|
195
|
+
;
|
|
196
|
+
});
|
|
197
|
+
export default MemoizedBubbleComponent;
|
|
198
|
+
//# sourceMappingURL=BubbleComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","useMemo","View","TouchableOpacity","Canvas","Circle","LinearGradient","vec","Shadow","playHaptic","HapticType","usePopitFidgetStore","jsx","_jsx","jsxs","_jsxs","BubbleComponent","bubble","size","onPop","hapticEnabled","isPlaying","bubbleState","state","bubbleStates","id","isPopped","isPressed","setIsPressed","handlePop","MEDIUM","handlePressIn","LIGHT","handlePressOut","bubbleStyle","position","left","x","top","y","width","height","transform","scale","style","children","cx","cy","r","color","start","end","colors","opacity","dx","dy","blur","backgroundColor","onPress","onPressIn","onPressOut","activeOpacity","disabled","hitSlop","bottom","right","delayPressIn","delayPressOut","MemoizedBubbleComponent","memo","prevProps","nextProps"],"sourceRoot":"../../../../../src","sources":["games/popit-fidget/components/BubbleComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,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B,cAAe;MAC3B4B,aAAa,EAAE,CAAE;MACjBC,QAAQ,EAAEpC,QAAQ,IAAI,CAACL,SAAU;MACjC0C,OAAO,EAAE;QAAEzB,GAAG,EAAE,EAAE;QAAE0B,MAAM,EAAE,EAAE;QAAE5B,IAAI,EAAE,EAAE;QAAE6B,KAAK,EAAE;MAAG,CAAE;MACtDC,YAAY,EAAE,CAAE;MAChBC,aAAa,EAAE;IAAE,CAClB,CAAC;EAAA,CACE,CAAC;AAEX,CAAC;;AAED;AACA;AACA;AACA,MAAMC,uBAAuB,gBAAGtE,KAAK,CAACuE,IAAI,CAACrD,eAAe,EAAE,CAACsD,SAAS,EAAEC,SAAS,KAAK;EACpF,OACED,SAAS,CAACrD,MAAM,CAACQ,EAAE,KAAK8C,SAAS,CAACtD,MAAM,CAACQ,EAAE,IAC3C6C,SAAS,CAACrD,MAAM,CAACoB,CAAC,KAAKkC,SAAS,CAACtD,MAAM,CAACoB,CAAC,IACzCiC,SAAS,CAACrD,MAAM,CAACsB,CAAC,KAAKgC,SAAS,CAACtD,MAAM,CAACsB,CAAC,IACzC+B,SAAS,CAACrD,MAAM,CAACgC,KAAK,KAAKsB,SAAS,CAACtD,MAAM,CAACgC,KAAK,IACjDqB,SAAS,CAACpD,IAAI,KAAKqD,SAAS,CAACrD,IAAI,IACjCoD,SAAS,CAAClD,aAAa,KAAKmD,SAAS,CAACnD,aAAa,IACnDkD,SAAS,CAACjD,SAAS,KAAKkD,SAAS,CAAClD;EAClC;EACA;EAAA;AAEJ,CAAC,CAAC;AAEF,eAAe+C,uBAAuB","ignoreList":[]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useMemo, useCallback } from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { RAINBOW_COLORS } from "../PopitFidgetConstants.js";
|
|
6
|
+
import BubbleComponent from "./BubbleComponent.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const FidgetGrid = ({
|
|
9
|
+
grid,
|
|
10
|
+
bubbleSize,
|
|
11
|
+
onBubblePop,
|
|
12
|
+
hapticEnabled = true,
|
|
13
|
+
isPlaying
|
|
14
|
+
}) => {
|
|
15
|
+
const padding = 20;
|
|
16
|
+
|
|
17
|
+
// Memoize row color calculation to prevent recalculation
|
|
18
|
+
const getRowColor = useCallback(rowIndex => {
|
|
19
|
+
const colorIndex = Math.floor(rowIndex / (grid.size - 1) * (RAINBOW_COLORS.length - 1));
|
|
20
|
+
return RAINBOW_COLORS[colorIndex] || RAINBOW_COLORS[0];
|
|
21
|
+
}, [grid.size]);
|
|
22
|
+
|
|
23
|
+
// Memoize container dimensions to prevent recalculation
|
|
24
|
+
const containerDimensions = useMemo(() => ({
|
|
25
|
+
width: grid.width + padding * 2,
|
|
26
|
+
height: grid.height + padding * 2
|
|
27
|
+
}), [grid.width, grid.height, padding]);
|
|
28
|
+
|
|
29
|
+
// Memoize bubble pop handlers using a stable reference pattern
|
|
30
|
+
const bubblePopHandlers = useMemo(() => {
|
|
31
|
+
const handlers = {};
|
|
32
|
+
grid.bubbles.forEach((row, rowIndex) => {
|
|
33
|
+
row.forEach((bubble, colIndex) => {
|
|
34
|
+
if (bubble) {
|
|
35
|
+
handlers[bubble.id] = () => onBubblePop(rowIndex, colIndex);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
return handlers;
|
|
40
|
+
}, [grid.bubbles, onBubblePop]);
|
|
41
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
42
|
+
style: [styles.container, containerDimensions],
|
|
43
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
44
|
+
style: [styles.backgroundContainer, styles.fidget3D, {
|
|
45
|
+
...containerDimensions,
|
|
46
|
+
borderRadius: 20,
|
|
47
|
+
overflow: 'hidden'
|
|
48
|
+
}],
|
|
49
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
50
|
+
style: [styles.outerBorder, {
|
|
51
|
+
...containerDimensions,
|
|
52
|
+
borderRadius: 20
|
|
53
|
+
}]
|
|
54
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
55
|
+
style: [styles.innerRecess, {
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
left: 8,
|
|
58
|
+
top: 8,
|
|
59
|
+
width: containerDimensions.width - 16,
|
|
60
|
+
height: containerDimensions.height - 16,
|
|
61
|
+
borderRadius: 12,
|
|
62
|
+
overflow: 'hidden'
|
|
63
|
+
}],
|
|
64
|
+
children: grid.bubbles.map((_, rowIndex) => {
|
|
65
|
+
const rowHeight = grid.height / grid.size;
|
|
66
|
+
const rowColor = getRowColor(rowIndex);
|
|
67
|
+
return /*#__PURE__*/_jsx(View, {
|
|
68
|
+
style: {
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
left: padding - 8,
|
|
71
|
+
top: padding - 8 + rowIndex * rowHeight,
|
|
72
|
+
width: grid.width,
|
|
73
|
+
height: rowHeight,
|
|
74
|
+
backgroundColor: `${rowColor}50`
|
|
75
|
+
}
|
|
76
|
+
}, `row-bg-${rowIndex}`);
|
|
77
|
+
})
|
|
78
|
+
})]
|
|
79
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
80
|
+
style: {
|
|
81
|
+
position: 'absolute',
|
|
82
|
+
left: padding,
|
|
83
|
+
top: padding
|
|
84
|
+
},
|
|
85
|
+
children: grid.bubbles.map((row, _rowIndex) => row.map((bubble, _colIndex) => {
|
|
86
|
+
if (!bubble) return null;
|
|
87
|
+
const bubbleHandler = bubblePopHandlers[bubble.id];
|
|
88
|
+
if (!bubbleHandler) return null;
|
|
89
|
+
return /*#__PURE__*/_jsx(BubbleComponent, {
|
|
90
|
+
bubble: bubble,
|
|
91
|
+
size: bubbleSize,
|
|
92
|
+
onPop: bubbleHandler,
|
|
93
|
+
hapticEnabled: hapticEnabled,
|
|
94
|
+
isPlaying: isPlaying
|
|
95
|
+
}, bubble.id);
|
|
96
|
+
}))
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
const styles = StyleSheet.create({
|
|
101
|
+
container: {
|
|
102
|
+
position: 'relative',
|
|
103
|
+
padding: 15
|
|
104
|
+
// Removed flex: 1 since we now use explicit width/height
|
|
105
|
+
// The parent gameArea container handles centering
|
|
106
|
+
},
|
|
107
|
+
backgroundContainer: {
|
|
108
|
+
position: 'absolute'
|
|
109
|
+
},
|
|
110
|
+
fidget3D: {
|
|
111
|
+
// Deep shadow for authentic Pop It depth
|
|
112
|
+
shadowColor: '#000',
|
|
113
|
+
shadowOffset: {
|
|
114
|
+
width: 0,
|
|
115
|
+
height: 8
|
|
116
|
+
},
|
|
117
|
+
shadowOpacity: 0.4,
|
|
118
|
+
shadowRadius: 12,
|
|
119
|
+
elevation: 12
|
|
120
|
+
},
|
|
121
|
+
outerBorder: {
|
|
122
|
+
position: 'absolute',
|
|
123
|
+
backgroundColor: '#f0f0f0',
|
|
124
|
+
// Raised border gradient effect using multiple borders
|
|
125
|
+
borderWidth: 2,
|
|
126
|
+
borderTopColor: '#ffffff',
|
|
127
|
+
borderLeftColor: '#ffffff',
|
|
128
|
+
borderRightColor: '#cccccc',
|
|
129
|
+
borderBottomColor: '#aaaaaa'
|
|
130
|
+
},
|
|
131
|
+
innerRecess: {
|
|
132
|
+
backgroundColor: '#e8e8e8',
|
|
133
|
+
// Recessed inner area with inverted lighting
|
|
134
|
+
borderWidth: 1,
|
|
135
|
+
borderTopColor: '#cccccc',
|
|
136
|
+
borderLeftColor: '#cccccc',
|
|
137
|
+
borderRightColor: '#ffffff',
|
|
138
|
+
borderBottomColor: '#ffffff',
|
|
139
|
+
// Inner shadow effect
|
|
140
|
+
shadowColor: '#000',
|
|
141
|
+
shadowOffset: {
|
|
142
|
+
width: 0,
|
|
143
|
+
height: -2
|
|
144
|
+
},
|
|
145
|
+
shadowOpacity: 0.2,
|
|
146
|
+
shadowRadius: 4,
|
|
147
|
+
elevation: -2
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// Memoized FidgetGrid component to prevent unnecessary re-renders
|
|
152
|
+
const MemoizedFidgetGrid = /*#__PURE__*/React.memo(FidgetGrid, (prevProps, nextProps) => {
|
|
153
|
+
// Only re-render if grid structure, bubble states, or key props change
|
|
154
|
+
return prevProps.grid.size === nextProps.grid.size && prevProps.grid.width === nextProps.grid.width && prevProps.grid.height === nextProps.grid.height && prevProps.bubbleSize === nextProps.bubbleSize && prevProps.hapticEnabled === nextProps.hapticEnabled && prevProps.isPlaying === nextProps.isPlaying && prevProps.onBubblePop === nextProps.onBubblePop &&
|
|
155
|
+
// Check if bubble states have changed
|
|
156
|
+
JSON.stringify(prevProps.grid.bubbles.map(row => row.map(bubble => bubble ? {
|
|
157
|
+
id: bubble.id,
|
|
158
|
+
isPopped: bubble.isPopped
|
|
159
|
+
} : null))) === JSON.stringify(nextProps.grid.bubbles.map(row => row.map(bubble => bubble ? {
|
|
160
|
+
id: bubble.id,
|
|
161
|
+
isPopped: bubble.isPopped
|
|
162
|
+
} : null)));
|
|
163
|
+
});
|
|
164
|
+
export default MemoizedFidgetGrid;
|
|
165
|
+
//# sourceMappingURL=FidgetGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","useCallback","View","StyleSheet","RAINBOW_COLORS","BubbleComponent","jsx","_jsx","jsxs","_jsxs","FidgetGrid","grid","bubbleSize","onBubblePop","hapticEnabled","isPlaying","padding","getRowColor","rowIndex","colorIndex","Math","floor","size","length","containerDimensions","width","height","bubblePopHandlers","handlers","bubbles","forEach","row","bubble","colIndex","id","style","styles","container","children","backgroundContainer","fidget3D","borderRadius","overflow","outerBorder","innerRecess","position","left","top","map","_","rowHeight","rowColor","backgroundColor","_rowIndex","_colIndex","bubbleHandler","onPop","create","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderWidth","borderTopColor","borderLeftColor","borderRightColor","borderBottomColor","MemoizedFidgetGrid","memo","prevProps","nextProps","JSON","stringify","isPopped"],"sourceRoot":"../../../../../src","sources":["games/popit-fidget/components/FidgetGrid.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AACnD,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,SAASC,cAAc,QAAQ,4BAAyB;AACxD,OAAOC,eAAe,MAAM,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUhD,MAAMC,UAAqC,GAAGA,CAAC;EAC7CC,IAAI;EACJC,UAAU;EACVC,WAAW;EACXC,aAAa,GAAG,IAAI;EACpBC;AACF,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAG,EAAE;;EAElB;EACA,MAAMC,WAAW,GAAGhB,WAAW,CAAEiB,QAAgB,IAAK;IACpD,MAAMC,UAAU,GAAGC,IAAI,CAACC,KAAK,CAAEH,QAAQ,IAAIP,IAAI,CAACW,IAAI,GAAG,CAAC,CAAC,IAAKlB,cAAc,CAACmB,MAAM,GAAG,CAAC,CAAC,CAAC;IACzF,OAAOnB,cAAc,CAACe,UAAU,CAAC,IAAIf,cAAc,CAAC,CAAC,CAAC;EACxD,CAAC,EAAE,CAACO,IAAI,CAACW,IAAI,CAAC,CAAC;;EAEf;EACA,MAAME,mBAAmB,GAAGxB,OAAO,CAAC,OAAO;IACzCyB,KAAK,EAAEd,IAAI,CAACc,KAAK,GAAGT,OAAO,GAAG,CAAC;IAC/BU,MAAM,EAAEf,IAAI,CAACe,MAAM,GAAGV,OAAO,GAAG;EAClC,CAAC,CAAC,EAAE,CAACL,IAAI,CAACc,KAAK,EAAEd,IAAI,CAACe,MAAM,EAAEV,OAAO,CAAC,CAAC;;EAEvC;EACA,MAAMW,iBAAiB,GAAG3B,OAAO,CAAC,MAAM;IACtC,MAAM4B,QAAuC,GAAG,CAAC,CAAC;IAClDjB,IAAI,CAACkB,OAAO,CAACC,O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