Fixed texture wrapping, meshes as bones, wrap/cycle mixup.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4063 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2006-04-26 21:06:03 +00:00
parent 6436dc704c
commit e6ac65fd11
5 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -582,10 +582,10 @@ public class Model extends ModelNode
if (_anim.repeatType == Controller.RT_CLAMP) {
_nidx = Math.min(_nidx + 1, nframes - 1);
} else if (_anim.repeatType == Controller.RT_CYCLE) {
} else if (_anim.repeatType == Controller.RT_WRAP) {
_nidx = (_nidx + 1) % nframes;
} else { // _anim.repeatType == Controller.RT_WRAP
} else { // _anim.repeatType == Controller.RT_CYCLE
if ((_nidx + _fdir) < 0 || (_nidx + _fdir) >= nframes) {
_fdir *= -1; // reverse direction
}
@@ -89,7 +89,8 @@ public class ModelMesh extends TriMesh
{
_boundingType = "sphere".equals(props.getProperty("bound")) ?
SPHERE_BOUND : BOX_BOUND;
_texture = props.getProperty("texture", texture);
_texture = (texture == null) ? null :
props.getProperty(texture, texture);
_solid = solid;
_transparent = transparent;
}