react-three-map 0.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/LICENSE +21 -0
- package/README.md +67 -0
- package/dist/my-lib.es.js +1538 -0
- package/dist/my-lib.umd.js +27 -0
- package/dist/vite.svg +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 react-three-map authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# React Three Map
|
|
2
|
+
|
|
3
|
+
⚠️ **Alpha Warning: This library is currently in its alpha phase. While functional, it's still under active development and may have bugs. Please use with caution in production and feel free to report any issues you encounter. Thank you for your understanding!**
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
React Three Map seamlessly integrates three.js with Mapbox, allowing you to bring the power of 3D rendering to your maps.
|
|
7
|
+
This package offers a Three layer that allows you to use `@react-three/fiber` within `react-map-gl` and is compatible with both Mapbox and Maplibre.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
You can install React Three Map via npm:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install react-three-map
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Getting Started
|
|
19
|
+
|
|
20
|
+
Just add `<Canvas>` inside the map and start using R3F as usual :)
|
|
21
|
+
|
|
22
|
+
```jsx
|
|
23
|
+
import { ReactMapGL, StaticMap } from 'react-map-gl';
|
|
24
|
+
import { Canvas } from 'react-three-map';
|
|
25
|
+
|
|
26
|
+
<ReactMapGL {...viewport} >
|
|
27
|
+
<Canvas>
|
|
28
|
+
{/* Use react-three-fiber as usual in here */}
|
|
29
|
+
<mesh>
|
|
30
|
+
<boxBufferGeometry attach="geometry" args={[1, 1, 1]} />
|
|
31
|
+
<meshStandardMaterial attach="material" color="orange" />
|
|
32
|
+
</mesh>
|
|
33
|
+
</Canvas>
|
|
34
|
+
</ReactMapGL>
|
|
35
|
+
...
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Documentation
|
|
39
|
+
|
|
40
|
+
For a full API reference, more usage examples, and other information, check out the full React [Three Map Documentation](#todo).
|
|
41
|
+
|
|
42
|
+
## Contributing
|
|
43
|
+
|
|
44
|
+
We encourage you to contribute to React Three Map! Please check out the [Contributing to React Three Map guide](#todo) for guidelines about how to proceed.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
React Three Map is [MIT licensed](#todo).
|
|
49
|
+
|
|
50
|
+
## Support
|
|
51
|
+
|
|
52
|
+
f you're having a problem with anything related to this library, we encourage you to reach out to us. We're always happy to help resolve issues and answer any questions you might have. Open an issue on our [Github repo](#todo).
|
|
53
|
+
|
|
54
|
+
Remember to always follow the Code of Conduct when interacting with the community.
|
|
55
|
+
|
|
56
|
+
## Enjoy Using React Three Map!
|
|
57
|
+
|
|
58
|
+
We hope that you enjoy using React Three Map as much as we enjoyed building it. Happy coding!
|
|
59
|
+
|
|
60
|
+
## Roadmap
|
|
61
|
+
|
|
62
|
+
- [ ] Use ThreeJS as a Map Layer.
|
|
63
|
+
- [ ] Use ThreeJS as a canvas overlay.
|
|
64
|
+
- [ ] Add stencil buffers to occlude from the map.
|
|
65
|
+
- [ ] Fully decompose the projection matrix into all the Camera properties required.
|
|
66
|
+
- [ ] Support post processing.
|
|
67
|
+
- [ ] Support multiple coordinate transformations using only one ThreeJS renderer.
|