poly-extrude 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/poly-extrude.js +5 -5
  2. package/dist/poly-extrude.js.map +1 -1
  3. package/dist/poly-extrude.min.js +2 -2
  4. package/dist/poly-extrude.mjs +5 -5
  5. package/package.json +7 -2
  6. package/src/util.js +3 -3
  7. package/.eslintignore +0 -12
  8. package/.eslintrc.js +0 -34
  9. package/.vscode/settings.json +0 -3
  10. package/babel.config.js +0 -12
  11. package/pnpm-lock.yaml +0 -3054
  12. package/rollup.config.js +0 -108
  13. package/test/buildings.html +0 -77
  14. package/test/data/a.png +0 -0
  15. package/test/data/building-texture-dark.jpg +0 -0
  16. package/test/data/building.geojson +0 -1118
  17. package/test/data/buildings-ny.geojson +0 -2845
  18. package/test/data/buildings.geojson +0 -1
  19. package/test/data/free-line.geojson +0 -1
  20. package/test/data/line.geojson +0 -1
  21. package/test/data/polygon.geojson +0 -1
  22. package/test/data/simple-hole.geojson +0 -1
  23. package/test/data/simple-line.geojson +0 -45
  24. package/test/data/simple.geojson +0 -1
  25. package/test/data/street.geojson +0 -1
  26. package/test/data//345/244/252/346/271/226.geojson +0 -8
  27. package/test/data//350/210/237/345/261/261/345/270/202.geojson +0 -1
  28. package/test/data//350/213/217/345/267/236.geojson +0 -1
  29. package/test/data//351/204/261/351/230/263/346/271/226.geojson +0 -1
  30. package/test/line-draw.html +0 -100
  31. package/test/line-uv.html +0 -69
  32. package/test/line.html +0 -56
  33. package/test/multi-polygon.html +0 -53
  34. package/test/ny-building.html +0 -67
  35. package/test/simple.html +0 -61
  36. package/test/street.html +0 -52
  37. package/test/util.js +0 -131
  38. package/test/uv.html +0 -77
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * poly-extrude v0.0.1
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] || 1;
766
- normals[_i + 1] = n[1] || 1;
767
- normals[_i + 2] = n[2] || 1;
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.1');
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.1",
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] || 1;
104
- normals[i + 1] = n[1] || 1;
105
- normals[i + 2] = n[2] || 1;
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
@@ -1,12 +0,0 @@
1
- src/vendor
2
- dist
3
- src/libs
4
- build.js
5
- ftp.js
6
- clean.js
7
- siteclean.js
8
- gulpfile.js
9
- src/lib
10
- src/data
11
- src/GLTFLoader.js
12
-
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
- };
@@ -1,3 +0,0 @@
1
- {
2
- "liveServer.settings.port": 5501
3
- }
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
- };