aptechka 0.14.0 → 0.16.0

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