gl-draw 0.17.0-beta.4 → 0.17.0-beta.41
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/cartographicToCartesian.js +1 -0
- package/dist/cartographicToCartesian.module.js +49 -0
- package/dist/constants.d.ts +0 -1
- package/dist/core/BaseObject/PointerEvent.d.ts +1 -0
- package/dist/core/BaseObject/index.d.ts +16 -4
- package/dist/core/CSSRenderer/CollisionManager.d.ts +98 -0
- package/dist/core/CSSRenderer/index.d.ts +18 -6
- package/dist/core/Composer.d.ts +5 -5
- package/dist/core/Helper.d.ts +4 -4
- package/dist/core/Lead/Pick.d.ts +35 -3
- package/dist/core/Lead/index.d.ts +5 -6
- package/dist/core/Pages/Pages.d.ts +1 -0
- package/dist/core/Pencil.d.ts +19 -5
- package/dist/core/pass/OutputPass.d.ts +1 -2
- package/dist/index.js +2 -2
- package/dist/index.module.js +708 -442
- package/dist/index.module2.js +1183 -0
- package/dist/index2.js +140 -0
- package/dist/objects/conicPolygon/geometry/index.d.ts +1 -2
- package/dist/objects/ellipsoid/createGeometry.d.ts +30 -0
- package/dist/objects/ellipsoid/index.d.ts +38 -0
- package/dist/objects/extrudePolygon/createGeometry.d.ts +2 -1
- package/dist/objects/group/index.d.ts +1 -0
- package/dist/objects/index.d.ts +1 -0
- package/dist/objects/index.js +1 -1
- package/dist/objects/index.module.js +691 -688
- package/dist/objects/node/index.d.ts +6 -2
- package/dist/objects/pie/index.d.ts +2 -1
- package/dist/plugins/Worker/getAttributes/conicLine.d.ts +1 -1
- package/dist/plugins/Worker/getAttributes/conicPolygon.d.ts +2 -3
- package/dist/plugins/Worker/getAttributes/extrudePolygon.d.ts +1 -1
- package/dist/plugins/Worker/getAttributes/getCoordinatesArr.d.ts +5 -1
- package/dist/plugins/Worker/getAttributes/line.d.ts +1 -1
- package/dist/plugins/Worker/getAttributes/line2.d.ts +1 -1
- package/dist/plugins/Worker/getAttributes/splitPolygonsByLongitudeDifference.d.ts +5 -2
- package/dist/plugins/Worker/index.d.ts +2 -3
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/index.module.js +77 -70
- package/dist/utils/Sprite2Points.d.ts +1 -1
- package/dist/utils/cartographicToCartesian.d.ts +30 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.module.js +15 -13
- package/dist/utils/proposedRaycast.d.ts +1 -0
- package/package.json +1 -1
- package/dist/WebGPULineSegments2.js +0 -140
- package/dist/WebGPULineSegments2.module.js +0 -1031
- package/dist/polar2Cartesian.js +0 -1
- package/dist/polar2Cartesian.module.js +0 -18
- package/dist/utils/polar2Cartesian.d.ts +0 -1
|
@@ -1,427 +1,469 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
for (var n in
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var n of
|
|
19
|
-
|
|
20
|
-
return
|
|
1
|
+
var te = Object.defineProperty, ee = Object.defineProperties;
|
|
2
|
+
var ne = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var pt = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ot = Object.prototype.hasOwnProperty, Ut = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Rt = (d, t, e) => t in d ? te(d, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[t] = e, X = (d, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
Ot.call(t, e) && Rt(d, e, t[e]);
|
|
8
|
+
if (pt)
|
|
9
|
+
for (var e of pt(t))
|
|
10
|
+
Ut.call(t, e) && Rt(d, e, t[e]);
|
|
11
|
+
return d;
|
|
12
|
+
}, gt = (d, t) => ee(d, ne(t));
|
|
13
|
+
var wt = (d, t) => {
|
|
14
|
+
var e = {};
|
|
15
|
+
for (var n in d)
|
|
16
|
+
Ot.call(d, n) && t.indexOf(n) < 0 && (e[n] = d[n]);
|
|
17
|
+
if (d != null && pt)
|
|
18
|
+
for (var n of pt(d))
|
|
19
|
+
t.indexOf(n) < 0 && Ut.call(d, n) && (e[n] = d[n]);
|
|
20
|
+
return e;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var ct = (d, t, e) => new Promise((n, s) => {
|
|
23
|
+
var r = (i) => {
|
|
24
24
|
try {
|
|
25
|
-
f(
|
|
25
|
+
f(e.next(i));
|
|
26
26
|
} catch (h) {
|
|
27
27
|
s(h);
|
|
28
28
|
}
|
|
29
|
-
}, a = (
|
|
29
|
+
}, a = (i) => {
|
|
30
30
|
try {
|
|
31
|
-
f(
|
|
31
|
+
f(e.throw(i));
|
|
32
32
|
} catch (h) {
|
|
33
33
|
s(h);
|
|
34
34
|
}
|
|
35
|
-
}, f = (
|
|
36
|
-
f((
|
|
35
|
+
}, f = (i) => i.done ? n(i.value) : Promise.resolve(i.value).then(r, a);
|
|
36
|
+
f((e = e.apply(d, t)).next());
|
|
37
37
|
});
|
|
38
|
-
import { LineMaterial as
|
|
39
|
-
import { LineMaterial as
|
|
40
|
-
import { LineSegmentsGeometry as
|
|
41
|
-
import { LineSegmentsGeometry as
|
|
42
|
-
import { P as
|
|
43
|
-
import { g as
|
|
44
|
-
import { BufferGeometry as
|
|
45
|
-
import { mergeAttributes as
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
import { LineMaterial as se } from "three/examples/jsm/lines/LineMaterial";
|
|
39
|
+
import { LineMaterial as pn } from "three/examples/jsm/lines/LineMaterial";
|
|
40
|
+
import { LineSegmentsGeometry as oe } from "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
41
|
+
import { LineSegmentsGeometry as yn } from "three/examples/jsm/lines/LineSegmentsGeometry";
|
|
42
|
+
import { P as ie, a as K, M as re, L as ae } from "../index.module2.js";
|
|
43
|
+
import { N as xn, g as wn } from "../index.module2.js";
|
|
44
|
+
import { BufferGeometry as lt, Float32BufferAttribute as rt, MeshStandardMaterial as ce, Mesh as kt, Vector3 as j, ShapeUtils as yt, Shape as Mt, Vector2 as z, ArcCurve as le, CatmullRomCurve3 as he, CubicBezierCurve as ue, CubicBezierCurve3 as fe, EllipseCurve as de, LineCurve as me, LineCurve3 as pe, QuadraticBezierCurve as ge, QuadraticBezierCurve3 as ye, SplineCurve as be, Box3 as xe, PlaneGeometry as we, CanvasTexture as ve, AmbientLight as Se, DirectionalLight as Me, PointLight as Ae, SpotLight as Le, HemisphereLight as Te, RectAreaLight as Ge, Matrix4 as qt, BufferAttribute as Q, Ray as Ee, Sphere as _e, LineSegments as Ft, Color as Yt, MeshBasicMaterial as Pe } from "three";
|
|
45
|
+
import { mergeAttributes as Dt, mergeGroups as ze } from "three/examples/jsm/utils/BufferGeometryUtils";
|
|
46
|
+
import { W as vt } from "../cartographicToCartesian.module.js";
|
|
47
|
+
import { g as je, c as Ce } from "../uvGenerator.module.js";
|
|
48
|
+
import { Brush as Ht, Evaluator as Ie, INTERSECTION as Be } from "three-bvh-csg";
|
|
49
|
+
import { RectAreaLightUniformsLib as Re } from "three/examples/jsm/lights/RectAreaLightUniformsLib";
|
|
50
|
+
import * as it from "@tweenjs/tween.js";
|
|
51
|
+
import { LineSegments2 as Oe } from "three/examples/jsm/lines/LineSegments2";
|
|
52
|
+
function q(d, t = 0) {
|
|
53
|
+
const e = d[0].index !== null, n = new Set(Object.keys(d[0].attributes)), s = new Set(
|
|
54
|
+
Object.keys(d[0].morphAttributes)
|
|
55
|
+
), r = {}, a = {}, f = d[0].morphTargetsRelative, i = new lt();
|
|
55
56
|
let h = 0;
|
|
56
|
-
for (let
|
|
57
|
-
const c =
|
|
57
|
+
for (let o = 0; o < d.length; ++o) {
|
|
58
|
+
const c = d[o];
|
|
58
59
|
let g = 0;
|
|
59
|
-
if (
|
|
60
|
+
if (e !== (c.index !== null))
|
|
60
61
|
return console.error(
|
|
61
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " +
|
|
62
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."
|
|
62
63
|
), null;
|
|
63
64
|
for (const u in c.attributes) {
|
|
64
65
|
if (!n.has(u))
|
|
65
66
|
return console.error(
|
|
66
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " +
|
|
67
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + '. All geometries must have compatible attributes; make sure "' + u + '" attribute exists among all geometries, or in none of them.'
|
|
67
68
|
), null;
|
|
68
|
-
|
|
69
|
+
r[u] === void 0 && (r[u] = []), r[u].push(c.attributes[u]), g++;
|
|
69
70
|
}
|
|
70
71
|
if (g !== n.size)
|
|
71
72
|
return console.error(
|
|
72
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " +
|
|
73
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". Make sure all geometries have the same number of attributes."
|
|
73
74
|
), null;
|
|
74
75
|
if (f !== c.morphTargetsRelative)
|
|
75
76
|
return console.error(
|
|
76
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " +
|
|
77
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". .morphTargetsRelative must be consistent throughout all geometries."
|
|
77
78
|
), null;
|
|
78
79
|
for (const u in c.morphAttributes) {
|
|
79
80
|
if (!s.has(u))
|
|
80
81
|
return console.error(
|
|
81
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " +
|
|
82
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". .morphAttributes must be consistent throughout all geometries."
|
|
82
83
|
), null;
|
|
83
84
|
a[u] === void 0 && (a[u] = []), a[u].push(c.morphAttributes[u]);
|
|
84
85
|
}
|
|
85
|
-
if (
|
|
86
|
+
if (t) {
|
|
86
87
|
let u;
|
|
87
|
-
if (
|
|
88
|
+
if (e)
|
|
88
89
|
u = c.index.count;
|
|
89
90
|
else if (c.attributes.position !== void 0)
|
|
90
91
|
u = c.attributes.position.count;
|
|
91
92
|
else
|
|
92
93
|
return console.error(
|
|
93
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " +
|
|
94
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + o + ". The geometry must have either an index or a position attribute"
|
|
94
95
|
), null;
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
else if (
|
|
96
|
+
if (t === 1)
|
|
97
|
+
i.addGroup(h, u, o);
|
|
98
|
+
else if (t === 2 && c.groups.length > 0)
|
|
98
99
|
for (let y of c.groups) {
|
|
99
|
-
let
|
|
100
|
-
|
|
100
|
+
let A = y.materialIndex;
|
|
101
|
+
i.addGroup(
|
|
101
102
|
h + y.start,
|
|
102
103
|
Math.min(y.count, u),
|
|
103
|
-
|
|
104
|
+
A
|
|
104
105
|
);
|
|
105
106
|
}
|
|
106
107
|
h += u;
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
|
-
if (
|
|
110
|
-
let
|
|
110
|
+
if (e) {
|
|
111
|
+
let o = 0;
|
|
111
112
|
const c = [];
|
|
112
|
-
for (let g = 0; g <
|
|
113
|
-
const u =
|
|
113
|
+
for (let g = 0; g < d.length; ++g) {
|
|
114
|
+
const u = d[g].index;
|
|
114
115
|
for (let y = 0; y < u.count; ++y)
|
|
115
|
-
c.push(u.getX(y) +
|
|
116
|
-
|
|
116
|
+
c.push(u.getX(y) + o);
|
|
117
|
+
o += d[g].attributes.position.count;
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
+
i.setIndex(c);
|
|
119
120
|
}
|
|
120
|
-
for (const
|
|
121
|
-
const c =
|
|
121
|
+
for (const o in r) {
|
|
122
|
+
const c = Dt(r[o]);
|
|
122
123
|
if (!c)
|
|
123
124
|
return console.error(
|
|
124
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " +
|
|
125
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " attribute."
|
|
125
126
|
), null;
|
|
126
|
-
|
|
127
|
+
i.setAttribute(o, c);
|
|
127
128
|
}
|
|
128
|
-
for (const
|
|
129
|
-
const c = a[
|
|
129
|
+
for (const o in a) {
|
|
130
|
+
const c = a[o][0].length;
|
|
130
131
|
if (c === 0) break;
|
|
131
|
-
|
|
132
|
+
i.morphAttributes = i.morphAttributes || {}, i.morphAttributes[o] = [];
|
|
132
133
|
for (let g = 0; g < c; ++g) {
|
|
133
134
|
const u = [];
|
|
134
|
-
for (let
|
|
135
|
-
u.push(a[
|
|
136
|
-
const y =
|
|
135
|
+
for (let A = 0; A < a[o].length; ++A)
|
|
136
|
+
u.push(a[o][A][g]);
|
|
137
|
+
const y = Dt(u);
|
|
137
138
|
if (!y)
|
|
138
139
|
return console.error(
|
|
139
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " +
|
|
140
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " morphAttribute."
|
|
140
141
|
), null;
|
|
141
|
-
|
|
142
|
+
i.morphAttributes[o].push(y);
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
|
-
return
|
|
145
|
+
return t === 2 ? ze(i) : i;
|
|
145
146
|
}
|
|
146
|
-
const
|
|
147
|
-
const f =
|
|
148
|
-
let
|
|
149
|
-
return typeof
|
|
150
|
-
startHeight:
|
|
151
|
-
endHeight:
|
|
147
|
+
const Wt = (d) => {
|
|
148
|
+
const f = d, { coordinate: t, startHeight: e, height: n } = f, s = wt(f, ["coordinate", "startHeight", "height"]);
|
|
149
|
+
let r = e || 0;
|
|
150
|
+
return typeof e != "undefined" && typeof n != "undefined" && (r = e + n), new ie([t], gt(X({}, s), {
|
|
151
|
+
startHeight: e,
|
|
152
|
+
endHeight: r
|
|
152
153
|
}));
|
|
153
154
|
};
|
|
154
|
-
class
|
|
155
|
-
constructor(
|
|
156
|
-
super(), this.options =
|
|
155
|
+
class en extends K {
|
|
156
|
+
constructor(t) {
|
|
157
|
+
super(), this.options = X({}, t);
|
|
157
158
|
}
|
|
158
159
|
create() {
|
|
159
|
-
const
|
|
160
|
-
geometry:
|
|
161
|
-
coordinateArr:
|
|
160
|
+
const i = this.options, {
|
|
161
|
+
geometry: t,
|
|
162
|
+
coordinateArr: e,
|
|
162
163
|
coordinate: n,
|
|
163
164
|
material: s,
|
|
164
|
-
useGroups:
|
|
165
|
-
} =
|
|
165
|
+
useGroups: r
|
|
166
|
+
} = i, a = wt(i, [
|
|
166
167
|
"geometry",
|
|
167
168
|
"coordinateArr",
|
|
168
169
|
"coordinate",
|
|
169
170
|
"material",
|
|
170
171
|
"useGroups"
|
|
171
172
|
]);
|
|
172
|
-
let f =
|
|
173
|
+
let f = t;
|
|
173
174
|
if (!f && n)
|
|
174
|
-
f =
|
|
175
|
+
f = Wt(X({
|
|
175
176
|
coordinate: n
|
|
176
177
|
}, a));
|
|
177
|
-
else if (!f &&
|
|
178
|
-
const h =
|
|
179
|
-
(
|
|
180
|
-
coordinate:
|
|
178
|
+
else if (!f && e) {
|
|
179
|
+
const h = e.map(
|
|
180
|
+
(o) => Wt(X({
|
|
181
|
+
coordinate: o
|
|
181
182
|
}, a))
|
|
182
183
|
);
|
|
183
|
-
f =
|
|
184
|
+
f = q(h, r != null ? r : 0);
|
|
184
185
|
}
|
|
185
186
|
this.createMesh(f, s);
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
189
|
+
function Ue(d = {}) {
|
|
190
|
+
const {
|
|
191
|
+
a: t = vt.a,
|
|
192
|
+
b: e = vt.b,
|
|
193
|
+
scaleFactor: n = 1 / vt.a,
|
|
194
|
+
widthSegments: s = 64,
|
|
195
|
+
heightSegments: r = 32
|
|
196
|
+
} = d, a = new lt(), f = [], i = [], h = [], o = [], c = t * t, g = e * e, u = (c - g) / c;
|
|
197
|
+
let y = 0;
|
|
198
|
+
const A = [];
|
|
199
|
+
for (let w = 0; w <= r; w++) {
|
|
200
|
+
const v = [], E = w / r, P = (0.5 - E) * 180 * Math.PI / 180, O = Math.sin(P), U = Math.cos(P), N = t / Math.sqrt(1 - u * O * O);
|
|
201
|
+
for (let C = 0; C <= s; C++) {
|
|
202
|
+
const $ = C / s, V = ($ - 0.5) * 360 * Math.PI / 180, at = Math.sin(V), I = Math.cos(V), B = N * U * at * n, At = N * (1 - u) * O * n, ht = N * U * I * n;
|
|
203
|
+
i.push(B, At, ht);
|
|
204
|
+
const tt = U * at / t, R = O * (1 - u) / e, k = U * I / t, D = Math.sqrt(tt * tt + R * R + k * k);
|
|
205
|
+
h.push(tt / D, R / D, k / D), o.push($, 1 - E), v.push(y++);
|
|
206
|
+
}
|
|
207
|
+
A.push(v);
|
|
208
|
+
}
|
|
209
|
+
for (let w = 0; w < r; w++)
|
|
210
|
+
for (let v = 0; v < s; v++) {
|
|
211
|
+
const E = A[w][v + 1], S = A[w][v], P = A[w + 1][v], O = A[w + 1][v + 1];
|
|
212
|
+
f.push(E, S, O), f.push(S, P, O);
|
|
213
|
+
}
|
|
214
|
+
return a.setIndex(f), a.setAttribute("position", new rt(i, 3)), a.setAttribute("normal", new rt(h, 3)), a.setAttribute("uv", new rt(o, 2)), a;
|
|
215
|
+
}
|
|
216
|
+
class nn extends K {
|
|
217
|
+
constructor(t = {}) {
|
|
218
|
+
super(), this.options = t;
|
|
219
|
+
}
|
|
220
|
+
create() {
|
|
221
|
+
const t = Ue(this.options), e = this.options.material || new ce({
|
|
222
|
+
color: 2200782,
|
|
223
|
+
metalness: 0.1,
|
|
224
|
+
roughness: 0.7,
|
|
225
|
+
wireframe: !1
|
|
226
|
+
}), n = new kt(t, e);
|
|
227
|
+
return n.name = "Ellipsoid", this.object3d = n, n;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const De = {
|
|
231
|
+
ArcCurve: le,
|
|
232
|
+
CatmullRomCurve3: he,
|
|
233
|
+
CubicBezierCurve: ue,
|
|
234
|
+
CubicBezierCurve3: fe,
|
|
235
|
+
EllipseCurve: de,
|
|
236
|
+
LineCurve: me,
|
|
237
|
+
LineCurve3: pe,
|
|
238
|
+
QuadraticBezierCurve: ge,
|
|
239
|
+
QuadraticBezierCurve3: ye,
|
|
240
|
+
SplineCurve: be
|
|
199
241
|
};
|
|
200
|
-
class
|
|
242
|
+
class st extends lt {
|
|
201
243
|
/**
|
|
202
244
|
* Constructs a new extrude geometry.
|
|
203
245
|
*
|
|
204
246
|
* @param {Shape|Array<Shape>} [shapes] - A shape or an array of shapes.
|
|
205
247
|
* @param {ExtrudeGeometry~Options} [options] - The extrude settings.
|
|
206
248
|
*/
|
|
207
|
-
constructor(
|
|
208
|
-
new
|
|
209
|
-
new
|
|
210
|
-
new
|
|
211
|
-
new
|
|
212
|
-
]),
|
|
249
|
+
constructor(t = new Mt([
|
|
250
|
+
new z(0.5, 0.5),
|
|
251
|
+
new z(-0.5, 0.5),
|
|
252
|
+
new z(-0.5, -0.5),
|
|
253
|
+
new z(0.5, -0.5)
|
|
254
|
+
]), e = {}) {
|
|
213
255
|
super(), this.type = "ExtrudeGeometry", this.parameters = {
|
|
214
|
-
shapes:
|
|
215
|
-
options:
|
|
216
|
-
},
|
|
217
|
-
const n = this, s = [],
|
|
218
|
-
for (let f = 0,
|
|
219
|
-
const h =
|
|
256
|
+
shapes: t,
|
|
257
|
+
options: e
|
|
258
|
+
}, t = Array.isArray(t) ? t : [t];
|
|
259
|
+
const n = this, s = [], r = [];
|
|
260
|
+
for (let f = 0, i = t.length; f < i; f++) {
|
|
261
|
+
const h = t[f];
|
|
220
262
|
a(h);
|
|
221
263
|
}
|
|
222
|
-
this.setAttribute("position", new
|
|
264
|
+
this.setAttribute("position", new rt(s, 3)), this.setAttribute("uv", new rt(r, 2)), this.computeVertexNormals();
|
|
223
265
|
function a(f) {
|
|
224
|
-
var
|
|
225
|
-
const
|
|
226
|
-
let g =
|
|
227
|
-
const
|
|
228
|
-
let
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
234
|
-
|
|
235
|
-
for (let l = 0,
|
|
236
|
-
const
|
|
237
|
-
|
|
266
|
+
var Et, _t, Pt;
|
|
267
|
+
const i = [], h = e.curveSegments !== void 0 ? e.curveSegments : 12, o = e.steps !== void 0 ? e.steps : 1, c = e.depth !== void 0 ? e.depth : 1;
|
|
268
|
+
let g = e.bevelEnabled !== void 0 ? e.bevelEnabled : !0, u = e.bevelThickness !== void 0 ? e.bevelThickness : 0.2, y = e.bevelSize !== void 0 ? e.bevelSize : u - 0.1, A = e.bevelOffset !== void 0 ? e.bevelOffset : 0, w = e.bevelSegments !== void 0 ? e.bevelSegments : 3;
|
|
269
|
+
const v = e.extrudePath, E = e.UVGenerator !== void 0 ? e.UVGenerator : He, S = (Et = e.hasTop) != null ? Et : !0, P = (_t = e.hasBottom) != null ? _t : !0, O = (Pt = e.hasSide) != null ? Pt : !0;
|
|
270
|
+
let U, N = !1, C, $, ot, V;
|
|
271
|
+
v && (U = v.getSpacedPoints(o), N = !0, g = !1, C = v.computeFrenetFrames(o, !1), $ = new j(), ot = new j(), V = new j()), g || (w = 0, u = 0, y = 0, A = 0);
|
|
272
|
+
const at = f.extractPoints(h);
|
|
273
|
+
let I = at.shape;
|
|
274
|
+
const B = at.holes;
|
|
275
|
+
if (!yt.isClockWise(I)) {
|
|
276
|
+
I = I.reverse();
|
|
277
|
+
for (let l = 0, m = B.length; l < m; l++) {
|
|
278
|
+
const p = B[l];
|
|
279
|
+
yt.isClockWise(p) && (B[l] = p.reverse());
|
|
238
280
|
}
|
|
239
281
|
}
|
|
240
|
-
function
|
|
241
|
-
const
|
|
282
|
+
function ht(l) {
|
|
283
|
+
const p = 10000000000000001e-36;
|
|
242
284
|
let x = l[0];
|
|
243
285
|
for (let b = 1; b <= l.length; b++) {
|
|
244
|
-
const
|
|
245
|
-
Math.abs(
|
|
246
|
-
Math.abs(
|
|
286
|
+
const L = b % l.length, M = l[L], T = M.x - x.x, G = M.y - x.y, _ = T * T + G * G, H = Math.max(
|
|
287
|
+
Math.abs(M.x),
|
|
288
|
+
Math.abs(M.y),
|
|
247
289
|
Math.abs(x.x),
|
|
248
290
|
Math.abs(x.y)
|
|
249
|
-
),
|
|
250
|
-
if (
|
|
251
|
-
l.splice(
|
|
291
|
+
), nt = p * H * H;
|
|
292
|
+
if (_ <= nt) {
|
|
293
|
+
l.splice(L, 1), b--;
|
|
252
294
|
continue;
|
|
253
295
|
}
|
|
254
|
-
x =
|
|
296
|
+
x = M;
|
|
255
297
|
}
|
|
256
298
|
}
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
for (let l = 0; l <
|
|
260
|
-
const
|
|
261
|
-
|
|
299
|
+
ht(I), B.forEach(ht);
|
|
300
|
+
const tt = B.length, R = I;
|
|
301
|
+
for (let l = 0; l < tt; l++) {
|
|
302
|
+
const m = B[l];
|
|
303
|
+
I = I.concat(m);
|
|
262
304
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
305
|
+
function k(l, m, p) {
|
|
306
|
+
return m || error("ExtrudeGeometry: vec does not exist"), l.clone().addScaledVector(m, p);
|
|
265
307
|
}
|
|
266
|
-
const
|
|
267
|
-
function
|
|
268
|
-
let x, b,
|
|
269
|
-
const
|
|
270
|
-
if (Math.abs(
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
),
|
|
274
|
-
x =
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
277
|
-
return new
|
|
278
|
-
|
|
308
|
+
const D = I.length;
|
|
309
|
+
function Lt(l, m, p) {
|
|
310
|
+
let x, b, L;
|
|
311
|
+
const M = l.x - m.x, T = l.y - m.y, G = p.x - l.x, _ = p.y - l.y, H = M * M + T * T, nt = M * _ - T * G;
|
|
312
|
+
if (Math.abs(nt) > Number.EPSILON) {
|
|
313
|
+
const W = Math.sqrt(H), zt = Math.sqrt(
|
|
314
|
+
G * G + _ * _
|
|
315
|
+
), jt = m.x - T / W, Ct = m.y + M / W, Qt = p.x - _ / zt, Kt = p.y + G / zt, It = ((Qt - jt) * _ - (Kt - Ct) * G) / (M * _ - T * G);
|
|
316
|
+
x = jt + M * It - l.x, b = Ct + T * It - l.y;
|
|
317
|
+
const Bt = x * x + b * b;
|
|
318
|
+
if (Bt <= 2)
|
|
319
|
+
return new z(x, b);
|
|
320
|
+
L = Math.sqrt(Bt / 2);
|
|
279
321
|
} else {
|
|
280
|
-
let
|
|
281
|
-
|
|
322
|
+
let W = !1;
|
|
323
|
+
M > Number.EPSILON ? G > Number.EPSILON && (W = !0) : M < -Number.EPSILON ? G < -Number.EPSILON && (W = !0) : Math.sign(T) === Math.sign(_) && (W = !0), W ? (x = -T, b = M, L = Math.sqrt(H)) : (x = M, b = T, L = Math.sqrt(H / 2));
|
|
282
324
|
}
|
|
283
|
-
return new
|
|
325
|
+
return new z(x / L, b / L);
|
|
284
326
|
}
|
|
285
|
-
const
|
|
286
|
-
for (let l = 0,
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
let
|
|
290
|
-
for (let l = 0,
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
for (let x = 0, b =
|
|
294
|
-
|
|
295
|
-
|
|
327
|
+
const ut = [];
|
|
328
|
+
for (let l = 0, m = R.length, p = m - 1, x = l + 1; l < m; l++, p++, x++)
|
|
329
|
+
p === m && (p = 0), x === m && (x = 0), ut[l] = Lt(R[l], R[p], R[x]);
|
|
330
|
+
const xt = [];
|
|
331
|
+
let J, ft = ut.concat();
|
|
332
|
+
for (let l = 0, m = tt; l < m; l++) {
|
|
333
|
+
const p = B[l];
|
|
334
|
+
J = [];
|
|
335
|
+
for (let x = 0, b = p.length, L = b - 1, M = x + 1; x < b; x++, L++, M++)
|
|
336
|
+
L === b && (L = 0), M === b && (M = 0), J[x] = Lt(p[x], p[L], p[M]);
|
|
337
|
+
xt.push(J), ft = ft.concat(J);
|
|
296
338
|
}
|
|
297
|
-
let
|
|
298
|
-
if (
|
|
299
|
-
|
|
339
|
+
let et;
|
|
340
|
+
if (w === 0)
|
|
341
|
+
et = yt.triangulateShape(R, B);
|
|
300
342
|
else {
|
|
301
|
-
const l = [],
|
|
302
|
-
for (let
|
|
303
|
-
const x =
|
|
304
|
-
for (let
|
|
305
|
-
const
|
|
306
|
-
|
|
343
|
+
const l = [], m = [];
|
|
344
|
+
for (let p = 0; p < w; p++) {
|
|
345
|
+
const x = p / w, b = u * Math.cos(x * Math.PI / 2), L = y * Math.sin(x * Math.PI / 2) + A;
|
|
346
|
+
for (let M = 0, T = R.length; M < T; M++) {
|
|
347
|
+
const G = k(R[M], ut[M], L);
|
|
348
|
+
F(G.x, G.y, -b), x === 0 && l.push(G);
|
|
307
349
|
}
|
|
308
|
-
for (let
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
for (let
|
|
313
|
-
const
|
|
314
|
-
W
|
|
350
|
+
for (let M = 0, T = tt; M < T; M++) {
|
|
351
|
+
const G = B[M];
|
|
352
|
+
J = xt[M];
|
|
353
|
+
const _ = [];
|
|
354
|
+
for (let H = 0, nt = G.length; H < nt; H++) {
|
|
355
|
+
const W = k(G[H], J[H], L);
|
|
356
|
+
F(W.x, W.y, -b), x === 0 && _.push(W);
|
|
315
357
|
}
|
|
316
|
-
x === 0 &&
|
|
358
|
+
x === 0 && m.push(_);
|
|
317
359
|
}
|
|
318
360
|
}
|
|
319
|
-
|
|
361
|
+
et = yt.triangulateShape(
|
|
320
362
|
l,
|
|
321
|
-
|
|
363
|
+
m
|
|
322
364
|
);
|
|
323
365
|
}
|
|
324
|
-
const
|
|
325
|
-
for (let l = 0; l <
|
|
326
|
-
const
|
|
327
|
-
|
|
366
|
+
const dt = et.length, Tt = y + A;
|
|
367
|
+
for (let l = 0; l < D; l++) {
|
|
368
|
+
const m = g ? k(I[l], ft[l], Tt) : I[l];
|
|
369
|
+
N ? (ot.copy(C.normals[0]).multiplyScalar(m.x), $.copy(C.binormals[0]).multiplyScalar(m.y), V.copy(U[0]).add(ot).add($), F(V.x, V.y, V.z)) : F(m.x, m.y, 0);
|
|
328
370
|
}
|
|
329
|
-
for (let l = 1; l <=
|
|
330
|
-
for (let
|
|
331
|
-
const
|
|
332
|
-
|
|
371
|
+
for (let l = 1; l <= o; l++)
|
|
372
|
+
for (let m = 0; m < D; m++) {
|
|
373
|
+
const p = g ? k(I[m], ft[m], Tt) : I[m];
|
|
374
|
+
N ? (ot.copy(C.normals[l]).multiplyScalar(p.x), $.copy(C.binormals[l]).multiplyScalar(p.y), V.copy(U[l]).add(ot).add($), F(V.x, V.y, V.z)) : F(p.x, p.y, c / o * l);
|
|
333
375
|
}
|
|
334
|
-
for (let l =
|
|
335
|
-
const
|
|
336
|
-
for (let b = 0,
|
|
337
|
-
const
|
|
338
|
-
|
|
376
|
+
for (let l = w - 1; l >= 0; l--) {
|
|
377
|
+
const m = l / w, p = u * Math.cos(m * Math.PI / 2), x = y * Math.sin(m * Math.PI / 2) + A;
|
|
378
|
+
for (let b = 0, L = R.length; b < L; b++) {
|
|
379
|
+
const M = k(R[b], ut[b], x);
|
|
380
|
+
F(M.x, M.y, c + p);
|
|
339
381
|
}
|
|
340
|
-
for (let b = 0,
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
for (let T = 0,
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
) :
|
|
382
|
+
for (let b = 0, L = B.length; b < L; b++) {
|
|
383
|
+
const M = B[b];
|
|
384
|
+
J = xt[b];
|
|
385
|
+
for (let T = 0, G = M.length; T < G; T++) {
|
|
386
|
+
const _ = k(M[T], J[T], x);
|
|
387
|
+
N ? F(
|
|
388
|
+
_.x,
|
|
389
|
+
_.y + U[o - 1].y,
|
|
390
|
+
U[o - 1].x + p
|
|
391
|
+
) : F(_.x, _.y, c + p);
|
|
350
392
|
}
|
|
351
393
|
}
|
|
352
394
|
}
|
|
353
|
-
|
|
354
|
-
function
|
|
395
|
+
Zt(), O && $t();
|
|
396
|
+
function Zt() {
|
|
355
397
|
const l = s.length / 3;
|
|
356
398
|
if (g) {
|
|
357
|
-
let
|
|
358
|
-
if (
|
|
359
|
-
for (let x = 0; x <
|
|
360
|
-
const b =
|
|
361
|
-
|
|
399
|
+
let m = 0, p = D * m;
|
|
400
|
+
if (P)
|
|
401
|
+
for (let x = 0; x < dt; x++) {
|
|
402
|
+
const b = et[x];
|
|
403
|
+
mt(b[2] + p, b[1] + p, b[0] + p);
|
|
362
404
|
}
|
|
363
|
-
if (
|
|
364
|
-
for (let x = 0; x <
|
|
365
|
-
const b =
|
|
366
|
-
|
|
405
|
+
if (m = o + w * 2, p = D * m, S)
|
|
406
|
+
for (let x = 0; x < dt; x++) {
|
|
407
|
+
const b = et[x];
|
|
408
|
+
mt(b[0] + p, b[1] + p, b[2] + p);
|
|
367
409
|
}
|
|
368
410
|
} else {
|
|
369
|
-
if (
|
|
370
|
-
for (let
|
|
371
|
-
const
|
|
372
|
-
|
|
411
|
+
if (P)
|
|
412
|
+
for (let m = 0; m < dt; m++) {
|
|
413
|
+
const p = et[m];
|
|
414
|
+
mt(p[2], p[1], p[0]);
|
|
373
415
|
}
|
|
374
|
-
if (
|
|
375
|
-
for (let
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
416
|
+
if (S)
|
|
417
|
+
for (let m = 0; m < dt; m++) {
|
|
418
|
+
const p = et[m];
|
|
419
|
+
mt(
|
|
420
|
+
p[0] + D * o,
|
|
421
|
+
p[1] + D * o,
|
|
422
|
+
p[2] + D * o
|
|
381
423
|
);
|
|
382
424
|
}
|
|
383
425
|
}
|
|
384
426
|
n.addGroup(l, s.length / 3 - l, 0);
|
|
385
427
|
}
|
|
386
|
-
function
|
|
428
|
+
function $t() {
|
|
387
429
|
const l = s.length / 3;
|
|
388
|
-
let
|
|
389
|
-
|
|
390
|
-
for (let
|
|
391
|
-
const b =
|
|
392
|
-
|
|
430
|
+
let m = 0;
|
|
431
|
+
Gt(R, m), m += R.length;
|
|
432
|
+
for (let p = 0, x = B.length; p < x; p++) {
|
|
433
|
+
const b = B[p];
|
|
434
|
+
Gt(b, m), m += b.length;
|
|
393
435
|
}
|
|
394
436
|
n.addGroup(l, s.length / 3 - l, 1);
|
|
395
437
|
}
|
|
396
|
-
function
|
|
397
|
-
let
|
|
398
|
-
for (; --
|
|
399
|
-
const x =
|
|
400
|
-
let b =
|
|
438
|
+
function Gt(l, m) {
|
|
439
|
+
let p = l.length;
|
|
440
|
+
for (; --p >= 0; ) {
|
|
441
|
+
const x = p;
|
|
442
|
+
let b = p - 1;
|
|
401
443
|
b < 0 && (b = l.length - 1);
|
|
402
|
-
for (let
|
|
403
|
-
const T =
|
|
404
|
-
|
|
444
|
+
for (let L = 0, M = o + w * 2; L < M; L++) {
|
|
445
|
+
const T = D * L, G = D * (L + 1), _ = m + x + T, H = m + b + T, nt = m + b + G, W = m + x + G;
|
|
446
|
+
Jt(_, H, nt, W);
|
|
405
447
|
}
|
|
406
448
|
}
|
|
407
449
|
}
|
|
408
|
-
function
|
|
409
|
-
|
|
450
|
+
function F(l, m, p) {
|
|
451
|
+
i.push(l), i.push(m), i.push(p);
|
|
410
452
|
}
|
|
411
|
-
function
|
|
412
|
-
|
|
413
|
-
const x = s.length / 3, b =
|
|
453
|
+
function mt(l, m, p) {
|
|
454
|
+
Y(l), Y(m), Y(p);
|
|
455
|
+
const x = s.length / 3, b = E.generateTopUV(
|
|
414
456
|
n,
|
|
415
457
|
s,
|
|
416
458
|
x - 3,
|
|
417
459
|
x - 2,
|
|
418
460
|
x - 1
|
|
419
461
|
);
|
|
420
|
-
|
|
462
|
+
Z(b[0]), Z(b[1]), Z(b[2]);
|
|
421
463
|
}
|
|
422
|
-
function
|
|
423
|
-
|
|
424
|
-
const b = s.length / 3,
|
|
464
|
+
function Jt(l, m, p, x) {
|
|
465
|
+
Y(l), Y(m), Y(x), Y(m), Y(p), Y(x);
|
|
466
|
+
const b = s.length / 3, L = E.generateSideWallUV(
|
|
425
467
|
n,
|
|
426
468
|
s,
|
|
427
469
|
b - 6,
|
|
@@ -429,22 +471,22 @@ class K extends me {
|
|
|
429
471
|
b - 2,
|
|
430
472
|
b - 1
|
|
431
473
|
);
|
|
432
|
-
|
|
474
|
+
Z(L[0]), Z(L[1]), Z(L[3]), Z(L[1]), Z(L[2]), Z(L[3]);
|
|
433
475
|
}
|
|
434
|
-
function
|
|
435
|
-
s.push(
|
|
476
|
+
function Y(l) {
|
|
477
|
+
s.push(i[l * 3 + 0]), s.push(i[l * 3 + 1]), s.push(i[l * 3 + 2]);
|
|
436
478
|
}
|
|
437
|
-
function
|
|
438
|
-
|
|
479
|
+
function Z(l) {
|
|
480
|
+
r.push(l.x), r.push(l.y);
|
|
439
481
|
}
|
|
440
482
|
}
|
|
441
483
|
}
|
|
442
|
-
copy(
|
|
443
|
-
return super.copy(
|
|
484
|
+
copy(t) {
|
|
485
|
+
return super.copy(t), this.parameters = Object.assign({}, t.parameters), this;
|
|
444
486
|
}
|
|
445
487
|
toJSON() {
|
|
446
|
-
const
|
|
447
|
-
return
|
|
488
|
+
const t = super.toJSON(), e = this.parameters.shapes, n = this.parameters.options;
|
|
489
|
+
return We(e, n, t);
|
|
448
490
|
}
|
|
449
491
|
/**
|
|
450
492
|
* Factory method for creating an instance of this class from the given
|
|
@@ -454,695 +496,656 @@ class K extends me {
|
|
|
454
496
|
* @param {Array<Shape>} shapes - An array of shapes.
|
|
455
497
|
* @return {ExtrudeGeometry} A new instance.
|
|
456
498
|
*/
|
|
457
|
-
static fromJSON(
|
|
499
|
+
static fromJSON(t, e) {
|
|
458
500
|
const n = [];
|
|
459
|
-
for (let
|
|
460
|
-
const f = t
|
|
501
|
+
for (let r = 0, a = t.shapes.length; r < a; r++) {
|
|
502
|
+
const f = e[t.shapes[r]];
|
|
461
503
|
n.push(f);
|
|
462
504
|
}
|
|
463
|
-
const s =
|
|
464
|
-
return s !== void 0 && (
|
|
505
|
+
const s = t.options.extrudePath;
|
|
506
|
+
return s !== void 0 && (t.options.extrudePath = new De[s.type]().fromJSON(
|
|
465
507
|
s
|
|
466
|
-
)), new
|
|
508
|
+
)), new st(n, t.options);
|
|
467
509
|
}
|
|
468
510
|
}
|
|
469
|
-
const
|
|
470
|
-
generateTopUV: function(
|
|
471
|
-
const
|
|
511
|
+
const He = {
|
|
512
|
+
generateTopUV: function(d, t, e, n, s) {
|
|
513
|
+
const r = t[e * 3], a = t[e * 3 + 1], f = t[n * 3], i = t[n * 3 + 1], h = t[s * 3], o = t[s * 3 + 1];
|
|
472
514
|
return [
|
|
473
|
-
new
|
|
474
|
-
new
|
|
475
|
-
new
|
|
515
|
+
new z(r, a),
|
|
516
|
+
new z(f, i),
|
|
517
|
+
new z(h, o)
|
|
476
518
|
];
|
|
477
519
|
},
|
|
478
|
-
generateSideWallUV: function(
|
|
479
|
-
const a = e
|
|
480
|
-
return Math.abs(f -
|
|
481
|
-
new
|
|
482
|
-
new
|
|
483
|
-
new
|
|
484
|
-
new
|
|
520
|
+
generateSideWallUV: function(d, t, e, n, s, r) {
|
|
521
|
+
const a = t[e * 3], f = t[e * 3 + 1], i = t[e * 3 + 2], h = t[n * 3], o = t[n * 3 + 1], c = t[n * 3 + 2], g = t[s * 3], u = t[s * 3 + 1], y = t[s * 3 + 2], A = t[r * 3], w = t[r * 3 + 1], v = t[r * 3 + 2];
|
|
522
|
+
return Math.abs(f - o) < Math.abs(a - h) ? [
|
|
523
|
+
new z(a, 1 - i),
|
|
524
|
+
new z(h, 1 - c),
|
|
525
|
+
new z(g, 1 - y),
|
|
526
|
+
new z(A, 1 - v)
|
|
485
527
|
] : [
|
|
486
|
-
new
|
|
487
|
-
new
|
|
488
|
-
new
|
|
489
|
-
new
|
|
528
|
+
new z(f, 1 - i),
|
|
529
|
+
new z(o, 1 - c),
|
|
530
|
+
new z(u, 1 - y),
|
|
531
|
+
new z(w, 1 - v)
|
|
490
532
|
];
|
|
491
533
|
}
|
|
492
534
|
};
|
|
493
|
-
function
|
|
494
|
-
if (
|
|
495
|
-
for (let n = 0, s =
|
|
496
|
-
const
|
|
497
|
-
|
|
535
|
+
function We(d, t, e) {
|
|
536
|
+
if (e.shapes = [], Array.isArray(d))
|
|
537
|
+
for (let n = 0, s = d.length; n < s; n++) {
|
|
538
|
+
const r = d[n];
|
|
539
|
+
e.shapes.push(r.uuid);
|
|
498
540
|
}
|
|
499
541
|
else
|
|
500
|
-
|
|
501
|
-
return
|
|
542
|
+
e.shapes.push(d.uuid);
|
|
543
|
+
return e.options = Object.assign({}, t), t.extrudePath !== void 0 && (e.options.extrudePath = t.extrudePath.toJSON()), e;
|
|
502
544
|
}
|
|
503
|
-
class
|
|
504
|
-
constructor(
|
|
505
|
-
super(
|
|
506
|
-
const n = new
|
|
507
|
-
new
|
|
545
|
+
class Xe extends st {
|
|
546
|
+
constructor(t, e) {
|
|
547
|
+
super(t, e);
|
|
548
|
+
const n = new Ht(
|
|
549
|
+
new st(t, gt(X({}, e), {
|
|
508
550
|
hasTop: !0,
|
|
509
551
|
hasSide: !0,
|
|
510
552
|
hasBottom: !1
|
|
511
553
|
}))
|
|
512
554
|
);
|
|
513
555
|
n.updateMatrixWorld();
|
|
514
|
-
const s = new
|
|
515
|
-
s.getSize(
|
|
516
|
-
const a = new
|
|
517
|
-
s.min.x +
|
|
518
|
-
s.min.y +
|
|
556
|
+
const s = new xe().setFromObject(n), r = new j();
|
|
557
|
+
s.getSize(r);
|
|
558
|
+
const a = new j(
|
|
559
|
+
s.min.x + r.x / 2,
|
|
560
|
+
s.min.y + r.y / 2,
|
|
519
561
|
0
|
|
520
562
|
);
|
|
521
|
-
let f =
|
|
522
|
-
if (
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
|
|
563
|
+
let f = e.topSegments, i = e.box3;
|
|
564
|
+
if (i) {
|
|
565
|
+
i = i.union(s);
|
|
566
|
+
const v = new j();
|
|
567
|
+
i.getSize(v);
|
|
568
|
+
const E = Math.max(
|
|
569
|
+
r.x / v.x,
|
|
570
|
+
r.y / v.y
|
|
529
571
|
);
|
|
530
|
-
f = Math.ceil(
|
|
572
|
+
f = Math.ceil(e.topSegments * E);
|
|
531
573
|
}
|
|
532
574
|
if (f < 4)
|
|
533
575
|
return this;
|
|
534
|
-
const h = new
|
|
535
|
-
|
|
536
|
-
|
|
576
|
+
const h = new we(
|
|
577
|
+
r.x,
|
|
578
|
+
r.y,
|
|
537
579
|
f,
|
|
538
580
|
f
|
|
539
|
-
),
|
|
540
|
-
|
|
541
|
-
const g = new
|
|
581
|
+
), o = new Ht(h);
|
|
582
|
+
o.position.set(a.x, a.y, a.z), o.updateMatrixWorld();
|
|
583
|
+
const g = new Ie().evaluate(o, n, Be), u = g.geometry.getAttribute("position"), y = new rt(
|
|
542
584
|
u.count * 2,
|
|
543
585
|
2
|
|
544
586
|
);
|
|
545
|
-
for (let
|
|
546
|
-
const
|
|
547
|
-
u.setZ(
|
|
587
|
+
for (let v = 0; v < u.count; v++) {
|
|
588
|
+
const E = u.getZ(v);
|
|
589
|
+
u.setZ(v, e.depth + E);
|
|
548
590
|
}
|
|
549
|
-
if (
|
|
550
|
-
const
|
|
551
|
-
for (let
|
|
552
|
-
const
|
|
553
|
-
y.setXY(
|
|
591
|
+
if (i) {
|
|
592
|
+
const v = i.min, E = i.max, S = new j().subVectors(E, v);
|
|
593
|
+
for (let P = 0; P < u.count; P++) {
|
|
594
|
+
const O = u.getX(P), U = u.getY(P), N = (O - v.x) / S.x, C = (U - v.y) / S.y;
|
|
595
|
+
y.setXY(P, N, C);
|
|
554
596
|
}
|
|
555
597
|
g.geometry.setAttribute("uv", y);
|
|
556
598
|
}
|
|
557
599
|
u.needsUpdate = !0;
|
|
558
|
-
const
|
|
600
|
+
const A = new st(t, gt(X({}, e), {
|
|
559
601
|
hasTop: !1
|
|
560
|
-
})),
|
|
561
|
-
this.copy(
|
|
602
|
+
})), w = q([g.geometry, A], 2);
|
|
603
|
+
this.copy(w.toNonIndexed());
|
|
562
604
|
}
|
|
563
605
|
}
|
|
564
|
-
const
|
|
606
|
+
const Xt = (d) => {
|
|
565
607
|
const {
|
|
566
|
-
split:
|
|
567
|
-
depth:
|
|
608
|
+
split: t,
|
|
609
|
+
depth: e,
|
|
568
610
|
points: n,
|
|
569
611
|
box3: s,
|
|
570
|
-
hasTop:
|
|
612
|
+
hasTop: r,
|
|
571
613
|
hasBottom: a,
|
|
572
614
|
hasSide: f,
|
|
573
|
-
sideRepeat:
|
|
615
|
+
sideRepeat: i,
|
|
574
616
|
topSegments: h
|
|
575
|
-
} =
|
|
576
|
-
depth:
|
|
617
|
+
} = d, o = h ? Xe : st, c = new o(new Mt(n), {
|
|
618
|
+
depth: e,
|
|
577
619
|
bevelEnabled: !1,
|
|
578
620
|
box3: s,
|
|
579
|
-
UVGenerator:
|
|
580
|
-
split:
|
|
621
|
+
UVGenerator: je({
|
|
622
|
+
split: t,
|
|
581
623
|
box3: s,
|
|
582
|
-
sideRepeat:
|
|
624
|
+
sideRepeat: i
|
|
583
625
|
}),
|
|
584
|
-
hasTop:
|
|
626
|
+
hasTop: r,
|
|
585
627
|
hasBottom: a,
|
|
586
628
|
hasSide: f,
|
|
587
629
|
topSegments: h
|
|
588
630
|
});
|
|
589
|
-
return
|
|
631
|
+
return Ce(), c;
|
|
590
632
|
};
|
|
591
|
-
class
|
|
592
|
-
constructor(
|
|
593
|
-
super(), this.options =
|
|
633
|
+
class sn extends K {
|
|
634
|
+
constructor(t) {
|
|
635
|
+
super(), this.options = X({
|
|
594
636
|
depth: 1
|
|
595
|
-
},
|
|
637
|
+
}, t);
|
|
596
638
|
}
|
|
597
639
|
create() {
|
|
598
|
-
return
|
|
640
|
+
return ct(this, null, function* () {
|
|
599
641
|
const {
|
|
600
|
-
points:
|
|
601
|
-
pointsArr:
|
|
642
|
+
points: t,
|
|
643
|
+
pointsArr: e,
|
|
602
644
|
useGroups: n,
|
|
603
645
|
depth: s,
|
|
604
|
-
geometry:
|
|
646
|
+
geometry: r,
|
|
605
647
|
geometryArr: a,
|
|
606
648
|
material: f,
|
|
607
|
-
box3:
|
|
649
|
+
box3: i,
|
|
608
650
|
split: h,
|
|
609
|
-
hasTop:
|
|
651
|
+
hasTop: o,
|
|
610
652
|
hasBottom: c,
|
|
611
653
|
hasSide: g
|
|
612
|
-
} = this.options, u = Array.isArray(s) ? s : [s], y = Array.isArray(
|
|
613
|
-
let
|
|
614
|
-
|
|
615
|
-
points:
|
|
654
|
+
} = this.options, u = Array.isArray(s) ? s : [s], y = Array.isArray(i) ? i : [i], A = f;
|
|
655
|
+
let w = r;
|
|
656
|
+
A || console.log("material is null"), !w && t ? w = Xt({
|
|
657
|
+
points: t,
|
|
616
658
|
depth: u[0],
|
|
617
659
|
box3: y[0],
|
|
618
660
|
split: h,
|
|
619
|
-
hasTop:
|
|
661
|
+
hasTop: o,
|
|
620
662
|
hasBottom: c,
|
|
621
663
|
hasSide: g
|
|
622
|
-
}) : !
|
|
623
|
-
|
|
624
|
-
(
|
|
625
|
-
var
|
|
626
|
-
return
|
|
627
|
-
points:
|
|
628
|
-
depth: (
|
|
629
|
-
box3: (
|
|
664
|
+
}) : !w && e ? w = q(
|
|
665
|
+
e.map(
|
|
666
|
+
(v, E) => {
|
|
667
|
+
var S, P;
|
|
668
|
+
return Xt({
|
|
669
|
+
points: v,
|
|
670
|
+
depth: (S = u[E]) != null ? S : u[0],
|
|
671
|
+
box3: (P = y[E]) != null ? P : y[0],
|
|
630
672
|
split: h,
|
|
631
|
-
hasTop:
|
|
673
|
+
hasTop: o,
|
|
632
674
|
hasBottom: c,
|
|
633
675
|
hasSide: g
|
|
634
676
|
});
|
|
635
677
|
}
|
|
636
678
|
),
|
|
637
679
|
n != null ? n : 0
|
|
638
|
-
) : !
|
|
680
|
+
) : !w && a && a.length > 1 ? w = q(a, n != null ? n : 0) : !w && a && a.length === 1 && ([w] = a), this.createMesh(w, A);
|
|
639
681
|
});
|
|
640
682
|
}
|
|
641
|
-
addGeometries(
|
|
642
|
-
const
|
|
643
|
-
|
|
683
|
+
addGeometries(t) {
|
|
684
|
+
const e = this.object3d, n = q([e.geometry, ...t]);
|
|
685
|
+
e.geometry = n;
|
|
644
686
|
}
|
|
645
|
-
setTextureAnisotropic(
|
|
646
|
-
|
|
687
|
+
setTextureAnisotropic(t, e) {
|
|
688
|
+
t.anisotropy = e || this.pencil.renderer.capabilities.getMaxAnisotropy();
|
|
647
689
|
}
|
|
648
690
|
}
|
|
649
|
-
const
|
|
691
|
+
const on = (d) => {
|
|
650
692
|
const {
|
|
651
|
-
topColor:
|
|
652
|
-
sideColor:
|
|
693
|
+
topColor: t,
|
|
694
|
+
sideColor: e,
|
|
653
695
|
sideMap: n,
|
|
654
696
|
createCanvasObjectURL: s,
|
|
655
|
-
split:
|
|
697
|
+
split: r,
|
|
656
698
|
maxAnisotropy: a
|
|
657
|
-
} =
|
|
699
|
+
} = d;
|
|
658
700
|
return new Promise((f) => {
|
|
659
|
-
const
|
|
701
|
+
const i = n ? document.createElement("img") : {
|
|
660
702
|
src: "",
|
|
661
703
|
onload: () => {
|
|
662
704
|
},
|
|
663
705
|
width: 128,
|
|
664
706
|
height: 128
|
|
665
707
|
};
|
|
666
|
-
|
|
667
|
-
const h =
|
|
668
|
-
|
|
708
|
+
i.onload = () => {
|
|
709
|
+
const h = r, o = document.createElement("canvas"), c = o.getContext("2d");
|
|
710
|
+
o.height = i.height / (1 - h), o.width = i.width, h && t && (c.fillStyle = t, c.fillRect(0, 0, i.width, o.height * h)), n && i instanceof HTMLImageElement ? c.drawImage(i, 0, o.height * h, i.width, i.height) : e && (c.fillStyle = e, c.fillRect(0, o.height * h, i.width, i.height)), s && o.toBlob((u) => {
|
|
669
711
|
console.log(URL.createObjectURL(u));
|
|
670
712
|
});
|
|
671
|
-
const g = new
|
|
713
|
+
const g = new ve(o);
|
|
672
714
|
f(g);
|
|
673
|
-
}, n ?
|
|
715
|
+
}, n ? i.src = n : i instanceof HTMLImageElement || i.onload();
|
|
674
716
|
});
|
|
675
717
|
};
|
|
676
|
-
class
|
|
718
|
+
class rn extends K {
|
|
677
719
|
create() {
|
|
678
720
|
this.createGroup();
|
|
679
721
|
}
|
|
722
|
+
render() {
|
|
723
|
+
this.object3d.raycast = (t, e) => t.intersectObjects(
|
|
724
|
+
this.object3d.children,
|
|
725
|
+
!0,
|
|
726
|
+
e
|
|
727
|
+
);
|
|
728
|
+
}
|
|
680
729
|
}
|
|
681
|
-
class
|
|
682
|
-
constructor(
|
|
683
|
-
super(), this.rectAreaLightUniformsLibInit = !1, this.options =
|
|
730
|
+
class an extends K {
|
|
731
|
+
constructor(t) {
|
|
732
|
+
super(), this.rectAreaLightUniformsLibInit = !1, this.options = t;
|
|
684
733
|
}
|
|
685
734
|
create() {
|
|
686
|
-
var
|
|
687
|
-
const
|
|
688
|
-
if (
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
} else if (
|
|
692
|
-
const
|
|
693
|
-
|
|
694
|
-
} else if (
|
|
695
|
-
const
|
|
696
|
-
(
|
|
697
|
-
(n =
|
|
698
|
-
(s =
|
|
699
|
-
(
|
|
735
|
+
var e, n, s, r, a, f, i, h, o, c, g, u, y, A, w, v, E;
|
|
736
|
+
const t = this.options;
|
|
737
|
+
if (t.type === "AmbientLight") {
|
|
738
|
+
const S = new Se(t.color);
|
|
739
|
+
S.name = "环境光", this.object3d = S;
|
|
740
|
+
} else if (t.type === "DirectionalLight") {
|
|
741
|
+
const S = new Me(t.color, t.intensity);
|
|
742
|
+
S.name = "平行光", S.target.position.set(0, 0, 0), this.object3d = S, S.target.name = "平行光目标", S.shadow.camera.name = "平行光阴影相机", S.shadow.camera.userData.directionalLightShadow = !0, this.directionalLight = S;
|
|
743
|
+
} else if (t.type === "PointLight") {
|
|
744
|
+
const S = new Ae(
|
|
745
|
+
(e = t.color) != null ? e : 16777215,
|
|
746
|
+
(n = t.intensity) != null ? n : 1,
|
|
747
|
+
(s = t.distance) != null ? s : 0,
|
|
748
|
+
(r = t.decay) != null ? r : 2
|
|
700
749
|
);
|
|
701
|
-
|
|
702
|
-
} else if (
|
|
703
|
-
const
|
|
704
|
-
(a =
|
|
705
|
-
(f =
|
|
706
|
-
(
|
|
707
|
-
(h =
|
|
708
|
-
(
|
|
709
|
-
(c =
|
|
750
|
+
S.name = "点光源", this.object3d = S, this.pointLight = S;
|
|
751
|
+
} else if (t.type === "SpotLight") {
|
|
752
|
+
const S = new Le(
|
|
753
|
+
(a = t.color) != null ? a : 16777215,
|
|
754
|
+
(f = t.intensity) != null ? f : 1,
|
|
755
|
+
(i = t.distance) != null ? i : 0,
|
|
756
|
+
(h = t.angle) != null ? h : Math.PI / 3,
|
|
757
|
+
(o = t.penumbra) != null ? o : 1,
|
|
758
|
+
(c = t.decay) != null ? c : 2
|
|
710
759
|
);
|
|
711
|
-
|
|
712
|
-
} else if (
|
|
713
|
-
const
|
|
714
|
-
(g =
|
|
715
|
-
(u =
|
|
716
|
-
(y =
|
|
760
|
+
S.name = "聚光灯", this.object3d = S, this.spotLight = S, S.target.name = "聚光灯目标";
|
|
761
|
+
} else if (t.type === "HemisphereLight") {
|
|
762
|
+
const S = new Te(
|
|
763
|
+
(g = t.color) != null ? g : 16777215,
|
|
764
|
+
(u = t.groundColor) != null ? u : 16777215,
|
|
765
|
+
(y = t.intensity) != null ? y : 1
|
|
717
766
|
);
|
|
718
|
-
|
|
719
|
-
} else if (
|
|
720
|
-
this.rectAreaLightUniformsLibInit || (
|
|
721
|
-
const
|
|
722
|
-
(
|
|
723
|
-
(
|
|
724
|
-
(
|
|
725
|
-
(
|
|
767
|
+
S.name = "半球光", this.object3d = S, this.hemisphereLight = S;
|
|
768
|
+
} else if (t.type === "RectAreaLight") {
|
|
769
|
+
this.rectAreaLightUniformsLibInit || (Re.init(), this.rectAreaLightUniformsLibInit = !0);
|
|
770
|
+
const S = new Ge(
|
|
771
|
+
(A = t.color) != null ? A : 16777215,
|
|
772
|
+
(w = t.intensity) != null ? w : 1,
|
|
773
|
+
(v = t.width) != null ? v : 10,
|
|
774
|
+
(E = t.height) != null ? E : 10
|
|
726
775
|
);
|
|
727
|
-
|
|
776
|
+
S.name = "矩形区域光", this.object3d = S, this.rectAreaLight = S;
|
|
728
777
|
}
|
|
729
778
|
}
|
|
730
779
|
render() {
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
const
|
|
780
|
+
const t = this.object3d;
|
|
781
|
+
t.target && this.pencil.scene.add(t.target);
|
|
782
|
+
const e = this.pencil.cameraTarget;
|
|
734
783
|
if (this.spotLight || this.directionalLight) {
|
|
735
784
|
const n = this.spotLight || this.directionalLight;
|
|
736
|
-
n.position.copy(
|
|
737
|
-
} else this.pointLight && this.pointLight.position.copy(
|
|
785
|
+
n.position.copy(e), n.target.position.copy(e);
|
|
786
|
+
} else this.pointLight && this.pointLight.position.copy(e);
|
|
738
787
|
}
|
|
739
788
|
dispose() {
|
|
740
|
-
const
|
|
741
|
-
|
|
789
|
+
const t = this.object3d;
|
|
790
|
+
t.target && this.pencil.scene.remove(t.target), super.dispose();
|
|
742
791
|
}
|
|
743
792
|
}
|
|
744
|
-
class
|
|
745
|
-
constructor(
|
|
746
|
-
super(), this.type = "MeshLineGeometry", this.pointCount = 0, this._points = [], this.shape = "none", this.shapeFunction = (s) => 1, this.matrixWorld = new
|
|
793
|
+
class Ve extends lt {
|
|
794
|
+
constructor(t = [], e = "none", n) {
|
|
795
|
+
super(), this.type = "MeshLineGeometry", this.pointCount = 0, this._points = [], this.shape = "none", this.shapeFunction = (s) => 1, this.matrixWorld = new qt(), this.shape = e, n && (this.shapeFunction = n), t.length > 0 && this.setPoints(t);
|
|
747
796
|
}
|
|
748
|
-
convertToVector3Array(
|
|
749
|
-
if (typeof
|
|
750
|
-
const
|
|
797
|
+
convertToVector3Array(t) {
|
|
798
|
+
if (typeof t[0] == "number") {
|
|
799
|
+
const e = [], n = t;
|
|
751
800
|
for (let s = 0; s < n.length; s += 3)
|
|
752
|
-
|
|
753
|
-
return
|
|
801
|
+
e.push(new j(n[s], n[s + 1], n[s + 2]));
|
|
802
|
+
return e;
|
|
754
803
|
} else
|
|
755
|
-
return
|
|
756
|
-
if (
|
|
757
|
-
return new
|
|
758
|
-
if (
|
|
759
|
-
return
|
|
760
|
-
if (Array.isArray(
|
|
761
|
-
return new
|
|
762
|
-
if (Array.isArray(
|
|
763
|
-
return new
|
|
804
|
+
return t.map((e) => {
|
|
805
|
+
if (e instanceof z)
|
|
806
|
+
return new j(e.x, e.y, 0);
|
|
807
|
+
if (e instanceof j)
|
|
808
|
+
return e;
|
|
809
|
+
if (Array.isArray(e) && e.length === 2)
|
|
810
|
+
return new j(e[0], e[1], 0);
|
|
811
|
+
if (Array.isArray(e) && e.length === 3)
|
|
812
|
+
return new j(e[0], e[1], e[2]);
|
|
764
813
|
}).filter(Boolean);
|
|
765
814
|
}
|
|
766
|
-
setMatrixWorld(
|
|
767
|
-
this.matrixWorld =
|
|
815
|
+
setMatrixWorld(t) {
|
|
816
|
+
this.matrixWorld = t;
|
|
768
817
|
}
|
|
769
|
-
setPoints(
|
|
770
|
-
!
|
|
818
|
+
setPoints(t, e) {
|
|
819
|
+
!t || t.length === 0 || (this._points = this.convertToVector3Array(t), this.pointCount = this._points.length, e && (this.shapeFunction = e, this.shape = "custom"), this.initializeGeometry(), this.updateGeometry());
|
|
771
820
|
}
|
|
772
821
|
initializeGeometry() {
|
|
773
|
-
const
|
|
822
|
+
const t = new Q(
|
|
774
823
|
new Float32Array(this.pointCount * 6),
|
|
775
824
|
3
|
|
776
|
-
),
|
|
825
|
+
), e = new Q(
|
|
777
826
|
new Float32Array(this.pointCount * 6),
|
|
778
827
|
3
|
|
779
|
-
), n = new
|
|
828
|
+
), n = new Q(new Float32Array(this.pointCount * 6), 3), s = new Q(
|
|
780
829
|
new Float32Array(this.pointCount * 2),
|
|
781
830
|
1
|
|
782
|
-
),
|
|
831
|
+
), r = new Q(new Float32Array(this.pointCount * 2), 1), a = new Q(new Float32Array(this.pointCount * 2), 1), f = new Q(new Float32Array(this.pointCount * 4), 2), i = new Q(
|
|
783
832
|
new Uint16Array((this.pointCount - 1) * 6),
|
|
784
833
|
1
|
|
785
834
|
);
|
|
786
835
|
this.shape === "taper" && (this.shapeFunction = (h) => 1 * Math.pow(4 * h * (1 - h), 1));
|
|
787
|
-
for (let h = 0,
|
|
788
|
-
s.setX(
|
|
836
|
+
for (let h = 0, o = 0, c = 0; h < this.pointCount; h += 1, o += 2, c += 6) {
|
|
837
|
+
s.setX(o, h / this.pointCount), s.setX(o + 1, h / this.pointCount), r.setX(o, 1), r.setX(o + 1, -1);
|
|
789
838
|
const g = this.shape === "none" ? 1 : this.shapeFunction(h / (this.pointCount - 1));
|
|
790
|
-
a.setX(
|
|
839
|
+
a.setX(o, g), a.setX(o + 1, g);
|
|
791
840
|
const u = h / (this.pointCount - 1);
|
|
792
|
-
if (f.setXY(
|
|
841
|
+
if (f.setXY(o, u, 0), f.setXY(o + 1, u, 1), h < this.pointCount - 1) {
|
|
793
842
|
const y = h * 2;
|
|
794
|
-
|
|
843
|
+
i.setX(c + 0, y + 0), i.setX(c + 1, y + 1), i.setX(c + 2, y + 2), i.setX(c + 3, y + 2), i.setX(c + 4, y + 1), i.setX(c + 5, y + 3);
|
|
795
844
|
}
|
|
796
845
|
}
|
|
797
|
-
this.setAttribute("position",
|
|
846
|
+
this.setAttribute("position", t), this.setAttribute("previous", e), this.setAttribute("next", n), this.setAttribute("counters", s), this.setAttribute("side", r), this.setAttribute("width", a), this.setAttribute("uv", f), this.setIndex(i);
|
|
798
847
|
}
|
|
799
848
|
updateGeometry() {
|
|
800
849
|
if (!this._points[0]) return;
|
|
801
|
-
const
|
|
802
|
-
let s = 0,
|
|
850
|
+
const t = this.getAttribute("position"), e = this.getAttribute("previous"), n = this.getAttribute("next");
|
|
851
|
+
let s = 0, r = 0, a = 0;
|
|
803
852
|
const f = this._points[0];
|
|
804
|
-
|
|
853
|
+
e.setXYZ(r, f.x, f.y, f.z), r += 1, e.setXYZ(r, f.x, f.y, f.z), r += 1;
|
|
805
854
|
for (let h = 0; h < this.pointCount; h++) {
|
|
806
|
-
const
|
|
807
|
-
|
|
855
|
+
const o = this._points[h];
|
|
856
|
+
t.setXYZ(s, o.x, o.y, o.z), s += 1, t.setXYZ(s, o.x, o.y, o.z), s += 1, h < this.pointCount - 1 && (e.setXYZ(r, o.x, o.y, o.z), r += 1, e.setXYZ(r, o.x, o.y, o.z), r += 1), h > 0 && h + 1 <= this.pointCount && (n.setXYZ(a, o.x, o.y, o.z), a += 1, n.setXYZ(a, o.x, o.y, o.z), a += 1);
|
|
808
857
|
}
|
|
809
|
-
const
|
|
810
|
-
n.setXYZ(a,
|
|
858
|
+
const i = this._points[this.pointCount - 1];
|
|
859
|
+
n.setXYZ(a, i.x, i.y, i.z), a += 1, n.setXYZ(a, i.x, i.y, i.z), a += 1, t.needsUpdate = !0, e.needsUpdate = !0, n.needsUpdate = !0, this.computeBoundingSphere(), this.computeBoundingBox();
|
|
811
860
|
}
|
|
812
861
|
get points() {
|
|
813
862
|
return this._points;
|
|
814
863
|
}
|
|
815
|
-
set points(
|
|
816
|
-
this.setPoints(
|
|
864
|
+
set points(t) {
|
|
865
|
+
this.setPoints(t);
|
|
817
866
|
}
|
|
818
|
-
updatePoints(
|
|
819
|
-
const n = this.convertToVector3Array(
|
|
867
|
+
updatePoints(t, e) {
|
|
868
|
+
const n = this.convertToVector3Array(t);
|
|
820
869
|
if (n.length !== this.pointCount) {
|
|
821
870
|
console.warn(
|
|
822
871
|
"MeshLineGeometry: Cannot update points with different length. Use setPoints() instead."
|
|
823
872
|
);
|
|
824
873
|
return;
|
|
825
874
|
}
|
|
826
|
-
this._points = n,
|
|
875
|
+
this._points = n, e && (this.shapeFunction = e, this.shape = "custom", this.initializeGeometry()), this.updateGeometry();
|
|
827
876
|
}
|
|
828
|
-
setShape(
|
|
829
|
-
this.shape =
|
|
877
|
+
setShape(t, e) {
|
|
878
|
+
this.shape = t, e && (this.shapeFunction = e), this._points.length > 0 && (this.initializeGeometry(), this.updateGeometry());
|
|
830
879
|
}
|
|
831
880
|
}
|
|
832
|
-
function
|
|
833
|
-
const
|
|
834
|
-
if (s.copy(a.boundingSphere), s.applyMatrix4(this.matrixWorld), !
|
|
835
|
-
|
|
836
|
-
const f = new
|
|
881
|
+
function cn(d, t) {
|
|
882
|
+
const e = new qt(), n = new Ee(), s = new _e(), r = new j(), a = this.geometry;
|
|
883
|
+
if (s.copy(a.boundingSphere), s.applyMatrix4(this.matrixWorld), !d.ray.intersectSphere(s, r)) return;
|
|
884
|
+
e.copy(this.matrixWorld).invert(), n.copy(d.ray).applyMatrix4(e);
|
|
885
|
+
const f = new j(), i = new j(), h = new j(), o = this instanceof Ft ? 2 : 1, c = a.index, g = a.attributes;
|
|
837
886
|
if (c !== null) {
|
|
838
|
-
const u = c.array, y = g.position.array,
|
|
839
|
-
for (let
|
|
840
|
-
const
|
|
841
|
-
f.fromArray(y,
|
|
842
|
-
const
|
|
887
|
+
const u = c.array, y = g.position.array, A = g.width.array;
|
|
888
|
+
for (let w = 0, v = u.length - 1; w < v; w += o) {
|
|
889
|
+
const E = u[w], S = u[w + 1];
|
|
890
|
+
f.fromArray(y, E * 3), i.fromArray(y, S * 3);
|
|
891
|
+
const P = A[Math.floor(w / 3)] !== void 0 ? A[Math.floor(w / 3)] : 1, O = d.params.Line.threshold + this.material.lineWidth * P / 2, U = O * O;
|
|
843
892
|
if (n.distanceSqToSegment(
|
|
844
893
|
f,
|
|
894
|
+
i,
|
|
845
895
|
r,
|
|
846
|
-
o,
|
|
847
896
|
h
|
|
848
|
-
) >
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
-
distance:
|
|
897
|
+
) > U) continue;
|
|
898
|
+
r.applyMatrix4(this.matrixWorld);
|
|
899
|
+
const C = d.ray.origin.distanceTo(r);
|
|
900
|
+
C < d.near || C > d.far || (t.push({
|
|
901
|
+
distance: C,
|
|
853
902
|
// What do we want? intersection point on the ray or on the segment??
|
|
854
903
|
// point: raycaster.ray.at( distance ),
|
|
855
904
|
point: h.clone().applyMatrix4(this.matrixWorld),
|
|
856
|
-
index:
|
|
905
|
+
index: w,
|
|
857
906
|
face: null,
|
|
858
907
|
faceIndex: void 0,
|
|
859
908
|
object: this
|
|
860
|
-
}),
|
|
909
|
+
}), w = v);
|
|
861
910
|
}
|
|
862
911
|
}
|
|
863
912
|
}
|
|
864
|
-
const
|
|
865
|
-
const { setPointWidth:
|
|
866
|
-
return n.setPoints(
|
|
867
|
-
},
|
|
868
|
-
let
|
|
869
|
-
constructor(
|
|
870
|
-
super(), this.options =
|
|
913
|
+
const St = (d) => {
|
|
914
|
+
const { setPointWidth: t, nodes: e } = d, n = new Ve();
|
|
915
|
+
return n.setPoints(e, t), n;
|
|
916
|
+
}, Vt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new Map();
|
|
917
|
+
let ln = class extends K {
|
|
918
|
+
constructor(t = {}) {
|
|
919
|
+
super(), this.options = X({}, t);
|
|
871
920
|
}
|
|
872
921
|
get material() {
|
|
873
|
-
var
|
|
874
|
-
return (
|
|
922
|
+
var t;
|
|
923
|
+
return (t = this.object3d) == null ? void 0 : t.material;
|
|
875
924
|
}
|
|
876
925
|
create() {
|
|
877
|
-
return
|
|
926
|
+
return ct(this, null, function* () {
|
|
878
927
|
const {
|
|
879
|
-
nodes:
|
|
880
|
-
nodesArr:
|
|
928
|
+
nodes: t,
|
|
929
|
+
nodesArr: e,
|
|
881
930
|
geometry: n,
|
|
882
931
|
geometryArr: s,
|
|
883
|
-
material:
|
|
932
|
+
material: r,
|
|
884
933
|
useGroups: a,
|
|
885
934
|
setPointWidth: f,
|
|
886
|
-
lineWidthArr:
|
|
935
|
+
lineWidthArr: i,
|
|
887
936
|
materialParameters: h
|
|
888
937
|
} = this.options;
|
|
889
|
-
let
|
|
890
|
-
!
|
|
891
|
-
nodes:
|
|
938
|
+
let o = r, c = n;
|
|
939
|
+
!o && h && (o = this.getMaterial(h)), !c && t ? c = St({
|
|
940
|
+
nodes: t,
|
|
892
941
|
setPointWidth: f
|
|
893
|
-
}) : !c &&
|
|
894
|
-
|
|
942
|
+
}) : !c && e ? c = q(
|
|
943
|
+
e.map((g, u) => {
|
|
895
944
|
let y = f;
|
|
896
|
-
return !y &&
|
|
897
|
-
var
|
|
898
|
-
return (
|
|
899
|
-
}),
|
|
945
|
+
return !y && i && (y = () => {
|
|
946
|
+
var A;
|
|
947
|
+
return (A = i[u]) != null ? A : i[0];
|
|
948
|
+
}), St({
|
|
900
949
|
nodes: g,
|
|
901
950
|
setPointWidth: y
|
|
902
951
|
});
|
|
903
952
|
}),
|
|
904
953
|
a != null ? a : 0
|
|
905
|
-
) : !c && s && s.length > 1 ? c =
|
|
954
|
+
) : !c && s && s.length > 1 ? c = q(s, a != null ? a : 0) : !c && s && s.length === 1 && ([c] = s), this.createMesh(c, o);
|
|
906
955
|
});
|
|
907
956
|
}
|
|
908
|
-
setGeometry(
|
|
909
|
-
const n =
|
|
910
|
-
nodes:
|
|
911
|
-
setPointWidth:
|
|
912
|
-
}), s = this.object3d,
|
|
913
|
-
s.geometry = n,
|
|
957
|
+
setGeometry(t, e) {
|
|
958
|
+
const n = St({
|
|
959
|
+
nodes: t,
|
|
960
|
+
setPointWidth: e
|
|
961
|
+
}), s = this.object3d, r = s.geometry;
|
|
962
|
+
s.geometry = n, r.dispose();
|
|
914
963
|
}
|
|
915
|
-
getMaterial(
|
|
916
|
-
const { width:
|
|
917
|
-
color: new
|
|
918
|
-
},
|
|
919
|
-
return s.uniforms.resolution.value.set(
|
|
964
|
+
getMaterial(t) {
|
|
965
|
+
const { width: e, height: n } = this.pencil.getSize(), s = new re(X({
|
|
966
|
+
color: new Yt("#ffffff")
|
|
967
|
+
}, t));
|
|
968
|
+
return s.uniforms.resolution.value.set(e, n), s;
|
|
920
969
|
}
|
|
921
|
-
addGeometries(
|
|
922
|
-
const
|
|
923
|
-
|
|
970
|
+
addGeometries(t) {
|
|
971
|
+
const e = this.object3d, n = q([e.geometry, ...t]);
|
|
972
|
+
e.geometry = n;
|
|
924
973
|
}
|
|
925
|
-
resize(
|
|
974
|
+
resize(t, e) {
|
|
926
975
|
var n, s;
|
|
927
|
-
(s = (n = this.material) == null ? void 0 : n.uniforms) == null || s.resolution.value.set(
|
|
976
|
+
(s = (n = this.material) == null ? void 0 : n.uniforms) == null || s.resolution.value.set(t, e);
|
|
928
977
|
}
|
|
929
|
-
handleMaterialChange(
|
|
930
|
-
if (
|
|
931
|
-
const { width:
|
|
932
|
-
this.resize(
|
|
978
|
+
handleMaterialChange(t) {
|
|
979
|
+
if (t) {
|
|
980
|
+
const { width: e, height: n } = this.pencil.getSize();
|
|
981
|
+
this.resize(e, n);
|
|
933
982
|
}
|
|
934
983
|
}
|
|
935
984
|
animate({
|
|
936
|
-
duration:
|
|
937
|
-
delay:
|
|
985
|
+
duration: t = 1e3,
|
|
986
|
+
delay: e = 0,
|
|
938
987
|
repeat: n = 0,
|
|
939
988
|
lineLoop: s,
|
|
940
|
-
onRepeat:
|
|
989
|
+
onRepeat: r,
|
|
941
990
|
onUpdate: a,
|
|
942
991
|
onComplete: f,
|
|
943
|
-
startShow:
|
|
992
|
+
startShow: i
|
|
944
993
|
} = {}) {
|
|
945
|
-
const { offset: h, offsetLoop:
|
|
946
|
-
if (c.get(this.material) && this.stopAnimation(),
|
|
994
|
+
const { offset: h, offsetLoop: o } = this.material.uniforms, c = this.pencil.userData.debugLine ? bt : Vt;
|
|
995
|
+
if (c.get(this.material) && this.stopAnimation(), t === 0) return;
|
|
947
996
|
const g = s != null ? s : !0;
|
|
948
|
-
h.value.x = 1,
|
|
997
|
+
h.value.x = 1, o.value = g && i ? 1 : 0;
|
|
949
998
|
let u = 0;
|
|
950
|
-
const y = new
|
|
951
|
-
g &&
|
|
999
|
+
const y = new it.Tween(h.value).to({ x: -1 }, t).delay(e).repeat(n).onUpdate(({ x: A }) => {
|
|
1000
|
+
g && A <= 0 && o.value === 0 && (o.value = 1), a == null || a(A);
|
|
952
1001
|
}).onRepeat(() => {
|
|
953
|
-
u += 1,
|
|
1002
|
+
u += 1, r == null || r(u);
|
|
954
1003
|
}).onComplete(() => {
|
|
955
1004
|
f == null || f();
|
|
956
1005
|
}).start();
|
|
957
1006
|
c.set(this.material, y), this.material.addEventListener("dispose", () => {
|
|
958
1007
|
this.stopAnimation();
|
|
959
|
-
}), this.pencil.userData.debugLine && console.log("animate",
|
|
1008
|
+
}), this.pencil.userData.debugLine && console.log("animate", bt.size);
|
|
960
1009
|
}
|
|
961
1010
|
stopAnimation() {
|
|
962
|
-
const
|
|
963
|
-
|
|
1011
|
+
const t = this.pencil.userData.debugLine ? bt : Vt, e = t.get(this.material);
|
|
1012
|
+
e && (e.stop(), it.remove(e), t.delete(this.material), this.material.uniforms.offset.value.x = 0, this.material.uniforms.offsetLoop.value = 1), this.pencil.userData.debugLine && console.log("stopAnimation", bt.size);
|
|
964
1013
|
}
|
|
965
1014
|
render() {
|
|
966
|
-
const { width:
|
|
967
|
-
this.resize(
|
|
1015
|
+
const { width: t, height: e } = this.pencil.getSize();
|
|
1016
|
+
this.resize(t, e);
|
|
968
1017
|
}
|
|
969
1018
|
};
|
|
970
|
-
const
|
|
971
|
-
const { points:
|
|
972
|
-
return new
|
|
1019
|
+
const Nt = (d) => {
|
|
1020
|
+
const { points: t } = d, e = t.reduce((s, r, a) => (a < t.length - 1 && s.push(r, t[a + 1]), s), []);
|
|
1021
|
+
return new lt().setFromPoints(e);
|
|
973
1022
|
};
|
|
974
|
-
class
|
|
975
|
-
constructor(
|
|
976
|
-
super(), this.options =
|
|
1023
|
+
class un extends K {
|
|
1024
|
+
constructor(t = {}) {
|
|
1025
|
+
super(), this.options = X({}, t);
|
|
977
1026
|
}
|
|
978
1027
|
get material() {
|
|
979
|
-
var
|
|
980
|
-
return (
|
|
1028
|
+
var t;
|
|
1029
|
+
return (t = this.object3d) == null ? void 0 : t.material;
|
|
981
1030
|
}
|
|
982
1031
|
create() {
|
|
983
|
-
return
|
|
1032
|
+
return ct(this, null, function* () {
|
|
984
1033
|
const {
|
|
985
|
-
points:
|
|
986
|
-
pointsArr:
|
|
1034
|
+
points: t,
|
|
1035
|
+
pointsArr: e,
|
|
987
1036
|
geometry: n,
|
|
988
1037
|
geometryArr: s,
|
|
989
|
-
material:
|
|
1038
|
+
material: r,
|
|
990
1039
|
useGroups: a,
|
|
991
1040
|
setPointWidth: f,
|
|
992
|
-
lineWidthArr:
|
|
1041
|
+
lineWidthArr: i,
|
|
993
1042
|
materialParameters: h,
|
|
994
|
-
instanceCount:
|
|
1043
|
+
instanceCount: o
|
|
995
1044
|
} = this.options;
|
|
996
|
-
let c =
|
|
997
|
-
!c && h && (c = this.getMaterial(h)), !g &&
|
|
998
|
-
points:
|
|
999
|
-
}) : !g &&
|
|
1000
|
-
|
|
1045
|
+
let c = r, g = n;
|
|
1046
|
+
!c && h && (c = this.getMaterial(h)), !g && t ? g = Nt({
|
|
1047
|
+
points: t
|
|
1048
|
+
}) : !g && e ? g = q(
|
|
1049
|
+
e.map((y) => Nt({
|
|
1001
1050
|
points: y
|
|
1002
1051
|
})),
|
|
1003
1052
|
a != null ? a : 0
|
|
1004
|
-
) : !g && s && s.length > 1 ? g =
|
|
1005
|
-
const u = new
|
|
1006
|
-
new
|
|
1053
|
+
) : !g && s && s.length > 1 ? g = q(s, a != null ? a : 0) : !g && s && s.length === 1 && ([g] = s);
|
|
1054
|
+
const u = new oe().fromLineSegments(
|
|
1055
|
+
new Ft(g)
|
|
1007
1056
|
);
|
|
1008
1057
|
if (this.pencil.options.WebGPUTHREE) {
|
|
1009
|
-
|
|
1010
|
-
const y = new
|
|
1058
|
+
o && (u.instanceCount = o);
|
|
1059
|
+
const y = new ae(u, c);
|
|
1011
1060
|
y.computeLineDistances(), this.object3d = y;
|
|
1012
1061
|
} else {
|
|
1013
|
-
const y = new
|
|
1062
|
+
const y = new Oe(u, c);
|
|
1014
1063
|
y.computeLineDistances(), this.object3d = y;
|
|
1015
1064
|
}
|
|
1016
1065
|
});
|
|
1017
1066
|
}
|
|
1018
|
-
getMaterial(
|
|
1019
|
-
return new
|
|
1020
|
-
color: new
|
|
1021
|
-
},
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
class an extends Z {
|
|
1025
|
-
constructor(e) {
|
|
1026
|
-
super(), this.objectType = "Node", this.onNodePointerIndex = [], this.options = z({
|
|
1027
|
-
type: "2d"
|
|
1028
|
-
}, e);
|
|
1029
|
-
}
|
|
1030
|
-
create() {
|
|
1031
|
-
const { position: e, children: t } = this.options, n = document.createElement("div");
|
|
1032
|
-
this.element = n, t && n.appendChild(t), this.options.type === "3d" ? this.createCSS3DObject(n) : this.options.type === "3dSprite" ? this.createCSS3DSprite(n) : this.createCSS2DObject(n), e && this.object3d.position.copy(e);
|
|
1033
|
-
}
|
|
1034
|
-
setChildren(e) {
|
|
1035
|
-
this.options.children = e, this.element.innerHTML = "", this.element.appendChild(e);
|
|
1036
|
-
}
|
|
1037
|
-
showAndEnsureVisible() {
|
|
1038
|
-
const e = this.options.children;
|
|
1039
|
-
e && (e.style.visibility = "hidden", this.show(), setTimeout(() => {
|
|
1040
|
-
e.style.visibility = "", this.ensureVisible();
|
|
1041
|
-
}));
|
|
1042
|
-
}
|
|
1043
|
-
moveElementToViewport() {
|
|
1044
|
-
const e = this.options.children;
|
|
1045
|
-
if (!e) return;
|
|
1046
|
-
const t = e.getBoundingClientRect(), n = window.innerWidth, s = window.innerHeight;
|
|
1047
|
-
let o = 0, a = 0;
|
|
1048
|
-
t.left < 0 ? o = -t.left : t.right > n && (o = n - t.right), t.top < 0 ? a = -t.top : t.bottom > s && (a = s - t.bottom), t.left + o < 0 && (o = -t.left), t.top + a < 0 && (a = -t.top), (o !== 0 || a !== 0) && (e.style.transform = `translate(${o}px, ${a}px)`);
|
|
1049
|
-
}
|
|
1050
|
-
ensureVisible() {
|
|
1051
|
-
const e = this.options.children;
|
|
1052
|
-
if (!e) return;
|
|
1053
|
-
e.style.transform && (e.style.transform = "");
|
|
1054
|
-
const t = new IntersectionObserver((n) => {
|
|
1055
|
-
n.forEach((s) => {
|
|
1056
|
-
s.isIntersecting && (this.moveElementToViewport(), t.disconnect());
|
|
1057
|
-
});
|
|
1058
|
-
});
|
|
1059
|
-
t.observe(e);
|
|
1060
|
-
}
|
|
1061
|
-
onPointerEvent(e, t) {
|
|
1062
|
-
const n = this.lead.handlePickNode([this], e, t);
|
|
1063
|
-
this.onNodePointerIndex.push(n);
|
|
1064
|
-
}
|
|
1065
|
-
dispose() {
|
|
1066
|
-
this.onNodePointerIndex.forEach((e) => {
|
|
1067
|
-
this.lead.removePickNode(e);
|
|
1068
|
-
}), super.dispose();
|
|
1067
|
+
getMaterial(t) {
|
|
1068
|
+
return new se(X({
|
|
1069
|
+
color: new Yt("#ffffff")
|
|
1070
|
+
}, t));
|
|
1069
1071
|
}
|
|
1070
1072
|
}
|
|
1071
|
-
class
|
|
1072
|
-
constructor(
|
|
1073
|
-
super(), this.options =
|
|
1073
|
+
class fn extends K {
|
|
1074
|
+
constructor(t) {
|
|
1075
|
+
super(), this.options = X({
|
|
1074
1076
|
maxDepth: 10,
|
|
1075
1077
|
percentDepth: !1,
|
|
1076
1078
|
innerRadius: 25,
|
|
1077
1079
|
outRadius: 42,
|
|
1078
1080
|
activeIndex: -1
|
|
1079
|
-
},
|
|
1081
|
+
}, t);
|
|
1080
1082
|
}
|
|
1081
1083
|
create() {
|
|
1082
|
-
return
|
|
1084
|
+
return ct(this, null, function* () {
|
|
1083
1085
|
this.createGroup();
|
|
1084
|
-
const { data:
|
|
1086
|
+
const { data: t, maxDepth: e, colors: n, material: s, percentDepth: r, activeIndex: a } = this.options, f = Math.max(...t), i = t.reduce((o, c) => o + c, 0);
|
|
1085
1087
|
let h = Math.PI / 2;
|
|
1086
|
-
|
|
1087
|
-
if (
|
|
1088
|
-
const g = Math.PI * 2 * (
|
|
1088
|
+
t.forEach((o, c) => {
|
|
1089
|
+
if (o === 0) return;
|
|
1090
|
+
const g = Math.PI * 2 * (o / i), u = n[c], y = r ? e * (o / f) : e, A = this.createGeometry(y, g), w = s ? s.clone() : new Pe({
|
|
1089
1091
|
color: u
|
|
1090
1092
|
});
|
|
1091
|
-
s &&
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1093
|
+
s && w.color.set(u);
|
|
1094
|
+
const v = new kt(A, w);
|
|
1095
|
+
v.userData.depth = y, v.userData.index = c, v.rotateZ(h), h += g, this.add(v);
|
|
1094
1096
|
}), a !== -1 && this.setActive(a);
|
|
1095
1097
|
});
|
|
1096
1098
|
}
|
|
1097
|
-
createGeometry(
|
|
1098
|
-
const { outRadius: n, innerRadius: s } = this.options,
|
|
1099
|
-
return
|
|
1099
|
+
createGeometry(t, e) {
|
|
1100
|
+
const { outRadius: n, innerRadius: s } = this.options, r = new Mt();
|
|
1101
|
+
return r.moveTo(n, 0), r.lineTo(s, 0), r.absarc(0, 0, s, 0, e, !1), r.absarc(0, 0, n, e, 0, !0), new st(r, {
|
|
1100
1102
|
curveSegments: 48,
|
|
1101
|
-
depth:
|
|
1103
|
+
depth: t,
|
|
1102
1104
|
bevelEnabled: !1
|
|
1103
1105
|
});
|
|
1104
1106
|
}
|
|
1105
|
-
handlePick(
|
|
1106
|
-
const { object: n } = this.pencil.pick(
|
|
1107
|
-
return this.setActive(s,
|
|
1107
|
+
handlePick(t, e = 1.3) {
|
|
1108
|
+
const { object: n } = this.pencil.pick(t, this.object3d.children) || {}, s = n ? this.object3d.children.findIndex((r) => r === n) : this.options.activeIndex;
|
|
1109
|
+
return this.setActive(s, e);
|
|
1108
1110
|
}
|
|
1109
|
-
setActive(
|
|
1110
|
-
const n = this.object3d.children[
|
|
1111
|
+
setActive(t, e = 1.3) {
|
|
1112
|
+
const n = this.object3d.children[t];
|
|
1111
1113
|
if (this.object3d.children.forEach((s) => {
|
|
1112
1114
|
if (!(n && n === s) && s.scale.z !== 1) {
|
|
1113
1115
|
if (s.userData.levTween) return;
|
|
1114
1116
|
s.userData.enTween && (s.userData.enTween.stop(), s.userData.enTween = null);
|
|
1115
|
-
const
|
|
1116
|
-
s.userData.levTween =
|
|
1117
|
+
const r = new it.Tween(s.scale).to({ z: 1 }, 100);
|
|
1118
|
+
s.userData.levTween = r, r.start();
|
|
1117
1119
|
}
|
|
1118
1120
|
}), n) {
|
|
1119
1121
|
if (n.userData.enTween)
|
|
1120
1122
|
return;
|
|
1121
1123
|
n.userData.levTween && (n.userData.levTween.stop(), n.userData.levTween = null);
|
|
1122
|
-
const s = new
|
|
1124
|
+
const s = new it.Tween(n.scale).to({ z: e }, 100);
|
|
1123
1125
|
return n.userData.enTween = s, s.start(), n.userData.index;
|
|
1124
1126
|
}
|
|
1125
1127
|
return -1;
|
|
1126
1128
|
}
|
|
1127
1129
|
render() {
|
|
1128
|
-
this.object3d.scale.z = 0, new
|
|
1130
|
+
this.object3d.scale.z = 0, new it.Tween(this.object3d.scale).to({ z: 1 }, 1e3).easing(it.Easing.Sinusoidal.InOut).start();
|
|
1129
1131
|
}
|
|
1130
1132
|
}
|
|
1131
1133
|
export {
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
un as
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1134
|
+
en as ConicPolygon,
|
|
1135
|
+
nn as Ellipsoid,
|
|
1136
|
+
sn as ExtrudePolygon,
|
|
1137
|
+
rn as Group,
|
|
1138
|
+
an as Light,
|
|
1139
|
+
ln as Line,
|
|
1140
|
+
un as Line2,
|
|
1141
|
+
pn as Line2Material,
|
|
1142
|
+
yn as LineSegmentsGeometry,
|
|
1143
|
+
Ve as MeshLineGeometry,
|
|
1144
|
+
re as MeshLineMaterial,
|
|
1145
|
+
cn as MeshLineRaycast,
|
|
1146
|
+
xn as Node,
|
|
1147
|
+
fn as Pie,
|
|
1148
|
+
ie as getConicPolygonGeometry,
|
|
1149
|
+
wn as getConicPolygonGeometryMetas,
|
|
1150
|
+
on as getSplitTexture
|
|
1148
1151
|
};
|