@oliversalzburg/js-utils 0.0.60-dev.0 → 0.0.60-dev.2
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/README.md +1 -1
- package/async/async.d.ts +0 -4
- package/async/async.js +0 -4
- package/async/async.js.map +1 -1
- package/core.d.ts +0 -8
- package/data/array.d.ts +0 -5
- package/data/array.js +0 -5
- package/data/array.js.map +1 -1
- package/data/nil.d.ts +0 -16
- package/data/nil.js +0 -14
- package/data/nil.js.map +1 -1
- package/data/random.d.ts +0 -4
- package/data/random.js +0 -4
- package/data/random.js.map +1 -1
- package/data/string.d.ts +0 -4
- package/data/string.js +0 -4
- package/data/string.js.map +1 -1
- package/data/tree.d.ts +0 -1
- package/data/tree.js +0 -1
- package/data/tree.js.map +1 -1
- package/device/shake.d.ts +0 -11
- package/device/shake.js +0 -1
- package/device/shake.js.map +1 -1
- package/dom/core.d.ts +0 -2
- package/dom/core.js +0 -2
- package/dom/core.js.map +1 -1
- package/errors/AbstractError.d.ts +0 -1
- package/errors/AbstractError.js +0 -1
- package/errors/AbstractError.js.map +1 -1
- package/errors/InternalError.d.ts +0 -1
- package/errors/InternalError.js +0 -1
- package/errors/InternalError.js.map +1 -1
- package/errors/InvalidArgumentError.d.ts +0 -1
- package/errors/InvalidArgumentError.js +0 -1
- package/errors/InvalidArgumentError.js.map +1 -1
- package/errors/InvalidOperationError.d.ts +0 -1
- package/errors/InvalidOperationError.js +0 -1
- package/errors/InvalidOperationError.js.map +1 -1
- package/errors/NotImplementedError.d.ts +0 -1
- package/errors/NotImplementedError.js +0 -1
- package/errors/NotImplementedError.js.map +1 -1
- package/errors/PermissionViolationError.d.ts +0 -1
- package/errors/PermissionViolationError.js +0 -1
- package/errors/PermissionViolationError.js.map +1 -1
- package/errors/ResourceConflictError.d.ts +0 -1
- package/errors/ResourceConflictError.js +0 -1
- package/errors/ResourceConflictError.js.map +1 -1
- package/errors/UnknownError.d.ts +0 -1
- package/errors/UnknownError.js +0 -1
- package/errors/UnknownError.js.map +1 -1
- package/errors/console.d.ts +0 -1
- package/errors/console.js +0 -1
- package/errors/console.js.map +1 -1
- package/errors/error-serializer.d.ts +0 -8
- package/errors/error-serializer.js +0 -6
- package/errors/error-serializer.js.map +1 -1
- package/errors/stream.d.ts +0 -1
- package/errors/stream.js +0 -1
- package/errors/stream.js.map +1 -1
- package/errors/tools.d.ts +0 -1
- package/errors/tools.js +0 -1
- package/errors/tools.js.map +1 -1
- package/events/event.d.ts +0 -1
- package/events/event.js +0 -1
- package/events/event.js.map +1 -1
- package/format/bytes.d.ts +0 -2
- package/format/bytes.js +0 -1
- package/format/bytes.js.map +1 -1
- package/format/count.d.ts +0 -1
- package/format/count.js +0 -1
- package/format/count.js.map +1 -1
- package/format/milliseconds.d.ts +0 -2
- package/format/milliseconds.js +0 -1
- package/format/milliseconds.js.map +1 -1
- package/format/string.d.ts +0 -4
- package/format/string.js +0 -4
- package/format/string.js.map +1 -1
- package/graphics/canvas-sandbox-mp.d.ts +0 -8
- package/graphics/canvas-sandbox-mp.js +0 -3
- package/graphics/canvas-sandbox-mp.js.map +1 -1
- package/graphics/canvas-sandbox.d.ts +0 -8
- package/graphics/canvas-sandbox.js +0 -5
- package/graphics/canvas-sandbox.js.map +1 -1
- package/graphics/canvas.d.ts +0 -1
- package/graphics/canvas.js +0 -1
- package/graphics/canvas.js.map +1 -1
- package/graphics/canvas2d-headless.d.ts +0 -1
- package/graphics/canvas2d-headless.js +0 -1
- package/graphics/canvas2d-headless.js.map +1 -1
- package/graphics/canvas2d.d.ts +0 -6
- package/graphics/canvas2d.js +0 -5
- package/graphics/canvas2d.js.map +1 -1
- package/graphics/canvas3d.d.ts +0 -2
- package/graphics/canvas3d.js +0 -2
- package/graphics/canvas3d.js.map +1 -1
- package/graphics/core.d.ts +0 -12
- package/graphics/core.js +0 -12
- package/graphics/core.js.map +1 -1
- package/graphics/palette-sampler.d.ts +0 -1
- package/graphics/palette-sampler.js +0 -1
- package/graphics/palette-sampler.js.map +1 -1
- package/graphics/palette.d.ts +0 -9
- package/graphics/palette.js +0 -9
- package/graphics/palette.js.map +1 -1
- package/graphics/render-loop.d.ts +0 -4
- package/graphics/render-loop.js +0 -2
- package/graphics/render-loop.js.map +1 -1
- package/graphics/shader.d.ts +0 -23
- package/graphics/shader.js +0 -20
- package/graphics/shader.js.map +1 -1
- package/log/log.d.ts +0 -1
- package/log/report.d.ts +0 -3
- package/log/report.js +0 -2
- package/log/report.js.map +1 -1
- package/math/core.d.ts +0 -13
- package/math/core.js +0 -13
- package/math/core.js.map +1 -1
- package/math/easing.d.ts +0 -34
- package/math/easing.js +0 -34
- package/math/easing.js.map +1 -1
- package/math/euler.d.ts +0 -1
- package/math/euler.js +0 -1
- package/math/euler.js.map +1 -1
- package/math/matrix3.d.ts +0 -1
- package/math/matrix3.js +0 -1
- package/math/matrix3.js.map +1 -1
- package/math/quaternion.d.ts +0 -1
- package/math/quaternion.js +0 -1
- package/math/quaternion.js.map +1 -1
- package/math/transformation.d.ts +0 -1
- package/math/transformation.js +0 -1
- package/math/transformation.js.map +1 -1
- package/math/vector2.d.ts +0 -4
- package/math/vector2.js +0 -4
- package/math/vector2.js.map +1 -1
- package/math/vector3.d.ts +0 -6
- package/math/vector3.js +0 -6
- package/math/vector3.js.map +1 -1
- package/math/vector4.d.ts +0 -1
- package/math/vector4.js +0 -1
- package/math/vector4.js.map +1 -1
- package/measurement/performance.d.ts +0 -3
- package/measurement/performance.js +0 -3
- package/measurement/performance.js.map +1 -1
- package/package.json +1 -1
package/math/core.d.ts
CHANGED
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `PI` times 2.
|
|
3
|
-
* @group Math
|
|
4
3
|
*/
|
|
5
4
|
export declare const TWO_PI: number;
|
|
6
5
|
/**
|
|
7
6
|
* Converts the degrees to radians.
|
|
8
7
|
* @param degrees - The degrees to convert to radians.
|
|
9
8
|
* @returns The degrees in radians.
|
|
10
|
-
* @group Math
|
|
11
9
|
*/
|
|
12
10
|
export declare const degreesToRadians: (degrees: number) => number;
|
|
13
11
|
/**
|
|
14
12
|
* Convertrs the radians to degrees.
|
|
15
13
|
* @param radians - The radians to convert to degrees.
|
|
16
14
|
* @returns The radians as degrees.
|
|
17
|
-
* @group Math
|
|
18
15
|
*/
|
|
19
16
|
export declare const radiansToDegrees: (radians: number) => number;
|
|
20
17
|
/**
|
|
21
18
|
* Calculates the sine for a given degree value.
|
|
22
19
|
* @param value - The value in degrees to calculate the sine for.
|
|
23
20
|
* @returns The sine for the given value.
|
|
24
|
-
* @group Math
|
|
25
21
|
*/
|
|
26
22
|
export declare const sinDegrees: (value: number) => number;
|
|
27
23
|
/**
|
|
28
24
|
* Calculates the cosine for a given degree value.
|
|
29
25
|
* @param value - The value in degrees to calculate the cosine for.
|
|
30
26
|
* @returns The cosine for the given value.
|
|
31
|
-
* @group Math
|
|
32
27
|
*/
|
|
33
28
|
export declare const cosDegrees: (value: number) => number;
|
|
34
29
|
/**
|
|
@@ -38,21 +33,18 @@ export declare const cosDegrees: (value: number) => number;
|
|
|
38
33
|
* @param x2 - The X component of the second vector.
|
|
39
34
|
* @param y2 - The Y component of the second vector.
|
|
40
35
|
* @returns The distance between the two vectors.
|
|
41
|
-
* @group Math
|
|
42
36
|
*/
|
|
43
37
|
export declare const distance: (x1: number, y1: number, x2: number, y2: number) => number;
|
|
44
38
|
/**
|
|
45
39
|
* Finds the integer square root of a positive number.
|
|
46
40
|
* @param value - The value to calcuate the square root for.
|
|
47
41
|
* @returns The square root for the given value.
|
|
48
|
-
* @group Math
|
|
49
42
|
*/
|
|
50
43
|
export declare const isqrt: (value: number) => number;
|
|
51
44
|
/**
|
|
52
45
|
* Checks whether a number is an integer.
|
|
53
46
|
* @param value - The value to check.
|
|
54
47
|
* @returns `true` when the value is an integer, `false` otherwise.
|
|
55
|
-
* @group Math
|
|
56
48
|
*/
|
|
57
49
|
export declare const isInteger: (value: number) => boolean;
|
|
58
50
|
/**
|
|
@@ -61,7 +53,6 @@ export declare const isInteger: (value: number) => boolean;
|
|
|
61
53
|
* @param floor - The lower bound.
|
|
62
54
|
* @param ceil - The upper bound.
|
|
63
55
|
* @returns The number clamped to the desired range.
|
|
64
|
-
* @group Math
|
|
65
56
|
*/
|
|
66
57
|
export declare const clamp: (input: number, floor: number, ceil: number) => number;
|
|
67
58
|
/**
|
|
@@ -69,7 +60,6 @@ export declare const clamp: (input: number, floor: number, ceil: number) => numb
|
|
|
69
60
|
* @param input - The number to round.
|
|
70
61
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
71
62
|
* @returns The rounded number.
|
|
72
|
-
* @group Math
|
|
73
63
|
*/
|
|
74
64
|
export declare const ceilTo: (input: number, fractionDigits?: number) => number;
|
|
75
65
|
/**
|
|
@@ -77,7 +67,6 @@ export declare const ceilTo: (input: number, fractionDigits?: number) => number;
|
|
|
77
67
|
* @param input - The number to round.
|
|
78
68
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
79
69
|
* @returns The rounded number.
|
|
80
|
-
* @group Math
|
|
81
70
|
*/
|
|
82
71
|
export declare const floorTo: (input: number, fractionDigits?: number) => number;
|
|
83
72
|
/**
|
|
@@ -85,7 +74,6 @@ export declare const floorTo: (input: number, fractionDigits?: number) => number
|
|
|
85
74
|
* @param input - The number to round.
|
|
86
75
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
87
76
|
* @returns The rounded number.
|
|
88
|
-
* @group Math
|
|
89
77
|
*/
|
|
90
78
|
export declare const roundTo: (input: number, fractionDigits?: number) => number;
|
|
91
79
|
/**
|
|
@@ -93,6 +81,5 @@ export declare const roundTo: (input: number, fractionDigits?: number) => number
|
|
|
93
81
|
* @param input - The number to round.
|
|
94
82
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
95
83
|
* @returns The rounded number.
|
|
96
|
-
* @group Math
|
|
97
84
|
*/
|
|
98
85
|
export declare const truncTo: (input: number, fractionDigits?: number) => number;
|
package/math/core.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `PI` times 2.
|
|
3
|
-
* @group Math
|
|
4
3
|
*/
|
|
5
4
|
export const TWO_PI = /* __PURE__ */ Math.PI * 2;
|
|
6
5
|
/**
|
|
7
6
|
* Converts the degrees to radians.
|
|
8
7
|
* @param degrees - The degrees to convert to radians.
|
|
9
8
|
* @returns The degrees in radians.
|
|
10
|
-
* @group Math
|
|
11
9
|
*/
|
|
12
10
|
export const degreesToRadians = (degrees) => {
|
|
13
11
|
return degrees * (Math.PI / 180);
|
|
@@ -16,7 +14,6 @@ export const degreesToRadians = (degrees) => {
|
|
|
16
14
|
* Convertrs the radians to degrees.
|
|
17
15
|
* @param radians - The radians to convert to degrees.
|
|
18
16
|
* @returns The radians as degrees.
|
|
19
|
-
* @group Math
|
|
20
17
|
*/
|
|
21
18
|
export const radiansToDegrees = (radians) => {
|
|
22
19
|
return radians * (180 / Math.PI);
|
|
@@ -25,7 +22,6 @@ export const radiansToDegrees = (radians) => {
|
|
|
25
22
|
* Calculates the sine for a given degree value.
|
|
26
23
|
* @param value - The value in degrees to calculate the sine for.
|
|
27
24
|
* @returns The sine for the given value.
|
|
28
|
-
* @group Math
|
|
29
25
|
*/
|
|
30
26
|
export const sinDegrees = (value) => {
|
|
31
27
|
return Math.sin(degreesToRadians(value));
|
|
@@ -34,7 +30,6 @@ export const sinDegrees = (value) => {
|
|
|
34
30
|
* Calculates the cosine for a given degree value.
|
|
35
31
|
* @param value - The value in degrees to calculate the cosine for.
|
|
36
32
|
* @returns The cosine for the given value.
|
|
37
|
-
* @group Math
|
|
38
33
|
*/
|
|
39
34
|
export const cosDegrees = (value) => {
|
|
40
35
|
return Math.cos(degreesToRadians(value));
|
|
@@ -46,7 +41,6 @@ export const cosDegrees = (value) => {
|
|
|
46
41
|
* @param x2 - The X component of the second vector.
|
|
47
42
|
* @param y2 - The Y component of the second vector.
|
|
48
43
|
* @returns The distance between the two vectors.
|
|
49
|
-
* @group Math
|
|
50
44
|
*/
|
|
51
45
|
export const distance = (x1, y1, x2, y2) => {
|
|
52
46
|
const distx = x2 - x1;
|
|
@@ -57,7 +51,6 @@ export const distance = (x1, y1, x2, y2) => {
|
|
|
57
51
|
* Finds the integer square root of a positive number.
|
|
58
52
|
* @param value - The value to calcuate the square root for.
|
|
59
53
|
* @returns The square root for the given value.
|
|
60
|
-
* @group Math
|
|
61
54
|
*/
|
|
62
55
|
export const isqrt = (value) => {
|
|
63
56
|
if (0 === value) {
|
|
@@ -75,7 +68,6 @@ export const isqrt = (value) => {
|
|
|
75
68
|
* Checks whether a number is an integer.
|
|
76
69
|
* @param value - The value to check.
|
|
77
70
|
* @returns `true` when the value is an integer, `false` otherwise.
|
|
78
|
-
* @group Math
|
|
79
71
|
*/
|
|
80
72
|
export const isInteger = (value) => {
|
|
81
73
|
return Math.trunc(value) === value;
|
|
@@ -86,7 +78,6 @@ export const isInteger = (value) => {
|
|
|
86
78
|
* @param floor - The lower bound.
|
|
87
79
|
* @param ceil - The upper bound.
|
|
88
80
|
* @returns The number clamped to the desired range.
|
|
89
|
-
* @group Math
|
|
90
81
|
*/
|
|
91
82
|
export const clamp = (input, floor, ceil) => {
|
|
92
83
|
return Math.max(floor, Math.min(input, ceil));
|
|
@@ -96,7 +87,6 @@ export const clamp = (input, floor, ceil) => {
|
|
|
96
87
|
* @param input - The number to round.
|
|
97
88
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
98
89
|
* @returns The rounded number.
|
|
99
|
-
* @group Math
|
|
100
90
|
*/
|
|
101
91
|
export const ceilTo = (input, fractionDigits = 0) => {
|
|
102
92
|
const scale = Math.pow(10, fractionDigits);
|
|
@@ -107,7 +97,6 @@ export const ceilTo = (input, fractionDigits = 0) => {
|
|
|
107
97
|
* @param input - The number to round.
|
|
108
98
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
109
99
|
* @returns The rounded number.
|
|
110
|
-
* @group Math
|
|
111
100
|
*/
|
|
112
101
|
export const floorTo = (input, fractionDigits = 0) => {
|
|
113
102
|
const scale = Math.pow(10, fractionDigits);
|
|
@@ -118,7 +107,6 @@ export const floorTo = (input, fractionDigits = 0) => {
|
|
|
118
107
|
* @param input - The number to round.
|
|
119
108
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
120
109
|
* @returns The rounded number.
|
|
121
|
-
* @group Math
|
|
122
110
|
*/
|
|
123
111
|
export const roundTo = (input, fractionDigits = 0) => {
|
|
124
112
|
const scale = Math.pow(10, fractionDigits);
|
|
@@ -129,7 +117,6 @@ export const roundTo = (input, fractionDigits = 0) => {
|
|
|
129
117
|
* @param input - The number to round.
|
|
130
118
|
* @param fractionDigits - The amount of digits to retain in the fraction.
|
|
131
119
|
* @returns The rounded number.
|
|
132
|
-
* @group Math
|
|
133
120
|
*/
|
|
134
121
|
export const truncTo = (input, fractionDigits = 0) => {
|
|
135
122
|
const scale = Math.pow(10, fractionDigits);
|
package/math/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../source/math/core.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../source/math/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAEjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;IAClD,OAAO,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;IAClD,OAAO,OAAO,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF;;;;GAIG;AACH,M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CAAC,EAAU,EAAE;IACnE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAC3C,CAAC,CAAC"}
|
package/math/easing.d.ts
CHANGED
|
@@ -2,237 +2,203 @@
|
|
|
2
2
|
* Calculates an easing multiplier for: Quad In
|
|
3
3
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
4
4
|
* @returns The easing multiplier for the position.
|
|
5
|
-
* @group Easing
|
|
6
5
|
*/
|
|
7
6
|
export declare const easeInQuad: (position: number) => number;
|
|
8
7
|
/**
|
|
9
8
|
* Calculates an easing multiplier for: Quad Out
|
|
10
9
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
11
10
|
* @returns The easing multiplier for the position.
|
|
12
|
-
* @group Easing
|
|
13
11
|
*/
|
|
14
12
|
export declare const easeOutQuad: (position: number) => number;
|
|
15
13
|
/**
|
|
16
14
|
* Calculates an easing multiplier for: Quad In+Out
|
|
17
15
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
18
16
|
* @returns The easing multiplier for the position.
|
|
19
|
-
* @group Easing
|
|
20
17
|
*/
|
|
21
18
|
export declare const easeInOutQuad: (position: number) => number;
|
|
22
19
|
/**
|
|
23
20
|
* Calculates an easing multiplier for: Cubic In
|
|
24
21
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
25
22
|
* @returns The easing multiplier for the position.
|
|
26
|
-
* @group Easing
|
|
27
23
|
*/
|
|
28
24
|
export declare const easeInCubic: (position: number) => number;
|
|
29
25
|
/**
|
|
30
26
|
* Calculates an easing multiplier for: Cubic Out
|
|
31
27
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
32
28
|
* @returns The easing multiplier for the position.
|
|
33
|
-
* @group Easing
|
|
34
29
|
*/
|
|
35
30
|
export declare const easeOutCubic: (position: number) => number;
|
|
36
31
|
/**
|
|
37
32
|
* Calculates an easing multiplier for: Cubic In+Out
|
|
38
33
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
39
34
|
* @returns The easing multiplier for the position.
|
|
40
|
-
* @group Easing
|
|
41
35
|
*/
|
|
42
36
|
export declare const easeInOutCubic: (position: number) => number;
|
|
43
37
|
/**
|
|
44
38
|
* Calculates an easing multiplier for: Quart In
|
|
45
39
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
46
40
|
* @returns The easing multiplier for the position.
|
|
47
|
-
* @group Easing
|
|
48
41
|
*/
|
|
49
42
|
export declare const easeInQuart: (position: number) => number;
|
|
50
43
|
/**
|
|
51
44
|
* Calculates an easing multiplier for: Quad Out
|
|
52
45
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
53
46
|
* @returns The easing multiplier for the position.
|
|
54
|
-
* @group Easing
|
|
55
47
|
*/
|
|
56
48
|
export declare const easeOutQuart: (position: number) => number;
|
|
57
49
|
/**
|
|
58
50
|
* Calculates an easing multiplier for: Quart In+Out
|
|
59
51
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
60
52
|
* @returns The easing multiplier for the position.
|
|
61
|
-
* @group Easing
|
|
62
53
|
*/
|
|
63
54
|
export declare const easeInOutQuart: (position: number) => number;
|
|
64
55
|
/**
|
|
65
56
|
* Calculates an easing multiplier for: Quint In
|
|
66
57
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
67
58
|
* @returns The easing multiplier for the position.
|
|
68
|
-
* @group Easing
|
|
69
59
|
*/
|
|
70
60
|
export declare const easeInQuint: (position: number) => number;
|
|
71
61
|
/**
|
|
72
62
|
* Calculates an easing multiplier for: Quint Out
|
|
73
63
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
74
64
|
* @returns The easing multiplier for the position.
|
|
75
|
-
* @group Easing
|
|
76
65
|
*/
|
|
77
66
|
export declare const easeOutQuint: (position: number) => number;
|
|
78
67
|
/**
|
|
79
68
|
* Calculates an easing multiplier for: Quint In+Out
|
|
80
69
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
81
70
|
* @returns The easing multiplier for the position.
|
|
82
|
-
* @group Easing
|
|
83
71
|
*/
|
|
84
72
|
export declare const easeInOutQuint: (position: number) => number;
|
|
85
73
|
/**
|
|
86
74
|
* Calculates an easing multiplier for: Sine In
|
|
87
75
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
88
76
|
* @returns The easing multiplier for the position.
|
|
89
|
-
* @group Easing
|
|
90
77
|
*/
|
|
91
78
|
export declare const easeInSine: (position: number) => number;
|
|
92
79
|
/**
|
|
93
80
|
* Calculates an easing multiplier for: Sine Out
|
|
94
81
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
95
82
|
* @returns The easing multiplier for the position.
|
|
96
|
-
* @group Easing
|
|
97
83
|
*/
|
|
98
84
|
export declare const easeOutSine: (position: number) => number;
|
|
99
85
|
/**
|
|
100
86
|
* Calculates an easing multiplier for: Sine In+Out
|
|
101
87
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
102
88
|
* @returns The easing multiplier for the position.
|
|
103
|
-
* @group Easing
|
|
104
89
|
*/
|
|
105
90
|
export declare const easeInOutSine: (position: number) => number;
|
|
106
91
|
/**
|
|
107
92
|
* Calculates an easing multiplier for: Expo In
|
|
108
93
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
109
94
|
* @returns The easing multiplier for the position.
|
|
110
|
-
* @group Easing
|
|
111
95
|
*/
|
|
112
96
|
export declare const easeInExpo: (position: number) => number;
|
|
113
97
|
/**
|
|
114
98
|
* Calculates an easing multiplier for: Expo Out
|
|
115
99
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
116
100
|
* @returns The easing multiplier for the position.
|
|
117
|
-
* @group Easing
|
|
118
101
|
*/
|
|
119
102
|
export declare const easeOutExpo: (position: number) => number;
|
|
120
103
|
/**
|
|
121
104
|
* Calculates an easing multiplier for: Expo In+Out
|
|
122
105
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
123
106
|
* @returns The easing multiplier for the position.
|
|
124
|
-
* @group Easing
|
|
125
107
|
*/
|
|
126
108
|
export declare const easeInOutExpo: (position: number) => number;
|
|
127
109
|
/**
|
|
128
110
|
* Calculates an easing multiplier for: Circ In
|
|
129
111
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
130
112
|
* @returns The easing multiplier for the position.
|
|
131
|
-
* @group Easing
|
|
132
113
|
*/
|
|
133
114
|
export declare const easeInCirc: (position: number) => number;
|
|
134
115
|
/**
|
|
135
116
|
* Calculates an easing multiplier for: Circ Out
|
|
136
117
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
137
118
|
* @returns The easing multiplier for the position.
|
|
138
|
-
* @group Easing
|
|
139
119
|
*/
|
|
140
120
|
export declare const easeOutCirc: (position: number) => number;
|
|
141
121
|
/**
|
|
142
122
|
* Calculates an easing multiplier for: Circ In+Out
|
|
143
123
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
144
124
|
* @returns The easing multiplier for the position.
|
|
145
|
-
* @group Easing
|
|
146
125
|
*/
|
|
147
126
|
export declare const easeInOutCirc: (position: number) => number;
|
|
148
127
|
/**
|
|
149
128
|
* Calculates an easing multiplier for: Bounce Out
|
|
150
129
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
151
130
|
* @returns The easing multiplier for the position.
|
|
152
|
-
* @group Easing
|
|
153
131
|
*/
|
|
154
132
|
export declare const easeOutBounce: (position: number) => number;
|
|
155
133
|
/**
|
|
156
134
|
* Calculates an easing multiplier for: Back In
|
|
157
135
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
158
136
|
* @returns The easing multiplier for the position.
|
|
159
|
-
* @group Easing
|
|
160
137
|
*/
|
|
161
138
|
export declare const easeInBack: (position: number) => number;
|
|
162
139
|
/**
|
|
163
140
|
* Calculates an easing multiplier for: Back Out
|
|
164
141
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
165
142
|
* @returns The easing multiplier for the position.
|
|
166
|
-
* @group Easing
|
|
167
143
|
*/
|
|
168
144
|
export declare const easeOutBack: (position: number) => number;
|
|
169
145
|
/**
|
|
170
146
|
* Calculates an easing multiplier for: Back In+Out
|
|
171
147
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
172
148
|
* @returns The easing multiplier for the position.
|
|
173
|
-
* @group Easing
|
|
174
149
|
*/
|
|
175
150
|
export declare const easeInOutBack: (position: number) => number;
|
|
176
151
|
/**
|
|
177
152
|
* Calculates an easing multiplier for: Elastic
|
|
178
153
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
179
154
|
* @returns The easing multiplier for the position.
|
|
180
|
-
* @group Easing
|
|
181
155
|
*/
|
|
182
156
|
export declare const easeElastic: (position: number) => number;
|
|
183
157
|
/**
|
|
184
158
|
* Calculates an easing multiplier for: Swing In+Out
|
|
185
159
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
186
160
|
* @returns The easing multiplier for the position.
|
|
187
|
-
* @group Easing
|
|
188
161
|
*/
|
|
189
162
|
export declare const swingInOut: (position: number) => number;
|
|
190
163
|
/**
|
|
191
164
|
* Calculates an easing multiplier for: Swing In
|
|
192
165
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
193
166
|
* @returns The easing multiplier for the position.
|
|
194
|
-
* @group Easing
|
|
195
167
|
*/
|
|
196
168
|
export declare const easeSwingIn: (position: number) => number;
|
|
197
169
|
/**
|
|
198
170
|
* Calculates an easing multiplier for: Swing Out
|
|
199
171
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
200
172
|
* @returns The easing multiplier for the position.
|
|
201
|
-
* @group Easing
|
|
202
173
|
*/
|
|
203
174
|
export declare const easeSwingOut: (position: number) => number;
|
|
204
175
|
/**
|
|
205
176
|
* Calculates an easing multiplier for: Bounce
|
|
206
177
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
207
178
|
* @returns The easing multiplier for the position.
|
|
208
|
-
* @group Easing
|
|
209
179
|
*/
|
|
210
180
|
export declare const easeBounce: (position: number) => number;
|
|
211
181
|
/**
|
|
212
182
|
* Calculates an easing multiplier for: Bounce Past
|
|
213
183
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
214
184
|
* @returns The easing multiplier for the position.
|
|
215
|
-
* @group Easing
|
|
216
185
|
*/
|
|
217
186
|
export declare const easeBouncePast: (position: number) => number;
|
|
218
187
|
/**
|
|
219
188
|
* Calculates an easing multiplier for: Simple In+Out
|
|
220
189
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
221
190
|
* @returns The easing multiplier for the position.
|
|
222
|
-
* @group Easing
|
|
223
191
|
*/
|
|
224
192
|
export declare const easeFromTo: (position: number) => number;
|
|
225
193
|
/**
|
|
226
194
|
* Calculates an easing multiplier for: Simple In
|
|
227
195
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
228
196
|
* @returns The easing multiplier for the position.
|
|
229
|
-
* @group Easing
|
|
230
197
|
*/
|
|
231
198
|
export declare const easeFrom: (position: number) => number;
|
|
232
199
|
/**
|
|
233
200
|
* Calculates an easing multiplier for: Simple Out
|
|
234
201
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
235
202
|
* @returns The easing multiplier for the position.
|
|
236
|
-
* @group Easing
|
|
237
203
|
*/
|
|
238
204
|
export declare const easeTo: (position: number) => number;
|