基本元素

在 projectData 中,视图、音频、效果和过渡都是元素的数组。

每个元素包含以下公共参数:

属性类型必需示例值范围描述
idstringtrueb895d96c-e974-4d3f-af6d-ddc464fd4997-元素的唯一标识符。建议使用 UUID。
typestringtrue-Video | Image | Gif | Text | Caption | Shape | Chart | Progress | SoundWave | Group | Transition | Audio | Filter | Tone | Lut | 3D | LaTeX | Function Graph元素的类型。这决定了元素的渲染方式。
startnumbertrue->= 0元素在项目时间线中出现的时间,以秒为单位。
durationnumbertrue-> 0元素在时间线中的总持续时间,以秒为单位。
trackIndexnumbertrue->= 0元素在时间线中放置的轨道索引。
imageElement.json
 
  {
    "id": "bba95c7f-652b-4380-b166-6bece989f527",
    "type": "Image",
    "start": 0,
    "duration": 5,
    "trackIndex": 0,
    "x": 0,
    "y": 0,
    "width": 3629,
    "height": 5444,
    "blendMode": "normal",
    "anchorX": 1814.5,
    "anchorY": 2722,
    "rotation": 0,
    "scaleX": 0.19838354151359294,
    "scaleY": 0.19838354151359294,
    "alpha": 1,
    "skewX": 0,
    "skewY": 0,
    "hidden": false,
    "locked": false,
    "keyframes": [],
    "externalUrl": "https://images.pexels.com/photos/33189512/pexels-photo-33189512.jpeg",
    "ext": "jpeg"
  }