poly-extrude 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/poly-extrude.js +5 -5
- package/dist/poly-extrude.js.map +1 -1
- package/dist/poly-extrude.min.js +2 -2
- package/dist/poly-extrude.mjs +5 -5
- package/package.json +7 -2
- package/src/util.js +3 -3
- package/.eslintignore +0 -12
- package/.eslintrc.js +0 -34
- package/.vscode/settings.json +0 -3
- package/babel.config.js +0 -12
- package/pnpm-lock.yaml +0 -3054
- package/rollup.config.js +0 -108
- package/test/buildings.html +0 -77
- package/test/data/a.png +0 -0
- package/test/data/building-texture-dark.jpg +0 -0
- package/test/data/building.geojson +0 -1118
- package/test/data/buildings-ny.geojson +0 -2845
- package/test/data/buildings.geojson +0 -1
- package/test/data/free-line.geojson +0 -1
- package/test/data/line.geojson +0 -1
- package/test/data/polygon.geojson +0 -1
- package/test/data/simple-hole.geojson +0 -1
- package/test/data/simple-line.geojson +0 -45
- package/test/data/simple.geojson +0 -1
- package/test/data/street.geojson +0 -1
- package/test/data//345/244/252/346/271/226.geojson +0 -8
- package/test/data//350/210/237/345/261/261/345/270/202.geojson +0 -1
- package/test/data//350/213/217/345/267/236.geojson +0 -1
- package/test/data//351/204/261/351/230/263/346/271/226.geojson +0 -1
- package/test/line-draw.html +0 -100
- package/test/line-uv.html +0 -69
- package/test/line.html +0 -56
- package/test/multi-polygon.html +0 -53
- package/test/ny-building.html +0 -67
- package/test/simple.html +0 -61
- package/test/street.html +0 -52
- package/test/util.js +0 -131
- package/test/uv.html +0 -77
package/dist/poly-extrude.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* poly-extrude v0.0.
|
2
|
+
* poly-extrude v0.0.2
|
3
3
|
*/
|
4
4
|
var earcut$2 = {exports: {}};
|
5
5
|
|
@@ -762,9 +762,9 @@ function generateNormal(indices, position) {
|
|
762
762
|
for (var _i = 0; _i < normals.length; _i += 3) {
|
763
763
|
v3Set(n, normals[_i], normals[_i + 1], normals[_i + 2]);
|
764
764
|
v3Normalize(n, n);
|
765
|
-
normals[_i] = n[0] ||
|
766
|
-
normals[_i + 1] = n[1] ||
|
767
|
-
normals[_i + 2] = n[2] ||
|
765
|
+
normals[_i] = n[0] || 0;
|
766
|
+
normals[_i + 1] = n[1] || 0;
|
767
|
+
normals[_i + 2] = n[2] || 0;
|
768
768
|
}
|
769
769
|
|
770
770
|
return normals;
|
@@ -1302,4 +1302,4 @@ function leftOnLine(p, p1, p2) {
|
|
1302
1302
|
|
1303
1303
|
export { extrudePolygons, extrudePolylines };
|
1304
1304
|
|
1305
|
-
typeof console !== 'undefined' && console.log('poly-extrude v0.0.
|
1305
|
+
typeof console !== 'undefined' && console.log('poly-extrude v0.0.2');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "poly-extrude",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.2",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/poly-extrude.js",
|
6
6
|
"module": "dist/poly-extrude.mjs",
|
@@ -38,5 +38,10 @@
|
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
40
|
"earcut": "^2.2.3"
|
41
|
-
}
|
41
|
+
},
|
42
|
+
"files": [
|
43
|
+
"dist/",
|
44
|
+
"src/",
|
45
|
+
"index.js"
|
46
|
+
]
|
42
47
|
}
|
package/src/util.js
CHANGED
@@ -100,9 +100,9 @@ export function generateNormal(indices, position) {
|
|
100
100
|
for (let i = 0; i < normals.length; i += 3) {
|
101
101
|
v3Set(n, normals[i], normals[i + 1], normals[i + 2]);
|
102
102
|
v3Normalize(n, n);
|
103
|
-
normals[i] = n[0] ||
|
104
|
-
normals[i + 1] = n[1] ||
|
105
|
-
normals[i + 2] = n[2] ||
|
103
|
+
normals[i] = n[0] || 0;
|
104
|
+
normals[i + 1] = n[1] || 0;
|
105
|
+
normals[i + 2] = n[2] || 0;
|
106
106
|
|
107
107
|
}
|
108
108
|
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
"env": {
|
3
|
-
"browser": true,
|
4
|
-
"es6": true,
|
5
|
-
"node": true
|
6
|
-
},
|
7
|
-
"extends": "standard",
|
8
|
-
"globals": {
|
9
|
-
"Atomics": "readonly",
|
10
|
-
"SharedArrayBuffer": "readonly",
|
11
|
-
"AMap": true,
|
12
|
-
"mapboxgl": true,
|
13
|
-
"TMap": true
|
14
|
-
},
|
15
|
-
"parserOptions": {
|
16
|
-
"ecmaVersion": 2018,
|
17
|
-
"sourceType": "module"
|
18
|
-
},
|
19
|
-
"rules": {
|
20
|
-
"no-console": "off",
|
21
|
-
"no-inner-declarations": "off",
|
22
|
-
"semi": ["error", "always"],
|
23
|
-
"indent": 0,
|
24
|
-
"padded-blocks": 0,
|
25
|
-
"space-before-function-paren": 0,
|
26
|
-
"no-var": 1,
|
27
|
-
"dot-notation": 0,
|
28
|
-
"one-var": 0,
|
29
|
-
"new-cap": 0,
|
30
|
-
"quote-props": 0,
|
31
|
-
"camelcase": 0,
|
32
|
-
"wrap-iife": 0
|
33
|
-
}
|
34
|
-
};
|
package/.vscode/settings.json
DELETED
package/babel.config.js
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
// const path = require('path');
|
2
|
-
module.exports = {
|
3
|
-
presets: [
|
4
|
-
['@babel/preset-env', {
|
5
|
-
'loose': true, 'modules': false
|
6
|
-
}]
|
7
|
-
]
|
8
|
-
// include: [
|
9
|
-
// path.resolve(__dirname, './node_modules/geometry-extrude'),
|
10
|
-
// path.resolve(__dirname, './node_modules/deyihu-geometry-extrude')
|
11
|
-
// ]
|
12
|
-
};
|