Animated-Java / animated-java

A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.
Other
156 stars 25 forks source link

[FR] Update Keyframe Interpolation Field to Object Format in JSON #240

Closed Dearliet closed 1 month ago

Dearliet commented 1 month ago

This way interpolation is encapsulated within its own object. This makes it clear that all the parameters under interpolation are related to the interpolation settings, improving readability and maintainability. This also simplifies parsing for plugin developers.

"interpolation": {
    "type": "bezier",
    "bezier_linked": true,
    "bezier_left_time": [-0.08, -0.02333, -0.10667],
    "bezier_left_value": [34.79459, 48.56599, 15.0942],
    "bezier_right_time": [0.08, 0.02333, 0.10667],
    "bezier_right_value": [-34.79459, -48.56599, -15.0942]
}

"interpolation": {
    "type": "linear",
    "easing": "easeInOutQuart",
    "easingArgs": []
}

"interpolation": {
    "type": "catmullrom"
}

"interpolation": {
    "type": "step"
}