@limitlesspc/std 0.21.1 → 0.22.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/dist/array.d.ts +21 -4
- package/dist/array.js +5 -4
- package/dist/async/index.d.ts +1 -1
- package/dist/async/index.js +1 -13
- package/dist/{chunk-65SNM7MP.js → chunk-4POIKW4G.js} +9 -13
- package/dist/{chunk-WNQNVZFS.js → chunk-BSIDYYJX.js} +74 -107
- package/dist/{chunk-WBSY6KRH.js → chunk-CCBSTDYA.js} +1 -1
- package/dist/{chunk-O3YCU3KN.js → chunk-SSSOLDLG.js} +2 -2
- package/dist/cmath/index.js +1 -1
- package/dist/events.js +5 -6
- package/dist/fn/index.d.ts +14 -1
- package/dist/fn/index.js +1 -2
- package/dist/gfx/index.d.ts +1 -1
- package/dist/gfx/index.js +5 -6
- package/dist/iter/index.js +2 -3
- package/dist/math/index.d.ts +39 -38
- package/dist/math/index.js +7 -14
- package/dist/random.js +4 -5
- package/dist/string/index.js +5 -3
- package/dist/structs/index.d.ts +2 -75
- package/dist/structs/index.js +232 -18
- package/dist/types.js +0 -1
- package/dist/{vec3-S_YuL-W1.d.ts → vec3-a5RuSVIr.d.ts} +5 -5
- package/package.json +51 -53
- package/dist/chunk-6F4PWJZI.js +0 -0
- package/dist/chunk-DYKZK6B5.js +0 -523
- package/dist/easing.d.ts +0 -37
- package/dist/easing.js +0 -157
- /package/dist/{chunk-MG5VQSTV.js → chunk-NXILTE26.js} +0 -0
package/dist/easing.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module
|
|
3
|
-
* Easing functions
|
|
4
|
-
*/
|
|
5
|
-
declare function linear(t: number): number;
|
|
6
|
-
declare function easeInQuad(t: number): number;
|
|
7
|
-
declare function easeOutQuad(t: number): number;
|
|
8
|
-
declare function easeInOutQuad(t: number): number;
|
|
9
|
-
declare function easeInCubic(t: number): number;
|
|
10
|
-
declare function easeOutCubic(t: number): number;
|
|
11
|
-
declare function easeInOutCubic(t: number): number;
|
|
12
|
-
declare function easeInQuart(t: number): number;
|
|
13
|
-
declare function easeOutQuart(t: number): number;
|
|
14
|
-
declare function easeInOutQuart(t: number): number;
|
|
15
|
-
declare function easeInQuint(t: number): number;
|
|
16
|
-
declare function easeOutQuint(t: number): number;
|
|
17
|
-
declare function easeInOutQuint(t: number): number;
|
|
18
|
-
declare function easeInSine(t: number): number;
|
|
19
|
-
declare function easeOutSine(t: number): number;
|
|
20
|
-
declare function easeInOutSine(t: number): number;
|
|
21
|
-
declare function easeInExpo(t: number): number;
|
|
22
|
-
declare function easeOutExpo(t: number): number;
|
|
23
|
-
declare function easeInOutExpo(t: number): number;
|
|
24
|
-
declare function easeInCirc(t: number): number;
|
|
25
|
-
declare function easeOutCirc(t: number): number;
|
|
26
|
-
declare function easeInOutCirc(t: number): number;
|
|
27
|
-
declare function easeInElastic(t: number): number;
|
|
28
|
-
declare function easeOutElastic(t: number): number;
|
|
29
|
-
declare function easeInOutElastic(t: number): number;
|
|
30
|
-
declare function easeInBack(t: number): number;
|
|
31
|
-
declare function easeOutBack(t: number): number;
|
|
32
|
-
declare function easeInOutBack(t: number): number;
|
|
33
|
-
declare function easeInBounce(t: number): number;
|
|
34
|
-
declare function easeOutBounce(t: number): number;
|
|
35
|
-
declare function easeInOutBounce(t: number): number;
|
|
36
|
-
|
|
37
|
-
export { easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, linear };
|
package/dist/easing.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
// src/easing.ts
|
|
2
|
-
function linear(t) {
|
|
3
|
-
return t;
|
|
4
|
-
}
|
|
5
|
-
function easeInQuad(t) {
|
|
6
|
-
return t * t;
|
|
7
|
-
}
|
|
8
|
-
function easeOutQuad(t) {
|
|
9
|
-
return t * (2 - t);
|
|
10
|
-
}
|
|
11
|
-
function easeInOutQuad(t) {
|
|
12
|
-
const t2 = 2 * t;
|
|
13
|
-
return t < 0.5 ? t2 * t : -1 + (4 - t2) * t;
|
|
14
|
-
}
|
|
15
|
-
function easeInCubic(t) {
|
|
16
|
-
return t * t * t;
|
|
17
|
-
}
|
|
18
|
-
function easeOutCubic(t) {
|
|
19
|
-
return 1 + --t * t * t;
|
|
20
|
-
}
|
|
21
|
-
function easeInOutCubic(t) {
|
|
22
|
-
const a = 2 * t - 2;
|
|
23
|
-
return t < 0.5 ? 4 * t * t * t : (t - 1) * a * a + 1;
|
|
24
|
-
}
|
|
25
|
-
function easeInQuart(t) {
|
|
26
|
-
const tt = t * t;
|
|
27
|
-
return tt * tt;
|
|
28
|
-
}
|
|
29
|
-
function easeOutQuart(t) {
|
|
30
|
-
const tt = --t * t;
|
|
31
|
-
return 1 - tt * tt;
|
|
32
|
-
}
|
|
33
|
-
function easeInOutQuart(t) {
|
|
34
|
-
const firstHalf = t < 0.5;
|
|
35
|
-
const tt = t * t;
|
|
36
|
-
const a = --t * t;
|
|
37
|
-
return firstHalf ? 8 * tt * tt : 1 - 8 * a * a;
|
|
38
|
-
}
|
|
39
|
-
function easeInQuint(t) {
|
|
40
|
-
const tt = t * t;
|
|
41
|
-
return tt * tt * t;
|
|
42
|
-
}
|
|
43
|
-
function easeOutQuint(t) {
|
|
44
|
-
const tt = --t * t;
|
|
45
|
-
return 1 + tt * tt * t;
|
|
46
|
-
}
|
|
47
|
-
function easeInOutQuint(t) {
|
|
48
|
-
const firstHalf = t < 0.5;
|
|
49
|
-
const tt = t * t;
|
|
50
|
-
const a = --t * t;
|
|
51
|
-
return firstHalf ? 16 * tt * tt * t : 1 + 16 * a * a * t;
|
|
52
|
-
}
|
|
53
|
-
function easeInSine(t) {
|
|
54
|
-
return 1 - Math.cos(t * Math.PI / 2);
|
|
55
|
-
}
|
|
56
|
-
function easeOutSine(t) {
|
|
57
|
-
return Math.sin(t * Math.PI / 2);
|
|
58
|
-
}
|
|
59
|
-
function easeInOutSine(t) {
|
|
60
|
-
return -(Math.cos(t * Math.PI) - 1) / 2;
|
|
61
|
-
}
|
|
62
|
-
function easeInExpo(t) {
|
|
63
|
-
return t === 0 ? 0 : 2 ** (10 * (t - 1));
|
|
64
|
-
}
|
|
65
|
-
function easeOutExpo(t) {
|
|
66
|
-
return t === 1 ? 1 : -(2 ** (-10 * t)) + 1;
|
|
67
|
-
}
|
|
68
|
-
function easeInOutExpo(t) {
|
|
69
|
-
if (t === 0 || t === 1) {
|
|
70
|
-
return t;
|
|
71
|
-
}
|
|
72
|
-
return t < 0.5 ? 2 ** (20 * (t - 1)) / 2 : -(2 ** (-20 * t)) / 2 + 1;
|
|
73
|
-
}
|
|
74
|
-
function easeInCirc(t) {
|
|
75
|
-
return 1 - Math.sqrt(1 - t * t);
|
|
76
|
-
}
|
|
77
|
-
function easeOutCirc(t) {
|
|
78
|
-
return Math.sqrt(1 - --t * t);
|
|
79
|
-
}
|
|
80
|
-
function easeInOutCirc(t) {
|
|
81
|
-
return t < 0.5 ? (1 - Math.sqrt(1 - 2 * t)) / 2 : (Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
|
|
82
|
-
}
|
|
83
|
-
function easeInElastic(t) {
|
|
84
|
-
if (t === 0 || t === 1) {
|
|
85
|
-
return t;
|
|
86
|
-
}
|
|
87
|
-
return -(2 ** (10 * (t - 1))) * Math.sin((t - 1.1) * 5 * Math.PI);
|
|
88
|
-
}
|
|
89
|
-
function easeOutElastic(t) {
|
|
90
|
-
if (t === 0 || t === 1) {
|
|
91
|
-
return t;
|
|
92
|
-
}
|
|
93
|
-
return 2 ** (-10 * t) * Math.sin((t - 0.1) * 5 * Math.PI) + 1;
|
|
94
|
-
}
|
|
95
|
-
function easeInOutElastic(t) {
|
|
96
|
-
if (t === 0 || t === 1) {
|
|
97
|
-
return t;
|
|
98
|
-
}
|
|
99
|
-
return t < 0.5 ? -(2 ** (20 * (t - 1)) * Math.sin((t - 1.1) * 5 * Math.PI)) / 2 : 2 ** (-20 * t) * Math.sin((t - 1.1) * 5 * Math.PI) / 2 + 1;
|
|
100
|
-
}
|
|
101
|
-
function easeInBack(t) {
|
|
102
|
-
return t * t * (2.70158 * t - 1.70158);
|
|
103
|
-
}
|
|
104
|
-
function easeOutBack(t) {
|
|
105
|
-
return --t * t * (2.70158 * t + 1.70158) + 1;
|
|
106
|
-
}
|
|
107
|
-
function easeInOutBack(t) {
|
|
108
|
-
return t < 0.5 ? (2.70158 * t * t * t + 2) / 2 : (1.70158 * (t - 1) * (t - 1) * (t - 1) + 2) / 2;
|
|
109
|
-
}
|
|
110
|
-
function easeInBounce(t) {
|
|
111
|
-
return 1 - easeOutBounce(1 - t);
|
|
112
|
-
}
|
|
113
|
-
function easeOutBounce(t) {
|
|
114
|
-
if (t < 1 / 2.75) {
|
|
115
|
-
return 7.5625 * t * t;
|
|
116
|
-
}
|
|
117
|
-
if (t < 2 / 2.75) {
|
|
118
|
-
return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;
|
|
119
|
-
}
|
|
120
|
-
return t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;
|
|
121
|
-
}
|
|
122
|
-
function easeInOutBounce(t) {
|
|
123
|
-
return t < 0.5 ? (1 - easeOutBounce(1 - t * 2)) / 2 : (easeOutBounce(t * 2 - 1) + 1) / 2;
|
|
124
|
-
}
|
|
125
|
-
export {
|
|
126
|
-
easeInBack,
|
|
127
|
-
easeInBounce,
|
|
128
|
-
easeInCirc,
|
|
129
|
-
easeInCubic,
|
|
130
|
-
easeInElastic,
|
|
131
|
-
easeInExpo,
|
|
132
|
-
easeInOutBack,
|
|
133
|
-
easeInOutBounce,
|
|
134
|
-
easeInOutCirc,
|
|
135
|
-
easeInOutCubic,
|
|
136
|
-
easeInOutElastic,
|
|
137
|
-
easeInOutExpo,
|
|
138
|
-
easeInOutQuad,
|
|
139
|
-
easeInOutQuart,
|
|
140
|
-
easeInOutQuint,
|
|
141
|
-
easeInOutSine,
|
|
142
|
-
easeInQuad,
|
|
143
|
-
easeInQuart,
|
|
144
|
-
easeInQuint,
|
|
145
|
-
easeInSine,
|
|
146
|
-
easeOutBack,
|
|
147
|
-
easeOutBounce,
|
|
148
|
-
easeOutCirc,
|
|
149
|
-
easeOutCubic,
|
|
150
|
-
easeOutElastic,
|
|
151
|
-
easeOutExpo,
|
|
152
|
-
easeOutQuad,
|
|
153
|
-
easeOutQuart,
|
|
154
|
-
easeOutQuint,
|
|
155
|
-
easeOutSine,
|
|
156
|
-
linear
|
|
157
|
-
};
|
|
File without changes
|