Catalog npm
PACKAGE EXPLORERView in registry

3dtiles-polygon-crop

npm

Cesium 3D Tiles polygon cutting

Versions collected3
Direct dependencies1From release 0.0.3
Last observed20 Oct, 19:41 UTC

README

Current package documentation

3dtiles-polygon-crop

Limited by Cesium API, currently only single area cropping can be provided. For details, see CesiumGS/cesium#8751

Install

npm install 3dtiles-polygon-crop

Usage

import { tileSetClipByPolygon } from "3dtiles-polygon-crop";

const points = [
  [106.443237643721, 29.46804376199225],
  [106.443237643721, 29.49579683916092],
  [106.500710551558, 29.49579683916092],
  [106.499071590308, 29.46301761415856],
  [106.490986048141, 29.443022286907117],
  [106.451323185888, 29.450780036824349],
];
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(40866);
const CeiumPolygonClip = new tileSetClipByPolygon({
  tileSet: tileset,
  originPositions: points,
  unionClippingRegions: false,
});

CeiumPolygonClip.clippingByPositions();

Options

NameTypeDefault
tileSetCesium3DTilesetNull
originPositionsArray[]
unionClippingRegionsBooleanTrue
edgeWidthNumber0.0
edgeColorCesium.ColorCesium.Color.WHITE
enabledBooleanTrue

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 3

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.3Registry latest24 Jan 20241
0.0.222 Jan 20241
0.0.119 Jan 20241

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:41 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:62bd183384ab74823d7c55da11c62895d30c3d88d4c0cca3f2fc79d241ddd478