aptechka 0.4.30 → 0.4.32
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/Damped-BJgyFENo.js +258 -0
- package/lib/Damped-CbWlWAbx.cjs +1 -0
- package/lib/animation/Animation.d.ts +42 -7
- package/lib/animation/AnimationLink.d.ts +13 -0
- package/lib/animation/Damped.d.ts +23 -28
- package/lib/animation/Tweened.d.ts +7 -19
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +2 -1
- package/lib/animation/index.js +43 -61
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +35 -35
- package/lib/class-linked-status/index.cjs +1 -1
- package/lib/class-linked-status/index.d.ts +3 -1
- package/lib/class-linked-status/index.js +36 -37
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +64 -64
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.d.ts +5 -1
- package/lib/css-property/index.js +35 -31
- package/lib/en3/index.cjs +7 -7
- package/lib/en3/index.d.ts +1 -1
- package/lib/en3/index.js +264 -277
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +8 -8
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.d.ts +12 -6
- package/lib/ladder/index.js +119 -114
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +4 -3
- package/lib/order/index.js +1 -1
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +1 -3
- package/lib/scroll/ScrollSegmentElement.d.ts +6 -11
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.d.ts +1 -1
- package/lib/scroll/index.js +497 -500
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.d.ts +4 -2
- package/lib/sequence/index.js +129 -114
- package/lib/source/SourceElement.d.ts +14 -7
- package/lib/source/index.cjs +2 -2
- package/lib/source/index.d.ts +2 -2
- package/lib/source/index.js +66 -56
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.d.ts +15 -0
- package/lib/theme/index.js +9 -6
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.d.ts +3 -2
- package/lib/ticker/index.js +81 -71
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +10 -10
- package/package.json +5 -5
- package/lib/Damped-B0G_t-pw.cjs +0 -1
- package/lib/Damped-DpaKIZqv.js +0 -150
- package/lib/en3/instances/en3LazyLoader.d.ts +0 -8
package/lib/theme/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../Store-Cd-E5W1z.js";
|
|
2
2
|
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
3
|
import "../path-data-polyfill-DgeDWYeI.js";
|
|
4
|
-
import { aD as
|
|
5
|
-
import { c as
|
|
6
|
-
const
|
|
4
|
+
import { aD as t } from "../tags-BoPv9fDr.js";
|
|
5
|
+
import { c as r } from "../createTheme-u3NsrEV6.js";
|
|
6
|
+
const i = r(
|
|
7
7
|
{
|
|
8
8
|
colorDark: "#1c1c1c",
|
|
9
9
|
colorDarkAux: "#282828",
|
|
@@ -12,6 +12,9 @@ const a = o(
|
|
|
12
12
|
tweakerWidth: "500px",
|
|
13
13
|
tweakerOffset: "20px",
|
|
14
14
|
tweakerFolderHeight: "40px",
|
|
15
|
+
timelineWidth: "50vw",
|
|
16
|
+
timelineHeight: "30vh",
|
|
17
|
+
timelineOffset: "20px",
|
|
15
18
|
heightInput: "30px",
|
|
16
19
|
borderRadius: "12px",
|
|
17
20
|
borderRadiusSmall: "4px",
|
|
@@ -27,10 +30,10 @@ const a = o(
|
|
|
27
30
|
{ prefix: "aptechka-" }
|
|
28
31
|
);
|
|
29
32
|
e && document.head.appendChild(
|
|
30
|
-
|
|
31
|
-
":root":
|
|
33
|
+
t({
|
|
34
|
+
":root": i.style
|
|
32
35
|
}).node
|
|
33
36
|
);
|
|
34
37
|
export {
|
|
35
|
-
|
|
38
|
+
i as aptechkaTheme
|
|
36
39
|
};
|
package/lib/ticker/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var B=(h,e,s)=>{if(!e.has(h))throw TypeError("Cannot "+s)};var i=(h,e,s)=>(B(h,e,"read from private field"),s?s.call(h):e.get(h)),r=(h,e,s)=>{if(e.has(h))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(h):e.set(h,s)},t=(h,e,s,n)=>(B(h,e,"write to private field"),n?n.call(h,s):e.set(h,s),s);var S=(h,e,s)=>(B(h,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../browser-CpzFX2xg.cjs"),M=require("../dom-JBOkFLTh.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var d,l,F,b,m,u,o,g,q;class V{constructor(e,s){r(this,d,void 0);r(this,l,void 0);r(this,F,void 0);r(this,b,0);r(this,m,0);r(this,u,0);r(this,o,!1);r(this,g,null);r(this,q,e=>{const s=e[0];t(this,o,s.isIntersecting)});if(t(this,d,e),t(this,l,s==null?void 0:s.maxFPS),t(this,F,(s==null?void 0:s.order)||0),s!=null&&s.culling&&E.isBrowser){const n=M.getElement(s.culling);n&&(t(this,g,new IntersectionObserver(i(this,q))),i(this,g).observe(n))}else t(this,o,!0)}get callback(){return i(this,d)}get order(){return i(this,F)}sync(e){t(this,b,e-i(this,u))}tick(e){if(t(this,u,Math.max(0,e-i(this,b))),i(this,m)||t(this,m,e),i(this,l))if(i(this,u)>=1e3/i(this,l))t(this,b,e-i(this,u)%i(this,l));else return;else t(this,b,e);i(this,o)&&i(this,d).call(this,{timeBetweenFrames:i(this,u),timestamp:e,subscribeTimestamp:i(this,m),timeElapsedSinceSubscription:e-i(this,m)})}destroy(){var e;(e=i(this,g))==null||e.disconnect()}}d=new WeakMap,l=new WeakMap,F=new WeakMap,b=new WeakMap,m=new WeakMap,u=new WeakMap,o=new WeakMap,g=new WeakMap,q=new WeakMap;var v,f,a,y,c,A,I,w,L,k,T;class x{constructor(){r(this,A);r(this,w);r(this,v,0);r(this,f,0);r(this,a,void 0);r(this,y,!1);r(this,c,[]);r(this,k,e=>{if(i(this,y)){t(this,y,!1),t(this,v,e-i(this,f));for(const s of i(this,c))s.sync(i(this,f))}t(this,a,requestAnimationFrame(i(this,k))),t(this,f,e-i(this,v));for(const s of i(this,c))s.tick(i(this,f))});r(this,T,()=>{document.hidden&&t(this,y,!0)});E.isBrowser&&document.addEventListener("visibilitychange",i(this,T))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new V(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((O,P)=>O.order-P.order))}return S(this,A,I).call(this),()=>this.unsubscribe(e)}unsubscribe(e){const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||S(this,w,L).call(this))}destroy(){E.isBrowser&&(S(this,w,L).call(this),document.removeEventListener("visibilitychange",i(this,T)))}}v=new WeakMap,f=new WeakMap,a=new WeakMap,y=new WeakMap,c=new WeakMap,A=new WeakSet,I=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,k)))},w=new WeakSet,L=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},k=new WeakMap,T=new WeakMap;const j=new x;exports.Ticker=x;exports.ticker=j;
|
package/lib/ticker/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { ElementOrSelector } from '../utils';
|
|
|
2
2
|
|
|
3
3
|
export interface TickerCallbackEntry {
|
|
4
4
|
timestamp: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
subscribeTimestamp: number;
|
|
6
|
+
timeBetweenFrames: number;
|
|
7
|
+
timeElapsedSinceSubscription: number;
|
|
7
8
|
}
|
|
8
9
|
export type TickerCallback = (entry: TickerCallbackEntry) => void;
|
|
9
10
|
export interface TickerAddOptions {
|
package/lib/ticker/index.js
CHANGED
|
@@ -1,114 +1,124 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var S = (h, i, s) => {
|
|
2
|
+
if (!i.has(h))
|
|
3
|
+
throw TypeError("Cannot " + s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var e = (h, i, s) => (S(h, i, "read from private field"), s ? s.call(h) : i.get(h)), r = (h, i, s) => {
|
|
6
|
+
if (i.has(h))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
var
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
i instanceof WeakSet ? i.add(h) : i.set(h, s);
|
|
9
|
+
}, t = (h, i, s, n) => (S(h, i, "write to private field"), n ? n.call(h, s) : i.set(h, s), s);
|
|
10
|
+
var A = (h, i, s) => (S(h, i, "access private method"), s);
|
|
11
|
+
import { i as x } from "../browser-0zX67oeU.js";
|
|
12
|
+
import { g as P } from "../dom-0S_WDL4g.js";
|
|
13
13
|
import "../path-data-polyfill-DgeDWYeI.js";
|
|
14
|
-
var
|
|
15
|
-
class
|
|
16
|
-
constructor(
|
|
17
|
-
r(this,
|
|
18
|
-
r(this,
|
|
14
|
+
var d, m, y, u, b, l, o, g, E;
|
|
15
|
+
class V {
|
|
16
|
+
constructor(i, s) {
|
|
17
|
+
r(this, d, void 0);
|
|
18
|
+
r(this, m, void 0);
|
|
19
19
|
r(this, y, void 0);
|
|
20
|
-
r(this,
|
|
21
|
-
r(this,
|
|
20
|
+
r(this, u, 0);
|
|
21
|
+
r(this, b, 0);
|
|
22
22
|
r(this, l, 0);
|
|
23
23
|
r(this, o, !1);
|
|
24
|
-
r(this,
|
|
25
|
-
|
|
24
|
+
r(this, g, null);
|
|
25
|
+
r(this, E, (i) => {
|
|
26
|
+
const s = i[0];
|
|
27
|
+
t(this, o, s.isIntersecting);
|
|
26
28
|
});
|
|
27
|
-
|
|
29
|
+
if (t(this, d, i), t(this, m, s == null ? void 0 : s.maxFPS), t(this, y, (s == null ? void 0 : s.order) || 0), s != null && s.culling && x) {
|
|
30
|
+
const n = P(s.culling);
|
|
31
|
+
n && (t(this, g, new IntersectionObserver(
|
|
32
|
+
e(this, E)
|
|
33
|
+
)), e(this, g).observe(n));
|
|
34
|
+
} else
|
|
35
|
+
t(this, o, !0);
|
|
28
36
|
}
|
|
29
37
|
get callback() {
|
|
30
|
-
return
|
|
38
|
+
return e(this, d);
|
|
31
39
|
}
|
|
32
40
|
get order() {
|
|
33
|
-
return
|
|
41
|
+
return e(this, y);
|
|
34
42
|
}
|
|
35
|
-
sync(
|
|
36
|
-
|
|
43
|
+
sync(i) {
|
|
44
|
+
t(this, u, i - e(this, l));
|
|
37
45
|
}
|
|
38
|
-
tick(
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
41
|
-
|
|
46
|
+
tick(i) {
|
|
47
|
+
if (t(this, l, Math.max(0, i - e(this, u))), e(this, b) || t(this, b, i), e(this, m))
|
|
48
|
+
if (e(this, l) >= 1e3 / e(this, m))
|
|
49
|
+
t(this, u, i - e(this, l) % e(this, m));
|
|
42
50
|
else
|
|
43
51
|
return;
|
|
44
52
|
else
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
timestamp:
|
|
49
|
-
|
|
53
|
+
t(this, u, i);
|
|
54
|
+
e(this, o) && e(this, d).call(this, {
|
|
55
|
+
timeBetweenFrames: e(this, l),
|
|
56
|
+
timestamp: i,
|
|
57
|
+
subscribeTimestamp: e(this, b),
|
|
58
|
+
timeElapsedSinceSubscription: i - e(this, b)
|
|
50
59
|
});
|
|
51
60
|
}
|
|
52
61
|
destroy() {
|
|
53
|
-
|
|
62
|
+
var i;
|
|
63
|
+
(i = e(this, g)) == null || i.disconnect();
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
|
-
|
|
57
|
-
var
|
|
66
|
+
d = new WeakMap(), m = new WeakMap(), y = new WeakMap(), u = new WeakMap(), b = new WeakMap(), l = new WeakMap(), o = new WeakMap(), g = new WeakMap(), E = new WeakMap();
|
|
67
|
+
var v, f, a, F, c, L, B, k, q, w, T;
|
|
58
68
|
class C {
|
|
59
69
|
constructor() {
|
|
60
|
-
r(this,
|
|
61
|
-
r(this,
|
|
62
|
-
r(this,
|
|
63
|
-
r(this,
|
|
70
|
+
r(this, L);
|
|
71
|
+
r(this, k);
|
|
72
|
+
r(this, v, 0);
|
|
73
|
+
r(this, f, 0);
|
|
64
74
|
r(this, a, void 0);
|
|
65
|
-
r(this,
|
|
75
|
+
r(this, F, !1);
|
|
66
76
|
r(this, c, []);
|
|
67
|
-
r(this,
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
for (const
|
|
71
|
-
|
|
77
|
+
r(this, w, (i) => {
|
|
78
|
+
if (e(this, F)) {
|
|
79
|
+
t(this, F, !1), t(this, v, i - e(this, f));
|
|
80
|
+
for (const s of e(this, c))
|
|
81
|
+
s.sync(e(this, f));
|
|
72
82
|
}
|
|
73
|
-
|
|
74
|
-
for (const
|
|
75
|
-
|
|
83
|
+
t(this, a, requestAnimationFrame(e(this, w))), t(this, f, i - e(this, v));
|
|
84
|
+
for (const s of e(this, c))
|
|
85
|
+
s.tick(e(this, f));
|
|
76
86
|
});
|
|
77
|
-
r(this,
|
|
78
|
-
document.hidden &&
|
|
87
|
+
r(this, T, () => {
|
|
88
|
+
document.hidden && t(this, F, !0);
|
|
79
89
|
});
|
|
80
|
-
|
|
90
|
+
x && document.addEventListener(
|
|
81
91
|
"visibilitychange",
|
|
82
|
-
|
|
92
|
+
e(this, T)
|
|
83
93
|
);
|
|
84
94
|
}
|
|
85
|
-
subscribe(
|
|
86
|
-
if (!
|
|
87
|
-
const n = new
|
|
88
|
-
n.sync(performance.now()),
|
|
95
|
+
subscribe(i, s) {
|
|
96
|
+
if (!e(this, c).find((n) => n.callback === i)) {
|
|
97
|
+
const n = new V(i, s);
|
|
98
|
+
n.sync(performance.now()), e(this, c).push(n), t(this, c, e(this, c).sort((I, O) => I.order - O.order));
|
|
89
99
|
}
|
|
90
|
-
return
|
|
100
|
+
return A(this, L, B).call(this), () => this.unsubscribe(i);
|
|
91
101
|
}
|
|
92
|
-
unsubscribe(
|
|
93
|
-
const
|
|
94
|
-
(n) => n.callback ===
|
|
102
|
+
unsubscribe(i) {
|
|
103
|
+
const s = e(this, c).filter(
|
|
104
|
+
(n) => n.callback === i
|
|
95
105
|
);
|
|
96
|
-
|
|
97
|
-
(n) => n.callback !==
|
|
98
|
-
)),
|
|
106
|
+
s.length && (s.forEach((n) => n.destroy()), t(this, c, e(this, c).filter(
|
|
107
|
+
(n) => n.callback !== i
|
|
108
|
+
)), e(this, c).length || A(this, k, q).call(this));
|
|
99
109
|
}
|
|
100
110
|
destroy() {
|
|
101
|
-
|
|
111
|
+
x && (A(this, k, q).call(this), document.removeEventListener(
|
|
102
112
|
"visibilitychange",
|
|
103
|
-
|
|
113
|
+
e(this, T)
|
|
104
114
|
));
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
},
|
|
117
|
+
v = new WeakMap(), f = new WeakMap(), a = new WeakMap(), F = new WeakMap(), c = new WeakMap(), L = new WeakSet(), B = function() {
|
|
118
|
+
e(this, c).length && !e(this, a) && t(this, a, requestAnimationFrame(e(this, w)));
|
|
119
|
+
}, k = new WeakSet(), q = function() {
|
|
120
|
+
e(this, a) && (cancelAnimationFrame(e(this, a)), t(this, a, void 0));
|
|
121
|
+
}, w = new WeakMap(), T = new WeakMap();
|
|
112
122
|
const z = new C();
|
|
113
123
|
export {
|
|
114
124
|
C as Ticker,
|
package/lib/video/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
|
package/lib/video/index.js
CHANGED
|
@@ -2,18 +2,18 @@ import { define as u } from "../custom-element/index.js";
|
|
|
2
2
|
import "../window-resizer/index.js";
|
|
3
3
|
import "../Store-Cd-E5W1z.js";
|
|
4
4
|
import "../path-data-polyfill-DgeDWYeI.js";
|
|
5
|
-
import { SourceElement as
|
|
6
|
-
var
|
|
7
|
-
for (var e = s > 1 ? void 0 : s ?
|
|
8
|
-
(
|
|
9
|
-
return s && e &&
|
|
5
|
+
import { SourceElement as a } from "../source/index.js";
|
|
6
|
+
var m = Object.defineProperty, l = Object.getOwnPropertyDescriptor, p = (t, r, n, s) => {
|
|
7
|
+
for (var e = s > 1 ? void 0 : s ? l(r, n) : r, o = t.length - 1, i; o >= 0; o--)
|
|
8
|
+
(i = t[o]) && (e = (s ? i(r, n, e) : i(e)) || e);
|
|
9
|
+
return s && e && m(r, n, e), e;
|
|
10
10
|
};
|
|
11
|
-
let c = class extends
|
|
11
|
+
let c = class extends a {
|
|
12
12
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback(), this.
|
|
14
|
-
this.hasAttribute("
|
|
15
|
-
}), this.
|
|
16
|
-
this.hasAttribute("
|
|
13
|
+
super.connectedCallback(), this.addEventListener("sourceCapture", () => {
|
|
14
|
+
this.hasAttribute("capture-autoplay") && this.consumerElement.play();
|
|
15
|
+
}), this.addEventListener("sourceRelease", () => {
|
|
16
|
+
this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0));
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
createConsumer() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -218,10 +218,10 @@
|
|
|
218
218
|
"default": "./lib/ticker/index.js",
|
|
219
219
|
"types": "./lib/ticker/index.d.ts"
|
|
220
220
|
},
|
|
221
|
-
"./
|
|
222
|
-
"require": "./lib/
|
|
223
|
-
"default": "./lib/
|
|
224
|
-
"types": "./lib/
|
|
221
|
+
"./tweaker": {
|
|
222
|
+
"require": "./lib/tweaker/index.cjs",
|
|
223
|
+
"default": "./lib/tweaker/index.js",
|
|
224
|
+
"types": "./lib/tweaker/index.d.ts"
|
|
225
225
|
},
|
|
226
226
|
"./utils": {
|
|
227
227
|
"require": "./lib/utils/index.cjs",
|
package/lib/Damped-B0G_t-pw.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty,_=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var k=(e,i,t)=>i in e?L(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,N=(e,i)=>{for(var t in i||(i={}))z.call(i,t)&&k(e,t,i[t]);if(O)for(var t of O(i))B.call(i,t)&&k(e,t,i[t]);return e},P=(e,i)=>_(e,j(i));var v=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var s=(e,i,t)=>(v(e,i,"read from private field"),t?t.call(e):i.get(e)),a=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},r=(e,i,t,h)=>(v(e,i,"write to private field"),h?h.call(e,t):i.set(e,t),t);const D=require("./math-GDWEqu7y.cjs"),S=require("./number-yVpzMdbQ.cjs"),c=require("./polyfills-CrcS4RcO.cjs");require("./path-data-polyfill-CXsOR7Oc.cjs");const I=require("./Store-BQGNOHlY.cjs"),M=require("./ticker/index.cjs");var d,f,F,m,C;class R extends I.Store{constructor(t){super(t||0);a(this,d,void 0);a(this,f,void 0);a(this,F,void 0);a(this,m,new I.Store(!1));a(this,C,t=>{this.handleAnimationFrame(t)})}get isRunning(){return s(this,m)}reset(){this.unlistenAnimationFrame(),super.reset()}close(){super.close(),this.unlistenAnimationFrame()}listenAnimationFrame(){s(this,m).current||(s(this,m).current=!0,M.ticker.subscribe(s(this,C),{maxFPS:s(this,d),order:s(this,f),culling:s(this,F)}))}unlistenAnimationFrame(){s(this,m).current&&(s(this,m).current=!1,M.ticker.unsubscribe(s(this,C)))}updateOptions(t){r(this,d,c.nullishCoalescing(t==null?void 0:t.maxFPS,s(this,d))),r(this,f,c.nullishCoalescing(t==null?void 0:t.order,s(this,f))),r(this,F,c.nullishCoalescing(t==null?void 0:t.culling,s(this,F)))}}d=new WeakMap,f=new WeakMap,F=new WeakMap,m=new WeakMap,C=new WeakMap;var n,A,u,l,g,x,b;class E extends R{constructor(t,h){super(t||0);a(this,n,void 0);a(this,A,void 0);a(this,u,void 0);a(this,l,void 0);a(this,g,void 0);a(this,x,void 0);a(this,b,void 0);this.damping=20,this.stiffness=0,this.mass=0,r(this,n,0),r(this,A,0),r(this,u,0),r(this,l,0),r(this,g,0),r(this,x,0),r(this,b,()=>{this.set(s(this,n),!0)}),r(this,u,c.nullishCoalescing(h==null?void 0:h.min,-1/0)),r(this,l,c.nullishCoalescing(h==null?void 0:h.max,1/0)),r(this,n,this.current),this.updateOptions(h),this.listenAnimationFrame()}get target(){return s(this,n)}get direction(){return s(this,A)}get min(){return s(this,u)}set min(t){r(this,u,t),s(this,b).call(this)}get max(){return s(this,l)}set max(t){r(this,l,t),s(this,b).call(this)}get velocity(){return s(this,g)}get speed(){return s(this,x)}get length(){return s(this,l)-s(this,u)}get progress(){return this.length?S.preciseNumber((this.current-s(this,u))/this.length,6):0}get entry(){return P(N({},super.entry),{min:s(this,u),max:s(this,l),length:this.length,direction:this.direction,progress:this.progress})}set(t,h=!1){const y=s(this,n);r(this,n,D.clamp(t,s(this,u),s(this,l))),h&&(this.current=s(this,n)),s(this,n)!==y&&(r(this,A,Math.sign(t-s(this,n))||1),this.listenAnimationFrame())}shift(t,h=!1){this.set(s(this,n)+t,h)}reset(){this.set(this.initial,!0),super.reset()}listenAnimationFrame(){this.current!==this.target&&super.listenAnimationFrame()}updateOptions(t){super.updateOptions(t),this.damping=c.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=c.nullishCoalescing(t==null?void 0:t.mass,this.mass),this.stiffness=c.nullishCoalescing(t==null?void 0:t.stiffness,this.stiffness)}handleAnimationFrame(t){S.preciseNumber(this.current,4)===S.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const h=this.current,y=Math.abs(h-this.target);r(this,x,y/t.elapsed);const q=t.elapsed/1e3;if(this.mass||this.stiffness){const w=(s(this,n)-this.current)*this.stiffness-s(this,g)*this.damping;r(this,g,s(this,g)+w/this.mass*q),this.current+=s(this,g)*q}else this.current=D.damp(this.current,this.target,this.damping,q)}}n=new WeakMap,A=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,x=new WeakMap,b=new WeakMap;exports.Animation=R;exports.Damped=E;
|
package/lib/Damped-DpaKIZqv.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
var w = Object.defineProperty, L = Object.defineProperties;
|
|
2
|
-
var N = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var P = Object.getOwnPropertySymbols;
|
|
4
|
-
var j = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var v = (e, i, t) => i in e ? w(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, C = (e, i) => {
|
|
6
|
-
for (var t in i || (i = {}))
|
|
7
|
-
j.call(i, t) && v(e, t, i[t]);
|
|
8
|
-
if (P)
|
|
9
|
-
for (var t of P(i))
|
|
10
|
-
q.call(i, t) && v(e, t, i[t]);
|
|
11
|
-
return e;
|
|
12
|
-
}, D = (e, i) => L(e, N(i));
|
|
13
|
-
var I = (e, i, t) => {
|
|
14
|
-
if (!i.has(e))
|
|
15
|
-
throw TypeError("Cannot " + t);
|
|
16
|
-
};
|
|
17
|
-
var s = (e, i, t) => (I(e, i, "read from private field"), t ? t.call(e) : i.get(e)), a = (e, i, t) => {
|
|
18
|
-
if (i.has(e))
|
|
19
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
i instanceof WeakSet ? i.add(e) : i.set(e, t);
|
|
21
|
-
}, r = (e, i, t, h) => (I(e, i, "write to private field"), h ? h.call(e, t) : i.set(e, t), t);
|
|
22
|
-
import { c as z, d as B } from "./math-BOBiC4TN.js";
|
|
23
|
-
import { p } from "./number-Bo5RdrA1.js";
|
|
24
|
-
import { n as c } from "./polyfills-DJUYczFm.js";
|
|
25
|
-
import "./path-data-polyfill-DgeDWYeI.js";
|
|
26
|
-
import { S as M } from "./Store-Cd-E5W1z.js";
|
|
27
|
-
import { ticker as R } from "./ticker/index.js";
|
|
28
|
-
var f, d, F, l, y;
|
|
29
|
-
class E extends M {
|
|
30
|
-
constructor(t) {
|
|
31
|
-
super(t || 0);
|
|
32
|
-
a(this, f, void 0);
|
|
33
|
-
a(this, d, void 0);
|
|
34
|
-
a(this, F, void 0);
|
|
35
|
-
a(this, l, new M(!1));
|
|
36
|
-
a(this, y, (t) => {
|
|
37
|
-
this.handleAnimationFrame(t);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
get isRunning() {
|
|
41
|
-
return s(this, l);
|
|
42
|
-
}
|
|
43
|
-
reset() {
|
|
44
|
-
this.unlistenAnimationFrame(), super.reset();
|
|
45
|
-
}
|
|
46
|
-
close() {
|
|
47
|
-
super.close(), this.unlistenAnimationFrame();
|
|
48
|
-
}
|
|
49
|
-
listenAnimationFrame() {
|
|
50
|
-
s(this, l).current || (s(this, l).current = !0, R.subscribe(s(this, y), {
|
|
51
|
-
maxFPS: s(this, f),
|
|
52
|
-
order: s(this, d),
|
|
53
|
-
culling: s(this, F)
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
unlistenAnimationFrame() {
|
|
57
|
-
s(this, l).current && (s(this, l).current = !1, R.unsubscribe(s(this, y)));
|
|
58
|
-
}
|
|
59
|
-
updateOptions(t) {
|
|
60
|
-
r(this, f, c(t == null ? void 0 : t.maxFPS, s(this, f))), r(this, d, c(t == null ? void 0 : t.order, s(this, d))), r(this, F, c(t == null ? void 0 : t.culling, s(this, F)));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
f = new WeakMap(), d = new WeakMap(), F = new WeakMap(), l = new WeakMap(), y = new WeakMap();
|
|
64
|
-
var n, A, m, u, g, x, b;
|
|
65
|
-
class V extends E {
|
|
66
|
-
constructor(t, h) {
|
|
67
|
-
super(t || 0);
|
|
68
|
-
a(this, n, void 0);
|
|
69
|
-
a(this, A, void 0);
|
|
70
|
-
a(this, m, void 0);
|
|
71
|
-
a(this, u, void 0);
|
|
72
|
-
a(this, g, void 0);
|
|
73
|
-
a(this, x, void 0);
|
|
74
|
-
a(this, b, void 0);
|
|
75
|
-
this.damping = 20, this.stiffness = 0, this.mass = 0, r(this, n, 0), r(this, A, 0), r(this, m, 0), r(this, u, 0), r(this, g, 0), r(this, x, 0), r(this, b, () => {
|
|
76
|
-
this.set(s(this, n), !0);
|
|
77
|
-
}), r(this, m, c(h == null ? void 0 : h.min, -1 / 0)), r(this, u, c(h == null ? void 0 : h.max, 1 / 0)), r(this, n, this.current), this.updateOptions(h), this.listenAnimationFrame();
|
|
78
|
-
}
|
|
79
|
-
get target() {
|
|
80
|
-
return s(this, n);
|
|
81
|
-
}
|
|
82
|
-
get direction() {
|
|
83
|
-
return s(this, A);
|
|
84
|
-
}
|
|
85
|
-
get min() {
|
|
86
|
-
return s(this, m);
|
|
87
|
-
}
|
|
88
|
-
set min(t) {
|
|
89
|
-
r(this, m, t), s(this, b).call(this);
|
|
90
|
-
}
|
|
91
|
-
get max() {
|
|
92
|
-
return s(this, u);
|
|
93
|
-
}
|
|
94
|
-
set max(t) {
|
|
95
|
-
r(this, u, t), s(this, b).call(this);
|
|
96
|
-
}
|
|
97
|
-
get velocity() {
|
|
98
|
-
return s(this, g);
|
|
99
|
-
}
|
|
100
|
-
get speed() {
|
|
101
|
-
return s(this, x);
|
|
102
|
-
}
|
|
103
|
-
get length() {
|
|
104
|
-
return s(this, u) - s(this, m);
|
|
105
|
-
}
|
|
106
|
-
get progress() {
|
|
107
|
-
return this.length ? p((this.current - s(this, m)) / this.length, 6) : 0;
|
|
108
|
-
}
|
|
109
|
-
get entry() {
|
|
110
|
-
return D(C({}, super.entry), {
|
|
111
|
-
min: s(this, m),
|
|
112
|
-
max: s(this, u),
|
|
113
|
-
length: this.length,
|
|
114
|
-
direction: this.direction,
|
|
115
|
-
progress: this.progress
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
set(t, h = !1) {
|
|
119
|
-
const S = s(this, n);
|
|
120
|
-
r(this, n, z(t, s(this, m), s(this, u))), h && (this.current = s(this, n)), s(this, n) !== S && (r(this, A, Math.sign(t - s(this, n)) || 1), this.listenAnimationFrame());
|
|
121
|
-
}
|
|
122
|
-
shift(t, h = !1) {
|
|
123
|
-
this.set(s(this, n) + t, h);
|
|
124
|
-
}
|
|
125
|
-
reset() {
|
|
126
|
-
this.set(this.initial, !0), super.reset();
|
|
127
|
-
}
|
|
128
|
-
listenAnimationFrame() {
|
|
129
|
-
this.current !== this.target && super.listenAnimationFrame();
|
|
130
|
-
}
|
|
131
|
-
updateOptions(t) {
|
|
132
|
-
super.updateOptions(t), this.damping = c(t == null ? void 0 : t.damping, this.damping), this.mass = c(t == null ? void 0 : t.mass, this.mass), this.stiffness = c(t == null ? void 0 : t.stiffness, this.stiffness);
|
|
133
|
-
}
|
|
134
|
-
handleAnimationFrame(t) {
|
|
135
|
-
p(this.current, 4) === p(this.target, 4) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
136
|
-
const h = this.current, S = Math.abs(h - this.target);
|
|
137
|
-
r(this, x, S / t.elapsed);
|
|
138
|
-
const O = t.elapsed / 1e3;
|
|
139
|
-
if (this.mass || this.stiffness) {
|
|
140
|
-
const k = (s(this, n) - this.current) * this.stiffness - s(this, g) * this.damping;
|
|
141
|
-
r(this, g, s(this, g) + k / this.mass * O), this.current += s(this, g) * O;
|
|
142
|
-
} else
|
|
143
|
-
this.current = B(this.current, this.target, this.damping, O);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
n = new WeakMap(), A = new WeakMap(), m = new WeakMap(), u = new WeakMap(), g = new WeakMap(), x = new WeakMap(), b = new WeakMap();
|
|
147
|
-
export {
|
|
148
|
-
E as A,
|
|
149
|
-
V as D
|
|
150
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { En3SourceConsumer } from '../objects/En3SourceConsumer';
|
|
2
|
-
import { ElementOrSelector } from '../../utils';
|
|
3
|
-
|
|
4
|
-
declare class En3LazyLoader {
|
|
5
|
-
add(consumer: En3SourceConsumer<any>, element: ElementOrSelector): (() => void) | undefined;
|
|
6
|
-
}
|
|
7
|
-
export declare const en3LazyLoader: En3LazyLoader;
|
|
8
|
-
export {};
|