@pawells/math-extended 1.0.1
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/LICENSE +21 -0
- package/README.md +319 -0
- package/build/angles.d.ts +31 -0
- package/build/angles.d.ts.map +1 -0
- package/build/angles.js +85 -0
- package/build/angles.js.map +1 -0
- package/build/angles.spec.d.ts +2 -0
- package/build/angles.spec.d.ts.map +1 -0
- package/build/angles.spec.js +147 -0
- package/build/angles.spec.js.map +1 -0
- package/build/clamp.d.ts +17 -0
- package/build/clamp.d.ts.map +1 -0
- package/build/clamp.js +19 -0
- package/build/clamp.js.map +1 -0
- package/build/clamp.spec.d.ts +2 -0
- package/build/clamp.spec.d.ts.map +1 -0
- package/build/clamp.spec.js +19 -0
- package/build/clamp.spec.js.map +1 -0
- package/build/documentation-validation.spec.d.ts +11 -0
- package/build/documentation-validation.spec.d.ts.map +1 -0
- package/build/documentation-validation.spec.js +401 -0
- package/build/documentation-validation.spec.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +8 -0
- package/build/index.js.map +1 -0
- package/build/interpolation.d.ts +175 -0
- package/build/interpolation.d.ts.map +1 -0
- package/build/interpolation.js +369 -0
- package/build/interpolation.js.map +1 -0
- package/build/interpolation.spec.d.ts +2 -0
- package/build/interpolation.spec.d.ts.map +1 -0
- package/build/interpolation.spec.js +480 -0
- package/build/interpolation.spec.js.map +1 -0
- package/build/matrices/arithmetic.d.ts +411 -0
- package/build/matrices/arithmetic.d.ts.map +1 -0
- package/build/matrices/arithmetic.js +954 -0
- package/build/matrices/arithmetic.js.map +1 -0
- package/build/matrices/arithmetic.spec.d.ts +2 -0
- package/build/matrices/arithmetic.spec.d.ts.map +1 -0
- package/build/matrices/arithmetic.spec.js +915 -0
- package/build/matrices/arithmetic.spec.js.map +1 -0
- package/build/matrices/asserts.d.ts +306 -0
- package/build/matrices/asserts.d.ts.map +1 -0
- package/build/matrices/asserts.js +396 -0
- package/build/matrices/asserts.js.map +1 -0
- package/build/matrices/asserts.spec.d.ts +2 -0
- package/build/matrices/asserts.spec.d.ts.map +1 -0
- package/build/matrices/asserts.spec.js +565 -0
- package/build/matrices/asserts.spec.js.map +1 -0
- package/build/matrices/core.d.ts +168 -0
- package/build/matrices/core.d.ts.map +1 -0
- package/build/matrices/core.js +457 -0
- package/build/matrices/core.js.map +1 -0
- package/build/matrices/core.spec.d.ts +2 -0
- package/build/matrices/core.spec.d.ts.map +1 -0
- package/build/matrices/core.spec.js +634 -0
- package/build/matrices/core.spec.js.map +1 -0
- package/build/matrices/decompositions.d.ts +326 -0
- package/build/matrices/decompositions.d.ts.map +1 -0
- package/build/matrices/decompositions.js +816 -0
- package/build/matrices/decompositions.js.map +1 -0
- package/build/matrices/decompositions.spec.d.ts +2 -0
- package/build/matrices/decompositions.spec.d.ts.map +1 -0
- package/build/matrices/decompositions.spec.js +195 -0
- package/build/matrices/decompositions.spec.js.map +1 -0
- package/build/matrices/index.d.ts +9 -0
- package/build/matrices/index.d.ts.map +1 -0
- package/build/matrices/index.js +9 -0
- package/build/matrices/index.js.map +1 -0
- package/build/matrices/linear-algebra.d.ts +64 -0
- package/build/matrices/linear-algebra.d.ts.map +1 -0
- package/build/matrices/linear-algebra.js +253 -0
- package/build/matrices/linear-algebra.js.map +1 -0
- package/build/matrices/linear-algebra.spec.d.ts +2 -0
- package/build/matrices/linear-algebra.spec.d.ts.map +1 -0
- package/build/matrices/linear-algebra.spec.js +355 -0
- package/build/matrices/linear-algebra.spec.js.map +1 -0
- package/build/matrices/normalization.d.ts +62 -0
- package/build/matrices/normalization.d.ts.map +1 -0
- package/build/matrices/normalization.js +167 -0
- package/build/matrices/normalization.js.map +1 -0
- package/build/matrices/normalization.spec.d.ts +2 -0
- package/build/matrices/normalization.spec.d.ts.map +1 -0
- package/build/matrices/normalization.spec.js +335 -0
- package/build/matrices/normalization.spec.js.map +1 -0
- package/build/matrices/transformations.d.ts +484 -0
- package/build/matrices/transformations.d.ts.map +1 -0
- package/build/matrices/transformations.js +592 -0
- package/build/matrices/transformations.js.map +1 -0
- package/build/matrices/transformations.spec.d.ts +2 -0
- package/build/matrices/transformations.spec.d.ts.map +1 -0
- package/build/matrices/transformations.spec.js +755 -0
- package/build/matrices/transformations.spec.js.map +1 -0
- package/build/matrices/types.d.ts +134 -0
- package/build/matrices/types.d.ts.map +1 -0
- package/build/matrices/types.js +6 -0
- package/build/matrices/types.js.map +1 -0
- package/build/quaternions/asserts.d.ts +77 -0
- package/build/quaternions/asserts.d.ts.map +1 -0
- package/build/quaternions/asserts.js +175 -0
- package/build/quaternions/asserts.js.map +1 -0
- package/build/quaternions/asserts.spec.d.ts +2 -0
- package/build/quaternions/asserts.spec.d.ts.map +1 -0
- package/build/quaternions/asserts.spec.js +320 -0
- package/build/quaternions/asserts.spec.js.map +1 -0
- package/build/quaternions/conversions.d.ts +73 -0
- package/build/quaternions/conversions.d.ts.map +1 -0
- package/build/quaternions/conversions.js +179 -0
- package/build/quaternions/conversions.js.map +1 -0
- package/build/quaternions/conversions.spec.d.ts +2 -0
- package/build/quaternions/conversions.spec.d.ts.map +1 -0
- package/build/quaternions/conversions.spec.js +344 -0
- package/build/quaternions/conversions.spec.js.map +1 -0
- package/build/quaternions/core.d.ts +203 -0
- package/build/quaternions/core.d.ts.map +1 -0
- package/build/quaternions/core.js +374 -0
- package/build/quaternions/core.js.map +1 -0
- package/build/quaternions/core.spec.d.ts +2 -0
- package/build/quaternions/core.spec.d.ts.map +1 -0
- package/build/quaternions/core.spec.js +294 -0
- package/build/quaternions/core.spec.js.map +1 -0
- package/build/quaternions/index.d.ts +7 -0
- package/build/quaternions/index.d.ts.map +1 -0
- package/build/quaternions/index.js +7 -0
- package/build/quaternions/index.js.map +1 -0
- package/build/quaternions/interpolation.d.ts +54 -0
- package/build/quaternions/interpolation.d.ts.map +1 -0
- package/build/quaternions/interpolation.js +201 -0
- package/build/quaternions/interpolation.js.map +1 -0
- package/build/quaternions/interpolation.spec.d.ts +2 -0
- package/build/quaternions/interpolation.spec.d.ts.map +1 -0
- package/build/quaternions/interpolation.spec.js +64 -0
- package/build/quaternions/interpolation.spec.js.map +1 -0
- package/build/quaternions/predefined.d.ts +36 -0
- package/build/quaternions/predefined.d.ts.map +1 -0
- package/build/quaternions/predefined.js +42 -0
- package/build/quaternions/predefined.js.map +1 -0
- package/build/quaternions/predefined.spec.d.ts +2 -0
- package/build/quaternions/predefined.spec.d.ts.map +1 -0
- package/build/quaternions/predefined.spec.js +35 -0
- package/build/quaternions/predefined.spec.js.map +1 -0
- package/build/quaternions/types.d.ts +55 -0
- package/build/quaternions/types.d.ts.map +1 -0
- package/build/quaternions/types.js +7 -0
- package/build/quaternions/types.js.map +1 -0
- package/build/random.d.ts +66 -0
- package/build/random.d.ts.map +1 -0
- package/build/random.js +115 -0
- package/build/random.js.map +1 -0
- package/build/random.spec.d.ts +2 -0
- package/build/random.spec.d.ts.map +1 -0
- package/build/random.spec.js +267 -0
- package/build/random.spec.js.map +1 -0
- package/build/vectors/asserts.d.ts +182 -0
- package/build/vectors/asserts.d.ts.map +1 -0
- package/build/vectors/asserts.js +285 -0
- package/build/vectors/asserts.js.map +1 -0
- package/build/vectors/asserts.spec.d.ts +2 -0
- package/build/vectors/asserts.spec.d.ts.map +1 -0
- package/build/vectors/asserts.spec.js +260 -0
- package/build/vectors/asserts.spec.js.map +1 -0
- package/build/vectors/core.d.ts +507 -0
- package/build/vectors/core.d.ts.map +1 -0
- package/build/vectors/core.js +825 -0
- package/build/vectors/core.js.map +1 -0
- package/build/vectors/core.spec.d.ts +2 -0
- package/build/vectors/core.spec.d.ts.map +1 -0
- package/build/vectors/core.spec.js +343 -0
- package/build/vectors/core.spec.js.map +1 -0
- package/build/vectors/index.d.ts +6 -0
- package/build/vectors/index.d.ts.map +1 -0
- package/build/vectors/index.js +6 -0
- package/build/vectors/index.js.map +1 -0
- package/build/vectors/interpolation.d.ts +404 -0
- package/build/vectors/interpolation.d.ts.map +1 -0
- package/build/vectors/interpolation.js +585 -0
- package/build/vectors/interpolation.js.map +1 -0
- package/build/vectors/interpolation.spec.d.ts +2 -0
- package/build/vectors/interpolation.spec.d.ts.map +1 -0
- package/build/vectors/interpolation.spec.js +378 -0
- package/build/vectors/interpolation.spec.js.map +1 -0
- package/build/vectors/predefined.d.ts +191 -0
- package/build/vectors/predefined.d.ts.map +1 -0
- package/build/vectors/predefined.js +191 -0
- package/build/vectors/predefined.js.map +1 -0
- package/build/vectors/predefined.spec.d.ts +2 -0
- package/build/vectors/predefined.spec.d.ts.map +1 -0
- package/build/vectors/predefined.spec.js +333 -0
- package/build/vectors/predefined.spec.js.map +1 -0
- package/build/vectors/types.d.ts +62 -0
- package/build/vectors/types.d.ts.map +1 -0
- package/build/vectors/types.js +6 -0
- package/build/vectors/types.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear interpolation (LERP) between two scalar values.
|
|
3
|
+
* Maps parameter `t` proportionally between `a` (at t=0) and `b` (at t=1).
|
|
4
|
+
* Values of `t` outside [0,1] produce extrapolation beyond the endpoints.
|
|
5
|
+
*
|
|
6
|
+
* @param a - Start value (result when t = 0)
|
|
7
|
+
* @param b - End value (result when t = 1)
|
|
8
|
+
* @param t - Interpolation parameter — unclamped, allowing extrapolation
|
|
9
|
+
* @returns `a + (b - a) * t`
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* LinearInterpolation(0, 100, 0.5) // 50
|
|
13
|
+
* LinearInterpolation(0, 100, 0) // 0
|
|
14
|
+
* LinearInterpolation(0, 100, 1) // 100
|
|
15
|
+
* LinearInterpolation(0, 100, 1.5) // 150 (extrapolation)
|
|
16
|
+
*/
|
|
17
|
+
export declare function LinearInterpolation(a: number, b: number, t: number): number;
|
|
18
|
+
/**
|
|
19
|
+
* Smooth step interpolation (3t² - 2t³)
|
|
20
|
+
* Provides smooth acceleration and deceleration with zero derivatives at endpoints
|
|
21
|
+
*/
|
|
22
|
+
export declare function SmoothStep(a: number, b: number, t: number): number;
|
|
23
|
+
/**
|
|
24
|
+
* Smoother step interpolation (6t⁵ - 15t⁴ + 10t³)
|
|
25
|
+
* Even smoother than SmoothStep with zero first and second derivatives at endpoints
|
|
26
|
+
*/
|
|
27
|
+
export declare function SmootherStep(a: number, b: number, t: number): number;
|
|
28
|
+
/**
|
|
29
|
+
* Quadratic ease-in interpolation (t²)
|
|
30
|
+
* Accelerates slowly at the beginning
|
|
31
|
+
*/
|
|
32
|
+
export declare function QuadraticEaseIn(a: number, b: number, t: number): number;
|
|
33
|
+
/**
|
|
34
|
+
* Quadratic ease-out interpolation (1 - (1-t)²)
|
|
35
|
+
* Decelerates slowly at the end
|
|
36
|
+
*/
|
|
37
|
+
export declare function QuadraticEaseOut(a: number, b: number, t: number): number;
|
|
38
|
+
/**
|
|
39
|
+
* Cubic ease-in interpolation (t³)
|
|
40
|
+
* More pronounced acceleration than quadratic
|
|
41
|
+
*/
|
|
42
|
+
export declare function CubicEaseIn(a: number, b: number, t: number): number;
|
|
43
|
+
/**
|
|
44
|
+
* Cubic ease-out interpolation (1 - (1-t)³)
|
|
45
|
+
* More pronounced deceleration than quadratic
|
|
46
|
+
*/
|
|
47
|
+
export declare function CubicEaseOut(a: number, b: number, t: number): number;
|
|
48
|
+
/**
|
|
49
|
+
* Cosine interpolation - smooth curve using cosine function
|
|
50
|
+
* Provides natural easing similar to SmoothStep but using trigonometry
|
|
51
|
+
*/
|
|
52
|
+
export declare function CosineInterpolation(a: number, b: number, t: number): number;
|
|
53
|
+
/**
|
|
54
|
+
* Sine ease-in interpolation
|
|
55
|
+
* Slow start with smooth acceleration
|
|
56
|
+
*/
|
|
57
|
+
export declare function SineEaseIn(a: number, b: number, t: number): number;
|
|
58
|
+
/**
|
|
59
|
+
* Sine ease-out interpolation
|
|
60
|
+
* Smooth deceleration to the end
|
|
61
|
+
*/
|
|
62
|
+
export declare function SineEaseOut(a: number, b: number, t: number): number;
|
|
63
|
+
/**
|
|
64
|
+
* Exponential ease-in interpolation
|
|
65
|
+
* Very slow start, then rapid acceleration
|
|
66
|
+
*/
|
|
67
|
+
export declare function ExponentialEaseIn(a: number, b: number, t: number): number;
|
|
68
|
+
/**
|
|
69
|
+
* Exponential ease-out interpolation
|
|
70
|
+
* Rapid start, then very slow deceleration
|
|
71
|
+
*/
|
|
72
|
+
export declare function ExponentialEaseOut(a: number, b: number, t: number): number;
|
|
73
|
+
/**
|
|
74
|
+
* Elastic ease-out - bouncy spring-like motion
|
|
75
|
+
* Creates an overshoot effect that bounces back
|
|
76
|
+
*/
|
|
77
|
+
export declare function ElasticEaseOut(a: number, b: number, t: number): number;
|
|
78
|
+
/**
|
|
79
|
+
* Back ease-out - overshoots then settles
|
|
80
|
+
* Creates a slight overshoot before settling at the target
|
|
81
|
+
*/
|
|
82
|
+
export declare function BackEaseOut(a: number, b: number, t: number): number;
|
|
83
|
+
/**
|
|
84
|
+
* Bounce ease-out - bouncing ball effect
|
|
85
|
+
* Simulates a ball bouncing to rest
|
|
86
|
+
*/
|
|
87
|
+
export declare function BounceEaseOut(a: number, b: number, t: number): number;
|
|
88
|
+
/**
|
|
89
|
+
* Catmull-Rom spline interpolation between 4 points
|
|
90
|
+
* Useful for smooth curves through multiple points
|
|
91
|
+
*/
|
|
92
|
+
export declare function CatmullRomInterpolation(p0: number, p1: number, p2: number, p3: number, t: number): number;
|
|
93
|
+
/**
|
|
94
|
+
* Hermite interpolation with tangent control
|
|
95
|
+
* Provides precise control over curve tangents at endpoints
|
|
96
|
+
*/
|
|
97
|
+
export declare function HermiteInterpolation(p0: number, p1: number, t0: number, t1: number, t: number): number;
|
|
98
|
+
/**
|
|
99
|
+
* Circular ease-in interpolation
|
|
100
|
+
* Creates an accelerating curve based on quarter circle
|
|
101
|
+
*/
|
|
102
|
+
export declare function CircularEaseIn(a: number, b: number, t: number): number;
|
|
103
|
+
/**
|
|
104
|
+
* Circular ease-out interpolation
|
|
105
|
+
* Creates a decelerating curve based on quarter circle
|
|
106
|
+
*/
|
|
107
|
+
export declare function CircularEaseOut(a: number, b: number, t: number): number;
|
|
108
|
+
/**
|
|
109
|
+
* Quadratic ease-in-out interpolation (2t² for t<0.5, 1−(−2t+2)²/2 for t≥0.5)
|
|
110
|
+
* Symmetrically accelerates at the start and decelerates at the end
|
|
111
|
+
*/
|
|
112
|
+
export declare function QuadraticEaseInOut(a: number, b: number, t: number): number;
|
|
113
|
+
/**
|
|
114
|
+
* Cubic ease-in-out interpolation (4t³ for t<0.5, 1−(−2t+2)³/2 for t≥0.5)
|
|
115
|
+
* More pronounced symmetrical acceleration/deceleration than quadratic
|
|
116
|
+
*/
|
|
117
|
+
export declare function CubicEaseInOut(a: number, b: number, t: number): number;
|
|
118
|
+
/**
|
|
119
|
+
* Sine ease-in-out interpolation (−(cos(πt)−1)/2)
|
|
120
|
+
* Smooth symmetric easing using cosine — gentle and natural feeling
|
|
121
|
+
*/
|
|
122
|
+
export declare function SineEaseInOut(a: number, b: number, t: number): number;
|
|
123
|
+
/**
|
|
124
|
+
* Exponential ease-in-out interpolation
|
|
125
|
+
* Very slow at both ends, extremely rapid in the middle
|
|
126
|
+
*/
|
|
127
|
+
export declare function ExponentialEaseInOut(a: number, b: number, t: number): number;
|
|
128
|
+
/**
|
|
129
|
+
* Circular ease-in-out interpolation
|
|
130
|
+
* Smooth symmetric arc-based easing
|
|
131
|
+
*/
|
|
132
|
+
export declare function CircularEaseInOut(a: number, b: number, t: number): number;
|
|
133
|
+
/**
|
|
134
|
+
* Elastic ease-in interpolation
|
|
135
|
+
* Spring-like acceleration from rest — starts with a bounce-back then launches forward
|
|
136
|
+
*/
|
|
137
|
+
export declare function ElasticEaseIn(a: number, b: number, t: number): number;
|
|
138
|
+
/**
|
|
139
|
+
* Elastic ease-in-out interpolation
|
|
140
|
+
* Spring-like oscillation at both the start and end
|
|
141
|
+
*/
|
|
142
|
+
export declare function ElasticEaseInOut(a: number, b: number, t: number): number;
|
|
143
|
+
/**
|
|
144
|
+
* Back ease-in interpolation (c3t³ − c1t²)
|
|
145
|
+
* Slight backward pull before launching forward
|
|
146
|
+
*/
|
|
147
|
+
export declare function BackEaseIn(a: number, b: number, t: number): number;
|
|
148
|
+
/**
|
|
149
|
+
* Back ease-in-out interpolation
|
|
150
|
+
* Slight backward pull at both ends before and after the main motion
|
|
151
|
+
*/
|
|
152
|
+
export declare function BackEaseInOut(a: number, b: number, t: number): number;
|
|
153
|
+
/**
|
|
154
|
+
* Bounce ease-in interpolation
|
|
155
|
+
* Bouncing ball effect with bounces at the start before settling at the target
|
|
156
|
+
*/
|
|
157
|
+
export declare function BounceEaseIn(a: number, b: number, t: number): number;
|
|
158
|
+
/**
|
|
159
|
+
* Bounce ease-in-out interpolation
|
|
160
|
+
* Bouncing ball effect at both the start and the end
|
|
161
|
+
*/
|
|
162
|
+
export declare function BounceEaseInOut(a: number, b: number, t: number): number;
|
|
163
|
+
/**
|
|
164
|
+
* Step interpolation - instant transition at threshold
|
|
165
|
+
* Useful for discrete state changes
|
|
166
|
+
*/
|
|
167
|
+
export declare function StepInterpolation(a: number, b: number, t: number, threshold?: number): number;
|
|
168
|
+
/**
|
|
169
|
+
* Spherical linear interpolation for scalar values
|
|
170
|
+
* Provides smooth interpolation along a spherical arc
|
|
171
|
+
* Note: For true SLERP with vectors, use VectorSphericalLinearInterpolation
|
|
172
|
+
* @deprecated This function is identical to LinearInterpolation and is not a true spherical interpolation. For quaternion spherical interpolation, use QuaternionSLERP from the quaternions module.
|
|
173
|
+
*/
|
|
174
|
+
export declare function SphericalLinearInterpolation(a: number, b: number, t: number): number;
|
|
175
|
+
//# sourceMappingURL=interpolation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../src/interpolation.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC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E,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAKvE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY,GAAG,MAAM,CAKlG;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAKpF"}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { Clamp } from './clamp.js';
|
|
2
|
+
// ---- Polynomial interpolation constants ----
|
|
3
|
+
const CUBIC = 3; // t³ power used in cubic ease, smooth step, etc.
|
|
4
|
+
const QUARTIC = 4; // t⁴ power used in smoother step / catmull-rom
|
|
5
|
+
const QUINTIC = 5; // t⁵ power used in smoother step
|
|
6
|
+
const SMOOTHER_COEFF_A = 6; // 6t⁵ coefficient in SmootherStep
|
|
7
|
+
const SMOOTHER_COEFF_B = 15; // 15t⁴ coefficient in SmootherStep
|
|
8
|
+
const SMOOTHER_COEFF_C = 10; // 10t³ coefficient in SmootherStep
|
|
9
|
+
// ---- Exponential / elastic ease constants ----
|
|
10
|
+
const EXP_SCALE = 10; // scale factor for exponential easing: 2^(±10*t)
|
|
11
|
+
const ELASTIC_OFFSET = 0.75; // phase offset in elastic formula
|
|
12
|
+
// ---- Catmull-Rom spline constants ----
|
|
13
|
+
const CATMULL_HALF = 0.5; // ½ scale factor in Catmull-Rom formula
|
|
14
|
+
const CATMULL_5 = 5; // −5p₁ coefficient in Catmull-Rom
|
|
15
|
+
// ---- Hermite basis coefficients ----
|
|
16
|
+
const HERMITE_NEG_2 = -2; // −2 coefficient in h01 basis function
|
|
17
|
+
// ---- BounceEaseOut piecewise thresholds and offsets ----
|
|
18
|
+
const BOUNCE_OFFSET_2 = 1.5; // step-2 offset: 1.5 / d1
|
|
19
|
+
const BOUNCE_CORR_2 = 0.75; // step-2 correction addend
|
|
20
|
+
const BOUNCE_THRESH_3 = 2.5; // step-3 upper threshold factor
|
|
21
|
+
const BOUNCE_OFFSET_3 = 2.25; // step-3 offset: 2.25 / d1
|
|
22
|
+
const BOUNCE_CORR_3 = 0.9375; // step-3 correction addend
|
|
23
|
+
const BOUNCE_OFFSET_4 = 2.625; // step-4 offset: 2.625 / d1
|
|
24
|
+
const BOUNCE_CORR_4 = 0.984375; // step-4 correction addend
|
|
25
|
+
// ---- ease-in-out shared constants ----
|
|
26
|
+
const EASE_INOUT_HALF = 0.5; // t threshold separating ease-in phase from ease-out phase
|
|
27
|
+
const ELASTIC_INOUT_PHASE = 11.125; // phase offset in ElasticEaseInOut: 2*EXP_SCALE*t − 11.125
|
|
28
|
+
const ELASTIC_INOUT_PERIOD = 4.5; // period divisor for ElasticEaseInOut: 2π / 4.5
|
|
29
|
+
const BACK_INOUT_SCALE = 1.525; // scale factor for back ease-in-out overshoot (c2 = c1 * 1.525)
|
|
30
|
+
/**
|
|
31
|
+
* Linear interpolation (LERP) between two scalar values.
|
|
32
|
+
* Maps parameter `t` proportionally between `a` (at t=0) and `b` (at t=1).
|
|
33
|
+
* Values of `t` outside [0,1] produce extrapolation beyond the endpoints.
|
|
34
|
+
*
|
|
35
|
+
* @param a - Start value (result when t = 0)
|
|
36
|
+
* @param b - End value (result when t = 1)
|
|
37
|
+
* @param t - Interpolation parameter — unclamped, allowing extrapolation
|
|
38
|
+
* @returns `a + (b - a) * t`
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* LinearInterpolation(0, 100, 0.5) // 50
|
|
42
|
+
* LinearInterpolation(0, 100, 0) // 0
|
|
43
|
+
* LinearInterpolation(0, 100, 1) // 100
|
|
44
|
+
* LinearInterpolation(0, 100, 1.5) // 150 (extrapolation)
|
|
45
|
+
*/
|
|
46
|
+
export function LinearInterpolation(a, b, t) {
|
|
47
|
+
// Do not clamp t, allow extrapolation for LERP
|
|
48
|
+
return a + ((b - a) * t);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Smooth step interpolation (3t² - 2t³)
|
|
52
|
+
* Provides smooth acceleration and deceleration with zero derivatives at endpoints
|
|
53
|
+
*/
|
|
54
|
+
export function SmoothStep(a, b, t) {
|
|
55
|
+
// Allow extrapolation by not clamping t
|
|
56
|
+
const smoothT = t * t * (CUBIC - (2 * t));
|
|
57
|
+
return a + ((b - a) * smoothT);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Smoother step interpolation (6t⁵ - 15t⁴ + 10t³)
|
|
61
|
+
* Even smoother than SmoothStep with zero first and second derivatives at endpoints
|
|
62
|
+
*/
|
|
63
|
+
export function SmootherStep(a, b, t) {
|
|
64
|
+
// Allow extrapolation by not clamping t
|
|
65
|
+
const smoothT = (SMOOTHER_COEFF_A * Math.pow(t, QUINTIC)) - (SMOOTHER_COEFF_B * Math.pow(t, QUARTIC)) + (SMOOTHER_COEFF_C * Math.pow(t, CUBIC));
|
|
66
|
+
return a + ((b - a) * smoothT);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Quadratic ease-in interpolation (t²)
|
|
70
|
+
* Accelerates slowly at the beginning
|
|
71
|
+
*/
|
|
72
|
+
export function QuadraticEaseIn(a, b, t) {
|
|
73
|
+
// Allow extrapolation by not clamping t
|
|
74
|
+
return a + ((b - a) * t * t);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Quadratic ease-out interpolation (1 - (1-t)²)
|
|
78
|
+
* Decelerates slowly at the end
|
|
79
|
+
*/
|
|
80
|
+
export function QuadraticEaseOut(a, b, t) {
|
|
81
|
+
// Allow extrapolation by not clamping t
|
|
82
|
+
return a + ((b - a) * (1 - Math.pow(1 - t, 2)));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Cubic ease-in interpolation (t³)
|
|
86
|
+
* More pronounced acceleration than quadratic
|
|
87
|
+
*/
|
|
88
|
+
export function CubicEaseIn(a, b, t) {
|
|
89
|
+
// Allow extrapolation by not clamping t
|
|
90
|
+
return a + ((b - a) * t * t * t);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Cubic ease-out interpolation (1 - (1-t)³)
|
|
94
|
+
* More pronounced deceleration than quadratic
|
|
95
|
+
*/
|
|
96
|
+
export function CubicEaseOut(a, b, t) {
|
|
97
|
+
// Allow extrapolation by not clamping t
|
|
98
|
+
return a + ((b - a) * (1 - Math.pow(1 - t, CUBIC)));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Cosine interpolation - smooth curve using cosine function
|
|
102
|
+
* Provides natural easing similar to SmoothStep but using trigonometry
|
|
103
|
+
*/
|
|
104
|
+
export function CosineInterpolation(a, b, t) {
|
|
105
|
+
// Allow extrapolation by not clamping t
|
|
106
|
+
const cosT = (1 - Math.cos(t * Math.PI)) / 2;
|
|
107
|
+
return a + ((b - a) * cosT);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Sine ease-in interpolation
|
|
111
|
+
* Slow start with smooth acceleration
|
|
112
|
+
*/
|
|
113
|
+
export function SineEaseIn(a, b, t) {
|
|
114
|
+
// Allow extrapolation by not clamping t
|
|
115
|
+
return a + ((b - a) * (1 - Math.cos((t * Math.PI) / 2)));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Sine ease-out interpolation
|
|
119
|
+
* Smooth deceleration to the end
|
|
120
|
+
*/
|
|
121
|
+
export function SineEaseOut(a, b, t) {
|
|
122
|
+
// Allow extrapolation by not clamping t
|
|
123
|
+
return a + ((b - a) * Math.sin((t * Math.PI) / 2));
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Exponential ease-in interpolation
|
|
127
|
+
* Very slow start, then rapid acceleration
|
|
128
|
+
*/
|
|
129
|
+
export function ExponentialEaseIn(a, b, t) {
|
|
130
|
+
// Allow extrapolation by not clamping t
|
|
131
|
+
const expT = t === 0 ? 0 : Math.pow(2, EXP_SCALE * (t - 1));
|
|
132
|
+
return a + ((b - a) * expT);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Exponential ease-out interpolation
|
|
136
|
+
* Rapid start, then very slow deceleration
|
|
137
|
+
*/
|
|
138
|
+
export function ExponentialEaseOut(a, b, t) {
|
|
139
|
+
// Allow extrapolation by not clamping t
|
|
140
|
+
const expT = t === 1 ? 1 : 1 - Math.pow(2, -EXP_SCALE * t);
|
|
141
|
+
return a + ((b - a) * expT);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Elastic ease-out - bouncy spring-like motion
|
|
145
|
+
* Creates an overshoot effect that bounces back
|
|
146
|
+
*/
|
|
147
|
+
export function ElasticEaseOut(a, b, t) {
|
|
148
|
+
// Allow extrapolation by not clamping t
|
|
149
|
+
if (t === 0 || t === 1) {
|
|
150
|
+
return t === 0 ? a : b;
|
|
151
|
+
}
|
|
152
|
+
const c4 = (2 * Math.PI) / CUBIC;
|
|
153
|
+
const elasticT = (Math.pow(2, -EXP_SCALE * t) * Math.sin(((t * EXP_SCALE) - ELASTIC_OFFSET) * c4)) + 1;
|
|
154
|
+
return a + ((b - a) * elasticT);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Back ease-out - overshoots then settles
|
|
158
|
+
* Creates a slight overshoot before settling at the target
|
|
159
|
+
*/
|
|
160
|
+
export function BackEaseOut(a, b, t) {
|
|
161
|
+
// Allow extrapolation by not clamping t
|
|
162
|
+
const c1 = 1.70158;
|
|
163
|
+
const c3 = c1 + 1;
|
|
164
|
+
const backT = 1 + (c3 * Math.pow(t - 1, CUBIC)) + (c1 * Math.pow(t - 1, 2));
|
|
165
|
+
return a + ((b - a) * backT);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Bounce ease-out - bouncing ball effect
|
|
169
|
+
* Simulates a ball bouncing to rest
|
|
170
|
+
*/
|
|
171
|
+
export function BounceEaseOut(a, b, t) {
|
|
172
|
+
// Allow extrapolation by not clamping t
|
|
173
|
+
const n1 = 7.5625;
|
|
174
|
+
const d1 = 2.75;
|
|
175
|
+
let bounceT;
|
|
176
|
+
if (t < (1 / d1)) {
|
|
177
|
+
bounceT = n1 * t * t;
|
|
178
|
+
}
|
|
179
|
+
else if (t < (2 / d1)) {
|
|
180
|
+
const adjustedT = t - (BOUNCE_OFFSET_2 / d1);
|
|
181
|
+
bounceT = (n1 * adjustedT * adjustedT) + BOUNCE_CORR_2;
|
|
182
|
+
}
|
|
183
|
+
else if (t < (BOUNCE_THRESH_3 / d1)) {
|
|
184
|
+
const adjustedT = t - (BOUNCE_OFFSET_3 / d1);
|
|
185
|
+
bounceT = (n1 * adjustedT * adjustedT) + BOUNCE_CORR_3;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
const adjustedT = t - (BOUNCE_OFFSET_4 / d1);
|
|
189
|
+
bounceT = (n1 * adjustedT * adjustedT) + BOUNCE_CORR_4;
|
|
190
|
+
}
|
|
191
|
+
return a + ((b - a) * bounceT);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Catmull-Rom spline interpolation between 4 points
|
|
195
|
+
* Useful for smooth curves through multiple points
|
|
196
|
+
*/
|
|
197
|
+
export function CatmullRomInterpolation(p0, p1, p2, p3, t) {
|
|
198
|
+
// Allow extrapolation by not clamping t
|
|
199
|
+
const t2 = t * t;
|
|
200
|
+
const t3 = t2 * t;
|
|
201
|
+
return CATMULL_HALF * ((2 * p1) + ((-p0 + p2) * t) + (((2 * p0) - (CATMULL_5 * p1) + (QUARTIC * p2) - p3) * t2) + ((-p0 + (CUBIC * p1) - (CUBIC * p2) + p3) * t3));
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Hermite interpolation with tangent control
|
|
205
|
+
* Provides precise control over curve tangents at endpoints
|
|
206
|
+
*/
|
|
207
|
+
export function HermiteInterpolation(p0, p1, t0, t1, t) {
|
|
208
|
+
// Allow extrapolation by not clamping t
|
|
209
|
+
const t2 = t * t;
|
|
210
|
+
const t3 = t2 * t;
|
|
211
|
+
const h00 = (2 * t3) - (CUBIC * t2) + 1;
|
|
212
|
+
const h10 = t3 - (2 * t2) + t;
|
|
213
|
+
const h01 = (HERMITE_NEG_2 * t3) + (CUBIC * t2);
|
|
214
|
+
const h11 = t3 - t2;
|
|
215
|
+
return (h00 * p0) + (h10 * t0) + (h01 * p1) + (h11 * t1);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Circular ease-in interpolation
|
|
219
|
+
* Creates an accelerating curve based on quarter circle
|
|
220
|
+
*/
|
|
221
|
+
export function CircularEaseIn(a, b, t) {
|
|
222
|
+
// Allow extrapolation by not clamping t
|
|
223
|
+
return a + ((b - a) * (1 - Math.sqrt(1 - (t * t))));
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Circular ease-out interpolation
|
|
227
|
+
* Creates a decelerating curve based on quarter circle
|
|
228
|
+
*/
|
|
229
|
+
export function CircularEaseOut(a, b, t) {
|
|
230
|
+
// Allow extrapolation by not clamping t
|
|
231
|
+
return a + ((b - a) * Math.sqrt(1 - Math.pow(t - 1, 2)));
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Quadratic ease-in-out interpolation (2t² for t<0.5, 1−(−2t+2)²/2 for t≥0.5)
|
|
235
|
+
* Symmetrically accelerates at the start and decelerates at the end
|
|
236
|
+
*/
|
|
237
|
+
export function QuadraticEaseInOut(a, b, t) {
|
|
238
|
+
const smoothT = t < EASE_INOUT_HALF
|
|
239
|
+
? 2 * t * t
|
|
240
|
+
: 1 - (Math.pow(-2 * t + 2, 2) / 2);
|
|
241
|
+
return a + ((b - a) * smoothT);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Cubic ease-in-out interpolation (4t³ for t<0.5, 1−(−2t+2)³/2 for t≥0.5)
|
|
245
|
+
* More pronounced symmetrical acceleration/deceleration than quadratic
|
|
246
|
+
*/
|
|
247
|
+
export function CubicEaseInOut(a, b, t) {
|
|
248
|
+
const smoothT = t < EASE_INOUT_HALF
|
|
249
|
+
? 4 * t * t * t
|
|
250
|
+
: 1 - (Math.pow(-2 * t + 2, CUBIC) / 2);
|
|
251
|
+
return a + ((b - a) * smoothT);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Sine ease-in-out interpolation (−(cos(πt)−1)/2)
|
|
255
|
+
* Smooth symmetric easing using cosine — gentle and natural feeling
|
|
256
|
+
*/
|
|
257
|
+
export function SineEaseInOut(a, b, t) {
|
|
258
|
+
const smoothT = -(Math.cos(t * Math.PI) - 1) / 2;
|
|
259
|
+
return a + ((b - a) * smoothT);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Exponential ease-in-out interpolation
|
|
263
|
+
* Very slow at both ends, extremely rapid in the middle
|
|
264
|
+
*/
|
|
265
|
+
export function ExponentialEaseInOut(a, b, t) {
|
|
266
|
+
if (t === 0)
|
|
267
|
+
return a;
|
|
268
|
+
if (t === 1)
|
|
269
|
+
return b;
|
|
270
|
+
const expT = t < EASE_INOUT_HALF
|
|
271
|
+
? Math.pow(2, (2 * EXP_SCALE * t) - EXP_SCALE) / 2
|
|
272
|
+
: (2 - Math.pow(2, -(2 * EXP_SCALE * t) + EXP_SCALE)) / 2;
|
|
273
|
+
return a + ((b - a) * expT);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Circular ease-in-out interpolation
|
|
277
|
+
* Smooth symmetric arc-based easing
|
|
278
|
+
*/
|
|
279
|
+
export function CircularEaseInOut(a, b, t) {
|
|
280
|
+
const smoothT = t < EASE_INOUT_HALF
|
|
281
|
+
? (1 - Math.sqrt(1 - Math.pow(2 * t, 2))) / 2
|
|
282
|
+
: (Math.sqrt(1 - Math.pow(-2 * t + 2, 2)) + 1) / 2;
|
|
283
|
+
return a + ((b - a) * smoothT);
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Elastic ease-in interpolation
|
|
287
|
+
* Spring-like acceleration from rest — starts with a bounce-back then launches forward
|
|
288
|
+
*/
|
|
289
|
+
export function ElasticEaseIn(a, b, t) {
|
|
290
|
+
if (t === 0 || t === 1)
|
|
291
|
+
return t === 0 ? a : b;
|
|
292
|
+
const c4 = (2 * Math.PI) / CUBIC;
|
|
293
|
+
const elasticT = -(Math.pow(2, EXP_SCALE * (t - 1)) * Math.sin(((t * EXP_SCALE) - (EXP_SCALE + ELASTIC_OFFSET)) * c4));
|
|
294
|
+
return a + ((b - a) * elasticT);
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Elastic ease-in-out interpolation
|
|
298
|
+
* Spring-like oscillation at both the start and end
|
|
299
|
+
*/
|
|
300
|
+
export function ElasticEaseInOut(a, b, t) {
|
|
301
|
+
if (t === 0 || t === 1)
|
|
302
|
+
return t === 0 ? a : b;
|
|
303
|
+
const c5 = (2 * Math.PI) / ELASTIC_INOUT_PERIOD;
|
|
304
|
+
const elasticT = t < EASE_INOUT_HALF
|
|
305
|
+
? -(Math.pow(2, (2 * EXP_SCALE * t) - EXP_SCALE) * Math.sin(((2 * EXP_SCALE * t) - ELASTIC_INOUT_PHASE) * c5)) / 2
|
|
306
|
+
: (Math.pow(2, -(2 * EXP_SCALE * t) + EXP_SCALE) * Math.sin(((2 * EXP_SCALE * t) - ELASTIC_INOUT_PHASE) * c5)) / 2 + 1;
|
|
307
|
+
return a + ((b - a) * elasticT);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Back ease-in interpolation (c3t³ − c1t²)
|
|
311
|
+
* Slight backward pull before launching forward
|
|
312
|
+
*/
|
|
313
|
+
export function BackEaseIn(a, b, t) {
|
|
314
|
+
const c1 = 1.70158;
|
|
315
|
+
const c3 = c1 + 1;
|
|
316
|
+
const backT = (c3 * t * t * t) - (c1 * t * t);
|
|
317
|
+
return a + ((b - a) * backT);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Back ease-in-out interpolation
|
|
321
|
+
* Slight backward pull at both ends before and after the main motion
|
|
322
|
+
*/
|
|
323
|
+
export function BackEaseInOut(a, b, t) {
|
|
324
|
+
const c1 = 1.70158;
|
|
325
|
+
const c2 = c1 * BACK_INOUT_SCALE;
|
|
326
|
+
const backT = t < EASE_INOUT_HALF
|
|
327
|
+
? Math.pow(2 * t, 2) * (((c2 + 1) * 2 * t) - c2) / 2
|
|
328
|
+
: (Math.pow((2 * t) - 2, 2) * (((c2 + 1) * ((2 * t) - 2)) + c2) + 2) / 2;
|
|
329
|
+
return a + ((b - a) * backT);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Bounce ease-in interpolation
|
|
333
|
+
* Bouncing ball effect with bounces at the start before settling at the target
|
|
334
|
+
*/
|
|
335
|
+
export function BounceEaseIn(a, b, t) {
|
|
336
|
+
return a + ((b - a) * (1 - BounceEaseOut(0, 1, 1 - t)));
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Bounce ease-in-out interpolation
|
|
340
|
+
* Bouncing ball effect at both the start and the end
|
|
341
|
+
*/
|
|
342
|
+
export function BounceEaseInOut(a, b, t) {
|
|
343
|
+
const bounceT = t < EASE_INOUT_HALF
|
|
344
|
+
? (1 - BounceEaseOut(0, 1, 1 - (2 * t))) / 2
|
|
345
|
+
: (1 + BounceEaseOut(0, 1, (2 * t) - 1)) / 2;
|
|
346
|
+
return a + ((b - a) * bounceT);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Step interpolation - instant transition at threshold
|
|
350
|
+
* Useful for discrete state changes
|
|
351
|
+
*/
|
|
352
|
+
export function StepInterpolation(a, b, t, threshold = 0.5) {
|
|
353
|
+
const clampedT = Clamp(t, 0, 1);
|
|
354
|
+
const clampedThreshold = Clamp(threshold, 0, 1);
|
|
355
|
+
return clampedT < clampedThreshold ? a : b;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Spherical linear interpolation for scalar values
|
|
359
|
+
* Provides smooth interpolation along a spherical arc
|
|
360
|
+
* Note: For true SLERP with vectors, use VectorSphericalLinearInterpolation
|
|
361
|
+
* @deprecated This function is identical to LinearInterpolation and is not a true spherical interpolation. For quaternion spherical interpolation, use QuaternionSLERP from the quaternions module.
|
|
362
|
+
*/
|
|
363
|
+
export function SphericalLinearInterpolation(a, b, t) {
|
|
364
|
+
// Allow extrapolation by not clamping t
|
|
365
|
+
// For scalar values, SLERP reduces to linear interpolation
|
|
366
|
+
// This is a placeholder implementation for scalar compatibility
|
|
367
|
+
return LinearInterpolation(a, b, t);
|
|
368
|
+
}
|
|
369
|
+
//# sourceMappingURL=interpolation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpolation.js","sourceRoot":"","sources":["../src/interpolation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,+CAA+C;AAC/C,MAAM,KAAK,GAAG,CAAC,CAAC,CAAiB,iDAAiD;AAClF,MAAM,OAAO,GAAG,CAAC,CAAC,CAAe,+CAA+C;AAChF,MAAM,OAAO,GAAG,CAAC,CAAC,CAAe,iCAAiC;AAClE,MAAM,gBAAgB,GAAG,CAAC,CAAC,CAAK,kCAAkC;AAClE,MAAM,gBAAgB,GAAG,EAAE,CAAC,CAAI,mCAAmC;AACnE,MAAM,gBAAgB,GAAG,EAAE,CAAC,CAAI,mCAAmC;AACnE,iDAAiD;AACjD,MAAM,SAAS,GAAG,EAAE,CAAC,CAAW,iDAAiD;AACjF,MAAM,cAAc,GAAG,IAAI,CAAC,CAAI,kCAAkC;AAClE,yCAAyC;AACzC,MAAM,YAAY,GAAG,GAAG,CAAC,CAAO,wCAAwC;AACxE,MAAM,SAAS,GAAG,CAAC,CAAC,CAAY,kCAAkC;AAClE,uCAAuC;AACvC,MAAM,aAAa,GAAG,CAAC,CAAC,CAAC,CAAO,uCAAuC;AACvE,2DAA2D;AAC3D,MAAM,eAAe,GAAG,GAAG,CAAC,CAAI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