gl-draw 0.17.0-beta.40 → 0.17.0-beta.42
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/{objects/node → core/CSSRenderer}/CollisionManager.d.ts +6 -3
- package/dist/core/CSSRenderer/index.d.ts +18 -6
- package/dist/core/Pencil.d.ts +16 -2
- package/dist/index.js +2 -2
- package/dist/index.module.js +525 -345
- package/dist/index.module2.js +72 -56
- package/dist/index2.js +3 -3
- package/dist/objects/index.d.ts +0 -1
- package/dist/objects/index.js +1 -1
- package/dist/objects/index.module.js +583 -724
- package/dist/objects/node/index.d.ts +9 -3
- package/package.json +1 -1
|
@@ -1,471 +1,471 @@
|
|
|
1
1
|
var te = Object.defineProperty, ee = Object.defineProperties;
|
|
2
|
-
var
|
|
2
|
+
var ne = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var pt = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
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
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
Ot.call(t, e) && Rt(d, e, t[e]);
|
|
8
8
|
if (pt)
|
|
9
9
|
for (var e of pt(t))
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, gt = (
|
|
13
|
-
var
|
|
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
14
|
var e = {};
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var
|
|
19
|
-
t.indexOf(
|
|
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
20
|
return e;
|
|
21
21
|
};
|
|
22
|
-
var ct = (
|
|
23
|
-
var r = (
|
|
22
|
+
var ct = (d, t, e) => new Promise((n, s) => {
|
|
23
|
+
var r = (i) => {
|
|
24
24
|
try {
|
|
25
|
-
|
|
25
|
+
f(e.next(i));
|
|
26
26
|
} catch (h) {
|
|
27
|
-
|
|
27
|
+
s(h);
|
|
28
28
|
}
|
|
29
|
-
}, a = (
|
|
29
|
+
}, a = (i) => {
|
|
30
30
|
try {
|
|
31
|
-
|
|
31
|
+
f(e.throw(i));
|
|
32
32
|
} catch (h) {
|
|
33
|
-
|
|
33
|
+
s(h);
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
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 { N as
|
|
44
|
-
import { BufferGeometry as lt, Float32BufferAttribute as rt, MeshStandardMaterial as ce, Mesh as kt, Vector3 as
|
|
45
|
-
import { mergeAttributes as
|
|
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
46
|
import { W as vt } from "../cartographicToCartesian.module.js";
|
|
47
|
-
import { g as
|
|
48
|
-
import { Brush as
|
|
49
|
-
import { RectAreaLightUniformsLib as
|
|
50
|
-
import * as
|
|
51
|
-
import { LineSegments2 as
|
|
52
|
-
function
|
|
53
|
-
const e =
|
|
54
|
-
Object.keys(
|
|
55
|
-
), r = {}, a = {},
|
|
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();
|
|
56
56
|
let h = 0;
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
57
|
+
for (let o = 0; o < d.length; ++o) {
|
|
58
|
+
const c = d[o];
|
|
59
59
|
let g = 0;
|
|
60
|
-
if (e !== (
|
|
60
|
+
if (e !== (c.index !== null))
|
|
61
61
|
return console.error(
|
|
62
|
-
"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."
|
|
63
63
|
), null;
|
|
64
|
-
for (const
|
|
65
|
-
if (!
|
|
64
|
+
for (const u in c.attributes) {
|
|
65
|
+
if (!n.has(u))
|
|
66
66
|
return console.error(
|
|
67
|
-
"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.'
|
|
68
68
|
), null;
|
|
69
|
-
r[
|
|
69
|
+
r[u] === void 0 && (r[u] = []), r[u].push(c.attributes[u]), g++;
|
|
70
70
|
}
|
|
71
|
-
if (g !==
|
|
71
|
+
if (g !== n.size)
|
|
72
72
|
return console.error(
|
|
73
|
-
"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."
|
|
74
74
|
), null;
|
|
75
|
-
if (
|
|
75
|
+
if (f !== c.morphTargetsRelative)
|
|
76
76
|
return console.error(
|
|
77
|
-
"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."
|
|
78
78
|
), null;
|
|
79
|
-
for (const
|
|
80
|
-
if (!
|
|
79
|
+
for (const u in c.morphAttributes) {
|
|
80
|
+
if (!s.has(u))
|
|
81
81
|
return console.error(
|
|
82
|
-
"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."
|
|
83
83
|
), null;
|
|
84
|
-
a[
|
|
84
|
+
a[u] === void 0 && (a[u] = []), a[u].push(c.morphAttributes[u]);
|
|
85
85
|
}
|
|
86
86
|
if (t) {
|
|
87
|
-
let
|
|
87
|
+
let u;
|
|
88
88
|
if (e)
|
|
89
|
-
|
|
90
|
-
else if (
|
|
91
|
-
|
|
89
|
+
u = c.index.count;
|
|
90
|
+
else if (c.attributes.position !== void 0)
|
|
91
|
+
u = c.attributes.position.count;
|
|
92
92
|
else
|
|
93
93
|
return console.error(
|
|
94
|
-
"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"
|
|
95
95
|
), null;
|
|
96
96
|
if (t === 1)
|
|
97
|
-
|
|
98
|
-
else if (t === 2 &&
|
|
99
|
-
for (let y of
|
|
97
|
+
i.addGroup(h, u, o);
|
|
98
|
+
else if (t === 2 && c.groups.length > 0)
|
|
99
|
+
for (let y of c.groups) {
|
|
100
100
|
let A = y.materialIndex;
|
|
101
|
-
|
|
101
|
+
i.addGroup(
|
|
102
102
|
h + y.start,
|
|
103
|
-
Math.min(y.count,
|
|
103
|
+
Math.min(y.count, u),
|
|
104
104
|
A
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
|
-
h +=
|
|
107
|
+
h += u;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
if (e) {
|
|
111
|
-
let
|
|
112
|
-
const
|
|
113
|
-
for (let g = 0; g <
|
|
114
|
-
const
|
|
115
|
-
for (let y = 0; y <
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
let o = 0;
|
|
112
|
+
const c = [];
|
|
113
|
+
for (let g = 0; g < d.length; ++g) {
|
|
114
|
+
const u = d[g].index;
|
|
115
|
+
for (let y = 0; y < u.count; ++y)
|
|
116
|
+
c.push(u.getX(y) + o);
|
|
117
|
+
o += d[g].attributes.position.count;
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
i.setIndex(c);
|
|
120
120
|
}
|
|
121
|
-
for (const
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
121
|
+
for (const o in r) {
|
|
122
|
+
const c = Dt(r[o]);
|
|
123
|
+
if (!c)
|
|
124
124
|
return console.error(
|
|
125
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " +
|
|
125
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " attribute."
|
|
126
126
|
), null;
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
for (const
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
for (let g = 0; g <
|
|
134
|
-
const
|
|
135
|
-
for (let A = 0; A < a[
|
|
136
|
-
|
|
137
|
-
const y =
|
|
127
|
+
i.setAttribute(o, c);
|
|
128
|
+
}
|
|
129
|
+
for (const o in a) {
|
|
130
|
+
const c = a[o][0].length;
|
|
131
|
+
if (c === 0) break;
|
|
132
|
+
i.morphAttributes = i.morphAttributes || {}, i.morphAttributes[o] = [];
|
|
133
|
+
for (let g = 0; g < c; ++g) {
|
|
134
|
+
const u = [];
|
|
135
|
+
for (let A = 0; A < a[o].length; ++A)
|
|
136
|
+
u.push(a[o][A][g]);
|
|
137
|
+
const y = Dt(u);
|
|
138
138
|
if (!y)
|
|
139
139
|
return console.error(
|
|
140
|
-
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " +
|
|
140
|
+
"THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " morphAttribute."
|
|
141
141
|
), null;
|
|
142
|
-
|
|
142
|
+
i.morphAttributes[o].push(y);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
return t === 2 ?
|
|
145
|
+
return t === 2 ? ze(i) : i;
|
|
146
146
|
}
|
|
147
|
-
const
|
|
148
|
-
const
|
|
147
|
+
const Wt = (d) => {
|
|
148
|
+
const f = d, { coordinate: t, startHeight: e, height: n } = f, s = wt(f, ["coordinate", "startHeight", "height"]);
|
|
149
149
|
let r = e || 0;
|
|
150
|
-
return typeof e != "undefined" && typeof
|
|
150
|
+
return typeof e != "undefined" && typeof n != "undefined" && (r = e + n), new ie([t], gt(X({}, s), {
|
|
151
151
|
startHeight: e,
|
|
152
152
|
endHeight: r
|
|
153
153
|
}));
|
|
154
154
|
};
|
|
155
|
-
class
|
|
155
|
+
class en extends K {
|
|
156
156
|
constructor(t) {
|
|
157
|
-
super(), this.options =
|
|
157
|
+
super(), this.options = X({}, t);
|
|
158
158
|
}
|
|
159
159
|
create() {
|
|
160
|
-
const
|
|
160
|
+
const i = this.options, {
|
|
161
161
|
geometry: t,
|
|
162
162
|
coordinateArr: e,
|
|
163
|
-
coordinate:
|
|
164
|
-
material:
|
|
163
|
+
coordinate: n,
|
|
164
|
+
material: s,
|
|
165
165
|
useGroups: r
|
|
166
|
-
} =
|
|
166
|
+
} = i, a = wt(i, [
|
|
167
167
|
"geometry",
|
|
168
168
|
"coordinateArr",
|
|
169
169
|
"coordinate",
|
|
170
170
|
"material",
|
|
171
171
|
"useGroups"
|
|
172
172
|
]);
|
|
173
|
-
let
|
|
174
|
-
if (!
|
|
175
|
-
|
|
176
|
-
coordinate:
|
|
173
|
+
let f = t;
|
|
174
|
+
if (!f && n)
|
|
175
|
+
f = Wt(X({
|
|
176
|
+
coordinate: n
|
|
177
177
|
}, a));
|
|
178
|
-
else if (!
|
|
178
|
+
else if (!f && e) {
|
|
179
179
|
const h = e.map(
|
|
180
|
-
(
|
|
181
|
-
coordinate:
|
|
180
|
+
(o) => Wt(X({
|
|
181
|
+
coordinate: o
|
|
182
182
|
}, a))
|
|
183
183
|
);
|
|
184
|
-
|
|
184
|
+
f = q(h, r != null ? r : 0);
|
|
185
185
|
}
|
|
186
|
-
this.createMesh(
|
|
186
|
+
this.createMesh(f, s);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Ue(d = {}) {
|
|
190
190
|
const {
|
|
191
191
|
a: t = vt.a,
|
|
192
192
|
b: e = vt.b,
|
|
193
|
-
scaleFactor:
|
|
194
|
-
widthSegments:
|
|
193
|
+
scaleFactor: n = 1 / vt.a,
|
|
194
|
+
widthSegments: s = 64,
|
|
195
195
|
heightSegments: r = 32
|
|
196
|
-
} =
|
|
196
|
+
} = d, a = new lt(), f = [], i = [], h = [], o = [], c = t * t, g = e * e, u = (c - g) / c;
|
|
197
197
|
let y = 0;
|
|
198
198
|
const A = [];
|
|
199
|
-
for (let
|
|
200
|
-
const v = [], E =
|
|
201
|
-
for (let
|
|
202
|
-
const $ =
|
|
203
|
-
|
|
204
|
-
const tt =
|
|
205
|
-
h.push(tt / D,
|
|
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
206
|
}
|
|
207
207
|
A.push(v);
|
|
208
208
|
}
|
|
209
|
-
for (let
|
|
210
|
-
for (let v = 0; v <
|
|
211
|
-
const E = A[
|
|
212
|
-
|
|
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
213
|
}
|
|
214
|
-
return a.setIndex(
|
|
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
215
|
}
|
|
216
|
-
class
|
|
216
|
+
class nn extends K {
|
|
217
217
|
constructor(t = {}) {
|
|
218
218
|
super(), this.options = t;
|
|
219
219
|
}
|
|
220
220
|
create() {
|
|
221
|
-
const t =
|
|
221
|
+
const t = Ue(this.options), e = this.options.material || new ce({
|
|
222
222
|
color: 2200782,
|
|
223
223
|
metalness: 0.1,
|
|
224
224
|
roughness: 0.7,
|
|
225
225
|
wireframe: !1
|
|
226
|
-
}),
|
|
227
|
-
return
|
|
226
|
+
}), n = new kt(t, e);
|
|
227
|
+
return n.name = "Ellipsoid", this.object3d = n, n;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
const
|
|
230
|
+
const De = {
|
|
231
231
|
ArcCurve: le,
|
|
232
232
|
CatmullRomCurve3: he,
|
|
233
233
|
CubicBezierCurve: ue,
|
|
234
|
-
CubicBezierCurve3:
|
|
235
|
-
EllipseCurve:
|
|
234
|
+
CubicBezierCurve3: fe,
|
|
235
|
+
EllipseCurve: de,
|
|
236
236
|
LineCurve: me,
|
|
237
237
|
LineCurve3: pe,
|
|
238
238
|
QuadraticBezierCurve: ge,
|
|
239
239
|
QuadraticBezierCurve3: ye,
|
|
240
240
|
SplineCurve: be
|
|
241
241
|
};
|
|
242
|
-
class
|
|
242
|
+
class st extends lt {
|
|
243
243
|
/**
|
|
244
244
|
* Constructs a new extrude geometry.
|
|
245
245
|
*
|
|
246
246
|
* @param {Shape|Array<Shape>} [shapes] - A shape or an array of shapes.
|
|
247
247
|
* @param {ExtrudeGeometry~Options} [options] - The extrude settings.
|
|
248
248
|
*/
|
|
249
|
-
constructor(t = new
|
|
250
|
-
new
|
|
251
|
-
new
|
|
252
|
-
new
|
|
253
|
-
new
|
|
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
254
|
]), e = {}) {
|
|
255
255
|
super(), this.type = "ExtrudeGeometry", this.parameters = {
|
|
256
256
|
shapes: t,
|
|
257
257
|
options: e
|
|
258
258
|
}, t = Array.isArray(t) ? t : [t];
|
|
259
|
-
const
|
|
260
|
-
for (let
|
|
261
|
-
const h = t[
|
|
259
|
+
const n = this, s = [], r = [];
|
|
260
|
+
for (let f = 0, i = t.length; f < i; f++) {
|
|
261
|
+
const h = t[f];
|
|
262
262
|
a(h);
|
|
263
263
|
}
|
|
264
|
-
this.setAttribute("position", new rt(
|
|
265
|
-
function a(
|
|
266
|
-
var Et,
|
|
267
|
-
const
|
|
268
|
-
let g = e.bevelEnabled !== void 0 ? e.bevelEnabled : !0,
|
|
269
|
-
const v = e.extrudePath, E = e.UVGenerator !== void 0 ? e.UVGenerator :
|
|
270
|
-
let
|
|
271
|
-
v && (
|
|
272
|
-
const at =
|
|
264
|
+
this.setAttribute("position", new rt(s, 3)), this.setAttribute("uv", new rt(r, 2)), this.computeVertexNormals();
|
|
265
|
+
function a(f) {
|
|
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
273
|
let I = at.shape;
|
|
274
|
-
const
|
|
274
|
+
const B = at.holes;
|
|
275
275
|
if (!yt.isClockWise(I)) {
|
|
276
276
|
I = I.reverse();
|
|
277
|
-
for (let
|
|
278
|
-
const p =
|
|
279
|
-
yt.isClockWise(p) && (
|
|
277
|
+
for (let l = 0, m = B.length; l < m; l++) {
|
|
278
|
+
const p = B[l];
|
|
279
|
+
yt.isClockWise(p) && (B[l] = p.reverse());
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
function ht(
|
|
282
|
+
function ht(l) {
|
|
283
283
|
const p = 10000000000000001e-36;
|
|
284
|
-
let
|
|
285
|
-
for (let b = 1; b <=
|
|
286
|
-
const L = b %
|
|
287
|
-
Math.abs(
|
|
288
|
-
Math.abs(
|
|
289
|
-
Math.abs(
|
|
290
|
-
Math.abs(
|
|
291
|
-
),
|
|
292
|
-
if (
|
|
293
|
-
|
|
284
|
+
let x = l[0];
|
|
285
|
+
for (let b = 1; b <= l.length; b++) {
|
|
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),
|
|
289
|
+
Math.abs(x.x),
|
|
290
|
+
Math.abs(x.y)
|
|
291
|
+
), nt = p * H * H;
|
|
292
|
+
if (_ <= nt) {
|
|
293
|
+
l.splice(L, 1), b--;
|
|
294
294
|
continue;
|
|
295
295
|
}
|
|
296
|
-
|
|
296
|
+
x = M;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
ht(I),
|
|
300
|
-
const tt =
|
|
301
|
-
for (let
|
|
302
|
-
const m =
|
|
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
303
|
I = I.concat(m);
|
|
304
304
|
}
|
|
305
|
-
function k(
|
|
306
|
-
return m || error("ExtrudeGeometry: vec does not exist"),
|
|
305
|
+
function k(l, m, p) {
|
|
306
|
+
return m || error("ExtrudeGeometry: vec does not exist"), l.clone().addScaledVector(m, p);
|
|
307
307
|
}
|
|
308
308
|
const D = I.length;
|
|
309
|
-
function Lt(
|
|
310
|
-
let
|
|
311
|
-
const
|
|
312
|
-
if (Math.abs(
|
|
313
|
-
const W = Math.sqrt(H),
|
|
314
|
-
|
|
315
|
-
),
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
319
|
-
return new
|
|
320
|
-
L = Math.sqrt(
|
|
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);
|
|
321
321
|
} else {
|
|
322
322
|
let W = !1;
|
|
323
|
-
|
|
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));
|
|
324
324
|
}
|
|
325
|
-
return new
|
|
325
|
+
return new z(x / L, b / L);
|
|
326
326
|
}
|
|
327
327
|
const ut = [];
|
|
328
|
-
for (let
|
|
329
|
-
p === m && (p = 0),
|
|
330
|
-
const
|
|
331
|
-
let J,
|
|
332
|
-
for (let
|
|
333
|
-
const p =
|
|
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
334
|
J = [];
|
|
335
|
-
for (let
|
|
336
|
-
L === b && (L = 0),
|
|
337
|
-
|
|
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);
|
|
338
338
|
}
|
|
339
339
|
let et;
|
|
340
|
-
if (
|
|
341
|
-
et = yt.triangulateShape(
|
|
340
|
+
if (w === 0)
|
|
341
|
+
et = yt.triangulateShape(R, B);
|
|
342
342
|
else {
|
|
343
|
-
const
|
|
344
|
-
for (let p = 0; p <
|
|
345
|
-
const
|
|
346
|
-
for (let
|
|
347
|
-
const
|
|
348
|
-
|
|
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);
|
|
349
349
|
}
|
|
350
|
-
for (let
|
|
351
|
-
const
|
|
352
|
-
J =
|
|
353
|
-
const
|
|
354
|
-
for (let H = 0,
|
|
355
|
-
const W = k(
|
|
356
|
-
|
|
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);
|
|
357
357
|
}
|
|
358
|
-
|
|
358
|
+
x === 0 && m.push(_);
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
et = yt.triangulateShape(
|
|
362
|
-
|
|
362
|
+
l,
|
|
363
363
|
m
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
for (let
|
|
368
|
-
const m = g ? k(I[
|
|
369
|
-
|
|
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);
|
|
370
370
|
}
|
|
371
|
-
for (let
|
|
371
|
+
for (let l = 1; l <= o; l++)
|
|
372
372
|
for (let m = 0; m < D; m++) {
|
|
373
|
-
const p = g ? k(I[m],
|
|
374
|
-
|
|
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);
|
|
375
375
|
}
|
|
376
|
-
for (let
|
|
377
|
-
const m =
|
|
378
|
-
for (let b = 0, L =
|
|
379
|
-
const
|
|
380
|
-
|
|
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);
|
|
381
381
|
}
|
|
382
|
-
for (let b = 0, L =
|
|
383
|
-
const
|
|
384
|
-
J =
|
|
385
|
-
for (let T = 0,
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
) :
|
|
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);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
Zt(),
|
|
395
|
+
Zt(), O && $t();
|
|
396
396
|
function Zt() {
|
|
397
|
-
const
|
|
397
|
+
const l = s.length / 3;
|
|
398
398
|
if (g) {
|
|
399
399
|
let m = 0, p = D * m;
|
|
400
|
-
if (
|
|
401
|
-
for (let
|
|
402
|
-
const b = et[
|
|
400
|
+
if (P)
|
|
401
|
+
for (let x = 0; x < dt; x++) {
|
|
402
|
+
const b = et[x];
|
|
403
403
|
mt(b[2] + p, b[1] + p, b[0] + p);
|
|
404
404
|
}
|
|
405
|
-
if (m =
|
|
406
|
-
for (let
|
|
407
|
-
const b = et[
|
|
405
|
+
if (m = o + w * 2, p = D * m, S)
|
|
406
|
+
for (let x = 0; x < dt; x++) {
|
|
407
|
+
const b = et[x];
|
|
408
408
|
mt(b[0] + p, b[1] + p, b[2] + p);
|
|
409
409
|
}
|
|
410
410
|
} else {
|
|
411
|
-
if (
|
|
412
|
-
for (let m = 0; m <
|
|
411
|
+
if (P)
|
|
412
|
+
for (let m = 0; m < dt; m++) {
|
|
413
413
|
const p = et[m];
|
|
414
414
|
mt(p[2], p[1], p[0]);
|
|
415
415
|
}
|
|
416
|
-
if (
|
|
417
|
-
for (let m = 0; m <
|
|
416
|
+
if (S)
|
|
417
|
+
for (let m = 0; m < dt; m++) {
|
|
418
418
|
const p = et[m];
|
|
419
419
|
mt(
|
|
420
|
-
p[0] + D *
|
|
421
|
-
p[1] + D *
|
|
422
|
-
p[2] + D *
|
|
420
|
+
p[0] + D * o,
|
|
421
|
+
p[1] + D * o,
|
|
422
|
+
p[2] + D * o
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
|
|
426
|
+
n.addGroup(l, s.length / 3 - l, 0);
|
|
427
427
|
}
|
|
428
428
|
function $t() {
|
|
429
|
-
const
|
|
429
|
+
const l = s.length / 3;
|
|
430
430
|
let m = 0;
|
|
431
|
-
|
|
432
|
-
for (let p = 0,
|
|
433
|
-
const b =
|
|
434
|
-
|
|
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;
|
|
435
435
|
}
|
|
436
|
-
|
|
436
|
+
n.addGroup(l, s.length / 3 - l, 1);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
let p =
|
|
438
|
+
function Gt(l, m) {
|
|
439
|
+
let p = l.length;
|
|
440
440
|
for (; --p >= 0; ) {
|
|
441
|
-
const
|
|
441
|
+
const x = p;
|
|
442
442
|
let b = p - 1;
|
|
443
|
-
b < 0 && (b =
|
|
444
|
-
for (let L = 0,
|
|
445
|
-
const T = D * L,
|
|
446
|
-
Jt(
|
|
443
|
+
b < 0 && (b = l.length - 1);
|
|
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);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
|
|
450
|
+
function F(l, m, p) {
|
|
451
|
+
i.push(l), i.push(m), i.push(p);
|
|
452
452
|
}
|
|
453
|
-
function mt(
|
|
454
|
-
Y(
|
|
455
|
-
const
|
|
456
|
-
s,
|
|
453
|
+
function mt(l, m, p) {
|
|
454
|
+
Y(l), Y(m), Y(p);
|
|
455
|
+
const x = s.length / 3, b = E.generateTopUV(
|
|
457
456
|
n,
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
457
|
+
s,
|
|
458
|
+
x - 3,
|
|
459
|
+
x - 2,
|
|
460
|
+
x - 1
|
|
461
461
|
);
|
|
462
462
|
Z(b[0]), Z(b[1]), Z(b[2]);
|
|
463
463
|
}
|
|
464
|
-
function Jt(
|
|
465
|
-
Y(
|
|
466
|
-
const b =
|
|
467
|
-
s,
|
|
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(
|
|
468
467
|
n,
|
|
468
|
+
s,
|
|
469
469
|
b - 6,
|
|
470
470
|
b - 3,
|
|
471
471
|
b - 2,
|
|
@@ -473,11 +473,11 @@ class nt extends lt {
|
|
|
473
473
|
);
|
|
474
474
|
Z(L[0]), Z(L[1]), Z(L[3]), Z(L[1]), Z(L[2]), Z(L[3]);
|
|
475
475
|
}
|
|
476
|
-
function Y(
|
|
477
|
-
|
|
476
|
+
function Y(l) {
|
|
477
|
+
s.push(i[l * 3 + 0]), s.push(i[l * 3 + 1]), s.push(i[l * 3 + 2]);
|
|
478
478
|
}
|
|
479
|
-
function Z(
|
|
480
|
-
r.push(
|
|
479
|
+
function Z(l) {
|
|
480
|
+
r.push(l.x), r.push(l.y);
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
}
|
|
@@ -485,8 +485,8 @@ class nt extends lt {
|
|
|
485
485
|
return super.copy(t), this.parameters = Object.assign({}, t.parameters), this;
|
|
486
486
|
}
|
|
487
487
|
toJSON() {
|
|
488
|
-
const t = super.toJSON(), e = this.parameters.shapes,
|
|
489
|
-
return
|
|
488
|
+
const t = super.toJSON(), e = this.parameters.shapes, n = this.parameters.options;
|
|
489
|
+
return We(e, n, t);
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
492
|
* Factory method for creating an instance of this class from the given
|
|
@@ -497,142 +497,142 @@ class nt extends lt {
|
|
|
497
497
|
* @return {ExtrudeGeometry} A new instance.
|
|
498
498
|
*/
|
|
499
499
|
static fromJSON(t, e) {
|
|
500
|
-
const
|
|
500
|
+
const n = [];
|
|
501
501
|
for (let r = 0, a = t.shapes.length; r < a; r++) {
|
|
502
|
-
const
|
|
503
|
-
|
|
502
|
+
const f = e[t.shapes[r]];
|
|
503
|
+
n.push(f);
|
|
504
504
|
}
|
|
505
|
-
const
|
|
506
|
-
return
|
|
507
|
-
|
|
508
|
-
)), new
|
|
505
|
+
const s = t.options.extrudePath;
|
|
506
|
+
return s !== void 0 && (t.options.extrudePath = new De[s.type]().fromJSON(
|
|
507
|
+
s
|
|
508
|
+
)), new st(n, t.options);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
const
|
|
512
|
-
generateTopUV: function(
|
|
513
|
-
const r = t[e * 3], a = t[e * 3 + 1],
|
|
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];
|
|
514
514
|
return [
|
|
515
|
-
new
|
|
516
|
-
new
|
|
517
|
-
new
|
|
515
|
+
new z(r, a),
|
|
516
|
+
new z(f, i),
|
|
517
|
+
new z(h, o)
|
|
518
518
|
];
|
|
519
519
|
},
|
|
520
|
-
generateSideWallUV: function(
|
|
521
|
-
const a = t[e * 3],
|
|
522
|
-
return Math.abs(
|
|
523
|
-
new
|
|
524
|
-
new
|
|
525
|
-
new
|
|
526
|
-
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)
|
|
527
527
|
] : [
|
|
528
|
-
new
|
|
529
|
-
new
|
|
530
|
-
new
|
|
531
|
-
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)
|
|
532
532
|
];
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
|
-
function
|
|
536
|
-
if (e.shapes = [], Array.isArray(
|
|
537
|
-
for (let
|
|
538
|
-
const r =
|
|
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
539
|
e.shapes.push(r.uuid);
|
|
540
540
|
}
|
|
541
541
|
else
|
|
542
|
-
e.shapes.push(
|
|
542
|
+
e.shapes.push(d.uuid);
|
|
543
543
|
return e.options = Object.assign({}, t), t.extrudePath !== void 0 && (e.options.extrudePath = t.extrudePath.toJSON()), e;
|
|
544
544
|
}
|
|
545
|
-
class
|
|
545
|
+
class Xe extends st {
|
|
546
546
|
constructor(t, e) {
|
|
547
547
|
super(t, e);
|
|
548
|
-
const
|
|
549
|
-
new
|
|
548
|
+
const n = new Ht(
|
|
549
|
+
new st(t, gt(X({}, e), {
|
|
550
550
|
hasTop: !0,
|
|
551
551
|
hasSide: !0,
|
|
552
552
|
hasBottom: !1
|
|
553
553
|
}))
|
|
554
554
|
);
|
|
555
|
-
|
|
556
|
-
const
|
|
557
|
-
|
|
558
|
-
const a = new
|
|
559
|
-
|
|
560
|
-
|
|
555
|
+
n.updateMatrixWorld();
|
|
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,
|
|
561
561
|
0
|
|
562
562
|
);
|
|
563
|
-
let
|
|
564
|
-
if (
|
|
565
|
-
|
|
566
|
-
const v = new
|
|
567
|
-
|
|
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
568
|
const E = Math.max(
|
|
569
569
|
r.x / v.x,
|
|
570
570
|
r.y / v.y
|
|
571
571
|
);
|
|
572
|
-
|
|
572
|
+
f = Math.ceil(e.topSegments * E);
|
|
573
573
|
}
|
|
574
|
-
if (
|
|
574
|
+
if (f < 4)
|
|
575
575
|
return this;
|
|
576
|
-
const h = new
|
|
576
|
+
const h = new we(
|
|
577
577
|
r.x,
|
|
578
578
|
r.y,
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
),
|
|
582
|
-
|
|
583
|
-
const g = new Ie().evaluate(
|
|
584
|
-
|
|
579
|
+
f,
|
|
580
|
+
f
|
|
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(
|
|
584
|
+
u.count * 2,
|
|
585
585
|
2
|
|
586
586
|
);
|
|
587
|
-
for (let v = 0; v <
|
|
588
|
-
const E =
|
|
589
|
-
|
|
587
|
+
for (let v = 0; v < u.count; v++) {
|
|
588
|
+
const E = u.getZ(v);
|
|
589
|
+
u.setZ(v, e.depth + E);
|
|
590
590
|
}
|
|
591
|
-
if (
|
|
592
|
-
const v =
|
|
593
|
-
for (let
|
|
594
|
-
const
|
|
595
|
-
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);
|
|
596
596
|
}
|
|
597
597
|
g.geometry.setAttribute("uv", y);
|
|
598
598
|
}
|
|
599
|
-
|
|
600
|
-
const A = new
|
|
599
|
+
u.needsUpdate = !0;
|
|
600
|
+
const A = new st(t, gt(X({}, e), {
|
|
601
601
|
hasTop: !1
|
|
602
|
-
})),
|
|
603
|
-
this.copy(
|
|
602
|
+
})), w = q([g.geometry, A], 2);
|
|
603
|
+
this.copy(w.toNonIndexed());
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
const
|
|
606
|
+
const Xt = (d) => {
|
|
607
607
|
const {
|
|
608
608
|
split: t,
|
|
609
609
|
depth: e,
|
|
610
|
-
points:
|
|
611
|
-
box3:
|
|
610
|
+
points: n,
|
|
611
|
+
box3: s,
|
|
612
612
|
hasTop: r,
|
|
613
613
|
hasBottom: a,
|
|
614
|
-
hasSide:
|
|
615
|
-
sideRepeat:
|
|
614
|
+
hasSide: f,
|
|
615
|
+
sideRepeat: i,
|
|
616
616
|
topSegments: h
|
|
617
|
-
} =
|
|
617
|
+
} = d, o = h ? Xe : st, c = new o(new Mt(n), {
|
|
618
618
|
depth: e,
|
|
619
619
|
bevelEnabled: !1,
|
|
620
|
-
box3:
|
|
621
|
-
UVGenerator:
|
|
620
|
+
box3: s,
|
|
621
|
+
UVGenerator: je({
|
|
622
622
|
split: t,
|
|
623
|
-
box3:
|
|
624
|
-
sideRepeat:
|
|
623
|
+
box3: s,
|
|
624
|
+
sideRepeat: i
|
|
625
625
|
}),
|
|
626
626
|
hasTop: r,
|
|
627
627
|
hasBottom: a,
|
|
628
|
-
hasSide:
|
|
628
|
+
hasSide: f,
|
|
629
629
|
topSegments: h
|
|
630
630
|
});
|
|
631
|
-
return
|
|
631
|
+
return Ce(), c;
|
|
632
632
|
};
|
|
633
|
-
class
|
|
633
|
+
class sn extends K {
|
|
634
634
|
constructor(t) {
|
|
635
|
-
super(), this.options =
|
|
635
|
+
super(), this.options = X({
|
|
636
636
|
depth: 1
|
|
637
637
|
}, t);
|
|
638
638
|
}
|
|
@@ -641,81 +641,81 @@ class ns extends K {
|
|
|
641
641
|
const {
|
|
642
642
|
points: t,
|
|
643
643
|
pointsArr: e,
|
|
644
|
-
useGroups:
|
|
645
|
-
depth:
|
|
644
|
+
useGroups: n,
|
|
645
|
+
depth: s,
|
|
646
646
|
geometry: r,
|
|
647
647
|
geometryArr: a,
|
|
648
|
-
material:
|
|
649
|
-
box3:
|
|
648
|
+
material: f,
|
|
649
|
+
box3: i,
|
|
650
650
|
split: h,
|
|
651
|
-
hasTop:
|
|
652
|
-
hasBottom:
|
|
651
|
+
hasTop: o,
|
|
652
|
+
hasBottom: c,
|
|
653
653
|
hasSide: g
|
|
654
|
-
} = this.options,
|
|
655
|
-
let
|
|
656
|
-
A || console.log("material is null"), !
|
|
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
657
|
points: t,
|
|
658
|
-
depth:
|
|
658
|
+
depth: u[0],
|
|
659
659
|
box3: y[0],
|
|
660
660
|
split: h,
|
|
661
|
-
hasTop:
|
|
662
|
-
hasBottom:
|
|
661
|
+
hasTop: o,
|
|
662
|
+
hasBottom: c,
|
|
663
663
|
hasSide: g
|
|
664
|
-
}) : !
|
|
664
|
+
}) : !w && e ? w = q(
|
|
665
665
|
e.map(
|
|
666
666
|
(v, E) => {
|
|
667
|
-
var
|
|
668
|
-
return
|
|
667
|
+
var S, P;
|
|
668
|
+
return Xt({
|
|
669
669
|
points: v,
|
|
670
|
-
depth: (
|
|
671
|
-
box3: (
|
|
670
|
+
depth: (S = u[E]) != null ? S : u[0],
|
|
671
|
+
box3: (P = y[E]) != null ? P : y[0],
|
|
672
672
|
split: h,
|
|
673
|
-
hasTop:
|
|
674
|
-
hasBottom:
|
|
673
|
+
hasTop: o,
|
|
674
|
+
hasBottom: c,
|
|
675
675
|
hasSide: g
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
678
|
),
|
|
679
|
-
|
|
680
|
-
) : !
|
|
679
|
+
n != null ? n : 0
|
|
680
|
+
) : !w && a && a.length > 1 ? w = q(a, n != null ? n : 0) : !w && a && a.length === 1 && ([w] = a), this.createMesh(w, A);
|
|
681
681
|
});
|
|
682
682
|
}
|
|
683
683
|
addGeometries(t) {
|
|
684
|
-
const e = this.object3d,
|
|
685
|
-
e.geometry =
|
|
684
|
+
const e = this.object3d, n = q([e.geometry, ...t]);
|
|
685
|
+
e.geometry = n;
|
|
686
686
|
}
|
|
687
687
|
setTextureAnisotropic(t, e) {
|
|
688
688
|
t.anisotropy = e || this.pencil.renderer.capabilities.getMaxAnisotropy();
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
const
|
|
691
|
+
const on = (d) => {
|
|
692
692
|
const {
|
|
693
693
|
topColor: t,
|
|
694
694
|
sideColor: e,
|
|
695
|
-
sideMap:
|
|
696
|
-
createCanvasObjectURL:
|
|
695
|
+
sideMap: n,
|
|
696
|
+
createCanvasObjectURL: s,
|
|
697
697
|
split: r,
|
|
698
698
|
maxAnisotropy: a
|
|
699
|
-
} =
|
|
700
|
-
return new Promise((
|
|
701
|
-
const
|
|
699
|
+
} = d;
|
|
700
|
+
return new Promise((f) => {
|
|
701
|
+
const i = n ? document.createElement("img") : {
|
|
702
702
|
src: "",
|
|
703
703
|
onload: () => {
|
|
704
704
|
},
|
|
705
705
|
width: 128,
|
|
706
706
|
height: 128
|
|
707
707
|
};
|
|
708
|
-
|
|
709
|
-
const h = r,
|
|
710
|
-
|
|
711
|
-
console.log(URL.createObjectURL(
|
|
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) => {
|
|
711
|
+
console.log(URL.createObjectURL(u));
|
|
712
712
|
});
|
|
713
|
-
const g = new ve(
|
|
714
|
-
|
|
715
|
-
},
|
|
713
|
+
const g = new ve(o);
|
|
714
|
+
f(g);
|
|
715
|
+
}, n ? i.src = n : i instanceof HTMLImageElement || i.onload();
|
|
716
716
|
});
|
|
717
717
|
};
|
|
718
|
-
class
|
|
718
|
+
class rn extends K {
|
|
719
719
|
create() {
|
|
720
720
|
this.createGroup();
|
|
721
721
|
}
|
|
@@ -727,53 +727,53 @@ class os extends K {
|
|
|
727
727
|
);
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
class
|
|
730
|
+
class an extends K {
|
|
731
731
|
constructor(t) {
|
|
732
732
|
super(), this.rectAreaLightUniformsLibInit = !1, this.options = t;
|
|
733
733
|
}
|
|
734
734
|
create() {
|
|
735
|
-
var e,
|
|
735
|
+
var e, n, s, r, a, f, i, h, o, c, g, u, y, A, w, v, E;
|
|
736
736
|
const t = this.options;
|
|
737
737
|
if (t.type === "AmbientLight") {
|
|
738
|
-
const
|
|
739
|
-
|
|
738
|
+
const S = new Se(t.color);
|
|
739
|
+
S.name = "环境光", this.object3d = S;
|
|
740
740
|
} else if (t.type === "DirectionalLight") {
|
|
741
|
-
const
|
|
742
|
-
|
|
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
743
|
} else if (t.type === "PointLight") {
|
|
744
|
-
const
|
|
744
|
+
const S = new Ae(
|
|
745
745
|
(e = t.color) != null ? e : 16777215,
|
|
746
|
-
(
|
|
747
|
-
(
|
|
746
|
+
(n = t.intensity) != null ? n : 1,
|
|
747
|
+
(s = t.distance) != null ? s : 0,
|
|
748
748
|
(r = t.decay) != null ? r : 2
|
|
749
749
|
);
|
|
750
|
-
|
|
750
|
+
S.name = "点光源", this.object3d = S, this.pointLight = S;
|
|
751
751
|
} else if (t.type === "SpotLight") {
|
|
752
|
-
const
|
|
752
|
+
const S = new Le(
|
|
753
753
|
(a = t.color) != null ? a : 16777215,
|
|
754
|
-
(
|
|
755
|
-
(
|
|
754
|
+
(f = t.intensity) != null ? f : 1,
|
|
755
|
+
(i = t.distance) != null ? i : 0,
|
|
756
756
|
(h = t.angle) != null ? h : Math.PI / 3,
|
|
757
|
-
(
|
|
758
|
-
(
|
|
757
|
+
(o = t.penumbra) != null ? o : 1,
|
|
758
|
+
(c = t.decay) != null ? c : 2
|
|
759
759
|
);
|
|
760
|
-
|
|
760
|
+
S.name = "聚光灯", this.object3d = S, this.spotLight = S, S.target.name = "聚光灯目标";
|
|
761
761
|
} else if (t.type === "HemisphereLight") {
|
|
762
|
-
const
|
|
762
|
+
const S = new Te(
|
|
763
763
|
(g = t.color) != null ? g : 16777215,
|
|
764
|
-
(
|
|
764
|
+
(u = t.groundColor) != null ? u : 16777215,
|
|
765
765
|
(y = t.intensity) != null ? y : 1
|
|
766
766
|
);
|
|
767
|
-
|
|
767
|
+
S.name = "半球光", this.object3d = S, this.hemisphereLight = S;
|
|
768
768
|
} else if (t.type === "RectAreaLight") {
|
|
769
|
-
this.rectAreaLightUniformsLibInit || (
|
|
770
|
-
const
|
|
769
|
+
this.rectAreaLightUniformsLibInit || (Re.init(), this.rectAreaLightUniformsLibInit = !0);
|
|
770
|
+
const S = new Ge(
|
|
771
771
|
(A = t.color) != null ? A : 16777215,
|
|
772
|
-
(
|
|
772
|
+
(w = t.intensity) != null ? w : 1,
|
|
773
773
|
(v = t.width) != null ? v : 10,
|
|
774
774
|
(E = t.height) != null ? E : 10
|
|
775
775
|
);
|
|
776
|
-
|
|
776
|
+
S.name = "矩形区域光", this.object3d = S, this.rectAreaLight = S;
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
render() {
|
|
@@ -781,8 +781,8 @@ class rs extends K {
|
|
|
781
781
|
t.target && this.pencil.scene.add(t.target);
|
|
782
782
|
const e = this.pencil.cameraTarget;
|
|
783
783
|
if (this.spotLight || this.directionalLight) {
|
|
784
|
-
const
|
|
785
|
-
|
|
784
|
+
const n = this.spotLight || this.directionalLight;
|
|
785
|
+
n.position.copy(e), n.target.position.copy(e);
|
|
786
786
|
} else this.pointLight && this.pointLight.position.copy(e);
|
|
787
787
|
}
|
|
788
788
|
dispose() {
|
|
@@ -790,26 +790,26 @@ class rs extends K {
|
|
|
790
790
|
t.target && this.pencil.scene.remove(t.target), super.dispose();
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
class
|
|
794
|
-
constructor(t = [], e = "none",
|
|
795
|
-
super(), this.type = "MeshLineGeometry", this.pointCount = 0, this._points = [], this.shape = "none", this.shapeFunction = (
|
|
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);
|
|
796
796
|
}
|
|
797
797
|
convertToVector3Array(t) {
|
|
798
798
|
if (typeof t[0] == "number") {
|
|
799
|
-
const e = [],
|
|
800
|
-
for (let
|
|
801
|
-
e.push(new
|
|
799
|
+
const e = [], n = t;
|
|
800
|
+
for (let s = 0; s < n.length; s += 3)
|
|
801
|
+
e.push(new j(n[s], n[s + 1], n[s + 2]));
|
|
802
802
|
return e;
|
|
803
803
|
} else
|
|
804
804
|
return t.map((e) => {
|
|
805
|
-
if (e instanceof P)
|
|
806
|
-
return new z(e.x, e.y, 0);
|
|
807
805
|
if (e instanceof z)
|
|
806
|
+
return new j(e.x, e.y, 0);
|
|
807
|
+
if (e instanceof j)
|
|
808
808
|
return e;
|
|
809
809
|
if (Array.isArray(e) && e.length === 2)
|
|
810
|
-
return new
|
|
810
|
+
return new j(e[0], e[1], 0);
|
|
811
811
|
if (Array.isArray(e) && e.length === 3)
|
|
812
|
-
return new
|
|
812
|
+
return new j(e[0], e[1], e[2]);
|
|
813
813
|
}).filter(Boolean);
|
|
814
814
|
}
|
|
815
815
|
setMatrixWorld(t) {
|
|
@@ -825,38 +825,38 @@ class Ne extends lt {
|
|
|
825
825
|
), e = new Q(
|
|
826
826
|
new Float32Array(this.pointCount * 6),
|
|
827
827
|
3
|
|
828
|
-
),
|
|
828
|
+
), n = new Q(new Float32Array(this.pointCount * 6), 3), s = new Q(
|
|
829
829
|
new Float32Array(this.pointCount * 2),
|
|
830
830
|
1
|
|
831
|
-
), r = new Q(new Float32Array(this.pointCount * 2), 1), a = new Q(new Float32Array(this.pointCount * 2), 1),
|
|
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(
|
|
832
832
|
new Uint16Array((this.pointCount - 1) * 6),
|
|
833
833
|
1
|
|
834
834
|
);
|
|
835
835
|
this.shape === "taper" && (this.shapeFunction = (h) => 1 * Math.pow(4 * h * (1 - h), 1));
|
|
836
|
-
for (let h = 0,
|
|
837
|
-
|
|
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);
|
|
838
838
|
const g = this.shape === "none" ? 1 : this.shapeFunction(h / (this.pointCount - 1));
|
|
839
|
-
a.setX(
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
839
|
+
a.setX(o, g), a.setX(o + 1, g);
|
|
840
|
+
const u = h / (this.pointCount - 1);
|
|
841
|
+
if (f.setXY(o, u, 0), f.setXY(o + 1, u, 1), h < this.pointCount - 1) {
|
|
842
842
|
const y = h * 2;
|
|
843
|
-
|
|
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);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
this.setAttribute("position", t), this.setAttribute("previous", e), this.setAttribute("next",
|
|
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);
|
|
847
847
|
}
|
|
848
848
|
updateGeometry() {
|
|
849
849
|
if (!this._points[0]) return;
|
|
850
|
-
const t = this.getAttribute("position"), e = this.getAttribute("previous"),
|
|
851
|
-
let
|
|
852
|
-
const
|
|
853
|
-
e.setXYZ(r,
|
|
850
|
+
const t = this.getAttribute("position"), e = this.getAttribute("previous"), n = this.getAttribute("next");
|
|
851
|
+
let s = 0, r = 0, a = 0;
|
|
852
|
+
const f = this._points[0];
|
|
853
|
+
e.setXYZ(r, f.x, f.y, f.z), r += 1, e.setXYZ(r, f.x, f.y, f.z), r += 1;
|
|
854
854
|
for (let h = 0; h < this.pointCount; h++) {
|
|
855
|
-
const
|
|
856
|
-
t.setXYZ(
|
|
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);
|
|
857
857
|
}
|
|
858
|
-
const
|
|
859
|
-
|
|
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();
|
|
860
860
|
}
|
|
861
861
|
get points() {
|
|
862
862
|
return this._points;
|
|
@@ -865,58 +865,58 @@ class Ne extends lt {
|
|
|
865
865
|
this.setPoints(t);
|
|
866
866
|
}
|
|
867
867
|
updatePoints(t, e) {
|
|
868
|
-
const
|
|
869
|
-
if (
|
|
868
|
+
const n = this.convertToVector3Array(t);
|
|
869
|
+
if (n.length !== this.pointCount) {
|
|
870
870
|
console.warn(
|
|
871
871
|
"MeshLineGeometry: Cannot update points with different length. Use setPoints() instead."
|
|
872
872
|
);
|
|
873
873
|
return;
|
|
874
874
|
}
|
|
875
|
-
this._points =
|
|
875
|
+
this._points = n, e && (this.shapeFunction = e, this.shape = "custom", this.initializeGeometry()), this.updateGeometry();
|
|
876
876
|
}
|
|
877
877
|
setShape(t, e) {
|
|
878
878
|
this.shape = t, e && (this.shapeFunction = e), this._points.length > 0 && (this.initializeGeometry(), this.updateGeometry());
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
const e = new
|
|
883
|
-
if (
|
|
884
|
-
e.copy(this.matrixWorld).invert(),
|
|
885
|
-
const
|
|
886
|
-
if (
|
|
887
|
-
const
|
|
888
|
-
for (let
|
|
889
|
-
const E =
|
|
890
|
-
|
|
891
|
-
const
|
|
892
|
-
if (
|
|
893
|
-
|
|
894
|
-
|
|
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;
|
|
886
|
+
if (c !== null) {
|
|
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;
|
|
892
|
+
if (n.distanceSqToSegment(
|
|
893
|
+
f,
|
|
894
|
+
i,
|
|
895
895
|
r,
|
|
896
896
|
h
|
|
897
|
-
) >
|
|
897
|
+
) > U) continue;
|
|
898
898
|
r.applyMatrix4(this.matrixWorld);
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
distance:
|
|
899
|
+
const C = d.ray.origin.distanceTo(r);
|
|
900
|
+
C < d.near || C > d.far || (t.push({
|
|
901
|
+
distance: C,
|
|
902
902
|
// What do we want? intersection point on the ray or on the segment??
|
|
903
903
|
// point: raycaster.ray.at( distance ),
|
|
904
904
|
point: h.clone().applyMatrix4(this.matrixWorld),
|
|
905
|
-
index:
|
|
905
|
+
index: w,
|
|
906
906
|
face: null,
|
|
907
907
|
faceIndex: void 0,
|
|
908
908
|
object: this
|
|
909
|
-
}),
|
|
909
|
+
}), w = v);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
const
|
|
914
|
-
const { setPointWidth: t, nodes: e } =
|
|
915
|
-
return
|
|
916
|
-
},
|
|
917
|
-
let
|
|
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
918
|
constructor(t = {}) {
|
|
919
|
-
super(), this.options =
|
|
919
|
+
super(), this.options = X({}, t);
|
|
920
920
|
}
|
|
921
921
|
get material() {
|
|
922
922
|
var t;
|
|
@@ -927,102 +927,102 @@ let cs = class extends K {
|
|
|
927
927
|
const {
|
|
928
928
|
nodes: t,
|
|
929
929
|
nodesArr: e,
|
|
930
|
-
geometry:
|
|
931
|
-
geometryArr:
|
|
930
|
+
geometry: n,
|
|
931
|
+
geometryArr: s,
|
|
932
932
|
material: r,
|
|
933
933
|
useGroups: a,
|
|
934
|
-
setPointWidth:
|
|
935
|
-
lineWidthArr:
|
|
934
|
+
setPointWidth: f,
|
|
935
|
+
lineWidthArr: i,
|
|
936
936
|
materialParameters: h
|
|
937
937
|
} = this.options;
|
|
938
|
-
let
|
|
939
|
-
!
|
|
938
|
+
let o = r, c = n;
|
|
939
|
+
!o && h && (o = this.getMaterial(h)), !c && t ? c = St({
|
|
940
940
|
nodes: t,
|
|
941
|
-
setPointWidth:
|
|
942
|
-
}) : !
|
|
943
|
-
e.map((g,
|
|
944
|
-
let y =
|
|
945
|
-
return !y &&
|
|
941
|
+
setPointWidth: f
|
|
942
|
+
}) : !c && e ? c = q(
|
|
943
|
+
e.map((g, u) => {
|
|
944
|
+
let y = f;
|
|
945
|
+
return !y && i && (y = () => {
|
|
946
946
|
var A;
|
|
947
|
-
return (A =
|
|
948
|
-
}),
|
|
947
|
+
return (A = i[u]) != null ? A : i[0];
|
|
948
|
+
}), St({
|
|
949
949
|
nodes: g,
|
|
950
950
|
setPointWidth: y
|
|
951
951
|
});
|
|
952
952
|
}),
|
|
953
953
|
a != null ? a : 0
|
|
954
|
-
) : !
|
|
954
|
+
) : !c && s && s.length > 1 ? c = q(s, a != null ? a : 0) : !c && s && s.length === 1 && ([c] = s), this.createMesh(c, o);
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
957
|
setGeometry(t, e) {
|
|
958
|
-
const
|
|
958
|
+
const n = St({
|
|
959
959
|
nodes: t,
|
|
960
960
|
setPointWidth: e
|
|
961
|
-
}),
|
|
962
|
-
|
|
961
|
+
}), s = this.object3d, r = s.geometry;
|
|
962
|
+
s.geometry = n, r.dispose();
|
|
963
963
|
}
|
|
964
964
|
getMaterial(t) {
|
|
965
|
-
const { width: e, height:
|
|
965
|
+
const { width: e, height: n } = this.pencil.getSize(), s = new re(X({
|
|
966
966
|
color: new Yt("#ffffff")
|
|
967
967
|
}, t));
|
|
968
|
-
return
|
|
968
|
+
return s.uniforms.resolution.value.set(e, n), s;
|
|
969
969
|
}
|
|
970
970
|
addGeometries(t) {
|
|
971
|
-
const e = this.object3d,
|
|
972
|
-
e.geometry =
|
|
971
|
+
const e = this.object3d, n = q([e.geometry, ...t]);
|
|
972
|
+
e.geometry = n;
|
|
973
973
|
}
|
|
974
974
|
resize(t, e) {
|
|
975
|
-
var
|
|
976
|
-
(
|
|
975
|
+
var n, s;
|
|
976
|
+
(s = (n = this.material) == null ? void 0 : n.uniforms) == null || s.resolution.value.set(t, e);
|
|
977
977
|
}
|
|
978
978
|
handleMaterialChange(t) {
|
|
979
979
|
if (t) {
|
|
980
|
-
const { width: e, height:
|
|
981
|
-
this.resize(e,
|
|
980
|
+
const { width: e, height: n } = this.pencil.getSize();
|
|
981
|
+
this.resize(e, n);
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
animate({
|
|
985
985
|
duration: t = 1e3,
|
|
986
986
|
delay: e = 0,
|
|
987
|
-
repeat:
|
|
988
|
-
lineLoop:
|
|
987
|
+
repeat: n = 0,
|
|
988
|
+
lineLoop: s,
|
|
989
989
|
onRepeat: r,
|
|
990
990
|
onUpdate: a,
|
|
991
|
-
onComplete:
|
|
992
|
-
startShow:
|
|
991
|
+
onComplete: f,
|
|
992
|
+
startShow: i
|
|
993
993
|
} = {}) {
|
|
994
|
-
const { offset: h, offsetLoop:
|
|
995
|
-
if (
|
|
996
|
-
const g =
|
|
997
|
-
h.value.x = 1,
|
|
998
|
-
let
|
|
999
|
-
const y = new
|
|
1000
|
-
g && A <= 0 &&
|
|
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;
|
|
996
|
+
const g = s != null ? s : !0;
|
|
997
|
+
h.value.x = 1, o.value = g && i ? 1 : 0;
|
|
998
|
+
let u = 0;
|
|
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);
|
|
1001
1001
|
}).onRepeat(() => {
|
|
1002
|
-
|
|
1002
|
+
u += 1, r == null || r(u);
|
|
1003
1003
|
}).onComplete(() => {
|
|
1004
|
-
|
|
1004
|
+
f == null || f();
|
|
1005
1005
|
}).start();
|
|
1006
|
-
|
|
1006
|
+
c.set(this.material, y), this.material.addEventListener("dispose", () => {
|
|
1007
1007
|
this.stopAnimation();
|
|
1008
1008
|
}), this.pencil.userData.debugLine && console.log("animate", bt.size);
|
|
1009
1009
|
}
|
|
1010
1010
|
stopAnimation() {
|
|
1011
|
-
const t = this.pencil.userData.debugLine ? bt :
|
|
1012
|
-
e && (e.stop(),
|
|
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);
|
|
1013
1013
|
}
|
|
1014
1014
|
render() {
|
|
1015
1015
|
const { width: t, height: e } = this.pencil.getSize();
|
|
1016
1016
|
this.resize(t, e);
|
|
1017
1017
|
}
|
|
1018
1018
|
};
|
|
1019
|
-
const
|
|
1020
|
-
const { points: t } =
|
|
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
1021
|
return new lt().setFromPoints(e);
|
|
1022
1022
|
};
|
|
1023
|
-
class
|
|
1023
|
+
class un extends K {
|
|
1024
1024
|
constructor(t = {}) {
|
|
1025
|
-
super(), this.options =
|
|
1025
|
+
super(), this.options = X({}, t);
|
|
1026
1026
|
}
|
|
1027
1027
|
get material() {
|
|
1028
1028
|
var t;
|
|
@@ -1033,186 +1033,46 @@ class hs extends K {
|
|
|
1033
1033
|
const {
|
|
1034
1034
|
points: t,
|
|
1035
1035
|
pointsArr: e,
|
|
1036
|
-
geometry:
|
|
1037
|
-
geometryArr:
|
|
1036
|
+
geometry: n,
|
|
1037
|
+
geometryArr: s,
|
|
1038
1038
|
material: r,
|
|
1039
1039
|
useGroups: a,
|
|
1040
|
-
setPointWidth:
|
|
1041
|
-
lineWidthArr:
|
|
1040
|
+
setPointWidth: f,
|
|
1041
|
+
lineWidthArr: i,
|
|
1042
1042
|
materialParameters: h,
|
|
1043
|
-
instanceCount:
|
|
1043
|
+
instanceCount: o
|
|
1044
1044
|
} = this.options;
|
|
1045
|
-
let
|
|
1046
|
-
!
|
|
1045
|
+
let c = r, g = n;
|
|
1046
|
+
!c && h && (c = this.getMaterial(h)), !g && t ? g = Nt({
|
|
1047
1047
|
points: t
|
|
1048
|
-
}) : !g && e ? g =
|
|
1049
|
-
e.map((y) =>
|
|
1048
|
+
}) : !g && e ? g = q(
|
|
1049
|
+
e.map((y) => Nt({
|
|
1050
1050
|
points: y
|
|
1051
1051
|
})),
|
|
1052
1052
|
a != null ? a : 0
|
|
1053
|
-
) : !g &&
|
|
1054
|
-
const
|
|
1055
|
-
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)
|
|
1056
1056
|
);
|
|
1057
1057
|
if (this.pencil.options.WebGPUTHREE) {
|
|
1058
|
-
|
|
1059
|
-
const y = new ae(
|
|
1058
|
+
o && (u.instanceCount = o);
|
|
1059
|
+
const y = new ae(u, c);
|
|
1060
1060
|
y.computeLineDistances(), this.object3d = y;
|
|
1061
1061
|
} else {
|
|
1062
|
-
const y = new
|
|
1062
|
+
const y = new Oe(u, c);
|
|
1063
1063
|
y.computeLineDistances(), this.object3d = y;
|
|
1064
1064
|
}
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
getMaterial(t) {
|
|
1068
|
-
return new
|
|
1068
|
+
return new se(X({
|
|
1069
1069
|
color: new Yt("#ffffff")
|
|
1070
1070
|
}, t));
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
|
-
class
|
|
1074
|
-
constructor(t = {}) {
|
|
1075
|
-
this.labels = /* @__PURE__ */ new Map(), this.lastUpdateTime = 0, this.isUpdating = !1, this.options = O({
|
|
1076
|
-
padding: 4,
|
|
1077
|
-
enabled: !0,
|
|
1078
|
-
throttleTime: 16,
|
|
1079
|
-
// ~60fps
|
|
1080
|
-
viewportMargin: 50
|
|
1081
|
-
}, t);
|
|
1082
|
-
}
|
|
1083
|
-
/**
|
|
1084
|
-
* 添加标签到碰撞检测系统
|
|
1085
|
-
* @param node Node 实例
|
|
1086
|
-
* @param options 配置项,priority 越大越优先显示,不传则使用 node.options.priority
|
|
1087
|
-
*/
|
|
1088
|
-
add(t, e = {}) {
|
|
1089
|
-
var s, n;
|
|
1090
|
-
this.labels.set(t, {
|
|
1091
|
-
node: t,
|
|
1092
|
-
priority: (n = (s = e.priority) != null ? s : t.options.priority) != null ? n : 0,
|
|
1093
|
-
visible: !0
|
|
1094
|
-
});
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* 移除标签
|
|
1098
|
-
*/
|
|
1099
|
-
remove(t) {
|
|
1100
|
-
this.labels.delete(t);
|
|
1101
|
-
}
|
|
1102
|
-
/**
|
|
1103
|
-
* 更新标签优先级
|
|
1104
|
-
*/
|
|
1105
|
-
setPriority(t, e) {
|
|
1106
|
-
const s = this.labels.get(t);
|
|
1107
|
-
s && (s.priority = e);
|
|
1108
|
-
}
|
|
1109
|
-
/**
|
|
1110
|
-
* 批量添加标签
|
|
1111
|
-
*/
|
|
1112
|
-
addBatch(t, e) {
|
|
1113
|
-
t.forEach((s, n) => {
|
|
1114
|
-
this.add(s, {
|
|
1115
|
-
priority: e ? e(s, n) : 0
|
|
1116
|
-
});
|
|
1117
|
-
});
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
* 启用/禁用碰撞检测
|
|
1121
|
-
*/
|
|
1122
|
-
setEnabled(t) {
|
|
1123
|
-
this.options.enabled = t, t || this.labels.forEach((e) => {
|
|
1124
|
-
this.setNodeVisibility(e.node, !0), e.visible = !0;
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
/**
|
|
1128
|
-
* 更新碰撞检测(在渲染循环中调用)
|
|
1129
|
-
*/
|
|
1130
|
-
update(t) {
|
|
1131
|
-
if (!this.options.enabled) return;
|
|
1132
|
-
const e = performance.now();
|
|
1133
|
-
e - this.lastUpdateTime < this.options.throttleTime || (this.lastUpdateTime = e, this.camera = t, !this.isUpdating && (this.isUpdating = !0, this.animationFrameId = requestAnimationFrame(() => {
|
|
1134
|
-
this.performCollisionDetection(), this.isUpdating = !1;
|
|
1135
|
-
})));
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* 强制立即更新
|
|
1139
|
-
*/
|
|
1140
|
-
forceUpdate() {
|
|
1141
|
-
this.camera && this.performCollisionDetection();
|
|
1142
|
-
}
|
|
1143
|
-
performCollisionDetection() {
|
|
1144
|
-
const { padding: t, viewportMargin: e } = this.options, s = window.innerWidth, n = window.innerHeight, r = [];
|
|
1145
|
-
this.labels.forEach((c) => {
|
|
1146
|
-
const o = c.node.element;
|
|
1147
|
-
if (!o) return;
|
|
1148
|
-
const h = o.style.display === "none";
|
|
1149
|
-
h && (o.style.visibility = "hidden", o.style.display = "");
|
|
1150
|
-
const i = o.getBoundingClientRect();
|
|
1151
|
-
h && (o.style.display = "none", o.style.visibility = ""), i.right >= -e && i.left <= s + e && i.bottom >= -e && i.top <= n + e ? (c.bounds = i, r.push(c)) : (this.setNodeVisibility(c.node, !1), c.visible = !1);
|
|
1152
|
-
}), r.sort((c, o) => o.priority - c.priority);
|
|
1153
|
-
const a = [];
|
|
1154
|
-
for (const c of r) {
|
|
1155
|
-
if (!c.bounds) continue;
|
|
1156
|
-
this.checkCollision(
|
|
1157
|
-
c.bounds,
|
|
1158
|
-
a,
|
|
1159
|
-
t
|
|
1160
|
-
) ? (this.setNodeVisibility(c.node, !1), c.visible = !1) : (this.setNodeVisibility(c.node, !0), c.visible = !0, a.push(c.bounds));
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* 检测矩形是否与已占用区域碰撞
|
|
1165
|
-
*/
|
|
1166
|
-
checkCollision(t, e, s) {
|
|
1167
|
-
for (const n of e)
|
|
1168
|
-
if (this.rectsIntersect(t, n, s))
|
|
1169
|
-
return !0;
|
|
1170
|
-
return !1;
|
|
1171
|
-
}
|
|
1172
|
-
/**
|
|
1173
|
-
* 检测两个矩形是否相交(包含 padding)
|
|
1174
|
-
*/
|
|
1175
|
-
rectsIntersect(t, e, s) {
|
|
1176
|
-
return !(t.right + s < e.left || t.left - s > e.right || t.bottom + s < e.top || t.top - s > e.bottom);
|
|
1177
|
-
}
|
|
1178
|
-
/**
|
|
1179
|
-
* 设置节点可见性
|
|
1180
|
-
*/
|
|
1181
|
-
setNodeVisibility(t, e) {
|
|
1182
|
-
const s = t.element;
|
|
1183
|
-
s && (e ? (s.style.display = "", s.style.opacity = "1") : s.style.display = "none");
|
|
1184
|
-
}
|
|
1185
|
-
/**
|
|
1186
|
-
* 获取当前可见的标签数量
|
|
1187
|
-
*/
|
|
1188
|
-
getVisibleCount() {
|
|
1189
|
-
let t = 0;
|
|
1190
|
-
return this.labels.forEach((e) => {
|
|
1191
|
-
e.visible && t++;
|
|
1192
|
-
}), t;
|
|
1193
|
-
}
|
|
1194
|
-
/**
|
|
1195
|
-
* 获取所有标签数量
|
|
1196
|
-
*/
|
|
1197
|
-
getTotalCount() {
|
|
1198
|
-
return this.labels.size;
|
|
1199
|
-
}
|
|
1200
|
-
/**
|
|
1201
|
-
* 清空所有标签
|
|
1202
|
-
*/
|
|
1203
|
-
clear() {
|
|
1204
|
-
this.labels.clear();
|
|
1205
|
-
}
|
|
1206
|
-
/**
|
|
1207
|
-
* 销毁管理器
|
|
1208
|
-
*/
|
|
1209
|
-
dispose() {
|
|
1210
|
-
this.animationFrameId && cancelAnimationFrame(this.animationFrameId), this.labels.clear();
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
class ds extends K {
|
|
1073
|
+
class fn extends K {
|
|
1214
1074
|
constructor(t) {
|
|
1215
|
-
super(), this.options =
|
|
1075
|
+
super(), this.options = X({
|
|
1216
1076
|
maxDepth: 10,
|
|
1217
1077
|
percentDepth: !1,
|
|
1218
1078
|
innerRadius: 25,
|
|
@@ -1223,70 +1083,69 @@ class ds extends K {
|
|
|
1223
1083
|
create() {
|
|
1224
1084
|
return ct(this, null, function* () {
|
|
1225
1085
|
this.createGroup();
|
|
1226
|
-
const { data: t, maxDepth: e, colors:
|
|
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);
|
|
1227
1087
|
let h = Math.PI / 2;
|
|
1228
|
-
t.forEach((
|
|
1229
|
-
if (
|
|
1230
|
-
const g = Math.PI * 2 * (
|
|
1231
|
-
color:
|
|
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({
|
|
1091
|
+
color: u
|
|
1232
1092
|
});
|
|
1233
|
-
|
|
1234
|
-
const v = new kt(A,
|
|
1235
|
-
v.userData.depth = y, v.userData.index =
|
|
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);
|
|
1236
1096
|
}), a !== -1 && this.setActive(a);
|
|
1237
1097
|
});
|
|
1238
1098
|
}
|
|
1239
1099
|
createGeometry(t, e) {
|
|
1240
|
-
const { outRadius:
|
|
1241
|
-
return r.moveTo(
|
|
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, {
|
|
1242
1102
|
curveSegments: 48,
|
|
1243
1103
|
depth: t,
|
|
1244
1104
|
bevelEnabled: !1
|
|
1245
1105
|
});
|
|
1246
1106
|
}
|
|
1247
1107
|
handlePick(t, e = 1.3) {
|
|
1248
|
-
const { object:
|
|
1249
|
-
return this.setActive(
|
|
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);
|
|
1250
1110
|
}
|
|
1251
1111
|
setActive(t, e = 1.3) {
|
|
1252
|
-
const
|
|
1253
|
-
if (this.object3d.children.forEach((
|
|
1254
|
-
if (!(
|
|
1255
|
-
if (
|
|
1256
|
-
|
|
1257
|
-
const r = new
|
|
1258
|
-
|
|
1112
|
+
const n = this.object3d.children[t];
|
|
1113
|
+
if (this.object3d.children.forEach((s) => {
|
|
1114
|
+
if (!(n && n === s) && s.scale.z !== 1) {
|
|
1115
|
+
if (s.userData.levTween) return;
|
|
1116
|
+
s.userData.enTween && (s.userData.enTween.stop(), s.userData.enTween = null);
|
|
1117
|
+
const r = new it.Tween(s.scale).to({ z: 1 }, 100);
|
|
1118
|
+
s.userData.levTween = r, r.start();
|
|
1259
1119
|
}
|
|
1260
|
-
}),
|
|
1261
|
-
if (
|
|
1120
|
+
}), n) {
|
|
1121
|
+
if (n.userData.enTween)
|
|
1262
1122
|
return;
|
|
1263
|
-
|
|
1264
|
-
const
|
|
1265
|
-
return
|
|
1123
|
+
n.userData.levTween && (n.userData.levTween.stop(), n.userData.levTween = null);
|
|
1124
|
+
const s = new it.Tween(n.scale).to({ z: e }, 100);
|
|
1125
|
+
return n.userData.enTween = s, s.start(), n.userData.index;
|
|
1266
1126
|
}
|
|
1267
1127
|
return -1;
|
|
1268
1128
|
}
|
|
1269
1129
|
render() {
|
|
1270
|
-
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();
|
|
1271
1131
|
}
|
|
1272
1132
|
}
|
|
1273
1133
|
export {
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
Ne as MeshLineGeometry,
|
|
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,
|
|
1285
1144
|
re as MeshLineMaterial,
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1145
|
+
cn as MeshLineRaycast,
|
|
1146
|
+
xn as Node,
|
|
1147
|
+
fn as Pie,
|
|
1148
|
+
ie as getConicPolygonGeometry,
|
|
1149
|
+
wn as getConicPolygonGeometryMetas,
|
|
1150
|
+
on as getSplitTexture
|
|
1292
1151
|
};
|