Animation box will update when initially loading COF

Animation box will update when initially loading COF
Debug drawing animation will display origin
Created issue #71
This commit is contained in:
Collin Smith
2019-12-04 15:29:41 -08:00
parent ebe6d606f2
commit 6fed567f38
2 changed files with 15 additions and 17 deletions

View File

@ -382,12 +382,12 @@ public class Animation extends BaseDrawable implements Pool.Poolable {
shapes.set(ShapeRenderer.ShapeType.Line); shapes.set(ShapeRenderer.ShapeType.Line);
} }
//shapes.setColor(Color.RED); shapes.setColor(Color.RED);
//shapes.line(x, y, x + 50, y); shapes.line(x, y, x + 50, y);
//shapes.setColor(Color.GREEN); shapes.setColor(Color.GREEN);
//shapes.line(x, y, x, y + 50); shapes.line(x, y, x, y + 50);
//shapes.setColor(Color.BLUE); shapes.setColor(Color.BLUE);
//shapes.line(x, y, x + 15, y - 20); shapes.line(x, y, x + 15, y - 20);
shapes.setColor(Color.GREEN); shapes.setColor(Color.GREEN);
shapes.rect(x + box.xMin, y - box.yMax, box.width, box.height); shapes.rect(x + box.xMin, y - box.yMax, box.width, box.height);
if (reset) shapes.end(); if (reset) shapes.end();
@ -648,20 +648,17 @@ public class Animation extends BaseDrawable implements Pool.Poolable {
shapeRenderer.set(ShapeRenderer.ShapeType.Line); shapeRenderer.set(ShapeRenderer.ShapeType.Line);
} }
//shapeRenderer.setColor(Color.RED); shapeRenderer.setColor(Color.RED);
//shapeRenderer.line(x, y, x + 40, y); shapeRenderer.line(x, y, x + 40, y);
//shapeRenderer.setColor(Color.GREEN); shapeRenderer.setColor(Color.GREEN);
//shapeRenderer.line(x, y, x, y + 20); shapeRenderer.line(x, y, x, y + 20);
//shapeRenderer.setColor(Color.BLUE); shapeRenderer.setColor(Color.BLUE);
//shapeRenderer.line(x, y, x + 20, y - 10); shapeRenderer.line(x, y, x + 20, y - 10);
BBox box = dc.getDirection(d).box; BBox box = dc.getBox(d, f);
shapeRenderer.setColor(DEBUG_COLOR); shapeRenderer.setColor(DEBUG_COLOR);
shapeRenderer.rect(x + box.xMin, y - box.yMax, box.width, box.height); shapeRenderer.rect(x + box.xMin, y - box.yMax, box.width, box.height);
if (reset) shapeRenderer.end();
if (reset) {
shapeRenderer.end();
}
} }
} }

View File

@ -1741,6 +1741,7 @@ public class MPQViewer {
anim.setLayer(layer, dc, false); anim.setLayer(layer, dc, false);
} }
anim.updateBox();
setDelegate(anim); setDelegate(anim);
} }