Browse Source

Documentation for new animation system. (#9923)

Don McCurdy 8 years ago
parent
commit
0237f19160

+ 132 - 0
docs/api/animation/AnimationAction.html

@@ -0,0 +1,132 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <base href="../../../" />
+    <script src="list.js"></script>
+    <script src="page.js"></script>
+    <link type="text/css" rel="stylesheet" href="page.css" />
+  </head>
+  <body>
+    <h1>[name]</h1>
+
+    <div class="desc">
+    An AnimationAction schedules clip playback on specific objects.
+    </div>
+
+
+    <h2>Constructor</h2>
+
+
+    <h3>[name]( [page:AnimationMixer mixer], [page:AnimationClip clip], [page:Object3D localRoot] )</h3>
+
+
+    <h2>Properties</h2>
+
+
+    <h3>[property:Number time]</h3>
+
+    <h3>[property:Number timeScale]</h3>
+
+    <h3>[property:Number weight]</h3>
+
+    <h3>[property:Number loop]</h3>
+
+    <h3>[property:Number repetitions]</h3>
+
+    <h3>[property:Boolean paused]</h3>
+
+    <h3>[property:Boolean enabled]</h3>
+
+    <h3>[property:Boolean clampWhenFinished]</h3>
+
+    <h3>[property:Boolean zeroSlopeAtStart]</h3>
+
+    <h3>[property:Boolean zeroSlopeAtEnd]</h3>
+
+
+    <h2>Methods</h2>
+
+
+    <h3>[method:AnimationAction play]()</h3>
+
+    <h3>[method:AnimationAction stop]()</h3>
+
+    <h3>[method:AnimationAction reset]()</h3>
+
+    <h3>[method:Boolean isRunning]()</h3>
+
+    <h3>[method:Boolean isScheduled]()</h3>
+
+    <h3>[method:AnimationAction startAt]()</h3>
+
+    <h3>[method:AnimationAction setLoop]( [page:Number mode], [page:Number repetitions] )</h3>
+
+    <h3>[method:AnimationAction setEffectiveWeight]( [page:Number weight] )</h3>
+
+    <h3>[method:number getEffectiveWeight]()</h3>
+
+    <h3>[method:AnimationAction fadeIn]( [page:Number duration] )</h3>
+
+    <h3>[method:AnimationAction fadeOut]( [page:Number duration] )</h3>
+
+    <h3>[method:AnimationAction crossFadeFrom]( [page:AnimationAction fadeOutAction], [page:Number duration], [page:Boolean warp] )</h3>
+
+    <h3>[method:AnimationAction crossFadeTo]( [page:AnimationAction fadeInAction], [page:Number duration], [page:Boolean warp] )</h3>
+
+    <h3>[method:AnimationAction stopFading]()</h3>
+
+    <h3>[method:AnimationAction setEffectiveTimeScale]( [page:Number timeScale] )</h3>
+
+    <h3>[method:Number getEffectiveTimeScale]()</h3>
+
+    <h3>[method:AnimationAction setDuration]( [page:Number duration] )</h3>
+
+    <h3>[method:AnimationAction syncWith]( [page:AnimationAction action] )</h3>
+
+    <h3>[method:AnimationAction halt]( [page:Number duration] )</h3>
+
+    <h3>[method:AnimationAction warp]( [page:Number startTimeScale], [page:Number endTimeScale], [page:Number duration] )</h3>
+
+    <h3>[method:AnimationAction stopWarping]()</h3>
+
+    <h3>[method:AnimationMixer getMixer]()</h3>
+
+    <h3>[method:AnimationClip getClip]()</h3>
+
+    <h3>[method:Object3D getRoot]()</h3>
+
+
+    <h2>Static Methods</h2>
+
+
+    <h3>[method:AnimationClip parse]( [page:Object json] )</h3>
+    <div>
+    json -- JSON object
+    </div>
+
+    <h3>[method:Object toJSON]( [page:AnimationClip clip] )</h3>
+    <div>
+    clip -- AnimationClip
+    </div>
+
+    <h3>[method:AnimationClip CreateFromMorphTargetSequence]( [page:String name], [page:Array morphTargetSequence], [page:Number fps], [page:Boolean noLoop] )</h3>
+    <div>
+    name -- Name for the new clip <br />
+    morphTargetSequence -- Array of morph targets <br />
+    fps -- Number of frames per second <br />
+    noLoop -- Whether looping occurs automatically.
+    </div>
+
+    <h3>[method:AnimationClip parseAnimation]( [page:Object animation], [page:Array bones] )</h3>
+    <div>
+    Parses the animation.hierarchy format and returns an AnimationClip.
+    </div>
+
+
+    <h2>Source</h2>
+
+
+    [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+  </body>
+</html>

+ 87 - 0
docs/api/animation/AnimationClip.html

@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <base href="../../../" />
+    <script src="list.js"></script>
+    <script src="page.js"></script>
+    <link type="text/css" rel="stylesheet" href="page.css" />
+  </head>
+  <body>
+    <h1>[name]</h1>
+
+    <div class="desc">
+    An AnimationClip is a reusable set of Tracks that represent an animation.
+    </div>
+
+
+    <h2>Constructor</h2>
+
+
+    <h3>[name]( [page:String name], [page:Number duration], tracks )</h3>
+
+
+    <h2>Properties</h2>
+
+
+    <h3>[property:String uuid]</h3>
+
+    <h3>[property:String name]</h3>
+
+    <h3>[property:Number duration]</h3>
+
+    <h3>.tracks</h3>
+
+
+    <h2>Methods</h2>
+
+
+    <h3>[method:null resetDuration]()</h3>
+    <div>
+    Resets duration by scanning all tracks in the clip.
+    </div>
+
+    <h3>[method:AnimationClip trim]()</h3>
+    <div>
+    Trims all tracks to the clip's duration.
+    </div>
+
+    <h3>[method:AnimationClip optimize]()</h3>
+    <div>
+    Optimizes each track.
+    </div>
+
+
+    <h2>Static Methods</h2>
+
+
+    <h3>[method:AnimationClip parse]( [page:Object json] )</h3>
+    <div>
+    json -- JSON object
+    </div>
+
+    <h3>[method:Object toJSON]( [page:AnimationClip clip] )</h3>
+    <div>
+    clip -- AnimationClip
+    </div>
+
+    <h3>[method:AnimationClip CreateFromMorphTargetSequence]( [page:String name], [page:Array morphTargetSequence], [page:Number fps], [page:Boolean noLoop] )</h3>
+    <div>
+    name -- Name for the new clip <br />
+    morphTargetSequence -- Array of morph targets <br />
+    fps -- Number of frames per second <br />
+    noLoop -- Whether looping occurs automatically.
+    </div>
+
+    <h3>[method:AnimationClip parseAnimation]( [page:Object animation], [page:Array bones] )</h3>
+    <div>
+    Parses the animation.hierarchy format and returns an AnimationClip.
+    </div>
+
+
+    <h2>Source</h2>
+
+
+    [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+  </body>
+</html>

+ 102 - 0
docs/api/animation/AnimationMixer.html

@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8" />
+    <base href="../../../" />
+    <script src="list.js"></script>
+    <script src="page.js"></script>
+    <link type="text/css" rel="stylesheet" href="page.css" />
+  </head>
+  <body>
+    <h1>[name]</h1>
+
+    <div class="desc">
+    The AnimationMixer is a player for AnimationClip objects.
+    </div>
+
+
+    <h2>Constructor</h2>
+
+
+    <h3>[name]( [page:Object3D root] )</h3>
+
+
+    <h2>Properties</h2>
+
+
+    <h3>[property:Number time]</h3>
+
+    <h3>[property:Number timeScale]</h3>
+
+
+    <h2>Methods</h2>
+
+
+    <h3>[method:AnimationAction clipAction]([page:AnimationClip clip], [page:Object3D optionalRoot])</h3>
+    <div>
+    clip -- AnimationClip <br />
+    optionalRoot -- Object3D
+    </div>
+    <div>
+    Return an action for a clip, optionally using a custom root target object.
+    </div>
+
+    <h3>[method:AnimationAction existingAction]([page:AnimationClip clip], [page:Object3D optionalRoot])</h3>
+    <div>
+    clip -- AnimationClip <br />
+    optionalRoot -- Object3D
+    </div>
+    <div>
+    Return an existing action.
+    </div>
+
+    <h3>[method:AnimationMixer stopAllAction]()</h3>
+    <div>
+    Deactivates all scheduled actions.
+    </div>
+
+    <h3>[method:AnimationMixer update]([page:Number deltaTimeMS]) </h3>
+    <div>
+    deltaTimeMS -- Time elapsed since last update in milliseconds.
+    </div>
+    <div>
+    Updates the animation with deltaTimeMS.
+    </div>
+
+    <h3>[method:Object3D getRoot]()</h3>
+    <div>
+    Return this mixer's root target object.
+    </div>
+
+    <h3>[method:null uncacheClip]([page:AnimationClip clip])</h3>
+    <div>
+    clip -- AnimationClip
+    </div>
+    <div>
+    Free all resources for a clip.
+    </div>
+
+    <h3>[method:null uncacheRoot]([page:Object3D root]) </h3>
+    <div>
+    root -- Object3D
+    </div>
+    <div>
+    Free all resources for a root target object.
+    </div>
+
+    <h3>[method:null uncacheAction]([page:AnimationClip clip], [page:Object3D optionalRoot])</h3>
+    <div>
+    clip -- AnimationClip <br />
+    optionalRoot -- Object3D
+    </div>
+    <div>
+    Free all resources for an action.
+    </div>
+
+
+    <h2>Source</h2>
+
+
+    [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+  </body>
+</html>

+ 2 - 2
docs/api/extras/animation/Animation.html → docs/api/extras/collada-animation/Animation.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<meta charset="utf-8" />
+		<meta charset="utf-8" />
 		<base href="../../../" />
 		<script src="list.js"></script>
 		<script src="page.js"></script>
@@ -123,6 +123,6 @@
 
 		<h2>Source</h2>
 
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
 	</body>
 </html>

+ 2 - 2
docs/api/extras/animation/AnimationHandler.html → docs/api/extras/collada-animation/AnimationHandler.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<meta charset="utf-8" />
+		<meta charset="utf-8" />
 		<base href="../../../" />
 		<script src="list.js"></script>
 		<script src="page.js"></script>
@@ -97,6 +97,6 @@
 
 		<h2>Source</h2>
 
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
 	</body>
 </html>

+ 2 - 2
docs/api/extras/animation/KeyFrameAnimation.html → docs/api/extras/collada-animation/KeyFrameAnimation.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en">
 	<head>
-		<meta charset="utf-8" />
+		<meta charset="utf-8" />
 		<base href="../../../" />
 		<script src="list.js"></script>
 		<script src="page.js"></script>
@@ -111,6 +111,6 @@
 		Used internally to traverse the animation
 		</div>
 
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+		[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/collada/[name].js examples/js/loaders/collada/[name].js]
 	</body>
 </html>

+ 10 - 4
docs/list.js

@@ -201,14 +201,20 @@ var list = {
 			[ "Texture", "api/textures/Texture" ]
 		],
 
+		"Animation": [
+			[ "AnimationAction", "api/animation/AnimationAction" ],
+			[ "AnimationClip", "api/animation/AnimationClip" ],
+			[ "AnimationMixer", "api/animation/AnimationMixer" ]
+		],
+
 		"Extras": [
 			[ "SceneUtils", "api/extras/SceneUtils" ]
 		],
 
-		"Extras / Animation": [
-			[ "Animation", "api/extras/animation/Animation" ],
-			[ "AnimationHandler", "api/extras/animation/AnimationHandler" ],
-			[ "KeyFrameAnimation", "api/extras/animation/KeyFrameAnimation" ]
+		"Extras / Collada Animation": [
+			[ "Animation", "api/extras/collada-animation/Animation" ],
+			[ "AnimationHandler", "api/extras/collada-animation/AnimationHandler" ],
+			[ "KeyFrameAnimation", "api/extras/collada-animation/KeyFrameAnimation" ]
 		],
 
 		"Extras / Core": [

+ 4 - 4
editor/js/libs/tern-threejs/threejs.js

@@ -970,7 +970,7 @@
       "!doc": "A class containing useful utility functions for scene manipulation."
     },
     "Animation": {
-      "!url": "http://threejs.org/docs/#Reference/extras/animation/Animation",
+      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/Animation",
       "prototype": {
         "root": {
           "!type": "Object3d",
@@ -1037,7 +1037,7 @@
       "!type": "fn(root: Object3d, name: string)"
     },
     "AnimationHandler": {
-      "!url": "http://threejs.org/docs/#Reference/extras/animation/AnimationHandler",
+      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/AnimationHandler",
       "prototype": {
         "CATMULLROM": {
           "!type": "number",
@@ -1080,7 +1080,7 @@
       "!type": "fn()"
     },
     "AnimationMorphTarget": {
-      "!url": "http://threejs.org/docs/#Reference/extras/animation/AnimationMorphTarget",
+      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/AnimationMorphTarget",
       "prototype": {
         "root": {
           "!type": "todo",
@@ -1139,7 +1139,7 @@
       "!type": "fn(root: todo, data: todo)"
     },
     "KeyFrameAnimation": {
-      "!url": "http://threejs.org/docs/#Reference/extras/animation/KeyFrameAnimation",
+      "!url": "http://threejs.org/docs/#Reference/extras/collada-animation/KeyFrameAnimation",
       "prototype": {
         "root": {
           "!type": "todo",