aptechka 0.5.31 → 0.5.33
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-AkD1vhRW.js +217 -0
- package/lib/Animation-BIRIzLIL.cjs +1 -0
- package/lib/Damped-3daHRLIW.cjs +1 -0
- package/lib/Damped-CH96byE8.js +67 -0
- package/lib/Tweened-Bv9mgPvl.cjs +1 -0
- package/lib/Tweened-DzckT3pw.js +52 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +6 -53
- package/lib/en3/index.cjs +194 -7
- package/lib/en3/index.d.ts +1 -0
- package/lib/en3/index.js +2131 -1224
- package/lib/en3/objects/En3ImageLike.d.ts +2 -3
- package/lib/en3/objects/fluid/Advection.d.ts +30 -0
- package/lib/en3/objects/fluid/Divergence.d.ts +23 -0
- package/lib/en3/objects/fluid/En3Fluid.d.ts +16 -0
- package/lib/en3/objects/fluid/En3FluidElement.d.ts +14 -0
- package/lib/en3/objects/fluid/En3FluidPointer.d.ts +13 -0
- package/lib/en3/objects/fluid/ExternalForce.d.ts +19 -0
- package/lib/en3/objects/fluid/Poisson.d.ts +24 -0
- package/lib/en3/objects/fluid/Pressure.d.ts +26 -0
- package/lib/en3/objects/fluid/ShaderPass.d.ts +24 -0
- package/lib/en3/objects/fluid/Simulation.d.ts +33 -0
- package/lib/en3/objects/fluid/Viscous.d.ts +30 -0
- package/lib/en3/objects/fluid/index.d.ts +6 -0
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +1 -1
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +1 -1
- package/package.json +1 -1
- package/lib/Damped-DxwUBxOC.cjs +0 -1
- package/lib/Damped-QZAoXO5Z.js +0 -257
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
var X = Object.defineProperty, Y = Object.defineProperties;
|
|
2
|
+
var Z = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var K = Object.getOwnPropertySymbols;
|
|
4
|
+
var $ = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var _ = (e, s, t) => s in e ? X(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t, j = (e, s) => {
|
|
6
|
+
for (var t in s || (s = {}))
|
|
7
|
+
$.call(s, t) && _(e, t, s[t]);
|
|
8
|
+
if (K)
|
|
9
|
+
for (var t of K(s))
|
|
10
|
+
v.call(s, t) && _(e, t, s[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, G = (e, s) => Y(e, Z(s));
|
|
13
|
+
var C = (e, s, t) => {
|
|
14
|
+
if (!s.has(e))
|
|
15
|
+
throw TypeError("Cannot " + t);
|
|
16
|
+
};
|
|
17
|
+
var i = (e, s, t) => (C(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => {
|
|
18
|
+
if (s.has(e))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
s instanceof WeakSet ? s.add(e) : s.set(e, t);
|
|
21
|
+
}, h = (e, s, t, n) => (C(e, s, "write to private field"), n ? n.call(e, t) : s.set(e, t), t);
|
|
22
|
+
var F = (e, s, t) => (C(e, s, "access private method"), t);
|
|
23
|
+
import { S as T } from "./Store-BQXXikps.js";
|
|
24
|
+
import { c as tt } from "./math-BOBiC4TN.js";
|
|
25
|
+
import { p as H } from "./number-Bo5RdrA1.js";
|
|
26
|
+
import { n as P } from "./polyfills-DJUYczFm.js";
|
|
27
|
+
import { ticker as J } from "./ticker/index.js";
|
|
28
|
+
import { TICK_ORDER as it } from "./order/index.js";
|
|
29
|
+
var u, l, o, p, b, x, y, w, q, Q, z, U, S, V, E, W, I;
|
|
30
|
+
class st {
|
|
31
|
+
constructor(s, t, n, N, B) {
|
|
32
|
+
r(this, q);
|
|
33
|
+
r(this, z);
|
|
34
|
+
r(this, S);
|
|
35
|
+
r(this, E);
|
|
36
|
+
r(this, u, void 0);
|
|
37
|
+
r(this, l, void 0);
|
|
38
|
+
r(this, o, void 0);
|
|
39
|
+
r(this, p, void 0);
|
|
40
|
+
r(this, b, !1);
|
|
41
|
+
r(this, x, !1);
|
|
42
|
+
r(this, y, !1);
|
|
43
|
+
r(this, w, void 0);
|
|
44
|
+
r(this, I, (s) => {
|
|
45
|
+
!i(this, y) && i(this, u).initial !== i(this, u).current && h(this, y, !0), i(this, y) && (s.direction > 0 && s.progress >= i(this, o).current ? F(this, q, Q).call(this) : s.direction < 0 && s.progress <= i(this, o).current && F(this, z, U).call(this));
|
|
46
|
+
});
|
|
47
|
+
h(this, u, s), h(this, l, t), h(this, o, new T(n, {
|
|
48
|
+
passport: t.passport ? {
|
|
49
|
+
name: t.passport + "-start",
|
|
50
|
+
manager: {
|
|
51
|
+
type: "number"
|
|
52
|
+
}
|
|
53
|
+
} : void 0
|
|
54
|
+
})), h(this, p, new T(N, {
|
|
55
|
+
passport: t.passport ? {
|
|
56
|
+
name: t.passport + "-set",
|
|
57
|
+
manager: {
|
|
58
|
+
type: "number"
|
|
59
|
+
}
|
|
60
|
+
} : void 0
|
|
61
|
+
})), h(this, w, B), i(this, u).subscribe(i(this, I)), i(this, u).linked.add(this);
|
|
62
|
+
}
|
|
63
|
+
get targetAnimation() {
|
|
64
|
+
return i(this, l);
|
|
65
|
+
}
|
|
66
|
+
get triggerAnimation() {
|
|
67
|
+
return i(this, u);
|
|
68
|
+
}
|
|
69
|
+
destroy() {
|
|
70
|
+
i(this, p).close(), i(this, o).close(), i(this, u).unsubscribe(i(this, I)), i(this, u).linked.delete(this);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
u = new WeakMap(), l = new WeakMap(), o = new WeakMap(), p = new WeakMap(), b = new WeakMap(), x = new WeakMap(), y = new WeakMap(), w = new WeakMap(), q = new WeakSet(), Q = function() {
|
|
74
|
+
i(this, b) || (h(this, x, !1), h(this, b, !0), F(this, S, V).call(this, i(this, p).current));
|
|
75
|
+
}, z = new WeakSet(), U = function() {
|
|
76
|
+
i(this, b) && !i(this, x) && (h(this, b, !1), h(this, x, !0), F(this, S, V).call(this, i(this, l).initial));
|
|
77
|
+
}, S = new WeakSet(), V = function(s) {
|
|
78
|
+
F(this, E, W).call(this), i(this, l).updateOptions(i(this, w)), i(this, l).set(s);
|
|
79
|
+
}, E = new WeakSet(), W = function() {
|
|
80
|
+
var s;
|
|
81
|
+
(s = i(this, w)) != null && s.once && this.destroy();
|
|
82
|
+
}, I = new WeakMap();
|
|
83
|
+
var D, M, O, g, k, f, L, a, c, m, d, A, R;
|
|
84
|
+
class mt extends T {
|
|
85
|
+
constructor(t, n) {
|
|
86
|
+
super(t || 0, n);
|
|
87
|
+
r(this, D, void 0);
|
|
88
|
+
r(this, M, it.ANIMATION);
|
|
89
|
+
r(this, O, void 0);
|
|
90
|
+
r(this, g, new T(!1));
|
|
91
|
+
r(this, k, /* @__PURE__ */ new Set());
|
|
92
|
+
r(this, f, null);
|
|
93
|
+
r(this, L, 0);
|
|
94
|
+
r(this, a, 0);
|
|
95
|
+
r(this, c, -1 / 0);
|
|
96
|
+
r(this, m, 1 / 0);
|
|
97
|
+
r(this, d, 0);
|
|
98
|
+
r(this, A, 1);
|
|
99
|
+
r(this, R, (t) => {
|
|
100
|
+
this.handleAnimationFrame(t);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
get linked() {
|
|
104
|
+
return i(this, k);
|
|
105
|
+
}
|
|
106
|
+
get animationLink() {
|
|
107
|
+
return i(this, f);
|
|
108
|
+
}
|
|
109
|
+
get direction() {
|
|
110
|
+
return i(this, L);
|
|
111
|
+
}
|
|
112
|
+
get target() {
|
|
113
|
+
return i(this, a);
|
|
114
|
+
}
|
|
115
|
+
get min() {
|
|
116
|
+
return i(this, c);
|
|
117
|
+
}
|
|
118
|
+
set min(t) {
|
|
119
|
+
h(this, c, t), this.set(i(this, a), {
|
|
120
|
+
equalize: !0
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
get max() {
|
|
124
|
+
return i(this, m);
|
|
125
|
+
}
|
|
126
|
+
set max(t) {
|
|
127
|
+
h(this, m, t), this.set(i(this, a), {
|
|
128
|
+
equalize: !0
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
get from() {
|
|
132
|
+
return i(this, d);
|
|
133
|
+
}
|
|
134
|
+
get to() {
|
|
135
|
+
return i(this, A);
|
|
136
|
+
}
|
|
137
|
+
get isRunning() {
|
|
138
|
+
return i(this, g);
|
|
139
|
+
}
|
|
140
|
+
get currentDistance() {
|
|
141
|
+
return Math.abs(i(this, A) - i(this, d));
|
|
142
|
+
}
|
|
143
|
+
get distance() {
|
|
144
|
+
return Math.abs(i(this, m) - i(this, c));
|
|
145
|
+
}
|
|
146
|
+
get currentProgress() {
|
|
147
|
+
return this.currentDistance ? H(
|
|
148
|
+
Math.abs(this.current - i(this, d)) / this.currentDistance,
|
|
149
|
+
6
|
|
150
|
+
) : 0;
|
|
151
|
+
}
|
|
152
|
+
get progress() {
|
|
153
|
+
return this.distance ? H(Math.abs(this.current - i(this, c)) / this.distance, 6) : 0;
|
|
154
|
+
}
|
|
155
|
+
get entry() {
|
|
156
|
+
return G(j({}, super.entry), {
|
|
157
|
+
from: i(this, d),
|
|
158
|
+
to: i(this, A),
|
|
159
|
+
currentDistance: this.currentDistance,
|
|
160
|
+
distance: this.distance,
|
|
161
|
+
direction: this.direction,
|
|
162
|
+
currentProgress: this.currentProgress,
|
|
163
|
+
progress: this.progress
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
setTarget(t) {
|
|
167
|
+
h(this, L, Math.sign(t - i(this, a))), h(this, a, tt(t, i(this, c), i(this, m))), h(this, d, this.current), h(this, A, t);
|
|
168
|
+
}
|
|
169
|
+
set(t, n) {
|
|
170
|
+
i(this, a) !== t && (this.setTarget(t), n && this.updateOptions(n), i(this, a) !== this.current && this.start());
|
|
171
|
+
}
|
|
172
|
+
shift(t, n) {
|
|
173
|
+
this.set(i(this, a) + t, n);
|
|
174
|
+
}
|
|
175
|
+
reset() {
|
|
176
|
+
this.set(this.initial, { equalize: !0 }), super.reset(), i(this, k).forEach((t) => {
|
|
177
|
+
t.targetAnimation.reset();
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
close() {
|
|
181
|
+
super.close(), this.unlistenAnimationFrame(), this.unlink(), i(this, k).clear();
|
|
182
|
+
}
|
|
183
|
+
listenAnimationFrame() {
|
|
184
|
+
i(this, g).current || (i(this, g).current = !0, J.subscribe(i(this, R), {
|
|
185
|
+
maxFPS: i(this, D),
|
|
186
|
+
order: i(this, M),
|
|
187
|
+
culling: i(this, O)
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
unlistenAnimationFrame() {
|
|
191
|
+
i(this, g).current && (i(this, g).current = !1, J.unsubscribe(i(this, R)), i(this, k).forEach((t) => {
|
|
192
|
+
t.targetAnimation.unlistenAnimationFrame();
|
|
193
|
+
}));
|
|
194
|
+
}
|
|
195
|
+
updateOptions(t) {
|
|
196
|
+
h(this, D, P(t == null ? void 0 : t.maxFPS, i(this, D))), h(this, M, P(t == null ? void 0 : t.order, i(this, M))), h(this, O, P(t == null ? void 0 : t.culling, i(this, O))), h(this, c, P(t == null ? void 0 : t.min, i(this, c))), h(this, m, P(t == null ? void 0 : t.max, i(this, m))), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = i(this, a));
|
|
197
|
+
}
|
|
198
|
+
linkTo(t, n, N, B) {
|
|
199
|
+
this.unlink(), h(this, f, new st(
|
|
200
|
+
t,
|
|
201
|
+
this,
|
|
202
|
+
n,
|
|
203
|
+
N,
|
|
204
|
+
B
|
|
205
|
+
));
|
|
206
|
+
}
|
|
207
|
+
unlink() {
|
|
208
|
+
i(this, f) && (i(this, f).destroy(), h(this, f, null));
|
|
209
|
+
}
|
|
210
|
+
start() {
|
|
211
|
+
this.listenAnimationFrame();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
D = new WeakMap(), M = new WeakMap(), O = new WeakMap(), g = new WeakMap(), k = new WeakMap(), f = new WeakMap(), L = new WeakMap(), a = new WeakMap(), c = new WeakMap(), m = new WeakMap(), d = new WeakMap(), A = new WeakMap(), R = new WeakMap();
|
|
215
|
+
export {
|
|
216
|
+
mt as A
|
|
217
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var X=Object.defineProperty,Y=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var K=(e,s,t)=>s in e?X(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,j=(e,s)=>{for(var t in s||(s={}))$.call(s,t)&&K(e,t,s[t]);if(V)for(var t of V(s))v.call(s,t)&&K(e,t,s[t]);return e},G=(e,s)=>Y(e,Z(s));var _=(e,s,t)=>{if(!s.has(e))throw TypeError("Cannot "+t)};var i=(e,s,t)=>(_(e,s,"read from private field"),t?t.call(e):s.get(e)),r=(e,s,t)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,t)},n=(e,s,t,h)=>(_(e,s,"write to private field"),h?h.call(e,t):s.set(e,t),t);var F=(e,s,t)=>(_(e,s,"access private method"),t);const L=require("./Store-C-1ruEIm.cjs"),tt=require("./math-GDWEqu7y.cjs"),H=require("./number-yVpzMdbQ.cjs"),M=require("./polyfills-CrcS4RcO.cjs"),J=require("./ticker/index.cjs"),it=require("./order/index.cjs");var u,m,o,q,b,x,y,S,R,Q,T,U,O,B,z,W,P;class st{constructor(s,t,h,N,E){r(this,R);r(this,T);r(this,O);r(this,z);r(this,u,void 0);r(this,m,void 0);r(this,o,void 0);r(this,q,void 0);r(this,b,!1);r(this,x,!1);r(this,y,!1);r(this,S,void 0);r(this,P,s=>{!i(this,y)&&i(this,u).initial!==i(this,u).current&&n(this,y,!0),i(this,y)&&(s.direction>0&&s.progress>=i(this,o).current?F(this,R,Q).call(this):s.direction<0&&s.progress<=i(this,o).current&&F(this,T,U).call(this))});n(this,u,s),n(this,m,t),n(this,o,new L.Store(h,{passport:t.passport?{name:t.passport+"-start",manager:{type:"number"}}:void 0})),n(this,q,new L.Store(N,{passport:t.passport?{name:t.passport+"-set",manager:{type:"number"}}:void 0})),n(this,S,E),i(this,u).subscribe(i(this,P)),i(this,u).linked.add(this)}get targetAnimation(){return i(this,m)}get triggerAnimation(){return i(this,u)}destroy(){i(this,q).close(),i(this,o).close(),i(this,u).unsubscribe(i(this,P)),i(this,u).linked.delete(this)}}u=new WeakMap,m=new WeakMap,o=new WeakMap,q=new WeakMap,b=new WeakMap,x=new WeakMap,y=new WeakMap,S=new WeakMap,R=new WeakSet,Q=function(){i(this,b)||(n(this,x,!1),n(this,b,!0),F(this,O,B).call(this,i(this,q).current))},T=new WeakSet,U=function(){i(this,b)&&!i(this,x)&&(n(this,b,!1),n(this,x,!0),F(this,O,B).call(this,i(this,m).initial))},O=new WeakSet,B=function(s){F(this,z,W).call(this),i(this,m).updateOptions(i(this,S)),i(this,m).set(s)},z=new WeakSet,W=function(){var s;(s=i(this,S))!=null&&s.once&&this.destroy()},P=new WeakMap;var w,C,D,g,k,d,p,a,c,l,f,A,I;class et extends L.Store{constructor(t,h){super(t||0,h);r(this,w,void 0);r(this,C,it.TICK_ORDER.ANIMATION);r(this,D,void 0);r(this,g,new L.Store(!1));r(this,k,new Set);r(this,d,null);r(this,p,0);r(this,a,0);r(this,c,-1/0);r(this,l,1/0);r(this,f,0);r(this,A,1);r(this,I,t=>{this.handleAnimationFrame(t)})}get linked(){return i(this,k)}get animationLink(){return i(this,d)}get direction(){return i(this,p)}get target(){return i(this,a)}get min(){return i(this,c)}set min(t){n(this,c,t),this.set(i(this,a),{equalize:!0})}get max(){return i(this,l)}set max(t){n(this,l,t),this.set(i(this,a),{equalize:!0})}get from(){return i(this,f)}get to(){return i(this,A)}get isRunning(){return i(this,g)}get currentDistance(){return Math.abs(i(this,A)-i(this,f))}get distance(){return Math.abs(i(this,l)-i(this,c))}get currentProgress(){return this.currentDistance?H.preciseNumber(Math.abs(this.current-i(this,f))/this.currentDistance,6):0}get progress(){return this.distance?H.preciseNumber(Math.abs(this.current-i(this,c))/this.distance,6):0}get entry(){return G(j({},super.entry),{from:i(this,f),to:i(this,A),currentDistance:this.currentDistance,distance:this.distance,direction:this.direction,currentProgress:this.currentProgress,progress:this.progress})}setTarget(t){n(this,p,Math.sign(t-i(this,a))),n(this,a,tt.clamp(t,i(this,c),i(this,l))),n(this,f,this.current),n(this,A,t)}set(t,h){i(this,a)!==t&&(this.setTarget(t),h&&this.updateOptions(h),i(this,a)!==this.current&&this.start())}shift(t,h){this.set(i(this,a)+t,h)}reset(){this.set(this.initial,{equalize:!0}),super.reset(),i(this,k).forEach(t=>{t.targetAnimation.reset()})}close(){super.close(),this.unlistenAnimationFrame(),this.unlink(),i(this,k).clear()}listenAnimationFrame(){i(this,g).current||(i(this,g).current=!0,J.ticker.subscribe(i(this,I),{maxFPS:i(this,w),order:i(this,C),culling:i(this,D)}))}unlistenAnimationFrame(){i(this,g).current&&(i(this,g).current=!1,J.ticker.unsubscribe(i(this,I)),i(this,k).forEach(t=>{t.targetAnimation.unlistenAnimationFrame()}))}updateOptions(t){n(this,w,M.nullishCoalescing(t==null?void 0:t.maxFPS,i(this,w))),n(this,C,M.nullishCoalescing(t==null?void 0:t.order,i(this,C))),n(this,D,M.nullishCoalescing(t==null?void 0:t.culling,i(this,D))),n(this,c,M.nullishCoalescing(t==null?void 0:t.min,i(this,c))),n(this,l,M.nullishCoalescing(t==null?void 0:t.max,i(this,l))),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=i(this,a))}linkTo(t,h,N,E){this.unlink(),n(this,d,new st(t,this,h,N,E))}unlink(){i(this,d)&&(i(this,d).destroy(),n(this,d,null))}start(){this.listenAnimationFrame()}}w=new WeakMap,C=new WeakMap,D=new WeakMap,g=new WeakMap,k=new WeakMap,d=new WeakMap,p=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,f=new WeakMap,A=new WeakMap,I=new WeakMap;exports.Animation=et;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var A=Object.defineProperty,F=Object.defineProperties;var v=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var f=(e,s,t)=>s in e?A(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,c=(e,s)=>{for(var t in s||(s={}))C.call(s,t)&&f(e,t,s[t]);if(g)for(var t of g(s))O.call(s,t)&&f(e,t,s[t]);return e},m=(e,s)=>F(e,v(s));var p=(e,s,t)=>{if(!s.has(e))throw TypeError("Cannot "+t)};var r=(e,s,t)=>(p(e,s,"read from private field"),t?t.call(e):s.get(e)),l=(e,s,t)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,t)},n=(e,s,t,a)=>(p(e,s,"write to private field"),a?a.call(e,t):s.set(e,t),t);const w=require("./math-GDWEqu7y.cjs"),y=require("./number-yVpzMdbQ.cjs"),d=require("./polyfills-CrcS4RcO.cjs"),B=require("./Animation-BIRIzLIL.cjs");var i,h;class D extends B.Animation{constructor(t,a){super(t,a);l(this,i,void 0);l(this,h,void 0);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(m(c({},a),{equalize:!0}))}get velocity(){return r(this,i)}get speed(){return r(this,h)}get entry(){return m(c({},super.entry),{velocity:r(this,i),speed:r(this,h)})}updateOptions(t){this.damping=d.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=d.nullishCoalescing(t==null?void 0:t.mass,this.mass),this.stiffness=d.nullishCoalescing(t==null?void 0:t.stiffness,this.stiffness),super.updateOptions(t)}updateManually(t){this.setTarget(t),this.current=this.target}handleAnimationFrame(t){y.preciseNumber(this.current,4)===y.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const a=this.current,q=Math.abs(a-this.target);n(this,h,q/t.timeBetweenFrames);const u=t.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const b=(this.target-this.current)*this.stiffness-r(this,i)*this.damping;n(this,i,r(this,i)+b/this.mass*u),this.current+=r(this,i)*u}else this.current=w.damp(this.current,this.target,this.damping,u)}}i=new WeakMap,h=new WeakMap;exports.Damped=D;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var v = Object.defineProperty, O = Object.defineProperties;
|
|
2
|
+
var b = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var g = Object.getOwnPropertySymbols;
|
|
4
|
+
var w = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var l = (e, s, t) => s in e ? v(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t, u = (e, s) => {
|
|
6
|
+
for (var t in s || (s = {}))
|
|
7
|
+
w.call(s, t) && l(e, t, s[t]);
|
|
8
|
+
if (g)
|
|
9
|
+
for (var t of g(s))
|
|
10
|
+
x.call(s, t) && l(e, t, s[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, c = (e, s) => O(e, b(s));
|
|
13
|
+
var p = (e, s, t) => {
|
|
14
|
+
if (!s.has(e))
|
|
15
|
+
throw TypeError("Cannot " + t);
|
|
16
|
+
};
|
|
17
|
+
var r = (e, s, t) => (p(e, s, "read from private field"), t ? t.call(e) : s.get(e)), d = (e, s, t) => {
|
|
18
|
+
if (s.has(e))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
s instanceof WeakSet ? s.add(e) : s.set(e, t);
|
|
21
|
+
}, n = (e, s, t, a) => (p(e, s, "write to private field"), a ? a.call(e, t) : s.set(e, t), t);
|
|
22
|
+
import { d as B } from "./math-BOBiC4TN.js";
|
|
23
|
+
import { p as y } from "./number-Bo5RdrA1.js";
|
|
24
|
+
import { n as f } from "./polyfills-DJUYczFm.js";
|
|
25
|
+
import { A as D } from "./Animation-AkD1vhRW.js";
|
|
26
|
+
var i, h;
|
|
27
|
+
class T extends D {
|
|
28
|
+
constructor(t, a) {
|
|
29
|
+
super(t, a);
|
|
30
|
+
d(this, i, void 0);
|
|
31
|
+
d(this, h, void 0);
|
|
32
|
+
this.damping = 20, this.stiffness = 0, this.mass = 0, n(this, i, 0), n(this, h, 0), this.updateOptions(c(u({}, a), { equalize: !0 }));
|
|
33
|
+
}
|
|
34
|
+
get velocity() {
|
|
35
|
+
return r(this, i);
|
|
36
|
+
}
|
|
37
|
+
get speed() {
|
|
38
|
+
return r(this, h);
|
|
39
|
+
}
|
|
40
|
+
get entry() {
|
|
41
|
+
return c(u({}, super.entry), {
|
|
42
|
+
velocity: r(this, i),
|
|
43
|
+
speed: r(this, h)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
updateOptions(t) {
|
|
47
|
+
this.damping = f(t == null ? void 0 : t.damping, this.damping), this.mass = f(t == null ? void 0 : t.mass, this.mass), this.stiffness = f(t == null ? void 0 : t.stiffness, this.stiffness), super.updateOptions(t);
|
|
48
|
+
}
|
|
49
|
+
updateManually(t) {
|
|
50
|
+
this.setTarget(t), this.current = this.target;
|
|
51
|
+
}
|
|
52
|
+
handleAnimationFrame(t) {
|
|
53
|
+
y(this.current, 4) === y(this.target, 4) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
54
|
+
const a = this.current, A = Math.abs(a - this.target);
|
|
55
|
+
n(this, h, A / t.timeBetweenFrames);
|
|
56
|
+
const m = t.timeBetweenFrames / 1e3;
|
|
57
|
+
if (this.mass || this.stiffness) {
|
|
58
|
+
const F = (this.target - this.current) * this.stiffness - r(this, i) * this.damping;
|
|
59
|
+
n(this, i, r(this, i) + F / this.mass * m), this.current += r(this, i) * m;
|
|
60
|
+
} else
|
|
61
|
+
this.current = B(this.current, this.target, this.damping, m);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
i = new WeakMap(), h = new WeakMap();
|
|
65
|
+
export {
|
|
66
|
+
T as D
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var g=Object.defineProperty,F=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var c=(t,i,e)=>i in t?g(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e,m=(t,i)=>{for(var e in i||(i={}))y.call(i,e)&&c(t,e,i[e]);if(h)for(var e of h(i))O.call(i,e)&&c(t,e,i[e]);return t},d=(t,i)=>F(t,b(i));var q=(t,i,e)=>{if(!i.has(t))throw TypeError("Cannot "+e)};var n=(t,i,e)=>(q(t,i,"read from private field"),e?e.call(t):i.get(t)),u=(t,i,e)=>{if(i.has(t))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(t):i.set(t,e)},l=(t,i,e,r)=>(q(t,i,"write to private field"),r?r.call(t,e):i.set(t,e),e);const w=require("./easings-DsS5-Kqc.cjs"),C=require("./math-GDWEqu7y.cjs"),M=require("./number-yVpzMdbQ.cjs"),A=require("./polyfills-CrcS4RcO.cjs"),S=require("./Animation-BIRIzLIL.cjs");var a,s;class T extends S.Animation{constructor(e,r){super(e||0,r);u(this,a,w.linear);u(this,s,1e3);this.updateOptions(d(m({},r),{equalize:!0}))}updateOptions(e){super.updateOptions(e),l(this,a,A.nullishCoalescing(e==null?void 0:e.easing,n(this,a))),l(this,s,A.nullishCoalescing(e==null?void 0:e.duration,n(this,s))),e!=null&&e.restart&&(this.current=this.initial)}updateManually(e){const r=e/1e3/(n(this,s)/1e3),f=n(this,a).call(this,C.clamp(r,0,1));return this.current=M.preciseNumber(this.from+(this.to-this.from)*f,6),r}handleAnimationFrame(e){this.updateManually(e.timeElapsedSinceSubscription)>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}a=new WeakMap,s=new WeakMap;exports.Tweened=T;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var F = Object.defineProperty, g = Object.defineProperties;
|
|
2
|
+
var O = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
|
+
var b = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var l = (i, e, t) => e in i ? F(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, c = (i, e) => {
|
|
6
|
+
for (var t in e || (e = {}))
|
|
7
|
+
b.call(e, t) && l(i, t, e[t]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var t of h(e))
|
|
10
|
+
x.call(e, t) && l(i, t, e[t]);
|
|
11
|
+
return i;
|
|
12
|
+
}, d = (i, e) => g(i, O(e));
|
|
13
|
+
var f = (i, e, t) => {
|
|
14
|
+
if (!e.has(i))
|
|
15
|
+
throw TypeError("Cannot " + t);
|
|
16
|
+
};
|
|
17
|
+
var m = (i, e, t) => (f(i, e, "read from private field"), t ? t.call(i) : e.get(i)), n = (i, e, t) => {
|
|
18
|
+
if (e.has(i))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
21
|
+
}, u = (i, e, t, a) => (f(i, e, "write to private field"), a ? a.call(i, t) : e.set(i, t), t);
|
|
22
|
+
import { l as y } from "./easings-BKi40vHz.js";
|
|
23
|
+
import { c as M } from "./math-BOBiC4TN.js";
|
|
24
|
+
import { p as S } from "./number-Bo5RdrA1.js";
|
|
25
|
+
import { n as A } from "./polyfills-DJUYczFm.js";
|
|
26
|
+
import { A as T } from "./Animation-AkD1vhRW.js";
|
|
27
|
+
var r, s;
|
|
28
|
+
class j extends T {
|
|
29
|
+
constructor(t, a) {
|
|
30
|
+
super(t || 0, a);
|
|
31
|
+
n(this, r, y);
|
|
32
|
+
n(this, s, 1e3);
|
|
33
|
+
this.updateOptions(d(c({}, a), { equalize: !0 }));
|
|
34
|
+
}
|
|
35
|
+
updateOptions(t) {
|
|
36
|
+
super.updateOptions(t), u(this, r, A(t == null ? void 0 : t.easing, m(this, r))), u(this, s, A(t == null ? void 0 : t.duration, m(this, s))), t != null && t.restart && (this.current = this.initial);
|
|
37
|
+
}
|
|
38
|
+
updateManually(t) {
|
|
39
|
+
const a = t / 1e3 / (m(this, s) / 1e3), p = m(this, r).call(this, M(a, 0, 1));
|
|
40
|
+
return this.current = S(this.from + (this.to - this.from) * p, 6), a;
|
|
41
|
+
}
|
|
42
|
+
handleAnimationFrame(t) {
|
|
43
|
+
this.updateManually(t.timeElapsedSinceSubscription) > 1 && this.unlistenAnimationFrame();
|
|
44
|
+
}
|
|
45
|
+
start() {
|
|
46
|
+
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
r = new WeakMap(), s = new WeakMap();
|
|
50
|
+
export {
|
|
51
|
+
j as T
|
|
52
|
+
};
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-BIRIzLIL.cjs"),n=require("../Damped-3daHRLIW.cjs"),i=require("../Tweened-Bv9mgPvl.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
|
package/lib/animation/index.js
CHANGED
|
@@ -1,55 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var O = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var l = (i, e, t) => e in i ? F(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, c = (i, e) => {
|
|
6
|
-
for (var t in e || (e = {}))
|
|
7
|
-
O.call(e, t) && l(i, t, e[t]);
|
|
8
|
-
if (h)
|
|
9
|
-
for (var t of h(e))
|
|
10
|
-
b.call(e, t) && l(i, t, e[t]);
|
|
11
|
-
return i;
|
|
12
|
-
}, d = (i, e) => g(i, x(e));
|
|
13
|
-
var f = (i, e, t) => {
|
|
14
|
-
if (!e.has(i))
|
|
15
|
-
throw TypeError("Cannot " + t);
|
|
16
|
-
};
|
|
17
|
-
var m = (i, e, t) => (f(i, e, "read from private field"), t ? t.call(i) : e.get(i)), n = (i, e, t) => {
|
|
18
|
-
if (e.has(i))
|
|
19
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
21
|
-
}, u = (i, e, t, a) => (f(i, e, "write to private field"), a ? a.call(i, t) : e.set(i, t), t);
|
|
22
|
-
import { A as y } from "../Damped-QZAoXO5Z.js";
|
|
23
|
-
import { D as o } from "../Damped-QZAoXO5Z.js";
|
|
24
|
-
import { l as D } from "../easings-BKi40vHz.js";
|
|
25
|
-
import { c as M } from "../math-BOBiC4TN.js";
|
|
26
|
-
import { p as S } from "../number-Bo5RdrA1.js";
|
|
27
|
-
import { n as p } from "../polyfills-DJUYczFm.js";
|
|
28
|
-
var r, s;
|
|
29
|
-
class T extends y {
|
|
30
|
-
constructor(t, a) {
|
|
31
|
-
super(t || 0, a);
|
|
32
|
-
n(this, r, D);
|
|
33
|
-
n(this, s, 1e3);
|
|
34
|
-
this.updateOptions(d(c({}, a), { equalize: !0 }));
|
|
35
|
-
}
|
|
36
|
-
updateOptions(t) {
|
|
37
|
-
super.updateOptions(t), u(this, r, p(t == null ? void 0 : t.easing, m(this, r))), u(this, s, p(t == null ? void 0 : t.duration, m(this, s))), t != null && t.restart && (this.current = this.initial);
|
|
38
|
-
}
|
|
39
|
-
updateManually(t) {
|
|
40
|
-
const a = t / 1e3 / (m(this, s) / 1e3), A = m(this, r).call(this, M(a, 0, 1));
|
|
41
|
-
return this.current = S(this.from + (this.to - this.from) * A, 6), a;
|
|
42
|
-
}
|
|
43
|
-
handleAnimationFrame(t) {
|
|
44
|
-
this.updateManually(t.timeElapsedSinceSubscription) > 1 && this.unlistenAnimationFrame();
|
|
45
|
-
}
|
|
46
|
-
start() {
|
|
47
|
-
this.unlistenAnimationFrame(), this.listenAnimationFrame();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
r = new WeakMap(), s = new WeakMap();
|
|
1
|
+
import { A as r } from "../Animation-AkD1vhRW.js";
|
|
2
|
+
import { D as m } from "../Damped-CH96byE8.js";
|
|
3
|
+
import { T as t } from "../Tweened-DzckT3pw.js";
|
|
51
4
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
5
|
+
r as Animation,
|
|
6
|
+
m as Damped,
|
|
7
|
+
t as Tweened
|
|
55
8
|
};
|