The EvaAnimConfig expects a JSON structure containing descript, effect, and datas objects. This schema defines how the animation engine interprets video frames and dynamic elements.
Root Object Structure
descript: Video metadata (dimensions, version, frame positions).effect: An array of dynamic element mask descriptions.datas: An array of per-frame positioning data.
Descript Object
width: Output video width.height: Output video height.isEffect: Boolean indicating if it is a dynamic element video.version: Plugin version.rgbFrame: [x, y, w, h] position for the RGB area.alphaFrame: [x, y, w, h] position for the alpha area.fps: Frames per second.haAudio: Boolean for audio presence.hasBg: Boolean for background presence.
Effect Object (within effect array)
effectWidth: Width of the dynamic element.effectHeight: Height of the dynamic element.effectId: Unique index ID for the element.effectTag: String tag for the element.effectType: Type of element ("txt" or "img").fontColor: Hex color (only for "txt").fontSize: Font size (only for "txt").textAlign: Text alignment (e.g., "center").scaleMode: Scaling behavior.
Datas Object (within datas array)
frameIndex: The specific frame index.data: An array of Data objects for that frame.
Data Object (within data array)
renderFrame: [x, y, w, h] position on the canvas.effectId: ID of the effect being rendered.outputFrame: [x, y, w, h] position in the video area.
{
"descript": {
"width": 1808,
"height": 1008,
"isEffect": 1,
"version": 1,
"rgbFrame": [0, 0, 900, 1000],
"alphaFrame": [900, 0, 450, 500],
"fps": 30
},
"effect": [{
"effectWidth": 700,
"effectHeight": 1049,
"effectId": 1,
"effectTag": "a1",
"effectType": "txt",
"fontColor": "#ffffff",
"fontSize": 13,
"textAlign": "center"
}],
"datas": [{
"frameIndex": 0,
"data": [{
"renderFrame": [10, 10, 100, 100],
"effectId": 1,
"outputFrame": [20, 20, 80, 80]
}]
}]
}