aptechka 0.8.3 → 0.9.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.
- package/lib/{Animation-BInSRYNr.cjs → Animation-BCA-DBje.cjs} +1 -1
- package/lib/{Animation-uimN7sdT.js → Animation-DrSYnbgb.js} +1 -1
- package/lib/{Composed-Iihn8fT4.cjs → Composed-7Fe7TW_T.cjs} +1 -1
- package/lib/{Composed-Fa7owymK.js → Composed-pnupzTOv.js} +1 -1
- package/lib/{Damped-yrNXlkDE.js → Damped-C2FuK_3K.js} +1 -1
- package/lib/{Damped-Da3EnNN4.cjs → Damped-CSEZ0qwp.cjs} +1 -1
- package/lib/{Derived-DIWinC7Y.js → Derived-CFnbeEgJ.js} +1 -1
- package/lib/{Derived-D9VrDuf9.cjs → Derived-Dko3EP7m.cjs} +1 -1
- package/lib/ElementConstructor-9S0f1yAH.cjs +1 -0
- package/lib/ElementConstructor-CZKbNIQK.js +366 -0
- package/lib/Resource-BhF6Tj1p.js +49 -0
- package/lib/Resource-WCQEgLpB.cjs +1 -0
- package/lib/{SourceManager--L_rA28b.js → SourceManager-CmhlHGx7.js} +1 -1
- package/lib/{SourceManager-D6D2LVKf.cjs → SourceManager-DYnGpBi1.cjs} +1 -1
- package/lib/{Store-Qr3SNOSf.js → Store-Dsft7GtM.js} +1 -1
- package/lib/{Store-Cr3VaD9G.cjs → Store-kzJycezD.cjs} +1 -1
- package/lib/{Tweened-CjgvoOwL.js → Tweened-BrD2cPSC.js} +1 -1
- package/lib/{Tweened-DksN-Rz6.cjs → Tweened-D6dAu8Zi.cjs} +1 -1
- package/lib/{Viewport-BBYt1Ivy.cjs → Viewport-DRNfjjDY.cjs} +1 -1
- package/lib/{Viewport-Cgtq2I_K.js → Viewport-Ud7nellV.js} +1 -1
- package/lib/_createStore-Cf1MyeHa.cjs +1 -0
- package/lib/_createStore-Ck9bHolX.js +12 -0
- package/lib/accordion/AccordionElement.d.ts +1 -2
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +110 -122
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -2
- package/lib/canvas/index.js +69 -75
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.d.ts +1 -3
- package/lib/checkbox/index.js +42 -46
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.js +1 -1
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/counter/index.d.ts +1 -3
- package/lib/{createStylesheet-BxKITIVV.js → createStylesheet-C2gpLy4r.js} +1 -1
- package/lib/{createStylesheet-BsMSWX0q.cjs → createStylesheet-Di9WRypw.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +1 -1
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +114 -113
- package/lib/en3/helpers/index.cjs +1 -1
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/misc/index.cjs +1 -1
- package/lib/en3/misc/index.js +2 -2
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -2
- package/lib/globals-DMjysUXI.js +8 -0
- package/lib/globals-bYKki-b9.cjs +1 -0
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +8 -16
- package/lib/index-BtB-3MG7.js +265 -0
- package/lib/index-DQo2-dnB.cjs +9 -0
- package/lib/instantiate-BPZZn8jK.js +134 -0
- package/lib/instantiate-BWM-ipPW.cjs +1 -0
- package/lib/jsx/ComponentElement.d.ts +18 -0
- package/lib/jsx/globals.d.ts +13 -0
- package/lib/jsx/h.d.ts +6 -0
- package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
- package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
- package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
- package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
- package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
- package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
- package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
- package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
- package/lib/jsx/hooks/onAnimationFrame.js +22 -0
- package/lib/jsx/hooks/onElementResize.cjs +1 -0
- package/lib/jsx/hooks/onElementResize.d.ts +5 -0
- package/lib/jsx/hooks/onElementResize.js +11 -0
- package/lib/jsx/hooks/onIntersection.cjs +1 -0
- package/lib/jsx/hooks/onIntersection.d.ts +5 -0
- package/lib/jsx/hooks/onIntersection.js +11 -0
- package/lib/jsx/hooks/onWindowResize.cjs +1 -0
- package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
- package/lib/jsx/hooks/onWindowResize.js +8 -0
- package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
- package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
- package/lib/jsx/hooks/store/createResource.d.ts +3 -0
- package/lib/jsx/hooks/store/createStore.d.ts +3 -0
- package/lib/jsx/hooks/store/index.cjs +1 -0
- package/lib/jsx/hooks/store/index.d.ts +5 -0
- package/lib/jsx/hooks/store/index.js +27 -0
- package/lib/jsx/hooks/watchAttribute.cjs +1 -0
- package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
- package/lib/jsx/hooks/watchAttribute.js +17 -0
- package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
- package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
- package/lib/jsx/hooks/watchCSSProperty.js +17 -0
- package/lib/jsx/index.cjs +1 -0
- package/lib/jsx/index.d.ts +13 -0
- package/lib/jsx/index.js +91 -0
- package/lib/jsx/instantiate.d.ts +5 -0
- package/lib/jsx/register.d.ts +1 -0
- package/lib/jsx/render.d.ts +6 -0
- package/lib/jsx/type.d.ts +192 -0
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +33 -36
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +33 -33
- package/lib/onConnect-DGP866cj.cjs +1 -0
- package/lib/onConnect-y5DrxJ9P.js +7 -0
- package/lib/pointer/PointerElement.d.ts +1 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +106 -118
- package/lib/popover/PopoverButtonElement.d.ts +1 -2
- package/lib/popover/PopoverElement.d.ts +1 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +109 -125
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +76 -73
- package/lib/scroll/ScrollElement.d.ts +1 -2
- package/lib/scroll/ScrollUserElement.d.ts +1 -2
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +674 -753
- package/lib/select/SelectElement.d.ts +1 -3
- package/lib/select/SelectUserElement.d.ts +1 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +105 -108
- package/lib/slicer/SlicerElement.d.ts +1 -2
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +88 -106
- package/lib/source/SourceElement.d.ts +1 -2
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.js +20 -21
- package/lib/store/Derived.d.ts +3 -3
- package/lib/store/DerivedArray.d.ts +8 -0
- package/lib/store/Keyed.d.ts +13 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.js +32 -32
- package/lib/tags-BBOGIzDK.cjs +1 -0
- package/lib/tags-CefGDQtF.js +485 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/TweakerFieldElement.d.ts +1 -2
- package/lib/tweaker/TweakerFolderElement.d.ts +1 -2
- package/lib/tweaker/TweakerStoreManagerElement.d.ts +1 -2
- package/lib/tweaker/index.cjs +3 -3
- package/lib/tweaker/index.js +392 -472
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +26 -30
- package/package.json +65 -9
- package/lib/custom-element/index.cjs +0 -1
- package/lib/custom-element/index.d.ts +0 -8
- package/lib/custom-element/index.js +0 -30
- package/lib/index-CzpP1Tg6.cjs +0 -9
- package/lib/index-Dwd_62sm.js +0 -301
- package/lib/tags-CAfasCGV.cjs +0 -1
- package/lib/tags-D9lNDPX8.js +0 -848
|
@@ -1,124 +1,125 @@
|
|
|
1
|
-
import { E as e
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as
|
|
1
|
+
import { E as e } from "../ElementConstructor-CZKbNIQK.js";
|
|
2
|
+
import { a as r, b as o, c as i, d as l, f as d, g as m, h as p, i as c, j as n, k as u, l as b, m as h, n as f, o as g, p as y, q as k, r as x, s as v, t as q, u as E, v as j, aZ as w, w as C, x as S, y as T, z as V, A as z, B as A, C as B, D, E as F, F as G, e as H, G as I, H as J, aY as K, I as L, J as M, K as N, L as O, M as P, aX as Q, N as R, O as U, P as W, Q as X, R as Y, S as Z, T as _, U as $, V as aa, W as sa, X as ea, aU as ta, Y as ra, Z as oa, _ as ia, $ as la, a0 as da, a1 as ma, a2 as pa, a3 as ca, a4 as na, a5 as ua, a6 as ba, a7 as ha, a8 as fa, a9 as ga, aa as ya, ab as ka, ac as xa, ad as va, ae as qa, af as Ea, ag as ja, ah as wa, ai as Ca, aj as Sa, ak as Ta, al as Va, am as za, an as Aa, ao as Ba, ap as Da, aq as Fa, ar as Ga, as as Ha, at as Ia, au as Ja, av as Ka, aw as La, ax as Ma, ay as Na, az as Oa, aA as Pa, aB as Qa, aC as Ra, aD as Ua, aE as Wa, aF as Xa, aG as Ya, aH as Za, aI as _a, aJ as $a, aK as as, aL as ss, aM as es, aN as ts, aO as rs, aP as os, aQ as is, aR as ls, aS as ds, aT as ms, aV as ps, aW as cs } from "../tags-CefGDQtF.js";
|
|
3
|
+
import { c as us } from "../createStylesheet-C2gpLy4r.js";
|
|
4
|
+
import { c as hs } from "../createTheme-CHnsCgAr.js";
|
|
4
5
|
export {
|
|
5
6
|
e as ElementConstructor,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
r as a,
|
|
8
|
+
o as abbr,
|
|
9
|
+
i as address,
|
|
10
|
+
l as area,
|
|
11
|
+
d as article,
|
|
12
|
+
m as aside,
|
|
13
|
+
p as audio,
|
|
14
|
+
c as b,
|
|
15
|
+
n as base,
|
|
16
|
+
u as bdi,
|
|
17
|
+
b as bdo,
|
|
18
|
+
h as blockquote,
|
|
19
|
+
f as body,
|
|
20
|
+
g as br,
|
|
21
|
+
y as button,
|
|
22
|
+
k as canvas,
|
|
23
|
+
x as caption,
|
|
23
24
|
v as cite,
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
q as code,
|
|
26
|
+
E as col,
|
|
26
27
|
j as colgroup,
|
|
27
28
|
w as contents,
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
us as createStylesheet,
|
|
30
|
+
hs as createTheme,
|
|
30
31
|
C as data,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
32
|
+
S as datalist,
|
|
33
|
+
T as dd,
|
|
34
|
+
V as del,
|
|
35
|
+
z as details,
|
|
36
|
+
A as dfn,
|
|
37
|
+
B as dialog,
|
|
38
|
+
D as div,
|
|
39
|
+
F as dl,
|
|
40
|
+
G as dt,
|
|
41
|
+
H as element,
|
|
42
|
+
I as em,
|
|
43
|
+
J as embed,
|
|
44
|
+
K as empty,
|
|
45
|
+
L as fieldset,
|
|
46
|
+
M as figcaption,
|
|
47
|
+
N as figure,
|
|
48
|
+
O as footer,
|
|
49
|
+
P as form,
|
|
50
|
+
Q as fragment,
|
|
51
|
+
R as h1,
|
|
52
|
+
U as h2,
|
|
53
|
+
W as h3,
|
|
54
|
+
X as h4,
|
|
55
|
+
Y as h5,
|
|
56
|
+
Z as h6,
|
|
57
|
+
_ as head,
|
|
58
|
+
$ as header,
|
|
59
|
+
aa as hgroup,
|
|
60
|
+
sa as hr,
|
|
61
|
+
ea as html,
|
|
62
|
+
ta as htmlVar,
|
|
63
|
+
ra as i,
|
|
64
|
+
oa as iframe,
|
|
65
|
+
ia as img,
|
|
66
|
+
la as input,
|
|
67
|
+
da as ins,
|
|
68
|
+
ma as kbd,
|
|
69
|
+
pa as label,
|
|
70
|
+
ca as legend,
|
|
71
|
+
na as li,
|
|
72
|
+
ua as link,
|
|
73
|
+
ba as main,
|
|
74
|
+
ha as map,
|
|
75
|
+
fa as mark,
|
|
76
|
+
ga as menu,
|
|
77
|
+
ya as meta,
|
|
78
|
+
ka as meter,
|
|
79
|
+
xa as nav,
|
|
79
80
|
va as noscript,
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
qa as object,
|
|
82
|
+
Ea as ol,
|
|
82
83
|
ja as optgroup,
|
|
83
84
|
wa as option,
|
|
84
85
|
Ca as output,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
86
|
+
Sa as p,
|
|
87
|
+
Ta as picture,
|
|
88
|
+
Va as pre,
|
|
89
|
+
za as progress,
|
|
90
|
+
Aa as q,
|
|
91
|
+
Ba as rp,
|
|
92
|
+
Da as rt,
|
|
93
|
+
Fa as ruby,
|
|
94
|
+
Ga as s,
|
|
95
|
+
Ha as samp,
|
|
96
|
+
Ia as script,
|
|
97
|
+
Ja as search,
|
|
98
|
+
Ka as section,
|
|
99
|
+
La as select,
|
|
100
|
+
Ma as slot,
|
|
101
|
+
Na as small,
|
|
102
|
+
Oa as source,
|
|
103
|
+
Pa as span,
|
|
104
|
+
Qa as strong,
|
|
105
|
+
Ra as style,
|
|
106
|
+
Ua as sub,
|
|
107
|
+
Wa as summary,
|
|
108
|
+
Xa as sup,
|
|
109
|
+
Ya as table,
|
|
110
|
+
Za as tbody,
|
|
111
|
+
_a as td,
|
|
112
|
+
$a as template,
|
|
113
|
+
as as textarea,
|
|
114
|
+
ss as tfoot,
|
|
115
|
+
es as th,
|
|
116
|
+
ts as thead,
|
|
117
|
+
rs as time,
|
|
118
|
+
os as title,
|
|
119
|
+
is as tr,
|
|
120
|
+
ls as track,
|
|
121
|
+
ds as u,
|
|
122
|
+
ms as ul,
|
|
123
|
+
ps as video,
|
|
124
|
+
cs as wbr
|
|
124
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var zn=Object.defineProperty;var nn=Object.getOwnPropertySymbols;var Nn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var on=(m,n,a)=>n in m?zn(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,ae=(m,n)=>{for(var a in n||(n={}))Nn.call(n,a)&&on(m,a,n[a]);if(nn)for(var a of nn(n))Xn.call(n,a)&&on(m,a,n[a]);return m};var Ot=(m,n,a)=>{if(!n.has(m))throw TypeError("Cannot "+a)};var s=(m,n,a)=>(Ot(m,n,"read from private field"),a?a.call(m):n.get(m)),u=(m,n,a)=>{if(n.has(m))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(m):n.set(m,a)},P=(m,n,a,e)=>(Ot(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a);var M=(m,n,a)=>(Ot(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-CBBYE8rb.cjs"),N=require("../../Store-Cr3VaD9G.cjs"),t=require("three"),Zn=require("../../object-CCiXnER2.cjs"),sn=require("../../ticker/index.cjs"),Gn=require("../../Composed-Iihn8fT4.cjs"),Fn=require("../../traverseMaterials-BtBXV88O.cjs");function Vn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const fe=Vn(t),Qn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],yn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],qn=[...yn,"SrcAlphaSaturateFactor"],Un=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Bn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Wn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Dt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Kn=["FrontSide","BackSide","DoubleSide"],$n=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Jn=["round","bevel","miter"],eo=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],to={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:qn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Qn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Un},blendSrc:{type:"select",variants:yn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Bn},stencilFunc:{type:"select",variants:Wn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Dt},stencilZFail:{type:"select",variants:Dt},stencilZPass:{type:"select",variants:Dt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Kn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:$n},wireframeLinejoin:{type:"select",variants:Jn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:eo},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},no=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,te,St,bn,Pt,wn,xt,gn,vt,Mn,Tt,En,qe,Rt,Ue,Ht,ne,be,oe,we;class pe{constructor(n,a){u(this,St);u(this,Pt);u(this,xt);u(this,vt);u(this,Tt);u(this,qe);u(this,Ue);u(this,ne);u(this,oe);u(this,Le,void 0);u(this,te,[]);P(this,Le,n);const e=ae(ae({},to),a==null?void 0:a.optionsCatalog),r=new Set([...no,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;M(this,St,bn).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,te).forEach(n=>{n.close()})}}Le=new WeakMap,te=new WeakMap,St=new WeakSet,bn=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const d=a[l],p=M(this,ne,be).call(this,d),f=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):M(this,Pt,wn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Vector2||p instanceof fe.Vector3?M(this,xt,gn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?M(this,vt,Mn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Color?M(this,Tt,En).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c})}},Pt=new WeakSet,wn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"number"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},xt=new WeakSet,gn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const f=[p.x,p.y];return p instanceof fe.Vector3&&f.push(p.z),f},d=new N.Store(l(M(this,ne,be).call(this,a)),{passport:{name:n,manager:ae({type:"number"},c)}});d.subscribe(p=>{M(this,oe,we).call(this,e,r,(f,w)=>f[w].set(...p.current)),i==null||i()}),s(this,te).push(d)},vt=new WeakSet,Mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"boolean"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},Tt=new WeakSet,En=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(`#${M(this,ne,be).call(this,a).getHexString()}`,{passport:{name:n,manager:ae({type:"color"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=new fe.Color(d.current)),i==null||i()}),s(this,te).push(l)},qe=new WeakSet,Rt=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let d=null;for(const f of l)a===fe[f]&&(d=f);const p=new N.Store(d||M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({},c)}});p.subscribe(f=>{typeof f.current=="string"&&(f.current[0]===f.current[0].toUpperCase()?M(this,oe,we).call(this,e,r,(w,A)=>w[A]=fe[f.current]):M(this,oe,we).call(this,e,r,(w,A)=>w[A]=f.current)),i==null||i()}),s(this,te).push(p)}},Ue=new WeakSet,Ht=function(n){return Zn.isObject(n)&&"value"in n},ne=new WeakSet,be=function(n){return M(this,Ue,Ht).call(this,n)?n.value:n},oe=new WeakSet,we=function(n,a,e){M(this,Ue,Ht).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,ce,Me,Ee,Se,Be,q,Oe,Mt,We;class Nt{constructor(n,a){u(this,Oe);u(this,g,void 0);u(this,ce,[]);u(this,Me,void 0);u(this,Ee,void 0);u(this,Se,void 0);u(this,Be,!0);u(this,q,[]);u(this,We,()=>{s(this,q).forEach(n=>{"update"in n&&n.update()})});var l,d;P(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,q).push(p);const f=(d=s(this,g).shadow)==null?void 0:d.camera;if(f instanceof t.Camera){const w=new t.CameraHelper(f);s(this,q).push(w)}}if(s(this,q).forEach(p=>{y.en3.view.add(p)}),P(this,Me,new N.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),P(this,Ee,new N.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),P(this,Se,new N.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),P(this,Be,!1),s(this,Me).subscribe(p=>{M(this,Oe,Mt).call(this,"position",p.current)}),s(this,Ee).subscribe(p=>{M(this,Oe,Mt).call(this,"rotation",p.current)}),s(this,Se).subscribe(p=>{M(this,Oe,Mt).call(this,"scale",p.current)}),e){if(s(this,ce).push(new pe(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,q).length&&sn.ticker.subscribe(s(this,We))}get object3d(){return s(this,g)}get helpers(){return s(this,q)}get raycasterTarget(){return s(this,q)[0]||s(this,g)}destroy(){s(this,ce).forEach(n=>n.destroy()),s(this,Me).close(),s(this,Ee).close(),s(this,Se).close(),s(this,g).userData.controlled=!1,s(this,q).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),sn.ticker.unsubscribe(s(this,We))}save(){const n=(a,e)=>{(!s(this,Be)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,Me),s(this,g).position),n(s(this,Ee),s(this,g).rotation),n(s(this,Se),s(this,g).scale)}}g=new WeakMap,ce=new WeakMap,Me=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Be=new WeakMap,q=new WeakMap,Oe=new WeakSet,Mt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},We=new WeakMap;const an={type:"change"},Ct={type:"start"},rn={type:"end"},yt=new t.Ray,cn=new t.Plane,oo=Math.cos(70*t.MathUtils.DEG2RAD);class io extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,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=.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:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Lt),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Lt),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(an),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),S=new t.Vector3,z=new t.Quaternion,se=new t.Vector3,G=2*Math.PI;return function(Yn=null){const en=e.object.position;o.copy(en).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&ue(It(Yn)),e.enableDamping?(l.theta+=d.theta*e.dampingFactor,l.phi+=d.phi*e.dampingFactor):(l.theta+=d.theta,l.phi+=d.phi);let $=e.minAzimuthAngle,J=e.maxAzimuthAngle;isFinite($)&&isFinite(J)&&($<-Math.PI?$+=G:$>Math.PI&&($-=G),J<-Math.PI?J+=G:J>Math.PI&&(J-=G),$<=J?l.theta=Math.max($,Math.min(J,l.theta)):l.theta=l.theta>($+J)/2?Math.max($,l.theta):Math.min(J,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);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=ie(l.radius);else{const ee=l.radius;l.radius=ie(l.radius*p),Xe=ee!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),en.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(d.theta*=1-e.dampingFactor,d.phi*=1-e.dampingFactor,f.multiplyScalar(1-e.dampingFactor)):(d.set(0,0,0),f.set(0,0,0)),e.zoomToCursor&&ve){let ee=null;if(e.object.isPerspectiveCamera){const Ze=o.length();ee=ie(Ze*p);const ft=Ze-ee;e.object.position.addScaledVector(W,ft),e.object.updateMatrixWorld(),Xe=!!ft}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(j.x,j.y,0);Ze.unproject(e.object);const ft=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=ft!==e.object.zoom;const tn=new t.Vector3(j.x,j.y,0);tn.unproject(e.object),e.object.position.sub(tn).add(Ze),e.object.updateMatrixWorld(),ee=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;ee!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(ee).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))<oo?n.lookAt(e.target):(cn.setFromNormalAndCoplanarPoint(e.object.up,e.target),yt.intersectPlane(cn,e.target))))}else if(e.object.isOrthographicCamera){const ee=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),ee!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||S.distanceToSquared(e.object.position)>i||8*(1-z.dot(e.object.quaternion))>i||se.distanceToSquared(e.target)>i?(e.dispatchEvent(an),S.copy(e.object.position),z.copy(e.object.quaternion),se.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$t),e.domElement.removeEventListener("pointerdown",qt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",Ut),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Bt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Lt),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,d=new t.Spherical;let p=1;const f=new t.Vector3,w=new t.Vector2,A=new t.Vector2,B=new t.Vector2,X=new t.Vector2,L=new t.Vector2,C=new t.Vector2,O=new t.Vector2,v=new t.Vector2,T=new t.Vector2,W=new t.Vector3,j=new t.Vector2;let ve=!1;const _=[],me={};let ze=!1;function It(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function ue(o){d.theta-=o}function _e(o){d.phi-=o}const Z=function(){const o=new t.Vector3;return function(b,S){o.setFromMatrixColumn(S,0),o.multiplyScalar(-b),f.add(o)}}(),H=function(){const o=new t.Vector3;return function(b,S){e.screenSpacePanning===!0?o.setFromMatrixColumn(S,1):(o.setFromMatrixColumn(S,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),f.add(o)}}(),Q=function(){const o=new t.Vector3;return function(b,S){const z=e.domElement;if(e.object.isPerspectiveCamera){const se=e.object.position;o.copy(se).sub(e.target);let G=o.length();G*=Math.tan(e.object.fov/2*Math.PI/180),Z(2*b*G/z.clientHeight,e.object.matrix),H(2*S*G/z.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(Z(b*(e.object.right-e.object.left)/e.object.zoom/z.clientWidth,e.object.matrix),H(S*(e.object.top-e.object.bottom)/e.object.zoom/z.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function Y(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function K(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function I(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),S=o-b.left,z=h-b.top,se=b.width,G=b.height;j.x=S/se*2-1,j.y=-(z/G)*2+1,W.set(j.x,j.y,1).unproject(e.object).sub(e.object.position).normalize()}function ie(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function de(o){w.set(o.clientX,o.clientY)}function Ie(o){I(o.clientX,o.clientX),O.set(o.clientX,o.clientY)}function ut(o){X.set(o.clientX,o.clientY)}function dt(o){A.set(o.clientX,o.clientY),B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A),e.update()}function Pn(o){v.set(o.clientX,o.clientY),T.subVectors(v,O),T.y>0?Y(Te(T.y)):T.y<0&&K(Te(T.y)),O.copy(v),e.update()}function xn(o){L.set(o.clientX,o.clientY),C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L),e.update()}function vn(o){I(o.clientX,o.clientY),o.deltaY<0?K(Te(o.deltaY)):o.deltaY>0&&Y(Te(o.deltaY)),e.update()}function Tn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?ue(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?ue(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Xt(o){if(_.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);w.set(b,S)}}function Zt(o){if(_.length===1)X.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);X.set(b,S)}}function Gt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);O.set(0,z)}function _n(o){e.enableZoom&&Gt(o),e.enablePan&&Zt(o)}function In(o){e.enableZoom&&Gt(o),e.enableRotate&&Xt(o)}function Ft(o){if(_.length==1)A.set(o.pageX,o.pageY);else{const b=Ae(o),S=.5*(o.pageX+b.x),z=.5*(o.pageY+b.y);A.set(S,z)}B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A)}function Vt(o){if(_.length===1)L.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);L.set(b,S)}C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L)}function Qt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);v.set(0,z),T.set(0,Math.pow(v.y/O.y,e.zoomSpeed)),Y(T.y),O.copy(v);const se=(o.pageX+h.x)*.5,G=(o.pageY+h.y)*.5;I(se,G)}function An(o){e.enableZoom&&Qt(o),e.enablePan&&Vt(o)}function Ln(o){e.enableZoom&&Qt(o),e.enableRotate&&Ft(o)}function qt(o){e.enabled!==!1&&(_.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",At),e.domElement.addEventListener("pointerup",Ne)),!Hn(o)&&(kn(o),o.pointerType==="touch"?Kt(o):On(o)))}function At(o){e.enabled!==!1&&(o.pointerType==="touch"?jn(o):Dn(o))}function Ne(o){switch(Rn(o),_.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent(rn),c=r.NONE;break;case 1:const h=_[0],b=me[h];Kt({pointerId:h,pageX:b.x,pageY:b.y});break}}function On(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ut(o),c=r.PAN}else{if(e.enableRotate===!1)return;de(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;de(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ut(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function Dn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;dt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;Pn(o);break;case r.PAN:if(e.enablePan===!1)return;xn(o);break}}function Ut(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(Ct),vn(Cn(o)),e.dispatchEvent(rn))}function Cn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Bt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Wt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Lt(o){e.enabled===!1||e.enablePan===!1||Tn(o)}function Kt(o){switch(Jt(o),_.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Xt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Zt(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;_n(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;In(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function jn(o){switch(Jt(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;Ft(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Vt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;An(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ln(o),e.update();break;default:c=r.NONE}}function $t(o){e.enabled!==!1&&o.preventDefault()}function kn(o){_.push(o.pointerId)}function Rn(o){delete me[o.pointerId];for(let h=0;h<_.length;h++)if(_[h]==o.pointerId){_.splice(h,1);return}}function Hn(o){for(let h=0;h<_.length;h++)if(_[h]==o.pointerId)return!0;return!1}function Jt(o){let h=me[o.pointerId];h===void 0&&(h=new t.Vector2,me[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===_[0]?_[1]:_[0];return me[h]}e.domElement.addEventListener("contextmenu",$t),e.domElement.addEventListener("pointerdown",qt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",Ut,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Bt,{passive:!0,capture:!0}),this.update()}}const ye=new t.Raycaster,R=new t.Vector3,re=new t.Vector3,x=new t.Quaternion,ln={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},jt={type:"change"},hn={type:"mouseDown",mode:null},pn={type:"mouseUp",mode:null},mn={type:"objectChange"};class so extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new po;this._gizmo=e,this.add(e);const r=new mo;this._plane=r,this.add(r);const c=this;function i(v,T){let W=T;Object.defineProperty(c,v,{get:function(){return W!==void 0?W:T},set:function(j){W!==j&&(W=j,r[v]=j,e[v]=j,c.dispatchEvent({type:v+"-changed",value:j}),c.dispatchEvent(jt))}}),c[v]=T,r[v]=T,e[v]=T}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);const l=new t.Vector3,d=new t.Vector3,p=new t.Quaternion,f=new t.Quaternion,w=new t.Vector3,A=new t.Quaternion,B=new t.Vector3,X=new t.Vector3,L=new t.Vector3,C=0,O=new t.Vector3;i("worldPosition",l),i("worldPositionStart",d),i("worldQuaternion",p),i("worldQuaternionStart",f),i("cameraPosition",w),i("cameraQuaternion",A),i("pointStart",B),i("pointEnd",X),i("rotationAxis",L),i("rotationAngle",C),i("eye",O),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=ao.bind(this),this._onPointerDown=co.bind(this),this._onPointerHover=ro.bind(this),this._onPointerMove=lo.bind(this),this._onPointerUp=ho.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){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)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._gizmo.picker[this.mode],ye);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._plane,ye,!0);a&&(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(a.point).sub(this.worldPositionStart)),this.dragging=!0,hn.mode=this.mode,this.dispatchEvent(hn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&ye.setFromCamera(n,this.camera);const i=kt(this._plane,ye,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(x.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(R.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(R.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),re.set(l,l,l)}else R.copy(this.pointStart),re.copy(this.pointEnd),R.applyQuaternion(this._worldQuaternionInv),re.applyQuaternion(this._worldQuaternionInv),re.divide(R),a.search("X")===-1&&(re.x=1),a.search("Y")===-1&&(re.y=1),a.search("Z")===-1&&(re.z=1);r.scale.copy(this._scaleStart).multiply(re),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(R.setFromMatrixPosition(this.camera.matrixWorld));let d=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(R.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(ln[a]),R.copy(ln[a]),c==="local"&&R.applyQuaternion(this.worldQuaternion),R.cross(this.eye),R.length()===0?d=!0:this.rotationAngle=this._offset.dot(R.normalize())*l),(a==="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),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(jt),this.dispatchEvent(mn)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(pn.mode=this.mode,this.dispatchEvent(pn)),this.dragging=!1,this.axis=null)}dispose(){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){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(jt),this.dispatchEvent(mn),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ye}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function ao(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function ro(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function co(m){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)))}function lo(m){this.enabled&&this.pointerMove(this._getPointer(m))}function ho(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function kt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const bt=new t.Euler,E=new t.Vector3(0,1,0),un=new t.Vector3(0,0,0),dn=new t.Matrix4,wt=new t.Quaternion,Et=new t.Quaternion,U=new t.Vector3,fn=new t.Matrix4,Ve=new t.Vector3(1,0,0),ge=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),gt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class po extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const d=n.clone();d.color.setHex(16711680),d.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const f=n.clone();f.color.setHex(255),f.opacity=.5;const w=n.clone();w.opacity=.25;const A=n.clone();A.color.setHex(16776960),A.opacity=.25,n.clone().color.setHex(16776960);const X=n.clone();X.color.setHex(7895160);const L=new t.CylinderGeometry(0,.04,.1,12);L.translate(0,.05,0);const C=new t.BoxGeometry(.08,.08,.08);C.translate(0,.04,0);const O=new t.BufferGeometry;O.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const v=new t.CylinderGeometry(.0075,.0075,.5,3);v.translate(0,.25,0);function T(H,Q){const Y=new t.TorusGeometry(H,.0075,3,64,Q*Math.PI*2);return Y.rotateY(Math.PI/2),Y.rotateX(Math.PI/2),Y}function W(){const H=new t.BufferGeometry;return H.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),H}const j={X:[[new t.Mesh(L,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(L,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(L,i),[0,.5,0]],[new t.Mesh(L,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(v,i)]],Z:[[new t.Mesh(L,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(L,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(v,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},_={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(W(),r),null,null,null,"helper"]],X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},me={XYZE:[[new t.Mesh(T(.5,1),X),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(T(.5,.5),c)]],Y:[[new t.Mesh(T(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(T(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(T(.75,1),A),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},It={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(C,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(C,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(C,i),[0,.5,0]],[new t.Mesh(v,i)],[new t.Mesh(C,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(C,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(v,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(C,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},ue={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Z(H){const Q=new t.Object3D;for(const Y in H)for(let K=H[Y].length;K--;){const I=H[Y][K][0].clone(),ie=H[Y][K][1],de=H[Y][K][2],Ie=H[Y][K][3],ut=H[Y][K][4];I.name=Y,I.tag=ut,ie&&I.position.set(ie[0],ie[1],ie[2]),de&&I.rotation.set(de[0],de[1],de[2]),Ie&&I.scale.set(Ie[0],Ie[1],Ie[2]),I.updateMatrix();const dt=I.geometry.clone();dt.applyMatrix4(I.matrix),I.geometry=dt,I.renderOrder=1/0,I.position.set(0,0,0),I.rotation.set(0,0,0),I.scale.set(1,1,1),Q.add(I)}return Q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Z(j)),this.add(this.gizmo.rotate=Z(me)),this.add(this.gizmo.scale=Z(Te)),this.add(this.picker.translate=Z(ve)),this.add(this.picker.rotate=Z(It)),this.add(this.picker.scale=Z(ue)),this.add(this.helper.translate=Z(_)),this.add(this.helper.rotate=Z(ze)),this.add(this.helper.scale=Z(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Et;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";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;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"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(x.setFromEuler(bt.set(0,0,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(x.setFromEuler(bt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),E.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(dn.lookAt(un,E,ge)),i.quaternion.multiply(x),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),R.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),R.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(R),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));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(wt.copy(e),E.copy(this.eye).applyQuaternion(x.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(dn.lookAt(this.eye,un,ge)),i.name==="X"&&(x.setFromAxisAngle(Ve,Math.atan2(-E.y,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Y"&&(x.setFromAxisAngle(ge,Math.atan2(E.x,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Z"&&(x.setFromAxisAngle(Qe,Math.atan2(E.y,E.x)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x))),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){return i.name===d}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class mo extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),gt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:Et),Ge.copy(ge).applyQuaternion(a==="local"?this.worldQuaternion:Et),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:Et),E.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":E.copy(this.eye).cross(gt),U.copy(gt).cross(E);break;case"Y":E.copy(this.eye).cross(Ge),U.copy(Ge).cross(E);break;case"Z":E.copy(this.eye).cross(Fe),U.copy(Fe).cross(E);break;case"XY":U.copy(Fe);break;case"YZ":U.copy(gt);break;case"XZ":E.copy(Fe),U.copy(Ge);break;case"XYZ":case"E":U.set(0,0,0);break}break;case"rotate":default:U.set(0,0,0)}U.length()===0?this.quaternion.copy(this.cameraQuaternion):(fn.lookAt(R.set(0,0,0),U,E),this.quaternion.setFromRotationMatrix(fn)),super.updateMatrixWorld(n)}}var F,Pe;class uo{constructor(){u(this,F,void 0);u(this,Pe,void 0);P(this,F,new io(y.en3.camera,y.en3.webglRenderer.domElement)),P(this,Pe,new N.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Pe).subscribe(a=>{s(this,F).target.set(...a.current),n&&s(this,F).update()}),s(this,F).addEventListener("change",()=>{n=!1,s(this,Pe).current=[s(this,F).target.x,s(this,F).target.y,s(this,F).target.z],n=!0})}get controls(){return s(this,F)}destroy(){s(this,F).dispose(),s(this,Pe).close()}}F=new WeakMap,Pe=new WeakMap;var k,Ke,$e,Je,et,tt,nt,ot,it;class fo{constructor(){u(this,k,null);u(this,Ke,new N.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));u(this,$e,new N.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));u(this,Je,new N.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));u(this,et,new N.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));u(this,tt,new N.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));u(this,nt,new N.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));u(this,ot,void 0);u(this,it,n=>{n.key==="g"&&(s(this,k).visible=!s(this,k).visible)});P(this,ot,new Gn.Composed([s(this,Ke),s(this,$e),s(this,Je),s(this,et),s(this,tt),s(this,nt)],()=>{s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),P(this,k,new t.GridHelper(s(this,Ke).current,s(this,$e).current,s(this,Je).current,s(this,et).current)),s(this,k).rotation.x=s(this,tt).current?Math.PI/2:0,s(this,k).visible=s(this,nt).current,y.en3.view.add(s(this,k))})),addEventListener("keydown",s(this,it))}get helper(){return s(this,k)}destroy(){s(this,ot).close(),s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),removeEventListener("keydown",s(this,it))}}k=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,it=new WeakMap;var D,V,le,he,st,De,at,rt,Yt;class yo{constructor(){u(this,rt);u(this,D,void 0);u(this,V,[]);u(this,le,null);u(this,he,n=>{if(n.child.name.startsWith("T.")&&!s(this,V).find(a=>a.object3d===n.child)){const a=new Nt(n.child);s(this,V).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,he))}});u(this,st,n=>{const a=M(this,rt,Yt).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,he)),P(this,V,s(this,V).filter(e=>e!==a)))});u(this,De,n=>{const a=M(this,rt,Yt).call(this,n.target);a&&(P(this,le,s(this,V).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,le)&&s(this,D).attach(s(this,le).object3d))});u(this,at,n=>{n.key==="t"?s(this,D).setMode("translate"):n.key==="r"?s(this,D).setMode("rotate"):n.key==="s"?s(this,D).setMode("scale"):n.key==="Escape"?s(this,D).detach():n.key==="+"||n.key==="="?s(this,D).setSize(s(this,D).size+.1):n.key==="-"||n.key==="_"?s(this,D).setSize(s(this,D).size-.1):n.key==="h"&&s(this,V).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});P(this,D,new so(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,D).addEventListener("objectChange",n=>{s(this,le)&&s(this,le).save()}),y.en3.view.add(s(this,D)),y.en3.scene.addEventListener("childadded",s(this,he)),y.en3.scene.addEventListener("childremoved",s(this,st)),window.addEventListener("keydown",s(this,at))}get controls(){return s(this,D)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,he)),y.en3.scene.removeEventListener("childremoved",s(this,st)),window.removeEventListener("keydown",s(this,at)),s(this,D).dispose(),s(this,V).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,he)),n.destroy()}),P(this,V,[])}}D=new WeakMap,V=new WeakMap,le=new WeakMap,he=new WeakMap,st=new WeakMap,De=new WeakMap,at=new WeakMap,rt=new WeakSet,Yt=function(n){return s(this,V).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,ct,zt,_t,Sn;class bo{constructor(){u(this,ct);u(this,_t);u(this,Ce,void 0);u(this,je,void 0);u(this,ke,void 0);u(this,Re,[]);P(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,Ce).call(this,...n)},P(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{M(this,_t,Sn).call(this,n[0]),s(this,je).call(this,...n)},P(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,ct=new WeakSet,zt=function(n){s(this,Re).push(new pe(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new pe(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},_t=new WeakSet,Sn=function(n){};var lt,ht,pt,mt,He,xe,Ye;class wo{constructor(){u(this,lt,void 0);u(this,ht,void 0);u(this,pt,null);u(this,mt,void 0);u(this,He,void 0);u(this,xe,void 0);u(this,Ye,void 0);P(this,lt,new pe(y.en3.webglRenderer,{folderName:"Renderer"})),P(this,ht,new pe(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Fn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&P(this,pt,new bo),P(this,mt,new fo),P(this,He,new Nt(y.en3.camera)),P(this,xe,new uo),s(this,xe).controls.addEventListener("change",()=>{s(this,He).save()}),P(this,Ye,new yo),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,xe).controls.enabled=!n.value})}destroy(){var n;s(this,lt).destroy(),s(this,ht).destroy(),(n=s(this,pt))==null||n.destroy(),s(this,mt).destroy(),s(this,He).destroy(),s(this,xe).destroy(),s(this,Ye).destroy()}}lt=new WeakMap,ht=new WeakMap,pt=new WeakMap,mt=new WeakMap,He=new WeakMap,xe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=wo;exports.En3Object3dManager=Nt;
|
|
1
|
+
"use strict";var zn=Object.defineProperty;var nn=Object.getOwnPropertySymbols;var Nn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var on=(m,n,a)=>n in m?zn(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,ae=(m,n)=>{for(var a in n||(n={}))Nn.call(n,a)&&on(m,a,n[a]);if(nn)for(var a of nn(n))Xn.call(n,a)&&on(m,a,n[a]);return m};var Ot=(m,n,a)=>{if(!n.has(m))throw TypeError("Cannot "+a)};var s=(m,n,a)=>(Ot(m,n,"read from private field"),a?a.call(m):n.get(m)),u=(m,n,a)=>{if(n.has(m))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(m):n.set(m,a)},P=(m,n,a,e)=>(Ot(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a);var M=(m,n,a)=>(Ot(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-CBBYE8rb.cjs"),N=require("../../Store-kzJycezD.cjs"),t=require("three"),Zn=require("../../object-CCiXnER2.cjs"),sn=require("../../ticker/index.cjs"),Gn=require("../../Composed-7Fe7TW_T.cjs"),Fn=require("../../traverseMaterials-BtBXV88O.cjs");function Vn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const fe=Vn(t),Qn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],yn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],qn=[...yn,"SrcAlphaSaturateFactor"],Un=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Bn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Wn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Dt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Kn=["FrontSide","BackSide","DoubleSide"],$n=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Jn=["round","bevel","miter"],eo=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],to={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:qn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Qn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Un},blendSrc:{type:"select",variants:yn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Bn},stencilFunc:{type:"select",variants:Wn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Dt},stencilZFail:{type:"select",variants:Dt},stencilZPass:{type:"select",variants:Dt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Kn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:$n},wireframeLinejoin:{type:"select",variants:Jn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:eo},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},no=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,te,St,bn,Pt,wn,xt,gn,vt,Mn,Tt,En,qe,Rt,Ue,Ht,ne,be,oe,we;class pe{constructor(n,a){u(this,St);u(this,Pt);u(this,xt);u(this,vt);u(this,Tt);u(this,qe);u(this,Ue);u(this,ne);u(this,oe);u(this,Le,void 0);u(this,te,[]);P(this,Le,n);const e=ae(ae({},to),a==null?void 0:a.optionsCatalog),r=new Set([...no,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;M(this,St,bn).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,te).forEach(n=>{n.close()})}}Le=new WeakMap,te=new WeakMap,St=new WeakSet,bn=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const d=a[l],p=M(this,ne,be).call(this,d),f=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):M(this,Pt,wn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Vector2||p instanceof fe.Vector3?M(this,xt,gn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?M(this,vt,Mn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Color?M(this,Tt,En).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c})}},Pt=new WeakSet,wn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"number"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},xt=new WeakSet,gn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const f=[p.x,p.y];return p instanceof fe.Vector3&&f.push(p.z),f},d=new N.Store(l(M(this,ne,be).call(this,a)),{passport:{name:n,manager:ae({type:"number"},c)}});d.subscribe(p=>{M(this,oe,we).call(this,e,r,(f,w)=>f[w].set(...p.current)),i==null||i()}),s(this,te).push(d)},vt=new WeakSet,Mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"boolean"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},Tt=new WeakSet,En=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(`#${M(this,ne,be).call(this,a).getHexString()}`,{passport:{name:n,manager:ae({type:"color"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=new fe.Color(d.current)),i==null||i()}),s(this,te).push(l)},qe=new WeakSet,Rt=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let d=null;for(const f of l)a===fe[f]&&(d=f);const p=new N.Store(d||M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({},c)}});p.subscribe(f=>{typeof f.current=="string"&&(f.current[0]===f.current[0].toUpperCase()?M(this,oe,we).call(this,e,r,(w,A)=>w[A]=fe[f.current]):M(this,oe,we).call(this,e,r,(w,A)=>w[A]=f.current)),i==null||i()}),s(this,te).push(p)}},Ue=new WeakSet,Ht=function(n){return Zn.isObject(n)&&"value"in n},ne=new WeakSet,be=function(n){return M(this,Ue,Ht).call(this,n)?n.value:n},oe=new WeakSet,we=function(n,a,e){M(this,Ue,Ht).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,ce,Me,Ee,Se,Be,q,Oe,Mt,We;class Nt{constructor(n,a){u(this,Oe);u(this,g,void 0);u(this,ce,[]);u(this,Me,void 0);u(this,Ee,void 0);u(this,Se,void 0);u(this,Be,!0);u(this,q,[]);u(this,We,()=>{s(this,q).forEach(n=>{"update"in n&&n.update()})});var l,d;P(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,q).push(p);const f=(d=s(this,g).shadow)==null?void 0:d.camera;if(f instanceof t.Camera){const w=new t.CameraHelper(f);s(this,q).push(w)}}if(s(this,q).forEach(p=>{y.en3.view.add(p)}),P(this,Me,new N.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),P(this,Ee,new N.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),P(this,Se,new N.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),P(this,Be,!1),s(this,Me).subscribe(p=>{M(this,Oe,Mt).call(this,"position",p.current)}),s(this,Ee).subscribe(p=>{M(this,Oe,Mt).call(this,"rotation",p.current)}),s(this,Se).subscribe(p=>{M(this,Oe,Mt).call(this,"scale",p.current)}),e){if(s(this,ce).push(new pe(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,q).length&&sn.ticker.subscribe(s(this,We))}get object3d(){return s(this,g)}get helpers(){return s(this,q)}get raycasterTarget(){return s(this,q)[0]||s(this,g)}destroy(){s(this,ce).forEach(n=>n.destroy()),s(this,Me).close(),s(this,Ee).close(),s(this,Se).close(),s(this,g).userData.controlled=!1,s(this,q).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),sn.ticker.unsubscribe(s(this,We))}save(){const n=(a,e)=>{(!s(this,Be)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,Me),s(this,g).position),n(s(this,Ee),s(this,g).rotation),n(s(this,Se),s(this,g).scale)}}g=new WeakMap,ce=new WeakMap,Me=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Be=new WeakMap,q=new WeakMap,Oe=new WeakSet,Mt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},We=new WeakMap;const an={type:"change"},Ct={type:"start"},rn={type:"end"},yt=new t.Ray,cn=new t.Plane,oo=Math.cos(70*t.MathUtils.DEG2RAD);class io extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,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=.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:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Lt),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Lt),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(an),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),S=new t.Vector3,z=new t.Quaternion,se=new t.Vector3,G=2*Math.PI;return function(Yn=null){const en=e.object.position;o.copy(en).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&ue(It(Yn)),e.enableDamping?(l.theta+=d.theta*e.dampingFactor,l.phi+=d.phi*e.dampingFactor):(l.theta+=d.theta,l.phi+=d.phi);let $=e.minAzimuthAngle,J=e.maxAzimuthAngle;isFinite($)&&isFinite(J)&&($<-Math.PI?$+=G:$>Math.PI&&($-=G),J<-Math.PI?J+=G:J>Math.PI&&(J-=G),$<=J?l.theta=Math.max($,Math.min(J,l.theta)):l.theta=l.theta>($+J)/2?Math.max($,l.theta):Math.min(J,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);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=ie(l.radius);else{const ee=l.radius;l.radius=ie(l.radius*p),Xe=ee!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),en.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(d.theta*=1-e.dampingFactor,d.phi*=1-e.dampingFactor,f.multiplyScalar(1-e.dampingFactor)):(d.set(0,0,0),f.set(0,0,0)),e.zoomToCursor&&ve){let ee=null;if(e.object.isPerspectiveCamera){const Ze=o.length();ee=ie(Ze*p);const ft=Ze-ee;e.object.position.addScaledVector(W,ft),e.object.updateMatrixWorld(),Xe=!!ft}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(j.x,j.y,0);Ze.unproject(e.object);const ft=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=ft!==e.object.zoom;const tn=new t.Vector3(j.x,j.y,0);tn.unproject(e.object),e.object.position.sub(tn).add(Ze),e.object.updateMatrixWorld(),ee=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;ee!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(ee).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))<oo?n.lookAt(e.target):(cn.setFromNormalAndCoplanarPoint(e.object.up,e.target),yt.intersectPlane(cn,e.target))))}else if(e.object.isOrthographicCamera){const ee=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),ee!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||S.distanceToSquared(e.object.position)>i||8*(1-z.dot(e.object.quaternion))>i||se.distanceToSquared(e.target)>i?(e.dispatchEvent(an),S.copy(e.object.position),z.copy(e.object.quaternion),se.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$t),e.domElement.removeEventListener("pointerdown",qt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",Ut),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Bt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Lt),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,d=new t.Spherical;let p=1;const f=new t.Vector3,w=new t.Vector2,A=new t.Vector2,B=new t.Vector2,X=new t.Vector2,L=new t.Vector2,C=new t.Vector2,O=new t.Vector2,v=new t.Vector2,T=new t.Vector2,W=new t.Vector3,j=new t.Vector2;let ve=!1;const _=[],me={};let ze=!1;function It(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function ue(o){d.theta-=o}function _e(o){d.phi-=o}const Z=function(){const o=new t.Vector3;return function(b,S){o.setFromMatrixColumn(S,0),o.multiplyScalar(-b),f.add(o)}}(),H=function(){const o=new t.Vector3;return function(b,S){e.screenSpacePanning===!0?o.setFromMatrixColumn(S,1):(o.setFromMatrixColumn(S,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),f.add(o)}}(),Q=function(){const o=new t.Vector3;return function(b,S){const z=e.domElement;if(e.object.isPerspectiveCamera){const se=e.object.position;o.copy(se).sub(e.target);let G=o.length();G*=Math.tan(e.object.fov/2*Math.PI/180),Z(2*b*G/z.clientHeight,e.object.matrix),H(2*S*G/z.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(Z(b*(e.object.right-e.object.left)/e.object.zoom/z.clientWidth,e.object.matrix),H(S*(e.object.top-e.object.bottom)/e.object.zoom/z.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function Y(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function K(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function I(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),S=o-b.left,z=h-b.top,se=b.width,G=b.height;j.x=S/se*2-1,j.y=-(z/G)*2+1,W.set(j.x,j.y,1).unproject(e.object).sub(e.object.position).normalize()}function ie(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function de(o){w.set(o.clientX,o.clientY)}function Ie(o){I(o.clientX,o.clientX),O.set(o.clientX,o.clientY)}function ut(o){X.set(o.clientX,o.clientY)}function dt(o){A.set(o.clientX,o.clientY),B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A),e.update()}function Pn(o){v.set(o.clientX,o.clientY),T.subVectors(v,O),T.y>0?Y(Te(T.y)):T.y<0&&K(Te(T.y)),O.copy(v),e.update()}function xn(o){L.set(o.clientX,o.clientY),C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L),e.update()}function vn(o){I(o.clientX,o.clientY),o.deltaY<0?K(Te(o.deltaY)):o.deltaY>0&&Y(Te(o.deltaY)),e.update()}function Tn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?ue(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?ue(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Xt(o){if(_.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);w.set(b,S)}}function Zt(o){if(_.length===1)X.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);X.set(b,S)}}function Gt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);O.set(0,z)}function _n(o){e.enableZoom&&Gt(o),e.enablePan&&Zt(o)}function In(o){e.enableZoom&&Gt(o),e.enableRotate&&Xt(o)}function Ft(o){if(_.length==1)A.set(o.pageX,o.pageY);else{const b=Ae(o),S=.5*(o.pageX+b.x),z=.5*(o.pageY+b.y);A.set(S,z)}B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A)}function Vt(o){if(_.length===1)L.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);L.set(b,S)}C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L)}function Qt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);v.set(0,z),T.set(0,Math.pow(v.y/O.y,e.zoomSpeed)),Y(T.y),O.copy(v);const se=(o.pageX+h.x)*.5,G=(o.pageY+h.y)*.5;I(se,G)}function An(o){e.enableZoom&&Qt(o),e.enablePan&&Vt(o)}function Ln(o){e.enableZoom&&Qt(o),e.enableRotate&&Ft(o)}function qt(o){e.enabled!==!1&&(_.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",At),e.domElement.addEventListener("pointerup",Ne)),!Hn(o)&&(kn(o),o.pointerType==="touch"?Kt(o):On(o)))}function At(o){e.enabled!==!1&&(o.pointerType==="touch"?jn(o):Dn(o))}function Ne(o){switch(Rn(o),_.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent(rn),c=r.NONE;break;case 1:const h=_[0],b=me[h];Kt({pointerId:h,pageX:b.x,pageY:b.y});break}}function On(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ut(o),c=r.PAN}else{if(e.enableRotate===!1)return;de(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;de(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ut(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function Dn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;dt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;Pn(o);break;case r.PAN:if(e.enablePan===!1)return;xn(o);break}}function Ut(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(Ct),vn(Cn(o)),e.dispatchEvent(rn))}function Cn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Bt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Wt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Lt(o){e.enabled===!1||e.enablePan===!1||Tn(o)}function Kt(o){switch(Jt(o),_.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Xt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Zt(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;_n(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;In(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function jn(o){switch(Jt(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;Ft(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Vt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;An(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ln(o),e.update();break;default:c=r.NONE}}function $t(o){e.enabled!==!1&&o.preventDefault()}function kn(o){_.push(o.pointerId)}function Rn(o){delete me[o.pointerId];for(let h=0;h<_.length;h++)if(_[h]==o.pointerId){_.splice(h,1);return}}function Hn(o){for(let h=0;h<_.length;h++)if(_[h]==o.pointerId)return!0;return!1}function Jt(o){let h=me[o.pointerId];h===void 0&&(h=new t.Vector2,me[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===_[0]?_[1]:_[0];return me[h]}e.domElement.addEventListener("contextmenu",$t),e.domElement.addEventListener("pointerdown",qt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",Ut,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Bt,{passive:!0,capture:!0}),this.update()}}const ye=new t.Raycaster,R=new t.Vector3,re=new t.Vector3,x=new t.Quaternion,ln={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},jt={type:"change"},hn={type:"mouseDown",mode:null},pn={type:"mouseUp",mode:null},mn={type:"objectChange"};class so extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new po;this._gizmo=e,this.add(e);const r=new mo;this._plane=r,this.add(r);const c=this;function i(v,T){let W=T;Object.defineProperty(c,v,{get:function(){return W!==void 0?W:T},set:function(j){W!==j&&(W=j,r[v]=j,e[v]=j,c.dispatchEvent({type:v+"-changed",value:j}),c.dispatchEvent(jt))}}),c[v]=T,r[v]=T,e[v]=T}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);const l=new t.Vector3,d=new t.Vector3,p=new t.Quaternion,f=new t.Quaternion,w=new t.Vector3,A=new t.Quaternion,B=new t.Vector3,X=new t.Vector3,L=new t.Vector3,C=0,O=new t.Vector3;i("worldPosition",l),i("worldPositionStart",d),i("worldQuaternion",p),i("worldQuaternionStart",f),i("cameraPosition",w),i("cameraQuaternion",A),i("pointStart",B),i("pointEnd",X),i("rotationAxis",L),i("rotationAngle",C),i("eye",O),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=ao.bind(this),this._onPointerDown=co.bind(this),this._onPointerHover=ro.bind(this),this._onPointerMove=lo.bind(this),this._onPointerUp=ho.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){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)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._gizmo.picker[this.mode],ye);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._plane,ye,!0);a&&(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(a.point).sub(this.worldPositionStart)),this.dragging=!0,hn.mode=this.mode,this.dispatchEvent(hn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&ye.setFromCamera(n,this.camera);const i=kt(this._plane,ye,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(x.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(R.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(R.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),re.set(l,l,l)}else R.copy(this.pointStart),re.copy(this.pointEnd),R.applyQuaternion(this._worldQuaternionInv),re.applyQuaternion(this._worldQuaternionInv),re.divide(R),a.search("X")===-1&&(re.x=1),a.search("Y")===-1&&(re.y=1),a.search("Z")===-1&&(re.z=1);r.scale.copy(this._scaleStart).multiply(re),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(R.setFromMatrixPosition(this.camera.matrixWorld));let d=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(R.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(ln[a]),R.copy(ln[a]),c==="local"&&R.applyQuaternion(this.worldQuaternion),R.cross(this.eye),R.length()===0?d=!0:this.rotationAngle=this._offset.dot(R.normalize())*l),(a==="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),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(jt),this.dispatchEvent(mn)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(pn.mode=this.mode,this.dispatchEvent(pn)),this.dragging=!1,this.axis=null)}dispose(){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){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(jt),this.dispatchEvent(mn),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ye}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function ao(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function ro(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function co(m){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)))}function lo(m){this.enabled&&this.pointerMove(this._getPointer(m))}function ho(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function kt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const bt=new t.Euler,E=new t.Vector3(0,1,0),un=new t.Vector3(0,0,0),dn=new t.Matrix4,wt=new t.Quaternion,Et=new t.Quaternion,U=new t.Vector3,fn=new t.Matrix4,Ve=new t.Vector3(1,0,0),ge=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),gt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class po extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const d=n.clone();d.color.setHex(16711680),d.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const f=n.clone();f.color.setHex(255),f.opacity=.5;const w=n.clone();w.opacity=.25;const A=n.clone();A.color.setHex(16776960),A.opacity=.25,n.clone().color.setHex(16776960);const X=n.clone();X.color.setHex(7895160);const L=new t.CylinderGeometry(0,.04,.1,12);L.translate(0,.05,0);const C=new t.BoxGeometry(.08,.08,.08);C.translate(0,.04,0);const O=new t.BufferGeometry;O.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const v=new t.CylinderGeometry(.0075,.0075,.5,3);v.translate(0,.25,0);function T(H,Q){const Y=new t.TorusGeometry(H,.0075,3,64,Q*Math.PI*2);return Y.rotateY(Math.PI/2),Y.rotateX(Math.PI/2),Y}function W(){const H=new t.BufferGeometry;return H.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),H}const j={X:[[new t.Mesh(L,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(L,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(L,i),[0,.5,0]],[new t.Mesh(L,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(v,i)]],Z:[[new t.Mesh(L,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(L,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(v,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},_={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(W(),r),null,null,null,"helper"]],X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},me={XYZE:[[new t.Mesh(T(.5,1),X),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(T(.5,.5),c)]],Y:[[new t.Mesh(T(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(T(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(T(.75,1),A),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},It={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(C,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(C,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(C,i),[0,.5,0]],[new t.Mesh(v,i)],[new t.Mesh(C,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(C,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(v,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(C,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},ue={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Z(H){const Q=new t.Object3D;for(const Y in H)for(let K=H[Y].length;K--;){const I=H[Y][K][0].clone(),ie=H[Y][K][1],de=H[Y][K][2],Ie=H[Y][K][3],ut=H[Y][K][4];I.name=Y,I.tag=ut,ie&&I.position.set(ie[0],ie[1],ie[2]),de&&I.rotation.set(de[0],de[1],de[2]),Ie&&I.scale.set(Ie[0],Ie[1],Ie[2]),I.updateMatrix();const dt=I.geometry.clone();dt.applyMatrix4(I.matrix),I.geometry=dt,I.renderOrder=1/0,I.position.set(0,0,0),I.rotation.set(0,0,0),I.scale.set(1,1,1),Q.add(I)}return Q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Z(j)),this.add(this.gizmo.rotate=Z(me)),this.add(this.gizmo.scale=Z(Te)),this.add(this.picker.translate=Z(ve)),this.add(this.picker.rotate=Z(It)),this.add(this.picker.scale=Z(ue)),this.add(this.helper.translate=Z(_)),this.add(this.helper.rotate=Z(ze)),this.add(this.helper.scale=Z(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Et;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";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;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"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(x.setFromEuler(bt.set(0,0,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(x.setFromEuler(bt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),E.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(dn.lookAt(un,E,ge)),i.quaternion.multiply(x),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),R.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),R.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(R),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));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(wt.copy(e),E.copy(this.eye).applyQuaternion(x.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(dn.lookAt(this.eye,un,ge)),i.name==="X"&&(x.setFromAxisAngle(Ve,Math.atan2(-E.y,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Y"&&(x.setFromAxisAngle(ge,Math.atan2(E.x,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Z"&&(x.setFromAxisAngle(Qe,Math.atan2(E.y,E.x)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x))),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){return i.name===d}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class mo extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),gt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:Et),Ge.copy(ge).applyQuaternion(a==="local"?this.worldQuaternion:Et),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:Et),E.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":E.copy(this.eye).cross(gt),U.copy(gt).cross(E);break;case"Y":E.copy(this.eye).cross(Ge),U.copy(Ge).cross(E);break;case"Z":E.copy(this.eye).cross(Fe),U.copy(Fe).cross(E);break;case"XY":U.copy(Fe);break;case"YZ":U.copy(gt);break;case"XZ":E.copy(Fe),U.copy(Ge);break;case"XYZ":case"E":U.set(0,0,0);break}break;case"rotate":default:U.set(0,0,0)}U.length()===0?this.quaternion.copy(this.cameraQuaternion):(fn.lookAt(R.set(0,0,0),U,E),this.quaternion.setFromRotationMatrix(fn)),super.updateMatrixWorld(n)}}var F,Pe;class uo{constructor(){u(this,F,void 0);u(this,Pe,void 0);P(this,F,new io(y.en3.camera,y.en3.webglRenderer.domElement)),P(this,Pe,new N.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Pe).subscribe(a=>{s(this,F).target.set(...a.current),n&&s(this,F).update()}),s(this,F).addEventListener("change",()=>{n=!1,s(this,Pe).current=[s(this,F).target.x,s(this,F).target.y,s(this,F).target.z],n=!0})}get controls(){return s(this,F)}destroy(){s(this,F).dispose(),s(this,Pe).close()}}F=new WeakMap,Pe=new WeakMap;var k,Ke,$e,Je,et,tt,nt,ot,it;class fo{constructor(){u(this,k,null);u(this,Ke,new N.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));u(this,$e,new N.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));u(this,Je,new N.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));u(this,et,new N.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));u(this,tt,new N.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));u(this,nt,new N.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));u(this,ot,void 0);u(this,it,n=>{n.key==="g"&&(s(this,k).visible=!s(this,k).visible)});P(this,ot,new Gn.Composed([s(this,Ke),s(this,$e),s(this,Je),s(this,et),s(this,tt),s(this,nt)],()=>{s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),P(this,k,new t.GridHelper(s(this,Ke).current,s(this,$e).current,s(this,Je).current,s(this,et).current)),s(this,k).rotation.x=s(this,tt).current?Math.PI/2:0,s(this,k).visible=s(this,nt).current,y.en3.view.add(s(this,k))})),addEventListener("keydown",s(this,it))}get helper(){return s(this,k)}destroy(){s(this,ot).close(),s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),removeEventListener("keydown",s(this,it))}}k=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,it=new WeakMap;var D,V,le,he,st,De,at,rt,Yt;class yo{constructor(){u(this,rt);u(this,D,void 0);u(this,V,[]);u(this,le,null);u(this,he,n=>{if(n.child.name.startsWith("T.")&&!s(this,V).find(a=>a.object3d===n.child)){const a=new Nt(n.child);s(this,V).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,he))}});u(this,st,n=>{const a=M(this,rt,Yt).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,he)),P(this,V,s(this,V).filter(e=>e!==a)))});u(this,De,n=>{const a=M(this,rt,Yt).call(this,n.target);a&&(P(this,le,s(this,V).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,le)&&s(this,D).attach(s(this,le).object3d))});u(this,at,n=>{n.key==="t"?s(this,D).setMode("translate"):n.key==="r"?s(this,D).setMode("rotate"):n.key==="s"?s(this,D).setMode("scale"):n.key==="Escape"?s(this,D).detach():n.key==="+"||n.key==="="?s(this,D).setSize(s(this,D).size+.1):n.key==="-"||n.key==="_"?s(this,D).setSize(s(this,D).size-.1):n.key==="h"&&s(this,V).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});P(this,D,new so(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,D).addEventListener("objectChange",n=>{s(this,le)&&s(this,le).save()}),y.en3.view.add(s(this,D)),y.en3.scene.addEventListener("childadded",s(this,he)),y.en3.scene.addEventListener("childremoved",s(this,st)),window.addEventListener("keydown",s(this,at))}get controls(){return s(this,D)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,he)),y.en3.scene.removeEventListener("childremoved",s(this,st)),window.removeEventListener("keydown",s(this,at)),s(this,D).dispose(),s(this,V).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,he)),n.destroy()}),P(this,V,[])}}D=new WeakMap,V=new WeakMap,le=new WeakMap,he=new WeakMap,st=new WeakMap,De=new WeakMap,at=new WeakMap,rt=new WeakSet,Yt=function(n){return s(this,V).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,ct,zt,_t,Sn;class bo{constructor(){u(this,ct);u(this,_t);u(this,Ce,void 0);u(this,je,void 0);u(this,ke,void 0);u(this,Re,[]);P(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,Ce).call(this,...n)},P(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{M(this,_t,Sn).call(this,n[0]),s(this,je).call(this,...n)},P(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,ct=new WeakSet,zt=function(n){s(this,Re).push(new pe(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new pe(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},_t=new WeakSet,Sn=function(n){};var lt,ht,pt,mt,He,xe,Ye;class wo{constructor(){u(this,lt,void 0);u(this,ht,void 0);u(this,pt,null);u(this,mt,void 0);u(this,He,void 0);u(this,xe,void 0);u(this,Ye,void 0);P(this,lt,new pe(y.en3.webglRenderer,{folderName:"Renderer"})),P(this,ht,new pe(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Fn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&P(this,pt,new bo),P(this,mt,new fo),P(this,He,new Nt(y.en3.camera)),P(this,xe,new uo),s(this,xe).controls.addEventListener("change",()=>{s(this,He).save()}),P(this,Ye,new yo),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,xe).controls.enabled=!n.value})}destroy(){var n;s(this,lt).destroy(),s(this,ht).destroy(),(n=s(this,pt))==null||n.destroy(),s(this,mt).destroy(),s(this,He).destroy(),s(this,xe).destroy(),s(this,Ye).destroy()}}lt=new WeakMap,ht=new WeakMap,pt=new WeakMap,mt=new WeakMap,He=new WeakMap,xe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=wo;exports.En3Object3dManager=Nt;
|
package/lib/en3/helpers/index.js
CHANGED
|
@@ -20,12 +20,12 @@ var s = (m, t, o) => (Xt(m, t, "read from private field"), o ? o.call(m) : t.get
|
|
|
20
20
|
}, x = (m, t, o, e) => (Xt(m, t, "write to private field"), e ? e.call(m, o) : t.set(m, o), o);
|
|
21
21
|
var P = (m, t, o) => (Xt(m, t, "access private method"), o);
|
|
22
22
|
import { e as b } from "../../en3-THFHEReu.js";
|
|
23
|
-
import { S as Z } from "../../Store-
|
|
23
|
+
import { S as Z } from "../../Store-Dsft7GtM.js";
|
|
24
24
|
import * as Pe from "three";
|
|
25
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
26
|
import { a as Ti } from "../../object-D6MVWB4l.js";
|
|
27
27
|
import { ticker as En } from "../../ticker/index.js";
|
|
28
|
-
import { C as Ii } from "../../Composed-
|
|
28
|
+
import { C as Ii } from "../../Composed-pnupzTOv.js";
|
|
29
29
|
import { t as Ai } from "../../traverseMaterials-BKSwwNmo.js";
|
|
30
30
|
const Li = [
|
|
31
31
|
"AddEquation",
|
package/lib/en3/misc/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var D=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);var L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),y=require("../../SourceManager-
|
|
1
|
+
"use strict";var D=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);var L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),y=require("../../SourceManager-DYnGpBi1.cjs"),b=require("../../Store-kzJycezD.cjs");var u,l,v,k;class z{constructor(e){s(this,v);s(this,u,void 0);s(this,l,void 0);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
|
|
2
2
|
${e.vertextDeclarations}
|
|
3
3
|
${n.vertexShader}
|
|
4
4
|
`),e.fragmentDeclarations&&(n.fragmentShader=`
|
package/lib/en3/misc/index.js
CHANGED
|
@@ -9,8 +9,8 @@ var e = (o, i, t) => (m(o, i, "read from private field"), t ? t.call(o) : i.get(
|
|
|
9
9
|
}, c = (o, i, t, s) => (m(o, i, "write to private field"), s ? s.call(o, t) : i.set(o, t), t);
|
|
10
10
|
var L = (o, i, t) => (m(o, i, "access private method"), t);
|
|
11
11
|
import { loading as $ } from "../../loading/index.js";
|
|
12
|
-
import { S as z } from "../../SourceManager
|
|
13
|
-
import { S as R } from "../../Store-
|
|
12
|
+
import { S as z } from "../../SourceManager-CmhlHGx7.js";
|
|
13
|
+
import { S as R } from "../../Store-Dsft7GtM.js";
|
|
14
14
|
var h, u, S, k;
|
|
15
15
|
class b {
|
|
16
16
|
constructor(i) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CustomElement } from '../../../custom-element';
|
|
2
1
|
import { En3Fluid } from './En3Fluid';
|
|
3
2
|
|
|
4
|
-
export declare class En3FluidElement extends
|
|
3
|
+
export declare class En3FluidElement extends HTMLElement {
|
|
5
4
|
#private;
|
|
6
5
|
get fluid(): En3Fluid;
|
|
7
6
|
protected connectedCallback(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t={value:null},n={value:null},e={value:[]};exports.contextStack=e;exports.currentComponentElement=t;exports.nextComponentAttributes=n;
|
package/lib/image/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-kzJycezD.cjs");const r=require("../source/index.cjs");class e extends r.SourceElement{createConsumer(){return document.createElement("img")}consumeSource(t){this.consumerElement.src=t||""}}customElements.get("e-image")||customElements.define("e-image",e);exports.ImageElement=e;
|
package/lib/image/index.js
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import { define as p } from "../custom-element/index.js";
|
|
2
1
|
import "../window-resizer/index.js";
|
|
3
|
-
import "../Store-
|
|
4
|
-
import { SourceElement as
|
|
5
|
-
|
|
6
|
-
for (var e = m > 1 ? void 0 : m ? f(t, o) : t, n = r.length - 1, s; n >= 0; n--)
|
|
7
|
-
(s = r[n]) && (e = (m ? s(t, o, e) : s(e)) || e);
|
|
8
|
-
return m && e && u(t, o, e), e;
|
|
9
|
-
};
|
|
10
|
-
let c = class extends l {
|
|
2
|
+
import "../Store-Dsft7GtM.js";
|
|
3
|
+
import { SourceElement as m } from "../source/index.js";
|
|
4
|
+
class t extends m {
|
|
11
5
|
createConsumer() {
|
|
12
6
|
return document.createElement("img");
|
|
13
7
|
}
|
|
14
|
-
consumeSource(
|
|
15
|
-
this.consumerElement.src =
|
|
8
|
+
consumeSource(e) {
|
|
9
|
+
this.consumerElement.src = e || "";
|
|
16
10
|
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
p("e-image")
|
|
20
|
-
], c);
|
|
11
|
+
}
|
|
12
|
+
customElements.get("e-image") || customElements.define("e-image", t);
|
|
21
13
|
export {
|
|
22
|
-
|
|
14
|
+
t as ImageElement
|
|
23
15
|
};
|