@mlightcad/geometry-engine 1.0.7 → 2.0.0

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.
@@ -258,8 +258,8 @@ const k = [
258
258
  "ff"
259
259
  ];
260
260
  let St = 1234567;
261
- const Rt = Math.PI / 180, Tt = 180 / Math.PI;
262
- function Qt() {
261
+ const Lt = Math.PI / 180, Tt = 180 / Math.PI;
262
+ function Ot() {
263
263
  const u = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, s = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0;
264
264
  return (k[u & 255] + k[u >> 8 & 255] + k[u >> 16 & 255] + k[u >> 24 & 255] + "-" + k[t & 255] + k[t >> 8 & 255] + "-" + k[t >> 16 & 15 | 64] + k[t >> 24 & 255] + "-" + k[s & 63 | 128] + k[s >> 8 & 255] + "-" + k[s >> 16 & 255] + k[s >> 24 & 255] + k[e & 255] + k[e >> 8 & 255] + k[e >> 16 & 255] + k[e >> 24 & 255]).toLowerCase();
265
265
  }
@@ -269,100 +269,100 @@ function j(u, t, s) {
269
269
  function Vt(u, t) {
270
270
  return (u % t + t) % t;
271
271
  }
272
- function Ot(u, t, s, e, n) {
272
+ function Wt(u, t, s, e, n) {
273
273
  return e + (u - t) * (n - e) / (s - t);
274
274
  }
275
- function Wt(u, t, s) {
275
+ function Ht(u, t, s) {
276
276
  return u !== t ? (s - u) / (t - u) : 0;
277
277
  }
278
278
  function Ut(u, t, s) {
279
279
  return (1 - s) * u + s * t;
280
280
  }
281
- function Ht(u, t, s, e) {
281
+ function $t(u, t, s, e) {
282
282
  return Ut(u, t, 1 - Math.exp(-s * e));
283
283
  }
284
- function $t(u, t = 1) {
284
+ function Jt(u, t = 1) {
285
285
  return t - Math.abs(Vt(u, t * 2) - t);
286
286
  }
287
- function Jt(u, t, s) {
287
+ function vt(u, t, s) {
288
288
  return u <= t ? 0 : u >= s ? 1 : (u = (u - t) / (s - t), u * u * (3 - 2 * u));
289
289
  }
290
- function vt(u, t, s) {
290
+ function ts(u, t, s) {
291
291
  return u <= t ? 0 : u >= s ? 1 : (u = (u - t) / (s - t), u * u * u * (u * (u * 6 - 15) + 10));
292
292
  }
293
- function ts(u, t) {
293
+ function ss(u, t) {
294
294
  return u + Math.floor(Math.random() * (t - u + 1));
295
295
  }
296
- function ss(u, t) {
296
+ function es(u, t) {
297
297
  return u + Math.random() * (t - u);
298
298
  }
299
- function es(u) {
299
+ function ns(u) {
300
300
  return u * (0.5 - Math.random());
301
301
  }
302
- function ns(u) {
302
+ function is(u) {
303
303
  u !== void 0 && (St = u);
304
304
  let t = St += 1831565813;
305
305
  return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
306
306
  }
307
- function is(u) {
308
- return u * Rt;
309
- }
310
307
  function rs(u) {
311
- return u * Tt;
308
+ return u * Lt;
312
309
  }
313
310
  function hs(u) {
314
- return (u & u - 1) === 0 && u !== 0;
311
+ return u * Tt;
315
312
  }
316
313
  function os(u) {
317
- return Math.pow(2, Math.ceil(Math.log(u) / Math.LN2));
314
+ return (u & u - 1) === 0 && u !== 0;
318
315
  }
319
316
  function as(u) {
317
+ return Math.pow(2, Math.ceil(Math.log(u) / Math.LN2));
318
+ }
319
+ function cs(u) {
320
320
  return Math.pow(2, Math.floor(Math.log(u) / Math.LN2));
321
321
  }
322
322
  function mt(u) {
323
323
  const t = Math.PI * 2;
324
324
  return (u % t + t) % t;
325
325
  }
326
- function cs(u, t, s) {
326
+ function ls(u, t, s) {
327
327
  return u > t && u < s || u > s && u < t;
328
328
  }
329
- function ls(u, t, s, e = !1) {
329
+ function us(u, t, s, e = !1) {
330
330
  return u = mt(u), t = mt(t), s = mt(s), e ? t > s ? u <= t && u >= s : u <= t || u >= s : t < s ? u >= t && u <= s : u >= t || u <= s;
331
331
  }
332
332
  function qt(u) {
333
333
  return u = Math.abs(u), u < 1 ? 0 : Math.ceil(Math.log10(Math.abs(u) + 1));
334
334
  }
335
- function us(u, t = 1e-7) {
335
+ function ds(u, t = 1e-7) {
336
336
  const s = qt(u);
337
337
  return Math.max(Math.pow(10, s) * t, t);
338
338
  }
339
- const C = {
340
- DEG2RAD: Rt,
339
+ const S = {
340
+ DEG2RAD: Lt,
341
341
  RAD2DEG: Tt,
342
- generateUUID: Qt,
342
+ generateUUID: Ot,
343
343
  clamp: j,
344
344
  euclideanModulo: Vt,
345
- mapLinear: Ot,
346
- inverseLerp: Wt,
345
+ mapLinear: Wt,
346
+ inverseLerp: Ht,
347
347
  lerp: Ut,
348
- damp: Ht,
349
- pingpong: $t,
350
- smoothstep: Jt,
351
- smootherstep: vt,
352
- randInt: ts,
353
- randFloat: ss,
354
- randFloatSpread: es,
355
- seededRandom: ns,
356
- degToRad: is,
357
- radToDeg: rs,
358
- isPowerOfTwo: hs,
359
- ceilPowerOfTwo: os,
360
- floorPowerOfTwo: as,
348
+ damp: $t,
349
+ pingpong: Jt,
350
+ smoothstep: vt,
351
+ smootherstep: ts,
352
+ randInt: ss,
353
+ randFloat: es,
354
+ randFloatSpread: ns,
355
+ seededRandom: is,
356
+ degToRad: rs,
357
+ radToDeg: hs,
358
+ isPowerOfTwo: os,
359
+ ceilPowerOfTwo: as,
360
+ floorPowerOfTwo: cs,
361
361
  normalizeAngle: mt,
362
- isBetween: cs,
363
- isBetweenAngle: ls,
362
+ isBetween: ls,
363
+ isBetweenAngle: us,
364
364
  intPartLength: qt,
365
- relativeEps: us
365
+ relativeEps: ds
366
366
  }, W = class W {
367
367
  /**
368
368
  * Construct one vector by two numbers
@@ -851,8 +851,8 @@ const C = {
851
851
  }
852
852
  relativeEps(t = 1e-7) {
853
853
  return Math.min(
854
- C.relativeEps(this.x, t),
855
- C.relativeEps(this.y, t)
854
+ S.relativeEps(this.x, t),
855
+ S.relativeEps(this.y, t)
856
856
  );
857
857
  }
858
858
  *[Symbol.iterator]() {
@@ -954,8 +954,8 @@ const H = class H {
954
954
  * @returns Return this matrix
955
955
  */
956
956
  multiplyMatrices(t, s) {
957
- const e = t.elements, n = s.elements, i = this.elements, h = e[0], r = e[3], a = e[6], o = e[1], c = e[4], l = e[7], d = e[2], m = e[5], x = e[8], g = n[0], p = n[3], _ = n[6], f = n[1], w = n[4], A = n[7], M = n[2], B = n[5], z = n[8];
958
- return i[0] = h * g + r * f + a * M, i[3] = h * p + r * w + a * B, i[6] = h * _ + r * A + a * z, i[1] = o * g + c * f + l * M, i[4] = o * p + c * w + l * B, i[7] = o * _ + c * A + l * z, i[2] = d * g + m * f + x * M, i[5] = d * p + m * w + x * B, i[8] = d * _ + m * A + x * z, this;
957
+ const e = t.elements, n = s.elements, i = this.elements, h = e[0], r = e[3], a = e[6], o = e[1], c = e[4], l = e[7], m = e[2], d = e[5], x = e[8], g = n[0], p = n[3], _ = n[6], w = n[1], f = n[4], A = n[7], z = n[2], C = n[5], M = n[8];
958
+ return i[0] = h * g + r * w + a * z, i[3] = h * p + r * f + a * C, i[6] = h * _ + r * A + a * M, i[1] = o * g + c * w + l * z, i[4] = o * p + c * f + l * C, i[7] = o * _ + c * A + l * M, i[2] = m * g + d * w + x * z, i[5] = m * p + d * f + x * C, i[8] = m * _ + d * A + x * M, this;
959
959
  }
960
960
  /**
961
961
  * Multiply every component of the matrix by the scalar value s.
@@ -980,10 +980,10 @@ const H = class H {
980
980
  * @returns Return this matrix
981
981
  */
982
982
  invert() {
983
- const t = this.elements, s = t[0], e = t[1], n = t[2], i = t[3], h = t[4], r = t[5], a = t[6], o = t[7], c = t[8], l = c * h - r * o, d = r * a - c * i, m = o * i - h * a, x = s * l + e * d + n * m;
983
+ const t = this.elements, s = t[0], e = t[1], n = t[2], i = t[3], h = t[4], r = t[5], a = t[6], o = t[7], c = t[8], l = c * h - r * o, m = r * a - c * i, d = o * i - h * a, x = s * l + e * m + n * d;
984
984
  if (x === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
985
985
  const g = 1 / x;
986
- return t[0] = l * g, t[1] = (n * o - c * e) * g, t[2] = (r * e - n * h) * g, t[3] = d * g, t[4] = (c * s - n * a) * g, t[5] = (n * i - r * s) * g, t[6] = m * g, t[7] = (e * a - o * s) * g, t[8] = (h * s - e * i) * g, this;
986
+ return t[0] = l * g, t[1] = (n * o - c * e) * g, t[2] = (r * e - n * h) * g, t[3] = m * g, t[4] = (c * s - n * a) * g, t[5] = (n * i - r * s) * g, t[6] = d * g, t[7] = (e * a - o * s) * g, t[8] = (h * s - e * i) * g, this;
987
987
  }
988
988
  /**
989
989
  * Transpose this matrix in place.
@@ -1141,7 +1141,7 @@ const At = /* @__PURE__ */ new v(), Q = 1e-6, I = 2 * Math.PI, Ss = {
1141
1141
  y: 0,
1142
1142
  z: 0
1143
1143
  };
1144
- class ds {
1144
+ class Ft {
1145
1145
  /**
1146
1146
  * Create tolerance class with default tolerance values
1147
1147
  */
@@ -1210,15 +1210,15 @@ class ds {
1210
1210
  return t - s < e;
1211
1211
  }
1212
1212
  }
1213
- const Ft = new ds();
1214
- function Xt(u, t, s = !1) {
1213
+ const Xt = new Ft();
1214
+ function Dt(u, t, s = !1) {
1215
1215
  const e = u.x, n = u.y;
1216
1216
  let i = !1;
1217
1217
  const h = t.length;
1218
1218
  for (let r = 0, a = h - 1; r < h; a = r++) {
1219
- const o = t[r].x, c = t[r].y, l = t[a].x, d = t[a].y;
1220
- let m = c > n != d > n;
1221
- s && (m = c >= n != d >= n), m && e < (l - o) * (n - c) / (d - c) + o && (i = !i);
1219
+ const o = t[r].x, c = t[r].y, l = t[a].x, m = t[a].y;
1220
+ let d = c > n != m > n;
1221
+ s && (d = c >= n != m >= n), d && e < (l - o) * (n - c) / (m - c) + o && (i = !i);
1222
1222
  }
1223
1223
  return i;
1224
1224
  }
@@ -1229,14 +1229,14 @@ function ms(u, t) {
1229
1229
  if (!s.intersectsBox(e))
1230
1230
  return !1;
1231
1231
  for (let n = 0; n < u.length; ) {
1232
- if (Xt(u[n], t, !0))
1232
+ if (Dt(u[n], t, !0))
1233
1233
  return !0;
1234
- n < u.length - 1 && Ft.equalPoint2d(u[n + 1], u[n]) && ++n, ++n;
1234
+ n < u.length - 1 && Xt.equalPoint2d(u[n + 1], u[n]) && ++n, ++n;
1235
1235
  }
1236
1236
  return !1;
1237
1237
  }
1238
1238
  const xs = {
1239
- isPointInPolygon: Xt,
1239
+ isPointInPolygon: Dt,
1240
1240
  isPolygonIntersect: ms
1241
1241
  };
1242
1242
  function ys(u, t) {
@@ -1271,8 +1271,8 @@ function _s(u, t) {
1271
1271
  const s = t.length - 1, e = u, n = [0];
1272
1272
  let i = 0;
1273
1273
  for (let r = 1; r <= s; r++) {
1274
- const a = t[r][0] - t[r - 1][0], o = t[r][1] - t[r - 1][1], c = t[r][2] - t[r - 1][2], l = Math.sqrt(a * a + o * o + c * c), d = Math.sqrt(l);
1275
- i += d, n.push(i);
1274
+ const a = t[r][0] - t[r - 1][0], o = t[r][1] - t[r - 1][1], c = t[r][2] - t[r - 1][2], l = Math.sqrt(a * a + o * o + c * c), m = Math.sqrt(l);
1275
+ i += m, n.push(i);
1276
1276
  }
1277
1277
  const h = [];
1278
1278
  for (let r = 0; r <= e; r++)
@@ -1324,8 +1324,8 @@ function ps(u, t, s, e) {
1324
1324
  e
1325
1325
  );
1326
1326
  for (let g = 1; g <= a; g++) {
1327
- const p = i + g * o, _ = xt(p, u, t, s, e), f = _[0] - c[0], w = _[1] - c[1], A = _[2] - c[2];
1328
- r += Math.sqrt(f * f + w * w + A * A), c = _;
1327
+ const p = i + g * o, _ = xt(p, u, t, s, e), w = _[0] - c[0], f = _[1] - c[1], A = _[2] - c[2];
1328
+ r += Math.sqrt(w * w + f * f + A * A), c = _;
1329
1329
  }
1330
1330
  const l = xt(
1331
1331
  h,
@@ -1333,10 +1333,10 @@ function ps(u, t, s, e) {
1333
1333
  t,
1334
1334
  s,
1335
1335
  e
1336
- ), d = l[0] - c[0], m = l[1] - c[1], x = l[2] - c[2];
1337
- return r += Math.sqrt(d * d + m * m + x * x), r;
1336
+ ), m = l[0] - c[0], d = l[1] - c[1], x = l[2] - c[2];
1337
+ return r += Math.sqrt(m * m + d * d + x * x), r;
1338
1338
  }
1339
- function zs(u) {
1339
+ function Ms(u) {
1340
1340
  return u.map((t) => [...t]);
1341
1341
  }
1342
1342
  class pt {
@@ -1362,26 +1362,26 @@ class pt {
1362
1362
  */
1363
1363
  static slerpFlat(t, s, e, n, i, h, r) {
1364
1364
  let a = e[n + 0], o = e[n + 1], c = e[n + 2], l = e[n + 3];
1365
- const d = i[h + 0], m = i[h + 1], x = i[h + 2], g = i[h + 3];
1365
+ const m = i[h + 0], d = i[h + 1], x = i[h + 2], g = i[h + 3];
1366
1366
  if (r === 0) {
1367
1367
  t[s + 0] = a, t[s + 1] = o, t[s + 2] = c, t[s + 3] = l;
1368
1368
  return;
1369
1369
  }
1370
1370
  if (r === 1) {
1371
- t[s + 0] = d, t[s + 1] = m, t[s + 2] = x, t[s + 3] = g;
1371
+ t[s + 0] = m, t[s + 1] = d, t[s + 2] = x, t[s + 3] = g;
1372
1372
  return;
1373
1373
  }
1374
- if (l !== g || a !== d || o !== m || c !== x) {
1374
+ if (l !== g || a !== m || o !== d || c !== x) {
1375
1375
  let p = 1 - r;
1376
- const _ = a * d + o * m + c * x + l * g, f = _ >= 0 ? 1 : -1, w = 1 - _ * _;
1377
- if (w > Number.EPSILON) {
1378
- const M = Math.sqrt(w), B = Math.atan2(M, _ * f);
1379
- p = Math.sin(p * B) / M, r = Math.sin(r * B) / M;
1376
+ const _ = a * m + o * d + c * x + l * g, w = _ >= 0 ? 1 : -1, f = 1 - _ * _;
1377
+ if (f > Number.EPSILON) {
1378
+ const z = Math.sqrt(f), C = Math.atan2(z, _ * w);
1379
+ p = Math.sin(p * C) / z, r = Math.sin(r * C) / z;
1380
1380
  }
1381
- const A = r * f;
1382
- if (a = a * p + d * A, o = o * p + m * A, c = c * p + x * A, l = l * p + g * A, p === 1 - r) {
1383
- const M = 1 / Math.sqrt(a * a + o * o + c * c + l * l);
1384
- a *= M, o *= M, c *= M, l *= M;
1381
+ const A = r * w;
1382
+ if (a = a * p + m * A, o = o * p + d * A, c = c * p + x * A, l = l * p + g * A, p === 1 - r) {
1383
+ const z = 1 / Math.sqrt(a * a + o * o + c * c + l * l);
1384
+ a *= z, o *= z, c *= z, l *= z;
1385
1385
  }
1386
1386
  }
1387
1387
  t[s] = a, t[s + 1] = o, t[s + 2] = c, t[s + 3] = l;
@@ -1397,8 +1397,8 @@ class pt {
1397
1397
  * @returns Return an array
1398
1398
  */
1399
1399
  static multiplyQuaternionsFlat(t, s, e, n, i, h) {
1400
- const r = e[n], a = e[n + 1], o = e[n + 2], c = e[n + 3], l = i[h], d = i[h + 1], m = i[h + 2], x = i[h + 3];
1401
- return t[s] = r * x + c * l + a * m - o * d, t[s + 1] = a * x + c * d + o * l - r * m, t[s + 2] = o * x + c * m + r * d - a * l, t[s + 3] = c * x - r * l - a * d - o * m, t;
1400
+ const r = e[n], a = e[n + 1], o = e[n + 2], c = e[n + 3], l = i[h], m = i[h + 1], d = i[h + 2], x = i[h + 3];
1401
+ return t[s] = r * x + c * l + a * d - o * m, t[s + 1] = a * x + c * m + o * l - r * d, t[s + 2] = o * x + c * d + r * m - a * l, t[s + 3] = c * x - r * l - a * m - o * d, t;
1402
1402
  }
1403
1403
  /**
1404
1404
  * X cooridinate
@@ -1469,25 +1469,25 @@ class pt {
1469
1469
  * @returns Return this quaternion
1470
1470
  */
1471
1471
  setFromEuler(t, s = !0) {
1472
- const e = t.x, n = t.y, i = t.z, h = t.order, r = Math.cos, a = Math.sin, o = r(e / 2), c = r(n / 2), l = r(i / 2), d = a(e / 2), m = a(n / 2), x = a(i / 2);
1472
+ const e = t.x, n = t.y, i = t.z, h = t.order, r = Math.cos, a = Math.sin, o = r(e / 2), c = r(n / 2), l = r(i / 2), m = a(e / 2), d = a(n / 2), x = a(i / 2);
1473
1473
  switch (h) {
1474
1474
  case "XYZ":
1475
- this._x = d * c * l + o * m * x, this._y = o * m * l - d * c * x, this._z = o * c * x + d * m * l, this._w = o * c * l - d * m * x;
1475
+ this._x = m * c * l + o * d * x, this._y = o * d * l - m * c * x, this._z = o * c * x + m * d * l, this._w = o * c * l - m * d * x;
1476
1476
  break;
1477
1477
  case "YXZ":
1478
- this._x = d * c * l + o * m * x, this._y = o * m * l - d * c * x, this._z = o * c * x - d * m * l, this._w = o * c * l + d * m * x;
1478
+ this._x = m * c * l + o * d * x, this._y = o * d * l - m * c * x, this._z = o * c * x - m * d * l, this._w = o * c * l + m * d * x;
1479
1479
  break;
1480
1480
  case "ZXY":
1481
- this._x = d * c * l - o * m * x, this._y = o * m * l + d * c * x, this._z = o * c * x + d * m * l, this._w = o * c * l - d * m * x;
1481
+ this._x = m * c * l - o * d * x, this._y = o * d * l + m * c * x, this._z = o * c * x + m * d * l, this._w = o * c * l - m * d * x;
1482
1482
  break;
1483
1483
  case "ZYX":
1484
- this._x = d * c * l - o * m * x, this._y = o * m * l + d * c * x, this._z = o * c * x - d * m * l, this._w = o * c * l + d * m * x;
1484
+ this._x = m * c * l - o * d * x, this._y = o * d * l + m * c * x, this._z = o * c * x - m * d * l, this._w = o * c * l + m * d * x;
1485
1485
  break;
1486
1486
  case "YZX":
1487
- this._x = d * c * l + o * m * x, this._y = o * m * l + d * c * x, this._z = o * c * x - d * m * l, this._w = o * c * l - d * m * x;
1487
+ this._x = m * c * l + o * d * x, this._y = o * d * l + m * c * x, this._z = o * c * x - m * d * l, this._w = o * c * l - m * d * x;
1488
1488
  break;
1489
1489
  case "XZY":
1490
- this._x = d * c * l - o * m * x, this._y = o * m * l - d * c * x, this._z = o * c * x + d * m * l, this._w = o * c * l + d * m * x;
1490
+ this._x = m * c * l - o * d * x, this._y = o * d * l - m * c * x, this._z = o * c * x + m * d * l, this._w = o * c * l + m * d * x;
1491
1491
  break;
1492
1492
  default:
1493
1493
  console.warn(
@@ -1513,19 +1513,19 @@ class pt {
1513
1513
  * @returns Return this quaternion
1514
1514
  */
1515
1515
  setFromRotationMatrix(t) {
1516
- const s = t.elements, e = s[0], n = s[4], i = s[8], h = s[1], r = s[5], a = s[9], o = s[2], c = s[6], l = s[10], d = e + r + l;
1517
- if (d > 0) {
1518
- const m = 0.5 / Math.sqrt(d + 1);
1519
- this._w = 0.25 / m, this._x = (c - a) * m, this._y = (i - o) * m, this._z = (h - n) * m;
1516
+ const s = t.elements, e = s[0], n = s[4], i = s[8], h = s[1], r = s[5], a = s[9], o = s[2], c = s[6], l = s[10], m = e + r + l;
1517
+ if (m > 0) {
1518
+ const d = 0.5 / Math.sqrt(m + 1);
1519
+ this._w = 0.25 / d, this._x = (c - a) * d, this._y = (i - o) * d, this._z = (h - n) * d;
1520
1520
  } else if (e > r && e > l) {
1521
- const m = 2 * Math.sqrt(1 + e - r - l);
1522
- this._w = (c - a) / m, this._x = 0.25 * m, this._y = (n + h) / m, this._z = (i + o) / m;
1521
+ const d = 2 * Math.sqrt(1 + e - r - l);
1522
+ this._w = (c - a) / d, this._x = 0.25 * d, this._y = (n + h) / d, this._z = (i + o) / d;
1523
1523
  } else if (r > l) {
1524
- const m = 2 * Math.sqrt(1 + r - e - l);
1525
- this._w = (i - o) / m, this._x = (n + h) / m, this._y = 0.25 * m, this._z = (a + c) / m;
1524
+ const d = 2 * Math.sqrt(1 + r - e - l);
1525
+ this._w = (i - o) / d, this._x = (n + h) / d, this._y = 0.25 * d, this._z = (a + c) / d;
1526
1526
  } else {
1527
- const m = 2 * Math.sqrt(1 + l - e - r);
1528
- this._w = (h - n) / m, this._x = (i + o) / m, this._y = (a + c) / m, this._z = 0.25 * m;
1527
+ const d = 2 * Math.sqrt(1 + l - e - r);
1528
+ this._w = (h - n) / d, this._x = (i + o) / d, this._y = (a + c) / d, this._z = 0.25 * d;
1529
1529
  }
1530
1530
  return this._onChangeCallback(), this;
1531
1531
  }
@@ -1661,11 +1661,11 @@ class pt {
1661
1661
  return this._w = h, this._x = e, this._y = n, this._z = i, this;
1662
1662
  const a = 1 - r * r;
1663
1663
  if (a <= Number.EPSILON) {
1664
- const m = 1 - s;
1665
- return this._w = m * h + s * this._w, this._x = m * e + s * this._x, this._y = m * n + s * this._y, this._z = m * i + s * this._z, this.normalize(), this;
1664
+ const d = 1 - s;
1665
+ return this._w = d * h + s * this._w, this._x = d * e + s * this._x, this._y = d * n + s * this._y, this._z = d * i + s * this._z, this.normalize(), this;
1666
1666
  }
1667
- const o = Math.sqrt(a), c = Math.atan2(o, r), l = Math.sin((1 - s) * c) / o, d = Math.sin(s * c) / o;
1668
- return this._w = h * l + this._w * d, this._x = e * l + this._x * d, this._y = n * l + this._y * d, this._z = i * l + this._z * d, this._onChangeCallback(), this;
1667
+ const o = Math.sqrt(a), c = Math.atan2(o, r), l = Math.sin((1 - s) * c) / o, m = Math.sin(s * c) / o;
1668
+ return this._w = h * l + this._w * m, this._x = e * l + this._x * m, this._y = n * l + this._y * m, this._z = i * l + this._z * m, this._onChangeCallback(), this;
1669
1669
  }
1670
1670
  /**
1671
1671
  * Perform a spherical linear interpolation between the given quaternions and stores the result in
@@ -2223,7 +2223,7 @@ const N = class N {
2223
2223
  * @returns Return this vector
2224
2224
  */
2225
2225
  projectOnPlane(t) {
2226
- return wt.copy(this).projectOnVector(t), this.sub(wt);
2226
+ return ft.copy(this).projectOnVector(t), this.sub(ft);
2227
2227
  }
2228
2228
  /**
2229
2229
  * Reflect this vector off of plane orthogonal to normal. Normal is assumed to have unit length.
@@ -2231,7 +2231,7 @@ const N = class N {
2231
2231
  * @returns Return this vector
2232
2232
  */
2233
2233
  reflect(t) {
2234
- return this.sub(wt.copy(t).multiplyScalar(2 * this.dot(t)));
2234
+ return this.sub(ft.copy(t).multiplyScalar(2 * this.dot(t)));
2235
2235
  }
2236
2236
  /**
2237
2237
  * Return the angle between this vector and vector v in radians.
@@ -2374,7 +2374,7 @@ const N = class N {
2374
2374
  };
2375
2375
  N.X_AXIS = Object.freeze(new N(1, 0, 0)), N.NEGATIVE_X_AXIS = Object.freeze(new N(-1, 0, 0)), N.Y_AXIS = Object.freeze(new N(0, 1, 0)), N.NEGATIVE_Y_AXIS = Object.freeze(new N(0, -1, 0)), N.Z_AXIS = Object.freeze(new N(0, 0, 1)), N.NEGATIVE_Z_AXIS = Object.freeze(new N(0, 0, -1));
2376
2376
  let y = N;
2377
- const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2377
+ const ft = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2378
2378
  /**
2379
2379
  * Create a 4x4 matrix with the given arguments in row-major order. If no arguments are provided,
2380
2380
  * the constructor initializes the Matrix4 to the 4x4 identity matrix.
@@ -2396,8 +2396,8 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2396
2396
  * @param n43 Input element in the forth row and the third column
2397
2397
  * @param n44 Input element in the forth row and the forth column
2398
2398
  */
2399
- constructor(t, s, e, n, i, h, r, a, o, c, l, d, m, x, g, p) {
2400
- this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t != null && s != null && e != null && n != null && i != null && h != null && r != null && a != null && o != null && c != null && l != null && d != null && m != null && x != null && g != null && p != null && this.set(
2399
+ constructor(t, s, e, n, i, h, r, a, o, c, l, m, d, x, g, p) {
2400
+ this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t != null && s != null && e != null && n != null && i != null && h != null && r != null && a != null && o != null && c != null && l != null && m != null && d != null && x != null && g != null && p != null && this.set(
2401
2401
  t,
2402
2402
  s,
2403
2403
  e,
@@ -2409,8 +2409,8 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2409
2409
  o,
2410
2410
  c,
2411
2411
  l,
2412
- d,
2413
2412
  m,
2413
+ d,
2414
2414
  x,
2415
2415
  g,
2416
2416
  p
@@ -2437,9 +2437,9 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2437
2437
  * @param n44 Input element in the forth row and the forth column
2438
2438
  * @returns Return this matrix
2439
2439
  */
2440
- set(t, s, e, n, i, h, r, a, o, c, l, d, m, x, g, p) {
2440
+ set(t, s, e, n, i, h, r, a, o, c, l, m, d, x, g, p) {
2441
2441
  const _ = this.elements;
2442
- return _[0] = t, _[4] = s, _[8] = e, _[12] = n, _[1] = i, _[5] = h, _[9] = r, _[13] = a, _[2] = o, _[6] = c, _[10] = l, _[14] = d, _[3] = m, _[7] = x, _[11] = g, _[15] = p, this;
2442
+ return _[0] = t, _[4] = s, _[8] = e, _[12] = n, _[1] = i, _[5] = h, _[9] = r, _[13] = a, _[2] = o, _[6] = c, _[10] = l, _[14] = m, _[3] = d, _[7] = x, _[11] = g, _[15] = p, this;
2443
2443
  }
2444
2444
  /**
2445
2445
  * Reset this matrix to the identity matrix.
@@ -2501,7 +2501,7 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2501
2501
  * @returns Return this matrix
2502
2502
  */
2503
2503
  setFromExtrusionDirection(t) {
2504
- if (Ft.equalPoint3d(t, y.Z_AXIS))
2504
+ if (Xt.equalPoint3d(t, y.Z_AXIS))
2505
2505
  this.identity();
2506
2506
  else {
2507
2507
  const s = new y(1, 0, 0);
@@ -2687,7 +2687,7 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2687
2687
  * @returns Return this matrix
2688
2688
  */
2689
2689
  makeRotationFromQuaternion(t) {
2690
- return this.compose(Ms, t, As);
2690
+ return this.compose(zs, t, As);
2691
2691
  }
2692
2692
  /**
2693
2693
  * Construct a rotation matrix, looking from eye towards target oriented by the up vector.
@@ -2698,7 +2698,7 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2698
2698
  */
2699
2699
  lookAt(t, s, e) {
2700
2700
  const n = this.elements;
2701
- return L.subVectors(t, s), L.lengthSq() === 0 && (L.z = 1), L.normalize(), q.crossVectors(e, L), q.lengthSq() === 0 && (Math.abs(e.z) === 1 ? L.x += 1e-4 : L.z += 1e-4, L.normalize(), q.crossVectors(e, L)), q.normalize(), ut.crossVectors(L, q), n[0] = q.x, n[4] = ut.x, n[8] = L.x, n[1] = q.y, n[5] = ut.y, n[9] = L.y, n[2] = q.z, n[6] = ut.z, n[10] = L.z, this;
2701
+ return R.subVectors(t, s), R.lengthSq() === 0 && (R.z = 1), R.normalize(), q.crossVectors(e, R), q.lengthSq() === 0 && (Math.abs(e.z) === 1 ? R.x += 1e-4 : R.z += 1e-4, R.normalize(), q.crossVectors(e, R)), q.normalize(), ut.crossVectors(R, q), n[0] = q.x, n[4] = ut.x, n[8] = R.x, n[1] = q.y, n[5] = ut.y, n[9] = R.y, n[2] = q.z, n[6] = ut.z, n[10] = R.z, this;
2702
2702
  }
2703
2703
  /**
2704
2704
  * Post-multiply this matrix by m.
@@ -2723,8 +2723,8 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2723
2723
  * @returns Return this matrix
2724
2724
  */
2725
2725
  multiplyMatrices(t, s) {
2726
- const e = t.elements, n = s.elements, i = this.elements, h = e[0], r = e[4], a = e[8], o = e[12], c = e[1], l = e[5], d = e[9], m = e[13], x = e[2], g = e[6], p = e[10], _ = e[14], f = e[3], w = e[7], A = e[11], M = e[15], B = n[0], z = n[4], E = n[8], Z = n[12], G = n[1], F = n[5], K = n[9], et = n[13], nt = n[2], it = n[6], rt = n[10], ht = n[14], ot = n[3], at = n[7], ct = n[11], lt = n[15];
2727
- return i[0] = h * B + r * G + a * nt + o * ot, i[4] = h * z + r * F + a * it + o * at, i[8] = h * E + r * K + a * rt + o * ct, i[12] = h * Z + r * et + a * ht + o * lt, i[1] = c * B + l * G + d * nt + m * ot, i[5] = c * z + l * F + d * it + m * at, i[9] = c * E + l * K + d * rt + m * ct, i[13] = c * Z + l * et + d * ht + m * lt, i[2] = x * B + g * G + p * nt + _ * ot, i[6] = x * z + g * F + p * it + _ * at, i[10] = x * E + g * K + p * rt + _ * ct, i[14] = x * Z + g * et + p * ht + _ * lt, i[3] = f * B + w * G + A * nt + M * ot, i[7] = f * z + w * F + A * it + M * at, i[11] = f * E + w * K + A * rt + M * ct, i[15] = f * Z + w * et + A * ht + M * lt, this;
2726
+ const e = t.elements, n = s.elements, i = this.elements, h = e[0], r = e[4], a = e[8], o = e[12], c = e[1], l = e[5], m = e[9], d = e[13], x = e[2], g = e[6], p = e[10], _ = e[14], w = e[3], f = e[7], A = e[11], z = e[15], C = n[0], M = n[4], E = n[8], Z = n[12], G = n[1], F = n[5], K = n[9], et = n[13], nt = n[2], it = n[6], rt = n[10], ht = n[14], ot = n[3], at = n[7], ct = n[11], lt = n[15];
2727
+ return i[0] = h * C + r * G + a * nt + o * ot, i[4] = h * M + r * F + a * it + o * at, i[8] = h * E + r * K + a * rt + o * ct, i[12] = h * Z + r * et + a * ht + o * lt, i[1] = c * C + l * G + m * nt + d * ot, i[5] = c * M + l * F + m * it + d * at, i[9] = c * E + l * K + m * rt + d * ct, i[13] = c * Z + l * et + m * ht + d * lt, i[2] = x * C + g * G + p * nt + _ * ot, i[6] = x * M + g * F + p * it + _ * at, i[10] = x * E + g * K + p * rt + _ * ct, i[14] = x * Z + g * et + p * ht + _ * lt, i[3] = w * C + f * G + A * nt + z * ot, i[7] = w * M + f * F + A * it + z * at, i[11] = w * E + f * K + A * rt + z * ct, i[15] = w * Z + f * et + A * ht + z * lt, this;
2728
2728
  }
2729
2729
  /**
2730
2730
  * Multiply every component of the matrix by a scalar value s.
@@ -2740,8 +2740,8 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2740
2740
  * @returns Return the determinant of this matrix.
2741
2741
  */
2742
2742
  determinant() {
2743
- const t = this.elements, s = t[0], e = t[4], n = t[8], i = t[12], h = t[1], r = t[5], a = t[9], o = t[13], c = t[2], l = t[6], d = t[10], m = t[14], x = t[3], g = t[7], p = t[11], _ = t[15];
2744
- return x * (+i * a * l - n * o * l - i * r * d + e * o * d + n * r * m - e * a * m) + g * (+s * a * m - s * o * d + i * h * d - n * h * m + n * o * c - i * a * c) + p * (+s * o * l - s * r * m - i * h * l + e * h * m + i * r * c - e * o * c) + _ * (-n * r * c - s * a * l + s * r * d + n * h * l - e * h * d + e * a * c);
2743
+ const t = this.elements, s = t[0], e = t[4], n = t[8], i = t[12], h = t[1], r = t[5], a = t[9], o = t[13], c = t[2], l = t[6], m = t[10], d = t[14], x = t[3], g = t[7], p = t[11], _ = t[15];
2744
+ return x * (+i * a * l - n * o * l - i * r * m + e * o * m + n * r * d - e * a * d) + g * (+s * a * d - s * o * m + i * h * m - n * h * d + n * o * c - i * a * c) + p * (+s * o * l - s * r * d - i * h * l + e * h * d + i * r * c - e * o * c) + _ * (-n * r * c - s * a * l + s * r * m + n * h * l - e * h * m + e * a * c);
2745
2745
  }
2746
2746
  /**
2747
2747
  * Transposes this matrix.
@@ -2769,11 +2769,11 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2769
2769
  * @returns Return this matrix
2770
2770
  */
2771
2771
  invert() {
2772
- const t = this.elements, s = t[0], e = t[1], n = t[2], i = t[3], h = t[4], r = t[5], a = t[6], o = t[7], c = t[8], l = t[9], d = t[10], m = t[11], x = t[12], g = t[13], p = t[14], _ = t[15], f = l * p * o - g * d * o + g * a * m - r * p * m - l * a * _ + r * d * _, w = x * d * o - c * p * o - x * a * m + h * p * m + c * a * _ - h * d * _, A = c * g * o - x * l * o + x * r * m - h * g * m - c * r * _ + h * l * _, M = x * l * a - c * g * a - x * r * d + h * g * d + c * r * p - h * l * p, B = s * f + e * w + n * A + i * M;
2773
- if (B === 0)
2772
+ const t = this.elements, s = t[0], e = t[1], n = t[2], i = t[3], h = t[4], r = t[5], a = t[6], o = t[7], c = t[8], l = t[9], m = t[10], d = t[11], x = t[12], g = t[13], p = t[14], _ = t[15], w = l * p * o - g * m * o + g * a * d - r * p * d - l * a * _ + r * m * _, f = x * m * o - c * p * o - x * a * d + h * p * d + c * a * _ - h * m * _, A = c * g * o - x * l * o + x * r * d - h * g * d - c * r * _ + h * l * _, z = x * l * a - c * g * a - x * r * m + h * g * m + c * r * p - h * l * p, C = s * w + e * f + n * A + i * z;
2773
+ if (C === 0)
2774
2774
  return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2775
- const z = 1 / B;
2776
- return t[0] = f * z, t[1] = (g * d * i - l * p * i - g * n * m + e * p * m + l * n * _ - e * d * _) * z, t[2] = (r * p * i - g * a * i + g * n * o - e * p * o - r * n * _ + e * a * _) * z, t[3] = (l * a * i - r * d * i - l * n * o + e * d * o + r * n * m - e * a * m) * z, t[4] = w * z, t[5] = (c * p * i - x * d * i + x * n * m - s * p * m - c * n * _ + s * d * _) * z, t[6] = (x * a * i - h * p * i - x * n * o + s * p * o + h * n * _ - s * a * _) * z, t[7] = (h * d * i - c * a * i + c * n * o - s * d * o - h * n * m + s * a * m) * z, t[8] = A * z, t[9] = (x * l * i - c * g * i - x * e * m + s * g * m + c * e * _ - s * l * _) * z, t[10] = (h * g * i - x * r * i + x * e * o - s * g * o - h * e * _ + s * r * _) * z, t[11] = (c * r * i - h * l * i - c * e * o + s * l * o + h * e * m - s * r * m) * z, t[12] = M * z, t[13] = (c * g * n - x * l * n + x * e * d - s * g * d - c * e * p + s * l * p) * z, t[14] = (x * r * n - h * g * n - x * e * a + s * g * a + h * e * p - s * r * p) * z, t[15] = (h * l * n - c * r * n + c * e * a - s * l * a - h * e * d + s * r * d) * z, this;
2775
+ const M = 1 / C;
2776
+ return t[0] = w * M, t[1] = (g * m * i - l * p * i - g * n * d + e * p * d + l * n * _ - e * m * _) * M, t[2] = (r * p * i - g * a * i + g * n * o - e * p * o - r * n * _ + e * a * _) * M, t[3] = (l * a * i - r * m * i - l * n * o + e * m * o + r * n * d - e * a * d) * M, t[4] = f * M, t[5] = (c * p * i - x * m * i + x * n * d - s * p * d - c * n * _ + s * m * _) * M, t[6] = (x * a * i - h * p * i - x * n * o + s * p * o + h * n * _ - s * a * _) * M, t[7] = (h * m * i - c * a * i + c * n * o - s * m * o - h * n * d + s * a * d) * M, t[8] = A * M, t[9] = (x * l * i - c * g * i - x * e * d + s * g * d + c * e * _ - s * l * _) * M, t[10] = (h * g * i - x * r * i + x * e * o - s * g * o - h * e * _ + s * r * _) * M, t[11] = (c * r * i - h * l * i - c * e * o + s * l * o + h * e * d - s * r * d) * M, t[12] = z * M, t[13] = (c * g * n - x * l * n + x * e * m - s * g * m - c * e * p + s * l * p) * M, t[14] = (x * r * n - h * g * n - x * e * a + s * g * a + h * e * p - s * r * p) * M, t[15] = (h * l * n - c * r * n + c * e * a - s * l * a - h * e * m + s * r * m) * M, this;
2777
2777
  }
2778
2778
  /**
2779
2779
  * Multiply the columns of this matrix by vector v.
@@ -2887,8 +2887,8 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2887
2887
  * @returns Return this matrix
2888
2888
  */
2889
2889
  compose(t, s, e) {
2890
- const n = this.elements, i = s.x, h = s.y, r = s.z, a = s.w, o = i + i, c = h + h, l = r + r, d = i * o, m = i * c, x = i * l, g = h * c, p = h * l, _ = r * l, f = a * o, w = a * c, A = a * l, M = e.x, B = e.y, z = e.z;
2891
- return n[0] = (1 - (g + _)) * M, n[1] = (m + A) * M, n[2] = (x - w) * M, n[3] = 0, n[4] = (m - A) * B, n[5] = (1 - (d + _)) * B, n[6] = (p + f) * B, n[7] = 0, n[8] = (x + w) * z, n[9] = (p - f) * z, n[10] = (1 - (d + g)) * z, n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, this;
2890
+ const n = this.elements, i = s.x, h = s.y, r = s.z, a = s.w, o = i + i, c = h + h, l = r + r, m = i * o, d = i * c, x = i * l, g = h * c, p = h * l, _ = r * l, w = a * o, f = a * c, A = a * l, z = e.x, C = e.y, M = e.z;
2891
+ return n[0] = (1 - (g + _)) * z, n[1] = (d + A) * z, n[2] = (x - f) * z, n[3] = 0, n[4] = (d - A) * C, n[5] = (1 - (m + _)) * C, n[6] = (p + w) * C, n[7] = 0, n[8] = (x + f) * M, n[9] = (p - w) * M, n[10] = (1 - (m + g)) * M, n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, this;
2892
2892
  }
2893
2893
  /**
2894
2894
  * Decompose this matrix into its position, quaternion and scale components.
@@ -2905,9 +2905,9 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
2905
2905
  const n = this.elements;
2906
2906
  let i = O.set(n[0], n[1], n[2]).length();
2907
2907
  const h = O.set(n[4], n[5], n[6]).length(), r = O.set(n[8], n[9], n[10]).length();
2908
- this.determinant() < 0 && (i = -i), t.x = n[12], t.y = n[13], t.z = n[14], R.copy(this);
2908
+ this.determinant() < 0 && (i = -i), t.x = n[12], t.y = n[13], t.z = n[14], L.copy(this);
2909
2909
  const o = 1 / i, c = 1 / h, l = 1 / r;
2910
- return R.elements[0] *= o, R.elements[1] *= o, R.elements[2] *= o, R.elements[4] *= c, R.elements[5] *= c, R.elements[6] *= c, R.elements[8] *= l, R.elements[9] *= l, R.elements[10] *= l, s.setFromRotationMatrix(R), e.x = i, e.y = h, e.z = r, this;
2910
+ return L.elements[0] *= o, L.elements[1] *= o, L.elements[2] *= o, L.elements[4] *= c, L.elements[5] *= c, L.elements[6] *= c, L.elements[8] *= l, L.elements[9] *= l, L.elements[10] *= l, s.setFromRotationMatrix(L), e.x = i, e.y = h, e.z = r, this;
2911
2911
  }
2912
2912
  // makePerspective(
2913
2913
  // left,
@@ -3035,7 +3035,7 @@ const wt = /* @__PURE__ */ new y(), Ct = /* @__PURE__ */ new pt(), $ = class $ {
3035
3035
  };
3036
3036
  $.IDENTITY = Object.freeze(new $());
3037
3037
  let tt = $;
3038
- const O = /* @__PURE__ */ new y(), R = /* @__PURE__ */ new tt(), Ms = /* @__PURE__ */ new y(0, 0, 0), As = /* @__PURE__ */ new y(1, 1, 1), q = /* @__PURE__ */ new y(), ut = /* @__PURE__ */ new y(), L = /* @__PURE__ */ new y();
3038
+ const O = /* @__PURE__ */ new y(), L = /* @__PURE__ */ new tt(), zs = /* @__PURE__ */ new y(0, 0, 0), As = /* @__PURE__ */ new y(1, 1, 1), q = /* @__PURE__ */ new y(), ut = /* @__PURE__ */ new y(), R = /* @__PURE__ */ new y();
3039
3039
  class Y {
3040
3040
  /**
3041
3041
  * Create a 3d box bounded by min and max.
@@ -3065,7 +3065,7 @@ class Y {
3065
3065
  setFromArray(t) {
3066
3066
  this.makeEmpty();
3067
3067
  for (let s = 0, e = t.length; s < e; s += 3)
3068
- this.expandByPoint(ft.fromArray(t, s));
3068
+ this.expandByPoint(wt.fromArray(t, s));
3069
3069
  return this;
3070
3070
  }
3071
3071
  /**
@@ -3086,7 +3086,7 @@ class Y {
3086
3086
  * @returns Return this box
3087
3087
  */
3088
3088
  setFromCenterAndSize(t, s) {
3089
- const e = ft.copy(s).multiplyScalar(0.5);
3089
+ const e = wt.copy(s).multiplyScalar(0.5);
3090
3090
  return this.min.copy(t).sub(e), this.max.copy(t).add(e), this;
3091
3091
  }
3092
3092
  /**
@@ -3237,7 +3237,7 @@ class Y {
3237
3237
  * @returns Return the distance from any edge of this box to the specified point.
3238
3238
  */
3239
3239
  distanceToPoint(t) {
3240
- return this.clampPoint(t, ft).distanceTo(t);
3240
+ return this.clampPoint(t, wt).distanceTo(t);
3241
3241
  }
3242
3242
  /**
3243
3243
  * Compute the intersection of this and box, setting the upper bound of this box to the lesser of the
@@ -3293,7 +3293,7 @@ const U = [
3293
3293
  /* @__PURE__ */ new y(),
3294
3294
  /* @__PURE__ */ new y(),
3295
3295
  /* @__PURE__ */ new y()
3296
- ], ft = /* @__PURE__ */ new y(), Bt = /* @__PURE__ */ new P();
3296
+ ], wt = /* @__PURE__ */ new y(), Bt = /* @__PURE__ */ new P();
3297
3297
  class V {
3298
3298
  /**
3299
3299
  * Create a 2d box bounded by min and max.
@@ -3511,8 +3511,8 @@ class V {
3511
3511
  return t.min.equals(this.min) && t.max.equals(this.max);
3512
3512
  }
3513
3513
  }
3514
- const It = /* @__PURE__ */ new y(), ws = /* @__PURE__ */ new y(), fs = /* @__PURE__ */ new v();
3515
- class zt {
3514
+ const It = /* @__PURE__ */ new y(), fs = /* @__PURE__ */ new y(), ws = /* @__PURE__ */ new v();
3515
+ class Mt {
3516
3516
  /**
3517
3517
  * Create one plane
3518
3518
  * @param normal (optional) Input a unit length Vector3 defining the normal of the plane.
@@ -3560,7 +3560,7 @@ class zt {
3560
3560
  * @returns Return this plane
3561
3561
  */
3562
3562
  setFromCoplanarPoints(t, s, e) {
3563
- const n = It.subVectors(e, s).cross(ws.subVectors(t, s)).normalize();
3563
+ const n = It.subVectors(e, s).cross(fs.subVectors(t, s)).normalize();
3564
3564
  return this.setFromNormalAndCoplanarPoint(n, t), this;
3565
3565
  }
3566
3566
  /**
@@ -3662,7 +3662,7 @@ class zt {
3662
3662
  * @returns Return this plane
3663
3663
  */
3664
3664
  applyMatrix4(t, s) {
3665
- const e = s || fs.getNormalMatrix(t), n = this.coplanarPoint(It).applyMatrix3d(t), i = this.normal.applyMatrix3(e).normalize();
3665
+ const e = s || ws.getNormalMatrix(t), n = this.coplanarPoint(It).applyMatrix3d(t), i = this.normal.applyMatrix3(e).normalize();
3666
3666
  return this.constant = -n.dot(i), this;
3667
3667
  }
3668
3668
  /**
@@ -3687,7 +3687,7 @@ class zt {
3687
3687
  * @returns Return the cloned plane
3688
3688
  */
3689
3689
  clone() {
3690
- return new zt().copy(this);
3690
+ return new Mt().copy(this);
3691
3691
  }
3692
3692
  }
3693
3693
  class b extends P {
@@ -3703,7 +3703,7 @@ class b extends P {
3703
3703
  }), s;
3704
3704
  }
3705
3705
  }
3706
- class S extends y {
3706
+ class B extends y {
3707
3707
  /**
3708
3708
  * Convert one point array to one number array
3709
3709
  * @param array Input one point array
@@ -3809,25 +3809,25 @@ const Et = /* @__PURE__ */ new tt(), kt = /* @__PURE__ */ new pt(), J = class J
3809
3809
  * @returns Return this euler
3810
3810
  */
3811
3811
  setFromRotationMatrix(t, s = this._order, e = !0) {
3812
- const n = t.elements, i = n[0], h = n[4], r = n[8], a = n[1], o = n[5], c = n[9], l = n[2], d = n[6], m = n[10];
3812
+ const n = t.elements, i = n[0], h = n[4], r = n[8], a = n[1], o = n[5], c = n[9], l = n[2], m = n[6], d = n[10];
3813
3813
  switch (s) {
3814
3814
  case "XYZ":
3815
- this._y = Math.asin(j(r, -1, 1)), Math.abs(r) < 0.9999999 ? (this._x = Math.atan2(-c, m), this._z = Math.atan2(-h, i)) : (this._x = Math.atan2(d, o), this._z = 0);
3815
+ this._y = Math.asin(j(r, -1, 1)), Math.abs(r) < 0.9999999 ? (this._x = Math.atan2(-c, d), this._z = Math.atan2(-h, i)) : (this._x = Math.atan2(m, o), this._z = 0);
3816
3816
  break;
3817
3817
  case "YXZ":
3818
- this._x = Math.asin(-j(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._y = Math.atan2(r, m), this._z = Math.atan2(a, o)) : (this._y = Math.atan2(-l, i), this._z = 0);
3818
+ this._x = Math.asin(-j(c, -1, 1)), Math.abs(c) < 0.9999999 ? (this._y = Math.atan2(r, d), this._z = Math.atan2(a, o)) : (this._y = Math.atan2(-l, i), this._z = 0);
3819
3819
  break;
3820
3820
  case "ZXY":
3821
- this._x = Math.asin(j(d, -1, 1)), Math.abs(d) < 0.9999999 ? (this._y = Math.atan2(-l, m), this._z = Math.atan2(-h, o)) : (this._y = 0, this._z = Math.atan2(a, i));
3821
+ this._x = Math.asin(j(m, -1, 1)), Math.abs(m) < 0.9999999 ? (this._y = Math.atan2(-l, d), this._z = Math.atan2(-h, o)) : (this._y = 0, this._z = Math.atan2(a, i));
3822
3822
  break;
3823
3823
  case "ZYX":
3824
- this._y = Math.asin(-j(l, -1, 1)), Math.abs(l) < 0.9999999 ? (this._x = Math.atan2(d, m), this._z = Math.atan2(a, i)) : (this._x = 0, this._z = Math.atan2(-h, o));
3824
+ this._y = Math.asin(-j(l, -1, 1)), Math.abs(l) < 0.9999999 ? (this._x = Math.atan2(m, d), this._z = Math.atan2(a, i)) : (this._x = 0, this._z = Math.atan2(-h, o));
3825
3825
  break;
3826
3826
  case "YZX":
3827
- this._z = Math.asin(j(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(-c, o), this._y = Math.atan2(-l, i)) : (this._x = 0, this._y = Math.atan2(r, m));
3827
+ this._z = Math.asin(j(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(-c, o), this._y = Math.atan2(-l, i)) : (this._x = 0, this._y = Math.atan2(r, d));
3828
3828
  break;
3829
3829
  case "XZY":
3830
- this._z = Math.asin(-j(h, -1, 1)), Math.abs(h) < 0.9999999 ? (this._x = Math.atan2(d, o), this._y = Math.atan2(r, i)) : (this._x = Math.atan2(-c, m), this._y = 0);
3830
+ this._z = Math.asin(-j(h, -1, 1)), Math.abs(h) < 0.9999999 ? (this._x = Math.atan2(m, o), this._y = Math.atan2(r, i)) : (this._x = Math.atan2(-c, d), this._y = 0);
3831
3831
  break;
3832
3832
  default:
3833
3833
  console.warn(
@@ -3911,7 +3911,7 @@ const Et = /* @__PURE__ */ new tt(), kt = /* @__PURE__ */ new pt(), J = class J
3911
3911
  };
3912
3912
  J.DEFAULT_ORDER = "XYZ";
3913
3913
  let Nt = J;
3914
- class Dt {
3914
+ class Yt {
3915
3915
  constructor() {
3916
3916
  this._boundingBoxNeedsUpdate = !1;
3917
3917
  }
@@ -3923,7 +3923,7 @@ class Dt {
3923
3923
  return this._boundingBoxNeedsUpdate;
3924
3924
  }
3925
3925
  }
3926
- class Yt extends Dt {
3926
+ class Zt extends Yt {
3927
3927
  /**
3928
3928
  * Return new shape translated by given vector.
3929
3929
  */
@@ -3939,7 +3939,7 @@ class Yt extends Dt {
3939
3939
  return (this._box == null || this._boundingBoxNeedsUpdate) && (this._box = this.calculateBoundingBox(), this._boundingBoxNeedsUpdate = !1), this._box;
3940
3940
  }
3941
3941
  }
3942
- class Cs extends Yt {
3942
+ class Cs extends Zt {
3943
3943
  /**
3944
3944
  * Create one 2d area defined by one outter loop and multiple inner loops
3945
3945
  */
@@ -4004,18 +4004,18 @@ class Cs extends Yt {
4004
4004
  const h = { index: -1, children: [] };
4005
4005
  for (let a = 0; a < i; a++) {
4006
4006
  const o = e[a], c = t[o], l = s[o];
4007
- let d = a + 1;
4008
- for (; d < i; d++) {
4009
- const m = e[d], x = t[m];
4010
- if (s[m].containsBox(l) && xs.isPointInPolygon(
4011
- c[C.randInt(0, c.length - 1)],
4007
+ let m = a + 1;
4008
+ for (; m < i; m++) {
4009
+ const d = e[m], x = t[d];
4010
+ if (s[d].containsBox(l) && xs.isPointInPolygon(
4011
+ c[S.randInt(0, c.length - 1)],
4012
4012
  x
4013
4013
  )) {
4014
- (r = n.get(m)) == null || r.children.push(n.get(o));
4014
+ (r = n.get(d)) == null || r.children.push(n.get(o));
4015
4015
  break;
4016
4016
  }
4017
4017
  }
4018
- d === i && h.children.push(n.get(o));
4018
+ m === i && h.children.push(n.get(o));
4019
4019
  }
4020
4020
  return h;
4021
4021
  }
@@ -4050,7 +4050,7 @@ class Cs extends Yt {
4050
4050
  }), e;
4051
4051
  }
4052
4052
  }
4053
- class st extends Yt {
4053
+ class st extends Zt {
4054
4054
  constructor() {
4055
4055
  super(), this.arcLengthDivisions = 100;
4056
4056
  }
@@ -4156,8 +4156,8 @@ class st extends Yt {
4156
4156
  }
4157
4157
  if (n = a, e[n] === h)
4158
4158
  return n / (i - 1);
4159
- const c = e[n], d = e[n + 1] - c, m = (h - c) / d;
4160
- return (n + m) / (i - 1);
4159
+ const c = e[n], m = e[n + 1] - c, d = (h - c) / m;
4160
+ return (n + d) / (i - 1);
4161
4161
  }
4162
4162
  /**
4163
4163
  * Return a unit vector tangent at `t`. If the derived curve does not implement its tangent derivation,
@@ -4211,16 +4211,16 @@ class gt extends st {
4211
4211
  * @param p3 Input the end point
4212
4212
  */
4213
4213
  createByThreePoints(t, s, e) {
4214
- const n = (z, E) => ({
4215
- x: (z.x + E.x) / 2,
4216
- y: (z.y + E.y) / 2
4217
- }), i = (z, E) => (E.y - z.y) / (E.x - z.x), h = (z) => -1 / z, r = n(t, s), a = n(s, e), o = i(t, s), c = i(s, e), l = h(o), d = h(c), m = (z, E, Z, G) => {
4218
- const F = (G - E) / (z - Z), K = z * F + E;
4214
+ const n = (M, E) => ({
4215
+ x: (M.x + E.x) / 2,
4216
+ y: (M.y + E.y) / 2
4217
+ }), i = (M, E) => (E.y - M.y) / (E.x - M.x), h = (M) => -1 / M, r = n(t, s), a = n(s, e), o = i(t, s), c = i(s, e), l = h(o), m = h(c), d = (M, E, Z, G) => {
4218
+ const F = (G - E) / (M - Z), K = M * F + E;
4219
4219
  return { x: F, y: K };
4220
- }, x = r.y - l * r.x, g = a.y - d * a.x, p = m(l, x, d, g), _ = Math.sqrt(
4220
+ }, x = r.y - l * r.x, g = a.y - m * a.x, p = d(l, x, m, g), _ = Math.sqrt(
4221
4221
  Math.pow(t.x - p.x, 2) + Math.pow(t.y - p.y, 2)
4222
- ), f = (z, E) => Math.atan2(z.y - E.y, z.x - E.x), w = f(t, p), A = f(s, p), M = f(e, p), B = M > w && M < A || w > M && w < A || A > M && A < w;
4223
- this.center = p, this.radius = _, this.startAngle = w, this.endAngle = M, this.clockwise = !B;
4222
+ ), w = (M, E) => Math.atan2(M.y - E.y, M.x - E.x), f = w(t, p), A = w(s, p), z = w(e, p), C = z > f && z < A || f > z && f < A || A > z && A < f;
4223
+ this.center = p, this.radius = _, this.startAngle = f, this.endAngle = z, this.clockwise = !C;
4224
4224
  }
4225
4225
  /**
4226
4226
  * Create circular arc by two points and one bugle factor
@@ -4237,21 +4237,21 @@ class gt extends st {
4237
4237
  let n, i, h;
4238
4238
  e < 0 ? (n = Math.atan(-e) * 4, i = new P(t), h = new P(s)) : (n = Math.atan(e) * 4, i = new P(s), h = new P(t));
4239
4239
  const r = new P().subVectors(h, i), a = r.length(), o = new P().addVectors(i, r.multiplyScalar(0.5)), c = Math.abs(a / 2 / Math.tan(n / 2)), l = r.normalize();
4240
- let d;
4240
+ let m;
4241
4241
  if (n < Math.PI) {
4242
- const m = new P(
4242
+ const d = new P(
4243
4243
  l.x * Math.cos(Math.PI / 2) - l.y * Math.sin(Math.PI / 2),
4244
4244
  l.y * Math.cos(Math.PI / 2) + l.x * Math.sin(Math.PI / 2)
4245
4245
  );
4246
- d = o.add(m.multiplyScalar(-c));
4246
+ m = o.add(d.multiplyScalar(-c));
4247
4247
  } else {
4248
- const m = new P(
4248
+ const d = new P(
4249
4249
  l.x * Math.cos(Math.PI / 2) - l.y * Math.sin(Math.PI / 2),
4250
4250
  l.y * Math.cos(Math.PI / 2) + l.x * Math.sin(Math.PI / 2)
4251
4251
  );
4252
- d = o.add(m.multiplyScalar(c));
4252
+ m = o.add(d.multiplyScalar(c));
4253
4253
  }
4254
- e < 0 ? (this.startAngle = Math.atan2(i.y - d.y, i.x - d.x), this.endAngle = Math.atan2(h.y - d.y, h.x - d.x)) : (this.startAngle = Math.atan2(h.y - d.y, h.x - d.x), this.endAngle = Math.atan2(i.y - d.y, i.x - d.x)), this.clockwise = e < 0, this.center = d, this.radius = h.sub(d).length();
4254
+ e < 0 ? (this.startAngle = Math.atan2(i.y - m.y, i.x - m.x), this.endAngle = Math.atan2(h.y - m.y, h.x - m.x)) : (this.startAngle = Math.atan2(h.y - m.y, h.x - m.x), this.endAngle = Math.atan2(i.y - m.y, i.x - m.x)), this.clockwise = e < 0, this.center = m, this.radius = h.sub(m).length();
4255
4255
  }
4256
4256
  /**
4257
4257
  * Center of circular arc
@@ -4278,7 +4278,7 @@ class gt extends st {
4278
4278
  return this._startAngle;
4279
4279
  }
4280
4280
  set startAngle(t) {
4281
- this._startAngle = C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4281
+ this._startAngle = S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4282
4282
  }
4283
4283
  /**
4284
4284
  * End angle in radians of circular arc in the range 0 to 2 * PI.
@@ -4287,13 +4287,13 @@ class gt extends st {
4287
4287
  return this._endAngle;
4288
4288
  }
4289
4289
  set endAngle(t) {
4290
- this._endAngle = this.startAngle == 0 && t == I ? t : C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4290
+ this._endAngle = this.startAngle == 0 && t == I ? t : S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4291
4291
  }
4292
4292
  /**
4293
4293
  * Angle between endAngle and startAngle in range 0 to 2*PI
4294
4294
  */
4295
4295
  get deltaAngle() {
4296
- return this.clockwise ? C.normalizeAngle(this.startAngle - this.endAngle) : C.normalizeAngle(this.endAngle - this.startAngle);
4296
+ return this.clockwise ? S.normalizeAngle(this.startAngle - this.endAngle) : S.normalizeAngle(this.endAngle - this.startAngle);
4297
4297
  }
4298
4298
  /**
4299
4299
  * Rotation direction of the arc.
@@ -4320,7 +4320,7 @@ class gt extends st {
4320
4320
  * Middle point of circular arc
4321
4321
  */
4322
4322
  get midPoint() {
4323
- const t = C.normalizeAngle(
4323
+ const t = S.normalizeAngle(
4324
4324
  (this.startAngle + this.endAngle) / 2
4325
4325
  );
4326
4326
  return this.getPointAtAngle(t);
@@ -4337,7 +4337,7 @@ class gt extends st {
4337
4337
  calculateBoundingBox() {
4338
4338
  const t = [this.startPoint, this.endPoint], s = [0, Math.PI / 2, Math.PI, 3 * Math.PI / 2];
4339
4339
  for (const i of s)
4340
- C.isBetweenAngle(
4340
+ S.isBetweenAngle(
4341
4341
  i,
4342
4342
  this.startAngle,
4343
4343
  this.endAngle,
@@ -4403,7 +4403,7 @@ class gt extends st {
4403
4403
  return s;
4404
4404
  }
4405
4405
  }
4406
- class Ps extends Dt {
4406
+ class Ps extends Yt {
4407
4407
  /**
4408
4408
  * Return new shape translated by given vector.
4409
4409
  * Translation vector may be also defined by a pair of numbers.
@@ -4420,15 +4420,15 @@ class Ps extends Dt {
4420
4420
  return (this._box == null || this._boundingBoxNeedsUpdate) && (this._box = this.calculateBoundingBox(), this._boundingBoxNeedsUpdate = !1), this._box;
4421
4421
  }
4422
4422
  }
4423
- class Mt extends Ps {
4423
+ class zt extends Ps {
4424
4424
  }
4425
- class _t extends Mt {
4425
+ class _t extends zt {
4426
4426
  /**
4427
4427
  * This constructor initializes the line object to use start as the start point, and end
4428
4428
  * as the endpoint. Both points must be in WCS coordinates.
4429
4429
  */
4430
4430
  constructor(t, s) {
4431
- super(), this._start = new S(t), this._end = new S(s);
4431
+ super(), this._start = new B(t), this._end = new B(s);
4432
4432
  }
4433
4433
  /**
4434
4434
  * The line's startpoint in WCS coordinates
@@ -4458,7 +4458,7 @@ class _t extends Mt {
4458
4458
  * The middle point of this line.
4459
4459
  */
4460
4460
  get midPoint() {
4461
- return new S(
4461
+ return new B(
4462
4462
  (this._start.x + this._end.x) / 2,
4463
4463
  (this._start.y + this._end.y) / 2,
4464
4464
  (this._start.z + this._end.z) / 2
@@ -4498,10 +4498,10 @@ class _t extends Mt {
4498
4498
  atLength(t, s = !1) {
4499
4499
  if (s) {
4500
4500
  const e = this.delta(X).normalize();
4501
- return new S(this._start).addScaledVector(e, t);
4501
+ return new B(this._start).addScaledVector(e, t);
4502
4502
  } else {
4503
4503
  const e = this.delta(X).normalize();
4504
- return new S(this._end).addScaledVector(e, t);
4504
+ return new B(this._end).addScaledVector(e, t);
4505
4505
  }
4506
4506
  }
4507
4507
  /**
@@ -4514,13 +4514,13 @@ class _t extends Mt {
4514
4514
  extend(t, s = !1) {
4515
4515
  if (s) {
4516
4516
  const e = X.subVectors(this._start, this._end).normalize();
4517
- this._start = new S(this._start).addScaledVector(
4517
+ this._start = new B(this._start).addScaledVector(
4518
4518
  e,
4519
4519
  t
4520
4520
  );
4521
4521
  } else {
4522
4522
  const e = this.delta(X).normalize();
4523
- this._end = new S(this._end).addScaledVector(e, t);
4523
+ this._end = new B(this._end).addScaledVector(e, t);
4524
4524
  }
4525
4525
  return this._boundingBoxNeedsUpdate = !0, this;
4526
4526
  }
@@ -4532,10 +4532,10 @@ class _t extends Mt {
4532
4532
  * @returns Return a point parameter based on the closest point as projected on the line segment.
4533
4533
  */
4534
4534
  closestPointToPointParameter(t, s) {
4535
- Lt.subVectors(t, this._start), dt.subVectors(this.endPoint, this.startPoint);
4535
+ Rt.subVectors(t, this._start), dt.subVectors(this.endPoint, this.startPoint);
4536
4536
  const e = dt.dot(dt);
4537
- let i = dt.dot(Lt) / e;
4538
- return s && (i = C.clamp(i, 0, 1)), i;
4537
+ let i = dt.dot(Rt) / e;
4538
+ return s && (i = S.clamp(i, 0, 1)), i;
4539
4539
  }
4540
4540
  /**
4541
4541
  * Return the closets point on the line. If clampToLine is true, then the returned value will be
@@ -4578,7 +4578,7 @@ class _t extends Mt {
4578
4578
  */
4579
4579
  project(t) {
4580
4580
  const s = this.direction, n = X.subVectors(t, this.startPoint).dot(s);
4581
- return new S().copy(s).multiplyScalar(n).add(this.startPoint);
4581
+ return new B().copy(s).multiplyScalar(n).add(this.startPoint);
4582
4582
  }
4583
4583
  /**
4584
4584
  * Finds the point on the line that is perpendicular to the given point. When you need the shortest distance
@@ -4589,17 +4589,17 @@ class _t extends Mt {
4589
4589
  */
4590
4590
  perpPoint(t) {
4591
4591
  const s = this.direction, e = this.startPoint, i = X.subVectors(t, e).dot(s), h = X.copy(s).multiplyScalar(i);
4592
- return new S().addVectors(e, h);
4592
+ return new B().addVectors(e, h);
4593
4593
  }
4594
4594
  /**
4595
4595
  * @inheritdoc
4596
4596
  */
4597
4597
  calculateBoundingBox() {
4598
- const t = new S(
4598
+ const t = new B(
4599
4599
  Math.min(this._start.x, this._end.x),
4600
4600
  Math.min(this._start.y, this._end.y),
4601
4601
  Math.min(this._start.z, this._end.z)
4602
- ), s = new S(
4602
+ ), s = new B(
4603
4603
  Math.max(this._start.x, this._end.x),
4604
4604
  Math.max(this._start.y, this._end.y),
4605
4605
  Math.max(this._start.z, this._end.z)
@@ -4631,8 +4631,8 @@ class _t extends Mt {
4631
4631
  return new _t(this._start.clone(), this._end.clone());
4632
4632
  }
4633
4633
  }
4634
- const X = /* @__PURE__ */ new y(), Lt = /* @__PURE__ */ new y(), dt = /* @__PURE__ */ new y();
4635
- class yt extends Mt {
4634
+ const X = /* @__PURE__ */ new y(), Rt = /* @__PURE__ */ new y(), dt = /* @__PURE__ */ new y();
4635
+ class yt extends zt {
4636
4636
  /**
4637
4637
  * Compute center point of the arc given three points
4638
4638
  * @param startPoint Input start point of the arc
@@ -4644,8 +4644,8 @@ class yt extends Mt {
4644
4644
  const n = new y().addVectors(t, s).multiplyScalar(0.5), i = new y().addVectors(t, e).multiplyScalar(0.5), h = new y().subVectors(s, t), r = new y().subVectors(e, t), a = new y().crossVectors(h, r).normalize();
4645
4645
  if (a.lengthSq() === 0)
4646
4646
  return console.error("Points are collinear and cannot form a valid arc."), null;
4647
- const o = new y().crossVectors(h, a).normalize(), c = new y().crossVectors(r, a).normalize(), l = o.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), d = c.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), m = new _t(n, n.clone().add(l)), x = new _t(i, i.clone().add(d)), g = new y();
4648
- return m.closestPointToPoint(x.startPoint, !0, g) ? g : (console.error("Cannot find a valid center for the arc."), null);
4647
+ const o = new y().crossVectors(h, a).normalize(), c = new y().crossVectors(r, a).normalize(), l = o.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), m = c.clone().multiplyScalar(Number.MAX_SAFE_INTEGER), d = new _t(n, n.clone().add(l)), x = new _t(i, i.clone().add(m)), g = new y();
4648
+ return d.closestPointToPoint(x.startPoint, !0, g) ? g : (console.error("Cannot find a valid center for the arc."), null);
4649
4649
  }
4650
4650
  /**
4651
4651
  * Create arc by three points
@@ -4689,7 +4689,7 @@ class yt extends Mt {
4689
4689
  return this._center;
4690
4690
  }
4691
4691
  set center(t) {
4692
- this._center = new S(t.x, t.y, t.z || 0), this._boundingBoxNeedsUpdate = !0;
4692
+ this._center = new B(t.x, t.y, t.z || 0), this._boundingBoxNeedsUpdate = !0;
4693
4693
  }
4694
4694
  /**
4695
4695
  * Radius of circular arc
@@ -4708,7 +4708,7 @@ class yt extends Mt {
4708
4708
  return this._startAngle;
4709
4709
  }
4710
4710
  set startAngle(t) {
4711
- this._startAngle = C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4711
+ this._startAngle = S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4712
4712
  }
4713
4713
  /**
4714
4714
  * End angle in radians of circular arc in the range 0 to 2 * PI.
@@ -4717,13 +4717,13 @@ class yt extends Mt {
4717
4717
  return this._endAngle;
4718
4718
  }
4719
4719
  set endAngle(t) {
4720
- this._endAngle = this.startAngle == 0 && t == I ? t : C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4720
+ this._endAngle = this.startAngle == 0 && t == I ? t : S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4721
4721
  }
4722
4722
  /**
4723
4723
  * Return angle between endAngle and startAngle in range 0 to 2*PI
4724
4724
  */
4725
4725
  get deltaAngle() {
4726
- return C.normalizeAngle(this.endAngle - this.startAngle);
4726
+ return S.normalizeAngle(this.endAngle - this.startAngle);
4727
4727
  }
4728
4728
  /**
4729
4729
  * Return true if the arc is a large arc whose delta angle value is greater than PI.
@@ -4779,7 +4779,7 @@ class yt extends Mt {
4779
4779
  calculateBoundingBox() {
4780
4780
  const t = [this.startAngle, this.endAngle];
4781
4781
  for (let a = 0; a < 2 * Math.PI; a += Math.PI / 2)
4782
- C.isBetweenAngle(a, this.startAngle, this.endAngle) && t.push(a);
4782
+ S.isBetweenAngle(a, this.startAngle, this.endAngle) && t.push(a);
4783
4783
  let s = 1 / 0, e = 1 / 0, n = 1 / 0, i = -1 / 0, h = -1 / 0, r = -1 / 0;
4784
4784
  for (const a of t) {
4785
4785
  const o = this.getPointAtAngle(a);
@@ -4859,7 +4859,7 @@ class yt extends Mt {
4859
4859
  y: s.z * e.x - s.x * e.z,
4860
4860
  z: s.x * e.y - s.y * e.x
4861
4861
  }, i = this.center, h = this.radius;
4862
- return new S(
4862
+ return new B(
4863
4863
  i.x + h * (e.x * Math.cos(t) + n.x * Math.sin(t)),
4864
4864
  i.y + h * (e.y * Math.cos(t) + n.y * Math.sin(t)),
4865
4865
  i.z + h * (e.z * Math.cos(t) + n.z * Math.sin(t))
@@ -4870,11 +4870,11 @@ class yt extends Mt {
4870
4870
  */
4871
4871
  get plane() {
4872
4872
  const t = new y(this.center).distanceTo(jt);
4873
- return new zt(this.normal, t);
4873
+ return new Mt(this.normal, t);
4874
4874
  }
4875
4875
  }
4876
4876
  const Pt = /* @__PURE__ */ new y();
4877
- class Zt extends st {
4877
+ class Gt extends st {
4878
4878
  /**
4879
4879
  * Construct an instance of the ellipse arc.
4880
4880
  * @param center Center point of the ellipse.
@@ -4896,7 +4896,7 @@ class Zt extends st {
4896
4896
  return this._center;
4897
4897
  }
4898
4898
  set center(t) {
4899
- this._center = new S(t.x, t.y, t.z || 0), this._boundingBoxNeedsUpdate = !0;
4899
+ this._center = new B(t.x, t.y, t.z || 0), this._boundingBoxNeedsUpdate = !0;
4900
4900
  }
4901
4901
  /**
4902
4902
  * Major axis radius of the ellipse
@@ -4925,7 +4925,7 @@ class Zt extends st {
4925
4925
  return this._startAngle;
4926
4926
  }
4927
4927
  set startAngle(t) {
4928
- this._startAngle = C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4928
+ this._startAngle = S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4929
4929
  }
4930
4930
  /**
4931
4931
  * End angle of the ellipse arc in radians in the range -pi to pi.
@@ -4934,7 +4934,7 @@ class Zt extends st {
4934
4934
  return this._endAngle;
4935
4935
  }
4936
4936
  set endAngle(t) {
4937
- this._endAngle = this.startAngle == 0 && t == I ? t : C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4937
+ this._endAngle = this.startAngle == 0 && t == I ? t : S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
4938
4938
  }
4939
4939
  /**
4940
4940
  * The flag Whether the ellipse arc is drawn clockwise. Default is false.
@@ -4959,7 +4959,7 @@ class Zt extends st {
4959
4959
  * Return angle between endAngle and startAngle in range 0 to 2*PI
4960
4960
  */
4961
4961
  get deltaAngle() {
4962
- return C.normalizeAngle(this.endAngle - this.startAngle);
4962
+ return S.normalizeAngle(this.endAngle - this.startAngle);
4963
4963
  }
4964
4964
  /**
4965
4965
  * Return true if the arc is a large arc whose delta angle value is greater than PI.
@@ -5022,7 +5022,7 @@ class Zt extends st {
5022
5022
  * @inheritdoc
5023
5023
  */
5024
5024
  clone() {
5025
- return new Zt(
5025
+ return new Gt(
5026
5026
  this.center,
5027
5027
  this.majorAxisRadius,
5028
5028
  this.minorAxisRadius,
@@ -5033,7 +5033,7 @@ class Zt extends st {
5033
5033
  );
5034
5034
  }
5035
5035
  }
5036
- class Gt extends Mt {
5036
+ class Kt extends zt {
5037
5037
  /**
5038
5038
  * Construct an instance of the ellipse arc.
5039
5039
  * @param center Center point of the ellipse.
@@ -5056,7 +5056,7 @@ class Gt extends Mt {
5056
5056
  return this._center;
5057
5057
  }
5058
5058
  set center(t) {
5059
- this._center = new S(t.x, t.y, t.z || 0), this._boundingBoxNeedsUpdate = !0;
5059
+ this._center = new B(t.x, t.y, t.z || 0), this._boundingBoxNeedsUpdate = !0;
5060
5060
  }
5061
5061
  /**
5062
5062
  * Major axis radius of the ellipse
@@ -5085,7 +5085,7 @@ class Gt extends Mt {
5085
5085
  return this._startAngle;
5086
5086
  }
5087
5087
  set startAngle(t) {
5088
- this._startAngle = C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
5088
+ this._startAngle = S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
5089
5089
  }
5090
5090
  /**
5091
5091
  * End angle of the ellipse arc in radians in the range -pi to pi.
@@ -5094,14 +5094,14 @@ class Gt extends Mt {
5094
5094
  return this._endAngle;
5095
5095
  }
5096
5096
  set endAngle(t) {
5097
- this._endAngle = this.startAngle == 0 && t == I ? t : C.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
5097
+ this._endAngle = this.startAngle == 0 && t == I ? t : S.normalizeAngle(t), this._boundingBoxNeedsUpdate = !0;
5098
5098
  }
5099
5099
  /**
5100
5100
  * Return angle between endAngle and startAngle in range 0 to 2*PI
5101
5101
  */
5102
5102
  get deltaAngle() {
5103
5103
  const t = this.endAngle - this.startAngle;
5104
- return Math.abs(t - I) < 1e-10 ? I : C.normalizeAngle(t);
5104
+ return Math.abs(t - I) < 1e-10 ? I : S.normalizeAngle(t);
5105
5105
  }
5106
5106
  /**
5107
5107
  * Return true if the arc is a large arc whose delta angle value is greater than PI.
@@ -5157,10 +5157,19 @@ class Gt extends Mt {
5157
5157
  /**
5158
5158
  * @inheritdoc
5159
5159
  */
5160
+ /**
5161
+ * Check if this ellipse arc is actually a circular arc (major and minor radii are equal)
5162
+ * @returns True if the ellipse arc is circular
5163
+ */
5164
+ get isCircular() {
5165
+ return Ft.equal(this.majorAxisRadius, this.minorAxisRadius);
5166
+ }
5160
5167
  get length() {
5161
- const s = this.deltaAngle / 1e3;
5168
+ if (this.isCircular)
5169
+ return this.majorAxisRadius * Math.abs(this.deltaAngle);
5170
+ const t = 1e3, s = this.deltaAngle / t;
5162
5171
  let e = 0, n = this.getPointAtAngle(this.startAngle);
5163
- for (let i = 1; i <= 1e3; i++) {
5172
+ for (let i = 1; i <= t; i++) {
5164
5173
  const h = this.startAngle + i * s, r = this.getPointAtAngle(h), a = r.x - n.x, o = r.y - n.y, c = r.z - n.z;
5165
5174
  e += Math.sqrt(a * a + o * o + c * c), n = r;
5166
5175
  }
@@ -5175,7 +5184,7 @@ class Gt extends Mt {
5175
5184
  if (this.majorAxis.equals(y.X_AXIS) || this.majorAxis.equals(y.Y_AXIS) || this.majorAxis.isParallelTo(y.X_AXIS) || this.majorAxis.isParallelTo(y.Y_AXIS)) {
5176
5185
  const t = [this.startAngle, this.endAngle];
5177
5186
  for (let a = 0; a < 2 * Math.PI; a += Math.PI / 2)
5178
- C.isBetweenAngle(a, this.startAngle, this.endAngle) && t.push(a);
5187
+ S.isBetweenAngle(a, this.startAngle, this.endAngle) && t.push(a);
5179
5188
  let s = 1 / 0, e = 1 / 0, n = 1 / 0, i = -1 / 0, h = -1 / 0, r = -1 / 0;
5180
5189
  for (const a of t) {
5181
5190
  const o = this.getPointAtAngle(a);
@@ -5220,7 +5229,7 @@ class Gt extends Mt {
5220
5229
  */
5221
5230
  getPointAtAngle(t) {
5222
5231
  const s = Math.cos(t), e = Math.sin(t), n = this.minorAxis.clone().multiplyScalar(this.minorAxisRadius).multiplyScalar(e), i = this.majorAxis.clone().multiplyScalar(s * this.majorAxisRadius).add(n);
5223
- return new S(
5232
+ return new B(
5224
5233
  this.center.x + i.x,
5225
5234
  this.center.y + i.y,
5226
5235
  this.center.z + i.z
@@ -5251,7 +5260,7 @@ class Gt extends Mt {
5251
5260
  * @inheritdoc
5252
5261
  */
5253
5262
  clone() {
5254
- return new Gt(
5263
+ return new Kt(
5255
5264
  this.center,
5256
5265
  this.normal,
5257
5266
  this.majorAxis,
@@ -5266,7 +5275,7 @@ class Gt extends Mt {
5266
5275
  */
5267
5276
  get plane() {
5268
5277
  const t = new y(this.center).distanceTo(jt);
5269
- return new zt(this.normal, t);
5278
+ return new Mt(this.normal, t);
5270
5279
  }
5271
5280
  }
5272
5281
  class Bs extends st {
@@ -5379,7 +5388,7 @@ class Bs extends st {
5379
5388
  getPoints3d(t, s) {
5380
5389
  const e = [];
5381
5390
  return this.getPoints(t).forEach(
5382
- (i) => e.push(new S().set(i.x, i.y, s))
5391
+ (i) => e.push(new B().set(i.x, i.y, s))
5383
5392
  ), e;
5384
5393
  }
5385
5394
  /**
@@ -5406,7 +5415,7 @@ class Bs extends st {
5406
5415
  return s;
5407
5416
  }
5408
5417
  }
5409
- class Kt extends st {
5418
+ class Qt extends st {
5410
5419
  /**
5411
5420
  * This constructor initializes the line object to use start as the start point, and end
5412
5421
  * as the endpoint. Both points must be in WCS coordinates.
@@ -5482,7 +5491,7 @@ class Kt extends st {
5482
5491
  * @inheritdoc
5483
5492
  */
5484
5493
  clone() {
5485
- return new Kt(this._start.clone(), this._end.clone());
5494
+ return new Qt(this._start.clone(), this._end.clone());
5486
5495
  }
5487
5496
  }
5488
5497
  class Is extends st {
@@ -5629,37 +5638,38 @@ class D {
5629
5638
  n = ys(s, t.length);
5630
5639
  break;
5631
5640
  }
5632
- const i = zs(t), h = new Array(i.length).fill(1);
5641
+ const i = Ms(t), h = new Array(i.length).fill(1);
5633
5642
  return new D(s, n, i, h);
5634
5643
  }
5635
5644
  }
5636
- class Es extends Mt {
5637
- constructor(t, s, e) {
5645
+ class Es extends zt {
5646
+ constructor(t, s, e, n) {
5638
5647
  super();
5639
- const n = +(t !== void 0) + +(s !== void 0) + +(e !== void 0);
5640
- if (n != 2 && n != 3)
5648
+ const i = +(t !== void 0) + +(s !== void 0) + +(e !== void 0) + +(n !== void 0);
5649
+ if (i < 2 || i > 4)
5641
5650
  throw T.ILLEGAL_PARAMETERS;
5642
- const i = 3;
5643
- if (this._closed = !1, n == 2 && !Array.isArray(s)) {
5644
- if (this._fitPoints = t, this._knotParameterization = s, this._fitPoints.length < 4)
5645
- throw T.ILLEGAL_PARAMETERS;
5646
- const h = this.toNurbsPoints(this._fitPoints);
5647
- this._nurbsCurve = D.byPoints(
5648
- h,
5649
- i,
5650
- this._knotParameterization
5651
- ), this._controlPoints = this.toGePoints(this._nurbsCurve.controlPoints()), this._originalControlPoints = [...this._controlPoints], this._originalKnots = [...this._nurbsCurve.knots()], this._originalWeights = [...this._nurbsCurve.weights()];
5652
- } else {
5653
- if (this._controlPoints = t, this._controlPoints.length < 4)
5651
+ const h = 3;
5652
+ if (this._closed = n || !1, Array.isArray(s)) {
5653
+ if (this._controlPoints = t, i >= 4 && (this._closed = n), this._controlPoints.length < 4)
5654
5654
  throw T.ILLEGAL_PARAMETERS;
5655
- const h = this.toNurbsPoints(this._controlPoints);
5655
+ const r = this.toNurbsPoints(this._controlPoints);
5656
5656
  this._nurbsCurve = D.byKnotsControlPointsWeights(
5657
- i,
5658
- s,
5659
5657
  h,
5658
+ s,
5659
+ r,
5660
5660
  e
5661
5661
  ), this._originalControlPoints = [...this._controlPoints], this._originalKnots = [...this._nurbsCurve.knots()], this._originalWeights = e ? [...e] : new Array(this._controlPoints.length).fill(1);
5662
+ } else {
5663
+ if (this._fitPoints = t, this._knotParameterization = s, i >= 3 && (this._closed = e), this._fitPoints.length < 4)
5664
+ throw T.ILLEGAL_PARAMETERS;
5665
+ const r = this.toNurbsPoints(this._fitPoints);
5666
+ this._nurbsCurve = D.byPoints(
5667
+ r,
5668
+ h,
5669
+ this._knotParameterization
5670
+ ), this._controlPoints = this.toGePoints(this._nurbsCurve.controlPoints()), this._originalControlPoints = [...this._controlPoints], this._originalKnots = [...this._nurbsCurve.knots()], this._originalWeights = [...this._nurbsCurve.weights()];
5662
5671
  }
5672
+ this._closed && this.makeClosed();
5663
5673
  }
5664
5674
  /**
5665
5675
  * Set the closed property and rebuild the curve if necessary
@@ -5671,13 +5681,10 @@ class Es extends Mt {
5671
5681
  * Make the spline closed by adding control points and adjusting knots
5672
5682
  */
5673
5683
  makeClosed() {
5674
- const t = this._nurbsCurve.degree(), s = this._nurbsCurve.controlPoints(), e = this._nurbsCurve.weights(), n = s.length, i = [
5675
- ...s,
5676
- ...s.slice(0, t)
5677
- ], h = [
5678
- ...e,
5679
- ...e.slice(0, t)
5680
- ], r = this.createClosedKnotVector(n, t);
5684
+ const t = this._nurbsCurve.degree(), s = this._nurbsCurve.controlPoints(), e = this._nurbsCurve.knots(), n = this._nurbsCurve.weights(), i = [...s], h = [...n];
5685
+ for (let a = 0; a < t; a++)
5686
+ i.push([...s[0]]), h.push(n[0]);
5687
+ const r = this.createClosedKnotVector(e, t);
5681
5688
  this._nurbsCurve = D.byKnotsControlPointsWeights(
5682
5689
  t,
5683
5690
  r,
@@ -5700,13 +5707,13 @@ class Es extends Mt {
5700
5707
  ), this._controlPoints = [...this._originalControlPoints];
5701
5708
  }
5702
5709
  /**
5703
- * Create periodic knot vector for closed curve
5710
+ * Create knot vector for closed curve
5704
5711
  */
5705
5712
  createClosedKnotVector(t, s) {
5706
- const e = t + 2 * s + 1, n = [];
5707
- for (let i = 0; i < e; i++)
5708
- n.push(i);
5709
- return n;
5713
+ const e = [...t], n = t[t.length - 1], i = s;
5714
+ for (let h = 1; h <= i; h++)
5715
+ e.push(n + h);
5716
+ return e;
5710
5717
  }
5711
5718
  /**
5712
5719
  * Degree of the spline to be created.
@@ -5722,16 +5729,14 @@ class Es extends Mt {
5722
5729
  */
5723
5730
  get startPoint() {
5724
5731
  const t = this._nurbsCurve.knots(), s = this._nurbsCurve.degree(), e = t[s], n = this._nurbsCurve.point(e);
5725
- return new S(n[0], n[1], n[2]);
5732
+ return new B(n[0], n[1], n[2]);
5726
5733
  }
5727
5734
  /**
5728
5735
  * The end point of this spline
5729
5736
  */
5730
5737
  get endPoint() {
5731
- if (this._closed)
5732
- return this.startPoint;
5733
5738
  const t = this._nurbsCurve.knots(), s = this._nurbsCurve.degree(), e = t[t.length - s - 1], n = this._nurbsCurve.point(e);
5734
- return new S(n[0], n[1], n[2]);
5739
+ return new B(n[0], n[1], n[2]);
5735
5740
  }
5736
5741
  /**
5737
5742
  * @inheritdoc
@@ -5764,26 +5769,16 @@ class Es extends Mt {
5764
5769
  return this._controlPoints[e];
5765
5770
  }
5766
5771
  /**
5767
- * Divide this spline into the specified number of points
5772
+ * Divide this spline into the specified nubmer of points
5768
5773
  * those points as an array of points.
5769
- * @param numPoints Input the number of points returned
5774
+ * @param numPoints Input the nubmer of points returned
5770
5775
  * @returns Return an array of point
5771
5776
  */
5772
5777
  getPoints(t = 100) {
5773
- const s = this._nurbsCurve, e = [], n = s.knots(), i = s.degree(), h = n[i], r = n[n.length - i - 1];
5774
- if (this._closed) {
5775
- const o = (r - h) / (t - 1);
5776
- for (let c = 0; c < t - 1; c++) {
5777
- const l = h + c * o, d = s.point(l);
5778
- e.push(new S(d[0], d[1], d[2]));
5779
- }
5780
- e.push(e[0]);
5781
- } else {
5782
- const a = (r - h) / (t - 1);
5783
- for (let o = 0; o < t; o++) {
5784
- const c = o === t - 1 ? r : h + o * a, l = s.point(c);
5785
- e.push(new S(l[0], l[1], l[2]));
5786
- }
5778
+ const s = this._nurbsCurve, e = [], n = s.knots(), i = this._nurbsCurve.degree(), h = n[i], r = n[n.length - i - 1], a = (r - h) / (t - 1);
5779
+ for (let o = 0; o < t; o++) {
5780
+ const c = o === t - 1 ? r : h + o * a, l = s.point(c);
5781
+ e.push(new B(l[0], l[1], l[2]));
5787
5782
  }
5788
5783
  return e;
5789
5784
  }
@@ -5844,28 +5839,28 @@ export {
5844
5839
  gt as AcGeCircArc2d,
5845
5840
  yt as AcGeCircArc3d,
5846
5841
  st as AcGeCurve2d,
5847
- Zt as AcGeEllipseArc2d,
5848
- Gt as AcGeEllipseArc3d,
5842
+ Gt as AcGeEllipseArc2d,
5843
+ Kt as AcGeEllipseArc3d,
5849
5844
  Nt as AcGeEuler,
5850
5845
  xs as AcGeGeometryUtil,
5851
- Kt as AcGeLine2d,
5846
+ Qt as AcGeLine2d,
5852
5847
  _t as AcGeLine3d,
5853
5848
  Is as AcGeLoop2d,
5854
- C as AcGeMathUtil,
5849
+ S as AcGeMathUtil,
5855
5850
  v as AcGeMatrix2d,
5856
5851
  tt as AcGeMatrix3d,
5857
- zt as AcGePlane,
5852
+ Mt as AcGePlane,
5858
5853
  b as AcGePoint2d,
5859
- S as AcGePoint3d,
5854
+ B as AcGePoint3d,
5860
5855
  Bs as AcGePolyline2d,
5861
5856
  pt as AcGeQuaternion,
5862
- Yt as AcGeShape2d,
5857
+ Zt as AcGeShape2d,
5863
5858
  Es as AcGeSpline3d,
5864
- ds as AcGeTol,
5859
+ Ft as AcGeTol,
5865
5860
  P as AcGeVector2d,
5866
5861
  y as AcGeVector3d,
5867
- Ft as DEFAULT_TOL,
5868
- Rt as DEG2RAD,
5862
+ Xt as DEFAULT_TOL,
5863
+ Lt as DEG2RAD,
5869
5864
  Q as FLOAT_TOL,
5870
5865
  Ss as ORIGIN_POINT_2D,
5871
5866
  jt as ORIGIN_POINT_3D,
@@ -5873,35 +5868,35 @@ export {
5873
5868
  I as TAU,
5874
5869
  bt as basisFunction,
5875
5870
  ps as calculateCurveLength,
5876
- os as ceilPowerOfTwo,
5871
+ as as ceilPowerOfTwo,
5877
5872
  j as clamp,
5878
- Ht as damp,
5879
- is as degToRad,
5873
+ $t as damp,
5874
+ rs as degToRad,
5880
5875
  Vt as euclideanModulo,
5881
5876
  xt as evaluateNurbsPoint,
5882
- as as floorPowerOfTwo,
5877
+ cs as floorPowerOfTwo,
5883
5878
  gs as generateChordKnots,
5884
5879
  _s as generateSqrtChordKnots,
5885
- Qt as generateUUID,
5880
+ Ot as generateUUID,
5886
5881
  ys as generateUniformKnots,
5887
5882
  qt as intPartLength,
5888
- zs as interpolateControlPoints,
5889
- Wt as inverseLerp,
5890
- cs as isBetween,
5891
- ls as isBetweenAngle,
5892
- Xt as isPointInPolygon,
5883
+ Ms as interpolateControlPoints,
5884
+ Ht as inverseLerp,
5885
+ ls as isBetween,
5886
+ us as isBetweenAngle,
5887
+ Dt as isPointInPolygon,
5893
5888
  ms as isPolygonIntersect,
5894
- hs as isPowerOfTwo,
5889
+ os as isPowerOfTwo,
5895
5890
  Ut as lerp,
5896
- Ot as mapLinear,
5891
+ Wt as mapLinear,
5897
5892
  mt as normalizeAngle,
5898
- $t as pingpong,
5899
- rs as radToDeg,
5900
- ss as randFloat,
5901
- es as randFloatSpread,
5902
- ts as randInt,
5903
- us as relativeEps,
5904
- ns as seededRandom,
5905
- vt as smootherstep,
5906
- Jt as smoothstep
5893
+ Jt as pingpong,
5894
+ hs as radToDeg,
5895
+ es as randFloat,
5896
+ ns as randFloatSpread,
5897
+ ss as randInt,
5898
+ ds as relativeEps,
5899
+ is as seededRandom,
5900
+ ts as smootherstep,
5901
+ vt as smoothstep
5907
5902
  };