123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <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">This class animates an object based on an hierarchy.This hierarchy can be Object3Ds or bones.</div>
- <h2>Constructor</h2>
- <h3>[name]([page:Object3d root], [page:String name])</h3>
- <div>
- root -- The mesh to animate. <br />
- name -- The name of the animation
- </div>
- <div>
- Creates an animation for root. The animation data is gathered from AnimationHandler based on its name.
- </div>
- <h2>Properties</h2>
- <h3>.[page:Object3d root]</h3>
- <div>
- The root object of the animation.
- </div>
- <h3>.[page:Object data]</h3>
- <div>
- The data containing the animation
- </div>
-
- <h3>.[page:Array hierarchy]</h3>
- <div>
- The objects that are influenced by the animation.
- </div>
- <h3>.[page:number currentTime]</h3>
- <div>
- The time elapsed since the last start/restart of the animation.
- </div>
-
- <h3>.[page:number timeScale]</h3>
- <div>
- The timez
- </div>
- <h3>.[page:boolean isPlaying]</h3>
- <div>
- Indicates whether the animation is playing. This shouldn't be adapted by user code.
- </div>
-
- <h3>.[page:boolean isPaused]</h3>
- <div>
- Indicates whether the animation is paused. This shouldn't be adapted by user code.
- </div>
-
- <h3>.[page:boolean loop]</h3>
- <div>
- Set to make the animation restart when the animation ends.
- </div>
-
- <h3>.[page:number interpolationType]</h3>
- <div>
- The type to indicate how to interpolate between 2 data points.
- </div>
- <h3>.[page:array points]</h3>
- <div>
- This should be removed from the code.(TODO).
- </div>
-
- <h3>.[page:Vector3 target]</h3>
- <div>
- This should be removed from the code.(TODO).
- </div>
- <h2>Methods</h2>
-
- <h3>.play([page:Number startTime])</h3>
- <div>
- Starts the animation from a moment startTime in the animation.
- </div>
- <h3>.pause() </h3>
- <div>
- Pauses the animation or restarts the animation after pausing it.
- </div>
- <h3>.stop()</h3>
- <div>
- Stops the animation.
- </div>
- <h3>.update([page:Number deltaTimeMS]) [page:todo]</h3>
- <div>
- deltaTimeMS -- The time of the between the previous frame and this frame in miliseconds.
- </div>
- <div>
- Updates the animation in time. This shouldn't be called by user code. The animationHandler calls this method.
- </div>
- <h3>.interpolateCatmullRom([page:Array points], [page:Number scale]) [page:array]</h3>
- <div>
- points -- The 4 control point to calculate CatMullRom <br />
- scale -- The scale between the previous key and the nex key
- </div>
- <div>
- Interpolates the point based on the key. Is used in update.
- </div>
- <h3>.getNextKeyWith([page:String type], [page:Object h], [page:Number key]) [page:Object]</h3>
- <div>
- type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
- h -- The object of the hierarchy that catins the key <br />
- key -- The index of the next possible key.
- </div>
- <div>
- Gets the next key. Is used in Update.
- </div>
- <h3>.getPrevKeyWith([page:String type], [page:Object h], [page:Number key]) [page:Object]</h3>
- <div>
- type -- The animationtype for the key. Can be "pos", "rot" and "scl".<br />
- h -- The object of the hierarchy that contains the key. <br />
- key -- The index of the prev possible key.
- </div>
- <div>
- Gets the previous key. Is used in Update.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|