aptechka 0.7.3 → 0.7.4

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,38 +1,39 @@
1
- var Cn = Object.defineProperty;
2
- var $t = Object.getOwnPropertySymbols;
3
- var Zn = Object.prototype.hasOwnProperty, Fn = Object.prototype.propertyIsEnumerable;
4
- var Jt = (p, n, o) => n in p ? Cn(p, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : p[n] = o, ut = (p, n) => {
5
- for (var o in n || (n = {}))
6
- Zn.call(n, o) && Jt(p, o, n[o]);
7
- if ($t)
8
- for (var o of $t(n))
9
- Fn.call(n, o) && Jt(p, o, n[o]);
10
- return p;
1
+ var ii = Object.defineProperty;
2
+ var dn = Object.getOwnPropertySymbols;
3
+ var si = Object.prototype.hasOwnProperty, oi = Object.prototype.propertyIsEnumerable;
4
+ var un = (m, t, o) => t in m ? ii(m, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : m[t] = o, pe = (m, t) => {
5
+ for (var o in t || (t = {}))
6
+ si.call(t, o) && un(m, o, t[o]);
7
+ if (dn)
8
+ for (var o of dn(t))
9
+ oi.call(t, o) && un(m, o, t[o]);
10
+ return m;
11
11
  };
12
- var At = (p, n, o) => {
13
- if (!n.has(p))
12
+ var Xt = (m, t, o) => {
13
+ if (!t.has(m))
14
14
  throw TypeError("Cannot " + o);
15
15
  };
16
- var s = (p, n, o) => (At(p, n, "read from private field"), o ? o.call(p) : n.get(p)), u = (p, n, o) => {
17
- if (n.has(p))
16
+ var s = (m, t, o) => (Xt(m, t, "read from private field"), o ? o.call(m) : t.get(m)), d = (m, t, o) => {
17
+ if (t.has(m))
18
18
  throw TypeError("Cannot add the same private member more than once");
19
- n instanceof WeakSet ? n.add(p) : n.set(p, o);
20
- }, P = (p, n, o, e) => (At(p, n, "write to private field"), e ? e.call(p, o) : n.set(p, o), o);
21
- var I = (p, n, o) => (At(p, n, "access private method"), o);
22
- import { e as x } from "../../en3-CsNHRA0v.js";
23
- import { S as F } from "../../Store-BI2xxXOA.js";
24
- import * as q from "three";
25
- import { Light as Nn, PointLight as Qn, PointLightHelper as qn, DirectionalLight as Gn, DirectionalLightHelper as Wn, SpotLight as Un, SpotLightHelper as Kn, HemisphereLight as Bn, HemisphereLightHelper as Vn, Camera as $n, CameraHelper as Jn, Ray as ei, Plane as ti, MathUtils as ni, EventDispatcher as ii, Vector3 as d, MOUSE as Oe, TOUCH as ke, Quaternion as V, Spherical as en, Vector2 as J, Raycaster as oi, Object3D as Rt, Euler as si, Matrix4 as fn, MeshBasicMaterial as yn, LineBasicMaterial as ai, CylinderGeometry as N, BoxGeometry as Z, BufferGeometry as tn, Float32BufferAttribute as nn, Mesh as h, OctahedronGeometry as ft, Line as me, SphereGeometry as ri, TorusGeometry as Fe, PlaneGeometry as li, DoubleSide as ci, GridHelper as hi } from "three";
26
- import { t as pi } from "../../traverseMaterials-B87RMkV0.js";
27
- import { ticker as on } from "../../ticker/index.js";
28
- import { C as mi } from "../../Composed-DmLYTh1b.js";
29
- const di = [
19
+ t instanceof WeakSet ? t.add(m) : t.set(m, o);
20
+ }, x = (m, t, o, e) => (Xt(m, t, "write to private field"), e ? e.call(m, o) : t.set(m, o), o);
21
+ var P = (m, t, o) => (Xt(m, t, "access private method"), o);
22
+ import { e as b } from "../../en3-sDqjL5Mg.js";
23
+ import { S as Z } from "../../Store-BI2xxXOA.js";
24
+ import * as Pe from "three";
25
+ import { Light as fn, PointLight as ai, PointLightHelper as ri, DirectionalLight as li, DirectionalLightHelper as ci, SpotLight as hi, SpotLightHelper as pi, HemisphereLight as mi, HemisphereLightHelper as di, Camera as yn, CameraHelper as ui, Mesh as p, Material as fi, Ray as yi, Plane as bi, MathUtils as wi, EventDispatcher as gi, Vector3 as y, MOUSE as Re, TOUCH as Ye, Quaternion as K, Spherical as bn, Vector2 as V, Raycaster as Ei, Object3D as Gt, Euler as Pi, Matrix4 as Dn, MeshBasicMaterial as On, LineBasicMaterial as Mi, CylinderGeometry as F, BoxGeometry as X, BufferGeometry as wn, Float32BufferAttribute as gn, OctahedronGeometry as vt, Line as me, SphereGeometry as Si, TorusGeometry as Ve, PlaneGeometry as xi, DoubleSide as vi, GridHelper as _i } from "three";
26
+ import { a as Ti } from "../../object-D6MVWB4l.js";
27
+ import { ticker as En } from "../../ticker/index.js";
28
+ import { C as Ii } from "../../Composed-DmLYTh1b.js";
29
+ import { t as Ai } from "../../traverseMaterials-M-N1989i.js";
30
+ const Li = [
30
31
  "AddEquation",
31
32
  "SubtractEquation",
32
33
  "ReverseSubtractEquation",
33
34
  "MinEquation",
34
35
  "MaxEquation"
35
- ], wn = [
36
+ ], jn = [
36
37
  "ZeroFactor",
37
38
  "OneFactor",
38
39
  "SrcColorFactor",
@@ -48,14 +49,14 @@ const di = [
48
49
  "OneMinusConstantColorFactor",
49
50
  "ConstantAlphaFactor",
50
51
  "OneMinusConstantAlphaFactor"
51
- ], ui = [...wn, "SrcAlphaSaturateFactor"], fi = [
52
+ ], Di = [...jn, "SrcAlphaSaturateFactor"], Oi = [
52
53
  "NoBlending",
53
54
  "NormalBlending",
54
55
  "AdditiveBlending",
55
56
  "SubtractiveBlending",
56
57
  "MultiplyBlending",
57
58
  "CustomBlending"
58
- ], yi = [
59
+ ], ji = [
59
60
  "NeverDepth",
60
61
  "AlwaysDepth",
61
62
  "EqualDepth",
@@ -64,7 +65,7 @@ const di = [
64
65
  "GreaterEqualDepth ",
65
66
  "GreaterDepth",
66
67
  "NotEqualDepth"
67
- ], wi = [
68
+ ], ki = [
68
69
  "NeverStencilFunc",
69
70
  "LessStencilFunc",
70
71
  "EqualStencilFunc",
@@ -73,7 +74,7 @@ const di = [
73
74
  "NotEqualStencilFunc ",
74
75
  "GreaterEqualStencilFunc",
75
76
  "AlwaysStencilFunc"
76
- ], Lt = [
77
+ ], Zt = [
77
78
  "ZeroStencilOp",
78
79
  "KeepStencilOp",
79
80
  "ReplaceStencilOp",
@@ -82,7 +83,7 @@ const di = [
82
83
  "IncrementWrapStencilOp",
83
84
  "DecrementWrapStencilOp",
84
85
  "InvertStencilOp"
85
- ], bi = ["FrontSide", "BackSide", "DoubleSide"], gi = ["TangentSpaceNormalMap", "ObjectSpaceNormalMap"], Ei = ["round", "bevel", "miter"], Mi = [
86
+ ], Ci = ["FrontSide", "BackSide", "DoubleSide"], Ri = ["TangentSpaceNormalMap", "ObjectSpaceNormalMap"], Yi = ["round", "bevel", "miter"], Hi = [
86
87
  "NoToneMapping",
87
88
  "LinearToneMapping",
88
89
  "ReinhardToneMapping",
@@ -91,12 +92,7 @@ const di = [
91
92
  "AgXToneMapping",
92
93
  "NeutralToneMapping",
93
94
  "CustomToneMapping"
94
- ], Si = [
95
- "BasicShadowMap",
96
- "PCFShadowMap",
97
- "PCFSoftShadowMap",
98
- "VSMShadowMap"
99
- ], Ne = {
95
+ ], zi = {
100
96
  intensity: {
101
97
  type: "number",
102
98
  min: 0,
@@ -121,7 +117,7 @@ const di = [
121
117
  },
122
118
  blendDst: {
123
119
  type: "select",
124
- variants: ui
120
+ variants: Di
125
121
  },
126
122
  blendDstAlpha: {
127
123
  type: "number",
@@ -131,7 +127,7 @@ const di = [
131
127
  },
132
128
  blendEquation: {
133
129
  type: "select",
134
- variants: di
130
+ variants: Li
135
131
  },
136
132
  blendEquationAlpha: {
137
133
  type: "number",
@@ -141,11 +137,11 @@ const di = [
141
137
  },
142
138
  blending: {
143
139
  type: "select",
144
- variants: fi
140
+ variants: Oi
145
141
  },
146
142
  blendSrc: {
147
143
  type: "select",
148
- variants: wn
144
+ variants: jn
149
145
  },
150
146
  blendSrcAlpha: {
151
147
  type: "number",
@@ -155,11 +151,11 @@ const di = [
155
151
  },
156
152
  depthFunc: {
157
153
  type: "select",
158
- variants: yi
154
+ variants: ji
159
155
  },
160
156
  stencilFunc: {
161
157
  type: "select",
162
- variants: wi
158
+ variants: ki
163
159
  },
164
160
  stencilRef: {
165
161
  type: "number",
@@ -168,15 +164,15 @@ const di = [
168
164
  },
169
165
  stencilFail: {
170
166
  type: "select",
171
- variants: Lt
167
+ variants: Zt
172
168
  },
173
169
  stencilZFail: {
174
170
  type: "select",
175
- variants: Lt
171
+ variants: Zt
176
172
  },
177
173
  stencilZPass: {
178
174
  type: "select",
179
- variants: Lt
175
+ variants: Zt
180
176
  },
181
177
  opacity: {
182
178
  type: "number",
@@ -186,7 +182,7 @@ const di = [
186
182
  },
187
183
  side: {
188
184
  type: "select",
189
- variants: bi
185
+ variants: Ci
190
186
  },
191
187
  roughness: {
192
188
  type: "number",
@@ -219,11 +215,11 @@ const di = [
219
215
  },
220
216
  normalMapType: {
221
217
  type: "select",
222
- variants: gi
218
+ variants: Ri
223
219
  },
224
220
  wireframeLinejoin: {
225
221
  type: "select",
226
- variants: Ei
222
+ variants: Yi
227
223
  },
228
224
  envMapIntensity: {
229
225
  type: "number",
@@ -329,7 +325,7 @@ const di = [
329
325
  },
330
326
  toneMapping: {
331
327
  type: "select",
332
- variants: Mi
328
+ variants: Hi
333
329
  },
334
330
  toneMappingExposure: {
335
331
  type: "number",
@@ -341,13 +337,25 @@ const di = [
341
337
  type: "number",
342
338
  min: 0,
343
339
  step: 1
340
+ },
341
+ damp: {
342
+ type: "number",
343
+ min: 0,
344
+ max: 1,
345
+ step: 1e-6
346
+ },
347
+ strength: {
348
+ type: "number",
349
+ min: 0,
350
+ step: 0.01
351
+ },
352
+ threshold: {
353
+ type: "number",
354
+ min: 0,
355
+ max: 1,
356
+ step: 1e-4
344
357
  }
345
- }, Pi = {
346
- type: {
347
- type: "select",
348
- variants: Si
349
- }
350
- }, xi = /* @__PURE__ */ new Set([
358
+ }, Ni = /* @__PURE__ */ new Set([
351
359
  "stencilFuncMask",
352
360
  "needsUpdate",
353
361
  "version",
@@ -360,160 +368,230 @@ const di = [
360
368
  "autoUpdate",
361
369
  "up"
362
370
  ]);
363
- var D, le, ce, Ee, St, gn, Pt, En, xt, Mn, vt, Sn, Ue, Yt;
364
- class bn {
365
- constructor(n) {
366
- u(this, ce);
367
- u(this, St);
368
- u(this, Pt);
369
- u(this, xt);
370
- u(this, vt);
371
- u(this, Ue);
372
- u(this, D, void 0);
373
- u(this, le, []);
374
- if (P(this, D, n), s(this, D) instanceof q.Object3D) {
375
- if (I(this, ce, Ee).call(this, s(this, D), `${s(this, D).name}.Parameters`, Ne, s(this, D) instanceof q.Camera ? () => {
376
- x.view.resize();
377
- } : void 0), s(this, D) instanceof q.Mesh) {
378
- const o = s(this, D).material;
379
- o instanceof q.Material && I(this, ce, Ee).call(this, o, `${s(this, D).name}.Parameters.Material`, Ne, () => {
380
- o.needsUpdate = !0;
381
- });
382
- } else if (s(this, D) instanceof q.Light) {
383
- const o = s(this, D).shadow;
384
- if (o) {
385
- I(this, ce, Ee).call(this, o, `${s(this, D).name}.Parameters.Shadow`, Ne, () => {
386
- o.needsUpdate = !0;
387
- });
388
- const e = o.camera;
389
- e && I(this, ce, Ee).call(this, e, `${s(this, D).name}.Parameters.Shadow.Camera`, Ne, () => {
390
- o.camera.updateProjectionMatrix();
391
- });
392
- }
393
- }
394
- } else if (s(this, D) instanceof q.WebGLRenderer) {
395
- const o = s(this, D);
396
- I(this, ce, Ee).call(this, o, "Renderer", Ne), I(this, ce, Ee).call(this, o.shadowMap, "Renderer.shadowMap", Pi, () => {
397
- o.shadowMap.needsUpdate = !0, pi(x.scene, (e) => {
398
- e.needsUpdate = !0;
399
- });
400
- });
401
- }
371
+ var He, ae, Ot, kn, jt, Cn, kt, Rn, Ct, Yn, Rt, Hn, nt, Wt, it, Ut, re, Se, le, xe;
372
+ class be {
373
+ constructor(t, o) {
374
+ d(this, Ot);
375
+ d(this, jt);
376
+ d(this, kt);
377
+ d(this, Ct);
378
+ d(this, Rt);
379
+ d(this, nt);
380
+ d(this, it);
381
+ d(this, re);
382
+ d(this, le);
383
+ d(this, He, void 0);
384
+ d(this, ae, []);
385
+ x(this, He, t);
386
+ const e = pe(pe({}, zi), o == null ? void 0 : o.optionsCatalog), a = /* @__PURE__ */ new Set([...Ni, ...(o == null ? void 0 : o.skipKeys) || []]), r = (o == null ? void 0 : o.folderName) || s(this, He).name, i = o == null ? void 0 : o.afterChange;
387
+ P(this, Ot, kn).call(this, {
388
+ subject: s(this, He),
389
+ skipKeys: a,
390
+ optionsCatalog: e,
391
+ folderKey: r,
392
+ afterChange: i
393
+ });
402
394
  }
403
395
  destroy() {
404
- s(this, le).forEach((n) => {
405
- n.close();
396
+ s(this, ae).forEach((t) => {
397
+ t.close();
406
398
  });
407
399
  }
408
400
  }
409
- D = new WeakMap(), le = new WeakMap(), ce = new WeakSet(), Ee = function(n, o, e, a) {
410
- for (const r in n) {
411
- if (r.startsWith("_") || xi.has(r))
401
+ He = new WeakMap(), ae = new WeakMap(), Ot = new WeakSet(), kn = function(t) {
402
+ const { subject: o, folderKey: e, optionsCatalog: a, afterChange: r, skipKeys: i } = t;
403
+ for (const l in o) {
404
+ if (l.startsWith("_") || i.has(l))
412
405
  continue;
413
- const i = n[r], l = `${o}.${r}`, m = e[r];
414
- typeof i == "number" ? (m == null ? void 0 : m.type) === "select" ? I(this, Ue, Yt).call(this, l, i, n, r, m, a) : I(this, St, gn).call(this, l, i, n, r, m, a) : i instanceof q.Vector2 || i instanceof q.Vector3 ? I(this, Pt, En).call(this, l, i, n, r, m, a) : typeof i == "boolean" && !r.startsWith("is") && !r.startsWith("matrix") ? I(this, xt, Mn).call(this, l, i, n, r, a) : i instanceof q.Color ? I(this, vt, Sn).call(this, l, i, n, r, a) : m && (m == null ? void 0 : m.type) === "select" && I(this, Ue, Yt).call(this, l, i, n, r, m, a);
406
+ const u = o[l], h = P(this, re, Se).call(this, u), f = `${e}.${l}`, g = a[l];
407
+ typeof h == "number" ? (g == null ? void 0 : g.type) === "select" ? P(this, nt, Wt).call(this, {
408
+ name: f,
409
+ value: u,
410
+ subject: o,
411
+ key: l,
412
+ managerOptions: g,
413
+ afterChange: r
414
+ }) : P(this, jt, Cn).call(this, {
415
+ name: f,
416
+ value: u,
417
+ subject: o,
418
+ key: l,
419
+ managerOptions: g,
420
+ afterChange: r
421
+ }) : h instanceof Pe.Vector2 || h instanceof Pe.Vector3 ? P(this, kt, Rn).call(this, {
422
+ name: f,
423
+ value: u,
424
+ subject: o,
425
+ key: l,
426
+ managerOptions: g,
427
+ afterChange: r
428
+ }) : typeof h == "boolean" && !l.startsWith("is") && !l.startsWith("matrix") ? P(this, Ct, Yn).call(this, {
429
+ name: f,
430
+ value: u,
431
+ subject: o,
432
+ key: l,
433
+ managerOptions: g,
434
+ afterChange: r
435
+ }) : h instanceof Pe.Color ? P(this, Rt, Hn).call(this, {
436
+ name: f,
437
+ value: u,
438
+ subject: o,
439
+ key: l,
440
+ managerOptions: g,
441
+ afterChange: r
442
+ }) : g && (g == null ? void 0 : g.type) === "select" && P(this, nt, Wt).call(this, {
443
+ name: f,
444
+ value: u,
445
+ subject: o,
446
+ key: l,
447
+ managerOptions: g,
448
+ afterChange: r
449
+ });
415
450
  }
416
- }, St = new WeakSet(), gn = function(n, o, e, a, r, i) {
417
- const l = new F(o, {
451
+ }, jt = new WeakSet(), Cn = function({
452
+ name: t,
453
+ value: o,
454
+ subject: e,
455
+ key: a,
456
+ managerOptions: r,
457
+ afterChange: i
458
+ }) {
459
+ const l = new Z(P(this, re, Se).call(this, o), {
418
460
  passport: {
419
- name: n,
420
- manager: ut({
461
+ name: t,
462
+ manager: pe({
421
463
  type: "number"
422
464
  }, r)
423
465
  }
424
466
  });
425
- l.subscribe((m) => {
426
- e[a] = m.current, i == null || i();
427
- }), s(this, le).push(l);
428
- }, Pt = new WeakSet(), En = function(n, o, e, a, r, i) {
429
- const l = (f) => {
430
- const w = [f.x, f.y];
431
- return f instanceof q.Vector3 && w.push(f.z), w;
432
- }, m = new F(l(o), {
467
+ l.subscribe((u) => {
468
+ P(this, le, xe).call(this, e, a, (h, f) => h[f] = u.current), i == null || i();
469
+ }), s(this, ae).push(l);
470
+ }, kt = new WeakSet(), Rn = function({
471
+ name: t,
472
+ value: o,
473
+ subject: e,
474
+ key: a,
475
+ managerOptions: r,
476
+ afterChange: i
477
+ }) {
478
+ const l = (h) => {
479
+ const f = [h.x, h.y];
480
+ return h instanceof Pe.Vector3 && f.push(h.z), f;
481
+ }, u = new Z(l(P(this, re, Se).call(this, o)), {
433
482
  passport: {
434
- name: n,
435
- manager: ut({
483
+ name: t,
484
+ manager: pe({
436
485
  type: "number"
437
486
  }, r)
438
487
  }
439
488
  });
440
- m.subscribe((f) => {
441
- e[a].set(...f.current), i == null || i();
442
- }), s(this, le).push(m);
443
- }, xt = new WeakSet(), Mn = function(n, o, e, a, r) {
444
- const i = new F(o, {
489
+ u.subscribe((h) => {
490
+ P(this, le, xe).call(this, e, a, (f, g) => f[g].set(...h.current)), i == null || i();
491
+ }), s(this, ae).push(u);
492
+ }, Ct = new WeakSet(), Yn = function({
493
+ name: t,
494
+ value: o,
495
+ subject: e,
496
+ key: a,
497
+ managerOptions: r,
498
+ afterChange: i
499
+ }) {
500
+ const l = new Z(P(this, re, Se).call(this, o), {
445
501
  passport: {
446
- name: n,
447
- manager: {
502
+ name: t,
503
+ manager: pe({
448
504
  type: "boolean"
449
- }
505
+ }, r)
450
506
  }
451
507
  });
452
- i.subscribe((l) => {
453
- e[a] = l.current, r == null || r();
454
- }), s(this, le).push(i);
455
- }, vt = new WeakSet(), Sn = function(n, o, e, a, r) {
456
- const i = new F(`#${o.getHexString()}`, {
508
+ l.subscribe((u) => {
509
+ P(this, le, xe).call(this, e, a, (h, f) => h[f] = u.current), i == null || i();
510
+ }), s(this, ae).push(l);
511
+ }, Rt = new WeakSet(), Hn = function({
512
+ name: t,
513
+ value: o,
514
+ subject: e,
515
+ key: a,
516
+ managerOptions: r,
517
+ afterChange: i
518
+ }) {
519
+ const l = new Z(`#${P(this, re, Se).call(this, o).getHexString()}`, {
457
520
  passport: {
458
- name: n,
459
- manager: {
521
+ name: t,
522
+ manager: pe({
460
523
  type: "color"
461
- }
462
- }
463
- });
464
- i.subscribe((l) => {
465
- e[a] = new q.Color(l.current), r == null || r();
466
- }), s(this, le).push(i);
467
- }, Ue = new WeakSet(), Yt = function(n, o, e, a, r, i) {
468
- const l = r.variants;
469
- let m = null;
470
- for (const w of l)
471
- o === q[w] && (m = w);
472
- const f = new F(m || o, {
473
- passport: {
474
- name: n,
475
- manager: ut({}, r)
524
+ }, r)
476
525
  }
477
526
  });
478
- f.subscribe((w) => {
479
- typeof w.current == "string" && (w.current[0] === w.current[0].toUpperCase() ? e[a] = q[w.current] : e[a] = w.current), i == null || i();
480
- }), s(this, le).push(f);
527
+ l.subscribe((u) => {
528
+ P(this, le, xe).call(this, e, a, (h, f) => h[f] = new Pe.Color(u.current)), i == null || i();
529
+ }), s(this, ae).push(l);
530
+ }, nt = new WeakSet(), Wt = function({
531
+ name: t,
532
+ value: o,
533
+ subject: e,
534
+ key: a,
535
+ managerOptions: r,
536
+ afterChange: i
537
+ }) {
538
+ const l = r == null ? void 0 : r.variants;
539
+ if (l) {
540
+ let u = null;
541
+ for (const f of l)
542
+ o === Pe[f] && (u = f);
543
+ const h = new Z(u || P(this, re, Se).call(this, o), {
544
+ passport: {
545
+ name: t,
546
+ manager: pe({}, r)
547
+ }
548
+ });
549
+ h.subscribe((f) => {
550
+ typeof f.current == "string" && (f.current[0] === f.current[0].toUpperCase() ? P(this, le, xe).call(this, e, a, (g, L) => g[L] = Pe[f.current]) : P(this, le, xe).call(this, e, a, (g, L) => g[L] = f.current)), i == null || i();
551
+ }), s(this, ae).push(h);
552
+ }
553
+ }, it = new WeakSet(), Ut = function(t) {
554
+ return Ti(t) && "value" in t;
555
+ }, re = new WeakSet(), Se = function(t) {
556
+ return P(this, it, Ut).call(this, t) ? t.value : t;
557
+ }, le = new WeakSet(), xe = function(t, o, e) {
558
+ P(this, it, Ut).call(this, t[o]) ? e(t[o], "value") : e(t, o);
481
559
  };
482
- var E, Ke, Se, Pe, xe, Be, ee, Re, Et, Ve;
483
- class Pn {
484
- constructor(n, o) {
485
- u(this, Re);
486
- u(this, E, void 0);
487
- u(this, Ke, null);
488
- u(this, Se, void 0);
489
- u(this, Pe, void 0);
490
- u(this, xe, void 0);
491
- u(this, Be, !0);
492
- u(this, ee, []);
493
- u(this, Ve, () => {
494
- s(this, ee).forEach((n) => {
495
- "update" in n && n.update();
560
+ var E, ue, _e, Te, Ie, st, $, ze, Lt, ot;
561
+ class zn {
562
+ constructor(t, o) {
563
+ d(this, ze);
564
+ d(this, E, void 0);
565
+ d(this, ue, []);
566
+ d(this, _e, void 0);
567
+ d(this, Te, void 0);
568
+ d(this, Ie, void 0);
569
+ d(this, st, !0);
570
+ d(this, $, []);
571
+ d(this, ot, () => {
572
+ s(this, $).forEach((t) => {
573
+ "update" in t && t.update();
496
574
  });
497
575
  });
498
- var l, m;
499
- P(this, E, n);
576
+ var l, u;
577
+ x(this, E, t);
500
578
  let e = !1;
501
- n.name.startsWith("T.") && (n.name = n.name.slice(2)), n.name.includes("P.") && (e = !0, n.name = n.name.replace("P.", ""));
502
- const a = n.name;
579
+ t.name.startsWith("T.") && (t.name = t.name.slice(2)), t.name.includes("P.") && (e = !0, t.name = t.name.replace("P.", ""));
580
+ const a = t.name;
503
581
  s(this, E).userData.controlled = !0;
504
- const r = (o == null ? void 0 : o.step) || 1e-4, i = ((l = n.userData) == null ? void 0 : l.box) || n;
505
- if (s(this, E) instanceof Nn) {
506
- let f;
507
- s(this, E) instanceof Qn ? f = new qn(s(this, E), 100) : s(this, E) instanceof Gn ? (s(this, E).scale.setScalar(100), f = new Wn(s(this, E), 1)) : s(this, E) instanceof Un ? f = new Kn(s(this, E)) : s(this, E) instanceof Bn && (f = new Vn(s(this, E), 100)), s(this, ee).push(f);
508
- const w = (m = s(this, E).shadow) == null ? void 0 : m.camera;
509
- if (w instanceof $n) {
510
- const H = new Jn(w);
511
- s(this, ee).push(H);
582
+ const r = (o == null ? void 0 : o.step) || 1e-4, i = ((l = t.userData) == null ? void 0 : l.box) || t;
583
+ if (s(this, E) instanceof fn) {
584
+ let h;
585
+ s(this, E) instanceof ai ? h = new ri(s(this, E), 100) : s(this, E) instanceof li ? (s(this, E).scale.setScalar(100), h = new ci(s(this, E), 1)) : s(this, E) instanceof hi ? h = new pi(s(this, E)) : s(this, E) instanceof mi && (h = new di(s(this, E), 100)), s(this, $).push(h);
586
+ const f = (u = s(this, E).shadow) == null ? void 0 : u.camera;
587
+ if (f instanceof yn) {
588
+ const g = new ui(f);
589
+ s(this, $).push(g);
512
590
  }
513
591
  }
514
- s(this, ee).forEach((f) => {
515
- x.view.add(f);
516
- }), P(this, Se, new F([i.position.x, i.position.y, i.position.z], {
592
+ if (s(this, $).forEach((h) => {
593
+ b.view.add(h);
594
+ }), x(this, _e, new Z([i.position.x, i.position.y, i.position.z], {
517
595
  passport: {
518
596
  name: `${a}.Transformation.Position`,
519
597
  manager: {
@@ -521,7 +599,7 @@ class Pn {
521
599
  step: r
522
600
  }
523
601
  }
524
- })), P(this, Pe, new F([i.rotation.x, i.rotation.y, i.rotation.z], {
602
+ })), x(this, Te, new Z([i.rotation.x, i.rotation.y, i.rotation.z], {
525
603
  passport: {
526
604
  name: `${a}.Transformation.Rotation`,
527
605
  manager: {
@@ -530,7 +608,7 @@ class Pn {
530
608
  ease: 0.01
531
609
  }
532
610
  }
533
- })), P(this, xe, new F([i.scale.x, i.scale.y, i.scale.z], {
611
+ })), x(this, Ie, new Z([i.scale.x, i.scale.y, i.scale.z], {
534
612
  passport: {
535
613
  name: `${a}.Transformation.Scale`,
536
614
  manager: {
@@ -538,37 +616,73 @@ class Pn {
538
616
  step: r
539
617
  }
540
618
  }
541
- })), this.save(), P(this, Be, !1), s(this, Se).subscribe((f) => {
542
- I(this, Re, Et).call(this, "position", f.current);
543
- }), s(this, Pe).subscribe((f) => {
544
- I(this, Re, Et).call(this, "rotation", f.current);
545
- }), s(this, xe).subscribe((f) => {
546
- I(this, Re, Et).call(this, "scale", f.current);
547
- }), e && P(this, Ke, new bn(s(this, E))), s(this, ee).length && on.subscribe(s(this, Ve));
619
+ })), this.save(), x(this, st, !1), s(this, _e).subscribe((h) => {
620
+ P(this, ze, Lt).call(this, "position", h.current);
621
+ }), s(this, Te).subscribe((h) => {
622
+ P(this, ze, Lt).call(this, "rotation", h.current);
623
+ }), s(this, Ie).subscribe((h) => {
624
+ P(this, ze, Lt).call(this, "scale", h.current);
625
+ }), e) {
626
+ if (s(this, ue).push(
627
+ new be(s(this, E), {
628
+ folderName: `${s(this, E).name}.Parameters`,
629
+ afterChange: s(this, E) instanceof yn ? () => {
630
+ b.view.resize();
631
+ } : void 0
632
+ })
633
+ ), s(this, E) instanceof p) {
634
+ const h = s(this, E).material;
635
+ h instanceof fi && s(this, ue).push(
636
+ new be(h, {
637
+ folderName: `${s(this, E).name}.Parameters.Material`,
638
+ afterChange: () => {
639
+ h.needsUpdate = !0;
640
+ }
641
+ })
642
+ );
643
+ } else if (s(this, E) instanceof fn) {
644
+ const h = s(this, E).shadow;
645
+ h && s(this, ue).push(
646
+ new be(h, {
647
+ folderName: `${s(this, E).name}.Parameters.Shadow`,
648
+ afterChange: () => {
649
+ h.needsUpdate = !0;
650
+ }
651
+ })
652
+ ), h.camera && s(this, ue).push(
653
+ new be(h, {
654
+ folderName: `${s(this, E).name}.Parameters.Shadow.Camera`,
655
+ afterChange: () => {
656
+ h.camera.updateProjectionMatrix();
657
+ }
658
+ })
659
+ );
660
+ }
661
+ }
662
+ s(this, $).length && En.subscribe(s(this, ot));
548
663
  }
549
664
  get object3d() {
550
665
  return s(this, E);
551
666
  }
552
667
  get helpers() {
553
- return s(this, ee);
668
+ return s(this, $);
554
669
  }
555
670
  get raycasterTarget() {
556
- return s(this, ee)[0] || s(this, E);
671
+ return s(this, $)[0] || s(this, E);
557
672
  }
558
673
  destroy() {
559
- var n;
560
- (n = s(this, Ke)) == null || n.destroy(), s(this, Se).close(), s(this, Pe).close(), s(this, xe).close(), s(this, E).userData.controlled = !1, s(this, ee).forEach((o) => {
561
- o && "dispose" in o && (o.dispose(), x.view.remove(o));
562
- }), on.unsubscribe(s(this, Ve));
674
+ s(this, ue).forEach((t) => t.destroy()), s(this, _e).close(), s(this, Te).close(), s(this, Ie).close(), s(this, E).userData.controlled = !1, s(this, $).forEach((t) => {
675
+ t && "dispose" in t && (t.dispose(), b.view.remove(t));
676
+ }), En.unsubscribe(s(this, ot));
563
677
  }
564
678
  save() {
565
- const n = (o, e) => {
566
- (!s(this, Be) || o.initial === o.current) && (o.current = [e.x, e.y, e.z]);
679
+ const t = (o, e) => {
680
+ (!s(this, st) || o.initial === o.current) && (o.current = [e.x, e.y, e.z]);
567
681
  };
568
- n(s(this, Se), s(this, E).position), n(s(this, Pe), s(this, E).rotation), n(s(this, xe), s(this, E).scale);
682
+ t(s(this, _e), s(this, E).position), t(s(this, Te), s(this, E).rotation), t(s(this, Ie), s(this, E).scale);
569
683
  }
570
684
  }
571
- E = new WeakMap(), Ke = new WeakMap(), Se = new WeakMap(), Pe = new WeakMap(), xe = new WeakMap(), Be = new WeakMap(), ee = new WeakMap(), Re = new WeakSet(), Et = function(n, o) {
685
+ E = new WeakMap(), ue = new WeakMap(), _e = new WeakMap(), Te = new WeakMap(), Ie = new WeakMap(), st = new WeakMap(), $ = new WeakMap(), ze = new WeakSet(), Lt = function(t, o) {
572
686
  const e = s(this, E).userData.box;
573
687
  if (e) {
574
688
  const a = (r) => ({
@@ -576,78 +690,78 @@ E = new WeakMap(), Ke = new WeakMap(), Se = new WeakMap(), Pe = new WeakMap(), x
576
690
  y: o[1] - r.y,
577
691
  z: o[2] - r.z
578
692
  });
579
- n === "position" ? e.setPositionStep(
693
+ t === "position" ? e.setPositionStep(
580
694
  "_manager",
581
695
  "+",
582
696
  a(e.getIncludedPositionSteps("_manager"))
583
- ) : n === "rotation" ? e.setRotationStep(
697
+ ) : t === "rotation" ? e.setRotationStep(
584
698
  "_manager",
585
699
  "+",
586
700
  a(e.getIncludedRotationSteps("_manager"))
587
- ) : n === "scale" && e.setScaleStep(
701
+ ) : t === "scale" && e.setScaleStep(
588
702
  "_manager",
589
703
  "+",
590
704
  a(e.getIncludedScaleSteps("_manager"))
591
705
  );
592
706
  } else
593
- s(this, E)[n].set(...o);
594
- }, Ve = new WeakMap();
595
- const sn = { type: "change" }, Dt = { type: "start" }, an = { type: "end" }, yt = new ei(), rn = new ti(), vi = Math.cos(70 * ni.DEG2RAD);
596
- class _i extends ii {
597
- constructor(n, o) {
598
- super(), this.object = n, this.domElement = o, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new d(), this.cursor = new d(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Oe.ROTATE, MIDDLE: Oe.DOLLY, RIGHT: Oe.PAN }, this.touches = { ONE: ke.ROTATE, TWO: ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
707
+ s(this, E)[t].set(...o);
708
+ }, ot = new WeakMap();
709
+ const Pn = { type: "change" }, Ft = { type: "start" }, Mn = { type: "end" }, _t = new yi(), Sn = new bi(), Xi = Math.cos(70 * wi.DEG2RAD);
710
+ class Zi extends gi {
711
+ constructor(t, o) {
712
+ super(), this.object = t, this.domElement = o, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new y(), this.cursor = new y(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Re.ROTATE, MIDDLE: Re.DOLLY, RIGHT: Re.PAN }, this.touches = { ONE: Ye.ROTATE, TWO: Ye.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
599
713
  return l.phi;
600
714
  }, this.getAzimuthalAngle = function() {
601
715
  return l.theta;
602
716
  }, this.getDistance = function() {
603
717
  return this.object.position.distanceTo(this.target);
604
- }, this.listenToKeyEvents = function(t) {
605
- t.addEventListener("keydown", It), this._domElementKeyEvents = t;
718
+ }, this.listenToKeyEvents = function(n) {
719
+ n.addEventListener("keydown", Nt), this._domElementKeyEvents = n;
606
720
  }, this.stopListenToKeyEvents = function() {
607
- this._domElementKeyEvents.removeEventListener("keydown", It), this._domElementKeyEvents = null;
721
+ this._domElementKeyEvents.removeEventListener("keydown", Nt), this._domElementKeyEvents = null;
608
722
  }, this.saveState = function() {
609
723
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
610
724
  }, this.reset = function() {
611
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(sn), e.update(), r = a.NONE;
725
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Pn), e.update(), r = a.NONE;
612
726
  }, this.update = function() {
613
- const t = new d(), c = new V().setFromUnitVectors(n.up, new d(0, 1, 0)), y = c.clone().invert(), g = new d(), C = new V(), pe = new d(), U = 2 * Math.PI;
614
- return function(Xn = null) {
615
- const Bt = e.object.position;
616
- t.copy(Bt).sub(e.target), t.applyQuaternion(c), l.setFromVector3(t), e.autoRotate && r === a.NONE && we(_t(Xn)), e.enableDamping ? (l.theta += m.theta * e.dampingFactor, l.phi += m.phi * e.dampingFactor) : (l.theta += m.theta, l.phi += m.phi);
617
- let se = e.minAzimuthAngle, ae = e.maxAzimuthAngle;
618
- isFinite(se) && isFinite(ae) && (se < -Math.PI ? se += U : se > Math.PI && (se -= U), ae < -Math.PI ? ae += U : ae > Math.PI && (ae -= U), se <= ae ? l.theta = Math.max(se, Math.min(ae, l.theta)) : l.theta = l.theta > (se + ae) / 2 ? Math.max(se, l.theta) : Math.min(ae, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(w, e.dampingFactor) : e.target.add(w), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor);
619
- let Ce = !1;
620
- if (e.zoomToCursor && Te || e.object.isOrthographicCamera)
621
- l.radius = he(l.radius);
727
+ const n = new y(), c = new K().setFromUnitVectors(t.up, new y(0, 1, 0)), w = c.clone().invert(), S = new y(), N = new K(), he = new y(), G = 2 * Math.PI;
728
+ return function(ni = null) {
729
+ const pn = e.object.position;
730
+ n.copy(pn).sub(e.target), n.applyQuaternion(c), l.setFromVector3(n), e.autoRotate && r === a.NONE && ge(Ht(ni)), e.enableDamping ? (l.theta += u.theta * e.dampingFactor, l.phi += u.phi * e.dampingFactor) : (l.theta += u.theta, l.phi += u.phi);
731
+ let ie = e.minAzimuthAngle, se = e.maxAzimuthAngle;
732
+ isFinite(ie) && isFinite(se) && (ie < -Math.PI ? ie += G : ie > Math.PI && (ie -= G), se < -Math.PI ? se += G : se > Math.PI && (se -= G), ie <= se ? l.theta = Math.max(ie, Math.min(se, l.theta)) : l.theta = l.theta > (ie + se) / 2 ? Math.max(ie, l.theta) : Math.min(se, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(f, e.dampingFactor) : e.target.add(f), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor);
733
+ let Ke = !1;
734
+ if (e.zoomToCursor && De || e.object.isOrthographicCamera)
735
+ l.radius = ce(l.radius);
622
736
  else {
623
- const re = l.radius;
624
- l.radius = he(l.radius * f), Ce = re != l.radius;
737
+ const oe = l.radius;
738
+ l.radius = ce(l.radius * h), Ke = oe != l.radius;
625
739
  }
626
- if (t.setFromSpherical(l), t.applyQuaternion(y), Bt.copy(e.target).add(t), e.object.lookAt(e.target), e.enableDamping === !0 ? (m.theta *= 1 - e.dampingFactor, m.phi *= 1 - e.dampingFactor, w.multiplyScalar(1 - e.dampingFactor)) : (m.set(0, 0, 0), w.set(0, 0, 0)), e.zoomToCursor && Te) {
627
- let re = null;
740
+ if (n.setFromSpherical(l), n.applyQuaternion(w), pn.copy(e.target).add(n), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, f.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), f.set(0, 0, 0)), e.zoomToCursor && De) {
741
+ let oe = null;
628
742
  if (e.object.isPerspectiveCamera) {
629
- const Ze = t.length();
630
- re = he(Ze * f);
631
- const dt = Ze - re;
632
- e.object.position.addScaledVector(ie, dt), e.object.updateMatrixWorld(), Ce = !!dt;
743
+ const Be = n.length();
744
+ oe = ce(Be * h);
745
+ const xt = Be - oe;
746
+ e.object.position.addScaledVector(te, xt), e.object.updateMatrixWorld(), Ke = !!xt;
633
747
  } else if (e.object.isOrthographicCamera) {
634
- const Ze = new d(R.x, R.y, 0);
635
- Ze.unproject(e.object);
636
- const dt = e.object.zoom;
637
- e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix(), Ce = dt !== e.object.zoom;
638
- const Vt = new d(R.x, R.y, 0);
639
- Vt.unproject(e.object), e.object.position.sub(Vt).add(Ze), e.object.updateMatrixWorld(), re = t.length();
748
+ const Be = new y(C.x, C.y, 0);
749
+ Be.unproject(e.object);
750
+ const xt = e.object.zoom;
751
+ e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), Ke = xt !== e.object.zoom;
752
+ const mn = new y(C.x, C.y, 0);
753
+ mn.unproject(e.object), e.object.position.sub(mn).add(Be), e.object.updateMatrixWorld(), oe = n.length();
640
754
  } else
641
755
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
642
- re !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(re).add(e.object.position) : (yt.origin.copy(e.object.position), yt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(yt.direction)) < vi ? n.lookAt(e.target) : (rn.setFromNormalAndCoplanarPoint(e.object.up, e.target), yt.intersectPlane(rn, e.target))));
756
+ oe !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(oe).add(e.object.position) : (_t.origin.copy(e.object.position), _t.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(_t.direction)) < Xi ? t.lookAt(e.target) : (Sn.setFromNormalAndCoplanarPoint(e.object.up, e.target), _t.intersectPlane(Sn, e.target))));
643
757
  } else if (e.object.isOrthographicCamera) {
644
- const re = e.object.zoom;
645
- e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), re !== e.object.zoom && (e.object.updateProjectionMatrix(), Ce = !0);
758
+ const oe = e.object.zoom;
759
+ e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), oe !== e.object.zoom && (e.object.updateProjectionMatrix(), Ke = !0);
646
760
  }
647
- return f = 1, Te = !1, Ce || g.distanceToSquared(e.object.position) > i || 8 * (1 - C.dot(e.object.quaternion)) > i || pe.distanceToSquared(e.target) > i ? (e.dispatchEvent(sn), g.copy(e.object.position), C.copy(e.object.quaternion), pe.copy(e.target), !0) : !1;
761
+ return h = 1, De = !1, Ke || S.distanceToSquared(e.object.position) > i || 8 * (1 - N.dot(e.object.quaternion)) > i || he.distanceToSquared(e.target) > i ? (e.dispatchEvent(Pn), S.copy(e.object.position), N.copy(e.object.quaternion), he.copy(e.target), !0) : !1;
648
762
  };
649
763
  }(), this.dispose = function() {
650
- e.domElement.removeEventListener("contextmenu", Ut), e.domElement.removeEventListener("pointerdown", Nt), e.domElement.removeEventListener("pointercancel", Xe), e.domElement.removeEventListener("wheel", Qt), e.domElement.removeEventListener("pointermove", Tt), e.domElement.removeEventListener("pointerup", Xe), e.domElement.getRootNode().removeEventListener("keydown", qt, { capture: !0 }), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", It), e._domElementKeyEvents = null);
764
+ e.domElement.removeEventListener("contextmenu", cn), e.domElement.removeEventListener("pointerdown", sn), e.domElement.removeEventListener("pointercancel", Ue), e.domElement.removeEventListener("wheel", on), e.domElement.removeEventListener("pointermove", zt), e.domElement.removeEventListener("pointerup", Ue), e.domElement.getRootNode().removeEventListener("keydown", an, { capture: !0 }), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Nt), e._domElementKeyEvents = null);
651
765
  };
652
766
  const e = this, a = {
653
767
  NONE: -1,
@@ -660,183 +774,183 @@ class _i extends ii {
660
774
  TOUCH_DOLLY_ROTATE: 6
661
775
  };
662
776
  let r = a.NONE;
663
- const i = 1e-6, l = new en(), m = new en();
664
- let f = 1;
665
- const w = new d(), H = new J(), Q = new J(), ne = new J(), G = new J(), A = new J(), k = new J(), L = new J(), S = new J(), v = new J(), ie = new d(), R = new J();
666
- let Te = !1;
667
- const _ = [], ye = {};
668
- let ze = !1;
669
- function _t(t) {
670
- return t !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * t : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
777
+ const i = 1e-6, l = new bn(), u = new bn();
778
+ let h = 1;
779
+ const f = new y(), g = new V(), L = new V(), ee = new V(), Q = new V(), D = new V(), k = new V(), O = new V(), _ = new V(), T = new V(), te = new y(), C = new V();
780
+ let De = !1;
781
+ const I = [], we = {};
782
+ let We = !1;
783
+ function Ht(n) {
784
+ return n !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * n : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
671
785
  }
672
- function Ie(t) {
673
- const c = Math.abs(t * 0.01);
786
+ function Oe(n) {
787
+ const c = Math.abs(n * 0.01);
674
788
  return Math.pow(0.95, e.zoomSpeed * c);
675
789
  }
676
- function we(t) {
677
- m.theta -= t;
790
+ function ge(n) {
791
+ u.theta -= n;
678
792
  }
679
- function Ae(t) {
680
- m.phi -= t;
793
+ function je(n) {
794
+ u.phi -= n;
681
795
  }
682
- const W = function() {
683
- const t = new d();
684
- return function(y, g) {
685
- t.setFromMatrixColumn(g, 0), t.multiplyScalar(-y), w.add(t);
796
+ const q = function() {
797
+ const n = new y();
798
+ return function(w, S) {
799
+ n.setFromMatrixColumn(S, 0), n.multiplyScalar(-w), f.add(n);
686
800
  };
687
- }(), z = function() {
688
- const t = new d();
689
- return function(y, g) {
690
- e.screenSpacePanning === !0 ? t.setFromMatrixColumn(g, 1) : (t.setFromMatrixColumn(g, 0), t.crossVectors(e.object.up, t)), t.multiplyScalar(y), w.add(t);
801
+ }(), H = function() {
802
+ const n = new y();
803
+ return function(w, S) {
804
+ e.screenSpacePanning === !0 ? n.setFromMatrixColumn(S, 1) : (n.setFromMatrixColumn(S, 0), n.crossVectors(e.object.up, n)), n.multiplyScalar(w), f.add(n);
691
805
  };
692
- }(), $ = function() {
693
- const t = new d();
694
- return function(y, g) {
695
- const C = e.domElement;
806
+ }(), B = function() {
807
+ const n = new y();
808
+ return function(w, S) {
809
+ const N = e.domElement;
696
810
  if (e.object.isPerspectiveCamera) {
697
- const pe = e.object.position;
698
- t.copy(pe).sub(e.target);
699
- let U = t.length();
700
- U *= Math.tan(e.object.fov / 2 * Math.PI / 180), W(2 * y * U / C.clientHeight, e.object.matrix), z(2 * g * U / C.clientHeight, e.object.matrix);
811
+ const he = e.object.position;
812
+ n.copy(he).sub(e.target);
813
+ let G = n.length();
814
+ G *= Math.tan(e.object.fov / 2 * Math.PI / 180), q(2 * w * G / N.clientHeight, e.object.matrix), H(2 * S * G / N.clientHeight, e.object.matrix);
701
815
  } else
702
- e.object.isOrthographicCamera ? (W(y * (e.object.right - e.object.left) / e.object.zoom / C.clientWidth, e.object.matrix), z(g * (e.object.top - e.object.bottom) / e.object.zoom / C.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
816
+ e.object.isOrthographicCamera ? (q(w * (e.object.right - e.object.left) / e.object.zoom / N.clientWidth, e.object.matrix), H(S * (e.object.top - e.object.bottom) / e.object.zoom / N.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
703
817
  };
704
818
  }();
705
- function X(t) {
706
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f /= t : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
819
+ function z(n) {
820
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h /= n : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
707
821
  }
708
- function oe(t) {
709
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f *= t : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
822
+ function ne(n) {
823
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h *= n : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
710
824
  }
711
- function T(t, c) {
825
+ function A(n, c) {
712
826
  if (!e.zoomToCursor)
713
827
  return;
714
- Te = !0;
715
- const y = e.domElement.getBoundingClientRect(), g = t - y.left, C = c - y.top, pe = y.width, U = y.height;
716
- R.x = g / pe * 2 - 1, R.y = -(C / U) * 2 + 1, ie.set(R.x, R.y, 1).unproject(e.object).sub(e.object.position).normalize();
828
+ De = !0;
829
+ const w = e.domElement.getBoundingClientRect(), S = n - w.left, N = c - w.top, he = w.width, G = w.height;
830
+ C.x = S / he * 2 - 1, C.y = -(N / G) * 2 + 1, te.set(C.x, C.y, 1).unproject(e.object).sub(e.object.position).normalize();
717
831
  }
718
- function he(t) {
719
- return Math.max(e.minDistance, Math.min(e.maxDistance, t));
832
+ function ce(n) {
833
+ return Math.max(e.minDistance, Math.min(e.maxDistance, n));
720
834
  }
721
- function be(t) {
722
- H.set(t.clientX, t.clientY);
835
+ function Ee(n) {
836
+ g.set(n.clientX, n.clientY);
723
837
  }
724
- function Le(t) {
725
- T(t.clientX, t.clientX), L.set(t.clientX, t.clientY);
838
+ function ke(n) {
839
+ A(n.clientX, n.clientX), O.set(n.clientX, n.clientY);
726
840
  }
727
- function pt(t) {
728
- G.set(t.clientX, t.clientY);
841
+ function Mt(n) {
842
+ Q.set(n.clientX, n.clientY);
729
843
  }
730
- function mt(t) {
731
- Q.set(t.clientX, t.clientY), ne.subVectors(Q, H).multiplyScalar(e.rotateSpeed);
844
+ function St(n) {
845
+ L.set(n.clientX, n.clientY), ee.subVectors(L, g).multiplyScalar(e.rotateSpeed);
732
846
  const c = e.domElement;
733
- we(2 * Math.PI * ne.x / c.clientHeight), Ae(2 * Math.PI * ne.y / c.clientHeight), H.copy(Q), e.update();
847
+ ge(2 * Math.PI * ee.x / c.clientHeight), je(2 * Math.PI * ee.y / c.clientHeight), g.copy(L), e.update();
734
848
  }
735
- function xn(t) {
736
- S.set(t.clientX, t.clientY), v.subVectors(S, L), v.y > 0 ? X(Ie(v.y)) : v.y < 0 && oe(Ie(v.y)), L.copy(S), e.update();
849
+ function Xn(n) {
850
+ _.set(n.clientX, n.clientY), T.subVectors(_, O), T.y > 0 ? z(Oe(T.y)) : T.y < 0 && ne(Oe(T.y)), O.copy(_), e.update();
737
851
  }
738
- function vn(t) {
739
- A.set(t.clientX, t.clientY), k.subVectors(A, G).multiplyScalar(e.panSpeed), $(k.x, k.y), G.copy(A), e.update();
852
+ function Zn(n) {
853
+ D.set(n.clientX, n.clientY), k.subVectors(D, Q).multiplyScalar(e.panSpeed), B(k.x, k.y), Q.copy(D), e.update();
740
854
  }
741
- function _n(t) {
742
- T(t.clientX, t.clientY), t.deltaY < 0 ? oe(Ie(t.deltaY)) : t.deltaY > 0 && X(Ie(t.deltaY)), e.update();
855
+ function Fn(n) {
856
+ A(n.clientX, n.clientY), n.deltaY < 0 ? ne(Oe(n.deltaY)) : n.deltaY > 0 && z(Oe(n.deltaY)), e.update();
743
857
  }
744
- function Tn(t) {
858
+ function Qn(n) {
745
859
  let c = !1;
746
- switch (t.code) {
860
+ switch (n.code) {
747
861
  case e.keys.UP:
748
- t.ctrlKey || t.metaKey || t.shiftKey ? Ae(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : $(0, e.keyPanSpeed), c = !0;
862
+ n.ctrlKey || n.metaKey || n.shiftKey ? je(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, e.keyPanSpeed), c = !0;
749
863
  break;
750
864
  case e.keys.BOTTOM:
751
- t.ctrlKey || t.metaKey || t.shiftKey ? Ae(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : $(0, -e.keyPanSpeed), c = !0;
865
+ n.ctrlKey || n.metaKey || n.shiftKey ? je(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, -e.keyPanSpeed), c = !0;
752
866
  break;
753
867
  case e.keys.LEFT:
754
- t.ctrlKey || t.metaKey || t.shiftKey ? we(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : $(e.keyPanSpeed, 0), c = !0;
868
+ n.ctrlKey || n.metaKey || n.shiftKey ? ge(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(e.keyPanSpeed, 0), c = !0;
755
869
  break;
756
870
  case e.keys.RIGHT:
757
- t.ctrlKey || t.metaKey || t.shiftKey ? we(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : $(-e.keyPanSpeed, 0), c = !0;
871
+ n.ctrlKey || n.metaKey || n.shiftKey ? ge(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(-e.keyPanSpeed, 0), c = !0;
758
872
  break;
759
873
  }
760
- c && (t.preventDefault(), e.update());
874
+ c && (n.preventDefault(), e.update());
761
875
  }
762
- function Ht(t) {
763
- if (_.length === 1)
764
- H.set(t.pageX, t.pageY);
876
+ function Vt(n) {
877
+ if (I.length === 1)
878
+ g.set(n.pageX, n.pageY);
765
879
  else {
766
- const c = De(t), y = 0.5 * (t.pageX + c.x), g = 0.5 * (t.pageY + c.y);
767
- H.set(y, g);
880
+ const c = Ce(n), w = 0.5 * (n.pageX + c.x), S = 0.5 * (n.pageY + c.y);
881
+ g.set(w, S);
768
882
  }
769
883
  }
770
- function zt(t) {
771
- if (_.length === 1)
772
- G.set(t.pageX, t.pageY);
884
+ function $t(n) {
885
+ if (I.length === 1)
886
+ Q.set(n.pageX, n.pageY);
773
887
  else {
774
- const c = De(t), y = 0.5 * (t.pageX + c.x), g = 0.5 * (t.pageY + c.y);
775
- G.set(y, g);
888
+ const c = Ce(n), w = 0.5 * (n.pageX + c.x), S = 0.5 * (n.pageY + c.y);
889
+ Q.set(w, S);
776
890
  }
777
891
  }
778
- function Xt(t) {
779
- const c = De(t), y = t.pageX - c.x, g = t.pageY - c.y, C = Math.sqrt(y * y + g * g);
780
- L.set(0, C);
892
+ function Jt(n) {
893
+ const c = Ce(n), w = n.pageX - c.x, S = n.pageY - c.y, N = Math.sqrt(w * w + S * S);
894
+ O.set(0, N);
781
895
  }
782
- function In(t) {
783
- e.enableZoom && Xt(t), e.enablePan && zt(t);
896
+ function qn(n) {
897
+ e.enableZoom && Jt(n), e.enablePan && $t(n);
784
898
  }
785
- function An(t) {
786
- e.enableZoom && Xt(t), e.enableRotate && Ht(t);
899
+ function Gn(n) {
900
+ e.enableZoom && Jt(n), e.enableRotate && Vt(n);
787
901
  }
788
- function Ct(t) {
789
- if (_.length == 1)
790
- Q.set(t.pageX, t.pageY);
902
+ function en(n) {
903
+ if (I.length == 1)
904
+ L.set(n.pageX, n.pageY);
791
905
  else {
792
- const y = De(t), g = 0.5 * (t.pageX + y.x), C = 0.5 * (t.pageY + y.y);
793
- Q.set(g, C);
906
+ const w = Ce(n), S = 0.5 * (n.pageX + w.x), N = 0.5 * (n.pageY + w.y);
907
+ L.set(S, N);
794
908
  }
795
- ne.subVectors(Q, H).multiplyScalar(e.rotateSpeed);
909
+ ee.subVectors(L, g).multiplyScalar(e.rotateSpeed);
796
910
  const c = e.domElement;
797
- we(2 * Math.PI * ne.x / c.clientHeight), Ae(2 * Math.PI * ne.y / c.clientHeight), H.copy(Q);
911
+ ge(2 * Math.PI * ee.x / c.clientHeight), je(2 * Math.PI * ee.y / c.clientHeight), g.copy(L);
798
912
  }
799
- function Zt(t) {
800
- if (_.length === 1)
801
- A.set(t.pageX, t.pageY);
913
+ function tn(n) {
914
+ if (I.length === 1)
915
+ D.set(n.pageX, n.pageY);
802
916
  else {
803
- const c = De(t), y = 0.5 * (t.pageX + c.x), g = 0.5 * (t.pageY + c.y);
804
- A.set(y, g);
917
+ const c = Ce(n), w = 0.5 * (n.pageX + c.x), S = 0.5 * (n.pageY + c.y);
918
+ D.set(w, S);
805
919
  }
806
- k.subVectors(A, G).multiplyScalar(e.panSpeed), $(k.x, k.y), G.copy(A);
920
+ k.subVectors(D, Q).multiplyScalar(e.panSpeed), B(k.x, k.y), Q.copy(D);
807
921
  }
808
- function Ft(t) {
809
- const c = De(t), y = t.pageX - c.x, g = t.pageY - c.y, C = Math.sqrt(y * y + g * g);
810
- S.set(0, C), v.set(0, Math.pow(S.y / L.y, e.zoomSpeed)), X(v.y), L.copy(S);
811
- const pe = (t.pageX + c.x) * 0.5, U = (t.pageY + c.y) * 0.5;
812
- T(pe, U);
922
+ function nn(n) {
923
+ const c = Ce(n), w = n.pageX - c.x, S = n.pageY - c.y, N = Math.sqrt(w * w + S * S);
924
+ _.set(0, N), T.set(0, Math.pow(_.y / O.y, e.zoomSpeed)), z(T.y), O.copy(_);
925
+ const he = (n.pageX + c.x) * 0.5, G = (n.pageY + c.y) * 0.5;
926
+ A(he, G);
813
927
  }
814
- function Ln(t) {
815
- e.enableZoom && Ft(t), e.enablePan && Zt(t);
928
+ function Wn(n) {
929
+ e.enableZoom && nn(n), e.enablePan && tn(n);
816
930
  }
817
- function Dn(t) {
818
- e.enableZoom && Ft(t), e.enableRotate && Ct(t);
931
+ function Un(n) {
932
+ e.enableZoom && nn(n), e.enableRotate && en(n);
819
933
  }
820
- function Nt(t) {
821
- e.enabled !== !1 && (_.length === 0 && (e.domElement.setPointerCapture(t.pointerId), e.domElement.addEventListener("pointermove", Tt), e.domElement.addEventListener("pointerup", Xe)), !zn(t) && (jn(t), t.pointerType === "touch" ? Wt(t) : On(t)));
934
+ function sn(n) {
935
+ e.enabled !== !1 && (I.length === 0 && (e.domElement.setPointerCapture(n.pointerId), e.domElement.addEventListener("pointermove", zt), e.domElement.addEventListener("pointerup", Ue)), !ti(n) && (Jn(n), n.pointerType === "touch" ? ln(n) : Kn(n)));
822
936
  }
823
- function Tt(t) {
824
- e.enabled !== !1 && (t.pointerType === "touch" ? Yn(t) : kn(t));
937
+ function zt(n) {
938
+ e.enabled !== !1 && (n.pointerType === "touch" ? $n(n) : Bn(n));
825
939
  }
826
- function Xe(t) {
827
- switch (Hn(t), _.length) {
940
+ function Ue(n) {
941
+ switch (ei(n), I.length) {
828
942
  case 0:
829
- e.domElement.releasePointerCapture(t.pointerId), e.domElement.removeEventListener("pointermove", Tt), e.domElement.removeEventListener("pointerup", Xe), e.dispatchEvent(an), r = a.NONE;
943
+ e.domElement.releasePointerCapture(n.pointerId), e.domElement.removeEventListener("pointermove", zt), e.domElement.removeEventListener("pointerup", Ue), e.dispatchEvent(Mn), r = a.NONE;
830
944
  break;
831
945
  case 1:
832
- const c = _[0], y = ye[c];
833
- Wt({ pointerId: c, pageX: y.x, pageY: y.y });
946
+ const c = I[0], w = we[c];
947
+ ln({ pointerId: c, pageX: w.x, pageY: w.y });
834
948
  break;
835
949
  }
836
950
  }
837
- function On(t) {
951
+ function Kn(n) {
838
952
  let c;
839
- switch (t.button) {
953
+ switch (n.button) {
840
954
  case 0:
841
955
  c = e.mouseButtons.LEFT;
842
956
  break;
@@ -850,98 +964,98 @@ class _i extends ii {
850
964
  c = -1;
851
965
  }
852
966
  switch (c) {
853
- case Oe.DOLLY:
967
+ case Re.DOLLY:
854
968
  if (e.enableZoom === !1)
855
969
  return;
856
- Le(t), r = a.DOLLY;
970
+ ke(n), r = a.DOLLY;
857
971
  break;
858
- case Oe.ROTATE:
859
- if (t.ctrlKey || t.metaKey || t.shiftKey) {
972
+ case Re.ROTATE:
973
+ if (n.ctrlKey || n.metaKey || n.shiftKey) {
860
974
  if (e.enablePan === !1)
861
975
  return;
862
- pt(t), r = a.PAN;
976
+ Mt(n), r = a.PAN;
863
977
  } else {
864
978
  if (e.enableRotate === !1)
865
979
  return;
866
- be(t), r = a.ROTATE;
980
+ Ee(n), r = a.ROTATE;
867
981
  }
868
982
  break;
869
- case Oe.PAN:
870
- if (t.ctrlKey || t.metaKey || t.shiftKey) {
983
+ case Re.PAN:
984
+ if (n.ctrlKey || n.metaKey || n.shiftKey) {
871
985
  if (e.enableRotate === !1)
872
986
  return;
873
- be(t), r = a.ROTATE;
987
+ Ee(n), r = a.ROTATE;
874
988
  } else {
875
989
  if (e.enablePan === !1)
876
990
  return;
877
- pt(t), r = a.PAN;
991
+ Mt(n), r = a.PAN;
878
992
  }
879
993
  break;
880
994
  default:
881
995
  r = a.NONE;
882
996
  }
883
- r !== a.NONE && e.dispatchEvent(Dt);
997
+ r !== a.NONE && e.dispatchEvent(Ft);
884
998
  }
885
- function kn(t) {
999
+ function Bn(n) {
886
1000
  switch (r) {
887
1001
  case a.ROTATE:
888
1002
  if (e.enableRotate === !1)
889
1003
  return;
890
- mt(t);
1004
+ St(n);
891
1005
  break;
892
1006
  case a.DOLLY:
893
1007
  if (e.enableZoom === !1)
894
1008
  return;
895
- xn(t);
1009
+ Xn(n);
896
1010
  break;
897
1011
  case a.PAN:
898
1012
  if (e.enablePan === !1)
899
1013
  return;
900
- vn(t);
1014
+ Zn(n);
901
1015
  break;
902
1016
  }
903
1017
  }
904
- function Qt(t) {
905
- e.enabled === !1 || e.enableZoom === !1 || r !== a.NONE || (t.preventDefault(), e.dispatchEvent(Dt), _n(Rn(t)), e.dispatchEvent(an));
1018
+ function on(n) {
1019
+ e.enabled === !1 || e.enableZoom === !1 || r !== a.NONE || (n.preventDefault(), e.dispatchEvent(Ft), Fn(Vn(n)), e.dispatchEvent(Mn));
906
1020
  }
907
- function Rn(t) {
908
- const c = t.deltaMode, y = {
909
- clientX: t.clientX,
910
- clientY: t.clientY,
911
- deltaY: t.deltaY
1021
+ function Vn(n) {
1022
+ const c = n.deltaMode, w = {
1023
+ clientX: n.clientX,
1024
+ clientY: n.clientY,
1025
+ deltaY: n.deltaY
912
1026
  };
913
1027
  switch (c) {
914
1028
  case 1:
915
- y.deltaY *= 16;
1029
+ w.deltaY *= 16;
916
1030
  break;
917
1031
  case 2:
918
- y.deltaY *= 100;
1032
+ w.deltaY *= 100;
919
1033
  break;
920
1034
  }
921
- return t.ctrlKey && !ze && (y.deltaY *= 10), y;
1035
+ return n.ctrlKey && !We && (w.deltaY *= 10), w;
922
1036
  }
923
- function qt(t) {
924
- t.key === "Control" && (ze = !0, e.domElement.getRootNode().addEventListener("keyup", Gt, { passive: !0, capture: !0 }));
1037
+ function an(n) {
1038
+ n.key === "Control" && (We = !0, e.domElement.getRootNode().addEventListener("keyup", rn, { passive: !0, capture: !0 }));
925
1039
  }
926
- function Gt(t) {
927
- t.key === "Control" && (ze = !1, e.domElement.getRootNode().removeEventListener("keyup", Gt, { passive: !0, capture: !0 }));
1040
+ function rn(n) {
1041
+ n.key === "Control" && (We = !1, e.domElement.getRootNode().removeEventListener("keyup", rn, { passive: !0, capture: !0 }));
928
1042
  }
929
- function It(t) {
930
- e.enabled === !1 || e.enablePan === !1 || Tn(t);
1043
+ function Nt(n) {
1044
+ e.enabled === !1 || e.enablePan === !1 || Qn(n);
931
1045
  }
932
- function Wt(t) {
933
- switch (Kt(t), _.length) {
1046
+ function ln(n) {
1047
+ switch (hn(n), I.length) {
934
1048
  case 1:
935
1049
  switch (e.touches.ONE) {
936
- case ke.ROTATE:
1050
+ case Ye.ROTATE:
937
1051
  if (e.enableRotate === !1)
938
1052
  return;
939
- Ht(t), r = a.TOUCH_ROTATE;
1053
+ Vt(n), r = a.TOUCH_ROTATE;
940
1054
  break;
941
- case ke.PAN:
1055
+ case Ye.PAN:
942
1056
  if (e.enablePan === !1)
943
1057
  return;
944
- zt(t), r = a.TOUCH_PAN;
1058
+ $t(n), r = a.TOUCH_PAN;
945
1059
  break;
946
1060
  default:
947
1061
  r = a.NONE;
@@ -949,15 +1063,15 @@ class _i extends ii {
949
1063
  break;
950
1064
  case 2:
951
1065
  switch (e.touches.TWO) {
952
- case ke.DOLLY_PAN:
1066
+ case Ye.DOLLY_PAN:
953
1067
  if (e.enableZoom === !1 && e.enablePan === !1)
954
1068
  return;
955
- In(t), r = a.TOUCH_DOLLY_PAN;
1069
+ qn(n), r = a.TOUCH_DOLLY_PAN;
956
1070
  break;
957
- case ke.DOLLY_ROTATE:
1071
+ case Ye.DOLLY_ROTATE:
958
1072
  if (e.enableZoom === !1 && e.enableRotate === !1)
959
1073
  return;
960
- An(t), r = a.TOUCH_DOLLY_ROTATE;
1074
+ Gn(n), r = a.TOUCH_DOLLY_ROTATE;
961
1075
  break;
962
1076
  default:
963
1077
  r = a.NONE;
@@ -966,465 +1080,465 @@ class _i extends ii {
966
1080
  default:
967
1081
  r = a.NONE;
968
1082
  }
969
- r !== a.NONE && e.dispatchEvent(Dt);
1083
+ r !== a.NONE && e.dispatchEvent(Ft);
970
1084
  }
971
- function Yn(t) {
972
- switch (Kt(t), r) {
1085
+ function $n(n) {
1086
+ switch (hn(n), r) {
973
1087
  case a.TOUCH_ROTATE:
974
1088
  if (e.enableRotate === !1)
975
1089
  return;
976
- Ct(t), e.update();
1090
+ en(n), e.update();
977
1091
  break;
978
1092
  case a.TOUCH_PAN:
979
1093
  if (e.enablePan === !1)
980
1094
  return;
981
- Zt(t), e.update();
1095
+ tn(n), e.update();
982
1096
  break;
983
1097
  case a.TOUCH_DOLLY_PAN:
984
1098
  if (e.enableZoom === !1 && e.enablePan === !1)
985
1099
  return;
986
- Ln(t), e.update();
1100
+ Wn(n), e.update();
987
1101
  break;
988
1102
  case a.TOUCH_DOLLY_ROTATE:
989
1103
  if (e.enableZoom === !1 && e.enableRotate === !1)
990
1104
  return;
991
- Dn(t), e.update();
1105
+ Un(n), e.update();
992
1106
  break;
993
1107
  default:
994
1108
  r = a.NONE;
995
1109
  }
996
1110
  }
997
- function Ut(t) {
998
- e.enabled !== !1 && t.preventDefault();
1111
+ function cn(n) {
1112
+ e.enabled !== !1 && n.preventDefault();
999
1113
  }
1000
- function jn(t) {
1001
- _.push(t.pointerId);
1114
+ function Jn(n) {
1115
+ I.push(n.pointerId);
1002
1116
  }
1003
- function Hn(t) {
1004
- delete ye[t.pointerId];
1005
- for (let c = 0; c < _.length; c++)
1006
- if (_[c] == t.pointerId) {
1007
- _.splice(c, 1);
1117
+ function ei(n) {
1118
+ delete we[n.pointerId];
1119
+ for (let c = 0; c < I.length; c++)
1120
+ if (I[c] == n.pointerId) {
1121
+ I.splice(c, 1);
1008
1122
  return;
1009
1123
  }
1010
1124
  }
1011
- function zn(t) {
1012
- for (let c = 0; c < _.length; c++)
1013
- if (_[c] == t.pointerId)
1125
+ function ti(n) {
1126
+ for (let c = 0; c < I.length; c++)
1127
+ if (I[c] == n.pointerId)
1014
1128
  return !0;
1015
1129
  return !1;
1016
1130
  }
1017
- function Kt(t) {
1018
- let c = ye[t.pointerId];
1019
- c === void 0 && (c = new J(), ye[t.pointerId] = c), c.set(t.pageX, t.pageY);
1131
+ function hn(n) {
1132
+ let c = we[n.pointerId];
1133
+ c === void 0 && (c = new V(), we[n.pointerId] = c), c.set(n.pageX, n.pageY);
1020
1134
  }
1021
- function De(t) {
1022
- const c = t.pointerId === _[0] ? _[1] : _[0];
1023
- return ye[c];
1135
+ function Ce(n) {
1136
+ const c = n.pointerId === I[0] ? I[1] : I[0];
1137
+ return we[c];
1024
1138
  }
1025
- e.domElement.addEventListener("contextmenu", Ut), e.domElement.addEventListener("pointerdown", Nt), e.domElement.addEventListener("pointercancel", Xe), e.domElement.addEventListener("wheel", Qt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", qt, { passive: !0, capture: !0 }), this.update();
1139
+ e.domElement.addEventListener("contextmenu", cn), e.domElement.addEventListener("pointerdown", sn), e.domElement.addEventListener("pointercancel", Ue), e.domElement.addEventListener("wheel", on, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", an, { passive: !0, capture: !0 }), this.update();
1026
1140
  }
1027
1141
  }
1028
- const ge = new oi(), j = new d(), de = new d(), M = new V(), ln = {
1029
- X: new d(1, 0, 0),
1030
- Y: new d(0, 1, 0),
1031
- Z: new d(0, 0, 1)
1032
- }, Ot = { type: "change" }, cn = { type: "mouseDown", mode: null }, hn = { type: "mouseUp", mode: null }, pn = { type: "objectChange" };
1033
- class Ti extends Rt {
1034
- constructor(n, o) {
1142
+ const Me = new Ei(), Y = new y(), de = new y(), v = new K(), xn = {
1143
+ X: new y(1, 0, 0),
1144
+ Y: new y(0, 1, 0),
1145
+ Z: new y(0, 0, 1)
1146
+ }, Qt = { type: "change" }, vn = { type: "mouseDown", mode: null }, _n = { type: "mouseUp", mode: null }, Tn = { type: "objectChange" };
1147
+ class Fi extends Gt {
1148
+ constructor(t, o) {
1035
1149
  super(), o === void 0 && (console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'), o = document), this.isTransformControls = !0, this.visible = !1, this.domElement = o, this.domElement.style.touchAction = "none";
1036
- const e = new ki();
1150
+ const e = new Ki();
1037
1151
  this._gizmo = e, this.add(e);
1038
- const a = new Ri();
1152
+ const a = new Bi();
1039
1153
  this._plane = a, this.add(a);
1040
1154
  const r = this;
1041
- function i(S, v) {
1042
- let ie = v;
1043
- Object.defineProperty(r, S, {
1155
+ function i(_, T) {
1156
+ let te = T;
1157
+ Object.defineProperty(r, _, {
1044
1158
  get: function() {
1045
- return ie !== void 0 ? ie : v;
1159
+ return te !== void 0 ? te : T;
1046
1160
  },
1047
- set: function(R) {
1048
- ie !== R && (ie = R, a[S] = R, e[S] = R, r.dispatchEvent({ type: S + "-changed", value: R }), r.dispatchEvent(Ot));
1161
+ set: function(C) {
1162
+ te !== C && (te = C, a[_] = C, e[_] = C, r.dispatchEvent({ type: _ + "-changed", value: C }), r.dispatchEvent(Qt));
1049
1163
  }
1050
- }), r[S] = v, a[S] = v, e[S] = v;
1164
+ }), r[_] = T, a[_] = T, e[_] = T;
1051
1165
  }
1052
- i("camera", n), i("object", void 0), i("enabled", !0), i("axis", null), i("mode", "translate"), i("translationSnap", null), i("rotationSnap", null), i("scaleSnap", null), i("space", "world"), i("size", 1), i("dragging", !1), i("showX", !0), i("showY", !0), i("showZ", !0);
1053
- const l = new d(), m = new d(), f = new V(), w = new V(), H = new d(), Q = new V(), ne = new d(), G = new d(), A = new d(), k = 0, L = new d();
1054
- i("worldPosition", l), i("worldPositionStart", m), i("worldQuaternion", f), i("worldQuaternionStart", w), i("cameraPosition", H), i("cameraQuaternion", Q), i("pointStart", ne), i("pointEnd", G), i("rotationAxis", A), i("rotationAngle", k), i("eye", L), this._offset = new d(), this._startNorm = new d(), this._endNorm = new d(), this._cameraScale = new d(), this._parentPosition = new d(), this._parentQuaternion = new V(), this._parentQuaternionInv = new V(), this._parentScale = new d(), this._worldScaleStart = new d(), this._worldQuaternionInv = new V(), this._worldScale = new d(), this._positionStart = new d(), this._quaternionStart = new V(), this._scaleStart = new d(), this._getPointer = Ii.bind(this), this._onPointerDown = Li.bind(this), this._onPointerHover = Ai.bind(this), this._onPointerMove = Di.bind(this), this._onPointerUp = Oi.bind(this), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp);
1166
+ i("camera", t), i("object", void 0), i("enabled", !0), i("axis", null), i("mode", "translate"), i("translationSnap", null), i("rotationSnap", null), i("scaleSnap", null), i("space", "world"), i("size", 1), i("dragging", !1), i("showX", !0), i("showY", !0), i("showZ", !0);
1167
+ const l = new y(), u = new y(), h = new K(), f = new K(), g = new y(), L = new K(), ee = new y(), Q = new y(), D = new y(), k = 0, O = new y();
1168
+ i("worldPosition", l), i("worldPositionStart", u), i("worldQuaternion", h), i("worldQuaternionStart", f), i("cameraPosition", g), i("cameraQuaternion", L), i("pointStart", ee), i("pointEnd", Q), i("rotationAxis", D), i("rotationAngle", k), i("eye", O), this._offset = new y(), this._startNorm = new y(), this._endNorm = new y(), this._cameraScale = new y(), this._parentPosition = new y(), this._parentQuaternion = new K(), this._parentQuaternionInv = new K(), this._parentScale = new y(), this._worldScaleStart = new y(), this._worldQuaternionInv = new K(), this._worldScale = new y(), this._positionStart = new y(), this._quaternionStart = new K(), this._scaleStart = new y(), this._getPointer = Qi.bind(this), this._onPointerDown = Gi.bind(this), this._onPointerHover = qi.bind(this), this._onPointerMove = Wi.bind(this), this._onPointerUp = Ui.bind(this), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp);
1055
1169
  }
1056
1170
  // updateMatrixWorld updates key transformation variables
1057
- updateMatrixWorld(n) {
1058
- this.object !== void 0 && (this.object.updateMatrixWorld(), this.object.parent === null ? console.error("TransformControls: The attached 3D object must be a part of the scene graph.") : this.object.parent.matrixWorld.decompose(this._parentPosition, this._parentQuaternion, this._parentScale), this.object.matrixWorld.decompose(this.worldPosition, this.worldQuaternion, this._worldScale), this._parentQuaternionInv.copy(this._parentQuaternion).invert(), this._worldQuaternionInv.copy(this.worldQuaternion).invert()), this.camera.updateMatrixWorld(), this.camera.matrixWorld.decompose(this.cameraPosition, this.cameraQuaternion, this._cameraScale), this.camera.isOrthographicCamera ? this.camera.getWorldDirection(this.eye).negate() : this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(), super.updateMatrixWorld(n);
1171
+ updateMatrixWorld(t) {
1172
+ this.object !== void 0 && (this.object.updateMatrixWorld(), this.object.parent === null ? console.error("TransformControls: The attached 3D object must be a part of the scene graph.") : this.object.parent.matrixWorld.decompose(this._parentPosition, this._parentQuaternion, this._parentScale), this.object.matrixWorld.decompose(this.worldPosition, this.worldQuaternion, this._worldScale), this._parentQuaternionInv.copy(this._parentQuaternion).invert(), this._worldQuaternionInv.copy(this.worldQuaternion).invert()), this.camera.updateMatrixWorld(), this.camera.matrixWorld.decompose(this.cameraPosition, this.cameraQuaternion, this._cameraScale), this.camera.isOrthographicCamera ? this.camera.getWorldDirection(this.eye).negate() : this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(), super.updateMatrixWorld(t);
1059
1173
  }
1060
- pointerHover(n) {
1174
+ pointerHover(t) {
1061
1175
  if (this.object === void 0 || this.dragging === !0)
1062
1176
  return;
1063
- n !== null && ge.setFromCamera(n, this.camera);
1064
- const o = kt(this._gizmo.picker[this.mode], ge);
1177
+ t !== null && Me.setFromCamera(t, this.camera);
1178
+ const o = qt(this._gizmo.picker[this.mode], Me);
1065
1179
  o ? this.axis = o.object.name : this.axis = null;
1066
1180
  }
1067
- pointerDown(n) {
1068
- if (!(this.object === void 0 || this.dragging === !0 || n != null && n.button !== 0) && this.axis !== null) {
1069
- n !== null && ge.setFromCamera(n, this.camera);
1070
- const o = kt(this._plane, ge, !0);
1071
- o && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(o.point).sub(this.worldPositionStart)), this.dragging = !0, cn.mode = this.mode, this.dispatchEvent(cn);
1181
+ pointerDown(t) {
1182
+ if (!(this.object === void 0 || this.dragging === !0 || t != null && t.button !== 0) && this.axis !== null) {
1183
+ t !== null && Me.setFromCamera(t, this.camera);
1184
+ const o = qt(this._plane, Me, !0);
1185
+ o && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(o.point).sub(this.worldPositionStart)), this.dragging = !0, vn.mode = this.mode, this.dispatchEvent(vn);
1072
1186
  }
1073
1187
  }
1074
- pointerMove(n) {
1188
+ pointerMove(t) {
1075
1189
  const o = this.axis, e = this.mode, a = this.object;
1076
1190
  let r = this.space;
1077
- if (e === "scale" ? r = "local" : (o === "E" || o === "XYZE" || o === "XYZ") && (r = "world"), a === void 0 || o === null || this.dragging === !1 || n !== null && n.button !== -1)
1191
+ if (e === "scale" ? r = "local" : (o === "E" || o === "XYZE" || o === "XYZ") && (r = "world"), a === void 0 || o === null || this.dragging === !1 || t !== null && t.button !== -1)
1078
1192
  return;
1079
- n !== null && ge.setFromCamera(n, this.camera);
1080
- const i = kt(this._plane, ge, !0);
1193
+ t !== null && Me.setFromCamera(t, this.camera);
1194
+ const i = qt(this._plane, Me, !0);
1081
1195
  if (i) {
1082
1196
  if (this.pointEnd.copy(i.point).sub(this.worldPositionStart), e === "translate")
1083
- this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && o !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), o.indexOf("X") === -1 && (this._offset.x = 0), o.indexOf("Y") === -1 && (this._offset.y = 0), o.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && o !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), a.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (a.position.applyQuaternion(M.copy(this._quaternionStart).invert()), o.search("X") !== -1 && (a.position.x = Math.round(a.position.x / this.translationSnap) * this.translationSnap), o.search("Y") !== -1 && (a.position.y = Math.round(a.position.y / this.translationSnap) * this.translationSnap), o.search("Z") !== -1 && (a.position.z = Math.round(a.position.z / this.translationSnap) * this.translationSnap), a.position.applyQuaternion(this._quaternionStart)), r === "world" && (a.parent && a.position.add(j.setFromMatrixPosition(a.parent.matrixWorld)), o.search("X") !== -1 && (a.position.x = Math.round(a.position.x / this.translationSnap) * this.translationSnap), o.search("Y") !== -1 && (a.position.y = Math.round(a.position.y / this.translationSnap) * this.translationSnap), o.search("Z") !== -1 && (a.position.z = Math.round(a.position.z / this.translationSnap) * this.translationSnap), a.parent && a.position.sub(j.setFromMatrixPosition(a.parent.matrixWorld))));
1197
+ this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && o !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), o.indexOf("X") === -1 && (this._offset.x = 0), o.indexOf("Y") === -1 && (this._offset.y = 0), o.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && o !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), a.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (a.position.applyQuaternion(v.copy(this._quaternionStart).invert()), o.search("X") !== -1 && (a.position.x = Math.round(a.position.x / this.translationSnap) * this.translationSnap), o.search("Y") !== -1 && (a.position.y = Math.round(a.position.y / this.translationSnap) * this.translationSnap), o.search("Z") !== -1 && (a.position.z = Math.round(a.position.z / this.translationSnap) * this.translationSnap), a.position.applyQuaternion(this._quaternionStart)), r === "world" && (a.parent && a.position.add(Y.setFromMatrixPosition(a.parent.matrixWorld)), o.search("X") !== -1 && (a.position.x = Math.round(a.position.x / this.translationSnap) * this.translationSnap), o.search("Y") !== -1 && (a.position.y = Math.round(a.position.y / this.translationSnap) * this.translationSnap), o.search("Z") !== -1 && (a.position.z = Math.round(a.position.z / this.translationSnap) * this.translationSnap), a.parent && a.position.sub(Y.setFromMatrixPosition(a.parent.matrixWorld))));
1084
1198
  else if (e === "scale") {
1085
1199
  if (o.search("XYZ") !== -1) {
1086
1200
  let l = this.pointEnd.length() / this.pointStart.length();
1087
1201
  this.pointEnd.dot(this.pointStart) < 0 && (l *= -1), de.set(l, l, l);
1088
1202
  } else
1089
- j.copy(this.pointStart), de.copy(this.pointEnd), j.applyQuaternion(this._worldQuaternionInv), de.applyQuaternion(this._worldQuaternionInv), de.divide(j), o.search("X") === -1 && (de.x = 1), o.search("Y") === -1 && (de.y = 1), o.search("Z") === -1 && (de.z = 1);
1203
+ Y.copy(this.pointStart), de.copy(this.pointEnd), Y.applyQuaternion(this._worldQuaternionInv), de.applyQuaternion(this._worldQuaternionInv), de.divide(Y), o.search("X") === -1 && (de.x = 1), o.search("Y") === -1 && (de.y = 1), o.search("Z") === -1 && (de.z = 1);
1090
1204
  a.scale.copy(this._scaleStart).multiply(de), this.scaleSnap && (o.search("X") !== -1 && (a.scale.x = Math.round(a.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), o.search("Y") !== -1 && (a.scale.y = Math.round(a.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), o.search("Z") !== -1 && (a.scale.z = Math.round(a.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
1091
1205
  } else if (e === "rotate") {
1092
1206
  this._offset.copy(this.pointEnd).sub(this.pointStart);
1093
- const l = 20 / this.worldPosition.distanceTo(j.setFromMatrixPosition(this.camera.matrixWorld));
1094
- let m = !1;
1095
- o === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(j.copy(this.rotationAxis).cross(this.eye)) * l) : (o === "X" || o === "Y" || o === "Z") && (this.rotationAxis.copy(ln[o]), j.copy(ln[o]), r === "local" && j.applyQuaternion(this.worldQuaternion), j.cross(this.eye), j.length() === 0 ? m = !0 : this.rotationAngle = this._offset.dot(j.normalize()) * l), (o === "E" || m) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && o !== "E" && o !== "XYZE" ? (a.quaternion.copy(this._quaternionStart), a.quaternion.multiply(M.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), a.quaternion.copy(M.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), a.quaternion.multiply(this._quaternionStart).normalize());
1207
+ const l = 20 / this.worldPosition.distanceTo(Y.setFromMatrixPosition(this.camera.matrixWorld));
1208
+ let u = !1;
1209
+ o === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(Y.copy(this.rotationAxis).cross(this.eye)) * l) : (o === "X" || o === "Y" || o === "Z") && (this.rotationAxis.copy(xn[o]), Y.copy(xn[o]), r === "local" && Y.applyQuaternion(this.worldQuaternion), Y.cross(this.eye), Y.length() === 0 ? u = !0 : this.rotationAngle = this._offset.dot(Y.normalize()) * l), (o === "E" || u) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && o !== "E" && o !== "XYZE" ? (a.quaternion.copy(this._quaternionStart), a.quaternion.multiply(v.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), a.quaternion.copy(v.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), a.quaternion.multiply(this._quaternionStart).normalize());
1096
1210
  }
1097
- this.dispatchEvent(Ot), this.dispatchEvent(pn);
1211
+ this.dispatchEvent(Qt), this.dispatchEvent(Tn);
1098
1212
  }
1099
1213
  }
1100
- pointerUp(n) {
1101
- n !== null && n.button !== 0 || (this.dragging && this.axis !== null && (hn.mode = this.mode, this.dispatchEvent(hn)), this.dragging = !1, this.axis = null);
1214
+ pointerUp(t) {
1215
+ t !== null && t.button !== 0 || (this.dragging && this.axis !== null && (_n.mode = this.mode, this.dispatchEvent(_n)), this.dragging = !1, this.axis = null);
1102
1216
  }
1103
1217
  dispose() {
1104
- this.domElement.removeEventListener("pointerdown", this._onPointerDown), this.domElement.removeEventListener("pointermove", this._onPointerHover), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.traverse(function(n) {
1105
- n.geometry && n.geometry.dispose(), n.material && n.material.dispose();
1218
+ this.domElement.removeEventListener("pointerdown", this._onPointerDown), this.domElement.removeEventListener("pointermove", this._onPointerHover), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.traverse(function(t) {
1219
+ t.geometry && t.geometry.dispose(), t.material && t.material.dispose();
1106
1220
  });
1107
1221
  }
1108
1222
  // Set current object
1109
- attach(n) {
1110
- return this.object = n, this.visible = !0, this;
1223
+ attach(t) {
1224
+ return this.object = t, this.visible = !0, this;
1111
1225
  }
1112
1226
  // Detach from object
1113
1227
  detach() {
1114
1228
  return this.object = void 0, this.visible = !1, this.axis = null, this;
1115
1229
  }
1116
1230
  reset() {
1117
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Ot), this.dispatchEvent(pn), this.pointStart.copy(this.pointEnd));
1231
+ this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Qt), this.dispatchEvent(Tn), this.pointStart.copy(this.pointEnd));
1118
1232
  }
1119
1233
  getRaycaster() {
1120
- return ge;
1234
+ return Me;
1121
1235
  }
1122
1236
  // TODO: deprecate
1123
1237
  getMode() {
1124
1238
  return this.mode;
1125
1239
  }
1126
- setMode(n) {
1127
- this.mode = n;
1240
+ setMode(t) {
1241
+ this.mode = t;
1128
1242
  }
1129
- setTranslationSnap(n) {
1130
- this.translationSnap = n;
1243
+ setTranslationSnap(t) {
1244
+ this.translationSnap = t;
1131
1245
  }
1132
- setRotationSnap(n) {
1133
- this.rotationSnap = n;
1246
+ setRotationSnap(t) {
1247
+ this.rotationSnap = t;
1134
1248
  }
1135
- setScaleSnap(n) {
1136
- this.scaleSnap = n;
1249
+ setScaleSnap(t) {
1250
+ this.scaleSnap = t;
1137
1251
  }
1138
- setSize(n) {
1139
- this.size = n;
1252
+ setSize(t) {
1253
+ this.size = t;
1140
1254
  }
1141
- setSpace(n) {
1142
- this.space = n;
1255
+ setSpace(t) {
1256
+ this.space = t;
1143
1257
  }
1144
1258
  }
1145
- function Ii(p) {
1259
+ function Qi(m) {
1146
1260
  if (this.domElement.ownerDocument.pointerLockElement)
1147
1261
  return {
1148
1262
  x: 0,
1149
1263
  y: 0,
1150
- button: p.button
1264
+ button: m.button
1151
1265
  };
1152
1266
  {
1153
- const n = this.domElement.getBoundingClientRect();
1267
+ const t = this.domElement.getBoundingClientRect();
1154
1268
  return {
1155
- x: (p.clientX - n.left) / n.width * 2 - 1,
1156
- y: -(p.clientY - n.top) / n.height * 2 + 1,
1157
- button: p.button
1269
+ x: (m.clientX - t.left) / t.width * 2 - 1,
1270
+ y: -(m.clientY - t.top) / t.height * 2 + 1,
1271
+ button: m.button
1158
1272
  };
1159
1273
  }
1160
1274
  }
1161
- function Ai(p) {
1275
+ function qi(m) {
1162
1276
  if (this.enabled)
1163
- switch (p.pointerType) {
1277
+ switch (m.pointerType) {
1164
1278
  case "mouse":
1165
1279
  case "pen":
1166
- this.pointerHover(this._getPointer(p));
1280
+ this.pointerHover(this._getPointer(m));
1167
1281
  break;
1168
1282
  }
1169
1283
  }
1170
- function Li(p) {
1171
- this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(p.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(p)), this.pointerDown(this._getPointer(p)));
1284
+ function Gi(m) {
1285
+ this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(m.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(m)), this.pointerDown(this._getPointer(m)));
1172
1286
  }
1173
- function Di(p) {
1174
- this.enabled && this.pointerMove(this._getPointer(p));
1287
+ function Wi(m) {
1288
+ this.enabled && this.pointerMove(this._getPointer(m));
1175
1289
  }
1176
- function Oi(p) {
1177
- this.enabled && (this.domElement.releasePointerCapture(p.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(p)));
1290
+ function Ui(m) {
1291
+ this.enabled && (this.domElement.releasePointerCapture(m.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(m)));
1178
1292
  }
1179
- function kt(p, n, o) {
1180
- const e = n.intersectObject(p, !0);
1293
+ function qt(m, t, o) {
1294
+ const e = t.intersectObject(m, !0);
1181
1295
  for (let a = 0; a < e.length; a++)
1182
1296
  if (e[a].object.visible || o)
1183
1297
  return e[a];
1184
1298
  return !1;
1185
1299
  }
1186
- const wt = new si(), b = new d(0, 1, 0), mn = new d(0, 0, 0), dn = new fn(), bt = new V(), Mt = new V(), te = new d(), un = new fn(), Ge = new d(1, 0, 0), Me = new d(0, 1, 0), We = new d(0, 0, 1), gt = new d(), Qe = new d(), qe = new d();
1187
- class ki extends Rt {
1300
+ const Tt = new Pi(), M = new y(0, 1, 0), In = new y(0, 0, 0), An = new Dn(), It = new K(), Dt = new K(), J = new y(), Ln = new Dn(), et = new y(1, 0, 0), ve = new y(0, 1, 0), tt = new y(0, 0, 1), At = new y(), $e = new y(), Je = new y();
1301
+ class Ki extends Gt {
1188
1302
  constructor() {
1189
1303
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
1190
- const n = new yn({
1304
+ const t = new On({
1191
1305
  depthTest: !1,
1192
1306
  depthWrite: !1,
1193
1307
  fog: !1,
1194
1308
  toneMapped: !1,
1195
1309
  transparent: !0
1196
- }), o = new ai({
1310
+ }), o = new Mi({
1197
1311
  depthTest: !1,
1198
1312
  depthWrite: !1,
1199
1313
  fog: !1,
1200
1314
  toneMapped: !1,
1201
1315
  transparent: !0
1202
- }), e = n.clone();
1316
+ }), e = t.clone();
1203
1317
  e.opacity = 0.15;
1204
1318
  const a = o.clone();
1205
1319
  a.opacity = 0.5;
1206
- const r = n.clone();
1320
+ const r = t.clone();
1207
1321
  r.color.setHex(16711680);
1208
- const i = n.clone();
1322
+ const i = t.clone();
1209
1323
  i.color.setHex(65280);
1210
- const l = n.clone();
1324
+ const l = t.clone();
1211
1325
  l.color.setHex(255);
1212
- const m = n.clone();
1213
- m.color.setHex(16711680), m.opacity = 0.5;
1214
- const f = n.clone();
1215
- f.color.setHex(65280), f.opacity = 0.5;
1216
- const w = n.clone();
1217
- w.color.setHex(255), w.opacity = 0.5;
1218
- const H = n.clone();
1219
- H.opacity = 0.25;
1220
- const Q = n.clone();
1221
- Q.color.setHex(16776960), Q.opacity = 0.25, n.clone().color.setHex(16776960);
1222
- const G = n.clone();
1223
- G.color.setHex(7895160);
1224
- const A = new N(0, 0.04, 0.1, 12);
1225
- A.translate(0, 0.05, 0);
1226
- const k = new Z(0.08, 0.08, 0.08);
1326
+ const u = t.clone();
1327
+ u.color.setHex(16711680), u.opacity = 0.5;
1328
+ const h = t.clone();
1329
+ h.color.setHex(65280), h.opacity = 0.5;
1330
+ const f = t.clone();
1331
+ f.color.setHex(255), f.opacity = 0.5;
1332
+ const g = t.clone();
1333
+ g.opacity = 0.25;
1334
+ const L = t.clone();
1335
+ L.color.setHex(16776960), L.opacity = 0.25, t.clone().color.setHex(16776960);
1336
+ const Q = t.clone();
1337
+ Q.color.setHex(7895160);
1338
+ const D = new F(0, 0.04, 0.1, 12);
1339
+ D.translate(0, 0.05, 0);
1340
+ const k = new X(0.08, 0.08, 0.08);
1227
1341
  k.translate(0, 0.04, 0);
1228
- const L = new tn();
1229
- L.setAttribute("position", new nn([0, 0, 0, 1, 0, 0], 3));
1230
- const S = new N(75e-4, 75e-4, 0.5, 3);
1231
- S.translate(0, 0.25, 0);
1232
- function v(z, $) {
1233
- const X = new Fe(z, 75e-4, 3, 64, $ * Math.PI * 2);
1234
- return X.rotateY(Math.PI / 2), X.rotateX(Math.PI / 2), X;
1342
+ const O = new wn();
1343
+ O.setAttribute("position", new gn([0, 0, 0, 1, 0, 0], 3));
1344
+ const _ = new F(75e-4, 75e-4, 0.5, 3);
1345
+ _.translate(0, 0.25, 0);
1346
+ function T(H, B) {
1347
+ const z = new Ve(H, 75e-4, 3, 64, B * Math.PI * 2);
1348
+ return z.rotateY(Math.PI / 2), z.rotateX(Math.PI / 2), z;
1235
1349
  }
1236
- function ie() {
1237
- const z = new tn();
1238
- return z.setAttribute("position", new nn([0, 0, 0, 1, 1, 1], 3)), z;
1350
+ function te() {
1351
+ const H = new wn();
1352
+ return H.setAttribute("position", new gn([0, 0, 0, 1, 1, 1], 3)), H;
1239
1353
  }
1240
- const R = {
1354
+ const C = {
1241
1355
  X: [
1242
- [new h(A, r), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
1243
- [new h(A, r), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
1244
- [new h(S, r), [0, 0, 0], [0, 0, -Math.PI / 2]]
1356
+ [new p(D, r), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
1357
+ [new p(D, r), [-0.5, 0, 0], [0, 0, Math.PI / 2]],
1358
+ [new p(_, r), [0, 0, 0], [0, 0, -Math.PI / 2]]
1245
1359
  ],
1246
1360
  Y: [
1247
- [new h(A, i), [0, 0.5, 0]],
1248
- [new h(A, i), [0, -0.5, 0], [Math.PI, 0, 0]],
1249
- [new h(S, i)]
1361
+ [new p(D, i), [0, 0.5, 0]],
1362
+ [new p(D, i), [0, -0.5, 0], [Math.PI, 0, 0]],
1363
+ [new p(_, i)]
1250
1364
  ],
1251
1365
  Z: [
1252
- [new h(A, l), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
1253
- [new h(A, l), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
1254
- [new h(S, l), null, [Math.PI / 2, 0, 0]]
1366
+ [new p(D, l), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
1367
+ [new p(D, l), [0, 0, -0.5], [-Math.PI / 2, 0, 0]],
1368
+ [new p(_, l), null, [Math.PI / 2, 0, 0]]
1255
1369
  ],
1256
1370
  XYZ: [
1257
- [new h(new ft(0.1, 0), H.clone()), [0, 0, 0]]
1371
+ [new p(new vt(0.1, 0), g.clone()), [0, 0, 0]]
1258
1372
  ],
1259
1373
  XY: [
1260
- [new h(new Z(0.15, 0.15, 0.01), w.clone()), [0.15, 0.15, 0]]
1374
+ [new p(new X(0.15, 0.15, 0.01), f.clone()), [0.15, 0.15, 0]]
1261
1375
  ],
1262
1376
  YZ: [
1263
- [new h(new Z(0.15, 0.15, 0.01), m.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1377
+ [new p(new X(0.15, 0.15, 0.01), u.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1264
1378
  ],
1265
1379
  XZ: [
1266
- [new h(new Z(0.15, 0.15, 0.01), f.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1380
+ [new p(new X(0.15, 0.15, 0.01), h.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1267
1381
  ]
1268
- }, Te = {
1382
+ }, De = {
1269
1383
  X: [
1270
- [new h(new N(0.2, 0, 0.6, 4), e), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
1271
- [new h(new N(0.2, 0, 0.6, 4), e), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
1384
+ [new p(new F(0.2, 0, 0.6, 4), e), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
1385
+ [new p(new F(0.2, 0, 0.6, 4), e), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
1272
1386
  ],
1273
1387
  Y: [
1274
- [new h(new N(0.2, 0, 0.6, 4), e), [0, 0.3, 0]],
1275
- [new h(new N(0.2, 0, 0.6, 4), e), [0, -0.3, 0], [0, 0, Math.PI]]
1388
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, 0.3, 0]],
1389
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, -0.3, 0], [0, 0, Math.PI]]
1276
1390
  ],
1277
1391
  Z: [
1278
- [new h(new N(0.2, 0, 0.6, 4), e), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
1279
- [new h(new N(0.2, 0, 0.6, 4), e), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
1392
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
1393
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
1280
1394
  ],
1281
1395
  XYZ: [
1282
- [new h(new ft(0.2, 0), e)]
1396
+ [new p(new vt(0.2, 0), e)]
1283
1397
  ],
1284
1398
  XY: [
1285
- [new h(new Z(0.2, 0.2, 0.01), e), [0.15, 0.15, 0]]
1399
+ [new p(new X(0.2, 0.2, 0.01), e), [0.15, 0.15, 0]]
1286
1400
  ],
1287
1401
  YZ: [
1288
- [new h(new Z(0.2, 0.2, 0.01), e), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1402
+ [new p(new X(0.2, 0.2, 0.01), e), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1289
1403
  ],
1290
1404
  XZ: [
1291
- [new h(new Z(0.2, 0.2, 0.01), e), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1405
+ [new p(new X(0.2, 0.2, 0.01), e), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1292
1406
  ]
1293
- }, _ = {
1407
+ }, I = {
1294
1408
  START: [
1295
- [new h(new ft(0.01, 2), a), null, null, null, "helper"]
1409
+ [new p(new vt(0.01, 2), a), null, null, null, "helper"]
1296
1410
  ],
1297
1411
  END: [
1298
- [new h(new ft(0.01, 2), a), null, null, null, "helper"]
1412
+ [new p(new vt(0.01, 2), a), null, null, null, "helper"]
1299
1413
  ],
1300
1414
  DELTA: [
1301
- [new me(ie(), a), null, null, null, "helper"]
1415
+ [new me(te(), a), null, null, null, "helper"]
1302
1416
  ],
1303
1417
  X: [
1304
- [new me(L, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
1418
+ [new me(O, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
1305
1419
  ],
1306
1420
  Y: [
1307
- [new me(L, a.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
1421
+ [new me(O, a.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
1308
1422
  ],
1309
1423
  Z: [
1310
- [new me(L, a.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1424
+ [new me(O, a.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1311
1425
  ]
1312
- }, ye = {
1426
+ }, we = {
1313
1427
  XYZE: [
1314
- [new h(v(0.5, 1), G), null, [0, Math.PI / 2, 0]]
1428
+ [new p(T(0.5, 1), Q), null, [0, Math.PI / 2, 0]]
1315
1429
  ],
1316
1430
  X: [
1317
- [new h(v(0.5, 0.5), r)]
1431
+ [new p(T(0.5, 0.5), r)]
1318
1432
  ],
1319
1433
  Y: [
1320
- [new h(v(0.5, 0.5), i), null, [0, 0, -Math.PI / 2]]
1434
+ [new p(T(0.5, 0.5), i), null, [0, 0, -Math.PI / 2]]
1321
1435
  ],
1322
1436
  Z: [
1323
- [new h(v(0.5, 0.5), l), null, [0, Math.PI / 2, 0]]
1437
+ [new p(T(0.5, 0.5), l), null, [0, Math.PI / 2, 0]]
1324
1438
  ],
1325
1439
  E: [
1326
- [new h(v(0.75, 1), Q), null, [0, Math.PI / 2, 0]]
1440
+ [new p(T(0.75, 1), L), null, [0, Math.PI / 2, 0]]
1327
1441
  ]
1328
- }, ze = {
1442
+ }, We = {
1329
1443
  AXIS: [
1330
- [new me(L, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
1444
+ [new me(O, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
1331
1445
  ]
1332
- }, _t = {
1446
+ }, Ht = {
1333
1447
  XYZE: [
1334
- [new h(new ri(0.25, 10, 8), e)]
1448
+ [new p(new Si(0.25, 10, 8), e)]
1335
1449
  ],
1336
1450
  X: [
1337
- [new h(new Fe(0.5, 0.1, 4, 24), e), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
1451
+ [new p(new Ve(0.5, 0.1, 4, 24), e), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
1338
1452
  ],
1339
1453
  Y: [
1340
- [new h(new Fe(0.5, 0.1, 4, 24), e), [0, 0, 0], [Math.PI / 2, 0, 0]]
1454
+ [new p(new Ve(0.5, 0.1, 4, 24), e), [0, 0, 0], [Math.PI / 2, 0, 0]]
1341
1455
  ],
1342
1456
  Z: [
1343
- [new h(new Fe(0.5, 0.1, 4, 24), e), [0, 0, 0], [0, 0, -Math.PI / 2]]
1457
+ [new p(new Ve(0.5, 0.1, 4, 24), e), [0, 0, 0], [0, 0, -Math.PI / 2]]
1344
1458
  ],
1345
1459
  E: [
1346
- [new h(new Fe(0.75, 0.1, 2, 24), e)]
1460
+ [new p(new Ve(0.75, 0.1, 2, 24), e)]
1347
1461
  ]
1348
- }, Ie = {
1462
+ }, Oe = {
1349
1463
  X: [
1350
- [new h(k, r), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
1351
- [new h(S, r), [0, 0, 0], [0, 0, -Math.PI / 2]],
1352
- [new h(k, r), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
1464
+ [new p(k, r), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
1465
+ [new p(_, r), [0, 0, 0], [0, 0, -Math.PI / 2]],
1466
+ [new p(k, r), [-0.5, 0, 0], [0, 0, Math.PI / 2]]
1353
1467
  ],
1354
1468
  Y: [
1355
- [new h(k, i), [0, 0.5, 0]],
1356
- [new h(S, i)],
1357
- [new h(k, i), [0, -0.5, 0], [0, 0, Math.PI]]
1469
+ [new p(k, i), [0, 0.5, 0]],
1470
+ [new p(_, i)],
1471
+ [new p(k, i), [0, -0.5, 0], [0, 0, Math.PI]]
1358
1472
  ],
1359
1473
  Z: [
1360
- [new h(k, l), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
1361
- [new h(S, l), [0, 0, 0], [Math.PI / 2, 0, 0]],
1362
- [new h(k, l), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
1474
+ [new p(k, l), [0, 0, 0.5], [Math.PI / 2, 0, 0]],
1475
+ [new p(_, l), [0, 0, 0], [Math.PI / 2, 0, 0]],
1476
+ [new p(k, l), [0, 0, -0.5], [-Math.PI / 2, 0, 0]]
1363
1477
  ],
1364
1478
  XY: [
1365
- [new h(new Z(0.15, 0.15, 0.01), w), [0.15, 0.15, 0]]
1479
+ [new p(new X(0.15, 0.15, 0.01), f), [0.15, 0.15, 0]]
1366
1480
  ],
1367
1481
  YZ: [
1368
- [new h(new Z(0.15, 0.15, 0.01), m), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1482
+ [new p(new X(0.15, 0.15, 0.01), u), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1369
1483
  ],
1370
1484
  XZ: [
1371
- [new h(new Z(0.15, 0.15, 0.01), f), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1485
+ [new p(new X(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1372
1486
  ],
1373
1487
  XYZ: [
1374
- [new h(new Z(0.1, 0.1, 0.1), H.clone())]
1488
+ [new p(new X(0.1, 0.1, 0.1), g.clone())]
1375
1489
  ]
1376
- }, we = {
1490
+ }, ge = {
1377
1491
  X: [
1378
- [new h(new N(0.2, 0, 0.6, 4), e), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
1379
- [new h(new N(0.2, 0, 0.6, 4), e), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
1492
+ [new p(new F(0.2, 0, 0.6, 4), e), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
1493
+ [new p(new F(0.2, 0, 0.6, 4), e), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
1380
1494
  ],
1381
1495
  Y: [
1382
- [new h(new N(0.2, 0, 0.6, 4), e), [0, 0.3, 0]],
1383
- [new h(new N(0.2, 0, 0.6, 4), e), [0, -0.3, 0], [0, 0, Math.PI]]
1496
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, 0.3, 0]],
1497
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, -0.3, 0], [0, 0, Math.PI]]
1384
1498
  ],
1385
1499
  Z: [
1386
- [new h(new N(0.2, 0, 0.6, 4), e), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
1387
- [new h(new N(0.2, 0, 0.6, 4), e), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
1500
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, 0, 0.3], [Math.PI / 2, 0, 0]],
1501
+ [new p(new F(0.2, 0, 0.6, 4), e), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
1388
1502
  ],
1389
1503
  XY: [
1390
- [new h(new Z(0.2, 0.2, 0.01), e), [0.15, 0.15, 0]]
1504
+ [new p(new X(0.2, 0.2, 0.01), e), [0.15, 0.15, 0]]
1391
1505
  ],
1392
1506
  YZ: [
1393
- [new h(new Z(0.2, 0.2, 0.01), e), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1507
+ [new p(new X(0.2, 0.2, 0.01), e), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
1394
1508
  ],
1395
1509
  XZ: [
1396
- [new h(new Z(0.2, 0.2, 0.01), e), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1510
+ [new p(new X(0.2, 0.2, 0.01), e), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
1397
1511
  ],
1398
1512
  XYZ: [
1399
- [new h(new Z(0.2, 0.2, 0.2), e), [0, 0, 0]]
1513
+ [new p(new X(0.2, 0.2, 0.2), e), [0, 0, 0]]
1400
1514
  ]
1401
- }, Ae = {
1515
+ }, je = {
1402
1516
  X: [
1403
- [new me(L, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
1517
+ [new me(O, a.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
1404
1518
  ],
1405
1519
  Y: [
1406
- [new me(L, a.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
1520
+ [new me(O, a.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
1407
1521
  ],
1408
1522
  Z: [
1409
- [new me(L, a.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1523
+ [new me(O, a.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
1410
1524
  ]
1411
1525
  };
1412
- function W(z) {
1413
- const $ = new Rt();
1414
- for (const X in z)
1415
- for (let oe = z[X].length; oe--; ) {
1416
- const T = z[X][oe][0].clone(), he = z[X][oe][1], be = z[X][oe][2], Le = z[X][oe][3], pt = z[X][oe][4];
1417
- T.name = X, T.tag = pt, he && T.position.set(he[0], he[1], he[2]), be && T.rotation.set(be[0], be[1], be[2]), Le && T.scale.set(Le[0], Le[1], Le[2]), T.updateMatrix();
1418
- const mt = T.geometry.clone();
1419
- mt.applyMatrix4(T.matrix), T.geometry = mt, T.renderOrder = 1 / 0, T.position.set(0, 0, 0), T.rotation.set(0, 0, 0), T.scale.set(1, 1, 1), $.add(T);
1526
+ function q(H) {
1527
+ const B = new Gt();
1528
+ for (const z in H)
1529
+ for (let ne = H[z].length; ne--; ) {
1530
+ const A = H[z][ne][0].clone(), ce = H[z][ne][1], Ee = H[z][ne][2], ke = H[z][ne][3], Mt = H[z][ne][4];
1531
+ A.name = z, A.tag = Mt, ce && A.position.set(ce[0], ce[1], ce[2]), Ee && A.rotation.set(Ee[0], Ee[1], Ee[2]), ke && A.scale.set(ke[0], ke[1], ke[2]), A.updateMatrix();
1532
+ const St = A.geometry.clone();
1533
+ St.applyMatrix4(A.matrix), A.geometry = St, A.renderOrder = 1 / 0, A.position.set(0, 0, 0), A.rotation.set(0, 0, 0), A.scale.set(1, 1, 1), B.add(A);
1420
1534
  }
1421
- return $;
1535
+ return B;
1422
1536
  }
1423
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = W(R)), this.add(this.gizmo.rotate = W(ye)), this.add(this.gizmo.scale = W(Ie)), this.add(this.picker.translate = W(Te)), this.add(this.picker.rotate = W(_t)), this.add(this.picker.scale = W(we)), this.add(this.helper.translate = W(_)), this.add(this.helper.rotate = W(ze)), this.add(this.helper.scale = W(Ae)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
1537
+ this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = q(C)), this.add(this.gizmo.rotate = q(we)), this.add(this.gizmo.scale = q(Oe)), this.add(this.picker.translate = q(De)), this.add(this.picker.rotate = q(Ht)), this.add(this.picker.scale = q(ge)), this.add(this.helper.translate = q(I)), this.add(this.helper.rotate = q(We)), this.add(this.helper.scale = q(je)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
1424
1538
  }
1425
1539
  // updateMatrixWorld will update transformations and appearance of individual handles
1426
- updateMatrixWorld(n) {
1427
- const e = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Mt;
1540
+ updateMatrixWorld(t) {
1541
+ const e = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Dt;
1428
1542
  this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
1429
1543
  let a = [];
1430
1544
  a = a.concat(this.picker[this.mode].children), a = a.concat(this.gizmo[this.mode].children), a = a.concat(this.helper[this.mode].children);
@@ -1433,99 +1547,98 @@ class ki extends Rt {
1433
1547
  i.visible = !0, i.rotation.set(0, 0, 0), i.position.copy(this.worldPosition);
1434
1548
  let l;
1435
1549
  if (this.camera.isOrthographicCamera ? l = (this.camera.top - this.camera.bottom) / this.camera.zoom : l = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), i.scale.set(1, 1, 1).multiplyScalar(l * this.size / 4), i.tag === "helper") {
1436
- i.visible = !1, i.name === "AXIS" ? (i.visible = !!this.axis, this.axis === "X" && (M.setFromEuler(wt.set(0, 0, 0)), i.quaternion.copy(e).multiply(M), Math.abs(b.copy(Ge).applyQuaternion(e).dot(this.eye)) > 0.9 && (i.visible = !1)), this.axis === "Y" && (M.setFromEuler(wt.set(0, 0, Math.PI / 2)), i.quaternion.copy(e).multiply(M), Math.abs(b.copy(Me).applyQuaternion(e).dot(this.eye)) > 0.9 && (i.visible = !1)), this.axis === "Z" && (M.setFromEuler(wt.set(0, Math.PI / 2, 0)), i.quaternion.copy(e).multiply(M), Math.abs(b.copy(We).applyQuaternion(e).dot(this.eye)) > 0.9 && (i.visible = !1)), this.axis === "XYZE" && (M.setFromEuler(wt.set(0, Math.PI / 2, 0)), b.copy(this.rotationAxis), i.quaternion.setFromRotationMatrix(dn.lookAt(mn, b, Me)), i.quaternion.multiply(M), i.visible = this.dragging), this.axis === "E" && (i.visible = !1)) : i.name === "START" ? (i.position.copy(this.worldPositionStart), i.visible = this.dragging) : i.name === "END" ? (i.position.copy(this.worldPosition), i.visible = this.dragging) : i.name === "DELTA" ? (i.position.copy(this.worldPositionStart), i.quaternion.copy(this.worldQuaternionStart), j.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), j.applyQuaternion(this.worldQuaternionStart.clone().invert()), i.scale.copy(j), i.visible = this.dragging) : (i.quaternion.copy(e), this.dragging ? i.position.copy(this.worldPositionStart) : i.position.copy(this.worldPosition), this.axis && (i.visible = this.axis.search(i.name) !== -1));
1550
+ i.visible = !1, i.name === "AXIS" ? (i.visible = !!this.axis, this.axis === "X" && (v.setFromEuler(Tt.set(0, 0, 0)), i.quaternion.copy(e).multiply(v), Math.abs(M.copy(et).applyQuaternion(e).dot(this.eye)) > 0.9 && (i.visible = !1)), this.axis === "Y" && (v.setFromEuler(Tt.set(0, 0, Math.PI / 2)), i.quaternion.copy(e).multiply(v), Math.abs(M.copy(ve).applyQuaternion(e).dot(this.eye)) > 0.9 && (i.visible = !1)), this.axis === "Z" && (v.setFromEuler(Tt.set(0, Math.PI / 2, 0)), i.quaternion.copy(e).multiply(v), Math.abs(M.copy(tt).applyQuaternion(e).dot(this.eye)) > 0.9 && (i.visible = !1)), this.axis === "XYZE" && (v.setFromEuler(Tt.set(0, Math.PI / 2, 0)), M.copy(this.rotationAxis), i.quaternion.setFromRotationMatrix(An.lookAt(In, M, ve)), i.quaternion.multiply(v), i.visible = this.dragging), this.axis === "E" && (i.visible = !1)) : i.name === "START" ? (i.position.copy(this.worldPositionStart), i.visible = this.dragging) : i.name === "END" ? (i.position.copy(this.worldPosition), i.visible = this.dragging) : i.name === "DELTA" ? (i.position.copy(this.worldPositionStart), i.quaternion.copy(this.worldQuaternionStart), Y.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), Y.applyQuaternion(this.worldQuaternionStart.clone().invert()), i.scale.copy(Y), i.visible = this.dragging) : (i.quaternion.copy(e), this.dragging ? i.position.copy(this.worldPositionStart) : i.position.copy(this.worldPosition), this.axis && (i.visible = this.axis.search(i.name) !== -1));
1437
1551
  continue;
1438
1552
  }
1439
- i.quaternion.copy(e), this.mode === "translate" || this.mode === "scale" ? (i.name === "X" && Math.abs(b.copy(Ge).applyQuaternion(e).dot(this.eye)) > 0.99 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "Y" && Math.abs(b.copy(Me).applyQuaternion(e).dot(this.eye)) > 0.99 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "Z" && Math.abs(b.copy(We).applyQuaternion(e).dot(this.eye)) > 0.99 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "XY" && Math.abs(b.copy(We).applyQuaternion(e).dot(this.eye)) < 0.2 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "YZ" && Math.abs(b.copy(Ge).applyQuaternion(e).dot(this.eye)) < 0.2 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "XZ" && Math.abs(b.copy(Me).applyQuaternion(e).dot(this.eye)) < 0.2 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1)) : this.mode === "rotate" && (bt.copy(e), b.copy(this.eye).applyQuaternion(M.copy(e).invert()), i.name.search("E") !== -1 && i.quaternion.setFromRotationMatrix(dn.lookAt(this.eye, mn, Me)), i.name === "X" && (M.setFromAxisAngle(Ge, Math.atan2(-b.y, b.z)), M.multiplyQuaternions(bt, M), i.quaternion.copy(M)), i.name === "Y" && (M.setFromAxisAngle(Me, Math.atan2(b.x, b.z)), M.multiplyQuaternions(bt, M), i.quaternion.copy(M)), i.name === "Z" && (M.setFromAxisAngle(We, Math.atan2(b.y, b.x)), M.multiplyQuaternions(bt, M), i.quaternion.copy(M))), i.visible = i.visible && (i.name.indexOf("X") === -1 || this.showX), i.visible = i.visible && (i.name.indexOf("Y") === -1 || this.showY), i.visible = i.visible && (i.name.indexOf("Z") === -1 || this.showZ), i.visible = i.visible && (i.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), i.material._color = i.material._color || i.material.color.clone(), i.material._opacity = i.material._opacity || i.material.opacity, i.material.color.copy(i.material._color), i.material.opacity = i.material._opacity, this.enabled && this.axis && (i.name === this.axis || this.axis.split("").some(function(m) {
1440
- return i.name === m;
1553
+ i.quaternion.copy(e), this.mode === "translate" || this.mode === "scale" ? (i.name === "X" && Math.abs(M.copy(et).applyQuaternion(e).dot(this.eye)) > 0.99 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "Y" && Math.abs(M.copy(ve).applyQuaternion(e).dot(this.eye)) > 0.99 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "Z" && Math.abs(M.copy(tt).applyQuaternion(e).dot(this.eye)) > 0.99 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "XY" && Math.abs(M.copy(tt).applyQuaternion(e).dot(this.eye)) < 0.2 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "YZ" && Math.abs(M.copy(et).applyQuaternion(e).dot(this.eye)) < 0.2 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1), i.name === "XZ" && Math.abs(M.copy(ve).applyQuaternion(e).dot(this.eye)) < 0.2 && (i.scale.set(1e-10, 1e-10, 1e-10), i.visible = !1)) : this.mode === "rotate" && (It.copy(e), M.copy(this.eye).applyQuaternion(v.copy(e).invert()), i.name.search("E") !== -1 && i.quaternion.setFromRotationMatrix(An.lookAt(this.eye, In, ve)), i.name === "X" && (v.setFromAxisAngle(et, Math.atan2(-M.y, M.z)), v.multiplyQuaternions(It, v), i.quaternion.copy(v)), i.name === "Y" && (v.setFromAxisAngle(ve, Math.atan2(M.x, M.z)), v.multiplyQuaternions(It, v), i.quaternion.copy(v)), i.name === "Z" && (v.setFromAxisAngle(tt, Math.atan2(M.y, M.x)), v.multiplyQuaternions(It, v), i.quaternion.copy(v))), i.visible = i.visible && (i.name.indexOf("X") === -1 || this.showX), i.visible = i.visible && (i.name.indexOf("Y") === -1 || this.showY), i.visible = i.visible && (i.name.indexOf("Z") === -1 || this.showZ), i.visible = i.visible && (i.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), i.material._color = i.material._color || i.material.color.clone(), i.material._opacity = i.material._opacity || i.material.opacity, i.material.color.copy(i.material._color), i.material.opacity = i.material._opacity, this.enabled && this.axis && (i.name === this.axis || this.axis.split("").some(function(u) {
1554
+ return i.name === u;
1441
1555
  })) && (i.material.color.setHex(16776960), i.material.opacity = 1);
1442
1556
  }
1443
- super.updateMatrixWorld(n);
1557
+ super.updateMatrixWorld(t);
1444
1558
  }
1445
1559
  }
1446
- class Ri extends h {
1560
+ class Bi extends p {
1447
1561
  constructor() {
1448
1562
  super(
1449
- new li(1e5, 1e5, 2, 2),
1450
- new yn({ visible: !1, wireframe: !0, side: ci, transparent: !0, opacity: 0.1, toneMapped: !1 })
1563
+ new xi(1e5, 1e5, 2, 2),
1564
+ new On({ visible: !1, wireframe: !0, side: vi, transparent: !0, opacity: 0.1, toneMapped: !1 })
1451
1565
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
1452
1566
  }
1453
- updateMatrixWorld(n) {
1567
+ updateMatrixWorld(t) {
1454
1568
  let o = this.space;
1455
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (o = "local"), gt.copy(Ge).applyQuaternion(o === "local" ? this.worldQuaternion : Mt), Qe.copy(Me).applyQuaternion(o === "local" ? this.worldQuaternion : Mt), qe.copy(We).applyQuaternion(o === "local" ? this.worldQuaternion : Mt), b.copy(Qe), this.mode) {
1569
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (o = "local"), At.copy(et).applyQuaternion(o === "local" ? this.worldQuaternion : Dt), $e.copy(ve).applyQuaternion(o === "local" ? this.worldQuaternion : Dt), Je.copy(tt).applyQuaternion(o === "local" ? this.worldQuaternion : Dt), M.copy($e), this.mode) {
1456
1570
  case "translate":
1457
1571
  case "scale":
1458
1572
  switch (this.axis) {
1459
1573
  case "X":
1460
- b.copy(this.eye).cross(gt), te.copy(gt).cross(b);
1574
+ M.copy(this.eye).cross(At), J.copy(At).cross(M);
1461
1575
  break;
1462
1576
  case "Y":
1463
- b.copy(this.eye).cross(Qe), te.copy(Qe).cross(b);
1577
+ M.copy(this.eye).cross($e), J.copy($e).cross(M);
1464
1578
  break;
1465
1579
  case "Z":
1466
- b.copy(this.eye).cross(qe), te.copy(qe).cross(b);
1580
+ M.copy(this.eye).cross(Je), J.copy(Je).cross(M);
1467
1581
  break;
1468
1582
  case "XY":
1469
- te.copy(qe);
1583
+ J.copy(Je);
1470
1584
  break;
1471
1585
  case "YZ":
1472
- te.copy(gt);
1586
+ J.copy(At);
1473
1587
  break;
1474
1588
  case "XZ":
1475
- b.copy(qe), te.copy(Qe);
1589
+ M.copy(Je), J.copy($e);
1476
1590
  break;
1477
1591
  case "XYZ":
1478
1592
  case "E":
1479
- te.set(0, 0, 0);
1593
+ J.set(0, 0, 0);
1480
1594
  break;
1481
1595
  }
1482
1596
  break;
1483
1597
  case "rotate":
1484
1598
  default:
1485
- te.set(0, 0, 0);
1599
+ J.set(0, 0, 0);
1486
1600
  }
1487
- te.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (un.lookAt(j.set(0, 0, 0), te, b), this.quaternion.setFromRotationMatrix(un)), super.updateMatrixWorld(n);
1601
+ J.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Ln.lookAt(Y.set(0, 0, 0), J, M), this.quaternion.setFromRotationMatrix(Ln)), super.updateMatrixWorld(t);
1488
1602
  }
1489
1603
  }
1490
- var K, ve;
1491
- class Yi {
1604
+ var W, Ae;
1605
+ class Vi {
1492
1606
  constructor() {
1493
- u(this, K, void 0);
1494
- u(this, ve, void 0);
1495
- P(this, K, new _i(x.camera, x.webglRenderer.domElement)), P(this, ve, new F([0, 0, 0], {
1607
+ d(this, W, void 0);
1608
+ d(this, Ae, void 0);
1609
+ x(this, W, new Zi(b.camera, b.webglRenderer.domElement)), x(this, Ae, new Z([0, 0, 0], {
1496
1610
  passport: {
1497
1611
  name: "Controls.OrbitControls.Target",
1498
1612
  manager: {
1499
1613
  type: "number",
1500
- step: 1e-4,
1501
- ease: 10
1614
+ invisible: !0
1502
1615
  }
1503
1616
  }
1504
1617
  }));
1505
- let n = !0;
1506
- s(this, ve).subscribe((o) => {
1507
- s(this, K).target.set(...o.current), n && s(this, K).update();
1508
- }), s(this, K).addEventListener("change", () => {
1509
- n = !1, s(this, ve).current = [
1510
- s(this, K).target.x,
1511
- s(this, K).target.y,
1512
- s(this, K).target.z
1513
- ], n = !0;
1618
+ let t = !0;
1619
+ s(this, Ae).subscribe((o) => {
1620
+ s(this, W).target.set(...o.current), t && s(this, W).update();
1621
+ }), s(this, W).addEventListener("change", () => {
1622
+ t = !1, s(this, Ae).current = [
1623
+ s(this, W).target.x,
1624
+ s(this, W).target.y,
1625
+ s(this, W).target.z
1626
+ ], t = !0;
1514
1627
  });
1515
1628
  }
1516
1629
  get controls() {
1517
- return s(this, K);
1630
+ return s(this, W);
1518
1631
  }
1519
1632
  destroy() {
1520
- s(this, K).dispose(), s(this, ve).close();
1633
+ s(this, W).dispose(), s(this, Ae).close();
1521
1634
  }
1522
1635
  }
1523
- K = new WeakMap(), ve = new WeakMap();
1524
- var Y, $e, Je, et, tt, nt, it, ot, st;
1525
- class ji {
1636
+ W = new WeakMap(), Ae = new WeakMap();
1637
+ var R, at, rt, lt, ct, ht, pt, mt, dt;
1638
+ class $i {
1526
1639
  constructor() {
1527
- u(this, Y, null);
1528
- u(this, $e, new F(x.camera.far, {
1640
+ d(this, R, null);
1641
+ d(this, at, new Z(b.camera.far, {
1529
1642
  passport: {
1530
1643
  name: "Helpers.Grid.Size",
1531
1644
  manager: {
@@ -1534,7 +1647,7 @@ class ji {
1534
1647
  }
1535
1648
  }
1536
1649
  }));
1537
- u(this, Je, new F(100, {
1650
+ d(this, rt, new Z(100, {
1538
1651
  passport: {
1539
1652
  name: "Helpers.Grid.Divisions",
1540
1653
  manager: {
@@ -1542,7 +1655,7 @@ class ji {
1542
1655
  }
1543
1656
  }
1544
1657
  }));
1545
- u(this, et, new F("#0000ff", {
1658
+ d(this, lt, new Z("#0000ff", {
1546
1659
  passport: {
1547
1660
  name: "Helpers.Grid.Color 1",
1548
1661
  manager: {
@@ -1550,7 +1663,7 @@ class ji {
1550
1663
  }
1551
1664
  }
1552
1665
  }));
1553
- u(this, tt, new F("#808080", {
1666
+ d(this, ct, new Z("#808080", {
1554
1667
  passport: {
1555
1668
  name: "Helpers.Grid.Color 2",
1556
1669
  manager: {
@@ -1558,7 +1671,7 @@ class ji {
1558
1671
  }
1559
1672
  }
1560
1673
  }));
1561
- u(this, nt, new F(!1, {
1674
+ d(this, ht, new Z(!1, {
1562
1675
  passport: {
1563
1676
  name: "Helpers.Grid.Vertical",
1564
1677
  manager: {
@@ -1566,7 +1679,7 @@ class ji {
1566
1679
  }
1567
1680
  }
1568
1681
  }));
1569
- u(this, it, new F(!0, {
1682
+ d(this, pt, new Z(!0, {
1570
1683
  passport: {
1571
1684
  name: "Helpers.Grid.Visible",
1572
1685
  manager: {
@@ -1574,126 +1687,218 @@ class ji {
1574
1687
  }
1575
1688
  }
1576
1689
  }));
1577
- u(this, ot, void 0);
1578
- u(this, st, (n) => {
1579
- n.key === "g" && (s(this, Y).visible = !s(this, Y).visible);
1690
+ d(this, mt, void 0);
1691
+ d(this, dt, (t) => {
1692
+ t.key === "g" && (s(this, R).visible = !s(this, R).visible);
1580
1693
  });
1581
- P(this, ot, new mi(
1694
+ x(this, mt, new Ii(
1582
1695
  [
1583
- s(this, $e),
1584
- s(this, Je),
1585
- s(this, et),
1586
- s(this, tt),
1587
- s(this, nt),
1588
- s(this, it)
1696
+ s(this, at),
1697
+ s(this, rt),
1698
+ s(this, lt),
1699
+ s(this, ct),
1700
+ s(this, ht),
1701
+ s(this, pt)
1589
1702
  ],
1590
1703
  () => {
1591
- s(this, Y) && (x.view.remove(s(this, Y)), s(this, Y).dispose()), P(this, Y, new hi(
1592
- s(this, $e).current,
1593
- s(this, Je).current,
1594
- s(this, et).current,
1595
- s(this, tt).current
1596
- )), s(this, Y).rotation.x = s(this, nt).current ? Math.PI / 2 : 0, s(this, Y).visible = s(this, it).current, x.view.add(s(this, Y));
1704
+ s(this, R) && (b.view.remove(s(this, R)), s(this, R).dispose()), x(this, R, new _i(
1705
+ s(this, at).current,
1706
+ s(this, rt).current,
1707
+ s(this, lt).current,
1708
+ s(this, ct).current
1709
+ )), s(this, R).rotation.x = s(this, ht).current ? Math.PI / 2 : 0, s(this, R).visible = s(this, pt).current, b.view.add(s(this, R));
1597
1710
  }
1598
- )), addEventListener("keydown", s(this, st));
1711
+ )), addEventListener("keydown", s(this, dt));
1599
1712
  }
1600
1713
  get helper() {
1601
- return s(this, Y);
1714
+ return s(this, R);
1602
1715
  }
1603
1716
  destroy() {
1604
- s(this, ot).close(), s(this, Y) && (x.view.remove(s(this, Y)), s(this, Y).dispose()), removeEventListener("keydown", s(this, st));
1717
+ s(this, mt).close(), s(this, R) && (b.view.remove(s(this, R)), s(this, R).dispose()), removeEventListener("keydown", s(this, dt));
1605
1718
  }
1606
1719
  }
1607
- Y = new WeakMap(), $e = new WeakMap(), Je = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), st = new WeakMap();
1608
- var O, B, ue, fe, at, Ye, rt, lt, jt;
1609
- class Hi {
1720
+ R = new WeakMap(), at = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), pt = new WeakMap(), mt = new WeakMap(), dt = new WeakMap();
1721
+ var j, U, fe, ye, ut, Ne, ft, yt, Kt;
1722
+ class Ji {
1610
1723
  constructor() {
1611
- u(this, lt);
1612
- u(this, O, void 0);
1613
- u(this, B, []);
1614
- u(this, ue, null);
1615
- u(this, fe, (n) => {
1616
- if (n.child.name.startsWith("T.") && !s(this, B).find((o) => o.object3d === n.child)) {
1617
- const o = new Pn(n.child);
1618
- s(this, B).push(o), x.raycaster.add(o.raycasterTarget, {
1724
+ d(this, yt);
1725
+ d(this, j, void 0);
1726
+ d(this, U, []);
1727
+ d(this, fe, null);
1728
+ d(this, ye, (t) => {
1729
+ if (t.child.name.startsWith("T.") && !s(this, U).find((o) => o.object3d === t.child)) {
1730
+ const o = new zn(t.child);
1731
+ s(this, U).push(o), b.raycaster.add(o.raycasterTarget, {
1619
1732
  eventDispatcher: o.raycasterTarget
1620
1733
  }), o.raycasterTarget.addEventListener(
1621
1734
  "pointerDown",
1622
- s(this, Ye)
1623
- ), o.object3d.addEventListener("childadded", s(this, fe));
1735
+ s(this, Ne)
1736
+ ), o.object3d.addEventListener("childadded", s(this, ye));
1624
1737
  }
1625
1738
  });
1626
- u(this, at, (n) => {
1627
- const o = I(this, lt, jt).call(this, n.child);
1628
- o && (x.raycaster.remove(o.raycasterTarget), o.destroy(), o.raycasterTarget.removeEventListener(
1739
+ d(this, ut, (t) => {
1740
+ const o = P(this, yt, Kt).call(this, t.child);
1741
+ o && (b.raycaster.remove(o.raycasterTarget), o.destroy(), o.raycasterTarget.removeEventListener(
1629
1742
  "pointerDown",
1630
- s(this, Ye)
1743
+ s(this, Ne)
1631
1744
  ), o.object3d.removeEventListener(
1632
1745
  "childadded",
1633
- s(this, fe)
1634
- ), P(this, B, s(this, B).filter((e) => e !== o)));
1746
+ s(this, ye)
1747
+ ), x(this, U, s(this, U).filter((e) => e !== o)));
1635
1748
  });
1636
- u(this, Ye, (n) => {
1637
- const o = I(this, lt, jt).call(this, n.target);
1638
- o && (P(this, ue, s(this, B).find((e) => e.object3d === (o == null ? void 0 : o.object3d)) || null), s(this, ue) && s(this, O).attach(s(this, ue).object3d));
1749
+ d(this, Ne, (t) => {
1750
+ const o = P(this, yt, Kt).call(this, t.target);
1751
+ o && (x(this, fe, s(this, U).find((e) => e.object3d === (o == null ? void 0 : o.object3d)) || null), s(this, fe) && s(this, j).attach(s(this, fe).object3d));
1639
1752
  });
1640
- u(this, rt, (n) => {
1641
- n.key === "t" ? s(this, O).setMode("translate") : n.key === "r" ? s(this, O).setMode("rotate") : n.key === "s" ? s(this, O).setMode("scale") : n.key === "Escape" ? s(this, O).detach() : n.key === "+" || n.key === "=" ? s(this, O).setSize(s(this, O).size + 0.1) : n.key === "-" || n.key === "_" ? s(this, O).setSize(s(this, O).size - 0.1) : n.key === "h" && s(this, B).forEach((o) => {
1753
+ d(this, ft, (t) => {
1754
+ t.key === "t" ? s(this, j).setMode("translate") : t.key === "r" ? s(this, j).setMode("rotate") : t.key === "s" ? s(this, j).setMode("scale") : t.key === "Escape" ? s(this, j).detach() : t.key === "+" || t.key === "=" ? s(this, j).setSize(s(this, j).size + 0.1) : t.key === "-" || t.key === "_" ? s(this, j).setSize(s(this, j).size - 0.1) : t.key === "h" && s(this, U).forEach((o) => {
1642
1755
  o.helpers.forEach((e) => {
1643
1756
  e.visible = !e.visible;
1644
1757
  });
1645
1758
  });
1646
1759
  });
1647
- P(this, O, new Ti(
1648
- x.camera,
1649
- x.webglRenderer.domElement
1650
- )), s(this, O).addEventListener("objectChange", (n) => {
1651
- s(this, ue) && s(this, ue).save();
1652
- }), x.view.add(s(this, O)), x.scene.addEventListener("childadded", s(this, fe)), x.scene.addEventListener("childremoved", s(this, at)), window.addEventListener("keydown", s(this, rt));
1760
+ x(this, j, new Fi(
1761
+ b.camera,
1762
+ b.webglRenderer.domElement
1763
+ )), s(this, j).addEventListener("objectChange", (t) => {
1764
+ s(this, fe) && s(this, fe).save();
1765
+ }), b.view.add(s(this, j)), b.scene.addEventListener("childadded", s(this, ye)), b.scene.addEventListener("childremoved", s(this, ut)), window.addEventListener("keydown", s(this, ft));
1653
1766
  }
1654
1767
  get controls() {
1655
- return s(this, O);
1768
+ return s(this, j);
1656
1769
  }
1657
1770
  destroy() {
1658
- x.scene.removeEventListener("childadded", s(this, fe)), x.scene.removeEventListener("childremoved", s(this, at)), window.removeEventListener("keydown", s(this, rt)), s(this, O).dispose(), s(this, B).forEach((n) => {
1659
- n.raycasterTarget.removeEventListener(
1771
+ b.scene.removeEventListener("childadded", s(this, ye)), b.scene.removeEventListener("childremoved", s(this, ut)), window.removeEventListener("keydown", s(this, ft)), s(this, j).dispose(), s(this, U).forEach((t) => {
1772
+ t.raycasterTarget.removeEventListener(
1660
1773
  "pointerDown",
1661
- s(this, Ye)
1662
- ), n.object3d.removeEventListener(
1774
+ s(this, Ne)
1775
+ ), t.object3d.removeEventListener(
1663
1776
  "childadded",
1664
- s(this, fe)
1665
- ), n.destroy();
1666
- }), P(this, B, []);
1777
+ s(this, ye)
1778
+ ), t.destroy();
1779
+ }), x(this, U, []);
1780
+ }
1781
+ }
1782
+ j = new WeakMap(), U = new WeakMap(), fe = new WeakMap(), ye = new WeakMap(), ut = new WeakMap(), Ne = new WeakMap(), ft = new WeakMap(), yt = new WeakSet(), Kt = function(t) {
1783
+ return s(this, U).find(
1784
+ (e) => e.object3d === t || e.raycasterTarget === t
1785
+ );
1786
+ };
1787
+ var Xe, Ze, Fe, Qe, bt, Bt, Yt, Nn;
1788
+ class es {
1789
+ constructor() {
1790
+ d(this, bt);
1791
+ d(this, Yt);
1792
+ d(this, Xe, void 0);
1793
+ d(this, Ze, void 0);
1794
+ d(this, Fe, void 0);
1795
+ d(this, Qe, []);
1796
+ x(this, Xe, b.composer.addPass = b.composer.addPass.bind(
1797
+ b.composer
1798
+ )), b.composer.addPass = (...t) => {
1799
+ P(this, bt, Bt).call(this, t[0]), s(this, Xe).call(this, ...t);
1800
+ }, x(this, Ze, b.composer.removePass = b.composer.removePass.bind(b.composer)), b.composer.removePass = (...t) => {
1801
+ P(this, Yt, Nn).call(this, t[0]), s(this, Ze).call(this, ...t);
1802
+ }, x(this, Fe, b.composer.insertPass = b.composer.insertPass.bind(b.composer)), b.composer.insertPass = (...t) => {
1803
+ P(this, bt, Bt).call(this, t[0]), s(this, Fe).call(this, ...t);
1804
+ };
1805
+ }
1806
+ destroy() {
1807
+ b.composer.addPass = s(this, Xe), b.composer.removePass = s(this, Ze), b.composer.insertPass = s(this, Fe), s(this, Qe).forEach((t) => {
1808
+ t.destroy();
1809
+ });
1667
1810
  }
1668
1811
  }
1669
- O = new WeakMap(), B = new WeakMap(), ue = new WeakMap(), fe = new WeakMap(), at = new WeakMap(), Ye = new WeakMap(), rt = new WeakMap(), lt = new WeakSet(), jt = function(n) {
1670
- return s(this, B).find(
1671
- (e) => e.object3d === n || e.raycasterTarget === n
1812
+ Xe = new WeakMap(), Ze = new WeakMap(), Fe = new WeakMap(), Qe = new WeakMap(), bt = new WeakSet(), Bt = function(t) {
1813
+ s(this, Qe).push(
1814
+ new be(t, {
1815
+ folderName: `EffectComposer.${t.constructor.name}`,
1816
+ skipKeys: [
1817
+ "renderToScreen",
1818
+ "needsSwap",
1819
+ "nMips",
1820
+ "oldClearAlpha",
1821
+ "clearColor",
1822
+ "resolution"
1823
+ ]
1824
+ })
1825
+ ), "uniforms" in t && s(this, Qe).push(
1826
+ new be(t.uniforms, {
1827
+ folderName: `EffectComposer.${t.constructor.name}.Uniforms`,
1828
+ optionsCatalog: {
1829
+ maxblur: {
1830
+ type: "number",
1831
+ min: 0,
1832
+ max: 1,
1833
+ step: 1e-5,
1834
+ ease: 0.1
1835
+ },
1836
+ aperture: {
1837
+ type: "number",
1838
+ min: 0,
1839
+ max: 0.01,
1840
+ step: 1e-6
1841
+ },
1842
+ focus: {
1843
+ type: "number",
1844
+ min: 0,
1845
+ step: 0.01
1846
+ }
1847
+ },
1848
+ skipKeys: ["time", "resolution"]
1849
+ })
1672
1850
  );
1851
+ }, Yt = new WeakSet(), Nn = function(t) {
1673
1852
  };
1674
- var ct, ht, je, _e, He;
1675
- class Wi {
1853
+ var wt, gt, Et, Pt, qe, Le, Ge;
1854
+ class ps {
1676
1855
  constructor() {
1677
- u(this, ct, void 0);
1678
- u(this, ht, void 0);
1679
- u(this, je, void 0);
1680
- u(this, _e, void 0);
1681
- u(this, He, void 0);
1682
- P(this, ct, new bn(x.webglRenderer)), P(this, ht, new ji()), P(this, je, new Pn(x.camera)), P(this, _e, new Yi()), s(this, _e).controls.addEventListener("change", () => {
1683
- s(this, je).save();
1684
- }), P(this, He, new Hi()), s(this, He).controls.addEventListener(
1856
+ d(this, wt, void 0);
1857
+ d(this, gt, void 0);
1858
+ d(this, Et, null);
1859
+ d(this, Pt, void 0);
1860
+ d(this, qe, void 0);
1861
+ d(this, Le, void 0);
1862
+ d(this, Ge, void 0);
1863
+ x(this, wt, new be(b.webglRenderer, {
1864
+ folderName: "Renderer"
1865
+ })), x(this, gt, new be(
1866
+ b.webglRenderer.shadowMap,
1867
+ {
1868
+ folderName: "Renderer.shadowMap",
1869
+ optionsCatalog: {
1870
+ type: {
1871
+ type: "select",
1872
+ variants: [
1873
+ "BasicShadowMap",
1874
+ "PCFShadowMap",
1875
+ "PCFSoftShadowMap",
1876
+ "VSMShadowMap"
1877
+ ]
1878
+ }
1879
+ },
1880
+ afterChange: () => {
1881
+ b.webglRenderer.shadowMap.needsUpdate = !0, Ai(b.scene, (t) => {
1882
+ t.needsUpdate = !0;
1883
+ });
1884
+ }
1885
+ }
1886
+ )), b.composer && x(this, Et, new es()), x(this, Pt, new $i()), x(this, qe, new zn(b.camera)), x(this, Le, new Vi()), s(this, Le).controls.addEventListener("change", () => {
1887
+ s(this, qe).save();
1888
+ }), x(this, Ge, new Ji()), s(this, Ge).controls.addEventListener(
1685
1889
  "dragging-changed",
1686
- (n) => {
1687
- s(this, _e).controls.enabled = !n.value;
1890
+ (t) => {
1891
+ s(this, Le).controls.enabled = !t.value;
1688
1892
  }
1689
1893
  );
1690
1894
  }
1691
1895
  destroy() {
1692
- s(this, ct).destroy(), s(this, ht).destroy(), s(this, je).destroy(), s(this, _e).destroy(), s(this, He).destroy();
1896
+ var t;
1897
+ s(this, wt).destroy(), s(this, gt).destroy(), (t = s(this, Et)) == null || t.destroy(), s(this, Pt).destroy(), s(this, qe).destroy(), s(this, Le).destroy(), s(this, Ge).destroy();
1693
1898
  }
1694
1899
  }
1695
- ct = new WeakMap(), ht = new WeakMap(), je = new WeakMap(), _e = new WeakMap(), He = new WeakMap();
1900
+ wt = new WeakMap(), gt = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), qe = new WeakMap(), Le = new WeakMap(), Ge = new WeakMap();
1696
1901
  export {
1697
- Wi as En3Helpers,
1698
- Pn as En3Object3dManager
1902
+ ps as En3Helpers,
1903
+ zn as En3Object3dManager
1699
1904
  };