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.
Files changed (50) hide show
  1. package/dist/cartographicToCartesian.js +1 -0
  2. package/dist/cartographicToCartesian.module.js +49 -0
  3. package/dist/constants.d.ts +0 -1
  4. package/dist/core/BaseObject/PointerEvent.d.ts +1 -0
  5. package/dist/core/BaseObject/index.d.ts +16 -4
  6. package/dist/core/CSSRenderer/CollisionManager.d.ts +98 -0
  7. package/dist/core/CSSRenderer/index.d.ts +18 -6
  8. package/dist/core/Composer.d.ts +5 -5
  9. package/dist/core/Helper.d.ts +4 -4
  10. package/dist/core/Lead/Pick.d.ts +35 -3
  11. package/dist/core/Lead/index.d.ts +5 -6
  12. package/dist/core/Pages/Pages.d.ts +1 -0
  13. package/dist/core/Pencil.d.ts +19 -5
  14. package/dist/core/pass/OutputPass.d.ts +1 -2
  15. package/dist/index.js +2 -2
  16. package/dist/index.module.js +708 -442
  17. package/dist/index.module2.js +1183 -0
  18. package/dist/index2.js +140 -0
  19. package/dist/objects/conicPolygon/geometry/index.d.ts +1 -2
  20. package/dist/objects/ellipsoid/createGeometry.d.ts +30 -0
  21. package/dist/objects/ellipsoid/index.d.ts +38 -0
  22. package/dist/objects/extrudePolygon/createGeometry.d.ts +2 -1
  23. package/dist/objects/group/index.d.ts +1 -0
  24. package/dist/objects/index.d.ts +1 -0
  25. package/dist/objects/index.js +1 -1
  26. package/dist/objects/index.module.js +691 -688
  27. package/dist/objects/node/index.d.ts +6 -2
  28. package/dist/objects/pie/index.d.ts +2 -1
  29. package/dist/plugins/Worker/getAttributes/conicLine.d.ts +1 -1
  30. package/dist/plugins/Worker/getAttributes/conicPolygon.d.ts +2 -3
  31. package/dist/plugins/Worker/getAttributes/extrudePolygon.d.ts +1 -1
  32. package/dist/plugins/Worker/getAttributes/getCoordinatesArr.d.ts +5 -1
  33. package/dist/plugins/Worker/getAttributes/line.d.ts +1 -1
  34. package/dist/plugins/Worker/getAttributes/line2.d.ts +1 -1
  35. package/dist/plugins/Worker/getAttributes/splitPolygonsByLongitudeDifference.d.ts +5 -2
  36. package/dist/plugins/Worker/index.d.ts +2 -3
  37. package/dist/plugins/index.js +1 -1
  38. package/dist/plugins/index.module.js +77 -70
  39. package/dist/utils/Sprite2Points.d.ts +1 -1
  40. package/dist/utils/cartographicToCartesian.d.ts +30 -0
  41. package/dist/utils/index.d.ts +1 -1
  42. package/dist/utils/index.js +1 -1
  43. package/dist/utils/index.module.js +15 -13
  44. package/dist/utils/proposedRaycast.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/dist/WebGPULineSegments2.js +0 -140
  47. package/dist/WebGPULineSegments2.module.js +0 -1031
  48. package/dist/polar2Cartesian.js +0 -1
  49. package/dist/polar2Cartesian.module.js +0 -18
  50. package/dist/utils/polar2Cartesian.d.ts +0 -1
