aptechka 0.5.40 → 0.5.42
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-DDHjrbtL.cjs +1 -0
- package/lib/{Animation-AkD1vhRW.js → Animation-Dq_05jlR.js} +16 -16
- package/lib/{Damped-CH96byE8.js → Damped-P4MkCGoY.js} +4 -5
- package/lib/Damped-l0mnlhar.cjs +1 -0
- package/lib/{Tweened-DzckT3pw.js → Tweened-CwDC2zl8.js} +9 -10
- package/lib/Tweened-DIt9j9B-.cjs +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +29 -29
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +125 -114
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +1 -1
- package/lib/{index-BAHHdcp3.js → index-BtsOv9u0.js} +85 -85
- package/lib/index-Buf76Qoq.cjs +9 -0
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +30 -30
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/polyfills-BA-CL_HF.js +27 -0
- package/lib/polyfills-DHs2SNbz.cjs +1 -0
- package/lib/scroll/ScrollElement.d.ts +16 -5
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +538 -494
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.d.ts +9 -84
- package/lib/theme/index.js +12 -27
- package/lib/tweaker/index.cjs +6 -6
- package/lib/tweaker/index.js +207 -199
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +26 -27
- package/package.json +1 -1
- package/lib/Animation-BIRIzLIL.cjs +0 -1
- package/lib/Damped-3daHRLIW.cjs +0 -1
- package/lib/Tweened-Bv9mgPvl.cjs +0 -1
- package/lib/index-D2XtQX56.cjs +0 -9
- package/lib/number-Bo5RdrA1.js +0 -23
- package/lib/number-yVpzMdbQ.cjs +0 -1
- package/lib/polyfills-CrcS4RcO.cjs +0 -1
- package/lib/polyfills-DJUYczFm.js +0 -6
package/lib/controls/index.js
CHANGED
|
@@ -1,202 +1,213 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
1
|
+
var S = (a, n, e) => {
|
|
2
|
+
if (!n.has(a))
|
|
3
3
|
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var t = (a,
|
|
6
|
-
if (
|
|
5
|
+
var t = (a, n, e) => (S(a, n, "read from private field"), e ? e.call(a) : n.get(a)), s = (a, n, e) => {
|
|
6
|
+
if (n.has(a))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
}, i = (a,
|
|
10
|
-
|
|
8
|
+
n instanceof WeakSet ? n.add(a) : n.set(a, e);
|
|
9
|
+
}, i = (a, n, e, r) => (S(a, n, "write to private field"), r ? r.call(a, e) : n.set(a, e), e);
|
|
10
|
+
var L = (a, n, e) => (S(a, n, "access private method"), e);
|
|
11
|
+
import { Notifier as j } from "../notifier/index.js";
|
|
11
12
|
import { i as m } from "../browser-0zX67oeU.js";
|
|
12
|
-
import { g as
|
|
13
|
-
import { ticker as
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
import { g as Q } from "../dom-0S_WDL4g.js";
|
|
14
|
+
import { ticker as M } from "../ticker/index.js";
|
|
15
|
+
import "../Store-BQXXikps.js";
|
|
16
|
+
import { e as G } from "../easings-BKi40vHz.js";
|
|
17
|
+
import { T as J } from "../Tweened-CwDC2zl8.js";
|
|
18
|
+
import { s as Z } from "../gestures-D2Fdra_G.js";
|
|
19
|
+
import { p as $ } from "../polyfills-BA-CL_HF.js";
|
|
20
|
+
import { TICK_ORDER as p } from "../order/index.js";
|
|
21
|
+
var B;
|
|
22
|
+
class F {
|
|
19
23
|
constructor() {
|
|
20
|
-
s(this,
|
|
24
|
+
s(this, B, new j());
|
|
21
25
|
}
|
|
22
26
|
get changeEvent() {
|
|
23
|
-
return t(this,
|
|
27
|
+
return t(this, B);
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
class
|
|
30
|
+
B = new WeakMap();
|
|
31
|
+
var w, c, f, P;
|
|
32
|
+
class ce extends F {
|
|
29
33
|
constructor(e) {
|
|
30
34
|
super();
|
|
31
|
-
s(this,
|
|
32
|
-
s(this,
|
|
33
|
-
s(this,
|
|
34
|
-
s(this,
|
|
35
|
-
const
|
|
35
|
+
s(this, w, null);
|
|
36
|
+
s(this, c, null);
|
|
37
|
+
s(this, f, "offsetHeight");
|
|
38
|
+
s(this, P, (e) => {
|
|
39
|
+
const r = e.shiftKey ? -1 : 1;
|
|
36
40
|
let h;
|
|
37
|
-
e.code === "Space" ? h =
|
|
41
|
+
e.code === "Space" ? h = r * t(this, c)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? h = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? h = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? h = -1 * t(this, c)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? h = 1 * t(this, c)[t(this, f)] * 0.2 : e.code === "PageUp" ? h = -1 * t(this, c)[t(this, f)] : e.code === "PageDown" ? h = 1 * t(this, c)[t(this, f)] : e.code === "Home" ? h = 0 : e.code === "End" && (h = t(this, f) === "offsetWidth" ? t(this, c).scrollWidth : t(this, c).scrollHeight), h && (e.stopPropagation(), this.changeEvent.notify("keyboard", h));
|
|
38
42
|
});
|
|
39
|
-
m && (i(this,
|
|
43
|
+
m && (i(this, w, e != null && e.element && Q(e.element) || window), i(this, c, t(this, w) instanceof HTMLElement ? t(this, w) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
|
|
40
44
|
}
|
|
41
45
|
set dimension(e) {
|
|
42
|
-
i(this,
|
|
46
|
+
i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
|
|
43
47
|
}
|
|
44
48
|
connect() {
|
|
45
|
-
m && t(this,
|
|
49
|
+
m && t(this, w).addEventListener(
|
|
46
50
|
"keydown",
|
|
47
|
-
t(this,
|
|
51
|
+
t(this, P)
|
|
48
52
|
);
|
|
49
53
|
}
|
|
50
54
|
disconnect() {
|
|
51
|
-
m && t(this,
|
|
55
|
+
m && t(this, w).removeEventListener(
|
|
52
56
|
"keydown",
|
|
53
|
-
t(this,
|
|
57
|
+
t(this, P)
|
|
54
58
|
);
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
|
|
58
|
-
var b,
|
|
59
|
-
class
|
|
61
|
+
w = new WeakMap(), c = new WeakMap(), f = new WeakMap(), P = new WeakMap();
|
|
62
|
+
var b, E, X, Y, l, I, u, T, q, R, U, k, W, C;
|
|
63
|
+
class fe extends F {
|
|
60
64
|
constructor(e) {
|
|
61
65
|
super();
|
|
66
|
+
s(this, T);
|
|
67
|
+
s(this, R);
|
|
62
68
|
s(this, b, void 0);
|
|
63
|
-
s(this,
|
|
64
|
-
s(this,
|
|
65
|
-
s(this,
|
|
66
|
-
s(this,
|
|
67
|
-
s(this,
|
|
68
|
-
s(this,
|
|
69
|
-
s(this, P, void 0);
|
|
69
|
+
s(this, E, void 0);
|
|
70
|
+
s(this, X, void 0);
|
|
71
|
+
s(this, Y, void 0);
|
|
72
|
+
s(this, l, void 0);
|
|
73
|
+
s(this, I, void 0);
|
|
74
|
+
s(this, u, void 0);
|
|
70
75
|
s(this, k, void 0);
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
s(this, W, void 0);
|
|
77
|
+
s(this, C, void 0);
|
|
78
|
+
this.direction = 1, i(this, l, new J(0, { easing: G })), i(this, u, !1), i(this, k, (r) => {
|
|
79
|
+
t(this, l).current !== 1 && this.changeEvent.notify(
|
|
73
80
|
"autoplay",
|
|
74
|
-
|
|
81
|
+
r.timeBetweenFrames * t(this, b) * this.direction * (1 - t(this, l).current)
|
|
75
82
|
);
|
|
76
|
-
}), i(this,
|
|
77
|
-
t(this,
|
|
83
|
+
}), i(this, W, () => {
|
|
84
|
+
t(this, l).current !== 1 && this.changeEvent.notify(
|
|
78
85
|
"autoplay",
|
|
79
|
-
Math.sign(t(this, b)) * this.direction
|
|
86
|
+
Math.sign(t(this, b)) * this.direction * (1 - t(this, l).current)
|
|
80
87
|
);
|
|
81
|
-
}), i(this,
|
|
82
|
-
t(this,
|
|
83
|
-
}), i(this, b, (e == null ? void 0 : e.speed) || 1), i(this,
|
|
88
|
+
}), i(this, C, () => {
|
|
89
|
+
t(this, E) && (document.hidden ? t(this, l).set(1, { equalize: !0 }) : t(this, l).set(0, { equalize: !0 }));
|
|
90
|
+
}), i(this, b, (e == null ? void 0 : e.speed) || 1), i(this, E, (e == null ? void 0 : e.interval) || !1), i(this, X, e);
|
|
84
91
|
}
|
|
85
92
|
set interval(e) {
|
|
86
|
-
i(this,
|
|
93
|
+
i(this, E, e), t(this, u) && L(this, T, q).call(this);
|
|
87
94
|
}
|
|
88
95
|
set speed(e) {
|
|
89
|
-
i(this, b, e), this.
|
|
96
|
+
i(this, b, e), t(this, u) && L(this, T, q).call(this);
|
|
90
97
|
}
|
|
91
98
|
connect() {
|
|
92
|
-
|
|
93
|
-
t(this, P),
|
|
94
|
-
Math.abs(t(this, b))
|
|
95
|
-
)) : x.subscribe(t(this, M), t(this, D)), document.addEventListener(
|
|
96
|
-
"visibilitychange",
|
|
97
|
-
t(this, k)
|
|
98
|
-
);
|
|
99
|
+
t(this, u) || (i(this, u, !0), L(this, T, q).call(this));
|
|
99
100
|
}
|
|
100
101
|
disconnect() {
|
|
101
|
-
|
|
102
|
-
"visibilitychange",
|
|
103
|
-
t(this, k)
|
|
104
|
-
);
|
|
102
|
+
t(this, u) && (i(this, u, !1), L(this, R, U).call(this));
|
|
105
103
|
}
|
|
106
104
|
pauseAndContinue(e) {
|
|
107
|
-
e && !t(this,
|
|
108
|
-
|
|
109
|
-
},
|
|
105
|
+
e && !t(this, l).target && (clearInterval(t(this, I)), t(this, l).set(1, { duration: Math.min(e, 1e3) }), i(this, I, setTimeout(() => {
|
|
106
|
+
t(this, l).set(0, { duration: Math.min(e, 5e3) });
|
|
107
|
+
}, e)));
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
|
-
b = new WeakMap(),
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
b = new WeakMap(), E = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), l = new WeakMap(), I = new WeakMap(), u = new WeakMap(), T = new WeakSet(), q = function() {
|
|
111
|
+
L(this, R, U).call(this), t(this, E) ? i(this, Y, setInterval(
|
|
112
|
+
t(this, W),
|
|
113
|
+
Math.abs(t(this, b))
|
|
114
|
+
)) : M.subscribe(t(this, k), t(this, X)), document.addEventListener(
|
|
115
|
+
"visibilitychange",
|
|
116
|
+
t(this, C)
|
|
117
|
+
);
|
|
118
|
+
}, R = new WeakSet(), U = function() {
|
|
119
|
+
clearInterval(t(this, Y)), M.unsubscribe(t(this, k)), clearInterval(t(this, I)), t(this, l).close(), document.removeEventListener(
|
|
120
|
+
"visibilitychange",
|
|
121
|
+
t(this, C)
|
|
122
|
+
);
|
|
123
|
+
}, k = new WeakMap(), W = new WeakMap(), C = new WeakMap();
|
|
124
|
+
var A, y, D, z;
|
|
125
|
+
class ue extends F {
|
|
115
126
|
constructor(e) {
|
|
116
127
|
super();
|
|
117
|
-
s(this,
|
|
118
|
-
s(this,
|
|
119
|
-
s(this,
|
|
120
|
-
s(this,
|
|
121
|
-
let
|
|
128
|
+
s(this, A, null);
|
|
129
|
+
s(this, y, void 0);
|
|
130
|
+
s(this, D, void 0);
|
|
131
|
+
s(this, z, (e) => {
|
|
132
|
+
let r = 0;
|
|
122
133
|
if (e.preventDefault(), !(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 0.5 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 0.5))
|
|
123
|
-
if (
|
|
134
|
+
if (r = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), this.debounce) {
|
|
124
135
|
const h = Date.now();
|
|
125
|
-
if (h - t(this,
|
|
136
|
+
if (h - t(this, D) > 40 && (r = 100 * Math.sign(r)), i(this, D, h), Math.abs(r) < 100 || t(this, y))
|
|
126
137
|
return;
|
|
127
|
-
this.changeEvent.notify("wheel",
|
|
128
|
-
i(this,
|
|
138
|
+
this.changeEvent.notify("wheel", r), i(this, y, setTimeout(() => {
|
|
139
|
+
i(this, y, void 0);
|
|
129
140
|
}, 80));
|
|
130
141
|
} else
|
|
131
|
-
this.changeEvent.notify("wheel",
|
|
142
|
+
this.changeEvent.notify("wheel", r);
|
|
132
143
|
});
|
|
133
|
-
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this,
|
|
144
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, D, Date.now()), m && i(this, A, e != null && e.element && Q(e.element) || window);
|
|
134
145
|
}
|
|
135
146
|
connect() {
|
|
136
|
-
m && t(this,
|
|
147
|
+
m && t(this, A).addEventListener(
|
|
137
148
|
"wheel",
|
|
138
|
-
t(this,
|
|
149
|
+
t(this, z),
|
|
139
150
|
{
|
|
140
151
|
passive: !1
|
|
141
152
|
}
|
|
142
153
|
);
|
|
143
154
|
}
|
|
144
155
|
disconnect() {
|
|
145
|
-
m && (t(this,
|
|
156
|
+
m && (t(this, A).removeEventListener(
|
|
146
157
|
"wheel",
|
|
147
|
-
t(this,
|
|
148
|
-
), clearTimeout(t(this,
|
|
158
|
+
t(this, z)
|
|
159
|
+
), clearTimeout(t(this, y)));
|
|
149
160
|
}
|
|
150
161
|
}
|
|
151
|
-
|
|
152
|
-
var
|
|
153
|
-
const
|
|
162
|
+
A = new WeakMap(), y = new WeakMap(), D = new WeakMap(), z = new WeakMap();
|
|
163
|
+
var v, o, H, d, K, x;
|
|
164
|
+
const g = class g extends F {
|
|
154
165
|
constructor(e) {
|
|
155
166
|
super();
|
|
156
|
-
s(this,
|
|
157
|
-
s(this,
|
|
158
|
-
s(this,
|
|
159
|
-
s(this,
|
|
167
|
+
s(this, o, null);
|
|
168
|
+
s(this, H, !1);
|
|
169
|
+
s(this, d, 0);
|
|
170
|
+
s(this, K, (e) => {
|
|
160
171
|
if (e.composedPath().find(
|
|
161
172
|
(h) => h instanceof HTMLElement && h.hasAttribute("drag-dead-zone")
|
|
162
173
|
))
|
|
163
174
|
return;
|
|
164
|
-
this.swipe ||
|
|
165
|
-
let
|
|
166
|
-
i(this,
|
|
175
|
+
this.swipe || M.unsubscribe(t(this, x));
|
|
176
|
+
let r = e;
|
|
177
|
+
i(this, d, 0), document.documentElement.classList.add("grabbing"), Z(
|
|
167
178
|
(h) => {
|
|
168
|
-
if (t(this,
|
|
179
|
+
if (t(this, H) || t(g, v) && t(g, v) !== t(this, o))
|
|
169
180
|
return;
|
|
170
|
-
this.swipe && i(this,
|
|
171
|
-
const
|
|
172
|
-
this.axis === "x" ? i(this,
|
|
181
|
+
this.swipe && i(this, H, !0);
|
|
182
|
+
const N = r.x - h.x, O = r.y - h.y;
|
|
183
|
+
this.axis === "x" ? i(this, d, N) : i(this, d, O), r = h, (this.axis === "x" && Math.abs(N) > Math.abs(O) || this.axis === "y" && Math.abs(O) > Math.abs(N)) && (i(g, v, t(this, o)), this.changeEvent.notify("drag", t(this, d)));
|
|
173
184
|
},
|
|
174
185
|
() => {
|
|
175
|
-
i(
|
|
186
|
+
i(g, v, null), this.swipe || (i(this, d, t(this, d) * 3), M.subscribe(t(this, x), { order: p.SCROLL - 1 })), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
|
|
176
187
|
}
|
|
177
188
|
);
|
|
178
189
|
});
|
|
179
|
-
s(this,
|
|
180
|
-
Math.floor(t(this,
|
|
190
|
+
s(this, x, () => {
|
|
191
|
+
Math.floor(t(this, d)) || M.unsubscribe(t(this, x)), i(this, d, t(this, d) * 0.95), i(this, d, $(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
|
|
181
192
|
});
|
|
182
|
-
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this,
|
|
193
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, o, e != null && e.element && Q(e.element) || document.documentElement);
|
|
183
194
|
}
|
|
184
195
|
connect() {
|
|
185
|
-
m && t(this,
|
|
196
|
+
m && t(this, o).addEventListener("pointerdown", t(this, K));
|
|
186
197
|
}
|
|
187
198
|
disconnect() {
|
|
188
|
-
m && (t(this,
|
|
199
|
+
m && (t(this, o).removeEventListener(
|
|
189
200
|
"pointerdown",
|
|
190
|
-
t(this,
|
|
191
|
-
),
|
|
201
|
+
t(this, K)
|
|
202
|
+
), M.unsubscribe(t(this, x)));
|
|
192
203
|
}
|
|
193
204
|
};
|
|
194
|
-
|
|
195
|
-
let
|
|
205
|
+
v = new WeakMap(), o = new WeakMap(), H = new WeakMap(), d = new WeakMap(), K = new WeakMap(), x = new WeakMap(), s(g, v, null);
|
|
206
|
+
let V = g;
|
|
196
207
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
208
|
+
fe as AutoplayControls,
|
|
209
|
+
F as Controls,
|
|
210
|
+
V as DragControls,
|
|
211
|
+
ce as KeyboardControls,
|
|
212
|
+
ue as WheelControls
|
|
202
213
|
};
|
package/lib/en3/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Fs=Object.defineProperty,Gs=Object.defineProperties;var ms=Object.getOwnPropertyDescriptors;var bt=Object.getOwnPropertySymbols;var Rs=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable;var Nt=(C,A,e)=>A in C?Fs(C,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[A]=e,eA=(C,A)=>{for(var e in A||(A={}))Rs.call(A,e)&&Nt(C,e,A[e]);if(bt)for(var e of bt(A))ws.call(A,e)&&Nt(C,e,A[e]);return C},Fe=(C,A)=>Gs(C,ms(A));var at=(C,A,e)=>{if(!A.has(C))throw TypeError("Cannot "+e)};var o=(C,A,e)=>(at(C,A,"read from private field"),e?e.call(C):A.get(C)),d=(C,A,e)=>{if(A.has(C))throw TypeError("Cannot add the same private member more than once");A instanceof WeakSet?A.add(C):A.set(C,e)},D=(C,A,e,s)=>(at(C,A,"write to private field"),s?s.call(C,e):A.set(C,e),e);var tA=(C,A,e)=>(at(C,A,"access private method"),e);var YA=(C,A,e)=>new Promise((s,t)=>{var n=r=>{try{a(e.next(r))}catch(I){t(I)}},i=r=>{try{a(e.throw(r))}catch(I){t(I)}},a=r=>r.done?s(r.value):Promise.resolve(r.value).then(n,i);a((e=e.apply(C,A)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../order/index.cjs"),wA=require("../window-resizer/index.cjs"),yA=require("../ticker/index.cjs"),Zt=require("../dom-JBOkFLTh.cjs"),B=require("three"),mt=require("../layout-box/index.cjs"),Ct=require("../loading/index.cjs"),ys=require("../SourceManager-vSlsMKUE.cjs"),J=require("../Store-C-1ruEIm.cjs"),Ms=require("../easings-DsS5-Kqc.cjs"),Ss=require("../function-MthRj-GJ.cjs"),Ls=require("../Tweened-
|
|
1
|
+
"use strict";var Fs=Object.defineProperty,Gs=Object.defineProperties;var ms=Object.getOwnPropertyDescriptors;var bt=Object.getOwnPropertySymbols;var Rs=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable;var Nt=(C,A,e)=>A in C?Fs(C,A,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[A]=e,eA=(C,A)=>{for(var e in A||(A={}))Rs.call(A,e)&&Nt(C,e,A[e]);if(bt)for(var e of bt(A))ws.call(A,e)&&Nt(C,e,A[e]);return C},Fe=(C,A)=>Gs(C,ms(A));var at=(C,A,e)=>{if(!A.has(C))throw TypeError("Cannot "+e)};var o=(C,A,e)=>(at(C,A,"read from private field"),e?e.call(C):A.get(C)),d=(C,A,e)=>{if(A.has(C))throw TypeError("Cannot add the same private member more than once");A instanceof WeakSet?A.add(C):A.set(C,e)},D=(C,A,e,s)=>(at(C,A,"write to private field"),s?s.call(C,e):A.set(C,e),e);var tA=(C,A,e)=>(at(C,A,"access private method"),e);var YA=(C,A,e)=>new Promise((s,t)=>{var n=r=>{try{a(e.next(r))}catch(I){t(I)}},i=r=>{try{a(e.throw(r))}catch(I){t(I)}},a=r=>r.done?s(r.value):Promise.resolve(r.value).then(n,i);a((e=e.apply(C,A)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../order/index.cjs"),wA=require("../window-resizer/index.cjs"),yA=require("../ticker/index.cjs"),Zt=require("../dom-JBOkFLTh.cjs"),B=require("three"),mt=require("../layout-box/index.cjs"),Ct=require("../loading/index.cjs"),ys=require("../SourceManager-vSlsMKUE.cjs"),J=require("../Store-C-1ruEIm.cjs"),Ms=require("../easings-DsS5-Kqc.cjs"),Ss=require("../function-MthRj-GJ.cjs"),Ls=require("../Tweened-DIt9j9B-.cjs"),Ts=require("../Viewport-DMB0dO-s.cjs"),zt=require("../custom-element/index.cjs");function xs(C){const A=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(C){for(const e in C)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(C,e);Object.defineProperty(A,e,s.get?s:{enumerable:!0,get:()=>C[e]})}}return A.default=C,Object.freeze(A)}const It=xs(B);function vA(C){const A=e=>{e.dispose();for(const s of Object.keys(e)){const t=e[s];t&&typeof t=="object"&&"minFilter"in t&&t.dispose()}};C.traverse(e=>{if(e instanceof B.Mesh){if(e.geometry.dispose(),!Array.isArray(e.material)&&e.material.isMaterial)A(e.material);else if(Array.isArray(e.material))for(const s of e.material)A(s)}})}var ye,H,TA,EA,QA,XA,lA,hA;class Rt{constructor(A,e){d(this,ye,void 0);d(this,H,void 0);d(this,TA,void 0);d(this,EA,void 0);d(this,QA,void 0);d(this,XA,void 0);d(this,lA,void 0);d(this,hA,void 0);D(this,ye,A),D(this,H,(e==null?void 0:e.cameraType)==="orthographic"?new B.OrthographicCamera:new B.PerspectiveCamera),D(this,TA,new B.Scene),D(this,EA,[]),D(this,QA,(e==null?void 0:e.cameraDistance)||1e3),o(this,H).near=(e==null?void 0:e.cameraNear)||1,o(this,H).far=(e==null?void 0:e.cameraFar)||11e3,D(this,XA,(e==null?void 0:e.cameraFov)||"auto"),D(this,lA,Zt.getElement(e==null?void 0:e.sizeElement)||document.documentElement),this.beforeRenderCallback=e==null?void 0:e.beforeRender,D(this,hA,new mt.LayoutBox(o(this,lA))),o(this,hA).onScale(()=>{this.resize()})}get name(){return o(this,ye)}get camera(){return o(this,H)}get scene(){return o(this,TA)}get box(){return o(this,hA)}get cameraDistance(){return o(this,QA)}set cameraDistance(A){D(this,QA,A),this.resize()}get sizeElement(){return o(this,lA)}get isClipped(){return o(this,lA)!==w.containerElement}resize(){const{width:A,height:e}=o(this,hA);o(this,H).position.z=o(this,QA),o(this,H)instanceof B.PerspectiveCamera?(o(this,H).aspect=A/e,o(this,H).fov=o(this,XA)==="auto"?2*Math.atan(e/2/o(this,QA))*(180/Math.PI):o(this,XA)):o(this,H)instanceof B.OrthographicCamera&&(o(this,H).left=A/-2,o(this,H).right=A/2,o(this,H).top=e/2,o(this,H).bottom=e/-2),o(this,H).updateProjectionMatrix()}destroy(){o(this,EA).forEach(A=>{A.userData.box.destroy()}),o(this,TA).clear(),vA(o(this,TA)),w.destroyView(this.name),o(this,hA).destroy()}attachToHTMLElement(A,e,s){const t=new mt.LayoutBox(A,Fe(eA({},s),{containerElement:o(this,lA),cartesian:!0,scrollStep:!this.isClipped}));return t.bindObject(e),e.userData.box=t,o(this,EA).push(e),e}detachFromHTMLElement(A){D(this,EA,o(this,EA).filter(e=>e===A?(A.userData.box.destroy(),!1):!0))}add(...A){const e=A[0],s=A[1],t=A[2];return this.scene.add(e),s?this.attachToHTMLElement(s,e,t):e}remove(A,e){this.scene.remove(A),e&&this.detachFromHTMLElement(A)}}ye=new WeakMap,H=new WeakMap,TA=new WeakMap,EA=new WeakMap,QA=new WeakMap,XA=new WeakMap,lA=new WeakMap,hA=new WeakMap;const Y=new Map;var nt,iA,T,k,VA,WA,jA,Me,xA,Se,Le,Te;class Hs{constructor(){d(this,nt,`https://unpkg.com/three@0.${B.REVISION}.x`);d(this,iA,null);d(this,T,null);d(this,k,new Map);d(this,VA,0);d(this,WA,0);d(this,jA,0);d(this,Me,2);d(this,xA,!1);d(this,Se,!1);d(this,Le,()=>{var A;D(this,VA,o(this,iA).clientWidth),D(this,WA,o(this,iA).clientHeight),D(this,jA,Math.min(o(this,Me),devicePixelRatio||1)),o(this,T).setPixelRatio(o(this,jA)),o(this,T).setSize(o(this,VA),o(this,WA)),(A=this.onResize)==null||A.call(this)});d(this,Te,()=>{o(this,T).setRenderTarget(null),o(this,k).forEach(A=>{this.render(A)})})}get CDNVersion(){return o(this,nt)}get containerElement(){return o(this,iA)}get webglRenderer(){return o(this,T)}get views(){return o(this,k)}get view(){return this.getView("default")}get width(){return o(this,VA)}get height(){return o(this,WA)}get pixelRatio(){return o(this,jA)}get cacheAssets(){return o(this,Se)}setup(A){if(o(this,xA)){console.warn("[en3.setup]: You are trying to setup en3 again.");return}D(this,iA,Zt.getElement(A==null?void 0:A.containerElement)||document.body),D(this,Me,(A==null?void 0:A.maxPixelRatio)||2),D(this,T,new B.WebGLRenderer(A==null?void 0:A.webGLRendererParameters)),o(this,T).domElement.style.cssText=`
|
|
2
2
|
position: fixed;
|
|
3
3
|
left: 0;
|
|
4
4
|
top: 0;
|
package/lib/en3/index.js
CHANGED
|
@@ -48,7 +48,7 @@ import { S as Di } from "../SourceManager-Q-PB-Rkh.js";
|
|
|
48
48
|
import { S as T } from "../Store-BQXXikps.js";
|
|
49
49
|
import { f as Fi } from "../easings-BKi40vHz.js";
|
|
50
50
|
import { d as pi } from "../function-C10DGppn.js";
|
|
51
|
-
import { T as Gi } from "../Tweened-
|
|
51
|
+
import { T as Gi } from "../Tweened-CwDC2zl8.js";
|
|
52
52
|
import { d as mi } from "../Viewport-CFFhFKqX.js";
|
|
53
53
|
import { CustomElement as Ri, define as wi } from "../custom-element/index.js";
|
|
54
54
|
function Me(a) {
|