Просмотр исходного кода

Fixed punctuation and broken links.

mitm 7 лет назад
Родитель
Сommit
0e1c951b8a
1 измененных файлов с 48 добавлено и 45 удалено
  1. 48 45
      src/docs/asciidoc/jme3/advanced/animation.adoc

+ 48 - 45
src/docs/asciidoc/jme3/advanced/animation.adoc

@@ -1,30 +1,30 @@
 = Animation in jME3
-:author: 
-:revnumber: 
+:author:
+:revnumber:
 :revdate: 2016/03/17 20:48
 :relfileprefix: ../../
 :imagesdir: ../..
 ifdef::env-github,env-browser[:outfilesuffix: .adoc]
 
 
-In 3D games, you do not only load static 3D models, you also want to be able to trigger animations in the model from the Java code. 
+In 3D games, you do not only load static 3D models, you also want to be able to trigger animations in the model from the Java code.
 
 
 == Requirements
 
-JME3 only loads and plays animated models, it does not create them. 
+JME3 only loads and plays animated models, it does not create them.
 
 What is required for an animated model? (<<jme3/terminology#Animation,See also: Animation terminology>>)
 
-.  For each model, you have to segment the model into a skeleton (*bone rigging*). 
-.  For each motion, you have to specify how the animation distorts parts of the model (*skinning*).  
+.  For each model, you have to segment the model into a skeleton (*bone rigging*).
+.  For each motion, you have to specify how the animation distorts parts of the model (*skinning*).
 .  For each animation, you have to specify a series of snapshots of how the bones are positioned (*keyframes*).
 .  One model can contain several animations. You give every animation a name when you save it in the mesh editor.
 
 Unless you download free models, or buy them from a 3D artist, you must create your animated models in an *external mesh editor* (for example, Blender) yourself.
 
 *  <<sdk/blender#,Converting Blender Models to JME3 (.J3o files)>>
-*  link:http://www.youtube.com/user/aramakara[Video Series: Creating models in Blender, OgreMax, 3dsMax]
+//*  link:http://www.youtube.com/user/aramakara[Video Series: Creating models in Blender, OgreMax, 3dsMax]
 *  link:http://www.youtube.com/watch?v=NdjC9sCRV0s[Video: Creating and Exporting OgreXML Animations from Blender 2.61 to JME3 ]
 *  link:https://docs.google.com/fileview?id=0B9hhZie2D-fENDBlZDU5MzgtNzlkYi00YmQzLTliNTQtNzZhYTJhYjEzNWNk&hl=en[Scene Workflow: Exporting OgreXML scenes from Blender to JME3]
 *  link:https://docs.google.com/leaf?id=0B9hhZie2D-fEYmRkMTYwN2YtMzQ0My00NTM4LThhOTYtZTk1MTRlYTNjYTc3&hl=en[Animation Workflow: Create Animated UV-Mapped OgreXML Models in Blender, and use them in JME3]
@@ -32,18 +32,18 @@ Unless you download free models, or buy them from a 3D artist, you must create y
 
 What is required in your JME3-based Java class?
 
-*  One Animation Control per animated model
+*  One Animation Control per animated model.
 *  As many Animation Channels per Control as you need to play your animations. In simple cases one channel is enough, sometimes you need two or more Channels per model to play gestures and motions in parallel.
 
 
 == Code Samples
 
-*  link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestSpatialAnim.java[TestSpatialAnim.java]
-*  link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestBlenderAnim.java[TestBlenderAnim.java]
-*  link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestBlenderObjectAnim.java[TestBlenderObjectAnim.java]
-*  link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestOgreAnim.java[TestOgreAnim.java]
-*  link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestOgreComplexAnim.java[TestOgreComplexAnim.java]
-*  link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/model/anim/TestCustomAnim.java[TestCustomAnim.java]
+*  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/anim/TestSpatialAnim.java[TestSpatialAnim.java]
+*  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/anim/TestBlenderAnim.java[TestBlenderAnim.java]
+*  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/anim/TestBlenderObjectAnim.java[TestBlenderObjectAnim.java]
+*  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/anim/TestOgreAnim.java[TestOgreAnim.java]
+*  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/anim/TestOgreComplexAnim.java[TestOgreComplexAnim.java]
+*  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/model/anim/TestCustomAnim.java[TestCustomAnim.java]
 
 
 == Controlling Animations
@@ -51,7 +51,7 @@ What is required in your JME3-based Java class?
 
 === The Animation Control
 
-Create one `com.jme3.animation.AnimControl` object in your JME3 application for each animated model that you want to control. You have to register each animated model to one of these Animation Controls. The control object gives you access to the available animation sequences in the model.  
+Create one `com.jme3.animation.AnimControl` object in your JME3 application for each animated model that you want to control. You have to register each animated model to one of these Animation Controls. The control object gives you access to the available animation sequences in the model.
 
 [source,java]
 ----
@@ -66,9 +66,9 @@ Create one `com.jme3.animation.AnimControl` object in your JME3 application for
 
 === Animation Channels
 
-An Animation Control has several Animation Channels (`com.jme3.animation.AnimChannel`). Each channel can play one animation sequence at a time. 
+An Animation Control has several Animation Channels (`com.jme3.animation.AnimChannel`). Each channel can play one animation sequence at a time.
 
-There often are situations where you want to run several animation sequences at the same time, e.g. “shooting while walking or “boxing while jumping. In this case, you create several channels, assign an animation to each, and play them in parallel. 
+There often are situations where you want to run several animation sequences at the same time, e.g. "`shooting`" while walking or "`boxing`" while jumping. In this case, you create several channels, assign an animation to each, and play them in parallel.
 
 [source,java]
 ----
@@ -79,7 +79,7 @@ There often are situations where you want to run several animation sequences at
 
 ----
 
-To reset a Control, call `control.clearChannels();`
+To reset a Control, call `control.clearChannels()`.
 
 
 == Animation Control Properties
@@ -105,7 +105,7 @@ a|Clear all channels in this control.
 
 a|addListener(animEventListener) +
 removeListener(animEventListener) +
-clearListeners() 
+clearListeners()
 a|Adds or removes listeners to receive animation related events.
 
 |===
@@ -126,10 +126,10 @@ a|Adds or removes an animation from this Control.
 a|getAnimationNames()
 a|A String Collection of names of all animations that this Control can play for this model.
 
-a|getAnim(“anim)
+a|getAnim("`anim`")
 a|Retrieve an animation from the list of animations.
 
-a|getAnimationLength(“anim)
+a|getAnimationLength("`anim`")
 a|Returns the length of the given named animation in seconds
 
 |===
@@ -146,7 +146,7 @@ a|The Skeleton object controlled by this Control.
 a|getTargets()
 a|The Skin objects controlled by this Control, as Mesh array.
 
-a|getAttachmentsNode(“bone)
+a|getAttachmentsNode("`bone`")
 a|Returns the attachment node of a bone. Attach models and effects to this node to make them follow this bone's motions.
 
 |===
@@ -161,20 +161,20 @@ The following properties are set per AnimChannel.
 a|AnimChannel Property
 a|Usage
 
-a|setLoopMode(LoopMode.Loop); 
-a| From now on, the animation on this channel will repeat from the beginning when it ends. 
+a|setLoopMode(LoopMode.Loop);
+a| From now on, the animation on this channel will repeat from the beginning when it ends.
 
-a|setLoopMode(LoopMode.DontLoop); 
-a| From now on, the animation on this channel will play once, and the freeze at the last keyframe. 
+a|setLoopMode(LoopMode.DontLoop);
+a| From now on, the animation on this channel will play once, and the freeze at the last keyframe.
 
-a|setLoopMode(LoopMode.Cycle); 
-a| From now on, the animation on this channel will play forward, then backward, then again forward, and so on. 
+a|setLoopMode(LoopMode.Cycle);
+a| From now on, the animation on this channel will play forward, then backward, then again forward, and so on.
 
-a|setSpeed(1f); 
-a| From now on, play this animation slower (&lt;1f) or faster (&gt;1f), or with default speed (1f). 
+a|setSpeed(1f);
+a| From now on, play this animation slower (&lt;1f) or faster (&gt;1f), or with default speed (1f).
 
-a|setTime(1.3f); 
-a| Fast-forward or rewind to a certain moment in time of this animation. 
+a|setTime(1.3f);
+a| Fast-forward or rewind to a certain moment in time of this animation.
 
 |===
 
@@ -212,16 +212,16 @@ a|Usage
 a|addAllBones()
 a|Add all the bones of the model's skeleton to be influenced by this animation channel. (default)
 
-a|addBone(“bone1) +
+a|addBone("`bone1`") +
 addBone(bone1)
 a|Add a single bone to be influenced by this animation channel.
 
-a|addToRootBone(“bone1) +
-addToRootBone(bone1) 
+a|addToRootBone("`bone1`") +
+addToRootBone(bone1)
 a|Add a series of bones to be influenced by this animation channel: Add all bones, starting from the given bone, to the root bone.
 
-a|addFromRootBone(“bone1) +
-addFromRootBone(bone1) 
+a|addFromRootBone("`bone1`") +
+addFromRootBone(bone1)
 a|Add a series of bones to be influenced by this animation channel: Add all bones, starting from the given root bone, going towards the children bones.
 
 |===
@@ -229,15 +229,18 @@ a|Add a series of bones to be influenced by this animation channel: Add all bone
 
 == Playing Animations
 
-Animations are played by channel. *Note:* Whether the animation channel plays continuously or only once, depends on the Loop properties you have set.
+Animations are played by channel.
+
+NOTE: Whether the animation channel plays continuously or only once, depends on the Loop properties you have set.
+
 [cols="2", options="header"]
 |===
 
 a|Channel Method
 a|Usage
 
-a|channel_walk.setAnim(“Walk,0.50f); 
-a| Start the animation named “Walk on channel channel_walk. +
+a|channel_walk.setAnim("`Walk`",0.50f);
+a| Start the animation named "`Walk`" on channel channel_walk. +
 The float value specifies the time how long the animation should overlap with the previous one on this channel. If set to 0f, then no blending will occur and the new animation will be applied instantly.
 
 |===
@@ -250,7 +253,7 @@ Use the AnimEventLister below to react at the end or start of an animation cycle
 
 === Usage Example
 
-In this short example, we define the space key to trigger playing the “Walk animation on channel2.
+In this short example, we define the space key to trigger playing the "`Walk`" animation on channel2.
 
 [source,java]
 ----
@@ -286,12 +289,12 @@ public class HelloAnimation extends SimpleApplication
                      implements AnimEventListener { ... }
 ----
 
-This optional Listener enables you to respond to animation start and end events, onAnimChange() and onAnimCycleDone().
+This optional Listener enables you to respond to animation start and end events, `onAnimChange()` and `onAnimCycleDone()`.
 
 
 === Responding to Animation End
 
-The onAnimCycleDone() event is invoked when an animation cycle has ended. For non-looping animations, this event is invoked when the animation is finished playing. For looping animations, this event is invoked each time the animation loop is restarted.
+The `onAnimCycleDone()` event is invoked when an animation cycle has ended. For non-looping animations, this event is invoked when the animation is finished playing. For looping animations, this event is invoked each time the animation loop is restarted.
 
 You have access to the following objects:
 
@@ -315,9 +318,9 @@ You have access to the following objects:
 
 === Responding to Animation Start
 
-The onAnimChange() event is invoked every time before an animation is set by the user to be played on a given channel (`channel.setAnim()`).
+The `onAnimChange()` event is invoked every time before an animation is set by the user to be played on a given channel (`channel.setAnim()`).
 
-You have access to the following objects
+You have access to the following objects:
 
 *  The Control to which the listener is assigned.
 *  The animation channel being played.