forked from serjIII/threejsSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnimationMixer.html
121 lines (96 loc) · 3.87 KB
/
AnimationMixer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<p class="desc">
The AnimationMixer is a player for animations on a particular object in
the scene. When multiple objects in the scene are animated independently,
one AnimationMixer may be used for each object.<br /><br />
For an overview of the different elements of the three.js animation system
see the "Animation System" article in the "Next Steps" section of the
manual.
</p>
<h2>Constructor</h2>
<h3>[name]( [param:Object3D rootObject] )</h3>
<p>
[page:Object3D rootObject] - the object whose animations shall be played
by this mixer.<br />
</p>
<h2>Properties</h2>
<h3>[property:Number time]</h3>
<p>
The global mixer time (in seconds; starting with `0` on the mixer's
creation).
</p>
<h3>[property:Number timeScale]</h3>
<p>
A scaling factor for the global [page:.time mixer time].<br /><br />
Note: Setting the mixer's timeScale to `0` and later back to `1` is a
possibility to pause/unpause all actions that are controlled by this
mixer.
</p>
<h2>Methods</h2>
<h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
</h3>
<p>
Returns an [page:AnimationAction] for the passed clip, optionally using a
root object different from the mixer's default root. The first parameter
can be either an [page:AnimationClip] object or the name of an
AnimationClip.<br /><br />
If an action fitting the clip and root parameters doesn't yet exist, it
will be created by this method. Calling this method several times with the
same clip and root parameters always returns the same clip instance.
</p>
<h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
</h3>
<p>
Returns an existing [page:AnimationAction] for the passed clip, optionally
using a root object different from the mixer's default root.<br /><br />
The first parameter can be either an [page:AnimationClip] object or the
name of an AnimationClip.
</p>
<h3>[method:Object3D getRoot]()</h3>
<p>Returns this mixer's root object.</p>
<h3>[method:this stopAllAction]()</h3>
<p>Deactivates all previously scheduled actions on this mixer.</p>
<h3>[method:this update]([param:Number deltaTimeInSeconds])</h3>
<p>
Advances the global mixer time and updates the animation.<br /><br />
This is usually done in the render loop, passing [page:Clock.getDelta clock.getDelta] scaled by the mixer's [page:.timeScale timeScale].
</p>
<h3>[method:this setTime]([param:Number timeInSeconds])</h3>
<p>
Sets the global mixer to a specific time and updates the animation
accordingly.<br /><br />
This is useful when you need to jump to an exact time in an animation. The
input parameter will be scaled by the mixer's [page:.timeScale timeScale].
</p>
<h3>[method:undefined uncacheClip]([param:AnimationClip clip])</h3>
<p>
Deallocates all memory resources for a clip. Before using this method make
sure to call [page:AnimationAction.stop]() for all related actions.
</p>
<h3>[method:undefined uncacheRoot]([param:Object3D root])</h3>
<p>
Deallocates all memory resources for a root object. Before using this
method make sure to call [page:AnimationAction.stop]() for all related
actions.
</p>
<h3>[method:undefined uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])
</h3>
<p>
Deallocates all memory resources for an action. Before using this method
make sure to call [page:AnimationAction.stop]() to deactivate the action.
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>