Mask

Crop Mask

PropTypeRequiredExampleValue RangeDescription
typestringtrue-crop | ellipseThe type of mask, such as "crop" or "ellipse".
centerXnumbertrue--The horizontal position of the mask center, in pixels.
centerYnumbertrue--The vertical position of the mask center, in pixels.
widthnumbertrue--The width of the mask, in pixels.
heightnumbertrue--The height of the mask, in pixels.
imageElement.json
1{ 2 "id": "0a2db861-19c0-47d0-9e71-5a56a357e2e9", 3 "type": "Image", 4 "start": 0, 5 "duration": 5, 6 "trackIndex": 0, 7 "x": -58.59302855661144, 8 "y": 48.394393104046685, 9 "blendMode": "normal", 10 "anchorX": 1051.1350332909515, 11 "anchorY": 2519.1996978825114, 12 "rotation": 0, 13 "maskData": { 14 "type": "crop", 15 "centerX": 1051.1350332909515, 16 "centerY": 2519.1996978825114, 17 "width": 2121.862754282655, 18 "height": 2949.902587890625 19 }, 20 "scaleX": 0.23356401384083045, 21 "scaleY": 0.23356401384083045, 22 "alpha": 1, 23 "skewX": 0, 24 "skewY": 0, 25 "keyframes": [], 26 "externalUrl": "https://images.pexels.com/photos/30465303/pexels-photo-30465303.jpeg", 27 "ext": "jpeg" 28} 29

Shape Mask

PropTypeRequiredExampleValue RangeDescription
typestringtrue-crop | ellipseThe type of mask, such as "crop" or "ellipse".
shapeTypestringtrue-SHAPE_RECT | SHAPE_ELLIPSE | SHAPE_STAR | SHAPE_POLYGON | SHAPE_PATHThe type of shape, such as "rect" or "ellipse".
xnumbertrue--The horizontal position of the mask, in pixels.
ynumbertrue--The vertical position of the mask, in pixels.
scaleXnumbertrue--The horizontal scale of the mask.
scaleYnumbertrue--The vertical scale of the mask.
rotationnumbertrue--The rotation of the mask, in degrees.
widthnumbertrue--The width of the mask, in pixels.
heightnumbertrue--The height of the mask, in pixels.
fillstringtrue--The fill color of the mask, in hexadecimal format.
viewobjecttrue--The view of the mask.
imageElement.json
1{ 2 "id": "0a2db861-19c0-47d0-9e71-5a56a357e2e9", 3 "type": "Image", 4 "start": 0, 5 "duration": 5, 6 "trackIndex": 0, 7 "x": -58.59302855661144, 8 "y": 48.394393104046685, 9 "blendMode": "normal", 10 "anchorX": 1051.1350332909515, 11 "anchorY": 2519.1996978825114, 12 "rotation": 0, 13 "maskData": { 14 "type": "shape", 15 "shapeType": "SHAPE_ELLIPSE", 16 "x": 1935.8609161703698, 17 "y": 2120.7135441063306, 18 "scaleX": 1, 19 "scaleY": 1, 20 "rotation": 0, 21 "width": 2604, 22 "height": 2604, 23 "fill": "#ffffff", 24 "view": { 25 "scaleX": 1, 26 "scaleY": 1, 27 "x": 0, 28 "y": 0, 29 "width": 2604, 30 "height": 2604, 31 "rotation": 0, 32 "anchorX": 0, 33 "anchorY": 0 34 } 35 }, 36 "scaleX": 0.23356401384083045, 37 "scaleY": 0.23356401384083045, 38 "alpha": 1, 39 "skewX": 0, 40 "skewY": 0, 41 "keyframes": [], 42 "externalUrl": "https://images.pexels.com/photos/30465303/pexels-photo-30465303.jpeg", 43 "ext": "jpeg", 44} 45