three-conic-polygon-geometry
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -25,2 +25,21 @@ 'use strict'; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
} | ||
function _inherits(subClass, superClass) { | ||
@@ -38,2 +57,5 @@ if (typeof superClass !== "function" && superClass !== null) { | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
@@ -251,3 +273,3 @@ } | ||
// earcut triangulation slightly more performing if it's only using the polygon perimeter | ||
var _earcut$flatten = earcut__default['default'].flatten(contour), | ||
var _earcut$flatten = earcut__default["default"].flatten(contour), | ||
vertices = _earcut$flatten.vertices, | ||
@@ -257,7 +279,7 @@ _earcut$flatten$holes = _earcut$flatten.holes, | ||
indices = earcut__default['default'](vertices, holes, 2); | ||
indices = earcut__default["default"](vertices, holes, 2); | ||
} else { | ||
(function () { | ||
// use delaunator | ||
var delaunay = Delaunator__default['default'].from(points); | ||
var delaunay = Delaunator__default["default"].from(points); | ||
@@ -411,3 +433,3 @@ var _loop = function _loop(i, len) { | ||
// turf method is more performing but malfunctions if polygon includes a pole (lat = 90 | -90) or crosses the antimeridian (lng = 180 | -180) | ||
return crossesPoleOrAntimeridian ? d3Geo.geoContains(polygon, pnt) : turfPointInPolygon__default['default'](pnt, polygon); | ||
return crossesPoleOrAntimeridian ? d3Geo.geoContains(polygon, pnt) : turfPointInPolygon__default["default"](pnt, polygon); | ||
} | ||
@@ -497,3 +519,3 @@ | ||
return earcut__default['default'].flatten(coords3d); | ||
return earcut__default["default"].flatten(coords3d); | ||
} | ||
@@ -550,3 +572,3 @@ | ||
return ConicPolygonBufferGeometry; | ||
return _createClass(ConicPolygonBufferGeometry); | ||
}(THREE.BufferGeometry); // | ||
@@ -553,0 +575,0 @@ |
import { BufferGeometry } from 'three'; | ||
type PolygonCoords = number[][]; | ||
type PolygonCoords = number[][][]; | ||
@@ -5,0 +5,0 @@ type Parameters = { |
@@ -15,2 +15,21 @@ import { BufferGeometry, Float32BufferAttribute } from 'three'; | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
Object.defineProperty(Constructor, "prototype", { | ||
writable: false | ||
}); | ||
return Constructor; | ||
} | ||
function _inherits(subClass, superClass) { | ||
@@ -28,2 +47,5 @@ if (typeof superClass !== "function" && superClass !== null) { | ||
}); | ||
Object.defineProperty(subClass, "prototype", { | ||
writable: false | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
@@ -536,3 +558,3 @@ } | ||
return ConicPolygonBufferGeometry; | ||
return _createClass(ConicPolygonBufferGeometry); | ||
}(THREE.BufferGeometry); // | ||
@@ -539,0 +561,0 @@ |
{ | ||
"name": "three-conic-polygon-geometry", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"description": "ThreeJS geometry for drawing polygons on a sphere", | ||
@@ -45,3 +45,3 @@ "unpkg": "dist/three-conic-polygon-geometry.min.js", | ||
"d3-geo": "1 - 3", | ||
"d3-geo-voronoi": "^1.6", | ||
"d3-geo-voronoi": "^2.0", | ||
"delaunator": "5", | ||
@@ -54,16 +54,16 @@ "earcut": "2" | ||
"devDependencies": { | ||
"@babel/core": "^7.15.0", | ||
"@babel/plugin-proposal-class-properties": "^7.14.5", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.14.7", | ||
"@babel/preset-env": "^7.15.0", | ||
"@babel/core": "^7.16.7", | ||
"@babel/plugin-proposal-class-properties": "^7.16.7", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.16.7", | ||
"@babel/preset-env": "^7.16.7", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@rollup/plugin-commonjs": "^21.0.1", | ||
"@rollup/plugin-node-resolve": "^13.1.2", | ||
"@types/three": ">=0.72.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.56.3", | ||
"rollup-plugin-dts": "^3.0.2", | ||
"rollup": "^2.62.0", | ||
"rollup-plugin-dts": "^4.1.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"typescript": "^4.3.5" | ||
"typescript": "^4.5.4" | ||
} | ||
} |
import { BufferGeometry } from 'three'; | ||
type PolygonCoords = number[][]; | ||
type PolygonCoords = number[][][]; | ||
@@ -5,0 +5,0 @@ type Parameters = { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
0
1293538
6305
+ Addedd3-color@3.1.0(transitive)
+ Addedd3-delaunay@6.0.4(transitive)
+ Addedd3-format@3.1.0(transitive)
+ Addedd3-geo-voronoi@2.1.0(transitive)
+ Addedd3-interpolate@3.0.1(transitive)
+ Addedd3-scale@4.0.2(transitive)
+ Addedd3-time@3.1.0(transitive)
+ Addedd3-time-format@4.1.0(transitive)
+ Addedd3-tricontour@1.0.2(transitive)
- Removedd3-array@1.2.42.12.1(transitive)
- Removedd3-collection@1.0.7(transitive)
- Removedd3-color@1.4.1(transitive)
- Removedd3-delaunay@5.3.0(transitive)
- Removedd3-format@1.4.5(transitive)
- Removedd3-geo@1.12.1(transitive)
- Removedd3-geo-voronoi@1.6.0(transitive)
- Removedd3-interpolate@1.4.0(transitive)
- Removedd3-scale@1.0.7(transitive)
- Removedd3-time@1.1.0(transitive)
- Removedd3-time-format@2.3.0(transitive)
- Removedd3-tricontour@0.1.0(transitive)
- Removeddelaunator@4.0.1(transitive)
- Removedinternmap@1.0.1(transitive)
Updatedd3-geo-voronoi@^2.0