Included Camera Tilt to Camera Paths
This commit is contained in:
@@ -22,7 +22,9 @@ public class LinearPoint extends LinearInterpolation<Position> {
|
|||||||
float pitch = (float)getInterpolatedValue(first.getPitch(), second.getPitch(), perc);
|
float pitch = (float)getInterpolatedValue(first.getPitch(), second.getPitch(), perc);
|
||||||
float yaw = (float)getInterpolatedValue(first.getYaw(), second.getYaw(), perc);
|
float yaw = (float)getInterpolatedValue(first.getYaw(), second.getYaw(), perc);
|
||||||
|
|
||||||
Position inter = new Position(x, y, z, pitch, yaw);
|
float rot = (float)getInterpolatedValue(first.getRotation(), second.getRotation(), perc);
|
||||||
|
|
||||||
|
Position inter = new Position(x, y, z, pitch, yaw, rot);
|
||||||
|
|
||||||
return inter;
|
return inter;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,6 +333,8 @@ public class ReplayProcess {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReplayHandler.setCameraTilt(pos.getRotation());
|
||||||
|
|
||||||
Integer curTimestamp = null;
|
Integer curTimestamp = null;
|
||||||
if(timeLinear != null && timeCount > 1) {
|
if(timeLinear != null && timeCount > 1) {
|
||||||
curTimestamp = timeLinear.getPoint(Math.max(0, Math.min(1, timePos)));
|
curTimestamp = timeLinear.getPoint(Math.max(0, Math.min(1, timePos)));
|
||||||
|
|||||||
@@ -33,12 +33,17 @@ public class ResourceHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void freeAllResources() {
|
public static void freeAllResources() {
|
||||||
|
Minecraft.getMinecraft().addScheduledTask(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
for(ResourceLocation loc : openResources) {
|
for(ResourceLocation loc : openResources) {
|
||||||
Minecraft.getMinecraft().getTextureManager().deleteTexture(loc);
|
Minecraft.getMinecraft().getTextureManager().deleteTexture(loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
openResources = new ArrayList<ResourceLocation>();
|
openResources = new ArrayList<ResourceLocation>();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static BufferedImage getDefaultThumbnail() {
|
public static BufferedImage getDefaultThumbnail() {
|
||||||
return defaultThumb;
|
return defaultThumb;
|
||||||
|
|||||||
Reference in New Issue
Block a user