private SpriterBone[] interpolateBones(SpriterKeyFrame key1, SpriterKeyFrame key2, long currentAnimationTime){
		
		SpriterBone[] tempBones = new SpriterBone[key1.getBones().length];
		for (int b = 0; b < key1.getBones().length; b++) {

			SpriterBone bone1 = key1.getBones()[b];
			SpriterBone bone2 = key2.getBones()[b];
	
			float bone2Angle = bone2.getAngle();
	
			if (bone1.getSpin() == 1) {
				if ((bone2.getAngle() - bone1.getAngle()) < 0) {
					bone2Angle += 360;
				}
			} else if (bone1.getSpin() == -1) {
				if ((bone2.getAngle() - bone1.getAngle()) >= 0) {
					bone2Angle -= 360;
				}
			}
	
			Float x = SpriterCalculator.calculateInterpolation(bone1.getX(), bone2.getX(), key1.getStartTime(), key2.getStartTime(),
					currentAnimationTime);
			Float y = SpriterCalculator.calculateInterpolation(bone1.getY(), bone2.getY(), key1.getStartTime(), key2.getStartTime(),
					currentAnimationTime);
			Float scaleX = SpriterCalculator.calculateInterpolation(bone1.getScaleX(), bone2.getScaleX(), key1.getStartTime(),
					key2.getStartTime(), currentAnimationTime);
			Float scaleY = SpriterCalculator.calculateInterpolation(bone1.getScaleY(), bone2.getScaleY(), key1.getStartTime(),
					key2.getStartTime(), currentAnimationTime);
			float rotation = SpriterCalculator.calculateAngleInterpolation(bone1.getAngle(), bone2Angle, key1.getStartTime(), key2.getStartTime(),
					currentAnimationTime);
	
			SpriterBone bone = new SpriterBone();
			bone.setAngle(rotation);
			bone.setId(bone1.getId());
			bone.setParent(bone1.getParent());
			bone.setScaleX(scaleX);
			bone.setScaleY(scaleY);
			bone.setX(x);
			bone.setY(y);
	
			tempBones[bone1.getId()] = bone;

		}

		for (SpriterBone bone : tempBones) {
			if (bone.getParent() != null) {
				bone.setAngle(bone.getAngle() + tempBones[bone.getParent()].getAngle());
				bone.setScaleX(bone.getScaleX() * tempBones[bone.getParent()].getScaleX());
				bone.setScaleY(bone.getScaleY() * tempBones[bone.getParent()].getScaleY());
				float[] newstuff = SpriterCalculator.rotatePoint(tempBones[bone.getParent()], bone.getX(), bone.getY());
				bone.setX(newstuff[0]);
				bone.setY(newstuff[1]);
			}
		}
		return tempBones;
	}