1 Star 0 Fork 4K

Feng Lin/interface_sdk-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
@ohos.curves.d.ts 25.99 KB
一键复制 编辑 原始数据 按行查看 历史
happy 提交于 2024-07-29 15:49 +08:00 . 更改springMotion的注释
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves.
*
* @namespace curves
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves.
*
* @namespace curves
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves.
*
* @namespace curves
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
declare namespace curves {
/**
* enum Curve.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* enum Curve.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* enum Curve.
*
* @enum { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
enum Curve {
/**
* Linear. Indicates that the animation has the same velocity from start to finish.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Linear. Indicates that the animation has the same velocity from start to finish.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Linear. Indicates that the animation has the same velocity from start to finish.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
Linear,
/**
* Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end,
* CubicBezier(0.25, 0.1, 0.25, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end,
* CubicBezier(0.25, 0.1, 0.25, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end,
* CubicBezier(0.25, 0.1, 0.25, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
Ease,
/**
* EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
EaseIn,
/**
* EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
EaseOut,
/**
* EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
EaseInOut,
/**
* FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
FastOutSlowIn,
/**
* LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
LinearOutSlowIn,
/**
* FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
FastOutLinearIn,
/**
* ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
ExtremeDeceleration,
/**
* Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
Sharp,
/**
* Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
Rhythm,
/**
* Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
Smooth,
/**
* Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
*/
/**
* Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
Friction,
}
/**
* Interface for curve object.
*
* @typedef ICurve
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Interface for curve object.
*
* @typedef ICurve
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Interface for curve object.
*
* @typedef ICurve
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
interface ICurve {
/**
* Get curve value by fraction.
*
* @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1].
* Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used.
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Get curve value by fraction.
*
* @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1].
* Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used.
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Get curve value by fraction.
*
* @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1].
* Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used.
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
interpolate(fraction: number): number;
}
/**
* Initializes the interpolator curve when called.
*
* @param { Curve } [curve] The default value is Curve.Linear
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Initializes the interpolator curve when called.
*
* @param { Curve } [curve] The default value is Curve.Linear
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Initializes the interpolator curve when called.
*
* @param { Curve } [curve] The default value is Curve.Linear
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function initCurve(curve?: Curve): ICurve;
/**
* Initializes the interpolator curve when called.
*
* @param { Curve } [curve]
* @returns { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 9
* @useinstead initCurve
*/
function init(curve?: Curve): string;
/**
* Constructs a step curve when called.
*
* @param { number } count -The number of steps. The range of this value is [1, +∞).
* @param { boolean } end -A step change occurs at the start or end of each interval.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Constructs a step curve when called.
*
* @param { number } count -The number of steps. The range of this value is [1, +∞).
* @param { boolean } end -A step change occurs at the start or end of each interval.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs a step curve when called.
*
* @param { number } count -The number of steps. The range of this value is [1, +∞).
* @param { boolean } end -A step change occurs at the start or end of each interval.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function stepsCurve(count: number, end: boolean): ICurve;
/**
* Constructs a custom curve when called.
*
* @param { function } interpolate - fraction range is [0,1], the return number must between [0,1].
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs a custom curve when called.
*
* @param { function } interpolate - fraction range is [0,1], the return number must between [0,1].
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function customCurve(interpolate: (fraction: number) => number): ICurve;
/**
* Constructs a step curve when called.
*
* @param { number } count
* @param { boolean } end
* @returns { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 9
* @useinstead stepsCurve
*/
function steps(count: number, end: boolean): string;
/**
* Constructs a third-order Bezier curve when called.
* @param { number } x1 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y1 -Value range (-∞, +∞).
* @param { number } x2 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y2 -Value range (-∞, +∞).
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Constructs a third-order Bezier curve when called.
*
* @param { number } x1 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y1 -Value range (-∞, +∞).
* @param { number } x2 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y2 -Value range (-∞, +∞).
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs a third-order Bezier curve when called.
*
* @param { number } x1 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y1 -Value range (-∞, +∞).
* @param { number } x2 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y2 -Value range (-∞, +∞).
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
/**
* Constructs a third-order Bezier curve when called.
*
* @param { number } x1 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y1 -Value range (-∞, +∞).
* @param { number } x2 -Value range [0, 1].
* Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used.
* @param { number } y2 -Value range (-∞, +∞).
* @returns { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 9
* @useinstead cubicBezierCurve
*/
function cubicBezier(x1: number, y1: number, x2: number, y2: number): string;
/**
* Constructs a spring curve when called. For more information about the meaning of the parameter, see spring().
*
* @param { number } velocity -Value range (-∞, +∞).
* @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Constructs a spring curve when called.
*
* @param { number } velocity -Value range (-∞, +∞).
* @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs a spring curve when called.
*
* @param { number } velocity -Value range (-∞, +∞).
* @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
/**
* Constructs a spring curve when called.
*
* @param { number } velocity -Initial velocity. An influence parameter of external factors on elastic dynamics,
* purpose is to ensure a smooth transition of the object from the previous state of motion to the elastic dynamics.
* @param { number } mass -Quality. The force object of the elastic system will have an inertial effect on elastic
* system. The greater the mass, the greater the amplitude of the oscillation.
* @param { number } stiffness -The degree to which an object is deformed by resisting the applied force.
* @param { number } damping -Pure number, Used to describe oscillation and decay of a system after being disturbed.
* @returns { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 7
* @deprecated since 9
* @useinstead springCurve
*/
function spring(velocity: number, mass: number, stiffness: number, damping: number): string;
/**
* Constructs a spring motion when called.
*
* @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.55 is used.
* @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.825 is used.
* @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Constructs a spring motion when called.
*
* @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.55 is used.
* @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.825 is used.
* @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs a spring motion when called.
*
* @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.55 is used.
* @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.825 is used.
* @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
/**
* Constructs a responsive spring motion when called.
*
* @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.15 is used.
* @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.86 is used.
* @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.25 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 9
*/
/**
* Constructs a responsive spring motion when called.
*
* @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.15 is used.
* @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.86 is used.
* @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.25 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs a responsive spring motion when called.
* The parameters are interpreted as in springMotion.
*
* @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.15 is used.
* @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.86 is used.
* @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞).
* Note: If a value is set to 0 or less, the default value of 0.25 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
/**
* Constructs an interpolating spring curve when called, the animation duration can not be specified manually,
* and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator
* to calculate the actual animation values.
*
* @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the
* value changes from 0 to 1,specific value range (-∞, ∞).
* @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞).
* Note: If the value is less than or equal to 0, the value 1 is used.
* @param { number } stiffness - the stiffness of spring, value range (0, +∞).
* Note: If the value is less than or equal to 0, the value 1 is used.
* @param { number } damping - the damping value of spring, value range (0, +∞).
* Note: If the value is less than or equal to 0, the value 1 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @since 10
*/
/**
* Constructs an interpolating spring curve when called, the animation duration can not be specified manually,
* and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator
* to calculate the actual animation values.
*
* @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the
* value changes from 0 to 1,specific value range (-∞, ∞).
* @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞).
* Note: If the value is less than or equal to 0, the value 1 is used.
* @param { number } stiffness - the stiffness of spring, value range (0, +∞).
* Note: If the value is less than or equal to 0, the value 1 is used.
* @param { number } damping - the damping value of spring, value range (0, +∞).
* Note: If the value is less than or equal to 0, the value 1 is used.
* @returns { ICurve }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform
* @atomicservice
* @since 11
*/
function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
}
export default curves;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lffl8796/interface_sdk-js.git
git@gitee.com:lffl8796/interface_sdk-js.git
lffl8796
interface_sdk-js
interface_sdk-js
master

搜索帮助