# Class Motion<K>

#### Type Parameters

- K extends string

- Defined in lib/five/utils/motion.ts:76

##### Index

### Constructors

constructor

### Properties

config
duration
ended
keyframes
progress
startTime
startVelocity
value

### Methods

dispose
getKeyFrameSegment
getProgressVelocity
getTargetKeyframe
set
setKeyframes
update

## Constructors

### constructor

- new Motion<K extends string>(initalValue: MotionInitalValue<K>): Motion<K>

  #### Type Parameters

  - K extends string

  #### Parameters

  - initalValue: MotionInitalValue<K>

  #### Returns Motion<K>

  - Defined in lib/five/utils/motion.ts:89

## Properties

### config

config: MotionConfig<K>

- Defined in lib/five/utils/motion.ts:78

### duration

duration: number

- Defined in lib/five/utils/motion.ts:85

### ended

ended: boolean

- Defined in lib/five/utils/motion.ts:81

### keyframes

keyframes: MotionKeyframe<K>[]

- Defined in lib/five/utils/motion.ts:86

### progress

progress: number

- Defined in lib/five/utils/motion.ts:80

### startTime

startTime: number

- Defined in lib/five/utils/motion.ts:83

### startVelocity

startVelocity: number

- Defined in lib/five/utils/motion.ts:84

### value

value: MotionValue<K>

- Defined in lib/five/utils/motion.ts:79

## Methods

### dispose

- dispose(): void

  #### Returns void

  - Defined in lib/five/utils/motion.ts:241

### getKeyFrameSegment

- getKeyFrameSegment(time: number): [MotionKeyframe<K>, MotionKeyframe<K>]

  #### Parameters

  - time: number

  #### Returns [MotionKeyframe<K>, MotionKeyframe<K>]

  - Defined in lib/five/utils/motion.ts:168

### getProgressVelocity

- getProgressVelocity(time: number): number

  #### Parameters

  - time: number

  #### Returns number

  - Defined in lib/five/utils/motion.ts:146

### getTargetKeyframe

- getTargetKeyframe(): MotionKeyframe<K>

  #### Returns MotionKeyframe<K>

  - Defined in lib/five/utils/motion.ts:178

### set

- set(
  value: Partial<MotionValue<K>>,
  duration: number,
  startProgressVelocity?: number,
  time?: number,
  ): Promise<void>

  #### Parameters

  - value: Partial<MotionValue<K>>
  - duration: number
  - startProgressVelocity: number = 0
  - `Optional` time: number

  #### Returns Promise<void>

  - Defined in lib/five/utils/motion.ts:182

### setKeyframes

- setKeyframes(
  keyframes: MotionKeyframe<K>[],
  duration: number,
  startProgressVelocity?: number,
  time?: number,
  ): Promise<void>

  #### Parameters

  - keyframes: MotionKeyframe<K>[]
  - duration: number
  - startProgressVelocity: number = 0
  - `Optional` time: number

  #### Returns Promise<void>

  - Defined in lib/five/utils/motion.ts:206

### update

- update(time: number): boolean

  #### Parameters

  - time: number

  #### Returns boolean

  - Defined in lib/five/utils/motion.ts:154