|
@@ -183,11 +183,12 @@ namespace Spine {
|
|
float[] spacesItems = this.spaces.Items, output = this.positions.Resize(spacesCount * 3 + 2).Items, world;
|
|
float[] spacesItems = this.spaces.Items, output = this.positions.Resize(spacesCount * 3 + 2).Items, world;
|
|
bool closed = path.Closed;
|
|
bool closed = path.Closed;
|
|
int verticesLength = path.WorldVerticesLength, curveCount = verticesLength / 6, prevCurve = NONE;
|
|
int verticesLength = path.WorldVerticesLength, curveCount = verticesLength / 6, prevCurve = NONE;
|
|
|
|
+ float pathLength = 0;
|
|
|
|
|
|
if (!path.ConstantSpeed) {
|
|
if (!path.ConstantSpeed) {
|
|
float[] lengths = path.Lengths;
|
|
float[] lengths = path.Lengths;
|
|
curveCount -= closed ? 1 : 2;
|
|
curveCount -= closed ? 1 : 2;
|
|
- float pathLength = lengths[curveCount];
|
|
|
|
|
|
+ pathLength = lengths[curveCount];
|
|
if (percentPosition) position *= pathLength;
|
|
if (percentPosition) position *= pathLength;
|
|
if (percentSpacing) {
|
|
if (percentSpacing) {
|
|
for (int i = 0; i < spacesCount; i++)
|
|
for (int i = 0; i < spacesCount; i++)
|
|
@@ -262,7 +263,7 @@ namespace Spine {
|
|
|
|
|
|
// Curve lengths.
|
|
// Curve lengths.
|
|
float[] curves = this.curves.Resize(curveCount).Items;
|
|
float[] curves = this.curves.Resize(curveCount).Items;
|
|
- float pathLength = 0;
|
|
|
|
|
|
+ pathLength = 0;
|
|
float x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;
|
|
float x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;
|
|
float tmpx, tmpy, dddfx, dddfy, ddfx, ddfy, dfx, dfy;
|
|
float tmpx, tmpy, dddfx, dddfy, ddfx, ddfy, dfx, dfy;
|
|
for (int i = 0, w = 2; i < curveCount; i++, w += 6) {
|
|
for (int i = 0, w = 2; i < curveCount; i++, w += 6) {
|