gl-draw 0.17.0-beta.2 → 0.17.0-beta.21

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