UNPKG

2.31 kBTypeScriptView Raw
1import { AnimationMixer } from './AnimationMixer';
2import { AnimationClip } from './AnimationClip';
3import { AnimationActionLoopStyles, AnimationBlendMode } from '../constants';
4import { Object3D } from '../core/Object3D';
5// Animation ////////////////////////////////////////////////////////////////////////////////////////
6
7export class AnimationAction {
8 constructor(mixer: AnimationMixer, clip: AnimationClip, localRoot?: Object3D, blendMode?: AnimationBlendMode);
9
10 blendMode: AnimationBlendMode;
11
12 /**
13 * @default THREE.LoopRepeat
14 */
15 loop: AnimationActionLoopStyles;
16
17 /**
18 * @default 0
19 */
20 time: number;
21
22 /**
23 * @default 1
24 */
25 timeScale: number;
26
27 /**
28 * @default 1
29 */
30 weight: number;
31
32 /**
33 * @default Infinity
34 */
35 repetitions: number;
36
37 /**
38 * @default false
39 */
40 paused: boolean;
41
42 /**
43 * @default true
44 */
45 enabled: boolean;
46
47 /**
48 * @default false
49 */
50 clampWhenFinished: boolean;
51
52 /**
53 * @default true
54 */
55 zeroSlopeAtStart: boolean;
56
57 /**
58 * @default true
59 */
60 zeroSlopeAtEnd: boolean;
61
62 play(): AnimationAction;
63 stop(): AnimationAction;
64 reset(): AnimationAction;
65 isRunning(): boolean;
66 isScheduled(): boolean;
67 startAt(time: number): AnimationAction;
68 setLoop(mode: AnimationActionLoopStyles, repetitions: number): AnimationAction;
69 setEffectiveWeight(weight: number): AnimationAction;
70 getEffectiveWeight(): number;
71 fadeIn(duration: number): AnimationAction;
72 fadeOut(duration: number): AnimationAction;
73 crossFadeFrom(fadeOutAction: AnimationAction, duration: number, warp: boolean): AnimationAction;
74 crossFadeTo(fadeInAction: AnimationAction, duration: number, warp: boolean): AnimationAction;
75 stopFading(): AnimationAction;
76 setEffectiveTimeScale(timeScale: number): AnimationAction;
77 getEffectiveTimeScale(): number;
78 setDuration(duration: number): AnimationAction;
79 syncWith(action: AnimationAction): AnimationAction;
80 halt(duration: number): AnimationAction;
81 warp(statTimeScale: number, endTimeScale: number, duration: number): AnimationAction;
82 stopWarping(): AnimationAction;
83 getMixer(): AnimationMixer;
84 getClip(): AnimationClip;
85 getRoot(): Object3D;
86}