Revised exporter coordinate systems, updated emitter positioning.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4060 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2006-04-26 02:59:55 +00:00
parent 0e27af2af4
commit 01caf5cca6
6 changed files with 19 additions and 9 deletions
@@ -55,7 +55,7 @@ public abstract class EmissionController extends ModelController
BufferUtils.populateFromBuffer(result,
((Geometry)_target).getNormalBuffer(), 0);
} else {
result.set(0f, -1f, 0f);
result.set(0f, 0f, -1f);
}
_target.getWorldRotation().multLocal(result);
}
+3 -1
View File
@@ -520,6 +520,8 @@ public class Model extends ModelNode
@Override // documentation inherited
public void updateWorldData (float time)
{
// slow evvvverything down by the animation speed
time *= _animSpeed;
if (_anim != null) {
updateAnimation(time);
}
@@ -567,7 +569,7 @@ public class Model extends ModelNode
return;
}
_elapsed += (time * _anim.frameRate * _animSpeed);
_elapsed += (time * _anim.frameRate);
}
/**
@@ -49,7 +49,12 @@ public abstract class ModelController extends Controller
*/
public void configure (Properties props, Spatial target)
{
_target = target;
if (target instanceof ModelNode) {
_target = ((ModelNode)target).getChild("mesh");
}
if (_target == null) {
_target = target;
}
String[] anims = StringUtil.parseStringArray(
props.getProperty("animations", ""));
if (anims.length == 0) {
@@ -197,6 +197,9 @@ public class ModelViewer extends JmeCanvasApp
_animctrls.add(new Spacer(50, 1));
_animctrls.add(new JLabel(_msg.get("m.anim_speed")));
_animctrls.add(_animspeed = new JSlider(-100, +100, 0));
_animspeed.setMajorTickSpacing(10);
_animspeed.setSnapToTicks(true);
_animspeed.setPaintTicks(true);
_animspeed.addChangeListener(new ChangeListener() {
public void stateChanged (ChangeEvent e) {
updateAnimationSpeed();
@@ -484,7 +487,7 @@ public class ModelViewer extends JmeCanvasApp
protected void updateAnimationSpeed ()
{
_model.setAnimationSpeed(
FastMath.pow(2f, _animspeed.getValue() / 50f));
FastMath.pow(2f, _animspeed.getValue() / 25f));
}
/** The resource manager. */