@@ -1,427 +1,469 @@
1
- var Je = Object.defineProperty, Qe = Object.defineProperties;
2
- var Ke = Object.getOwnPropertyDescriptors;
3
- var he = Object.getOwnPropertySymbols;
4
- var Be = Object.prototype.hasOwnProperty, Oe = Object.prototype.propertyIsEnumerable;
5
- var Ie = (p, e, t) => e in p ? Je(p, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[e] = t, z = (p, e) => {
6
- for (var t in e || (e = {}))
7
- Be.call(e, t) && Ie(p, t, e[t]);
8
- if (he)
9
- for (var t of he(e))
10
- Oe.call(e, t) && Ie(p, t, e[t]);
11
- return p;
12
- }, ue = (p, e) => Qe(p, Ke(e));
13
- var ye = (p, e) => {
14
- var t = {};
15
- for (var n in p)
16
- Be.call(p, n) && e.indexOf(n) < 0 && (t[n] = p[n]);
17
- if (p != null && he)
18
- for (var n of he(p))
19
- e.indexOf(n) < 0 && Oe.call(p, n) && (t[n] = p[n]);
20
- return t;
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 oe = (p, e, t) => new Promise((n, s) => {
23
- var o = (r) => {
22
+ var ct = (d, t, e) => new Promise((n, s) => {
23
+ var r = (i) => {
24
24
  try {
25
- f(t.next(r));
25
+ f(e.next(i));
26
26
  } catch (h) {
27
27
  s(h);
28
28
  }
29
- }, a = (r) => {
29
+ }, a = (i) => {
30
30
  try {
31
- f(t.throw(r));
31
+ f(e.throw(i));
32
32
  } catch (h) {
33
33
  s(h);
34
34
  }
35
- }, f = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(o, a);
36
- f((t = t.apply(p, e)).next());
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 et } from "three/examples/jsm/lines/LineMaterial";
39
- import { LineMaterial as un } from "three/examples/jsm/lines/LineMaterial";
40
- import { LineSegmentsGeometry as tt } from "three/examples/jsm/lines/LineSegmentsGeometry";
41
- import { LineSegmentsGeometry as dn } from "three/examples/jsm/lines/LineSegmentsGeometry";
42
- import { P as nt, a as Z, M as st, L as it } from "../WebGPULineSegments2.module.js";
43
- import { g as pn } from "../WebGPULineSegments2.module.js";
44
- import { BufferGeometry as me, Float32BufferAttribute as xe, Vector3 as _, ShapeUtils as fe, Shape as we, Vector2 as P, ArcCurve as ot, CatmullRomCurve3 as rt, CubicBezierCurve as at, CubicBezierCurve3 as ct, EllipseCurve as lt, LineCurve as ht, LineCurve3 as ut, QuadraticBezierCurve as ft, QuadraticBezierCurve3 as dt, SplineCurve as mt, Box3 as pt, PlaneGeometry as gt, CanvasTexture as yt, AmbientLight as bt, DirectionalLight as xt, PointLight as wt, SpotLight as vt, HemisphereLight as St, RectAreaLight as At, Matrix4 as Ne, BufferAttribute as Y, Ray as Mt, Sphere as Lt, LineSegments as We, Color as ke, MeshBasicMaterial as Tt, Mesh as Et } from "three";
45
- import { mergeAttributes as Re, mergeGroups as Gt } from "three/examples/jsm/utils/BufferGeometryUtils";
46
- import { g as Pt, c as Ct } from "../uvGenerator.module.js";
47
- import { Brush as Ue, Evaluator as _t, INTERSECTION as zt } from "three-bvh-csg";
48
- import { RectAreaLightUniformsLib as jt } from "three/examples/jsm/lights/RectAreaLightUniformsLib";
49
- import * as ne from "@tweenjs/tween.js";
50
- import { LineSegments2 as It } from "three/examples/jsm/lines/LineSegments2";
51
- function V(p, e = 0) {
52
- const t = p[0].index !== null, n = new Set(Object.keys(p[0].attributes)), s = new Set(
53
- Object.keys(p[0].morphAttributes)
54
- ), o = {}, a = {}, f = p[0].morphTargetsRelative, r = new me();
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 i = 0; i < p.length; ++i) {
57
- const c = p[i];
57
+ for (let o = 0; o < d.length; ++o) {
58
+ const c = d[o];
58
59
  let g = 0;
59
- if (t !== (c.index !== null))
60
+ if (e !== (c.index !== null))
60
61
  return console.error(
61
- "THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index " + i + ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."
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 " + i + '. All geometries must have compatible attributes; make sure "' + u + '" attribute exists among all geometries, or in none of them.'
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
- o[u] === void 0 && (o[u] = []), o[u].push(c.attributes[u]), g++;
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 " + i + ". Make sure all geometries have the same number of attributes."
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 " + i + ". .morphTargetsRelative must be consistent throughout all geometries."
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 " + i + ". .morphAttributes must be consistent throughout all geometries."
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 (e) {
86
+ if (t) {
86
87
  let u;
87
- if (t)
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 " + i + ". The geometry must have either an index or a position attribute"
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 (e === 1)
96
- r.addGroup(h, u, i);
97
- else if (e === 2 && c.groups.length > 0)
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 L = y.materialIndex;
100
- r.addGroup(
100
+ let A = y.materialIndex;
101
+ i.addGroup(
101
102
  h + y.start,
102
103
  Math.min(y.count, u),
103
- L
104
+ A
104
105
  );
105
106
  }
106
107
  h += u;
107
108
  }
108
109
  }
109
- if (t) {
110
- let i = 0;
110
+ if (e) {
111
+ let o = 0;
111
112
  const c = [];
112
- for (let g = 0; g < p.length; ++g) {
113
- const u = p[g].index;
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) + i);
116
- i += p[g].attributes.position.count;
116
+ c.push(u.getX(y) + o);
117
+ o += d[g].attributes.position.count;
117
118
  }
118
- r.setIndex(c);
119
+ i.setIndex(c);
119
120
  }
120
- for (const i in o) {
121
- const c = Re(o[i]);
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 " + i + " attribute."
125
+ "THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " attribute."
125
126
  ), null;
126
- r.setAttribute(i, c);
127
+ i.setAttribute(o, c);
127
128
  }
128
- for (const i in a) {
129
- const c = a[i][0].length;
129
+ for (const o in a) {
130
+ const c = a[o][0].length;
130
131
  if (c === 0) break;
131
- r.morphAttributes = r.morphAttributes || {}, r.morphAttributes[i] = [];
132
+ i.morphAttributes = i.morphAttributes || {}, i.morphAttributes[o] = [];
132
133
  for (let g = 0; g < c; ++g) {
133
134
  const u = [];
134
- for (let L = 0; L < a[i].length; ++L)
135
- u.push(a[i][L][g]);
136
- const y = Re(u);
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 " + i + " morphAttribute."
140
+ "THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + o + " morphAttribute."
140
141
  ), null;
141
- r.morphAttributes[i].push(y);
142
+ i.morphAttributes[o].push(y);
142
143
  }
143
144
  }
144
- return e === 2 ? Gt(r) : r;
145
+ return t === 2 ? ze(i) : i;
145
146
  }
146
- const De = (p) => {
147
- const f = p, { coordinate: e, startHeight: t, height: n } = f, s = ye(f, ["coordinate", "startHeight", "height"]);
148
- let o = t || 0;
149
- return typeof t != "undefined" && typeof n != "undefined" && (o = t + n), new nt([e], ue(z({}, s), {
150
- startHeight: t,
151
- endHeight: o
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 Jt extends Z {
155
- constructor(e) {
156
- super(), this.options = z({}, e);
155
+ class en extends K {
156
+ constructor(t) {
157
+ super(), this.options = X({}, t);
157
158
  }
158
159
  create() {
159
- const r = this.options, {
160
- geometry: e,
161
- coordinateArr: t,
160
+ const i = this.options, {
161
+ geometry: t,
162
+ coordinateArr: e,
162
163
  coordinate: n,
163
164
  material: s,
164
- useGroups: o
165
- } = r, a = ye(r, [
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 = e;
173
+ let f = t;
173
174
  if (!f && n)
174
- f = De(z({
175
+ f = Wt(X({
175
176
  coordinate: n
176
177
  }, a));
177
- else if (!f && t) {
178
- const h = t.map(
179
- (i) => De(z({
180
- coordinate: i
178
+ else if (!f && e) {
179
+ const h = e.map(
180
+ (o) => Wt(X({
181
+ coordinate: o
181
182
  }, a))
182
183
  );
183
- f = V(h, o != null ? o : 0);
184
+ f = q(h, r != null ? r : 0);
184
185
  }
185
186
  this.createMesh(f, s);
186
187
  }
187
188
  }
188
- const Bt = {
189
- ArcCurve: ot,
190
- CatmullRomCurve3: rt,
191
- CubicBezierCurve: at,
192
- CubicBezierCurve3: ct,
193
- EllipseCurve: lt,
194
- LineCurve: ht,
195
- LineCurve3: ut,
196
- QuadraticBezierCurve: ft,
197
- QuadraticBezierCurve3: dt,
198
- SplineCurve: mt
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 K extends me {
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(e = new we([
208
- new P(0.5, 0.5),
209
- new P(-0.5, 0.5),
210
- new P(-0.5, -0.5),
211
- new P(0.5, -0.5)
212
- ]), t = {}) {
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: e,
215
- options: t
216
- }, e = Array.isArray(e) ? e : [e];
217
- const n = this, s = [], o = [];
218
- for (let f = 0, r = e.length; f < r; f++) {
219
- const h = e[f];
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 xe(s, 3)), this.setAttribute("uv", new xe(o, 2)), this.computeVertexNormals();
264
+ this.setAttribute("position", new rt(s, 3)), this.setAttribute("uv", new rt(r, 2)), this.computeVertexNormals();
223
265
  function a(f) {
224
- var Te, Ee, Ge;
225
- const r = [], h = t.curveSegments !== void 0 ? t.curveSegments : 12, i = t.steps !== void 0 ? t.steps : 1, c = t.depth !== void 0 ? t.depth : 1;
226
- let g = t.bevelEnabled !== void 0 ? t.bevelEnabled : !0, u = t.bevelThickness !== void 0 ? t.bevelThickness : 0.2, y = t.bevelSize !== void 0 ? t.bevelSize : u - 0.1, L = t.bevelOffset !== void 0 ? t.bevelOffset : 0, S = t.bevelSegments !== void 0 ? t.bevelSegments : 3;
227
- const A = t.extrudePath, C = t.UVGenerator !== void 0 ? t.UVGenerator : Ot, v = (Te = t.hasTop) != null ? Te : !0, j = (Ee = t.hasBottom) != null ? Ee : !0, ee = (Ge = t.hasSide) != null ? Ge : !0;
228
- let H, $ = !1, U, se, ie, X;
229
- A && (H = A.getSpacedPoints(i), $ = !0, g = !1, U = A.computeFrenetFrames(i, !1), se = new _(), ie = new _(), X = new _()), g || (S = 0, u = 0, y = 0, L = 0);
230
- const ve = f.extractPoints(h);
231
- let R = ve.shape;
232
- const I = ve.holes;
233
- if (!fe.isClockWise(R)) {
234
- R = R.reverse();
235
- for (let l = 0, d = I.length; l < d; l++) {
236
- const m = I[l];
237
- fe.isClockWise(m) && (I[l] = m.reverse());
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 Se(l) {
241
- const m = 10000000000000001e-36;
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 M = b % l.length, w = l[M], T = w.x - x.x, E = w.y - x.y, G = T * T + E * E, B = Math.max(
245
- Math.abs(w.x),
246
- Math.abs(w.y),
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
- ), Q = m * B * B;
250
- if (G <= Q) {
251
- l.splice(M, 1), b--;
291
+ ), nt = p * H * H;
292
+ if (_ <= nt) {
293
+ l.splice(L, 1), b--;
252
294
  continue;
253
295
  }
254
- x = w;
296
+ x = M;
255
297
  }
256
298
  }
257
- Se(R), I.forEach(Se);
258
- const pe = I.length, D = R;
259
- for (let l = 0; l < pe; l++) {
260
- const d = I[l];
261
- R = R.concat(d);
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 te(l, d, m) {
264
- return d || error("ExtrudeGeometry: vec does not exist"), l.clone().addScaledVector(d, m);
305
+ function k(l, m, p) {
306
+ return m || error("ExtrudeGeometry: vec does not exist"), l.clone().addScaledVector(m, p);
265
307
  }
266
- const N = R.length;
267
- function Ae(l, d, m) {
268
- let x, b, M;
269
- const w = l.x - d.x, T = l.y - d.y, E = m.x - l.x, G = m.y - l.y, B = w * w + T * T, Q = w * G - T * E;
270
- if (Math.abs(Q) > Number.EPSILON) {
271
- const O = Math.sqrt(B), Pe = Math.sqrt(
272
- E * E + G * G
273
- ), Ce = d.x - T / O, _e = d.y + w / O, Ze = m.x - G / Pe, $e = m.y + E / Pe, ze = ((Ze - Ce) * G - ($e - _e) * E) / (w * G - T * E);
274
- x = Ce + w * ze - l.x, b = _e + T * ze - l.y;
275
- const je = x * x + b * b;
276
- if (je <= 2)
277
- return new P(x, b);
278
- M = Math.sqrt(je / 2);
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 O = !1;
281
- w > Number.EPSILON ? E > Number.EPSILON && (O = !0) : w < -Number.EPSILON ? E < -Number.EPSILON && (O = !0) : Math.sign(T) === Math.sign(G) && (O = !0), O ? (x = -T, b = w, M = Math.sqrt(B)) : (x = w, b = T, M = Math.sqrt(B / 2));
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 P(x / M, b / M);
325
+ return new z(x / L, b / L);
284
326
  }
285
- const re = [];
286
- for (let l = 0, d = D.length, m = d - 1, x = l + 1; l < d; l++, m++, x++)
287
- m === d && (m = 0), x === d && (x = 0), re[l] = Ae(D[l], D[m], D[x]);
288
- const ge = [];
289
- let q, ae = re.concat();
290
- for (let l = 0, d = pe; l < d; l++) {
291
- const m = I[l];
292
- q = [];
293
- for (let x = 0, b = m.length, M = b - 1, w = x + 1; x < b; x++, M++, w++)
294
- M === b && (M = 0), w === b && (w = 0), q[x] = Ae(m[x], m[M], m[w]);
295
- ge.push(q), ae = ae.concat(q);
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 J;
298
- if (S === 0)
299
- J = fe.triangulateShape(D, I);
339
+ let et;
340
+ if (w === 0)
341
+ et = yt.triangulateShape(R, B);
300
342
  else {
301
- const l = [], d = [];
302
- for (let m = 0; m < S; m++) {
303
- const x = m / S, b = u * Math.cos(x * Math.PI / 2), M = y * Math.sin(x * Math.PI / 2) + L;
304
- for (let w = 0, T = D.length; w < T; w++) {
305
- const E = te(D[w], re[w], M);
306
- W(E.x, E.y, -b), x === 0 && l.push(E);
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 w = 0, T = pe; w < T; w++) {
309
- const E = I[w];
310
- q = ge[w];
311
- const G = [];
312
- for (let B = 0, Q = E.length; B < Q; B++) {
313
- const O = te(E[B], q[B], M);
314
- W(O.x, O.y, -b), x === 0 && G.push(O);
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 && d.push(G);
358
+ x === 0 && m.push(_);
317
359
  }
318
360
  }
319
- J = fe.triangulateShape(
361
+ et = yt.triangulateShape(
320
362
  l,
321
- d
363
+ m
322
364
  );
323
365
  }
324
- const ce = J.length, Me = y + L;
325
- for (let l = 0; l < N; l++) {
326
- const d = g ? te(R[l], ae[l], Me) : R[l];
327
- $ ? (ie.copy(U.normals[0]).multiplyScalar(d.x), se.copy(U.binormals[0]).multiplyScalar(d.y), X.copy(H[0]).add(ie).add(se), W(X.x, X.y, X.z)) : W(d.x, d.y, 0);
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 <= i; l++)
330
- for (let d = 0; d < N; d++) {
331
- const m = g ? te(R[d], ae[d], Me) : R[d];
332
- $ ? (ie.copy(U.normals[l]).multiplyScalar(m.x), se.copy(U.binormals[l]).multiplyScalar(m.y), X.copy(H[l]).add(ie).add(se), W(X.x, X.y, X.z)) : W(m.x, m.y, c / i * l);
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 = S - 1; l >= 0; l--) {
335
- const d = l / S, m = u * Math.cos(d * Math.PI / 2), x = y * Math.sin(d * Math.PI / 2) + L;
336
- for (let b = 0, M = D.length; b < M; b++) {
337
- const w = te(D[b], re[b], x);
338
- W(w.x, w.y, c + m);
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, M = I.length; b < M; b++) {
341
- const w = I[b];
342
- q = ge[b];
343
- for (let T = 0, E = w.length; T < E; T++) {
344
- const G = te(w[T], q[T], x);
345
- $ ? W(
346
- G.x,
347
- G.y + H[i - 1].y,
348
- H[i - 1].x + m
349
- ) : W(G.x, G.y, c + m);
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
- Fe(), ee && qe();
354
- function Fe() {
395
+ Zt(), O && $t();
396
+ function Zt() {
355
397
  const l = s.length / 3;
356
398
  if (g) {
357
- let d = 0, m = N * d;
358
- if (j)
359
- for (let x = 0; x < ce; x++) {
360
- const b = J[x];
361
- le(b[2] + m, b[1] + m, b[0] + m);
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 (d = i + S * 2, m = N * d, v)
364
- for (let x = 0; x < ce; x++) {
365
- const b = J[x];
366
- le(b[0] + m, b[1] + m, b[2] + m);
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 (j)
370
- for (let d = 0; d < ce; d++) {
371
- const m = J[d];
372
- le(m[2], m[1], m[0]);
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 (v)
375
- for (let d = 0; d < ce; d++) {
376
- const m = J[d];
377
- le(
378
- m[0] + N * i,
379
- m[1] + N * i,
380
- m[2] + N * i
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 qe() {
428
+ function $t() {
387
429
  const l = s.length / 3;
388
- let d = 0;
389
- Le(D, d), d += D.length;
390
- for (let m = 0, x = I.length; m < x; m++) {
391
- const b = I[m];
392
- Le(b, d), d += b.length;
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 Le(l, d) {
397
- let m = l.length;
398
- for (; --m >= 0; ) {
399
- const x = m;
400
- let b = m - 1;
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 M = 0, w = i + S * 2; M < w; M++) {
403
- const T = N * M, E = N * (M + 1), G = d + x + T, B = d + b + T, Q = d + b + E, O = d + x + E;
404
- Ye(G, B, Q, O);
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 W(l, d, m) {
409
- r.push(l), r.push(d), r.push(m);
450
+ function F(l, m, p) {
451
+ i.push(l), i.push(m), i.push(p);
410
452
  }
411
- function le(l, d, m) {
412
- k(l), k(d), k(m);
413
- const x = s.length / 3, b = C.generateTopUV(
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
- F(b[0]), F(b[1]), F(b[2]);
462
+ Z(b[0]), Z(b[1]), Z(b[2]);
421
463
  }
422
- function Ye(l, d, m, x) {
423
- k(l), k(d), k(x), k(d), k(m), k(x);
424
- const b = s.length / 3, M = C.generateSideWallUV(
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
- F(M[0]), F(M[1]), F(M[3]), F(M[1]), F(M[2]), F(M[3]);
474
+ Z(L[0]), Z(L[1]), Z(L[3]), Z(L[1]), Z(L[2]), Z(L[3]);
433
475
  }
434
- function k(l) {
435
- s.push(r[l * 3 + 0]), s.push(r[l * 3 + 1]), s.push(r[l * 3 + 2]);
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 F(l) {
438
- o.push(l.x), o.push(l.y);
479
+ function Z(l) {
480
+ r.push(l.x), r.push(l.y);
439
481
  }
440
482
  }
441
483
  }
442
- copy(e) {
443
- return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
484
+ copy(t) {
485
+ return super.copy(t), this.parameters = Object.assign({}, t.parameters), this;
444
486
  }
445
487
  toJSON() {
446
- const e = super.toJSON(), t = this.parameters.shapes, n = this.parameters.options;
447
- return Rt(t, n, e);
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(e, t) {
499
+ static fromJSON(t, e) {
458
500
  const n = [];
459
- for (let o = 0, a = e.shapes.length; o < a; o++) {
460
- const f = t[e.shapes[o]];
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 = e.options.extrudePath;
464
- return s !== void 0 && (e.options.extrudePath = new Bt[s.type]().fromJSON(
505
+ const s = t.options.extrudePath;
506
+ return s !== void 0 && (t.options.extrudePath = new De[s.type]().fromJSON(
465
507
  s
466
- )), new K(n, e.options);
508
+ )), new st(n, t.options);
467
509
  }
468
510
  }
469
- const Ot = {
470
- generateTopUV: function(p, e, t, n, s) {
471
- const o = e[t * 3], a = e[t * 3 + 1], f = e[n * 3], r = e[n * 3 + 1], h = e[s * 3], i = e[s * 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];
472
514
  return [
473
- new P(o, a),
474
- new P(f, r),
475
- new P(h, i)
515
+ new z(r, a),
516
+ new z(f, i),
517
+ new z(h, o)
476
518
  ];
477
519
  },
478
- generateSideWallUV: function(p, e, t, n, s, o) {
479
- const a = e[t * 3], f = e[t * 3 + 1], r = e[t * 3 + 2], h = e[n * 3], i = e[n * 3 + 1], c = e[n * 3 + 2], g = e[s * 3], u = e[s * 3 + 1], y = e[s * 3 + 2], L = e[o * 3], S = e[o * 3 + 1], A = e[o * 3 + 2];
480
- return Math.abs(f - i) < Math.abs(a - h) ? [
481
- new P(a, 1 - r),
482
- new P(h, 1 - c),
483
- new P(g, 1 - y),
484
- new P(L, 1 - A)
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 P(f, 1 - r),
487
- new P(i, 1 - c),
488
- new P(u, 1 - y),
489
- new P(S, 1 - A)
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 Rt(p, e, t) {
494
- if (t.shapes = [], Array.isArray(p))
495
- for (let n = 0, s = p.length; n < s; n++) {
496
- const o = p[n];
497
- t.shapes.push(o.uuid);
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
- t.shapes.push(p.uuid);
501
- return t.options = Object.assign({}, e), e.extrudePath !== void 0 && (t.options.extrudePath = e.extrudePath.toJSON()), t;
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 Ut extends K {
504
- constructor(e, t) {
505
- super(e, t);
506
- const n = new Ue(
507
- new K(e, ue(z({}, t), {
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 pt().setFromObject(n), o = new _();
515
- s.getSize(o);
516
- const a = new _(
517
- s.min.x + o.x / 2,
518
- s.min.y + o.y / 2,
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 = t.topSegments, r = t.box3;
522
- if (r) {
523
- r = r.union(s);
524
- const A = new _();
525
- r.getSize(A);
526
- const C = Math.max(
527
- o.x / A.x,
528
- o.y / A.y
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(t.topSegments * C);
572
+ f = Math.ceil(e.topSegments * E);
531
573
  }
532
574
  if (f < 4)
533
575
  return this;
534
- const h = new gt(
535
- o.x,
536
- o.y,
576
+ const h = new we(
577
+ r.x,
578
+ r.y,
537
579
  f,
538
580
  f
539
- ), i = new Ue(h);
540
- i.position.set(a.x, a.y, a.z), i.updateMatrixWorld();
541
- const g = new _t().evaluate(i, n, zt), u = g.geometry.getAttribute("position"), y = new xe(
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 A = 0; A < u.count; A++) {
546
- const C = u.getZ(A);
547
- u.setZ(A, t.depth + C);
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 (r) {
550
- const A = r.min, C = r.max, v = new _().subVectors(C, A);
551
- for (let j = 0; j < u.count; j++) {
552
- const ee = u.getX(j), H = u.getY(j), $ = (ee - A.x) / v.x, U = (H - A.y) / v.y;
553
- y.setXY(j, $, U);
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 L = new K(e, ue(z({}, t), {
600
+ const A = new st(t, gt(X({}, e), {
559
601
  hasTop: !1
560
- })), S = V([g.geometry, L], 2);
561
- this.copy(S.toNonIndexed());
602
+ })), w = q([g.geometry, A], 2);
603
+ this.copy(w.toNonIndexed());
562
604
  }
563
605
  }
564
- const Ve = (p) => {
606
+ const Xt = (d) => {
565
607
  const {
566
- split: e,
567
- depth: t,
608
+ split: t,
609
+ depth: e,
568
610
  points: n,
569
611
  box3: s,
570
- hasTop: o,
612
+ hasTop: r,
571
613
  hasBottom: a,
572
614
  hasSide: f,
573
- sideRepeat: r,
615
+ sideRepeat: i,
574
616
  topSegments: h
575
- } = p, i = h ? Ut : K, c = new i(new we(n), {
576
- depth: t,
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: Pt({
580
- split: e,
621
+ UVGenerator: je({
622
+ split: t,
581
623
  box3: s,
582
- sideRepeat: r
624
+ sideRepeat: i
583
625
  }),
584
- hasTop: o,
626
+ hasTop: r,
585
627
  hasBottom: a,
586
628
  hasSide: f,
587
629
  topSegments: h
588
630
  });
589
- return Ct(), c;
631
+ return Ce(), c;
590
632
  };
591
- class Qt extends Z {
592
- constructor(e) {
593
- super(), this.options = z({
633
+ class sn extends K {
634
+ constructor(t) {
635
+ super(), this.options = X({
594
636
  depth: 1
595
- }, e);
637
+ }, t);
596
638
  }
597
639
  create() {
598
- return oe(this, null, function* () {
640
+ return ct(this, null, function* () {
599
641
  const {
600
- points: e,
601
- pointsArr: t,
642
+ points: t,
643
+ pointsArr: e,
602
644
  useGroups: n,
603
645
  depth: s,
604
- geometry: o,
646
+ geometry: r,
605
647
  geometryArr: a,
606
648
  material: f,
607
- box3: r,
649
+ box3: i,
608
650
  split: h,
609
- hasTop: i,
651
+ hasTop: o,
610
652
  hasBottom: c,
611
653
  hasSide: g
612
- } = this.options, u = Array.isArray(s) ? s : [s], y = Array.isArray(r) ? r : [r], L = f;
613
- let S = o;
614
- L || console.log("material is null"), !S && e ? S = Ve({
615
- points: e,
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: i,
661
+ hasTop: o,
620
662
  hasBottom: c,
621
663
  hasSide: g
622
- }) : !S && t ? S = V(
623
- t.map(
624
- (A, C) => {
625
- var v, j;
626
- return Ve({
627
- points: A,
628
- depth: (v = u[C]) != null ? v : u[0],
629
- box3: (j = y[C]) != null ? j : y[0],
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: i,
673
+ hasTop: o,
632
674
  hasBottom: c,
633
675
  hasSide: g
634
676
  });
635
677
  }
636
678
  ),
637
679
  n != null ? n : 0
638
- ) : !S && a && a.length > 1 ? S = V(a, n != null ? n : 0) : !S && a && a.length === 1 && ([S] = a), this.createMesh(S, L);
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(e) {
642
- const t = this.object3d, n = V([t.geometry, ...e]);
643
- t.geometry = n;
683
+ addGeometries(t) {
684
+ const e = this.object3d, n = q([e.geometry, ...t]);
685
+ e.geometry = n;
644
686
  }
645
- setTextureAnisotropic(e, t) {
646
- e.anisotropy = t || this.pencil.renderer.capabilities.getMaxAnisotropy();
687
+ setTextureAnisotropic(t, e) {
688
+ t.anisotropy = e || this.pencil.renderer.capabilities.getMaxAnisotropy();
647
689
  }
648
690
  }
649
- const Kt = (p) => {
691
+ const on = (d) => {
650
692
  const {
651
- topColor: e,
652
- sideColor: t,
693
+ topColor: t,
694
+ sideColor: e,
653
695
  sideMap: n,
654
696
  createCanvasObjectURL: s,
655
- split: o,
697
+ split: r,
656
698
  maxAnisotropy: a
657
- } = p;
699
+ } = d;
658
700
  return new Promise((f) => {
659
- const r = n ? document.createElement("img") : {
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
- r.onload = () => {
667
- const h = o, i = document.createElement("canvas"), c = i.getContext("2d");
668
- i.height = r.height / (1 - h), i.width = r.width, h && e && (c.fillStyle = e, c.fillRect(0, 0, r.width, i.height * h)), n && r instanceof HTMLImageElement ? c.drawImage(r, 0, i.height * h, r.width, r.height) : t && (c.fillStyle = t, c.fillRect(0, i.height * h, r.width, r.height)), s && i.toBlob((u) => {
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 yt(i);
713
+ const g = new ve(o);
672
714
  f(g);
673
- }, n ? r.src = n : r instanceof HTMLImageElement || r.onload();
715
+ }, n ? i.src = n : i instanceof HTMLImageElement || i.onload();
674
716
  });
675
717
  };
676
- class en extends Z {
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 tn extends Z {
682
- constructor(e) {
683
- super(), this.rectAreaLightUniformsLibInit = !1, this.options = e;
730
+ class an extends K {
731
+ constructor(t) {
732
+ super(), this.rectAreaLightUniformsLibInit = !1, this.options = t;
684
733
  }
685
734
  create() {
686
- var t, n, s, o, a, f, r, h, i, c, g, u, y, L, S, A, C;
687
- const e = this.options;
688
- if (e.type === "AmbientLight") {
689
- const v = new bt(e.color);
690
- v.name = "环境光", this.object3d = v;
691
- } else if (e.type === "DirectionalLight") {
692
- const v = new xt(e.color, e.intensity);
693
- v.name = "平行光", v.target.position.set(0, 0, 0), this.object3d = v, v.target.name = "平行光目标", v.shadow.camera.name = "平行光阴影相机", v.shadow.camera.userData.directionalLightShadow = !0, this.directionalLight = v;
694
- } else if (e.type === "PointLight") {
695
- const v = new wt(
696
- (t = e.color) != null ? t : 16777215,
697
- (n = e.intensity) != null ? n : 1,
698
- (s = e.distance) != null ? s : 0,
699
- (o = e.decay) != null ? o : 2
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
- v.name = "点光源", this.object3d = v, this.pointLight = v;
702
- } else if (e.type === "SpotLight") {
703
- const v = new vt(
704
- (a = e.color) != null ? a : 16777215,
705
- (f = e.intensity) != null ? f : 1,
706
- (r = e.distance) != null ? r : 0,
707
- (h = e.angle) != null ? h : Math.PI / 3,
708
- (i = e.penumbra) != null ? i : 1,
709
- (c = e.decay) != null ? c : 2
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
- v.name = "聚光灯", this.object3d = v, this.spotLight = v, v.target.name = "聚光灯目标";
712
- } else if (e.type === "HemisphereLight") {
713
- const v = new St(
714
- (g = e.color) != null ? g : 16777215,
715
- (u = e.groundColor) != null ? u : 16777215,
716
- (y = e.intensity) != null ? y : 1
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
- v.name = "半球光", this.object3d = v, this.hemisphereLight = v;
719
- } else if (e.type === "RectAreaLight") {
720
- this.rectAreaLightUniformsLibInit || (jt.init(), this.rectAreaLightUniformsLibInit = !0);
721
- const v = new At(
722
- (L = e.color) != null ? L : 16777215,
723
- (S = e.intensity) != null ? S : 1,
724
- (A = e.width) != null ? A : 10,
725
- (C = e.height) != null ? C : 10
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
- v.name = "矩形区域光", this.object3d = v, this.rectAreaLight = v;
776
+ S.name = "矩形区域光", this.object3d = S, this.rectAreaLight = S;
728
777
  }
729
778
  }
730
779
  render() {
731
- const e = this.object3d;
732
- e.target && this.pencil.scene.add(e.target);
733
- const t = this.pencil.cameraTarget;
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(t), n.target.position.copy(t);
737
- } else this.pointLight && this.pointLight.position.copy(t);
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 e = this.object3d;
741
- e.target && this.pencil.scene.remove(e.target), super.dispose();
789
+ const t = this.object3d;
790
+ t.target && this.pencil.scene.remove(t.target), super.dispose();
742
791
  }
743
792
  }
744
- class Dt extends me {
745
- constructor(e = [], t = "none", n) {
746
- super(), this.type = "MeshLineGeometry", this.pointCount = 0, this._points = [], this.shape = "none", this.shapeFunction = (s) => 1, this.matrixWorld = new Ne(), this.shape = t, n && (this.shapeFunction = n), e.length > 0 && this.setPoints(e);
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(e) {
749
- if (typeof e[0] == "number") {
750
- const t = [], n = e;
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
- t.push(new _(n[s], n[s + 1], n[s + 2]));
753
- return t;
801
+ e.push(new j(n[s], n[s + 1], n[s + 2]));
802
+ return e;
754
803
  } else
755
- return e.map((t) => {
756
- if (t instanceof P)
757
- return new _(t.x, t.y, 0);
758
- if (t instanceof _)
759
- return t;
760
- if (Array.isArray(t) && t.length === 2)
761
- return new _(t[0], t[1], 0);
762
- if (Array.isArray(t) && t.length === 3)
763
- return new _(t[0], t[1], t[2]);
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(e) {
767
- this.matrixWorld = e;
815
+ setMatrixWorld(t) {
816
+ this.matrixWorld = t;
768
817
  }
769
- setPoints(e, t) {
770
- !e || e.length === 0 || (this._points = this.convertToVector3Array(e), this.pointCount = this._points.length, t && (this.shapeFunction = t, this.shape = "custom"), this.initializeGeometry(), this.updateGeometry());
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 e = new Y(
822
+ const t = new Q(
774
823
  new Float32Array(this.pointCount * 6),
775
824
  3
776
- ), t = new Y(
825
+ ), e = new Q(
777
826
  new Float32Array(this.pointCount * 6),
778
827
  3
779
- ), n = new Y(new Float32Array(this.pointCount * 6), 3), s = new Y(
828
+ ), n = new Q(new Float32Array(this.pointCount * 6), 3), s = new Q(
780
829
  new Float32Array(this.pointCount * 2),
781
830
  1
782
- ), o = new Y(new Float32Array(this.pointCount * 2), 1), a = new Y(new Float32Array(this.pointCount * 2), 1), f = new Y(new Float32Array(this.pointCount * 4), 2), r = new Y(
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, i = 0, c = 0; h < this.pointCount; h += 1, i += 2, c += 6) {
788
- s.setX(i, h / this.pointCount), s.setX(i + 1, h / this.pointCount), o.setX(i, 1), o.setX(i + 1, -1);
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(i, g), a.setX(i + 1, g);
839
+ a.setX(o, g), a.setX(o + 1, g);
791
840
  const u = h / (this.pointCount - 1);
792
- if (f.setXY(i, u, 0), f.setXY(i + 1, u, 1), h < this.pointCount - 1) {
841
+ if (f.setXY(o, u, 0), f.setXY(o + 1, u, 1), h < this.pointCount - 1) {
793
842
  const y = h * 2;
794
- r.setX(c + 0, y + 0), r.setX(c + 1, y + 1), r.setX(c + 2, y + 2), r.setX(c + 3, y + 2), r.setX(c + 4, y + 1), r.setX(c + 5, y + 3);
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", e), this.setAttribute("previous", t), this.setAttribute("next", n), this.setAttribute("counters", s), this.setAttribute("side", o), this.setAttribute("width", a), this.setAttribute("uv", f), this.setIndex(r);
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 e = this.getAttribute("position"), t = this.getAttribute("previous"), n = this.getAttribute("next");
802
- let s = 0, o = 0, a = 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
- t.setXYZ(o, f.x, f.y, f.z), o += 1, t.setXYZ(o, f.x, f.y, f.z), o += 1;
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 i = this._points[h];
807
- e.setXYZ(s, i.x, i.y, i.z), s += 1, e.setXYZ(s, i.x, i.y, i.z), s += 1, h < this.pointCount - 1 && (t.setXYZ(o, i.x, i.y, i.z), o += 1, t.setXYZ(o, i.x, i.y, i.z), o += 1), h > 0 && h + 1 <= this.pointCount && (n.setXYZ(a, i.x, i.y, i.z), a += 1, n.setXYZ(a, i.x, i.y, i.z), a += 1);
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 r = this._points[this.pointCount - 1];
810
- n.setXYZ(a, r.x, r.y, r.z), a += 1, n.setXYZ(a, r.x, r.y, r.z), a += 1, e.needsUpdate = !0, t.needsUpdate = !0, n.needsUpdate = !0, this.computeBoundingSphere(), this.computeBoundingBox();
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(e) {
816
- this.setPoints(e);
864
+ set points(t) {
865
+ this.setPoints(t);
817
866
  }
818
- updatePoints(e, t) {
819
- const n = this.convertToVector3Array(e);
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, t && (this.shapeFunction = t, this.shape = "custom", this.initializeGeometry()), this.updateGeometry();
875
+ this._points = n, e && (this.shapeFunction = e, this.shape = "custom", this.initializeGeometry()), this.updateGeometry();
827
876
  }
828
- setShape(e, t) {
829
- this.shape = e, t && (this.shapeFunction = t), this._points.length > 0 && (this.initializeGeometry(), this.updateGeometry());
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 nn(p, e) {
833
- const t = new Ne(), n = new Mt(), s = new Lt(), o = new _(), a = this.geometry;
834
- if (s.copy(a.boundingSphere), s.applyMatrix4(this.matrixWorld), !p.ray.intersectSphere(s, o)) return;
835
- t.copy(this.matrixWorld).invert(), n.copy(p.ray).applyMatrix4(t);
836
- const f = new _(), r = new _(), h = new _(), i = this instanceof We ? 2 : 1, c = a.index, g = a.attributes;
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, L = g.width.array;
839
- for (let S = 0, A = u.length - 1; S < A; S += i) {
840
- const C = u[S], v = u[S + 1];
841
- f.fromArray(y, C * 3), r.fromArray(y, v * 3);
842
- const j = L[Math.floor(S / 3)] !== void 0 ? L[Math.floor(S / 3)] : 1, ee = p.params.Line.threshold + this.material.lineWidth * j / 2, H = ee * ee;
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
- ) > H) continue;
849
- o.applyMatrix4(this.matrixWorld);
850
- const U = p.ray.origin.distanceTo(o);
851
- U < p.near || U > p.far || (e.push({
852
- distance: U,
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: S,
905
+ index: w,
857
906
  face: null,
858
907
  faceIndex: void 0,
859
908
  object: this
860
- }), S = A);
909
+ }), w = v);
861
910
  }
862
911
  }
863
912
  }
864
- const be = (p) => {
865
- const { setPointWidth: e, nodes: t } = p, n = new Dt();
866
- return n.setPoints(t, e), n;
867
- }, He = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new Map();
868
- let sn = class extends Z {
869
- constructor(e = {}) {
870
- super(), this.options = z({}, e);
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 e;
874
- return (e = this.object3d) == null ? void 0 : e.material;
922
+ var t;
923
+ return (t = this.object3d) == null ? void 0 : t.material;
875
924
  }
876
925
  create() {
877
- return oe(this, null, function* () {
926
+ return ct(this, null, function* () {
878
927
  const {
879
- nodes: e,
880
- nodesArr: t,
928
+ nodes: t,
929
+ nodesArr: e,
881
930
  geometry: n,
882
931
  geometryArr: s,
883
- material: o,
932
+ material: r,
884
933
  useGroups: a,
885
934
  setPointWidth: f,
886
- lineWidthArr: r,
935
+ lineWidthArr: i,
887
936
  materialParameters: h
888
937
  } = this.options;
889
- let i = o, c = n;
890
- !i && h && (i = this.getMaterial(h)), !c && e ? c = be({
891
- nodes: e,
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 && t ? c = V(
894
- t.map((g, u) => {
942
+ }) : !c && e ? c = q(
943
+ e.map((g, u) => {
895
944
  let y = f;
896
- return !y && r && (y = () => {
897
- var L;
898
- return (L = r[u]) != null ? L : r[0];
899
- }), be({
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 = V(s, a != null ? a : 0) : !c && s && s.length === 1 && ([c] = s), this.createMesh(c, i);
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(e, t) {
909
- const n = be({
910
- nodes: e,
911
- setPointWidth: t
912
- }), s = this.object3d, o = s.geometry;
913
- s.geometry = n, o.dispose();
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(e) {
916
- const { width: t, height: n } = this.pencil.getSize(), s = new st(z({
917
- color: new ke("#ffffff")
918
- }, e));
919
- return s.uniforms.resolution.value.set(t, n), s;
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(e) {
922
- const t = this.object3d, n = V([t.geometry, ...e]);
923
- t.geometry = n;
970
+ addGeometries(t) {
971
+ const e = this.object3d, n = q([e.geometry, ...t]);
972
+ e.geometry = n;
924
973
  }
925
- resize(e, t) {
974
+ resize(t, e) {
926
975
  var n, s;
927
- (s = (n = this.material) == null ? void 0 : n.uniforms) == null || s.resolution.value.set(e, t);
976
+ (s = (n = this.material) == null ? void 0 : n.uniforms) == null || s.resolution.value.set(t, e);
928
977
  }
929
- handleMaterialChange(e) {
930
- if (e) {
931
- const { width: t, height: n } = this.pencil.getSize();
932
- this.resize(t, n);
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: e = 1e3,
937
- delay: t = 0,
985
+ duration: t = 1e3,
986
+ delay: e = 0,
938
987
  repeat: n = 0,
939
988
  lineLoop: s,
940
- onRepeat: o,
989
+ onRepeat: r,
941
990
  onUpdate: a,
942
991
  onComplete: f,
943
- startShow: r
992
+ startShow: i
944
993
  } = {}) {
945
- const { offset: h, offsetLoop: i } = this.material.uniforms, c = this.pencil.userData.debugLine ? de : He;
946
- if (c.get(this.material) && this.stopAnimation(), e === 0) return;
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, i.value = g && r ? 1 : 0;
997
+ h.value.x = 1, o.value = g && i ? 1 : 0;
949
998
  let u = 0;
950
- const y = new ne.Tween(h.value).to({ x: -1 }, e).delay(t).repeat(n).onUpdate(({ x: L }) => {
951
- g && L <= 0 && i.value === 0 && (i.value = 1), a == null || a(L);
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, o == null || o(u);
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", de.size);
1008
+ }), this.pencil.userData.debugLine && console.log("animate", bt.size);
960
1009
  }
961
1010
  stopAnimation() {
962
- const e = this.pencil.userData.debugLine ? de : He, t = e.get(this.material);
963
- t && (t.stop(), ne.remove(t), e.delete(this.material), this.material.uniforms.offset.value.x = 0, this.material.uniforms.offsetLoop.value = 1), this.pencil.userData.debugLine && console.log("stopAnimation", de.size);
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: e, height: t } = this.pencil.getSize();
967
- this.resize(e, t);
1015
+ const { width: t, height: e } = this.pencil.getSize();
1016
+ this.resize(t, e);
968
1017
  }
969
1018
  };
970
- const Xe = (p) => {
971
- const { points: e } = p, t = e.reduce((s, o, a) => (a < e.length - 1 && s.push(o, e[a + 1]), s), []);
972
- return new me().setFromPoints(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
+ return new lt().setFromPoints(e);
973
1022
  };
974
- class rn extends Z {
975
- constructor(e = {}) {
976
- super(), this.options = z({}, e);
1023
+ class un extends K {
1024
+ constructor(t = {}) {
1025
+ super(), this.options = X({}, t);
977
1026
  }
978
1027
  get material() {
979
- var e;
980
- return (e = this.object3d) == null ? void 0 : e.material;
1028
+ var t;
1029
+ return (t = this.object3d) == null ? void 0 : t.material;
981
1030
  }
982
1031
  create() {
983
- return oe(this, null, function* () {
1032
+ return ct(this, null, function* () {
984
1033
  const {
985
- points: e,
986
- pointsArr: t,
1034
+ points: t,
1035
+ pointsArr: e,
987
1036
  geometry: n,
988
1037
  geometryArr: s,
989
- material: o,
1038
+ material: r,
990
1039
  useGroups: a,
991
1040
  setPointWidth: f,
992
- lineWidthArr: r,
1041
+ lineWidthArr: i,
993
1042
  materialParameters: h,
994
- instanceCount: i
1043
+ instanceCount: o
995
1044
  } = this.options;
996
- let c = o, g = n;
997
- !c && h && (c = this.getMaterial(h)), !g && e ? g = Xe({
998
- points: e
999
- }) : !g && t ? g = V(
1000
- t.map((y) => Xe({
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 = V(s, a != null ? a : 0) : !g && s && s.length === 1 && ([g] = s);
1005
- const u = new tt().fromLineSegments(
1006
- new We(g)
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
- i && (u.instanceCount = i);
1010
- const y = new it(u, c);
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 It(u, c);
1062
+ const y = new Oe(u, c);
1014
1063
  y.computeLineDistances(), this.object3d = y;
1015
1064
  }
1016
1065
  });
1017
1066
  }
1018
- getMaterial(e) {
1019
- return new et(z({
1020
- color: new ke("#ffffff")
1021
- }, e));
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 cn extends Z {
1072
- constructor(e) {
1073
- super(), this.options = z({
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
- }, e);
1081
+ }, t);
1080
1082
  }
1081
1083
  create() {
1082
- return oe(this, null, function* () {
1084
+ return ct(this, null, function* () {
1083
1085
  this.createGroup();
1084
- const { data: e, maxDepth: t, colors: n, material: s, percentDepth: o, activeIndex: a } = this.options, f = Math.max(...e), r = e.reduce((i, c) => i + c, 0);
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
- e.forEach((i, c) => {
1087
- if (i === 0) return;
1088
- const g = Math.PI * 2 * (i / r), u = n[c], y = o ? t * (i / f) : t, L = this.createGeometry(y, g), S = s ? s.clone() : new Tt({
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 && S.color.set(u);
1092
- const A = new Et(L, S);
1093
- A.userData.depth = y, A.userData.index = c, A.rotateZ(h), h += g, this.add(A);
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(e, t) {
1098
- const { outRadius: n, innerRadius: s } = this.options, o = new we();
1099
- return o.moveTo(n, 0), o.lineTo(s, 0), o.absarc(0, 0, s, 0, t, !1), o.absarc(0, 0, n, t, 0, !0), new K(o, {
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: e,
1103
+ depth: t,
1102
1104
  bevelEnabled: !1
1103
1105
  });
1104
1106
  }
1105
- handlePick(e, t = 1.3) {
1106
- const { object: n } = this.pencil.pick(e, this.object3d.children) || {}, s = n ? this.object3d.children.findIndex((o) => o === n) : this.options.activeIndex;
1107
- return this.setActive(s, t);
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(e, t = 1.3) {
1110
- const n = this.object3d.children[e];
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 o = new ne.Tween(s.scale).to({ z: 1 }, 100);
1116
- s.userData.levTween = o, o.start();
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 ne.Tween(n.scale).to({ z: t }, 100);
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 ne.Tween(this.object3d.scale).to({ z: 1 }, 1e3).easing(ne.Easing.Sinusoidal.InOut).start();
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
- Jt as ConicPolygon,
1133
- Qt as ExtrudePolygon,
1134
- en as Group,
1135
- tn as Light,
1136
- sn as Line,
1137
- rn as Line2,
1138
- un as Line2Material,
1139
- dn as LineSegmentsGeometry,
1140
- Dt as MeshLineGeometry,
1141
- st as MeshLineMaterial,
1142
- nn as MeshLineRaycast,
1143
- an as Node,
1144
- cn as Pie,
1145
- nt as getConicPolygonGeometry,
1146
- pn as getConicPolygonGeometryMetas,
1147
- Kt as getSplitTexture
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
  };