- console.error( 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.', this );
+ if ( isNaN( this.boundingSphere.radius ) ) {
- }
+ console.error( 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.', this );
}
}
- };
+ }
- }(),
+ }
- toJSON: function () {
+ toJSON() {
// todo
// todo
- },
+ }
- applyMatrix: function ( matrix ) {
+ applyMatrix( matrix ) {
console.warn( 'THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().' );
console.warn( 'THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().' );
+ let holesPoints = holes.filter(e=>e!=this && e.points.length>2).map(e=>e.points)
+ let inShape = math.isPointInArea(this.points, holesPoints, position)
+
+
+ return !!inShape
+ }
-}
+}
+
+
+
+
+
+class MetricUVGenerator{
+ constructor(){
+ this.a = new THREE.Vector3,
+ this.b = new THREE.Vector3,
+ this.c = new THREE.Vector3,
+ this.d = new THREE.Vector3
+ }
+ generateTopUV(t, e, n, r, o) {
+ return [new THREE.Vector2(e[3 * n],e[3 * n + 1]), new THREE.Vector2(e[3 * r],e[3 * r + 1]), new THREE.Vector2(e[3 * o],e[3 * o + 1])]
+ }
+
+ generateSideWallUV(t, e, n, r, o, a) {
+ var s = e;
+ this.a.set(s[3 * n], s[3 * n + 1], s[3 * n + 2]),
+ this.b.set(s[3 * r], s[3 * r + 1], s[3 * r + 2]),
+ this.c.set(s[3 * o], s[3 * o + 1], s[3 * o + 2]),
+ this.d.set(s[3 * a], s[3 * a + 1], s[3 * a + 2]);
+ var c = this.a.x !== this.b.x
+ , l = c ? this.b : this.d
+ , u = this.a.distanceTo(l)
+ , d = l.distanceTo(this.c);
+ return [new THREE.Vector2(this.a.x,0), c ? new THREE.Vector2(this.a.x + u,0) : new THREE.Vector2(this.a.x,d), new THREE.Vector2(this.a.x + u,d), c ? new THREE.Vector2(this.a.x,d) : new THREE.Vector2(this.a.x + u,0)]