Skip to content

Commit

Permalink
v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
loodakrawa committed Nov 15, 2015
1 parent 8bb8283 commit b27ce51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.0.3
* Fix bug when no keyframe in t = 0
* Fix bug when keyframe has no object_refs

### 1.0.2
* Fix changing pivots when blending animations

Expand Down
Binary file modified SpriterDotNet.Unity/Assets/SpriterDotNet/Lib/SpriterDotNet.dll
Binary file not shown.
3 changes: 3 additions & 0 deletions SpriterDotNet/SpriterProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public static FrameData GetFrameData(SpriterAnimation animation, float targetTim

FrameData frameData = new FrameData();

if (keyA.ObjectRefs == null) return frameData;

foreach (SpriterObjectRef objectRef in keyA.ObjectRefs)
{
SpriterObject interpolated = GetObjectInfo(objectRef, animation, adjustedTime);
Expand Down Expand Up @@ -297,6 +299,7 @@ private static float AdjustTime(SpriterKey keyA, SpriterKey keyB, float animatio
private static void GetMainlineKeys(SpriterMainlineKey[] keys, float targetTime, out SpriterMainlineKey keyA, out SpriterMainlineKey keyB)
{
keyA = LastKeyForTime(keys, targetTime);
keyA = keyA ?? keys[keys.Length - 1];
int nextKey = keyA.Id + 1;
if (nextKey >= keys.Length) nextKey = 0;
keyB = keys[nextKey];
Expand Down

0 comments on commit b27ce51

Please sign in to comment.