Layer Media Type Convention
Introduction
This document outlines the conventions for marking different types of layers and groups within our project.
Overview
Layer and group media types are used to identify and categorize the types of layers and groups within the project. These media types are written inside layer.mediaType and are specifically used for Picsart editor projects. There are two types of media Types:
- Layer Media Types: For individual layers
- Group Media Types: For groups of layers
enum LayerMediaType {
photo = 'PHOTO',
video = 'VIDEO',
text = 'TEXT',
sticker = 'STICKER',
shape = 'SHAPE',
backgroundImage = 'BACKGROUND_IMAGE',
backgroundColor = 'BACKGROUND_COLOR',
svgSticker = 'SVG_STICKER',
crop = 'CROP',
overlay = 'OVERLAY',
highlight = 'HIGHLIGHT',
mask = 'MASK',
collageCellImage = 'COLLAGE_CELL_IMAGE',
collageCellVideo = 'COLLAGE_CELL_VIDEO',
collageCellVideoEngine = "COLLAGE_CELL_VIDEO_ENGINE",
collageCell = 'COLLAGE_CELL',
videoEngine = 'VIDEO_ENGINE',
calloutShape = 'CALLOUT_SHAPE',
aoEffect = 'AO_EFFECT',
isiTextBackground = 'ISI_TEXT_BACKGROUND',
isiTextCell = 'ISI_TEXT_CELL',
isiTextPaddingTop = 'ISI_TEXT_PADDING_TOP',
isiTextPaddingBottom = 'ISI_TEXT_PADDING_BOTTOM',
projectRoot = 'PROJECT_ROOT',
canvasGroup = 'CANVAS_GROUP',
group = 'GROUP',
textHighlightGroup = 'TEXT_HIGHLIGHT_GROUP',
overlayGroup = 'OVERLAY_GROUP',
maskGroup = 'MASK_GROUP',
cropGroup = 'CROP_GROUP',
collageGroup = 'COLLAGE_GROUP',
collageCellGroup = 'COLLAGE_CELL_GROUP',
calloutGroup = 'CALLOUT_GROUP',
}
Layer Media Types
| Property | Description |
|---|---|
PHOTO | An ImageLayer used for image |
VIDEO | A VideoLayer used for video. |
TEXT | A TextLayer used for text. |
STICKER | A ImageLayer used for sticker. |
SHAPE | A ShapeLayer used for shapes. |
BACKGROUND_IMAGE | An ImageLayer used for background image within CANVAS_GROUP. |
BACKGROUND_COLOR | An ShapeLayer used for background color within CANVAS_GROUP. |
SVG_STICKER | An ShapeLayer used for stickers that utilize SVG resources. |
CROP | A ShapeLayer used within a CROP_GROUP to define the shape for cropping. |
OVERLAY | An ImageLayer used for define overlay within OVERLAY_GROUP. |
HIGHLIGHT | A ShapeLayer used for text highlights within highlight groups. |
MASK | An ImageLayer used for mask within MASK_GROUP. |
COLLAGE_CELL_IMAGE | An ImageLayer used for image within COLLAGE_CELL_GROUP |
COLLAGE_CELL_VIDEO | A VideoLayer used for video within COLLAGE_CELL_GROUP |
COLLAGE_CELL | A ShapeLayer used for collage shape within COLLAGE_CELL_GROUP |
AO_EFFECT | ImageLayer used for Overlay Effect |
ISI_TEXT_BACKGROUND | ShapeLayer used for Important Security Text Background |
ISI_TEXT_CELL | TextLayer used for Important Security Text |
ISI_TEXT_PADDING_TOP | ShapeLayer used for Important Security Text Padding Top |
ISI_TEXT_PADDING_BOTTOM | ShapeLayer used for Important Security Text Bottom |
Group Media Types
| Property | Description |
|---|---|
PROJECT_ROOT | Used for the root group of a project. |
CANVAS_GROUP | Used for canvas groups. |
GROUP | Used for custom groups created by users. |
TEXT_HIGHLIGHT_GROUP | Used for text highlighting and contains SHAPE and TEXT. |
OVERLAY_GROUP | Used for overlay contains one PHOTO and one OVERLAY. |
MASK_GROUP | Used for masking, it contains either one OVERLAY_GROUP or any non-group layer, and a MASK. |
CROP_GROUP | Used for crop contains ContentContainer and one SHAPE |
COLLAGE_GROUP | Contains COLLAGE_CELL_GROUP-s |
COLLAGE_CELL_GROUP | Contains one COLLAGE_CELL and CONTENT_CONTAINER |
CALLOUT_GROUP | Contains one TEXT and one SHAPE |
ContentContainer
This is possible combination of CropGroup, OverlayGroup, MaskGroup but in right order.
Hierarchy
CropGroup
MaskGroup
OverlayGroup
Image | Video
Overlay
Mask
Shape