protected virtual SpriterObject GetObjectInfo(SpriterRef spriterRef, SpriterAnimation animation, float targetTime)
        {
            SpriterTimelineKey[] keys = animation.Timelines[spriterRef.TimelineId].Keys;
            SpriterTimelineKey   keyA = keys[spriterRef.KeyId];
            SpriterTimelineKey   keyB = keys.GetNextKey(keyA, animation.Looping);

            if (keyB == null)
            {
                return(Copy(keyA.ObjectInfo));
            }

            float factor = SpriterHelper.GetFactor(keyA, keyB, animation.Length, targetTime);

            return(Interpolate(keyA.ObjectInfo, keyB.ObjectInfo, factor, keyA.Spin));
        }
        private static SpriterSpatial GetBoneInfo(SpriterRef spriterRef, SpriterAnimation animation, float targetTime)
        {
            SpriterTimelineKey[] keys = animation.Timelines[spriterRef.TimelineId].Keys;
            SpriterTimelineKey   keyA = keys[spriterRef.KeyId];
            SpriterTimelineKey   keyB = GetNextXLineKey(keys, keyA, animation.Looping);

            if (keyB == null)
            {
                return(Copy(keyA.BoneInfo));
            }

            float factor = GetFactor(keyA, keyB, animation.Length, targetTime);

            return(Interpolate(keyA.BoneInfo, keyB.BoneInfo, factor, keyA.Spin));
        }