react-native-games 0.4.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 +121 -130
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +111 -423
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +27 -28
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +42 -117
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +12 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +102 -75
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/GameArea.js +139 -30
- package/lib/module/games/balloon-blaster/components/GameArea.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +7 -6
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/index.js +0 -3
- package/lib/module/games/balloon-blaster/components/index.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinja.js +94 -376
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +19 -22
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +30 -9
- package/lib/module/games/fruit-ninja/FruitNinjaService.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +29 -4
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/GameArea.js +194 -29
- package/lib/module/games/fruit-ninja/components/GameArea.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/GameBackground.js +107 -190
- package/lib/module/games/fruit-ninja/components/GameBackground.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +9 -30
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/index.js +0 -3
- package/lib/module/games/fruit-ninja/components/index.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunner.js +106 -109
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +19 -24
- package/lib/module/games/maze-runner/MazeRunnerConstants.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 +16 -7
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js.map +1 -1
- package/lib/module/games/maze-runner/components/ScoreBoard.js +8 -3
- 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 -1
- package/lib/module/games/maze-runner/components/index.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidget.js +113 -112
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +20 -23
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +0 -59
- package/lib/module/games/popit-fidget/PopitFidgetService.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +0 -27
- package/lib/module/games/popit-fidget/PopitFidgetStore.js.map +1 -1
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +24 -22
- package/lib/module/games/popit-fidget/components/BubbleComponent.js.map +1 -1
- package/lib/module/games/popit-fidget/components/GameBackground.js +4 -1
- package/lib/module/games/popit-fidget/components/GameBackground.js.map +1 -1
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +9 -2
- package/lib/module/games/popit-fidget/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/popit-fidget/components/index.js +0 -2
- package/lib/module/games/popit-fidget/components/index.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighter.js +121 -369
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +21 -23
- package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +30 -11
- package/lib/module/games/space-fighter/SpaceFighterService.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterStore.js +54 -2
- package/lib/module/games/space-fighter/SpaceFighterStore.js.map +1 -1
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +7 -5
- package/lib/module/games/space-fighter/components/AsteroidComponent.js.map +1 -1
- package/lib/module/games/space-fighter/components/GameArea.js +234 -14
- package/lib/module/games/space-fighter/components/GameArea.js.map +1 -1
- package/lib/module/games/space-fighter/components/GameBackground.js +10 -65
- package/lib/module/games/space-fighter/components/GameBackground.js.map +1 -1
- package/lib/module/games/space-fighter/components/ScoreBoard.js +9 -7
- package/lib/module/games/space-fighter/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +72 -111
- package/lib/module/games/space-fighter/components/Spacecraft3D.js.map +1 -1
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +42 -27
- package/lib/module/games/space-fighter/components/SpacecraftPath.js.map +1 -1
- package/lib/module/games/space-fighter/components/index.js +0 -3
- package/lib/module/games/space-fighter/components/index.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMole.js +63 -73
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +17 -19
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +20 -7
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/GameHole.js +2 -2
- package/lib/module/games/whack-a-mole/components/GameHole.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +5 -1
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/index.js +0 -1
- package/lib/module/games/whack-a-mole/components/index.js.map +1 -1
- package/lib/module/services/GamesConstants.js +13 -21
- package/lib/module/services/GamesConstants.js.map +1 -1
- package/lib/module/services/GamesService.js +30 -26
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/SoundsService.js +21 -21
- 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 +67 -58
- package/lib/module/shared/helpers/GameControlButton.js.map +1 -1
- package/lib/module/{games/whack-a-mole/components → shared/helpers}/GameOverModal.js +23 -13
- 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/index.js +7 -0
- package/lib/module/shared/helpers/index.js.map +1 -1
- 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 +8 -7
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts +0 -2
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterService.d.ts.map +1 -1
- 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/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 -3
- package/lib/typescript/src/games/balloon-blaster/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts +2 -14
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts +5 -5
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts +9 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaService.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts +1 -0
- package/lib/typescript/src/games/fruit-ninja/FruitNinjaStore.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts +1 -15
- package/lib/typescript/src/games/fruit-ninja/components/GameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts +1 -7
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/index.d.ts +0 -3
- package/lib/typescript/src/games/fruit-ninja/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts +2 -8
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.d.ts +4 -4
- package/lib/typescript/src/games/maze-runner/MazeRunnerConstants.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/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 -1
- package/lib/typescript/src/games/maze-runner/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts +2 -8
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts +4 -4
- package/lib/typescript/src/games/popit-fidget/PopitFidgetConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts +0 -21
- package/lib/typescript/src/games/popit-fidget/PopitFidgetService.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts +1 -5
- package/lib/typescript/src/games/popit-fidget/PopitFidgetStore.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/components/BubbleComponent.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts +2 -2
- package/lib/typescript/src/games/popit-fidget/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts +2 -2
- package/lib/typescript/src/games/popit-fidget/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/components/index.d.ts +0 -2
- package/lib/typescript/src/games/popit-fidget/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts +3 -8
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts +4 -4
- package/lib/typescript/src/games/space-fighter/SpaceFighterConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterService.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighterStore.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts +0 -1
- package/lib/typescript/src/games/space-fighter/components/AsteroidComponent.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts +1 -15
- package/lib/typescript/src/games/space-fighter/components/GameArea.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/GameBackground.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts +1 -6
- package/lib/typescript/src/games/space-fighter/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/Spacecraft3D.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/SpacecraftPath.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/components/index.d.ts +0 -3
- package/lib/typescript/src/games/space-fighter/components/index.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts +2 -11
- package/lib/typescript/src/games/whack-a-mole/WhackAMole.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts +2 -2
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/WhackAMoleStore.d.ts.map +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/index.d.ts +0 -1
- package/lib/typescript/src/games/whack-a-mole/components/index.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +47 -38
- package/lib/typescript/src/services/GamesConstants.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesService.d.ts +20 -3
- package/lib/typescript/src/services/GamesService.d.ts.map +1 -1
- package/lib/typescript/src/services/SoundsService.d.ts +20 -20
- 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.map +1 -1
- package/lib/typescript/src/{games/balloon-blaster/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/index.d.ts +9 -0
- package/lib/typescript/src/shared/helpers/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/module/games/balloon-blaster/components/GameOverModal.js +0 -133
- package/lib/module/games/balloon-blaster/components/GameOverModal.js.map +0 -1
- package/lib/module/games/balloon-blaster/components/ParticleSystem.js +0 -55
- 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/fruit-ninja/components/GameOverModal.js +0 -189
- package/lib/module/games/fruit-ninja/components/GameOverModal.js.map +0 -1
- package/lib/module/games/fruit-ninja/components/ParticleSystem.js +0 -52
- package/lib/module/games/fruit-ninja/components/ParticleSystem.js.map +0 -1
- package/lib/module/games/fruit-ninja/components/SliceTrail.js +0 -58
- package/lib/module/games/fruit-ninja/components/SliceTrail.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/popit-fidget/components/GameOverModal.js +0 -132
- package/lib/module/games/popit-fidget/components/GameOverModal.js.map +0 -1
- package/lib/module/games/popit-fidget/components/ParticleSystem.js +0 -89
- package/lib/module/games/popit-fidget/components/ParticleSystem.js.map +0 -1
- package/lib/module/games/space-fighter/components/GameOverModal.js +0 -182
- package/lib/module/games/space-fighter/components/GameOverModal.js.map +0 -1
- package/lib/module/games/space-fighter/components/ParticleComponent.js +0 -34
- package/lib/module/games/space-fighter/components/ParticleComponent.js.map +0 -1
- package/lib/module/games/space-fighter/components/SettingsModal.js +0 -222
- package/lib/module/games/space-fighter/components/SettingsModal.js.map +0 -1
- package/lib/module/games/whack-a-mole/components/GameOverModal.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 -125
- package/lib/module/shared/settings/SettingsService.js.map +0 -1
- 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/fruit-ninja/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/fruit-ninja/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-ninja/components/ParticleSystem.d.ts +0 -8
- package/lib/typescript/src/games/fruit-ninja/components/ParticleSystem.d.ts.map +0 -1
- package/lib/typescript/src/games/fruit-ninja/components/SliceTrail.d.ts +0 -11
- package/lib/typescript/src/games/fruit-ninja/components/SliceTrail.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/popit-fidget/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/popit-fidget/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/popit-fidget/components/ParticleSystem.d.ts +0 -9
- package/lib/typescript/src/games/popit-fidget/components/ParticleSystem.d.ts.map +0 -1
- package/lib/typescript/src/games/space-fighter/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/GameOverModal.d.ts.map +0 -1
- package/lib/typescript/src/games/space-fighter/components/ParticleComponent.d.ts +0 -8
- package/lib/typescript/src/games/space-fighter/components/ParticleComponent.d.ts.map +0 -1
- package/lib/typescript/src/games/space-fighter/components/SettingsModal.d.ts +0 -9
- package/lib/typescript/src/games/space-fighter/components/SettingsModal.d.ts.map +0 -1
- package/lib/typescript/src/games/whack-a-mole/components/GameOverModal.d.ts +0 -9
- package/lib/typescript/src/games/whack-a-mole/components/GameOverModal.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 -33
- package/lib/typescript/src/shared/settings/SettingsService.d.ts.map +0 -1
|
@@ -30,39 +30,39 @@ export declare const GAME_SOUNDS: {
|
|
|
30
30
|
};
|
|
31
31
|
readonly GAME_START: {
|
|
32
32
|
readonly text: "Game started!";
|
|
33
|
-
readonly pitch: 1.
|
|
34
|
-
readonly rate:
|
|
33
|
+
readonly pitch: 1.1;
|
|
34
|
+
readonly rate: 0.9;
|
|
35
35
|
};
|
|
36
36
|
readonly GAME_OVER: {
|
|
37
37
|
readonly text: "Game over!";
|
|
38
|
-
readonly pitch:
|
|
39
|
-
readonly rate:
|
|
38
|
+
readonly pitch: 0.9;
|
|
39
|
+
readonly rate: 0.8;
|
|
40
40
|
};
|
|
41
41
|
readonly TIME_UP: {
|
|
42
42
|
readonly text: "Time up! Game over!";
|
|
43
|
-
readonly pitch:
|
|
44
|
-
readonly rate:
|
|
43
|
+
readonly pitch: 0.9;
|
|
44
|
+
readonly rate: 0.8;
|
|
45
45
|
};
|
|
46
46
|
readonly WELL_DONE: {
|
|
47
47
|
readonly text: "Well done!";
|
|
48
|
-
readonly pitch: 1.
|
|
49
|
-
readonly rate: 1
|
|
48
|
+
readonly pitch: 1.2;
|
|
49
|
+
readonly rate: 1;
|
|
50
50
|
};
|
|
51
51
|
readonly CONGRATULATIONS: {
|
|
52
52
|
readonly text: "Congratulations!";
|
|
53
|
-
readonly pitch: 1.
|
|
54
|
-
readonly rate:
|
|
53
|
+
readonly pitch: 1.1;
|
|
54
|
+
readonly rate: 0.9;
|
|
55
55
|
};
|
|
56
56
|
readonly BUBBLE_POPPER: {
|
|
57
57
|
readonly START: {
|
|
58
58
|
readonly text: "Bubble Popper started!";
|
|
59
|
-
readonly pitch: 1.
|
|
60
|
-
readonly rate:
|
|
59
|
+
readonly pitch: 1.1;
|
|
60
|
+
readonly rate: 0.9;
|
|
61
61
|
};
|
|
62
62
|
readonly COMPLETE: {
|
|
63
63
|
readonly text: "All bubbles popped! Well done!";
|
|
64
|
-
readonly pitch: 1.
|
|
65
|
-
readonly rate: 1
|
|
64
|
+
readonly pitch: 1.2;
|
|
65
|
+
readonly rate: 1;
|
|
66
66
|
};
|
|
67
67
|
readonly POP: {
|
|
68
68
|
readonly text: "Pop!";
|
|
@@ -120,24 +120,24 @@ export declare const GAME_SOUNDS: {
|
|
|
120
120
|
readonly START: {
|
|
121
121
|
readonly text: "Maze started! Navigate to the exit!";
|
|
122
122
|
readonly pitch: 1;
|
|
123
|
-
readonly rate:
|
|
123
|
+
readonly rate: 0.9;
|
|
124
124
|
};
|
|
125
125
|
readonly COMPLETE: {
|
|
126
126
|
readonly text: "Congratulations! Maze completed!";
|
|
127
|
-
readonly pitch: 1.
|
|
128
|
-
readonly rate:
|
|
127
|
+
readonly pitch: 1.1;
|
|
128
|
+
readonly rate: 0.9;
|
|
129
129
|
};
|
|
130
130
|
readonly STOP: {
|
|
131
131
|
readonly text: "Maze stopped!";
|
|
132
|
-
readonly pitch:
|
|
133
|
-
readonly rate:
|
|
132
|
+
readonly pitch: 0.9;
|
|
133
|
+
readonly rate: 0.8;
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
readonly SPACE_FIGHTER: {
|
|
137
137
|
readonly START: {
|
|
138
138
|
readonly text: "Mission started! Navigate through the asteroid field!";
|
|
139
139
|
readonly pitch: 1;
|
|
140
|
-
readonly rate:
|
|
140
|
+
readonly rate: 0.9;
|
|
141
141
|
};
|
|
142
142
|
readonly SUCCESS: {
|
|
143
143
|
readonly text: "Nice!";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optimized animation frame utility for smooth game object cleanup and updates
|
|
3
|
+
* Uses requestAnimationFrame instead of setInterval for better performance
|
|
4
|
+
*/
|
|
5
|
+
export declare class AnimationFrameManager {
|
|
6
|
+
private animationId;
|
|
7
|
+
private isRunning;
|
|
8
|
+
private callback;
|
|
9
|
+
private interval;
|
|
10
|
+
private lastTime;
|
|
11
|
+
constructor(callback: () => void, interval?: number);
|
|
12
|
+
/**
|
|
13
|
+
* Start the animation frame loop
|
|
14
|
+
*/
|
|
15
|
+
start(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Stop the animation frame loop
|
|
18
|
+
*/
|
|
19
|
+
stop(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Internal animation frame loop
|
|
22
|
+
*/
|
|
23
|
+
private loop;
|
|
24
|
+
/**
|
|
25
|
+
* Update the callback function
|
|
26
|
+
*/
|
|
27
|
+
updateCallback(callback: () => void): void;
|
|
28
|
+
/**
|
|
29
|
+
* Update the interval
|
|
30
|
+
*/
|
|
31
|
+
updateInterval(interval: number): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* React hook for using optimized animation frame cleanup
|
|
35
|
+
*/
|
|
36
|
+
export declare function useAnimationFrame(callback: () => void, interval?: number, dependencies?: React.DependencyList): void;
|
|
37
|
+
/**
|
|
38
|
+
* React hook for creating a reusable animation frame manager
|
|
39
|
+
*/
|
|
40
|
+
export declare function useAnimationFrameManager(interval?: number): AnimationFrameManager;
|
|
41
|
+
//# sourceMappingURL=AnimationFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationFrame.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/AnimationFrame.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAK;gBAET,QAAQ,EAAE,MAAM,IAAI,EAAE,QAAQ,GAAE,MAAY;IAKxD;;OAEG;IACH,KAAK,IAAI,IAAI;IAQb;;OAEG;IACH,IAAI,IAAI,IAAI;IAQZ;;OAEG;IACH,OAAO,CAAC,IAAI,CAYV;IAEF;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI1C;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAGvC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,IAAI,EACpB,QAAQ,GAAE,MAAY,EACtB,YAAY,GAAE,KAAK,CAAC,cAAmB,GACtC,IAAI,CA+BN;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,GAAE,MAAY,GACrB,qBAAqB,CAgBvB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation state interface for tracking game object animations
|
|
3
|
+
*/
|
|
4
|
+
export interface AnimationState {
|
|
5
|
+
scale: number;
|
|
6
|
+
opacity: number;
|
|
7
|
+
rotation?: number;
|
|
8
|
+
translateX?: number;
|
|
9
|
+
translateY?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Default animation state values
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_ANIMATION_STATE: AnimationState;
|
|
15
|
+
/**
|
|
16
|
+
* Animation tracker class for managing game object animations
|
|
17
|
+
* Extends Map to maintain compatibility with existing game services
|
|
18
|
+
*/
|
|
19
|
+
export declare class AnimationTracker extends Map<string, AnimationState> {
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Override set to merge with default animation state
|
|
23
|
+
*/
|
|
24
|
+
set(id: string, state: Partial<AnimationState>): this;
|
|
25
|
+
/**
|
|
26
|
+
* Initialize animation for object if it doesn't exist
|
|
27
|
+
*/
|
|
28
|
+
initialize(id: string, initialState?: Partial<AnimationState>): AnimationState;
|
|
29
|
+
/**
|
|
30
|
+
* Update multiple objects at once
|
|
31
|
+
*/
|
|
32
|
+
updateBatch(updates: Array<{
|
|
33
|
+
id: string;
|
|
34
|
+
state: Partial<AnimationState>;
|
|
35
|
+
}>): void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* React hook for creating and managing animation trackers
|
|
39
|
+
*/
|
|
40
|
+
export declare function useAnimationTracker(): AnimationTracker;
|
|
41
|
+
/**
|
|
42
|
+
* React hook for creating multiple animation trackers
|
|
43
|
+
*/
|
|
44
|
+
export declare function useAnimationTrackers<T extends Record<string, any>>(trackerNames: (keyof T)[]): Record<keyof T, AnimationTracker>;
|
|
45
|
+
//# sourceMappingURL=AnimationTracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationTracker.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/AnimationTracker.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAMrC,CAAC;AAEF;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC;;IAK/D;;OAEG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;IAOrD;;OAEG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc;IAS9E;;OAEG;IACH,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;KAAE,CAAC,GAAG,IAAI;CAKlF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChE,YAAY,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,GACxB,MAAM,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,CASnC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error types for game-specific error handling
|
|
3
|
+
*/
|
|
4
|
+
export declare enum GameErrorType {
|
|
5
|
+
INITIALIZATION_ERROR = "INITIALIZATION_ERROR",
|
|
6
|
+
ANIMATION_ERROR = "ANIMATION_ERROR",
|
|
7
|
+
STORAGE_ERROR = "STORAGE_ERROR",
|
|
8
|
+
SOUND_ERROR = "SOUND_ERROR",
|
|
9
|
+
HAPTIC_ERROR = "HAPTIC_ERROR",
|
|
10
|
+
GESTURE_ERROR = "GESTURE_ERROR",
|
|
11
|
+
PERFORMANCE_ERROR = "PERFORMANCE_ERROR",
|
|
12
|
+
NETWORK_ERROR = "NETWORK_ERROR",
|
|
13
|
+
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Game error interface
|
|
17
|
+
*/
|
|
18
|
+
export interface GameError {
|
|
19
|
+
type: GameErrorType;
|
|
20
|
+
message: string;
|
|
21
|
+
gameId?: string;
|
|
22
|
+
timestamp: number;
|
|
23
|
+
stack?: string;
|
|
24
|
+
context?: Record<string, any>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Error handler configuration
|
|
28
|
+
*/
|
|
29
|
+
export interface ErrorHandlerConfig {
|
|
30
|
+
enableLogging: boolean;
|
|
31
|
+
enableConsoleOutput: boolean;
|
|
32
|
+
maxErrorHistory: number;
|
|
33
|
+
enableCrashRecovery: boolean;
|
|
34
|
+
onError?: (error: GameError) => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Default error handler configuration
|
|
38
|
+
*/
|
|
39
|
+
export declare const DEFAULT_ERROR_CONFIG: ErrorHandlerConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Game error handler class
|
|
42
|
+
*/
|
|
43
|
+
export declare class GameErrorHandler {
|
|
44
|
+
private config;
|
|
45
|
+
private errorHistory;
|
|
46
|
+
private errorCounts;
|
|
47
|
+
constructor(config?: Partial<ErrorHandlerConfig>);
|
|
48
|
+
/**
|
|
49
|
+
* Handle a game error
|
|
50
|
+
*/
|
|
51
|
+
handleError(type: GameErrorType, message: string, gameId?: string, context?: Record<string, any>): void;
|
|
52
|
+
/**
|
|
53
|
+
* Wrap a function with error handling
|
|
54
|
+
*/
|
|
55
|
+
wrapFunction<T extends (...args: any[]) => any>(fn: T, errorType: GameErrorType, gameId?: string): T;
|
|
56
|
+
/**
|
|
57
|
+
* Safe execution with error recovery
|
|
58
|
+
*/
|
|
59
|
+
safeExecute<T>(fn: () => T, fallback: T, errorType: GameErrorType, gameId?: string): T;
|
|
60
|
+
/**
|
|
61
|
+
* Safe async execution with error recovery
|
|
62
|
+
*/
|
|
63
|
+
safeExecuteAsync<T>(fn: () => Promise<T>, fallback: T, errorType: GameErrorType, gameId?: string): Promise<T>;
|
|
64
|
+
/**
|
|
65
|
+
* Get error statistics
|
|
66
|
+
*/
|
|
67
|
+
getErrorStats(): {
|
|
68
|
+
totalErrors: number;
|
|
69
|
+
errorsByType: Record<GameErrorType, number>;
|
|
70
|
+
recentErrors: GameError[];
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Clear error history
|
|
74
|
+
*/
|
|
75
|
+
clearHistory(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Update configuration
|
|
78
|
+
*/
|
|
79
|
+
updateConfig(config: Partial<ErrorHandlerConfig>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Log error to console
|
|
82
|
+
*/
|
|
83
|
+
private logError;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Global error handler instance
|
|
87
|
+
*/
|
|
88
|
+
export declare const globalErrorHandler: GameErrorHandler;
|
|
89
|
+
/**
|
|
90
|
+
* React hook for error handling in game components
|
|
91
|
+
*/
|
|
92
|
+
export declare function useGameErrorHandler(gameId: string, config?: Partial<ErrorHandlerConfig>): {
|
|
93
|
+
handleError: (type: GameErrorType, message: string, context?: Record<string, any>) => void;
|
|
94
|
+
wrapFunction: <T extends (...args: any[]) => any>(fn: T, errorType: GameErrorType) => T;
|
|
95
|
+
safeExecute: <T>(fn: () => T, fallback: T, errorType: GameErrorType) => T;
|
|
96
|
+
safeExecuteAsync: <T>(fn: () => Promise<T>, fallback: T, errorType: GameErrorType) => Promise<T>;
|
|
97
|
+
errorStats: ReturnType<GameErrorHandler['getErrorStats']>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Error boundary utility for wrapping functions with error handling
|
|
101
|
+
*/
|
|
102
|
+
export declare function withErrorHandling<T extends (...args: any[]) => any>(fn: T, gameId: string, errorType?: GameErrorType): T;
|
|
103
|
+
/**
|
|
104
|
+
* Utility functions for common error scenarios
|
|
105
|
+
*/
|
|
106
|
+
export declare const ErrorUtils: {
|
|
107
|
+
/**
|
|
108
|
+
* Handle animation errors safely
|
|
109
|
+
*/
|
|
110
|
+
safeAnimate: (animationFn: () => void, gameId: string, fallback?: () => void) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Handle sound errors safely
|
|
113
|
+
*/
|
|
114
|
+
safePlaySound: (soundFn: () => void, gameId: string) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Handle haptic errors safely
|
|
117
|
+
*/
|
|
118
|
+
safeHaptic: (hapticFn: () => void, gameId: string) => void;
|
|
119
|
+
/**
|
|
120
|
+
* Handle gesture errors safely
|
|
121
|
+
*/
|
|
122
|
+
safeGesture: (gestureFn: () => void, gameId: string) => void;
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=ErrorHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorHandler.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/ErrorHandler.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,aAAa;IACvB,oBAAoB,yBAAyB;IAC7C,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,aAAa,CAA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,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;CAC3D,CA2CA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACjE,EAAE,EAAE,CAAC,EACL,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,aAA2C,GACrD,CAAC,CAEH;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB;;OAEG;+BAEY,MAAM,IAAI,UACf,MAAM,aACH,MAAM,IAAI,KACpB,IAAI;IASP;;OAEG;6BAEQ,MAAM,IAAI,UACX,MAAM,KACb,IAAI;IASP;;OAEG;2BAES,MAAM,IAAI,UACZ,MAAM,KACb,IAAI;IASP;;OAEG;6BAEU,MAAM,IAAI,UACb,MAAM,KACb,IAAI;CAQR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameControlButton.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/GameControlButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAG1D,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"GameControlButton.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/GameControlButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAG1D,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA4I7D,CAAC"}
|
package/lib/typescript/src/{games/balloon-blaster/components → shared/helpers}/GameOverModal.d.ts
RENAMED
|
@@ -3,6 +3,11 @@ interface GameOverModalProps {
|
|
|
3
3
|
isVisible: boolean;
|
|
4
4
|
score: number;
|
|
5
5
|
onPlayAgain: () => void;
|
|
6
|
+
buttonText?: string;
|
|
7
|
+
primaryColor?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
buttonColor?: string;
|
|
10
|
+
buttonBorderColor?: string;
|
|
6
11
|
}
|
|
7
12
|
export declare const GameOverModal: React.FC<GameOverModalProps>;
|
|
8
13
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameOverModal.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/GameOverModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgDrD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type GameSettings } from '../../services/GamesService';
|
|
3
|
+
export interface GameSettingsProps {
|
|
4
|
+
gameId: string;
|
|
5
|
+
settings: GameSettings;
|
|
6
|
+
onSettingsChange?: (settings: GameSettings) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const GameSettingsModal: React.FC<GameSettingsProps>;
|
|
9
|
+
//# sourceMappingURL=GameSettingsModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameSettingsModal.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/GameSettingsModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;CACrD;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuIzD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ParticleBlastProps {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
particleCount?: number;
|
|
6
|
+
colors?: string[];
|
|
7
|
+
duration?: number;
|
|
8
|
+
onComplete?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ParticleBlast: React.FC<ParticleBlastProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ParticleBlast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParticleBlast.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/ParticleBlast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkBnD,UAAU,kBAAkB;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyHtD,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export { GameControlButton } from './GameControlButton';
|
|
2
2
|
export type { GameControlButtonProps } from './GameControlButton';
|
|
3
3
|
export { createResponsiveScoreBoardStyle, RESPONSIVE_SCOREBOARD_CONTAINER, RESPONSIVE_SCOREBOARD_FONTS, getResponsiveScoreBoardDimensions } from './ResponsiveScoreBoard';
|
|
4
|
+
export { ParticleBlast } from './ParticleBlast';
|
|
5
|
+
export { GameOverModal } from './GameOverModal';
|
|
6
|
+
export { GameSettingsModal } from './GameSettingsModal';
|
|
7
|
+
export { AnimationTracker, useAnimationTracker, useAnimationTrackers, DEFAULT_ANIMATION_STATE } from './AnimationTracker';
|
|
8
|
+
export type { AnimationState } from './AnimationTracker';
|
|
9
|
+
export { AnimationFrameManager, useAnimationFrame, useAnimationFrameManager } from './AnimationFrame';
|
|
10
|
+
export { GameErrorHandler, useGameErrorHandler, withErrorHandling, ErrorUtils, globalErrorHandler, DEFAULT_ERROR_CONFIG } from './ErrorHandler';
|
|
11
|
+
export { GameErrorType } from './ErrorHandler';
|
|
12
|
+
export type { GameError, ErrorHandlerConfig } from './ErrorHandler';
|
|
4
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,iCAAiC,EAClC,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,iCAAiC,EAClC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACtG,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, TouchableOpacity, Text, StyleSheet, Modal } from 'react-native';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export const GameOverModal = ({
|
|
7
|
-
isVisible,
|
|
8
|
-
score,
|
|
9
|
-
onPlayAgain
|
|
10
|
-
}) => {
|
|
11
|
-
return /*#__PURE__*/_jsx(Modal, {
|
|
12
|
-
visible: isVisible,
|
|
13
|
-
animationType: "fade",
|
|
14
|
-
transparent: true,
|
|
15
|
-
onRequestClose: onPlayAgain,
|
|
16
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
17
|
-
style: styles.gameOverOverlay,
|
|
18
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
19
|
-
style: styles.gameOverModal,
|
|
20
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
21
|
-
style: styles.modalContent,
|
|
22
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
23
|
-
style: styles.gameOverTitle,
|
|
24
|
-
children: "Game Over!"
|
|
25
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
26
|
-
style: styles.finalScoreContainer,
|
|
27
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
28
|
-
style: styles.finalScoreLabel,
|
|
29
|
-
children: "Final Score"
|
|
30
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
31
|
-
style: styles.finalScoreValue,
|
|
32
|
-
children: score
|
|
33
|
-
})]
|
|
34
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
35
|
-
style: styles.playAgainContainer,
|
|
36
|
-
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
37
|
-
style: styles.playAgainButton,
|
|
38
|
-
onPress: onPlayAgain,
|
|
39
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
40
|
-
style: styles.buttonText,
|
|
41
|
-
children: "Pop Again!"
|
|
42
|
-
})
|
|
43
|
-
})
|
|
44
|
-
})]
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
const styles = StyleSheet.create({
|
|
51
|
-
gameOverOverlay: {
|
|
52
|
-
flex: 1,
|
|
53
|
-
justifyContent: 'center',
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)' // Semi-transparent overlay
|
|
56
|
-
},
|
|
57
|
-
gameOverModal: {
|
|
58
|
-
backgroundColor: '#87CEEB',
|
|
59
|
-
// Sky blue background for balloon theme
|
|
60
|
-
borderRadius: 24,
|
|
61
|
-
minWidth: '80%',
|
|
62
|
-
shadowColor: '#000',
|
|
63
|
-
shadowOffset: {
|
|
64
|
-
width: 0,
|
|
65
|
-
height: 8
|
|
66
|
-
},
|
|
67
|
-
shadowOpacity: 0.4,
|
|
68
|
-
shadowRadius: 12,
|
|
69
|
-
elevation: 12,
|
|
70
|
-
borderWidth: 3,
|
|
71
|
-
borderColor: 'rgba(59, 130, 246, 0.8)' // Blue border for balloon theme
|
|
72
|
-
},
|
|
73
|
-
modalContent: {
|
|
74
|
-
padding: 40,
|
|
75
|
-
alignItems: 'center'
|
|
76
|
-
},
|
|
77
|
-
gameOverTitle: {
|
|
78
|
-
fontSize: 30,
|
|
79
|
-
fontWeight: 'bold',
|
|
80
|
-
color: '#ffffff',
|
|
81
|
-
marginBottom: 32,
|
|
82
|
-
textAlign: 'center'
|
|
83
|
-
},
|
|
84
|
-
finalScoreContainer: {
|
|
85
|
-
alignItems: 'center',
|
|
86
|
-
marginBottom: 32,
|
|
87
|
-
backgroundColor: '#1e40af',
|
|
88
|
-
// Blue background for balloon theme
|
|
89
|
-
borderRadius: 16,
|
|
90
|
-
padding: 20,
|
|
91
|
-
minWidth: 150
|
|
92
|
-
},
|
|
93
|
-
finalScoreLabel: {
|
|
94
|
-
fontSize: 18,
|
|
95
|
-
color: '#ffffff',
|
|
96
|
-
fontWeight: 'bold',
|
|
97
|
-
marginBottom: 8
|
|
98
|
-
},
|
|
99
|
-
finalScoreValue: {
|
|
100
|
-
fontSize: 48,
|
|
101
|
-
color: '#facc15',
|
|
102
|
-
fontWeight: 'bold',
|
|
103
|
-
textAlign: 'center'
|
|
104
|
-
},
|
|
105
|
-
playAgainContainer: {
|
|
106
|
-
alignItems: 'center'
|
|
107
|
-
},
|
|
108
|
-
playAgainButton: {
|
|
109
|
-
backgroundColor: '#3b82f6',
|
|
110
|
-
// Blue for balloon theme
|
|
111
|
-
paddingHorizontal: 40,
|
|
112
|
-
paddingVertical: 20,
|
|
113
|
-
borderRadius: 24,
|
|
114
|
-
shadowColor: '#000',
|
|
115
|
-
shadowOffset: {
|
|
116
|
-
width: 0,
|
|
117
|
-
height: 2
|
|
118
|
-
},
|
|
119
|
-
shadowOpacity: 0.25,
|
|
120
|
-
shadowRadius: 3.84,
|
|
121
|
-
elevation: 5,
|
|
122
|
-
borderWidth: 2,
|
|
123
|
-
borderColor: '#60a5fa' // Light blue border
|
|
124
|
-
},
|
|
125
|
-
buttonText: {
|
|
126
|
-
fontSize: 18,
|
|
127
|
-
fontWeight: 'bold',
|
|
128
|
-
color: '#ffffff',
|
|
129
|
-
textAlign: 'center',
|
|
130
|
-
lineHeight: 24
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
//# sourceMappingURL=GameOverModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","TouchableOpacity","Text","StyleSheet","Modal","jsx","_jsx","jsxs","_jsxs","GameOverModal","isVisible","score","onPlayAgain","visible","animationType","transparent","onRequestClose","children","style","styles","gameOverOverlay","gameOverModal","modalContent","gameOverTitle","finalScoreContainer","finalScoreLabel","finalScoreValue","playAgainContainer","playAgainButton","onPress","buttonText","create","flex","justifyContent","alignItems","backgroundColor","borderRadius","minWidth","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","borderWidth","borderColor","padding","fontSize","fontWeight","color","marginBottom","textAlign","paddingHorizontal","paddingVertical","lineHeight"],"sourceRoot":"../../../../../src","sources":["games/balloon-blaster/components/GameOverModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ/E,OAAO,MAAMC,aAA2C,GAAGA,CAAC;EAAEC,SAAS;EAAEC,KAAK;EAAEC;AAAY,CAAC,KAAK;EAEhG,oBACEN,IAAA,CAACF,KAAK;IACJS,OAAO,EAAEH,SAAU;IACnBI,aAAa,EAAC,MAAM;IACpBC,WAAW,EAAE,IAAK;IAClBC,cAAc,EAAEJ,WAAY;IAAAK,QAAA,eAE5BX,IAAA,CAACN,IAAI;MAACkB,KAAK,EAAEC,MAAM,CAACC,eAAgB;MAAAH,QAAA,eAClCX,IAAA,CAACN,IAAI;QAACkB,KAAK,EAAEC,MAAM,CAACE,aAAc;QAAAJ,QAAA,eAChCT,KAAA,CAACR,IAAI;UAACkB,KAAK,EAAEC,MAAM,CAACG,YAAa;UAAAL,QAAA,gBAC/BX,IAAA,CAACJ,IAAI;YAACgB,KAAK,EAAEC,MAAM,CAACI,aAAc;YAAAN,QAAA,EAAC;UAAU,CAAM,CAAC,eAEpDT,KAAA,CAACR,IAAI;YAACkB,KAAK,EAAEC,MAAM,CAACK,mBAAoB;YAAAP,QAAA,gBACtCX,IAAA,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import React from 'react';
|
|
4
|
-
import { View, Dimensions, StyleSheet } from 'react-native';
|
|
5
|
-
import { Canvas as SkiaCanvas, Circle, Group } from '@shopify/react-native-skia';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
width,
|
|
9
|
-
height
|
|
10
|
-
} = Dimensions.get('window');
|
|
11
|
-
export const ParticleSystem = /*#__PURE__*/React.memo(({
|
|
12
|
-
particles
|
|
13
|
-
}) => {
|
|
14
|
-
if (particles.length === 0) return null;
|
|
15
|
-
return /*#__PURE__*/_jsx(View, {
|
|
16
|
-
style: [styles.absoluteContainer, {
|
|
17
|
-
width,
|
|
18
|
-
height
|
|
19
|
-
}],
|
|
20
|
-
children: /*#__PURE__*/_jsx(SkiaCanvas, {
|
|
21
|
-
style: {
|
|
22
|
-
width,
|
|
23
|
-
height
|
|
24
|
-
},
|
|
25
|
-
children: /*#__PURE__*/_jsx(Group, {
|
|
26
|
-
children: particles.map(particle => {
|
|
27
|
-
// Enhanced alpha calculation for maximum visibility
|
|
28
|
-
const alpha = Math.max(0.5, 1 - particle.lifetime / particle.maxLifetime); // Higher minimum alpha
|
|
29
|
-
const alphaHex = Math.floor(alpha * 255).toString(16).padStart(2, '0');
|
|
30
|
-
|
|
31
|
-
// Larger particles with minimum size guarantee
|
|
32
|
-
const particleSize = Math.max(4, particle.size * alpha); // Increased minimum size
|
|
33
|
-
|
|
34
|
-
return /*#__PURE__*/_jsx(Circle, {
|
|
35
|
-
cx: particle.position.x,
|
|
36
|
-
cy: particle.position.y,
|
|
37
|
-
r: particleSize,
|
|
38
|
-
color: `${particle.color}${alphaHex}`
|
|
39
|
-
}, particle.id);
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
const styles = StyleSheet.create({
|
|
46
|
-
absoluteContainer: {
|
|
47
|
-
position: 'absolute',
|
|
48
|
-
top: 0,
|
|
49
|
-
left: 0,
|
|
50
|
-
right: 0,
|
|
51
|
-
bottom: 0,
|
|
52
|
-
pointerEvents: 'none'
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=ParticleSystem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Dimensions","StyleSheet","Canvas","SkiaCanvas","Circle","Group","jsx","_jsx","width","height","get","ParticleSystem","memo","particles","length","style","styles","absoluteContainer","children","map","particle","alpha","Math","max","lifetime","maxLifetime","alphaHex","floor","toString","padStart","particleSize","size","cx","position","x","cy","y","r","color","id","create","top","left","right","bottom","pointerEvents"],"sourceRoot":"../../../../../src","sources":["games/balloon-blaster/components/ParticleSystem.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAC3D,SAASC,MAAM,IAAIC,UAAU,EAAEC,MAAM,EAAEC,KAAK,QAAQ,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGjF,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGT,UAAU,CAACU,GAAG,CAAC,QAAQ,CAAC;AAMlD,OAAO,MAAMC,cAA6C,gBAAGb,KAAK,CAACc,IAAI,CAAC,CAAC;EAAEC;AAAU,CAAC,KAAK;EACzF,IAAIA,SAAS,CAACC,MAAM,KAAK,CAAC,EAAE,OAAO,IAAI;EAEvC,oBACEP,IAAA,CAACR,IAAI;IAACgB,KAAK,EAAE,CAACC,MAAM,CAACC,iBAAiB,EAAE;MAAET,KAAK;MAAEC;IAAO,CAAC,CAAE;IAAAS,QAAA,eACzDX,IAAA,CAACJ,UAAU;MAACY,KAAK,EAAE;QAAEP,KAAK;QAAEC;MAAO,CAAE;MAAAS,QAAA,eACnCX,IAAA,CAACF,KAAK;QAAAa,QAAA,EACHL,SAAS,CAACM,GAAG,CAACC,QAAQ,IAAI;UACzB;UACA,MAAMC,KAAK,GAAGC,IAAI,CAACC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAIH,QAAQ,CAACI,QAAQ,GAAGJ,QAAQ,CAACK,WAAY,CAAC,CAAC,CAAC;UAC7E,MAAMC,QAAQ,GAAGJ,IAAI,CAACK,KAAK,CAACN,KAAK,GAAG,GAAG,CAAC,CAACO,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;;UAEtE;UACA,MAAMC,YAAY,GAAGR,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACW,IAAI,GAAGV,KAAK,CAAC,CAAC,CAAC;;UAEzD,oBACEd,IAAA,CAACH,MAAM;YAEL4B,EAAE,EAAEZ,QAAQ,CAACa,QAAQ,CAACC,CAAE;YACxBC,EAAE,EAAEf,QAAQ,CAACa,QAAQ,CAACG,CAAE;YACxBC,CAAC,EAAEP,YAAa;YAChBQ,KAAK,EAAE,GAAGlB,QAAQ,CAACkB,KAAK,GAAGZ,QAAQ;UAAG,GAJjCN,QAAQ,CAACmB,EAKf,CAAC;QAEN,CAAC;MAAC,CACG;IAAC,CACE;EAAC,CACT,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMvB,MAAM,GAAGf,UAAU,CAACuC,MAAM,CAAC;EAC/BvB,iBAAiB,EAAE;IACjBgB,QAAQ,EAAE,UAAU;IACpBQ,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, Dimensions, StyleSheet } from 'react-native';
|
|
5
|
-
import { Canvas as SkiaCanvas, Path, Skia } from '@shopify/react-native-skia';
|
|
6
|
-
import { COLORS } from "../BalloonBlasterService.js";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const {
|
|
9
|
-
width,
|
|
10
|
-
height
|
|
11
|
-
} = Dimensions.get('window');
|
|
12
|
-
export const SliceTrail = ({
|
|
13
|
-
path,
|
|
14
|
-
isVisible
|
|
15
|
-
}) => {
|
|
16
|
-
if (!isVisible || path.length < 2) return null;
|
|
17
|
-
const skiaPath = Skia.Path.Make();
|
|
18
|
-
if (path.length > 0) {
|
|
19
|
-
const firstPoint = path[0];
|
|
20
|
-
if (!firstPoint) return null;
|
|
21
|
-
skiaPath.moveTo(firstPoint.x, firstPoint.y);
|
|
22
|
-
for (let i = 1; i < path.length; i++) {
|
|
23
|
-
const point = path[i];
|
|
24
|
-
if (point) skiaPath.lineTo(point.x, point.y);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return /*#__PURE__*/_jsx(View, {
|
|
28
|
-
style: [styles.absoluteContainer, {
|
|
29
|
-
width,
|
|
30
|
-
height
|
|
31
|
-
}],
|
|
32
|
-
children: /*#__PURE__*/_jsx(SkiaCanvas, {
|
|
33
|
-
style: {
|
|
34
|
-
width,
|
|
35
|
-
height
|
|
36
|
-
},
|
|
37
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
38
|
-
path: skiaPath,
|
|
39
|
-
color: COLORS.SLICE_TRAIL,
|
|
40
|
-
style: "stroke",
|
|
41
|
-
strokeWidth: 8,
|
|
42
|
-
strokeCap: "round",
|
|
43
|
-
strokeJoin: "round"
|
|
44
|
-
})
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
const styles = StyleSheet.create({
|
|
49
|
-
absoluteContainer: {
|
|
50
|
-
position: 'absolute',
|
|
51
|
-
top: 0,
|
|
52
|
-
left: 0,
|
|
53
|
-
right: 0,
|
|
54
|
-
bottom: 0,
|
|
55
|
-
pointerEvents: 'none'
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=SliceTrail.js.map
|