@oliversalzburg/js-utils 0.0.28-dev.11 → 0.0.28-dev.13
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 +2 -0
- package/graphics/canvas-sandbox-mp.d.ts +10 -1
- package/graphics/canvas-sandbox-mp.js +10 -6
- package/graphics/canvas-sandbox-mp.js.map +1 -1
- package/math/easing.d.ts +0 -68
- package/math/easing.js +0 -68
- package/math/easing.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ import { Canvas2DHeadless } from "./canvas2d-headless.js";
|
|
|
9
9
|
import { RenderLoop } from "./render-loop.js";
|
|
10
10
|
/**
|
|
11
11
|
* Sent from the host when a worker should reconfigure itself.
|
|
12
|
+
* @group Graphics
|
|
12
13
|
*/
|
|
13
14
|
export interface CanvasWorkerMessageReconfigure<TApplicationOptions extends CanvasSandboxExpectedOptions> {
|
|
14
15
|
/**
|
|
@@ -30,6 +31,7 @@ export interface CanvasWorkerMessageReconfigure<TApplicationOptions extends Canv
|
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* Sent from the host when a worker should start its rendering kernel.
|
|
34
|
+
* @group Graphics
|
|
33
35
|
*/
|
|
34
36
|
export interface CanvasWorkerMessageStart<TApplicationOptions extends CanvasSandboxExpectedOptions> {
|
|
35
37
|
/**
|
|
@@ -43,6 +45,7 @@ export interface CanvasWorkerMessageStart<TApplicationOptions extends CanvasSand
|
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
45
47
|
* Sent from a worker when it finished rendering the current scene.
|
|
48
|
+
* @group Graphics
|
|
46
49
|
*/
|
|
47
50
|
export interface CanvasWorkerSceneFinishMessage {
|
|
48
51
|
/**
|
|
@@ -56,12 +59,16 @@ export interface CanvasWorkerSceneFinishMessage {
|
|
|
56
59
|
}
|
|
57
60
|
/**
|
|
58
61
|
* The messages that are passed between the canvas sandbox host and its workers.
|
|
62
|
+
* @group Graphics
|
|
59
63
|
*/
|
|
60
|
-
export type CanvasWorkerMessage<TApplicationOptions extends CanvasSandboxExpectedOptions> = CanvasWorkerMessageReconfigure<TApplicationOptions> | CanvasWorkerMessageStart<TApplicationOptions> | CanvasWorkerSceneFinishMessage
|
|
64
|
+
export type CanvasWorkerMessage<TApplicationOptions extends CanvasSandboxExpectedOptions> = CanvasWorkerMessageReconfigure<TApplicationOptions> | CanvasWorkerMessageStart<TApplicationOptions> | CanvasWorkerSceneFinishMessage | {
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
61
67
|
/**
|
|
62
68
|
* The canvas worker handles a web worker instance in the canvas sandbox host.
|
|
63
69
|
*
|
|
64
70
|
* It provides a thin abstraction over the web worker IPC messaging.
|
|
71
|
+
* @group Graphics
|
|
65
72
|
*/
|
|
66
73
|
export declare class CanvasWorker<TApplicationOptions extends CanvasSandboxExpectedOptions> extends EventTarget {
|
|
67
74
|
/**
|
|
@@ -120,6 +127,7 @@ export declare class CanvasWorker<TApplicationOptions extends CanvasSandboxExpec
|
|
|
120
127
|
* // Listen to custom events (messages) you send from the host.
|
|
121
128
|
* worker.addEventListener("fade", () => worker.renderKernel?.fadeOut());
|
|
122
129
|
* ```
|
|
130
|
+
* @group Graphics
|
|
123
131
|
*/
|
|
124
132
|
export declare class CanvasWorkerInstance<TCanvas extends Canvas2DHeadless, TApplicationOptions extends CanvasSandboxExpectedOptions, TKernel extends CanvasSandboxApplication<TCanvas, TApplicationOptions>> extends EventTarget {
|
|
125
133
|
#private;
|
|
@@ -188,6 +196,7 @@ export declare class CanvasWorkerInstance<TCanvas extends Canvas2DHeadless, TApp
|
|
|
188
196
|
* Base class for multi-process canvas sandbox applications.
|
|
189
197
|
*
|
|
190
198
|
* Helps in orchestrating the workers.
|
|
199
|
+
* @group Graphics
|
|
191
200
|
*/
|
|
192
201
|
export declare abstract class CanvasSandboxHostApplication<TCanvas extends Canvas, TApplicationOptions extends CanvasSandboxExpectedOptions> implements CanvasSandboxApplication<TCanvas, TApplicationOptions> {
|
|
193
202
|
/**
|
|
@@ -6,6 +6,7 @@ import { RenderLoop } from "./render-loop.js";
|
|
|
6
6
|
* The canvas worker handles a web worker instance in the canvas sandbox host.
|
|
7
7
|
*
|
|
8
8
|
* It provides a thin abstraction over the web worker IPC messaging.
|
|
9
|
+
* @group Graphics
|
|
9
10
|
*/
|
|
10
11
|
export class CanvasWorker extends EventTarget {
|
|
11
12
|
/**
|
|
@@ -50,9 +51,8 @@ export class CanvasWorker extends EventTarget {
|
|
|
50
51
|
this.workerInstance = new Worker(source, {
|
|
51
52
|
type: "module",
|
|
52
53
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
54
|
+
// Translate messages to events.
|
|
55
|
+
this.workerInstance.onmessage = (message) => this.dispatchEvent(new CustomEvent(message.data.type));
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Posts a message to the worker.
|
|
@@ -77,6 +77,7 @@ export class CanvasWorker extends EventTarget {
|
|
|
77
77
|
* // Listen to custom events (messages) you send from the host.
|
|
78
78
|
* worker.addEventListener("fade", () => worker.renderKernel?.fadeOut());
|
|
79
79
|
* ```
|
|
80
|
+
* @group Graphics
|
|
80
81
|
*/
|
|
81
82
|
export class CanvasWorkerInstance extends EventTarget {
|
|
82
83
|
/**
|
|
@@ -126,6 +127,11 @@ export class CanvasWorkerInstance extends EventTarget {
|
|
|
126
127
|
this.id = "<unassigned>";
|
|
127
128
|
this.#Kernel = Kernel;
|
|
128
129
|
self.onmessage = (message) => {
|
|
130
|
+
const event = new CustomEvent(message.data.type);
|
|
131
|
+
this.dispatchEvent(event);
|
|
132
|
+
if (event.defaultPrevented) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
129
135
|
if (message.data.type === "start") {
|
|
130
136
|
const startMessage = message.data;
|
|
131
137
|
this.start(startMessage.options);
|
|
@@ -134,9 +140,6 @@ export class CanvasWorkerInstance extends EventTarget {
|
|
|
134
140
|
const reconfigureMessage = message.data;
|
|
135
141
|
this.reconfigure(reconfigureMessage.id, reconfigureMessage.canvas, reconfigureMessage.options);
|
|
136
142
|
}
|
|
137
|
-
else {
|
|
138
|
-
this.dispatchEvent(new CustomEvent(message.data.type));
|
|
139
|
-
}
|
|
140
143
|
};
|
|
141
144
|
}
|
|
142
145
|
/**
|
|
@@ -190,6 +193,7 @@ export class CanvasWorkerInstance extends EventTarget {
|
|
|
190
193
|
* Base class for multi-process canvas sandbox applications.
|
|
191
194
|
*
|
|
192
195
|
* Helps in orchestrating the workers.
|
|
196
|
+
* @group Graphics
|
|
193
197
|
*/
|
|
194
198
|
export class CanvasSandboxHostApplication {
|
|
195
199
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-sandbox-mp.js","sourceRoot":"","sources":["../../source/graphics/canvas-sandbox-mp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"canvas-sandbox-mp.js","sourceRoot":"","sources":["../../source/graphics/canvas-sandbox-mp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA0E9C;;;;;GAKG;AACH,MAAM,OAAO,YAEX,SAAQ,WAAW;IACnB;;OAEG;IACH,EAAE,CAAS;IAEX;;OAEG;IACH,MAAM,CAAgC;IAEtC;;OAEG;IACH,eAAe,CAA8B;IAE7C;;;;;;OAMG;IACM,OAA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AO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IASD;;;;;OAKG;IACH,MAAM,CAAC,MAAc,EAAE,UAAkB;QACvC,2BAA2B;IAC7B,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,MAAM,CAAC,WAAW,CAAC;gBACjB,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE;oBACP,GAAG,IAAI,CAAC,OAAO;oBACf,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;oBACtB,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ;iBAClC;aAC+C,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,cAAc,CAAC,OAAiD;QAC9D,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF"}
|
package/math/easing.d.ts
CHANGED
|
@@ -2,305 +2,237 @@
|
|
|
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 Math
|
|
6
5
|
* @group Easing
|
|
7
|
-
* @group Animation
|
|
8
6
|
*/
|
|
9
7
|
export declare const easeInQuad: (position: number) => number;
|
|
10
8
|
/**
|
|
11
9
|
* Calculates an easing multiplier for: Quad Out
|
|
12
10
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
13
11
|
* @returns The easing multiplier for the position.
|
|
14
|
-
* @group Math
|
|
15
12
|
* @group Easing
|
|
16
|
-
* @group Animation
|
|
17
13
|
*/
|
|
18
14
|
export declare const easeOutQuad: (position: number) => number;
|
|
19
15
|
/**
|
|
20
16
|
* Calculates an easing multiplier for: Quad In+Out
|
|
21
17
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
22
18
|
* @returns The easing multiplier for the position.
|
|
23
|
-
* @group Math
|
|
24
19
|
* @group Easing
|
|
25
|
-
* @group Animation
|
|
26
20
|
*/
|
|
27
21
|
export declare const easeInOutQuad: (position: number) => number;
|
|
28
22
|
/**
|
|
29
23
|
* Calculates an easing multiplier for: Cubic In
|
|
30
24
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
31
25
|
* @returns The easing multiplier for the position.
|
|
32
|
-
* @group Math
|
|
33
26
|
* @group Easing
|
|
34
|
-
* @group Animation
|
|
35
27
|
*/
|
|
36
28
|
export declare const easeInCubic: (position: number) => number;
|
|
37
29
|
/**
|
|
38
30
|
* Calculates an easing multiplier for: Cubic Out
|
|
39
31
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
40
32
|
* @returns The easing multiplier for the position.
|
|
41
|
-
* @group Math
|
|
42
33
|
* @group Easing
|
|
43
|
-
* @group Animation
|
|
44
34
|
*/
|
|
45
35
|
export declare const easeOutCubic: (position: number) => number;
|
|
46
36
|
/**
|
|
47
37
|
* Calculates an easing multiplier for: Cubic In+Out
|
|
48
38
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
49
39
|
* @returns The easing multiplier for the position.
|
|
50
|
-
* @group Math
|
|
51
40
|
* @group Easing
|
|
52
|
-
* @group Animation
|
|
53
41
|
*/
|
|
54
42
|
export declare const easeInOutCubic: (position: number) => number;
|
|
55
43
|
/**
|
|
56
44
|
* Calculates an easing multiplier for: Quart In
|
|
57
45
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
58
46
|
* @returns The easing multiplier for the position.
|
|
59
|
-
* @group Math
|
|
60
47
|
* @group Easing
|
|
61
|
-
* @group Animation
|
|
62
48
|
*/
|
|
63
49
|
export declare const easeInQuart: (position: number) => number;
|
|
64
50
|
/**
|
|
65
51
|
* Calculates an easing multiplier for: Quad Out
|
|
66
52
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
67
53
|
* @returns The easing multiplier for the position.
|
|
68
|
-
* @group Math
|
|
69
54
|
* @group Easing
|
|
70
|
-
* @group Animation
|
|
71
55
|
*/
|
|
72
56
|
export declare const easeOutQuart: (position: number) => number;
|
|
73
57
|
/**
|
|
74
58
|
* Calculates an easing multiplier for: Quart In+Out
|
|
75
59
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
76
60
|
* @returns The easing multiplier for the position.
|
|
77
|
-
* @group Math
|
|
78
61
|
* @group Easing
|
|
79
|
-
* @group Animation
|
|
80
62
|
*/
|
|
81
63
|
export declare const easeInOutQuart: (position: number) => number;
|
|
82
64
|
/**
|
|
83
65
|
* Calculates an easing multiplier for: Quint In
|
|
84
66
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
85
67
|
* @returns The easing multiplier for the position.
|
|
86
|
-
* @group Math
|
|
87
68
|
* @group Easing
|
|
88
|
-
* @group Animation
|
|
89
69
|
*/
|
|
90
70
|
export declare const easeInQuint: (position: number) => number;
|
|
91
71
|
/**
|
|
92
72
|
* Calculates an easing multiplier for: Quint Out
|
|
93
73
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
94
74
|
* @returns The easing multiplier for the position.
|
|
95
|
-
* @group Math
|
|
96
75
|
* @group Easing
|
|
97
|
-
* @group Animation
|
|
98
76
|
*/
|
|
99
77
|
export declare const easeOutQuint: (position: number) => number;
|
|
100
78
|
/**
|
|
101
79
|
* Calculates an easing multiplier for: Quint In+Out
|
|
102
80
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
103
81
|
* @returns The easing multiplier for the position.
|
|
104
|
-
* @group Math
|
|
105
82
|
* @group Easing
|
|
106
|
-
* @group Animation
|
|
107
83
|
*/
|
|
108
84
|
export declare const easeInOutQuint: (position: number) => number;
|
|
109
85
|
/**
|
|
110
86
|
* Calculates an easing multiplier for: Sine In
|
|
111
87
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
112
88
|
* @returns The easing multiplier for the position.
|
|
113
|
-
* @group Math
|
|
114
89
|
* @group Easing
|
|
115
|
-
* @group Animation
|
|
116
90
|
*/
|
|
117
91
|
export declare const easeInSine: (position: number) => number;
|
|
118
92
|
/**
|
|
119
93
|
* Calculates an easing multiplier for: Sine Out
|
|
120
94
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
121
95
|
* @returns The easing multiplier for the position.
|
|
122
|
-
* @group Math
|
|
123
96
|
* @group Easing
|
|
124
|
-
* @group Animation
|
|
125
97
|
*/
|
|
126
98
|
export declare const easeOutSine: (position: number) => number;
|
|
127
99
|
/**
|
|
128
100
|
* Calculates an easing multiplier for: Sine In+Out
|
|
129
101
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
130
102
|
* @returns The easing multiplier for the position.
|
|
131
|
-
* @group Math
|
|
132
103
|
* @group Easing
|
|
133
|
-
* @group Animation
|
|
134
104
|
*/
|
|
135
105
|
export declare const easeInOutSine: (position: number) => number;
|
|
136
106
|
/**
|
|
137
107
|
* Calculates an easing multiplier for: Expo In
|
|
138
108
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
139
109
|
* @returns The easing multiplier for the position.
|
|
140
|
-
* @group Math
|
|
141
110
|
* @group Easing
|
|
142
|
-
* @group Animation
|
|
143
111
|
*/
|
|
144
112
|
export declare const easeInExpo: (position: number) => number;
|
|
145
113
|
/**
|
|
146
114
|
* Calculates an easing multiplier for: Expo Out
|
|
147
115
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
148
116
|
* @returns The easing multiplier for the position.
|
|
149
|
-
* @group Math
|
|
150
117
|
* @group Easing
|
|
151
|
-
* @group Animation
|
|
152
118
|
*/
|
|
153
119
|
export declare const easeOutExpo: (position: number) => number;
|
|
154
120
|
/**
|
|
155
121
|
* Calculates an easing multiplier for: Expo In+Out
|
|
156
122
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
157
123
|
* @returns The easing multiplier for the position.
|
|
158
|
-
* @group Math
|
|
159
124
|
* @group Easing
|
|
160
|
-
* @group Animation
|
|
161
125
|
*/
|
|
162
126
|
export declare const easeInOutExpo: (position: number) => number;
|
|
163
127
|
/**
|
|
164
128
|
* Calculates an easing multiplier for: Circ In
|
|
165
129
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
166
130
|
* @returns The easing multiplier for the position.
|
|
167
|
-
* @group Math
|
|
168
131
|
* @group Easing
|
|
169
|
-
* @group Animation
|
|
170
132
|
*/
|
|
171
133
|
export declare const easeInCirc: (position: number) => number;
|
|
172
134
|
/**
|
|
173
135
|
* Calculates an easing multiplier for: Circ Out
|
|
174
136
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
175
137
|
* @returns The easing multiplier for the position.
|
|
176
|
-
* @group Math
|
|
177
138
|
* @group Easing
|
|
178
|
-
* @group Animation
|
|
179
139
|
*/
|
|
180
140
|
export declare const easeOutCirc: (position: number) => number;
|
|
181
141
|
/**
|
|
182
142
|
* Calculates an easing multiplier for: Circ In+Out
|
|
183
143
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
184
144
|
* @returns The easing multiplier for the position.
|
|
185
|
-
* @group Math
|
|
186
145
|
* @group Easing
|
|
187
|
-
* @group Animation
|
|
188
146
|
*/
|
|
189
147
|
export declare const easeInOutCirc: (position: number) => number;
|
|
190
148
|
/**
|
|
191
149
|
* Calculates an easing multiplier for: Bounce Out
|
|
192
150
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
193
151
|
* @returns The easing multiplier for the position.
|
|
194
|
-
* @group Math
|
|
195
152
|
* @group Easing
|
|
196
|
-
* @group Animation
|
|
197
153
|
*/
|
|
198
154
|
export declare const easeOutBounce: (position: number) => number;
|
|
199
155
|
/**
|
|
200
156
|
* Calculates an easing multiplier for: Back In
|
|
201
157
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
202
158
|
* @returns The easing multiplier for the position.
|
|
203
|
-
* @group Math
|
|
204
159
|
* @group Easing
|
|
205
|
-
* @group Animation
|
|
206
160
|
*/
|
|
207
161
|
export declare const easeInBack: (position: number) => number;
|
|
208
162
|
/**
|
|
209
163
|
* Calculates an easing multiplier for: Back Out
|
|
210
164
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
211
165
|
* @returns The easing multiplier for the position.
|
|
212
|
-
* @group Math
|
|
213
166
|
* @group Easing
|
|
214
|
-
* @group Animation
|
|
215
167
|
*/
|
|
216
168
|
export declare const easeOutBack: (position: number) => number;
|
|
217
169
|
/**
|
|
218
170
|
* Calculates an easing multiplier for: Back In+Out
|
|
219
171
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
220
172
|
* @returns The easing multiplier for the position.
|
|
221
|
-
* @group Math
|
|
222
173
|
* @group Easing
|
|
223
|
-
* @group Animation
|
|
224
174
|
*/
|
|
225
175
|
export declare const easeInOutBack: (position: number) => number;
|
|
226
176
|
/**
|
|
227
177
|
* Calculates an easing multiplier for: Elastic
|
|
228
178
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
229
179
|
* @returns The easing multiplier for the position.
|
|
230
|
-
* @group Math
|
|
231
180
|
* @group Easing
|
|
232
|
-
* @group Animation
|
|
233
181
|
*/
|
|
234
182
|
export declare const easeElastic: (position: number) => number;
|
|
235
183
|
/**
|
|
236
184
|
* Calculates an easing multiplier for: Swing In+Out
|
|
237
185
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
238
186
|
* @returns The easing multiplier for the position.
|
|
239
|
-
* @group Math
|
|
240
187
|
* @group Easing
|
|
241
|
-
* @group Animation
|
|
242
188
|
*/
|
|
243
189
|
export declare const swingInOut: (position: number) => number;
|
|
244
190
|
/**
|
|
245
191
|
* Calculates an easing multiplier for: Swing In
|
|
246
192
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
247
193
|
* @returns The easing multiplier for the position.
|
|
248
|
-
* @group Math
|
|
249
194
|
* @group Easing
|
|
250
|
-
* @group Animation
|
|
251
195
|
*/
|
|
252
196
|
export declare const easeSwingIn: (position: number) => number;
|
|
253
197
|
/**
|
|
254
198
|
* Calculates an easing multiplier for: Swing Out
|
|
255
199
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
256
200
|
* @returns The easing multiplier for the position.
|
|
257
|
-
* @group Math
|
|
258
201
|
* @group Easing
|
|
259
|
-
* @group Animation
|
|
260
202
|
*/
|
|
261
203
|
export declare const easeSwingOut: (position: number) => number;
|
|
262
204
|
/**
|
|
263
205
|
* Calculates an easing multiplier for: Bounce
|
|
264
206
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
265
207
|
* @returns The easing multiplier for the position.
|
|
266
|
-
* @group Math
|
|
267
208
|
* @group Easing
|
|
268
|
-
* @group Animation
|
|
269
209
|
*/
|
|
270
210
|
export declare const easeBounce: (position: number) => number;
|
|
271
211
|
/**
|
|
272
212
|
* Calculates an easing multiplier for: Bounce Past
|
|
273
213
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
274
214
|
* @returns The easing multiplier for the position.
|
|
275
|
-
* @group Math
|
|
276
215
|
* @group Easing
|
|
277
|
-
* @group Animation
|
|
278
216
|
*/
|
|
279
217
|
export declare const easeBouncePast: (position: number) => number;
|
|
280
218
|
/**
|
|
281
219
|
* Calculates an easing multiplier for: Simple In+Out
|
|
282
220
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
283
221
|
* @returns The easing multiplier for the position.
|
|
284
|
-
* @group Math
|
|
285
222
|
* @group Easing
|
|
286
|
-
* @group Animation
|
|
287
223
|
*/
|
|
288
224
|
export declare const easeFromTo: (position: number) => number;
|
|
289
225
|
/**
|
|
290
226
|
* Calculates an easing multiplier for: Simple In
|
|
291
227
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
292
228
|
* @returns The easing multiplier for the position.
|
|
293
|
-
* @group Math
|
|
294
229
|
* @group Easing
|
|
295
|
-
* @group Animation
|
|
296
230
|
*/
|
|
297
231
|
export declare const easeFrom: (position: number) => number;
|
|
298
232
|
/**
|
|
299
233
|
* Calculates an easing multiplier for: Simple Out
|
|
300
234
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
301
235
|
* @returns The easing multiplier for the position.
|
|
302
|
-
* @group Math
|
|
303
236
|
* @group Easing
|
|
304
|
-
* @group Animation
|
|
305
237
|
*/
|
|
306
238
|
export declare const easeTo: (position: number) => number;
|
package/math/easing.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* Calculates an easing multiplier for: Quad In
|
|
4
4
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
5
5
|
* @returns The easing multiplier for the position.
|
|
6
|
-
* @group Math
|
|
7
6
|
* @group Easing
|
|
8
|
-
* @group Animation
|
|
9
7
|
*/
|
|
10
8
|
export const easeInQuad = (position) => {
|
|
11
9
|
return Math.pow(position, 2);
|
|
@@ -14,9 +12,7 @@ export const easeInQuad = (position) => {
|
|
|
14
12
|
* Calculates an easing multiplier for: Quad Out
|
|
15
13
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
16
14
|
* @returns The easing multiplier for the position.
|
|
17
|
-
* @group Math
|
|
18
15
|
* @group Easing
|
|
19
|
-
* @group Animation
|
|
20
16
|
*/
|
|
21
17
|
export const easeOutQuad = (position) => {
|
|
22
18
|
return -(Math.pow(position - 1, 2) - 1);
|
|
@@ -25,9 +21,7 @@ export const easeOutQuad = (position) => {
|
|
|
25
21
|
* Calculates an easing multiplier for: Quad In+Out
|
|
26
22
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
27
23
|
* @returns The easing multiplier for the position.
|
|
28
|
-
* @group Math
|
|
29
24
|
* @group Easing
|
|
30
|
-
* @group Animation
|
|
31
25
|
*/
|
|
32
26
|
export const easeInOutQuad = (position) => {
|
|
33
27
|
if ((position /= 0.5) < 1) {
|
|
@@ -39,9 +33,7 @@ export const easeInOutQuad = (position) => {
|
|
|
39
33
|
* Calculates an easing multiplier for: Cubic In
|
|
40
34
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
41
35
|
* @returns The easing multiplier for the position.
|
|
42
|
-
* @group Math
|
|
43
36
|
* @group Easing
|
|
44
|
-
* @group Animation
|
|
45
37
|
*/
|
|
46
38
|
export const easeInCubic = (position) => {
|
|
47
39
|
return Math.pow(position, 3);
|
|
@@ -50,9 +42,7 @@ export const easeInCubic = (position) => {
|
|
|
50
42
|
* Calculates an easing multiplier for: Cubic Out
|
|
51
43
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
52
44
|
* @returns The easing multiplier for the position.
|
|
53
|
-
* @group Math
|
|
54
45
|
* @group Easing
|
|
55
|
-
* @group Animation
|
|
56
46
|
*/
|
|
57
47
|
export const easeOutCubic = (position) => {
|
|
58
48
|
return Math.pow(position - 1, 3) + 1;
|
|
@@ -61,9 +51,7 @@ export const easeOutCubic = (position) => {
|
|
|
61
51
|
* Calculates an easing multiplier for: Cubic In+Out
|
|
62
52
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
63
53
|
* @returns The easing multiplier for the position.
|
|
64
|
-
* @group Math
|
|
65
54
|
* @group Easing
|
|
66
|
-
* @group Animation
|
|
67
55
|
*/
|
|
68
56
|
export const easeInOutCubic = (position) => {
|
|
69
57
|
if ((position /= 0.5) < 1)
|
|
@@ -74,9 +62,7 @@ export const easeInOutCubic = (position) => {
|
|
|
74
62
|
* Calculates an easing multiplier for: Quart In
|
|
75
63
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
76
64
|
* @returns The easing multiplier for the position.
|
|
77
|
-
* @group Math
|
|
78
65
|
* @group Easing
|
|
79
|
-
* @group Animation
|
|
80
66
|
*/
|
|
81
67
|
export const easeInQuart = (position) => {
|
|
82
68
|
return Math.pow(position, 4);
|
|
@@ -85,9 +71,7 @@ export const easeInQuart = (position) => {
|
|
|
85
71
|
* Calculates an easing multiplier for: Quad Out
|
|
86
72
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
87
73
|
* @returns The easing multiplier for the position.
|
|
88
|
-
* @group Math
|
|
89
74
|
* @group Easing
|
|
90
|
-
* @group Animation
|
|
91
75
|
*/
|
|
92
76
|
export const easeOutQuart = (position) => {
|
|
93
77
|
return -(Math.pow(position - 1, 4) - 1);
|
|
@@ -96,9 +80,7 @@ export const easeOutQuart = (position) => {
|
|
|
96
80
|
* Calculates an easing multiplier for: Quart In+Out
|
|
97
81
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
98
82
|
* @returns The easing multiplier for the position.
|
|
99
|
-
* @group Math
|
|
100
83
|
* @group Easing
|
|
101
|
-
* @group Animation
|
|
102
84
|
*/
|
|
103
85
|
export const easeInOutQuart = (position) => {
|
|
104
86
|
if ((position /= 0.5) < 1)
|
|
@@ -109,9 +91,7 @@ export const easeInOutQuart = (position) => {
|
|
|
109
91
|
* Calculates an easing multiplier for: Quint In
|
|
110
92
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
111
93
|
* @returns The easing multiplier for the position.
|
|
112
|
-
* @group Math
|
|
113
94
|
* @group Easing
|
|
114
|
-
* @group Animation
|
|
115
95
|
*/
|
|
116
96
|
export const easeInQuint = (position) => {
|
|
117
97
|
return Math.pow(position, 5);
|
|
@@ -120,9 +100,7 @@ export const easeInQuint = (position) => {
|
|
|
120
100
|
* Calculates an easing multiplier for: Quint Out
|
|
121
101
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
122
102
|
* @returns The easing multiplier for the position.
|
|
123
|
-
* @group Math
|
|
124
103
|
* @group Easing
|
|
125
|
-
* @group Animation
|
|
126
104
|
*/
|
|
127
105
|
export const easeOutQuint = (position) => {
|
|
128
106
|
return Math.pow(position - 1, 5) + 1;
|
|
@@ -131,9 +109,7 @@ export const easeOutQuint = (position) => {
|
|
|
131
109
|
* Calculates an easing multiplier for: Quint In+Out
|
|
132
110
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
133
111
|
* @returns The easing multiplier for the position.
|
|
134
|
-
* @group Math
|
|
135
112
|
* @group Easing
|
|
136
|
-
* @group Animation
|
|
137
113
|
*/
|
|
138
114
|
export const easeInOutQuint = (position) => {
|
|
139
115
|
if ((position /= 0.5) < 1)
|
|
@@ -144,9 +120,7 @@ export const easeInOutQuint = (position) => {
|
|
|
144
120
|
* Calculates an easing multiplier for: Sine In
|
|
145
121
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
146
122
|
* @returns The easing multiplier for the position.
|
|
147
|
-
* @group Math
|
|
148
123
|
* @group Easing
|
|
149
|
-
* @group Animation
|
|
150
124
|
*/
|
|
151
125
|
export const easeInSine = (position) => {
|
|
152
126
|
return -Math.cos(position * (Math.PI / 2)) + 1;
|
|
@@ -155,9 +129,7 @@ export const easeInSine = (position) => {
|
|
|
155
129
|
* Calculates an easing multiplier for: Sine Out
|
|
156
130
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
157
131
|
* @returns The easing multiplier for the position.
|
|
158
|
-
* @group Math
|
|
159
132
|
* @group Easing
|
|
160
|
-
* @group Animation
|
|
161
133
|
*/
|
|
162
134
|
export const easeOutSine = (position) => {
|
|
163
135
|
return Math.sin(position * (Math.PI / 2));
|
|
@@ -166,9 +138,7 @@ export const easeOutSine = (position) => {
|
|
|
166
138
|
* Calculates an easing multiplier for: Sine In+Out
|
|
167
139
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
168
140
|
* @returns The easing multiplier for the position.
|
|
169
|
-
* @group Math
|
|
170
141
|
* @group Easing
|
|
171
|
-
* @group Animation
|
|
172
142
|
*/
|
|
173
143
|
export const easeInOutSine = (position) => {
|
|
174
144
|
return -0.5 * (Math.cos(Math.PI * position) - 1);
|
|
@@ -177,9 +147,7 @@ export const easeInOutSine = (position) => {
|
|
|
177
147
|
* Calculates an easing multiplier for: Expo In
|
|
178
148
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
179
149
|
* @returns The easing multiplier for the position.
|
|
180
|
-
* @group Math
|
|
181
150
|
* @group Easing
|
|
182
|
-
* @group Animation
|
|
183
151
|
*/
|
|
184
152
|
export const easeInExpo = (position) => {
|
|
185
153
|
return position === 0 ? 0 : Math.pow(2, 10 * (position - 1));
|
|
@@ -188,9 +156,7 @@ export const easeInExpo = (position) => {
|
|
|
188
156
|
* Calculates an easing multiplier for: Expo Out
|
|
189
157
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
190
158
|
* @returns The easing multiplier for the position.
|
|
191
|
-
* @group Math
|
|
192
159
|
* @group Easing
|
|
193
|
-
* @group Animation
|
|
194
160
|
*/
|
|
195
161
|
export const easeOutExpo = (position) => {
|
|
196
162
|
return position === 1 ? 1 : -Math.pow(2, -10 * position) + 1;
|
|
@@ -199,9 +165,7 @@ export const easeOutExpo = (position) => {
|
|
|
199
165
|
* Calculates an easing multiplier for: Expo In+Out
|
|
200
166
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
201
167
|
* @returns The easing multiplier for the position.
|
|
202
|
-
* @group Math
|
|
203
168
|
* @group Easing
|
|
204
|
-
* @group Animation
|
|
205
169
|
*/
|
|
206
170
|
export const easeInOutExpo = (position) => {
|
|
207
171
|
if (position === 0)
|
|
@@ -216,9 +180,7 @@ export const easeInOutExpo = (position) => {
|
|
|
216
180
|
* Calculates an easing multiplier for: Circ In
|
|
217
181
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
218
182
|
* @returns The easing multiplier for the position.
|
|
219
|
-
* @group Math
|
|
220
183
|
* @group Easing
|
|
221
|
-
* @group Animation
|
|
222
184
|
*/
|
|
223
185
|
export const easeInCirc = (position) => {
|
|
224
186
|
return -(Math.sqrt(1 - position * position) - 1);
|
|
@@ -227,9 +189,7 @@ export const easeInCirc = (position) => {
|
|
|
227
189
|
* Calculates an easing multiplier for: Circ Out
|
|
228
190
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
229
191
|
* @returns The easing multiplier for the position.
|
|
230
|
-
* @group Math
|
|
231
192
|
* @group Easing
|
|
232
|
-
* @group Animation
|
|
233
193
|
*/
|
|
234
194
|
export const easeOutCirc = (position) => {
|
|
235
195
|
return Math.sqrt(1 - Math.pow(position - 1, 2));
|
|
@@ -238,9 +198,7 @@ export const easeOutCirc = (position) => {
|
|
|
238
198
|
* Calculates an easing multiplier for: Circ In+Out
|
|
239
199
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
240
200
|
* @returns The easing multiplier for the position.
|
|
241
|
-
* @group Math
|
|
242
201
|
* @group Easing
|
|
243
|
-
* @group Animation
|
|
244
202
|
*/
|
|
245
203
|
export const easeInOutCirc = (position) => {
|
|
246
204
|
if ((position /= 0.5) < 1)
|
|
@@ -251,9 +209,7 @@ export const easeInOutCirc = (position) => {
|
|
|
251
209
|
* Calculates an easing multiplier for: Bounce Out
|
|
252
210
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
253
211
|
* @returns The easing multiplier for the position.
|
|
254
|
-
* @group Math
|
|
255
212
|
* @group Easing
|
|
256
|
-
* @group Animation
|
|
257
213
|
*/
|
|
258
214
|
export const easeOutBounce = (position) => {
|
|
259
215
|
if (position < 1 / 2.75) {
|
|
@@ -271,9 +227,7 @@ export const easeOutBounce = (position) => {
|
|
|
271
227
|
* Calculates an easing multiplier for: Back In
|
|
272
228
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
273
229
|
* @returns The easing multiplier for the position.
|
|
274
|
-
* @group Math
|
|
275
230
|
* @group Easing
|
|
276
|
-
* @group Animation
|
|
277
231
|
*/
|
|
278
232
|
export const easeInBack = (position) => {
|
|
279
233
|
const s = 1.70158;
|
|
@@ -283,9 +237,7 @@ export const easeInBack = (position) => {
|
|
|
283
237
|
* Calculates an easing multiplier for: Back Out
|
|
284
238
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
285
239
|
* @returns The easing multiplier for the position.
|
|
286
|
-
* @group Math
|
|
287
240
|
* @group Easing
|
|
288
|
-
* @group Animation
|
|
289
241
|
*/
|
|
290
242
|
export const easeOutBack = (position) => {
|
|
291
243
|
const s = 1.70158;
|
|
@@ -295,9 +247,7 @@ export const easeOutBack = (position) => {
|
|
|
295
247
|
* Calculates an easing multiplier for: Back In+Out
|
|
296
248
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
297
249
|
* @returns The easing multiplier for the position.
|
|
298
|
-
* @group Math
|
|
299
250
|
* @group Easing
|
|
300
|
-
* @group Animation
|
|
301
251
|
*/
|
|
302
252
|
export const easeInOutBack = (position) => {
|
|
303
253
|
let s = 1.70158;
|
|
@@ -310,9 +260,7 @@ export const easeInOutBack = (position) => {
|
|
|
310
260
|
* Calculates an easing multiplier for: Elastic
|
|
311
261
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
312
262
|
* @returns The easing multiplier for the position.
|
|
313
|
-
* @group Math
|
|
314
263
|
* @group Easing
|
|
315
|
-
* @group Animation
|
|
316
264
|
*/
|
|
317
265
|
export const easeElastic = (position) => {
|
|
318
266
|
return -1 * Math.pow(4, -8 * position) * Math.sin(((position * 6 - 1) * (2 * Math.PI)) / 2) + 1;
|
|
@@ -321,9 +269,7 @@ export const easeElastic = (position) => {
|
|
|
321
269
|
* Calculates an easing multiplier for: Swing In+Out
|
|
322
270
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
323
271
|
* @returns The easing multiplier for the position.
|
|
324
|
-
* @group Math
|
|
325
272
|
* @group Easing
|
|
326
|
-
* @group Animation
|
|
327
273
|
*/
|
|
328
274
|
export const swingInOut = (position) => {
|
|
329
275
|
let s = 1.70158;
|
|
@@ -335,9 +281,7 @@ export const swingInOut = (position) => {
|
|
|
335
281
|
* Calculates an easing multiplier for: Swing In
|
|
336
282
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
337
283
|
* @returns The easing multiplier for the position.
|
|
338
|
-
* @group Math
|
|
339
284
|
* @group Easing
|
|
340
|
-
* @group Animation
|
|
341
285
|
*/
|
|
342
286
|
export const easeSwingIn = (position) => {
|
|
343
287
|
const s = 1.70158;
|
|
@@ -347,9 +291,7 @@ export const easeSwingIn = (position) => {
|
|
|
347
291
|
* Calculates an easing multiplier for: Swing Out
|
|
348
292
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
349
293
|
* @returns The easing multiplier for the position.
|
|
350
|
-
* @group Math
|
|
351
294
|
* @group Easing
|
|
352
|
-
* @group Animation
|
|
353
295
|
*/
|
|
354
296
|
export const easeSwingOut = (position) => {
|
|
355
297
|
const s = 1.70158;
|
|
@@ -359,9 +301,7 @@ export const easeSwingOut = (position) => {
|
|
|
359
301
|
* Calculates an easing multiplier for: Bounce
|
|
360
302
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
361
303
|
* @returns The easing multiplier for the position.
|
|
362
|
-
* @group Math
|
|
363
304
|
* @group Easing
|
|
364
|
-
* @group Animation
|
|
365
305
|
*/
|
|
366
306
|
export const easeBounce = (position) => {
|
|
367
307
|
if (position < 1 / 2.75) {
|
|
@@ -379,9 +319,7 @@ export const easeBounce = (position) => {
|
|
|
379
319
|
* Calculates an easing multiplier for: Bounce Past
|
|
380
320
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
381
321
|
* @returns The easing multiplier for the position.
|
|
382
|
-
* @group Math
|
|
383
322
|
* @group Easing
|
|
384
|
-
* @group Animation
|
|
385
323
|
*/
|
|
386
324
|
export const easeBouncePast = (position) => {
|
|
387
325
|
if (position < 1 / 2.75) {
|
|
@@ -399,9 +337,7 @@ export const easeBouncePast = (position) => {
|
|
|
399
337
|
* Calculates an easing multiplier for: Simple In+Out
|
|
400
338
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
401
339
|
* @returns The easing multiplier for the position.
|
|
402
|
-
* @group Math
|
|
403
340
|
* @group Easing
|
|
404
|
-
* @group Animation
|
|
405
341
|
*/
|
|
406
342
|
export const easeFromTo = (position) => {
|
|
407
343
|
if ((position /= 0.5) < 1) {
|
|
@@ -413,9 +349,7 @@ export const easeFromTo = (position) => {
|
|
|
413
349
|
* Calculates an easing multiplier for: Simple In
|
|
414
350
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
415
351
|
* @returns The easing multiplier for the position.
|
|
416
|
-
* @group Math
|
|
417
352
|
* @group Easing
|
|
418
|
-
* @group Animation
|
|
419
353
|
*/
|
|
420
354
|
export const easeFrom = (position) => {
|
|
421
355
|
return Math.pow(position, 4);
|
|
@@ -424,9 +358,7 @@ export const easeFrom = (position) => {
|
|
|
424
358
|
* Calculates an easing multiplier for: Simple Out
|
|
425
359
|
* @param position - The current position between start and end (from `0` to `1`)
|
|
426
360
|
* @returns The easing multiplier for the position.
|
|
427
|
-
* @group Math
|
|
428
361
|
* @group Easing
|
|
429
|
-
* @group Animation
|
|
430
362
|
*/
|
|
431
363
|
export const easeTo = (position) => {
|
|
432
364
|
return Math.pow(position, 0.25);
|
package/math/easing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"easing.js","sourceRoot":"","sources":["../../source/math/easing.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAEnD
|
|
1
|
+
{"version":3,"file":"easing.js","sourceRoot":"","sources":["../../source/math/easing.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE;IACrD,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAU,EAAE;IACtD,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAgB,EAAU,EAAE;IACxD,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,CAAC,GAAG,GAAG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