Download react-spring/packages/core/src/Animation.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 780 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-spring/packages/core/src/Animation.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-spring/packages/core/src/Animation.ts
-
curl -L -o Animation.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-spring/packages/core/src/Animation.ts
780 Bytes
| import { AnimatedValue } from '@react-spring/animated' | |
| import { FluidValue } from '@react-spring/shared' | |
| import { AnimationConfig } from './AnimationConfig' | |
| import { PickEventFns } from './types/internal' | |
| import { SpringProps } from './types' | |
| const emptyArray: readonly any[] = [] | |
| /** An animation being executed by the frameloop */ | |
| // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging | |
| export class Animation<T = any> { | |
| changed = false | |
| values: readonly AnimatedValue[] = emptyArray | |
| toValues: readonly number[] | null = null | |
| fromValues: readonly number[] = emptyArray | |
| to!: T | FluidValue<T> | |
| from!: T | FluidValue<T> | |
| config = new AnimationConfig() | |
| immediate = false | |
| } | |
| export interface Animation<T> extends PickEventFns<SpringProps<T>> {} | |