@trapar-waves/react-three-maplibre 1.1.23 → 2.0.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 +40 -67
- package/assets/readme/headers/contributing.svg +15 -0
- package/assets/readme/headers/features.svg +15 -0
- package/assets/readme/headers/getting-started.svg +15 -0
- package/assets/readme/headers/license.svg +15 -0
- package/assets/readme/headers/project-structure.svg +15 -0
- package/assets/readme/headers/tech-stack.svg +15 -0
- package/assets/readme/headers/usage.svg +15 -0
- package/assets/readme/hero.svg +67 -0
- package/environments/.env +2 -1
- package/eslint.config.js +11 -9
- package/lint-staged.config.js +1 -1
- package/package.json +35 -30
- package/pnpm-workspace.yaml +9 -0
- package/readme/README-CN.md +69 -101
- package/readme/README-JP.md +69 -101
- package/readme/README-RU.md +53 -85
- package/rsbuild.config.ts +46 -1
- package/src/app.tsx +217 -0
- package/src/index.tsx +4 -4
- package/tsconfig.json +1 -1
- package/src/App.tsx +0 -91
- /package/src/{env.d.ts → environment.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
[中文](
|
|
12
|
+
[中文](./readme/README-CN.md) | [日本語](./readme/README-JP.md) | [Русский язык](./readme/README-RU.md)
|
|
13
13
|
|
|
14
14
|
> A React-based library integrating Three.js, MapLibre, and AntV for advanced geospatial 3D visualizations.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+

|
|
17
19
|
|
|
18
20
|
- **Geospatial Visualization:** Combines `@antv/l7` and `maplibre-gl` for powerful geospatial data rendering with custom map layers.
|
|
19
21
|
- **3D Rendering with React:** Leverages `@react-three/fiber` and `@react-three/drei` to integrate Three.js into a React-based workflow for declarative 3D scene management.
|
|
@@ -25,89 +27,58 @@
|
|
|
25
27
|
- **Map Interactivity:** Implements `react-map-gl` for interactive map controls and client-side navigation in geospatial contexts.
|
|
26
28
|
- **AntV Enhancements:** Incorporates `@antv/l7-maps` for additional map layering capabilities and visualization tools.
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- **Framework/Library:** React
|
|
31
|
-
- **UI Toolkit/Styling:** Tailwind CSS
|
|
32
|
-
- **3D Rendering:** Three.js (`@react-three/fiber`, `@react-three/drei`)
|
|
33
|
-
- **Geospatial Libraries:** MapLibre GL, AntV L7
|
|
34
|
-
- **Build Tool:** Rsbuild
|
|
35
|
-
- **Language:** TypeScript
|
|
30
|
+

|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
- **Framework/Library:** `React`
|
|
33
|
+
- **UI Toolkit/Styling:** `Tailwind CSS`
|
|
34
|
+
- **3D Rendering:** `Three.js` (`@react-three/fiber`, `@react-three/drei`)
|
|
35
|
+
- **Geospatial Libraries:** `MapLibre GL`, `AntV L7`
|
|
36
|
+
- **Build Tool:** `Rsbuild`
|
|
37
|
+
- **Language:** `TypeScript`
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
See the [package.json](./package.json) for a full list of dependencies.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+

|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Ensure you have the following installed:
|
|
43
|
+
## Prerequisites
|
|
46
44
|
|
|
47
45
|
- Node.js (>= 18.x recommended)
|
|
48
46
|
- Package manager (npm, yarn, or pnpm)
|
|
49
47
|
|
|
50
|
-
```bash
|
|
51
|
-
node -v
|
|
52
|
-
npm -v
|
|
53
|
-
```
|
|
54
|
-
|
|
55
48
|
### Installation
|
|
56
49
|
|
|
57
50
|
1. Create a new project using the template:
|
|
58
51
|
|
|
59
|
-
```bash
|
|
60
|
-
pnpm create trapar-waves
|
|
61
|
-
```
|
|
52
|
+
```bash
|
|
53
|
+
pnpm create trapar-waves
|
|
54
|
+
```
|
|
62
55
|
|
|
63
56
|
2. Navigate to your project directory and install dependencies:
|
|
64
57
|
|
|
65
|
-
```bash
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# or
|
|
69
|
-
npm install
|
|
70
|
-
# or
|
|
71
|
-
yarn install
|
|
72
|
-
```
|
|
58
|
+
```bash
|
|
59
|
+
pnpm install
|
|
60
|
+
```
|
|
73
61
|
|
|
74
|
-
|
|
62
|
+
3. Start the development server:
|
|
75
63
|
|
|
76
|
-
|
|
64
|
+
```bash
|
|
65
|
+
pnpm dev
|
|
66
|
+
```
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
pnpm dev
|
|
80
|
-
# or
|
|
81
|
-
npm run dev
|
|
82
|
-
# or
|
|
83
|
-
yarn dev
|
|
84
|
-
```
|
|
68
|
+

|
|
85
69
|
|
|
86
|
-
The application will be available at `http://localhost:3000` by default.
|
|
87
|
-
|
|
88
|
-
### Building for Production
|
|
89
|
-
|
|
90
|
-
To create a production build:
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
pnpm build
|
|
94
|
-
# or
|
|
95
|
-
npm run build
|
|
96
|
-
# or
|
|
97
|
-
yarn build
|
|
98
70
|
```
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
#
|
|
105
|
-
|
|
106
|
-
#
|
|
107
|
-
yarn preview
|
|
71
|
+
├── public/ # Static assets
|
|
72
|
+
├── src/ # Source code
|
|
73
|
+
│ ├── App.tsx # Main application component
|
|
74
|
+
│ └── index.tsx # Entry point
|
|
75
|
+
├── rsbuild.config.ts # Rsbuild configuration
|
|
76
|
+
├── tsconfig.json # TypeScript configuration
|
|
77
|
+
├── eslint.config.js # ESLint configuration
|
|
78
|
+
└── package.json # Project dependencies and scripts
|
|
108
79
|
```
|
|
109
80
|
|
|
110
|
-
|
|
81
|
+

|
|
111
82
|
|
|
112
83
|
This library is designed to be used as a template for creating geospatial 3D visualization applications. It provides a foundational setup with React, Three.js, MapLibre GL, and AntV L7.
|
|
113
84
|
|
|
@@ -211,6 +182,7 @@ export default App;
|
|
|
211
182
|
```
|
|
212
183
|
|
|
213
184
|
This example demonstrates:
|
|
185
|
+
|
|
214
186
|
- Creating a MapLibre GL map with `react-map-gl`
|
|
215
187
|
- Integrating AntV L7 for geospatial data visualization
|
|
216
188
|
- Using React Three Fiber and Drei for 3D rendering
|
|
@@ -226,7 +198,7 @@ PUBLIC_MAPTILER_KEY=your_maptiler_api_key_here
|
|
|
226
198
|
|
|
227
199
|
Make sure to add `.env` to your `.gitignore` to keep your keys secure.
|
|
228
200
|
|
|
229
|
-
|
|
201
|
+

|
|
230
202
|
|
|
231
203
|
Contributions are welcome and greatly appreciated! Please follow these steps to contribute:
|
|
232
204
|
|
|
@@ -236,15 +208,16 @@ Contributions are welcome and greatly appreciated! Please follow these steps to
|
|
|
236
208
|
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
237
209
|
5. Open a Pull Request
|
|
238
210
|
|
|
239
|
-
|
|
211
|
+

|
|
212
|
+
|
|
213
|
+
MIT License © 2025 Trapar Waves
|
|
240
214
|
|
|
241
215
|
## 👤 Author
|
|
242
216
|
|
|
243
|
-
- **Rikka:** (admin@rikka.cc)
|
|
217
|
+
- **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
|
|
244
218
|
- **GitHub Profile:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
|
|
245
219
|
|
|
246
220
|
## 🔗 Links
|
|
247
221
|
|
|
248
222
|
- **Repository:** [https://github.com/Trapar-waves/react-three-maplibre](https://github.com/Trapar-waves/react-three-maplibre)
|
|
249
|
-
- **Homepage:** [https://github.com/Trapar-waves/react-three-maplibre](https://github.com/Trapar-waves/react-three-maplibre)
|
|
250
223
|
- **Issues:** [https://github.com/Trapar-waves/react-three-maplibre/issues](https://github.com/Trapar-waves/react-three-maplibre/issues)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>Contributing section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-contrib-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-contrib-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">🤝</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">Contributing</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>Features section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-features-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-features-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">✨</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">Features</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>Getting Started section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-start-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-start-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">🚀</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">Getting Started</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>License section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-license-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-license-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">📄</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">License</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>Project Structure section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-struct-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-struct-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">📁</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">Project Structure</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>Tech Stack section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-tech-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-tech-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">💻</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">Tech Stack</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
|
|
2
|
+
<title>Usage section header</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg-usage-r3m" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.15"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
</defs>
|
|
9
|
+
<rect width="1200" height="80" fill="#FFFFFF"/>
|
|
10
|
+
<rect width="1200" height="80" fill="url(#bg-usage-r3m)"/>
|
|
11
|
+
<rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
12
|
+
<rect x="0" y="76" width="1200" height="4" rx="2" fill="#10B981"/>
|
|
13
|
+
<text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">📦</text>
|
|
14
|
+
<text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">Usage</text>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 450" width="100%">
|
|
2
|
+
<title>react-three-maplibre — 3D map visualization library</title>
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
5
|
+
<stop offset="0%" style="stop-color:#10B981;stop-opacity:0.08"/>
|
|
6
|
+
<stop offset="100%" style="stop-color:#10B981;stop-opacity:0.03"/>
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<pattern id="dots" x="0" y="0" width="24" height="24" patternUnits="userSpaceOnUse">
|
|
9
|
+
<circle cx="2" cy="2" r="1" fill="#10B981" opacity="0.12"/>
|
|
10
|
+
</pattern>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect width="1200" height="450" fill="#FFFFFF"/>
|
|
13
|
+
<rect width="1200" height="450" fill="url(#bg)"/>
|
|
14
|
+
<rect width="1200" height="450" fill="url(#dots)"/>
|
|
15
|
+
<rect x="0.5" y="0.5" width="1199" height="449" rx="12" ry="12" fill="none" stroke="#E2E8F0" stroke-width="1"/>
|
|
16
|
+
<g transform="translate(80, 80)">
|
|
17
|
+
<text x="0" y="0" font-family="ui-monospace, 'SF Mono', 'Cascadia Code', monospace" font-size="18" fill="#64748B" letter-spacing="1">trapar-waves</text>
|
|
18
|
+
<text x="0" y="55" font-family="system-ui, -apple-system, sans-serif" font-size="56" font-weight="bold" fill="#10B981">react-three-</text>
|
|
19
|
+
<text x="0" y="115" font-family="system-ui, -apple-system, sans-serif" font-size="56" font-weight="bold" fill="#10B981">maplibre</text>
|
|
20
|
+
<text x="0" y="155" font-family="system-ui, -apple-system, sans-serif" font-size="20" fill="#475569">3D map visualization library</text>
|
|
21
|
+
<text x="0" y="185" font-family="system-ui, -apple-system, sans-serif" font-size="20" fill="#475569">React + Three.js + MapLibre</text>
|
|
22
|
+
<g transform="translate(0, 210)">
|
|
23
|
+
<rect x="0" y="0" width="75" height="36" rx="18" fill="#10B981" opacity="0.12"/>
|
|
24
|
+
<text x="37" y="23" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" fill="#10B981">React</text>
|
|
25
|
+
<rect x="85" y="0" width="80" height="36" rx="18" fill="#10B981" opacity="0.12"/>
|
|
26
|
+
<text x="125" y="23" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" fill="#10B981">Three.js</text>
|
|
27
|
+
<rect x="175" y="0" width="90" height="36" rx="18" fill="#10B981" opacity="0.12"/>
|
|
28
|
+
<text x="220" y="23" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" fill="#10B981">MapLibre</text>
|
|
29
|
+
<rect x="275" y="0" width="65" height="36" rx="18" fill="#10B981" opacity="0.12"/>
|
|
30
|
+
<text x="307" y="23" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" fill="#10B981">AntV</text>
|
|
31
|
+
</g>
|
|
32
|
+
</g>
|
|
33
|
+
<g transform="translate(640, 60)">
|
|
34
|
+
<g transform="translate(0, 0)">
|
|
35
|
+
<rect width="240" height="150" rx="10" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
|
|
36
|
+
<rect x="1" y="1" width="238" height="4" rx="2" fill="#10B981"/>
|
|
37
|
+
<text x="24" y="52" font-family="system-ui, sans-serif" font-size="36">🗺️</text>
|
|
38
|
+
<text x="68" y="52" font-family="system-ui, sans-serif" font-size="20" font-weight="bold" fill="#0F172A">Geospatial</text>
|
|
39
|
+
<text x="24" y="88" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">AntV L7 + MapLibre</text>
|
|
40
|
+
<text x="24" y="112" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">Custom map layers</text>
|
|
41
|
+
</g>
|
|
42
|
+
<g transform="translate(260, 0)">
|
|
43
|
+
<rect width="240" height="150" rx="10" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
|
|
44
|
+
<rect x="1" y="1" width="238" height="4" rx="2" fill="#10B981"/>
|
|
45
|
+
<text x="24" y="52" font-family="system-ui, sans-serif" font-size="36">🎯</text>
|
|
46
|
+
<text x="68" y="52" font-family="system-ui, sans-serif" font-size="20" font-weight="bold" fill="#0F172A">3D Rendering</text>
|
|
47
|
+
<text x="24" y="88" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">React Three Fiber</text>
|
|
48
|
+
<text x="24" y="112" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">Declarative scenes</text>
|
|
49
|
+
</g>
|
|
50
|
+
<g transform="translate(0, 170)">
|
|
51
|
+
<rect width="240" height="150" rx="10" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
|
|
52
|
+
<rect x="1" y="1" width="238" height="4" rx="2" fill="#10B981"/>
|
|
53
|
+
<text x="24" y="52" font-family="system-ui, sans-serif" font-size="36">🖱️</text>
|
|
54
|
+
<text x="68" y="52" font-family="system-ui, sans-serif" font-size="20" font-weight="bold" fill="#0F172A">Interactive</text>
|
|
55
|
+
<text x="24" y="88" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">react-map-gl controls</text>
|
|
56
|
+
<text x="24" y="112" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">Client-side navigation</text>
|
|
57
|
+
</g>
|
|
58
|
+
<g transform="translate(260, 170)">
|
|
59
|
+
<rect width="240" height="150" rx="10" fill="#FFFFFF" stroke="#E2E8F0" stroke-width="1"/>
|
|
60
|
+
<rect x="1" y="1" width="238" height="4" rx="2" fill="#10B981"/>
|
|
61
|
+
<text x="24" y="52" font-family="system-ui, sans-serif" font-size="36">⚡</text>
|
|
62
|
+
<text x="68" y="52" font-family="system-ui, sans-serif" font-size="20" font-weight="bold" fill="#0F172A">Fast Dev</text>
|
|
63
|
+
<text x="24" y="88" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">Rsbuild optimized</text>
|
|
64
|
+
<text x="24" y="112" font-family="system-ui, sans-serif" font-size="14" fill="#64748B">TypeScript support</text>
|
|
65
|
+
</g>
|
|
66
|
+
</g>
|
|
67
|
+
</svg>
|
package/environments/.env
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
# 默认底图为 Carto Basemaps(MapLibre GL),无需在此填写地图 API Key。
|
|
2
|
+
# 若接入 MapTiler 等需鉴权的服务,请自行在代码中配置 mapStyle 并在此添加对应变量。
|
package/eslint.config.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { rentonReact } from "@renton/eslint-config-react";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export default rentonReact({
|
|
4
4
|
stylistic: {
|
|
5
5
|
quotes: "double",
|
|
6
6
|
semi: true,
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
}, {
|
|
9
|
+
rules: {
|
|
10
|
+
"react/naming-convention-ref-name": "off",
|
|
11
|
+
},
|
|
12
|
+
}, {
|
|
13
|
+
files: ["pnpm-workspace.yaml"],
|
|
14
|
+
name: "trapar/pnpm-workspace-yaml-trust-policy",
|
|
15
|
+
rules: {
|
|
16
|
+
"pnpm/yaml-enforce-settings": "off",
|
|
15
17
|
},
|
|
16
18
|
});
|
package/lint-staged.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trapar-waves/react-three-maplibre",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"packageManager": "pnpm@11.24.0",
|
|
6
6
|
"description": "A React library integrating Three.js and MapLibre for 3D map visualization",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "admin@rikka.cc",
|
|
@@ -33,42 +33,47 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"dev": "rsbuild dev --open",
|
|
35
35
|
"build": "rsbuild build",
|
|
36
|
+
"build:rsdoctor": "cross-env RSDOCTOR=true rsbuild build",
|
|
36
37
|
"preview": "rsbuild preview",
|
|
37
38
|
"lint": "eslint . --cache --max-warnings=0 --no-warn-ignored",
|
|
38
39
|
"postinstall": "husky"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"@antv/l7": "^2.
|
|
42
|
-
"@antv/l7-maps": "^2.
|
|
43
|
-
"@react-three/drei": "^10.7.
|
|
44
|
-
"@react-three/fiber": "^9.
|
|
45
|
-
"maplibre-gl": "^
|
|
46
|
-
"react": "^19.2.
|
|
47
|
-
"react-dom": "^19.2.
|
|
48
|
-
"react-map-gl": "^8.1.
|
|
49
|
-
"react-three-map": "^1.0.
|
|
50
|
-
"three": "^0.
|
|
42
|
+
"@antv/l7": "^2.29.1",
|
|
43
|
+
"@antv/l7-maps": "^2.29.1",
|
|
44
|
+
"@react-three/drei": "^10.7.8",
|
|
45
|
+
"@react-three/fiber": "^9.7.0",
|
|
46
|
+
"maplibre-gl": "^6.6.0",
|
|
47
|
+
"react": "^19.2.8",
|
|
48
|
+
"react-dom": "^19.2.8",
|
|
49
|
+
"react-map-gl": "^8.1.2",
|
|
50
|
+
"react-three-map": "^1.0.1",
|
|
51
|
+
"three": "^0.185.1",
|
|
51
52
|
"three-stdlib": "^2.36.1"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@iconify/
|
|
57
|
-
"@
|
|
58
|
-
"@rsbuild/core": "^
|
|
59
|
-
"@rsbuild/plugin-
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@types/
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"eslint
|
|
55
|
+
"@eslint-react/eslint-plugin": "^5.18.6",
|
|
56
|
+
"@iconify/json": "^2.2.522",
|
|
57
|
+
"@iconify/tailwind4": "^1.2.3",
|
|
58
|
+
"@renton/eslint-config-react": "^1.0.0",
|
|
59
|
+
"@rsbuild/core": "^2.2.1",
|
|
60
|
+
"@rsbuild/plugin-less": "^2.0.1",
|
|
61
|
+
"@rsbuild/plugin-react": "^2.1.0",
|
|
62
|
+
"@rsdoctor/rspack-plugin": "^1.6.3",
|
|
63
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
64
|
+
"@types/react": "^19.2.18",
|
|
65
|
+
"@types/react-dom": "^19.2.5",
|
|
66
|
+
"@types/three": "^0.185.4",
|
|
67
|
+
"cross-env": "^10.1.0",
|
|
68
|
+
"eslint": "^10.9.1",
|
|
69
|
+
"eslint-plugin-format": "^2.0.1",
|
|
70
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
71
|
+
"eslint-plugin-react-refresh": "^0.5.5",
|
|
68
72
|
"husky": "^9.1.7",
|
|
69
|
-
"lint-staged": "^
|
|
70
|
-
"mapbox-gl": "^3.
|
|
71
|
-
"tailwindcss": "^4.
|
|
72
|
-
"typescript": "^
|
|
73
|
+
"lint-staged": "^17.4.1",
|
|
74
|
+
"mapbox-gl": "^3.29.0",
|
|
75
|
+
"tailwindcss": "^4.3.3",
|
|
76
|
+
"typescript": "^6.0.3",
|
|
77
|
+
"unplugin-turbo-console": "^2.3.3"
|
|
73
78
|
}
|
|
74
79
|
}
|