Catalog npm
Back to packageRELEASE DETAILS

0.0.3

npm

3dtiles-polygon-crop

Cesium 3D Tiles polygon cutting

Published24 Jan 2024
Direct dependencies1
Transitive dependenciesNot calculated

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.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
cesium
Environment
{
  "local_name": "cesium",
  "alias": false,
  "peer_metadata": null
}
^1.113.0runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-d7Z3e9HfsNE7xMzanCgtGpRvSO3mnntVaQlZoqlLaH773AruabouvUkoUT221jo/AyDSzUPtv0otYIVNiyvtxQ==",
  "shasum": "635d99cda3abd6b286982cabc333ce44a3de2f4a",
  "tarball": "https://registry.npmjs.org/3dtiles-polygon-crop/-/3dtiles-polygon-crop-0.0.3.tgz",
  "fileCount": 5,
  "unpackedSize": 4891680,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIGD9d6JbWAYB+PC+VSpahUiWKCCbP8z10wUV5DumpQhmAiEA9CROlPqqGk1NWu0g6e1v9vf0y4/XWKgg+ySSyxx+TKQ="
    }
  ]
}

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_version:0d5ccfcc13835479c6ab73a4c3fd8f7a0bf7be7550d4a0f4cf3da866c12cbd6d

Other collected versions

0.0.222 Jan0.0.119 JanView all collected versions →