mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Improve export for non-linear keyframes
This commit is contained in:
parent
431e3462a9
commit
97df68f2d5
@ -1421,7 +1421,7 @@ const Animator = {
|
||||
if (source.pre) {
|
||||
points.push(getKeyframeDataPoints(source.pre)[0])
|
||||
}
|
||||
if (source.post) {
|
||||
if (source.post && !(source.pre instanceof Array && source.post instanceof Array && source.post.equals(source.pre))) {
|
||||
points.push(getKeyframeDataPoints(source.post)[0])
|
||||
}
|
||||
return points;
|
||||
|
@ -220,15 +220,8 @@ class Keyframe {
|
||||
}
|
||||
compileBedrockKeyframe() {
|
||||
if (this.transform) {
|
||||
if (this.data_points.length == 1) {
|
||||
if (this.interpolation == 'linear') {
|
||||
return this.getArray();
|
||||
} else {
|
||||
return {
|
||||
post: this.getArray(),
|
||||
lerp_mode: this.interpolation,
|
||||
}
|
||||
}
|
||||
if (this.data_points.length == 1 && this.interpolation == 'linear') {
|
||||
return this.getArray();
|
||||
} else {
|
||||
return {
|
||||
pre: this.getArray(0),
|
||||
|
Loading…
Reference in New Issue
Block a user