react-native-games 1.0.0 → 1.2.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 +80 -368
- package/lib/module/games/balloon-blaster/BalloonBlaster.js +1 -167
- package/lib/module/games/balloon-blaster/BalloonBlaster.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js +1 -182
- package/lib/module/games/balloon-blaster/BalloonBlasterConstants.js.map +1 -1
- package/lib/module/games/balloon-blaster/BalloonBlasterService.js +1 -318
- package/lib/module/games/balloon-blaster/BalloonBlasterStore.js +1 -183
- package/lib/module/games/balloon-blaster/components/BalloonComponent.js +1 -237
- package/lib/module/games/balloon-blaster/components/GameArea.js +1 -156
- package/lib/module/games/balloon-blaster/components/GameBackground.js +1 -476
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js +1 -112
- package/lib/module/games/balloon-blaster/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/balloon-blaster/components/index.js +1 -7
- package/lib/module/games/candy-crush/CandyCrush.js +1 -131
- package/lib/module/games/candy-crush/CandyCrush.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushConstants.js +1 -125
- package/lib/module/games/candy-crush/CandyCrushConstants.js.map +1 -1
- package/lib/module/games/candy-crush/CandyCrushService.js +1 -370
- package/lib/module/games/candy-crush/CandyCrushStore.js +1 -303
- package/lib/module/games/candy-crush/components/CandyItem.js +1 -191
- package/lib/module/games/candy-crush/components/GameBackground.js +1 -85
- package/lib/module/games/candy-crush/components/GameGrid.js +1 -314
- package/lib/module/games/candy-crush/components/ScoreBoard.js +1 -79
- package/lib/module/games/candy-crush/components/index.js +1 -7
- package/lib/module/games/candy-crush/index.js +1 -6
- package/lib/module/games/colors-sort/ColorsSort.js +1 -143
- package/lib/module/games/colors-sort/ColorsSort.js.map +1 -1
- package/lib/module/games/colors-sort/ColorsSortConstants.js +1 -72
- package/lib/module/games/colors-sort/ColorsSortConstants.js.map +1 -1
- package/lib/module/games/colors-sort/ColorsSortService.js +1 -255
- package/lib/module/games/colors-sort/ColorsSortStore.js +1 -257
- package/lib/module/games/colors-sort/ColorsSortStore.js.map +1 -1
- package/lib/module/games/colors-sort/components/ColorContainer.js +1 -140
- package/lib/module/games/colors-sort/components/GameBackground.js +1 -135
- package/lib/module/games/colors-sort/components/ScoreBoard.js +1 -70
- package/lib/module/games/colors-sort/components/index.js +1 -6
- package/lib/module/games/dino-jump/DinoJump.js +1 -209
- package/lib/module/games/dino-jump/DinoJump.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpConstants.js +1 -189
- package/lib/module/games/dino-jump/DinoJumpConstants.js.map +1 -1
- package/lib/module/games/dino-jump/DinoJumpService.js +1 -270
- package/lib/module/games/dino-jump/DinoJumpStore.js +1 -381
- package/lib/module/games/dino-jump/components/DinoSprite.js +1 -418
- package/lib/module/games/dino-jump/components/DinoSprite.js.map +1 -1
- package/lib/module/games/dino-jump/components/GameArea.js +1 -68
- package/lib/module/games/dino-jump/components/GameBackground.js +1 -444
- package/lib/module/games/dino-jump/components/ObstacleSprite.js +1 -306
- package/lib/module/games/dino-jump/components/ScoreBoard.js +1 -105
- package/lib/module/games/dino-jump/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/dino-jump/components/StarSprite.js +1 -45
- package/lib/module/games/dino-jump/components/index.js +1 -9
- package/lib/module/games/flappy-bird/FlappyBird.js +1 -126
- package/lib/module/games/flappy-bird/FlappyBird.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js +1 -90
- package/lib/module/games/flappy-bird/FlappyBirdConstants.js.map +1 -1
- package/lib/module/games/flappy-bird/FlappyBirdStore.js +1 -300
- package/lib/module/games/flappy-bird/components/Bird.js +1 -87
- package/lib/module/games/flappy-bird/components/GameArea.js +1 -87
- package/lib/module/games/flappy-bird/components/GameBackground.js +1 -79
- package/lib/module/games/flappy-bird/components/Pipes.js +1 -172
- package/lib/module/games/flappy-bird/components/ScoreBoard.js +1 -73
- package/lib/module/games/flappy-bird/components/index.js +1 -8
- package/lib/module/games/fruit-merger/FruitMerger.js +1 -120
- package/lib/module/games/fruit-merger/FruitMerger.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerConstants.js +1 -119
- package/lib/module/games/fruit-merger/FruitMergerConstants.js.map +1 -1
- package/lib/module/games/fruit-merger/FruitMergerService.js +1 -13
- package/lib/module/games/fruit-merger/FruitMergerStore.js +1 -315
- package/lib/module/games/fruit-merger/components/FruitItem.js +1 -102
- package/lib/module/games/fruit-merger/components/GameArea.js +1 -103
- package/lib/module/games/fruit-merger/components/GameBackground.js +1 -498
- package/lib/module/games/fruit-merger/components/ScoreBoard.js +1 -58
- package/lib/module/games/fruit-merger/components/index.js +1 -7
- package/lib/module/games/fruit-ninja/FruitNinja.js +1 -134
- package/lib/module/games/fruit-ninja/FruitNinja.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js +1 -148
- package/lib/module/games/fruit-ninja/FruitNinjaConstants.js.map +1 -1
- package/lib/module/games/fruit-ninja/FruitNinjaService.js +1 -311
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js +1 -191
- package/lib/module/games/fruit-ninja/FruitNinjaStore.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/FruitComponent.js +1 -99
- package/lib/module/games/fruit-ninja/components/GameArea.js +1 -215
- package/lib/module/games/fruit-ninja/components/GameBackground.js +1 -1267
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js +1 -92
- package/lib/module/games/fruit-ninja/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/fruit-ninja/components/index.js +1 -7
- package/lib/module/games/game-2048/Game2048.js +1 -149
- package/lib/module/games/game-2048/Game2048.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Constants.js +1 -263
- package/lib/module/games/game-2048/Game2048Constants.js.map +1 -1
- package/lib/module/games/game-2048/Game2048Service.js +1 -457
- package/lib/module/games/game-2048/Game2048Store.js +1 -236
- package/lib/module/games/game-2048/components/GameBackground.js +1 -247
- package/lib/module/games/game-2048/components/GameGrid.js +1 -139
- package/lib/module/games/game-2048/components/GameTile.js +1 -72
- package/lib/module/games/game-2048/components/ScoreBoard.js +1 -52
- package/lib/module/games/game-2048/components/index.js +1 -7
- package/lib/module/games/maze-runner/MazeRunner.js +1 -267
- package/lib/module/games/maze-runner/MazeRunner.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerConstants.js +1 -100
- package/lib/module/games/maze-runner/MazeRunnerConstants.js.map +1 -1
- package/lib/module/games/maze-runner/MazeRunnerService.js +1 -586
- package/lib/module/games/maze-runner/components/EnhancedBallComponent.js +1 -150
- package/lib/module/games/maze-runner/components/EnhancedGameArea.js +1 -370
- package/lib/module/games/maze-runner/components/GameBackground.js +1 -175
- package/lib/module/games/maze-runner/components/ScoreBoard.js +1 -61
- package/lib/module/games/maze-runner/components/SkiaPipeComponent.js +1 -209
- package/lib/module/games/maze-runner/components/StaticGameBackground.js +1 -169
- package/lib/module/games/maze-runner/components/WallComponent.js +1 -91
- package/lib/module/games/maze-runner/components/index.js +1 -8
- package/lib/module/games/popit-fidget/PopitFidget.js +1 -285
- package/lib/module/games/popit-fidget/PopitFidget.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js +1 -113
- package/lib/module/games/popit-fidget/PopitFidgetConstants.js.map +1 -1
- package/lib/module/games/popit-fidget/PopitFidgetService.js +1 -132
- package/lib/module/games/popit-fidget/PopitFidgetStore.js +1 -125
- package/lib/module/games/popit-fidget/components/BubbleComponent.js +1 -198
- package/lib/module/games/popit-fidget/components/FidgetGrid.js +1 -165
- package/lib/module/games/popit-fidget/components/GameBackground.js +1 -177
- package/lib/module/games/popit-fidget/components/ScoreBoard.js +1 -61
- package/lib/module/games/popit-fidget/components/index.js +1 -7
- package/lib/module/games/sliding-numbers/SlidingNumbers.js +1 -159
- package/lib/module/games/sliding-numbers/SlidingNumbers.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js +1 -207
- package/lib/module/games/sliding-numbers/SlidingNumbersConstants.js.map +1 -1
- package/lib/module/games/sliding-numbers/SlidingNumbersService.js +1 -248
- package/lib/module/games/sliding-numbers/SlidingNumbersStore.js +1 -274
- package/lib/module/games/sliding-numbers/components/GameBackground.js +1 -259
- package/lib/module/games/sliding-numbers/components/NumbersGrid.js +1 -174
- package/lib/module/games/sliding-numbers/components/NumbersTile.js +1 -116
- package/lib/module/games/sliding-numbers/components/ScoreBoard.js +1 -64
- package/lib/module/games/sliding-numbers/components/index.js +1 -7
- package/lib/module/games/snake/Snake.js +1 -189
- package/lib/module/games/snake/Snake.js.map +1 -1
- package/lib/module/games/snake/SnakeConstants.js +1 -138
- package/lib/module/games/snake/SnakeConstants.js.map +1 -1
- package/lib/module/games/snake/SnakeService.js +1 -148
- package/lib/module/games/snake/SnakeStore.js +1 -182
- package/lib/module/games/snake/components/GameBackground.js +1 -221
- package/lib/module/games/snake/components/GameGrid.js +1 -153
- package/lib/module/games/snake/components/ScoreBoard.js +1 -51
- package/lib/module/games/snake/components/index.js +1 -6
- package/lib/module/games/snake/index.js +1 -6
- package/lib/module/games/space-fighter/SpaceFighter.js +1 -165
- package/lib/module/games/space-fighter/SpaceFighter.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterConstants.js +1 -108
- package/lib/module/games/space-fighter/SpaceFighterConstants.js.map +1 -1
- package/lib/module/games/space-fighter/SpaceFighterService.js +1 -326
- package/lib/module/games/space-fighter/SpaceFighterStore.js +1 -209
- package/lib/module/games/space-fighter/components/AsteroidComponent.js +1 -113
- package/lib/module/games/space-fighter/components/GameArea.js +1 -289
- package/lib/module/games/space-fighter/components/GameBackground.js +1 -239
- package/lib/module/games/space-fighter/components/ScoreBoard.js +1 -136
- package/lib/module/games/space-fighter/components/Spacecraft3D.js +1 -202
- package/lib/module/games/space-fighter/components/SpacecraftPath.js +1 -52
- package/lib/module/games/space-fighter/components/index.js +1 -9
- package/lib/module/games/whack-a-mole/WhackAMole.js +1 -270
- package/lib/module/games/whack-a-mole/WhackAMole.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js +1 -115
- package/lib/module/games/whack-a-mole/WhackAMoleConstants.js.map +1 -1
- package/lib/module/games/whack-a-mole/WhackAMoleService.js +1 -120
- package/lib/module/games/whack-a-mole/WhackAMoleStore.js +1 -172
- package/lib/module/games/whack-a-mole/components/GameBackground.js +1 -477
- package/lib/module/games/whack-a-mole/components/GameGrid.js +1 -97
- package/lib/module/games/whack-a-mole/components/GameHole.js +1 -196
- package/lib/module/games/whack-a-mole/components/MoleCharacter.js +1 -241
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js +1 -67
- package/lib/module/games/whack-a-mole/components/ScoreBoard.js.map +1 -1
- package/lib/module/games/whack-a-mole/components/index.js +1 -8
- package/lib/module/helpers/AnimationFrame.js +1 -120
- package/lib/module/helpers/AnimationTracker.js +1 -89
- package/lib/module/helpers/ErrorHandler.js +1 -269
- package/lib/module/helpers/GameControlButton.js +1 -219
- package/lib/module/helpers/GameOverModal.js +1 -144
- package/lib/module/helpers/GameOverModal.js.map +1 -1
- package/lib/module/helpers/GameSettingsModal.js +1 -287
- package/lib/module/helpers/ParticleBlast.js +1 -134
- package/lib/module/helpers/ScoreBoardContainer.js +1 -34
- package/lib/module/helpers/index.js +1 -12
- package/lib/module/index.js +1 -22
- package/lib/module/services/GamesConstants.js +1 -178
- package/lib/module/services/GamesService.js +1 -112
- package/lib/module/services/GamesService.js.map +1 -1
- package/lib/module/services/HapticsService.js +1 -77
- package/lib/module/services/SoundsService.js +1 -302
- package/lib/module/services/UtilsService.js +1 -32
- package/lib/typescript/src/games/balloon-blaster/BalloonBlaster.d.ts.map +1 -1
- package/lib/typescript/src/games/balloon-blaster/BalloonBlasterConstants.d.ts +1 -1
- package/lib/typescript/src/games/balloon-blaster/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/candy-crush/CandyCrushConstants.d.ts +7 -7
- package/lib/typescript/src/games/colors-sort/ColorsSort.d.ts.map +1 -1
- package/lib/typescript/src/games/colors-sort/ColorsSortStore.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/DinoJump.d.ts.map +1 -1
- package/lib/typescript/src/games/dino-jump/components/DinoSprite.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBird.d.ts.map +1 -1
- package/lib/typescript/src/games/flappy-bird/FlappyBirdConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMerger.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-merger/FruitMergerConstants.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/FruitNinja.d.ts.map +1 -1
- package/lib/typescript/src/games/fruit-ninja/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/games/game-2048/Game2048.d.ts.map +1 -1
- package/lib/typescript/src/games/maze-runner/MazeRunner.d.ts.map +1 -1
- package/lib/typescript/src/games/popit-fidget/PopitFidget.d.ts.map +1 -1
- package/lib/typescript/src/games/sliding-numbers/SlidingNumbers.d.ts.map +1 -1
- package/lib/typescript/src/games/space-fighter/SpaceFighter.d.ts.map +1 -1
- 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 +1 -1
- package/lib/typescript/src/games/whack-a-mole/components/ScoreBoard.d.ts.map +1 -1
- package/lib/typescript/src/helpers/GameOverModal.d.ts +3 -0
- package/lib/typescript/src/helpers/GameOverModal.d.ts.map +1 -1
- package/lib/typescript/src/services/GamesConstants.d.ts +7 -7
- package/package.json +2 -2
|
@@ -1,444 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, StyleSheet, Dimensions } from 'react-native';
|
|
5
|
-
import { Canvas, LinearGradient, Rect, vec, Circle, Path, Skia, Group, Shadow } from '@shopify/react-native-skia';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
const {
|
|
8
|
-
width,
|
|
9
|
-
height
|
|
10
|
-
} = Dimensions.get('window');
|
|
11
|
-
// Create ground path based on dynamic ground height
|
|
12
|
-
const createGroundPath = groundY => {
|
|
13
|
-
const path = Skia.Path.Make();
|
|
14
|
-
path.moveTo(0, groundY);
|
|
15
|
-
path.lineTo(width, groundY);
|
|
16
|
-
path.lineTo(width, height);
|
|
17
|
-
path.lineTo(0, height);
|
|
18
|
-
path.close();
|
|
19
|
-
return path;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// Pre-compute static sun rays (from FruitNinja)
|
|
23
|
-
const createStaticSunRays = () => {
|
|
24
|
-
return Array.from({
|
|
25
|
-
length: 16
|
|
26
|
-
}, (_, index) => {
|
|
27
|
-
const angle = 360 / 16 * index;
|
|
28
|
-
const radian = angle * Math.PI / 180;
|
|
29
|
-
const isLongRay = index % 2 === 0;
|
|
30
|
-
const rayLength = isLongRay ? 25 : 15;
|
|
31
|
-
const rayWidth = isLongRay ? 4 : 2;
|
|
32
|
-
const startDistance = 45;
|
|
33
|
-
const startX = width * 0.8 + Math.cos(radian) * startDistance;
|
|
34
|
-
const startY = height * 0.22 + Math.sin(radian) * startDistance;
|
|
35
|
-
const endX = width * 0.8 + Math.cos(radian) * (startDistance + rayLength);
|
|
36
|
-
const endY = height * 0.22 + Math.sin(radian) * (startDistance + rayLength);
|
|
37
|
-
const rayPath = Skia.Path.Make();
|
|
38
|
-
rayPath.moveTo(startX, startY);
|
|
39
|
-
rayPath.lineTo(endX, endY);
|
|
40
|
-
return {
|
|
41
|
-
path: rayPath,
|
|
42
|
-
width: rayWidth
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
const staticSunRays = createStaticSunRays();
|
|
47
|
-
export const GameBackground = /*#__PURE__*/React.memo(({
|
|
48
|
-
children,
|
|
49
|
-
offset = 0
|
|
50
|
-
}) => {
|
|
51
|
-
// Dynamic ground height based on offset
|
|
52
|
-
const groundHeight = offset > 0 ? 150 : 250;
|
|
53
|
-
const groundY = height - groundHeight;
|
|
54
|
-
|
|
55
|
-
// Create dynamic ground path
|
|
56
|
-
const groundPath = createGroundPath(groundY);
|
|
57
|
-
|
|
58
|
-
// Adjust sun and cloud positions based on offset (like Fruit Ninja)
|
|
59
|
-
const sunY = height * 0.20 + offset * 0.9;
|
|
60
|
-
const cloud1Y = height * 0.25 + offset * 0.9;
|
|
61
|
-
const cloud2Y = height * 0.30 + offset * 0.9;
|
|
62
|
-
const cloud3Y = height * 0.35 + offset * 0.9;
|
|
63
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
64
|
-
style: styles.container,
|
|
65
|
-
children: [/*#__PURE__*/_jsxs(Canvas, {
|
|
66
|
-
style: styles.canvas,
|
|
67
|
-
children: [/*#__PURE__*/_jsx(Rect, {
|
|
68
|
-
x: 0,
|
|
69
|
-
y: 0,
|
|
70
|
-
width: width,
|
|
71
|
-
height: groundY,
|
|
72
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
73
|
-
start: vec(0, 0),
|
|
74
|
-
end: vec(0, groundY),
|
|
75
|
-
colors: ['#87CEEB', '#98D8E8', '#B0E0E6']
|
|
76
|
-
})
|
|
77
|
-
}), /*#__PURE__*/_jsxs(Group, {
|
|
78
|
-
children: [/*#__PURE__*/_jsxs(Circle, {
|
|
79
|
-
cx: width * 0.8,
|
|
80
|
-
cy: sunY,
|
|
81
|
-
r: 40,
|
|
82
|
-
children: [/*#__PURE__*/_jsx(LinearGradient, {
|
|
83
|
-
start: vec(-40, -40),
|
|
84
|
-
end: vec(40, 40),
|
|
85
|
-
colors: ['#FFFF99', '#FFD700', '#FFA500', '#FF8C00']
|
|
86
|
-
}), /*#__PURE__*/_jsx(Shadow, {
|
|
87
|
-
dx: 0,
|
|
88
|
-
dy: 0,
|
|
89
|
-
blur: 32,
|
|
90
|
-
color: "#FFD700"
|
|
91
|
-
})]
|
|
92
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
93
|
-
cx: width * 0.8 - 8,
|
|
94
|
-
cy: sunY - 8,
|
|
95
|
-
r: 15,
|
|
96
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
97
|
-
start: vec(-15, -15),
|
|
98
|
-
end: vec(15, 15),
|
|
99
|
-
colors: ['#FFFFFF', '#FFFF99']
|
|
100
|
-
})
|
|
101
|
-
}), staticSunRays.map((_ray, index) => {
|
|
102
|
-
// Recalculate ray positions based on offset
|
|
103
|
-
const angle = 360 / 16 * index;
|
|
104
|
-
const radian = angle * Math.PI / 180;
|
|
105
|
-
const isLongRay = index % 2 === 0;
|
|
106
|
-
const rayLength = isLongRay ? 25 : 15;
|
|
107
|
-
const rayWidth = isLongRay ? 4 : 2;
|
|
108
|
-
const startDistance = 45;
|
|
109
|
-
const startX = width * 0.8 + Math.cos(radian) * startDistance;
|
|
110
|
-
const startY = sunY + Math.sin(radian) * startDistance;
|
|
111
|
-
const endX = width * 0.8 + Math.cos(radian) * (startDistance + rayLength);
|
|
112
|
-
const endY = sunY + Math.sin(radian) * (startDistance + rayLength);
|
|
113
|
-
const rayPath = Skia.Path.Make();
|
|
114
|
-
rayPath.moveTo(startX, startY);
|
|
115
|
-
rayPath.lineTo(endX, endY);
|
|
116
|
-
return /*#__PURE__*/_jsx(Path, {
|
|
117
|
-
path: rayPath,
|
|
118
|
-
style: "stroke",
|
|
119
|
-
strokeWidth: rayWidth,
|
|
120
|
-
color: "#FFD700",
|
|
121
|
-
opacity: 0.75
|
|
122
|
-
}, index);
|
|
123
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
124
|
-
cx: width * 0.8,
|
|
125
|
-
cy: sunY,
|
|
126
|
-
r: 60,
|
|
127
|
-
opacity: 0.1,
|
|
128
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
129
|
-
start: vec(-60, -60),
|
|
130
|
-
end: vec(60, 60),
|
|
131
|
-
colors: ['#FFD700', 'transparent']
|
|
132
|
-
})
|
|
133
|
-
})]
|
|
134
|
-
}), /*#__PURE__*/_jsxs(Group, {
|
|
135
|
-
children: [/*#__PURE__*/_jsxs(Group, {
|
|
136
|
-
children: [/*#__PURE__*/_jsx(Circle, {
|
|
137
|
-
cx: width * 0.12,
|
|
138
|
-
cy: cloud1Y,
|
|
139
|
-
r: 16,
|
|
140
|
-
color: "#F0F8FF",
|
|
141
|
-
opacity: 0.35,
|
|
142
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
143
|
-
dx: 1,
|
|
144
|
-
dy: 2,
|
|
145
|
-
blur: 12,
|
|
146
|
-
color: "rgba(0,0,0,0.05)"
|
|
147
|
-
})
|
|
148
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
149
|
-
cx: width * 0.18,
|
|
150
|
-
cy: cloud1Y - height * 0.03,
|
|
151
|
-
r: 22,
|
|
152
|
-
color: "#FFFFFF",
|
|
153
|
-
opacity: 0.45,
|
|
154
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
155
|
-
dx: 1,
|
|
156
|
-
dy: 2,
|
|
157
|
-
blur: 12,
|
|
158
|
-
color: "rgba(0,0,0,0.05)"
|
|
159
|
-
})
|
|
160
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
161
|
-
cx: width * 0.25,
|
|
162
|
-
cy: cloud1Y - height * 0.05,
|
|
163
|
-
r: 26,
|
|
164
|
-
color: "#F8F8FF",
|
|
165
|
-
opacity: 0.55,
|
|
166
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
167
|
-
dx: 2,
|
|
168
|
-
dy: 3,
|
|
169
|
-
blur: 12,
|
|
170
|
-
color: "rgba(0,0,0,0.06)"
|
|
171
|
-
})
|
|
172
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
173
|
-
cx: width * 0.32,
|
|
174
|
-
cy: cloud1Y - height * 0.03,
|
|
175
|
-
r: 20,
|
|
176
|
-
color: "#FFFFFF",
|
|
177
|
-
opacity: 0.50,
|
|
178
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
179
|
-
dx: 1,
|
|
180
|
-
dy: 2,
|
|
181
|
-
blur: 12,
|
|
182
|
-
color: "rgba(0,0,0,0.05)"
|
|
183
|
-
})
|
|
184
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
185
|
-
cx: width * 0.37,
|
|
186
|
-
cy: cloud1Y,
|
|
187
|
-
r: 14,
|
|
188
|
-
color: "#F0F8FF",
|
|
189
|
-
opacity: 0.40,
|
|
190
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
191
|
-
dx: 1,
|
|
192
|
-
dy: 2,
|
|
193
|
-
blur: 12,
|
|
194
|
-
color: "rgba(0,0,0,0.04)"
|
|
195
|
-
})
|
|
196
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
197
|
-
cx: width * 0.15,
|
|
198
|
-
cy: cloud1Y + height * 0.02,
|
|
199
|
-
r: 8,
|
|
200
|
-
color: "#F8F8FF",
|
|
201
|
-
opacity: 0.25
|
|
202
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
203
|
-
cx: width * 0.35,
|
|
204
|
-
cy: cloud1Y - height * 0.06,
|
|
205
|
-
r: 6,
|
|
206
|
-
color: "#FFFFFF",
|
|
207
|
-
opacity: 0.30
|
|
208
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
209
|
-
cx: width * 0.40,
|
|
210
|
-
cy: cloud1Y - height * 0.02,
|
|
211
|
-
r: 5,
|
|
212
|
-
color: "#F0F8FF",
|
|
213
|
-
opacity: 0.20
|
|
214
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
215
|
-
cx: width * 0.22,
|
|
216
|
-
cy: cloud1Y - height * 0.06,
|
|
217
|
-
r: 7,
|
|
218
|
-
color: "#FFFFFF",
|
|
219
|
-
opacity: 0.35
|
|
220
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
221
|
-
cx: width * 0.28,
|
|
222
|
-
cy: cloud1Y - height * 0.04,
|
|
223
|
-
r: 5,
|
|
224
|
-
color: "#FFFFFF",
|
|
225
|
-
opacity: 0.25
|
|
226
|
-
})]
|
|
227
|
-
}), /*#__PURE__*/_jsxs(Group, {
|
|
228
|
-
children: [/*#__PURE__*/_jsx(Circle, {
|
|
229
|
-
cx: width * 0.62,
|
|
230
|
-
cy: cloud2Y,
|
|
231
|
-
r: 15,
|
|
232
|
-
color: "#F0F8FF",
|
|
233
|
-
opacity: 0.40,
|
|
234
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
235
|
-
dx: 1,
|
|
236
|
-
dy: 2,
|
|
237
|
-
blur: 10,
|
|
238
|
-
color: "rgba(0,0,0,0.04)"
|
|
239
|
-
})
|
|
240
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
241
|
-
cx: width * 0.69,
|
|
242
|
-
cy: cloud2Y - height * 0.03,
|
|
243
|
-
r: 19,
|
|
244
|
-
color: "#FFFFFF",
|
|
245
|
-
opacity: 0.50,
|
|
246
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
247
|
-
dx: 1,
|
|
248
|
-
dy: 2,
|
|
249
|
-
blur: 10,
|
|
250
|
-
color: "rgba(0,0,0,0.05)"
|
|
251
|
-
})
|
|
252
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
253
|
-
cx: width * 0.76,
|
|
254
|
-
cy: cloud2Y - height * 0.01,
|
|
255
|
-
r: 13,
|
|
256
|
-
color: "#F8F8FF",
|
|
257
|
-
opacity: 0.45,
|
|
258
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
259
|
-
dx: 1,
|
|
260
|
-
dy: 2,
|
|
261
|
-
blur: 10,
|
|
262
|
-
color: "rgba(0,0,0,0.04)"
|
|
263
|
-
})
|
|
264
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
265
|
-
cx: width * 0.81,
|
|
266
|
-
cy: cloud2Y + height * 0.01,
|
|
267
|
-
r: 9,
|
|
268
|
-
color: "#F0F8FF",
|
|
269
|
-
opacity: 0.35,
|
|
270
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
271
|
-
dx: 1,
|
|
272
|
-
dy: 1,
|
|
273
|
-
blur: 8,
|
|
274
|
-
color: "rgba(0,0,0,0.03)"
|
|
275
|
-
})
|
|
276
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
277
|
-
cx: width * 0.65,
|
|
278
|
-
cy: cloud2Y + height * 0.02,
|
|
279
|
-
r: 6,
|
|
280
|
-
color: "#F8F8FF",
|
|
281
|
-
opacity: 0.20
|
|
282
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
283
|
-
cx: width * 0.78,
|
|
284
|
-
cy: cloud2Y - height * 0.04,
|
|
285
|
-
r: 4,
|
|
286
|
-
color: "#FFFFFF",
|
|
287
|
-
opacity: 0.25
|
|
288
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
289
|
-
cx: width * 0.67,
|
|
290
|
-
cy: cloud2Y - height * 0.04,
|
|
291
|
-
r: 5,
|
|
292
|
-
color: "#FFFFFF",
|
|
293
|
-
opacity: 0.30
|
|
294
|
-
})]
|
|
295
|
-
}), /*#__PURE__*/_jsxs(Group, {
|
|
296
|
-
children: [/*#__PURE__*/_jsx(Circle, {
|
|
297
|
-
cx: width * 0.84,
|
|
298
|
-
cy: cloud3Y,
|
|
299
|
-
r: 10,
|
|
300
|
-
color: "#F0F8FF",
|
|
301
|
-
opacity: 0.35,
|
|
302
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
303
|
-
dx: 0,
|
|
304
|
-
dy: 1,
|
|
305
|
-
blur: 6,
|
|
306
|
-
color: "rgba(0,0,0,0.03)"
|
|
307
|
-
})
|
|
308
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
309
|
-
cx: width * 0.89,
|
|
310
|
-
cy: cloud3Y - height * 0.02,
|
|
311
|
-
r: 12,
|
|
312
|
-
color: "#FFFFFF",
|
|
313
|
-
opacity: 0.40,
|
|
314
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
315
|
-
dx: 0,
|
|
316
|
-
dy: 1,
|
|
317
|
-
blur: 6,
|
|
318
|
-
color: "rgba(0,0,0,0.03)"
|
|
319
|
-
})
|
|
320
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
321
|
-
cx: width * 0.93,
|
|
322
|
-
cy: cloud3Y,
|
|
323
|
-
r: 8,
|
|
324
|
-
color: "#F8F8FF",
|
|
325
|
-
opacity: 0.30,
|
|
326
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
327
|
-
dx: 0,
|
|
328
|
-
dy: 1,
|
|
329
|
-
blur: 6,
|
|
330
|
-
color: "rgba(0,0,0,0.02)"
|
|
331
|
-
})
|
|
332
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
333
|
-
cx: width * 0.96,
|
|
334
|
-
cy: cloud3Y - height * 0.01,
|
|
335
|
-
r: 4,
|
|
336
|
-
color: "#F0F8FF",
|
|
337
|
-
opacity: 0.15
|
|
338
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
339
|
-
cx: width * 0.86,
|
|
340
|
-
cy: cloud3Y + height * 0.02,
|
|
341
|
-
r: 3,
|
|
342
|
-
color: "#FFFFFF",
|
|
343
|
-
opacity: 0.20
|
|
344
|
-
})]
|
|
345
|
-
}), /*#__PURE__*/_jsxs(Group, {
|
|
346
|
-
children: [/*#__PURE__*/_jsx(Circle, {
|
|
347
|
-
cx: width * 0.45,
|
|
348
|
-
cy: height * 0.21,
|
|
349
|
-
r: 8,
|
|
350
|
-
color: "#F8F8FF",
|
|
351
|
-
opacity: 0.25,
|
|
352
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
353
|
-
dx: 0,
|
|
354
|
-
dy: 1,
|
|
355
|
-
blur: 4,
|
|
356
|
-
color: "rgba(0,0,0,0.02)"
|
|
357
|
-
})
|
|
358
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
359
|
-
cx: width * 0.50,
|
|
360
|
-
cy: height * 0.19,
|
|
361
|
-
r: 10,
|
|
362
|
-
color: "#FFFFFF",
|
|
363
|
-
opacity: 0.30,
|
|
364
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
365
|
-
dx: 0,
|
|
366
|
-
dy: 1,
|
|
367
|
-
blur: 4,
|
|
368
|
-
color: "rgba(0,0,0,0.02)"
|
|
369
|
-
})
|
|
370
|
-
}), /*#__PURE__*/_jsx(Circle, {
|
|
371
|
-
cx: width * 0.54,
|
|
372
|
-
cy: height * 0.21,
|
|
373
|
-
r: 6,
|
|
374
|
-
color: "#F0F8FF",
|
|
375
|
-
opacity: 0.20,
|
|
376
|
-
children: /*#__PURE__*/_jsx(Shadow, {
|
|
377
|
-
dx: 0,
|
|
378
|
-
dy: 1,
|
|
379
|
-
blur: 4,
|
|
380
|
-
color: "rgba(0,0,0,0.01)"
|
|
381
|
-
})
|
|
382
|
-
})]
|
|
383
|
-
})]
|
|
384
|
-
}), /*#__PURE__*/_jsxs(Path, {
|
|
385
|
-
path: groundPath,
|
|
386
|
-
children: [/*#__PURE__*/_jsx(LinearGradient, {
|
|
387
|
-
start: vec(0, groundY),
|
|
388
|
-
end: vec(0, height),
|
|
389
|
-
colors: ['#8B4513', '#A0522D', '#654321']
|
|
390
|
-
}), /*#__PURE__*/_jsx(Shadow, {
|
|
391
|
-
dx: 0,
|
|
392
|
-
dy: -3,
|
|
393
|
-
blur: 6,
|
|
394
|
-
color: "rgba(0,0,0,0.3)"
|
|
395
|
-
})]
|
|
396
|
-
}), /*#__PURE__*/_jsx(Rect, {
|
|
397
|
-
x: 0,
|
|
398
|
-
y: groundY - 15,
|
|
399
|
-
width: width,
|
|
400
|
-
height: 15,
|
|
401
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
402
|
-
start: vec(0, groundY - 15),
|
|
403
|
-
end: vec(0, groundY),
|
|
404
|
-
colors: ['#32CD32', '#228B22', '#006400']
|
|
405
|
-
})
|
|
406
|
-
}), /*#__PURE__*/_jsx(Rect, {
|
|
407
|
-
x: 0,
|
|
408
|
-
y: groundY - 15,
|
|
409
|
-
width: width,
|
|
410
|
-
height: 2,
|
|
411
|
-
color: "#004d00"
|
|
412
|
-
}), Array.from({
|
|
413
|
-
length: 15
|
|
414
|
-
}, (_, i) => {
|
|
415
|
-
const x = width / 15 * i + i % 3 * 20;
|
|
416
|
-
const y = groundY + 30 + i % 4 * 20;
|
|
417
|
-
const size = 2 + i % 3;
|
|
418
|
-
return /*#__PURE__*/_jsx(Circle, {
|
|
419
|
-
cx: x,
|
|
420
|
-
cy: y,
|
|
421
|
-
r: size,
|
|
422
|
-
color: "#654321",
|
|
423
|
-
opacity: 0.6
|
|
424
|
-
}, `dirt-${i}`);
|
|
425
|
-
})]
|
|
426
|
-
}), children]
|
|
427
|
-
});
|
|
428
|
-
});
|
|
429
|
-
const styles = StyleSheet.create({
|
|
430
|
-
container: {
|
|
431
|
-
flex: 1
|
|
432
|
-
},
|
|
433
|
-
canvas: {
|
|
434
|
-
position: 'absolute',
|
|
435
|
-
top: 0,
|
|
436
|
-
left: 0,
|
|
437
|
-
right: 0,
|
|
438
|
-
bottom: 0,
|
|
439
|
-
width,
|
|
440
|
-
height
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
GameBackground.displayName = 'GameBackground';
|
|
444
|
-
//# sourceMappingURL=GameBackground.js.map
|
|
1
|
+
"use strict";import React from 'react';import{View,StyleSheet,Dimensions}from 'react-native';import{Canvas,LinearGradient,Rect,vec,Circle,Path,Skia,Group,Shadow}from '@shopify/react-native-skia';import{jsx as _jsx,jsxs as _jsxs}from "react/jsx-runtime";const{width,height}= Dimensions.get('window');const createGroundPath = groundY =>{const path = Skia.Path.Make();path.moveTo(0,groundY);path.lineTo(width,groundY);path.lineTo(width,height);path.lineTo(0,height);path.close();return path;};const createStaticSunRays =()=>{return Array.from({length:16},(_,index)=>{const angle = 360 / 16 * index;const radian = angle * Math.PI / 180;const isLongRay = index % 2 === 0;const rayLength = isLongRay ? 25:15;const rayWidth = isLongRay ? 4:2;const startDistance = 45;const startX = width * 0.8 + Math.cos(radian)* startDistance;const startY = height * 0.22 + Math.sin(radian)* startDistance;const endX = width * 0.8 + Math.cos(radian)*(startDistance + rayLength);const endY = height * 0.22 + Math.sin(radian)*(startDistance + rayLength);const rayPath = Skia.Path.Make();rayPath.moveTo(startX,startY);rayPath.lineTo(endX,endY);return{path:rayPath,width:rayWidth};});};const staticSunRays = createStaticSunRays();export const GameBackground = React.memo(({children,offset = 0})=>{const groundHeight = offset > 0 ? 150:250;const groundY = height - groundHeight;const groundPath = createGroundPath(groundY);const sunY = height * 0.20 + offset * 0.9;const cloud1Y = height * 0.25 + offset * 0.9;const cloud2Y = height * 0.30 + offset * 0.9;const cloud3Y = height * 0.35 + offset * 0.9;return _jsxs(View,{style:styles.container,children:[_jsxs(Canvas,{style:styles.canvas,children:[_jsx(Rect,{x:0,y:0,width:width,height:groundY,children:_jsx(LinearGradient,{start:vec(0,0),end:vec(0,groundY),colors:['#87CEEB','#98D8E8','#B0E0E6']})}),_jsxs(Group,{children:[_jsxs(Circle,{cx:width * 0.8,cy:sunY,r:40,children:[_jsx(LinearGradient,{start:vec(-40,-40),end:vec(40,40),colors:['#FFFF99','#FFD700','#FFA500','#FF8C00']}),_jsx(Shadow,{dx:0,dy:0,blur:32,color:"#FFD700"})]}),_jsx(Circle,{cx:width * 0.8 - 8,cy:sunY - 8,r:15,children:_jsx(LinearGradient,{start:vec(-15,-15),end:vec(15,15),colors:['#FFFFFF','#FFFF99']})}),staticSunRays.map((_ray,index)=>{const angle = 360 / 16 * index;const radian = angle * Math.PI / 180;const isLongRay = index % 2 === 0;const rayLength = isLongRay ? 25:15;const rayWidth = isLongRay ? 4:2;const startDistance = 45;const startX = width * 0.8 + Math.cos(radian)* startDistance;const startY = sunY + Math.sin(radian)* startDistance;const endX = width * 0.8 + Math.cos(radian)*(startDistance + rayLength);const endY = sunY + Math.sin(radian)*(startDistance + rayLength);const rayPath = Skia.Path.Make();rayPath.moveTo(startX,startY);rayPath.lineTo(endX,endY);return _jsx(Path,{path:rayPath,style:"stroke",strokeWidth:rayWidth,color:"#FFD700",opacity:0.75},index);}),_jsx(Circle,{cx:width * 0.8,cy:sunY,r:60,opacity:0.1,children:_jsx(LinearGradient,{start:vec(-60,-60),end:vec(60,60),colors:['#FFD700','transparent']})})]}),_jsxs(Group,{children:[_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.12,cy:cloud1Y,r:16,color:"#F0F8FF",opacity:0.35,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.18,cy:cloud1Y - height * 0.03,r:22,color:"#FFFFFF",opacity:0.45,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.25,cy:cloud1Y - height * 0.05,r:26,color:"#F8F8FF",opacity:0.55,children:_jsx(Shadow,{dx:2,dy:3,blur:12,color:"rgba(0,0,0,0.06)"})}),_jsx(Circle,{cx:width * 0.32,cy:cloud1Y - height * 0.03,r:20,color:"#FFFFFF",opacity:0.50,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.37,cy:cloud1Y,r:14,color:"#F0F8FF",opacity:0.40,children:_jsx(Shadow,{dx:1,dy:2,blur:12,color:"rgba(0,0,0,0.04)"})}),_jsx(Circle,{cx:width * 0.15,cy:cloud1Y + height * 0.02,r:8,color:"#F8F8FF",opacity:0.25}),_jsx(Circle,{cx:width * 0.35,cy:cloud1Y - height * 0.06,r:6,color:"#FFFFFF",opacity:0.30}),_jsx(Circle,{cx:width * 0.40,cy:cloud1Y - height * 0.02,r:5,color:"#F0F8FF",opacity:0.20}),_jsx(Circle,{cx:width * 0.22,cy:cloud1Y - height * 0.06,r:7,color:"#FFFFFF",opacity:0.35}),_jsx(Circle,{cx:width * 0.28,cy:cloud1Y - height * 0.04,r:5,color:"#FFFFFF",opacity:0.25})]}),_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.62,cy:cloud2Y,r:15,color:"#F0F8FF",opacity:0.40,children:_jsx(Shadow,{dx:1,dy:2,blur:10,color:"rgba(0,0,0,0.04)"})}),_jsx(Circle,{cx:width * 0.69,cy:cloud2Y - height * 0.03,r:19,color:"#FFFFFF",opacity:0.50,children:_jsx(Shadow,{dx:1,dy:2,blur:10,color:"rgba(0,0,0,0.05)"})}),_jsx(Circle,{cx:width * 0.76,cy:cloud2Y - height * 0.01,r:13,color:"#F8F8FF",opacity:0.45,children:_jsx(Shadow,{dx:1,dy:2,blur:10,color:"rgba(0,0,0,0.04)"})}),_jsx(Circle,{cx:width * 0.81,cy:cloud2Y + height * 0.01,r:9,color:"#F0F8FF",opacity:0.35,children:_jsx(Shadow,{dx:1,dy:1,blur:8,color:"rgba(0,0,0,0.03)"})}),_jsx(Circle,{cx:width * 0.65,cy:cloud2Y + height * 0.02,r:6,color:"#F8F8FF",opacity:0.20}),_jsx(Circle,{cx:width * 0.78,cy:cloud2Y - height * 0.04,r:4,color:"#FFFFFF",opacity:0.25}),_jsx(Circle,{cx:width * 0.67,cy:cloud2Y - height * 0.04,r:5,color:"#FFFFFF",opacity:0.30})]}),_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.84,cy:cloud3Y,r:10,color:"#F0F8FF",opacity:0.35,children:_jsx(Shadow,{dx:0,dy:1,blur:6,color:"rgba(0,0,0,0.03)"})}),_jsx(Circle,{cx:width * 0.89,cy:cloud3Y - height * 0.02,r:12,color:"#FFFFFF",opacity:0.40,children:_jsx(Shadow,{dx:0,dy:1,blur:6,color:"rgba(0,0,0,0.03)"})}),_jsx(Circle,{cx:width * 0.93,cy:cloud3Y,r:8,color:"#F8F8FF",opacity:0.30,children:_jsx(Shadow,{dx:0,dy:1,blur:6,color:"rgba(0,0,0,0.02)"})}),_jsx(Circle,{cx:width * 0.96,cy:cloud3Y - height * 0.01,r:4,color:"#F0F8FF",opacity:0.15}),_jsx(Circle,{cx:width * 0.86,cy:cloud3Y + height * 0.02,r:3,color:"#FFFFFF",opacity:0.20})]}),_jsxs(Group,{children:[_jsx(Circle,{cx:width * 0.45,cy:height * 0.21,r:8,color:"#F8F8FF",opacity:0.25,children:_jsx(Shadow,{dx:0,dy:1,blur:4,color:"rgba(0,0,0,0.02)"})}),_jsx(Circle,{cx:width * 0.50,cy:height * 0.19,r:10,color:"#FFFFFF",opacity:0.30,children:_jsx(Shadow,{dx:0,dy:1,blur:4,color:"rgba(0,0,0,0.02)"})}),_jsx(Circle,{cx:width * 0.54,cy:height * 0.21,r:6,color:"#F0F8FF",opacity:0.20,children:_jsx(Shadow,{dx:0,dy:1,blur:4,color:"rgba(0,0,0,0.01)"})})]})]}),_jsxs(Path,{path:groundPath,children:[_jsx(LinearGradient,{start:vec(0,groundY),end:vec(0,height),colors:['#8B4513','#A0522D','#654321']}),_jsx(Shadow,{dx:0,dy:-3,blur:6,color:"rgba(0,0,0,0.3)"})]}),_jsx(Rect,{x:0,y:groundY - 15,width:width,height:15,children:_jsx(LinearGradient,{start:vec(0,groundY - 15),end:vec(0,groundY),colors:['#32CD32','#228B22','#006400']})}),_jsx(Rect,{x:0,y:groundY - 15,width:width,height:2,color:"#004d00"}),Array.from({length:15},(_,i)=>{const x = width / 15 * i + i % 3 * 20;const y = groundY + 30 + i % 4 * 20;const size = 2 + i % 3;return _jsx(Circle,{cx:x,cy:y,r:size,color:"#654321",opacity:0.6},`dirt-${i}`);})]}),children]});});const styles = StyleSheet.create({container:{flex:1},canvas:{position:'absolute',top:0,left:0,right:0,bottom:0,width,height}});GameBackground.displayName = 'GameBackground';
|