Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvgis/maplibre-three-plugin
一个连接maplibre和threejs的插件
https://github.com/dvgis/maplibre-three-plugin
maplibre-gl-js threejs
Last synced: 22 days ago
JSON representation
一个连接maplibre和threejs的插件
- Host: GitHub
- URL: https://github.com/dvgis/maplibre-three-plugin
- Owner: dvgis
- Created: 2024-12-07T14:21:53.000Z (26 days ago)
- Default Branch: main
- Last Pushed: 2024-12-07T16:42:54.000Z (26 days ago)
- Last Synced: 2024-12-07T17:28:22.849Z (26 days ago)
- Topics: maplibre-gl-js, threejs
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# maplibre-three-plugin
`maplibre-three-plugin` is a bridge plugin that cleverly connects [MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/) with [Three.js](https://threejs.org/), enabling developers to implement 3D rendering and animation on maps.
## Install
```shell
npm install @dvgis/maplibre-three-plugin
----------------------------------------
yarn add @dvgis/maplibre-three-plugin
```## Quickly Start
`maplibre-three-plugin` depends on three, please make sure three is installed before using it.
```javascript
import maplibregl from 'maplibre-gl'
import 'maplibre-gl/dist/maplibre-gl.css'
import { MapScene } from '@dvgis/maplibre-three-plugin'const map = new maplibregl.Map({
container: 'map', // container id
style: 'https://demotiles.maplibre.org/style.json', // style URL
center: [0, 0], // starting position [lng, lat]
zoom: 1, // starting zoom
})
const mapScene = new MapScene(map)
```## Examples