基本元素

在 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"
  }