跳转到内容

Spring

Defined in: packages/core/src/utils/spring.ts:13

Constructors

Constructor

new Spring(currentPosition): Spring

Defined in: packages/core/src/utils/spring.ts:32

Parameters

ParameterTypeDefault value
currentPositionnumber0

Returns

Spring

Methods

arrived()

arrived(): boolean

Defined in: packages/core/src/utils/spring.ts:52

Returns

boolean


getCurrentPosition()

getCurrentPosition(): number

Defined in: packages/core/src/utils/spring.ts:118

Returns

number


setPosition()

setPosition(targetPosition): void

Defined in: packages/core/src/utils/spring.ts:61

Parameters

ParameterType
targetPositionnumber

Returns

void


setTargetPosition()

setTargetPosition(targetPosition, delay): void

Defined in: packages/core/src/utils/spring.ts:105

Parameters

ParameterTypeDefault value
targetPositionnumberundefined
delaynumber0

Returns

void


update()

update(delta): void

Defined in: packages/core/src/utils/spring.ts:68

Parameters

ParameterTypeDefault value
deltanumber0

Returns

void


updateParams()

updateParams(params, delay): void

Defined in: packages/core/src/utils/spring.ts:89

Parameters

ParameterTypeDefault value
paramsPartial<SpringParams>undefined
delaynumber0

Returns

void