Fixed a bug with the texture controllers and moved some shared code into

a utility class.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@132 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Andrzej Kapolka
2007-01-31 22:05:46 +00:00
parent d49e50db89
commit fb8f4ce0a8
6 changed files with 197 additions and 105 deletions
@@ -33,6 +33,7 @@ import com.jme.scene.Spatial;
import com.threerings.jme.Log;
import com.threerings.jme.model.Model;
import com.threerings.jme.util.JmeUtil;
/**
* A basic representation for keyframe animations.
@@ -144,14 +145,7 @@ public class AnimationDef
// create and configure the animation
Model.Animation anim = new Model.Animation();
anim.frameRate = frameRate;
String rtype = props.getProperty("repeat_type", "clamp");
if (rtype.equals("cycle")) {
anim.repeatType = Controller.RT_CYCLE;
} else if (rtype.equals("wrap")) {
anim.repeatType = Controller.RT_WRAP;
} else {
anim.repeatType = Controller.RT_CLAMP;
}
anim.repeatType = JmeUtil.parseRepeatType(props.getProperty("repeat_type"));
// collect all transforms
anim.transformTargets = targets.toArray(new Spatial[targets.size()]);