Don't clear FFD if before first FFD key in animation.

Didn't make any sense. Any existing FFD should remain until time passes a key.
This commit is contained in:
NathanSweet 2014-11-16 00:13:37 +01:00
parent 31848ad22a
commit ee1f13ab9c
4 changed files with 4 additions and 16 deletions

View File

@ -57,10 +57,7 @@ public class FfdTimeline extends CurveTimeline {
if (slot.attachment != attachment) return;
var frames:Vector.<Number> = this.frames;
if (time < frames[0]) {
slot.attachmentVertices.length = 0;
return; // Time is before first frame.
}
if (time < frames[0]) return; // Time is before first frame.
var frameVertices:Vector.<Vector.<Number>> = this.frameVertices;
var vertexCount:int = frameVertices[0].length;

View File

@ -659,10 +659,7 @@ void _spFFDTimeline_apply (const spTimeline* timeline, spSkeleton* skeleton, flo
spSlot *slot = skeleton->slots[self->slotIndex];
if (slot->attachment != self->attachment) return;
if (time < self->frames[0]) {
slot->attachmentVerticesCount = 0;
return; /* Time is before first frame. */
}
if (time < self->frames[0]) return; /* Time is before first frame. */
if (slot->attachmentVerticesCount < self->frameVerticesCount) {
if (slot->attachmentVerticesCapacity < self->frameVerticesCount) {

View File

@ -571,10 +571,7 @@ namespace Spine {
if (slot.attachment != attachment) return;
float[] frames = this.frames;
if (time < frames[0]) {
slot.attachmentVerticesCount = 0;
return; // Time is before first frame.
}
if (time < frames[0]) return; // Time is before first frame.
float[][] frameVertices = this.frameVertices;
int vertexCount = frameVertices[0].Length;

View File

@ -774,10 +774,7 @@ spine.FfdTimeline.prototype = {
if (slot.attachment != attachment) return;
var frames = this.frames;
if (time < frames[0]) {
slot.attachmentVertices.length = 0;
return; // Time is before first frame.
}
if (time < frames[0]) return; // Time is before first frame.
var frameVertices = this.frameVertices;
var vertexCount = frameVertices[0].length;