|
@@ -11,148 +11,165 @@
|
|
|
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">todo</div>
|
|
|
+ <div class="desc">A mesh that can blend together multiple animated morph targets.</div>
|
|
|
+
|
|
|
+ <h2>Example</h2>
|
|
|
+ <div>
|
|
|
+ [example:webgl_morphtargets_md2_control morphtargets / md2 / controll]
|
|
|
|
|
|
|
|
|
<h2>Constructor</h2>
|
|
|
|
|
|
|
|
|
- <h3>[name]([page:todo geometry], [page:todo material])</h3>
|
|
|
- <div>
|
|
|
- geometry -- todo <br />
|
|
|
- material -- todo
|
|
|
- </div>
|
|
|
+ <h3>[name]([page:Geometry geometry], [page:Material material])</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ geometry — An instance of [page:Geometry].<br />
|
|
|
+ material — An instance of [page:Material] (optional).
|
|
|
</div>
|
|
|
-
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
|
|
|
|
|
|
<h3>[property:object animationsMap]</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ An object of named animations as added by [page:MorphBlendMesh.createAnimation].
|
|
|
</div>
|
|
|
|
|
|
<h3>[property:array animationsList]</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ The list of animations as added by [page:MorphBlendMesh.createAnimation].
|
|
|
</div>
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
|
|
|
|
|
|
- <h3>[method:todo setAnimationWeight]([page:todo name], [page:todo weight])</h3>
|
|
|
+ <h3>[method:null setAnimationWeight]([page:String name], [page:Float weight])</h3>
|
|
|
<div>
|
|
|
- name -- todo <br />
|
|
|
- weight -- todo
|
|
|
+ name -- The name of the animation<br />
|
|
|
+ weight -- Weight of the animation, typically 0-1
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Set the weight of how much this animation will apply to the overall morph. 0 is off, 1 is full weight.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo setAnimationFPS]([page:todo name], [page:todo fps])</h3>
|
|
|
+ <h3>[method:null setAnimationFPS]([page:String name], [page:Float fps])</h3>
|
|
|
<div>
|
|
|
- name -- todo <br />
|
|
|
- fps -- todo
|
|
|
+ name -- The name of the animation <br />
|
|
|
+ fps -- The number of frames (morphTargets) per second
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ A frame is typically 1 morph target.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo createAnimation]([page:todo name], [page:todo start], [page:todo end], [page:todo fps])</h3>
|
|
|
+ <h3>[method:null createAnimation]([page:String name], [page:Integer start], [page:Integer end], [page:Float fps])</h3>
|
|
|
<div>
|
|
|
- name -- todo <br />
|
|
|
- start -- todo <br />
|
|
|
- end -- todo <br />
|
|
|
- fps -- todo
|
|
|
+ name -- The name of the animation <br />
|
|
|
+ start -- The starting frame (morph)<br />
|
|
|
+ end -- The ending frame (morph)<br />
|
|
|
+ fps -- How many frames (morphs) to play per second
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Creates an animation object that gets added to both the [page:MorphBlendMesh.animationsMap animationsMap] and
|
|
|
+ [page:MorphBlendMesh.animationsList animationsList].<br/><br/>
|
|
|
+
|
|
|
+ Animation object:<br/><br/>
|
|
|
+ startFrame -- Starting frame<br/>
|
|
|
+ endFrame -- Ending frame<br/>
|
|
|
+ length -- The number of frames<br/>
|
|
|
+ fps -- The frames per second<br/>
|
|
|
+ duration -- The length of the animation in seconds<br/>
|
|
|
+ lastFrame -- The previous frame that was played<br/>
|
|
|
+ currentFrame -- The current frame<br/>
|
|
|
+ active -- Whether or not the animation is being played<br/>
|
|
|
+ time -- The time in seconds of the animation<br/>
|
|
|
+ direction -- Which way to play the animation<br/>
|
|
|
+ weight -- The weight of the animation<br/>
|
|
|
+ directionBackwards -- Is playing backwards<br/>
|
|
|
+ mirroredLoop -- Loop back and forth
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo playAnimation]([page:todo name])</h3>
|
|
|
+ <h3>[method:null playAnimation]([page:String name])</h3>
|
|
|
<div>
|
|
|
- name -- todo
|
|
|
+ name -- The name of the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Sets the animation to active and animation time to 0
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo update]([page:todo delta])</h3>
|
|
|
+ <h3>[method:null update]([page:Float delta])</h3>
|
|
|
<div>
|
|
|
- delta -- todo
|
|
|
+ delta -- Time in seconds
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Updates and plays the animation
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo autoCreateAnimations]([page:todo fps])</h3>
|
|
|
+ <h3>[method:null autoCreateAnimations]([page:Float fps])</h3>
|
|
|
<div>
|
|
|
- fps -- todo
|
|
|
+ fps -- Frames per second
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Goes through the geometry's morphTargets and generates animations based on the morphTargets' names. Names
|
|
|
+ are of the form "walk_01", "walk_02", "walk_03", etc or "run001", "run002", "run003".
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo setAnimationDuration]([page:todo name], [page:todo duration])</h3>
|
|
|
+ <h3>[method:null setAnimationDuration]([page:String name], [page:Float duration])</h3>
|
|
|
<div>
|
|
|
- name -- todo <br />
|
|
|
- duration -- todo
|
|
|
+ name -- The name of the animation <br />
|
|
|
+ duration -- How long in seconds to play the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Updates the animation object with proper values to update the duration.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo setAnimationDirectionForward]([page:todo name])</h3>
|
|
|
+ <h3>[method:null setAnimationDirectionForward]([page:String name])</h3>
|
|
|
<div>
|
|
|
- name -- todo
|
|
|
+ name -- The name of the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Sets the animation to play forwards
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo getAnimationDuration]([page:todo name])</h3>
|
|
|
+ <h3>[method:null setAnimationDirectionBackward]([page:String name])</h3>
|
|
|
<div>
|
|
|
- name -- todo
|
|
|
+ name -- The name of the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Sets the animation to play backwards
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo getAnimationTime]([page:todo name])</h3>
|
|
|
+ <h3>[method:Float getAnimationDuration]([page:String name])</h3>
|
|
|
<div>
|
|
|
- name -- todo
|
|
|
+ name -- The name of the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns the duration in seconds of the animation. Returns -1 if it can't be found.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo setAnimationDirectionBackward]([page:todo name])</h3>
|
|
|
+ <h3>[method:Float getAnimationTime]([page:String name])</h3>
|
|
|
<div>
|
|
|
- name -- todo
|
|
|
+ name -- The name of the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Returns the current time position of the animation.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo setAnimationTime]([page:todo name], [page:todo time])</h3>
|
|
|
+ <h3>[method:null setAnimationTime]([page:String name], [page:Float time])</h3>
|
|
|
<div>
|
|
|
- name -- todo <br />
|
|
|
- time -- todo
|
|
|
+ name -- The name of the animation <br />
|
|
|
+ time -- The time in seconds
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Sets the current time position of the animation
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:todo stopAnimation]([page:todo name])</h3>
|
|
|
+ <h3>[method:null stopAnimation]([page:String name])</h3>
|
|
|
<div>
|
|
|
- name -- todo
|
|
|
+ name -- The name of the animation
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Stops the playback of the animation
|
|
|
</div>
|
|
|
|
|
|
<h2>Source</h2>
|