1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. 23 * 24 * @namespace curves 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 7 27 */ 28/** 29 * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. 30 * 31 * @namespace curves 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @crossplatform 34 * @since 10 35 */ 36/** 37 * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. 38 * 39 * @namespace curves 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @atomicservice 43 * @since 11 44 */ 45declare namespace curves { 46 /** 47 * enum Curve. 48 * 49 * @enum { number } 50 * @syscap SystemCapability.ArkUI.ArkUI.Full 51 * @since 7 52 */ 53 /** 54 * enum Curve. 55 * 56 * @enum { number } 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @crossplatform 59 * @since 10 60 */ 61 /** 62 * enum Curve. 63 * 64 * @enum { number } 65 * @syscap SystemCapability.ArkUI.ArkUI.Full 66 * @crossplatform 67 * @atomicservice 68 * @since 11 69 */ 70 enum Curve { 71 /** 72 * Linear. Indicates that the animation has the same velocity from start to finish. 73 * 74 * @syscap SystemCapability.ArkUI.ArkUI.Full 75 * @since 7 76 */ 77 /** 78 * Linear. Indicates that the animation has the same velocity from start to finish. 79 * 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @crossplatform 82 * @since 10 83 */ 84 /** 85 * Linear. Indicates that the animation has the same velocity from start to finish. 86 * 87 * @syscap SystemCapability.ArkUI.ArkUI.Full 88 * @crossplatform 89 * @atomicservice 90 * @since 11 91 */ 92 Linear, 93 /** 94 * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, 95 * CubicBezier(0.25, 0.1, 0.25, 1.0). 96 * 97 * @syscap SystemCapability.ArkUI.ArkUI.Full 98 * @since 7 99 */ 100 /** 101 * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, 102 * CubicBezier(0.25, 0.1, 0.25, 1.0). 103 * 104 * @syscap SystemCapability.ArkUI.ArkUI.Full 105 * @crossplatform 106 * @since 10 107 */ 108 /** 109 * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, 110 * CubicBezier(0.25, 0.1, 0.25, 1.0). 111 * 112 * @syscap SystemCapability.ArkUI.ArkUI.Full 113 * @crossplatform 114 * @atomicservice 115 * @since 11 116 */ 117 Ease, 118 /** 119 * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). 120 * 121 * @syscap SystemCapability.ArkUI.ArkUI.Full 122 * @since 7 123 */ 124 /** 125 * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). 126 * 127 * @syscap SystemCapability.ArkUI.ArkUI.Full 128 * @crossplatform 129 * @since 10 130 */ 131 /** 132 * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). 133 * 134 * @syscap SystemCapability.ArkUI.ArkUI.Full 135 * @crossplatform 136 * @atomicservice 137 * @since 11 138 */ 139 EaseIn, 140 /** 141 * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). 142 * 143 * @syscap SystemCapability.ArkUI.ArkUI.Full 144 * @since 7 145 */ 146 /** 147 * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). 148 * 149 * @syscap SystemCapability.ArkUI.ArkUI.Full 150 * @crossplatform 151 * @since 10 152 */ 153 /** 154 * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). 155 * 156 * @syscap SystemCapability.ArkUI.ArkUI.Full 157 * @crossplatform 158 * @atomicservice 159 * @since 11 160 */ 161 EaseOut, 162 /** 163 * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). 164 * 165 * @syscap SystemCapability.ArkUI.ArkUI.Full 166 * @since 7 167 */ 168 /** 169 * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). 170 * 171 * @syscap SystemCapability.ArkUI.ArkUI.Full 172 * @crossplatform 173 * @since 10 174 */ 175 /** 176 * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). 177 * 178 * @syscap SystemCapability.ArkUI.ArkUI.Full 179 * @crossplatform 180 * @atomicservice 181 * @since 11 182 */ 183 EaseInOut, 184 /** 185 * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). 186 * 187 * @syscap SystemCapability.ArkUI.ArkUI.Full 188 * @since 7 189 */ 190 /** 191 * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). 192 * 193 * @syscap SystemCapability.ArkUI.ArkUI.Full 194 * @crossplatform 195 * @since 10 196 */ 197 /** 198 * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). 199 * 200 * @syscap SystemCapability.ArkUI.ArkUI.Full 201 * @crossplatform 202 * @atomicservice 203 * @since 11 204 */ 205 FastOutSlowIn, 206 /** 207 * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). 208 * 209 * @syscap SystemCapability.ArkUI.ArkUI.Full 210 * @since 7 211 */ 212 /** 213 * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). 214 * 215 * @syscap SystemCapability.ArkUI.ArkUI.Full 216 * @crossplatform 217 * @since 10 218 */ 219 /** 220 * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). 221 * 222 * @syscap SystemCapability.ArkUI.ArkUI.Full 223 * @crossplatform 224 * @atomicservice 225 * @since 11 226 */ 227 LinearOutSlowIn, 228 /** 229 * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). 230 * 231 * @syscap SystemCapability.ArkUI.ArkUI.Full 232 * @since 7 233 */ 234 /** 235 * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). 236 * 237 * @syscap SystemCapability.ArkUI.ArkUI.Full 238 * @crossplatform 239 * @since 10 240 */ 241 /** 242 * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). 243 * 244 * @syscap SystemCapability.ArkUI.ArkUI.Full 245 * @crossplatform 246 * @atomicservice 247 * @since 11 248 */ 249 FastOutLinearIn, 250 /** 251 * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). 252 * 253 * @syscap SystemCapability.ArkUI.ArkUI.Full 254 * @since 7 255 */ 256 /** 257 * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). 258 * 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @crossplatform 261 * @since 10 262 */ 263 /** 264 * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). 265 * 266 * @syscap SystemCapability.ArkUI.ArkUI.Full 267 * @crossplatform 268 * @atomicservice 269 * @since 11 270 */ 271 ExtremeDeceleration, 272 /** 273 * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). 274 * 275 * @syscap SystemCapability.ArkUI.ArkUI.Full 276 * @since 7 277 */ 278 /** 279 * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). 280 * 281 * @syscap SystemCapability.ArkUI.ArkUI.Full 282 * @crossplatform 283 * @since 10 284 */ 285 /** 286 * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). 287 * 288 * @syscap SystemCapability.ArkUI.ArkUI.Full 289 * @crossplatform 290 * @atomicservice 291 * @since 11 292 */ 293 Sharp, 294 /** 295 * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). 296 * 297 * @syscap SystemCapability.ArkUI.ArkUI.Full 298 * @since 7 299 */ 300 /** 301 * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). 302 * 303 * @syscap SystemCapability.ArkUI.ArkUI.Full 304 * @crossplatform 305 * @since 10 306 */ 307 /** 308 * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). 309 * 310 * @syscap SystemCapability.ArkUI.ArkUI.Full 311 * @crossplatform 312 * @atomicservice 313 * @since 11 314 */ 315 Rhythm, 316 /** 317 * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). 318 * 319 * @syscap SystemCapability.ArkUI.ArkUI.Full 320 * @since 7 321 */ 322 /** 323 * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). 324 * 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @crossplatform 327 * @since 10 328 */ 329 /** 330 * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). 331 * 332 * @syscap SystemCapability.ArkUI.ArkUI.Full 333 * @crossplatform 334 * @atomicservice 335 * @since 11 336 */ 337 Smooth, 338 /** 339 * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). 340 * 341 * @syscap SystemCapability.ArkUI.ArkUI.Full 342 * @since 7 343 */ 344 /** 345 * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). 346 * 347 * @syscap SystemCapability.ArkUI.ArkUI.Full 348 * @crossplatform 349 * @since 10 350 */ 351 /** 352 * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). 353 * 354 * @syscap SystemCapability.ArkUI.ArkUI.Full 355 * @crossplatform 356 * @atomicservice 357 * @since 11 358 */ 359 Friction, 360 } 361 362 /** 363 * Interface for curve object. 364 * 365 * @typedef ICurve 366 * @syscap SystemCapability.ArkUI.ArkUI.Full 367 * @since 9 368 */ 369 /** 370 * Interface for curve object. 371 * 372 * @typedef ICurve 373 * @syscap SystemCapability.ArkUI.ArkUI.Full 374 * @crossplatform 375 * @since 10 376 */ 377 /** 378 * Interface for curve object. 379 * 380 * @typedef ICurve 381 * @syscap SystemCapability.ArkUI.ArkUI.Full 382 * @crossplatform 383 * @atomicservice 384 * @since 11 385 */ 386 interface ICurve { 387 /** 388 * Get curve value by fraction. 389 * 390 * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. 391 * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. 392 * @returns { number } 393 * @syscap SystemCapability.ArkUI.ArkUI.Full 394 * @since 9 395 */ 396 /** 397 * Get curve value by fraction. 398 * 399 * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. 400 * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. 401 * @returns { number } 402 * @syscap SystemCapability.ArkUI.ArkUI.Full 403 * @crossplatform 404 * @since 10 405 */ 406 /** 407 * Get curve value by fraction. 408 * 409 * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. 410 * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. 411 * @returns { number } 412 * @syscap SystemCapability.ArkUI.ArkUI.Full 413 * @crossplatform 414 * @atomicservice 415 * @since 11 416 */ 417 interpolate(fraction: number): number; 418 } 419 420 /** 421 * Initializes the interpolator curve when called. 422 * 423 * @param { Curve } [curve] The default value is Curve.Linear 424 * @returns { ICurve } 425 * @syscap SystemCapability.ArkUI.ArkUI.Full 426 * @since 9 427 */ 428 /** 429 * Initializes the interpolator curve when called. 430 * 431 * @param { Curve } [curve] The default value is Curve.Linear 432 * @returns { ICurve } 433 * @syscap SystemCapability.ArkUI.ArkUI.Full 434 * @crossplatform 435 * @since 10 436 */ 437 /** 438 * Initializes the interpolator curve when called. 439 * 440 * @param { Curve } [curve] The default value is Curve.Linear 441 * @returns { ICurve } 442 * @syscap SystemCapability.ArkUI.ArkUI.Full 443 * @crossplatform 444 * @atomicservice 445 * @since 11 446 */ 447 function initCurve(curve?: Curve): ICurve; 448 449 /** 450 * Initializes the interpolator curve when called. 451 * 452 * @param { Curve } [curve] 453 * @returns { string } 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @since 7 456 * @deprecated since 9 457 * @useinstead initCurve 458 */ 459 function init(curve?: Curve): string; 460 461 /** 462 * Constructs a step curve when called. 463 * 464 * @param { number } count -The number of steps. The range of this value is [1, +∞). 465 * @param { boolean } end -A step change occurs at the start or end of each interval. 466 * @returns { ICurve } 467 * @syscap SystemCapability.ArkUI.ArkUI.Full 468 * @since 9 469 */ 470 /** 471 * Constructs a step curve when called. 472 * 473 * @param { number } count -The number of steps. The range of this value is [1, +∞). 474 * @param { boolean } end -A step change occurs at the start or end of each interval. 475 * @returns { ICurve } 476 * @syscap SystemCapability.ArkUI.ArkUI.Full 477 * @crossplatform 478 * @since 10 479 */ 480 /** 481 * Constructs a step curve when called. 482 * 483 * @param { number } count -The number of steps. The range of this value is [1, +∞). 484 * @param { boolean } end -A step change occurs at the start or end of each interval. 485 * @returns { ICurve } 486 * @syscap SystemCapability.ArkUI.ArkUI.Full 487 * @crossplatform 488 * @atomicservice 489 * @since 11 490 */ 491 function stepsCurve(count: number, end: boolean): ICurve; 492 493 /** 494 * Constructs a custom curve when called. 495 * 496 * @param { function } interpolate - fraction range is [0,1], the return number must between [0,1]. 497 * @returns { ICurve } 498 * @syscap SystemCapability.ArkUI.ArkUI.Full 499 * @crossplatform 500 * @since 10 501 */ 502 /** 503 * Constructs a custom curve when called. 504 * 505 * @param { function } interpolate - fraction range is [0,1], the return number must between [0,1]. 506 * @returns { ICurve } 507 * @syscap SystemCapability.ArkUI.ArkUI.Full 508 * @crossplatform 509 * @atomicservice 510 * @since 11 511 */ 512 function customCurve(interpolate: (fraction: number) => number): ICurve; 513 514 /** 515 * Constructs a step curve when called. 516 * 517 * @param { number } count 518 * @param { boolean } end 519 * @returns { string } 520 * @syscap SystemCapability.ArkUI.ArkUI.Full 521 * @since 7 522 * @deprecated since 9 523 * @useinstead stepsCurve 524 */ 525 function steps(count: number, end: boolean): string; 526 527 /** 528 * Constructs a third-order Bezier curve when called. 529 * @param { number } x1 -Value range [0, 1]. 530 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 531 * @param { number } y1 -Value range (-∞, +∞). 532 * @param { number } x2 -Value range [0, 1]. 533 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 534 * @param { number } y2 -Value range (-∞, +∞). 535 * @returns { ICurve } 536 * @syscap SystemCapability.ArkUI.ArkUI.Full 537 * @since 9 538 */ 539 /** 540 * Constructs a third-order Bezier curve when called. 541 * 542 * @param { number } x1 -Value range [0, 1]. 543 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 544 * @param { number } y1 -Value range (-∞, +∞). 545 * @param { number } x2 -Value range [0, 1]. 546 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 547 * @param { number } y2 -Value range (-∞, +∞). 548 * @returns { ICurve } 549 * @syscap SystemCapability.ArkUI.ArkUI.Full 550 * @crossplatform 551 * @since 10 552 */ 553 /** 554 * Constructs a third-order Bezier curve when called. 555 * 556 * @param { number } x1 -Value range [0, 1]. 557 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 558 * @param { number } y1 -Value range (-∞, +∞). 559 * @param { number } x2 -Value range [0, 1]. 560 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 561 * @param { number } y2 -Value range (-∞, +∞). 562 * @returns { ICurve } 563 * @syscap SystemCapability.ArkUI.ArkUI.Full 564 * @crossplatform 565 * @atomicservice 566 * @since 11 567 */ 568 function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; 569 570 /** 571 * Constructs a third-order Bezier curve when called. 572 * 573 * @param { number } x1 -Value range [0, 1]. 574 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 575 * @param { number } y1 -Value range (-∞, +∞). 576 * @param { number } x2 -Value range [0, 1]. 577 * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. 578 * @param { number } y2 -Value range (-∞, +∞). 579 * @returns { string } 580 * @syscap SystemCapability.ArkUI.ArkUI.Full 581 * @since 7 582 * @deprecated since 9 583 * @useinstead cubicBezierCurve 584 */ 585 function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; 586 587 /** 588 * Constructs a spring curve when called. For more information about the meaning of the parameter, see spring(). 589 * 590 * @param { number } velocity -Value range (-∞, +∞). 591 * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 592 * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 593 * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 594 * @returns { ICurve } 595 * @syscap SystemCapability.ArkUI.ArkUI.Full 596 * @since 9 597 */ 598 /** 599 * Constructs a spring curve when called. 600 * 601 * @param { number } velocity -Value range (-∞, +∞). 602 * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 603 * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 604 * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 605 * @returns { ICurve } 606 * @syscap SystemCapability.ArkUI.ArkUI.Full 607 * @crossplatform 608 * @since 10 609 */ 610 /** 611 * Constructs a spring curve when called. 612 * 613 * @param { number } velocity -Value range (-∞, +∞). 614 * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 615 * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 616 * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. 617 * @returns { ICurve } 618 * @syscap SystemCapability.ArkUI.ArkUI.Full 619 * @crossplatform 620 * @atomicservice 621 * @since 11 622 */ 623 function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; 624 625 /** 626 * Constructs a spring curve when called. 627 * 628 * @param { number } velocity -Initial velocity. An influence parameter of external factors on elastic dynamics, 629 * purpose is to ensure a smooth transition of the object from the previous state of motion to the elastic dynamics. 630 * @param { number } mass -Quality. The force object of the elastic system will have an inertial effect on elastic 631 * system. The greater the mass, the greater the amplitude of the oscillation. 632 * @param { number } stiffness -The degree to which an object is deformed by resisting the applied force. 633 * @param { number } damping -Pure number, Used to describe oscillation and decay of a system after being disturbed. 634 * @returns { string } 635 * @syscap SystemCapability.ArkUI.ArkUI.Full 636 * @since 7 637 * @deprecated since 9 638 * @useinstead springCurve 639 */ 640 function spring(velocity: number, mass: number, stiffness: number, damping: number): string; 641 642 /** 643 * Constructs a spring motion when called. 644 * 645 * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). 646 * Note: If a value is set to 0 or less, the default value of 0.55 is used. 647 * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). 648 * Note: If a value is set to 0 or less, the default value of 0.825 is used. 649 * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). 650 * Note: If a value is set to 0 or less, the default value of 0 is used. 651 * @returns { ICurve } 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @since 9 654 */ 655 /** 656 * Constructs a spring motion when called. 657 * 658 * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). 659 * Note: If a value is set to 0 or less, the default value of 0.55 is used. 660 * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). 661 * Note: If a value is set to 0 or less, the default value of 0.825 is used. 662 * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). 663 * Note: If a value is set to 0 or less, the default value of 0 is used. 664 * @returns { ICurve } 665 * @syscap SystemCapability.ArkUI.ArkUI.Full 666 * @crossplatform 667 * @since 10 668 */ 669 /** 670 * Constructs a spring motion when called. 671 * 672 * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). 673 * Note: If a value is set to 0 or less, the default value of 0.55 is used. 674 * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). 675 * Note: If a value is set to 0 or less, the default value of 0.825 is used. 676 * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). 677 * Note: If a value is set to 0 or less, the default value of 0 is used. 678 * @returns { ICurve } 679 * @syscap SystemCapability.ArkUI.ArkUI.Full 680 * @crossplatform 681 * @atomicservice 682 * @since 11 683 */ 684 function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; 685 686 /** 687 * Constructs a responsive spring motion when called. 688 * 689 * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). 690 * Note: If a value is set to 0 or less, the default value of 0.15 is used. 691 * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). 692 * Note: If a value is set to 0 or less, the default value of 0.86 is used. 693 * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). 694 * Note: If a value is set to 0 or less, the default value of 0.25 is used. 695 * @returns { ICurve } 696 * @syscap SystemCapability.ArkUI.ArkUI.Full 697 * @since 9 698 */ 699 /** 700 * Constructs a responsive spring motion when called. 701 * 702 * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). 703 * Note: If a value is set to 0 or less, the default value of 0.15 is used. 704 * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). 705 * Note: If a value is set to 0 or less, the default value of 0.86 is used. 706 * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). 707 * Note: If a value is set to 0 or less, the default value of 0.25 is used. 708 * @returns { ICurve } 709 * @syscap SystemCapability.ArkUI.ArkUI.Full 710 * @crossplatform 711 * @since 10 712 */ 713 /** 714 * Constructs a responsive spring motion when called. 715 * The parameters are interpreted as in springMotion. 716 * 717 * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). 718 * Note: If a value is set to 0 or less, the default value of 0.15 is used. 719 * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). 720 * Note: If a value is set to 0 or less, the default value of 0.86 is used. 721 * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). 722 * Note: If a value is set to 0 or less, the default value of 0.25 is used. 723 * @returns { ICurve } 724 * @syscap SystemCapability.ArkUI.ArkUI.Full 725 * @crossplatform 726 * @atomicservice 727 * @since 11 728 */ 729 function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; 730 731 /** 732 * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, 733 * and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator 734 * to calculate the actual animation values. 735 * 736 * @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the 737 * value changes from 0 to 1,specific value range (-∞, ∞). 738 * @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞). 739 * Note: If the value is less than or equal to 0, the value 1 is used. 740 * @param { number } stiffness - the stiffness of spring, value range (0, +∞). 741 * Note: If the value is less than or equal to 0, the value 1 is used. 742 * @param { number } damping - the damping value of spring, value range (0, +∞). 743 * Note: If the value is less than or equal to 0, the value 1 is used. 744 * @returns { ICurve } 745 * @syscap SystemCapability.ArkUI.ArkUI.Full 746 * @crossplatform 747 * @since 10 748 */ 749 /** 750 * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, 751 * and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator 752 * to calculate the actual animation values. 753 * 754 * @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the 755 * value changes from 0 to 1,specific value range (-∞, ∞). 756 * @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞). 757 * Note: If the value is less than or equal to 0, the value 1 is used. 758 * @param { number } stiffness - the stiffness of spring, value range (0, +∞). 759 * Note: If the value is less than or equal to 0, the value 1 is used. 760 * @param { number } damping - the damping value of spring, value range (0, +∞). 761 * Note: If the value is less than or equal to 0, the value 1 is used. 762 * @returns { ICurve } 763 * @syscap SystemCapability.ArkUI.ArkUI.Full 764 * @crossplatform 765 * @atomicservice 766 * @since 11 767 */ 768 function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; 769} 770 771export default curves; 772