mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
shit idiot brain fungus the sequel
This commit is contained in:
parent
1238933bca
commit
1afe84a871
@ -115,45 +115,27 @@ public class AnimationLoader {
|
|||||||
if(json.has("location")) {
|
if(json.has("location")) {
|
||||||
JsonObject location = json.getAsJsonObject("location");
|
JsonObject location = json.getAsJsonObject("location");
|
||||||
|
|
||||||
if(location.has("x")) {
|
if(location.has("x")) addToSequence(sequence, Dimension.TX, location.getAsJsonArray("x"));
|
||||||
addToSequence(sequence, Dimension.TX, location.getAsJsonArray("x"));
|
if(location.has("y")) addToSequence(sequence, Dimension.TY, location.getAsJsonArray("y"));
|
||||||
}
|
if(location.has("z")) addToSequence(sequence, Dimension.TZ, location.getAsJsonArray("z"));
|
||||||
if(location.has("y")) {
|
|
||||||
addToSequence(sequence, Dimension.TY, location.getAsJsonArray("y"));
|
|
||||||
}
|
|
||||||
if(location.has("z")) {
|
|
||||||
addToSequence(sequence, Dimension.TZ, location.getAsJsonArray("z"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rotation fcurves, only euler at the moment
|
// Rotation fcurves, only euler at the moment
|
||||||
if(json.has("rotation_euler")) {
|
if(json.has("rotation_euler")) {
|
||||||
JsonObject rotation = json.getAsJsonObject("rotation_euler");
|
JsonObject rotation = json.getAsJsonObject("rotation_euler");
|
||||||
|
|
||||||
if(rotation.has("x")) {
|
if(rotation.has("x")) addToSequence(sequence, Dimension.RX, rotation.getAsJsonArray("x"));
|
||||||
addToSequence(sequence, Dimension.RX, rotation.getAsJsonArray("x"));
|
if(rotation.has("y")) addToSequence(sequence, Dimension.RY, rotation.getAsJsonArray("y"));
|
||||||
}
|
if(rotation.has("z")) addToSequence(sequence, Dimension.RZ, rotation.getAsJsonArray("z"));
|
||||||
if(rotation.has("y")) {
|
|
||||||
addToSequence(sequence, Dimension.RY, rotation.getAsJsonArray("y"));
|
|
||||||
}
|
|
||||||
if(rotation.has("z")) {
|
|
||||||
addToSequence(sequence, Dimension.RZ, rotation.getAsJsonArray("z"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale fcurves
|
// Scale fcurves
|
||||||
if(json.has("scale")) {
|
if(json.has("scale")) {
|
||||||
JsonObject scale = json.getAsJsonObject("scale");
|
JsonObject scale = json.getAsJsonObject("scale");
|
||||||
|
|
||||||
if(scale.has("x")) {
|
if(scale.has("x")) addToSequence(sequence, Dimension.SX, scale.getAsJsonArray("x"));
|
||||||
addToSequence(sequence, Dimension.SX, scale.getAsJsonArray("x"));
|
if(scale.has("y")) addToSequence(sequence, Dimension.SY, scale.getAsJsonArray("y"));
|
||||||
}
|
if(scale.has("z")) addToSequence(sequence, Dimension.SZ, scale.getAsJsonArray("z"));
|
||||||
if(scale.has("y")) {
|
|
||||||
addToSequence(sequence, Dimension.SY, scale.getAsJsonArray("y"));
|
|
||||||
}
|
|
||||||
if(scale.has("z")) {
|
|
||||||
addToSequence(sequence, Dimension.SZ, scale.getAsJsonArray("z"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sequence.offset = offset;
|
sequence.offset = offset;
|
||||||
|
|||||||
@ -236,7 +236,7 @@ public class BusAnimationKeyframe {
|
|||||||
|
|
||||||
// Blender bezier solvers, but rewritten (pain)
|
// Blender bezier solvers, but rewritten (pain)
|
||||||
private double solveCubic(double c0, double c1, double c2, double c3) {
|
private double solveCubic(double c0, double c1, double c2, double c3) {
|
||||||
if(c3 > 0.000001) {
|
if(c3 > 0.000001 || c3 < -0.000001) {
|
||||||
double a = c2 / c3;
|
double a = c2 / c3;
|
||||||
double b = c1 / c3;
|
double b = c1 / c3;
|
||||||
double c = c0 / c3;
|
double c = c0 / c3;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user