Created InterpolationUtils class with a method to fix the Euler Rotation Break problem Create AdvancedPositionSplineInterpolation and AdvancedPositionLinearInterpolation which always use the shortest possible paths between the Euler Rotation values of the Camera's Yaw and Roll Remove Position Keyframe filtering when adding the Keyframe. This is now done by the AdvancedPositionInterpolation classes
33 lines
733 B
Java
33 lines
733 B
Java
package eu.crushedpixel.replaymod.holders;
|
|
|
|
import eu.crushedpixel.replaymod.interpolation.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
@AllArgsConstructor
|
|
@NoArgsConstructor
|
|
public class TimestampValue implements KeyframeValue {
|
|
|
|
@Interpolate
|
|
public double value;
|
|
|
|
public int asInt() {
|
|
return (int)value;
|
|
}
|
|
|
|
@Override
|
|
public TimestampValue newInstance() {
|
|
return new TimestampValue();
|
|
}
|
|
|
|
@Override
|
|
public Interpolation getLinearInterpolator() {
|
|
return new GenericLinearInterpolation<TimestampValue>();
|
|
}
|
|
|
|
@Override
|
|
public Interpolation getCubicInterpolator() {
|
|
return new GenericSplineInterpolation<TimestampValue>();
|
|
}
|
|
}
|