1.0.63 • Published 2 years ago

cesium-plugins v1.0.63

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

English | 简体中文

Introduction

Plugins for improving the availability of Cesium.

Documents

cesium-plugins documents

Installation

Using npm:

npm i cesium-plugins
import { PositionPicker } from 'cesium-plugins'

For quick sketches, you can import cesium-plugins directly from jsDelivr CDN.

<script type="module">
  import { PositionPicker } from 'https://cdn.jsdelivr.net/npm/cesium-plugins@1.0.62/index.js'
</script>

The library is also available in UMD format under the namespace CP.

<script src="https://cdn.jsdelivr.net/npm/cesium-plugins@1.0.62/index.umd.js"></script>
<script>
  const picker = new CP.PositionPicker(Cesium, viewer)
</script>

Overview

  • PositionPicker:Plugin for left mouse click to pick up longitude, latitude, and height.

  • Cesium3DTilesLoader:Plugin for loading and configuring 3DTiles.

  • Tooltip:Plugin for creating tooltip that follow mouse movement.

  • exportSceneAsImage:Function used to export the scene as an image (.png).

  • FloodAnalysis:Plugin for simulating flood analysis.

  • RotateAroundPoint:Plugin for camera rotation around a point.

  • WaterMask:Plugin for generating dynamic water surface.

  • HTMLOverlay:Plugin for placing an HTML element on top of the Cesium canvas.

Usage

Make sure that Cesium has been set up and that the viewer has been initialized.

The following uses PositionPicker as an example to describe the basic usage of cesium-plugins.

import { PositionPicker } from 'cesium-plugins'
const picker = new PositionPicker(Cesium, viewer)

picker.pick(({ lon, lat, hgt }) => {
  console.log(lon, lat, hgt)
}, true)
1.0.62

2 years ago

1.0.63

2 years ago

1.0.49

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.61

2 years ago

1.0.44

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago