Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hongfaqiu/cesium-martini
Create cesium terrain from raster tile,从栅格瓦片创建cesium地形
https://github.com/hongfaqiu/cesium-martini
cesium raster-tiles terrain
Last synced: about 6 hours ago
JSON representation
Create cesium terrain from raster tile,从栅格瓦片创建cesium地形
- Host: GitHub
- URL: https://github.com/hongfaqiu/cesium-martini
- Owner: hongfaqiu
- License: mit
- Created: 2022-08-30T12:15:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T07:25:13.000Z (9 months ago)
- Last Synced: 2024-12-08T10:36:58.036Z (about 1 month ago)
- Topics: cesium, raster-tiles, terrain
- Language: TypeScript
- Homepage: https://cesium-martini.opendde.com/
- Size: 1.15 MB
- Stars: 11
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cesium-Martini
**This is a fork from [cesium-martini](https://github.com/davenquinn/cesium-martini)**, click to view details.
This module can create cesium terrain through raster tile service.
![Cesium-Martini](/img/cesium-martini.png)
## Usage
```ts
import { Viewer, Resource } from "cesium";
import { MartiniTerrainProvider } from "@zjugis/cesium-martini";const cesiumViewer = new Viewer("cesiumContainer");
const terrainLayer = new MartiniTerrainProvider({
url: new Resource({
url: 'https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}@2x.webp',
queryParameters: {
access_token: 'pk.eyJ1Ijoic3ZjLW9rdGEtbWFwYm94LXN0YWZmLWFjY2VzcyIsImEiOiJjbG5sMnFlZ28wb2d5MnFtb2xnMG90OW96In0.IE8Vqs0NTzCY0WqPzV9kcw'
},
}),
requestVertexNormals: true,
});cesiumViewer.scene.terrainProvider = terrainLayer;
```## Installation
This package is listed on NPM as `@zjugis/cesium-martini`. It can be installed
using the command```bash
npm install --save @zjugis/cesium-martini
```## Demo
[online Demo](https://cesium-martini.opendde.com/)
Launch the app in the demo folder, and then visit
![Cesium-Martini](https://s1.ax1x.com/2022/08/09/v1GhtO.png)
```node
pnpm install
pnpm dev
```## Credit