three-stdlib 2.13.0 → 2.13.1
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.
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),t=require("../math/ConvexHull.cjs.js");class o extends e.BufferGeometry{constructor(o){super();const r=[],n=[];void 0===t.ConvexHull&&console.error("THREE.
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),t=require("../math/ConvexHull.cjs.js");class o extends e.BufferGeometry{constructor(o){super();const r=[],n=[];void 0===t.ConvexHull&&console.error("THREE.ConvexGeometry: ConvexGeometry relies on ConvexHull");const s=(new t.ConvexHull).setFromPoints(o).faces;for(let e=0;e<s.length;e++){const t=s[e];let o=t.edge;do{const e=o.head().point;r.push(e.x,e.y,e.z),n.push(t.normal.x,t.normal.y,t.normal.z),o=o.next}while(o!==t.edge)}this.setAttribute("position",new e.Float32BufferAttribute(r,3)),this.setAttribute("normal",new e.Float32BufferAttribute(n,3))}}exports.ConvexGeometry=o;
|
@@ -9,7 +9,7 @@ class ConvexGeometry extends BufferGeometry {
|
|
9
9
|
const normals = [];
|
10
10
|
|
11
11
|
if (ConvexHull === undefined) {
|
12
|
-
console.error('THREE.
|
12
|
+
console.error('THREE.ConvexGeometry: ConvexGeometry relies on ConvexHull');
|
13
13
|
}
|
14
14
|
|
15
15
|
const convexHull = new ConvexHull().setFromPoints(points); // generate vertices and normals
|