Skip to main content
Version: 3.1.0

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:

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

PropertyDescription
PHOTOAn ImageLayer used for image
VIDEOA VideoLayer used for video.
TEXTA TextLayer used for text.
STICKERA ImageLayer used for sticker.
SHAPEA ShapeLayer used for shapes.
BACKGROUND_IMAGEAn ImageLayer used for background image within CANVAS_GROUP.
BACKGROUND_COLORAn ShapeLayer used for background color within CANVAS_GROUP.
SVG_STICKERAn ShapeLayer used for stickers that utilize SVG resources.
CROPA ShapeLayer used within a CROP_GROUP to define the shape for cropping.
OVERLAYAn ImageLayer used for define overlay within OVERLAY_GROUP.
HIGHLIGHTA ShapeLayer used for text highlights within highlight groups.
MASKAn ImageLayer used for mask within MASK_GROUP.
COLLAGE_CELL_IMAGEAn ImageLayer used for image within COLLAGE_CELL_GROUP
COLLAGE_CELL_VIDEOA VideoLayer used for video within COLLAGE_CELL_GROUP
COLLAGE_CELLA ShapeLayer used for collage shape within COLLAGE_CELL_GROUP
AO_EFFECTImageLayer used for Overlay Effect
ISI_TEXT_BACKGROUNDShapeLayer used for Important Security Text Background
ISI_TEXT_CELLTextLayer used for Important Security Text
ISI_TEXT_PADDING_TOPShapeLayer used for Important Security Text Padding Top
ISI_TEXT_PADDING_BOTTOMShapeLayer used for Important Security Text Bottom

Group Media Types

PropertyDescription
PROJECT_ROOTUsed for the root group of a project.
CANVAS_GROUPUsed for canvas groups.
GROUPUsed for custom groups created by users.
TEXT_HIGHLIGHT_GROUPUsed for text highlighting and contains SHAPE and TEXT.
OVERLAY_GROUPUsed for overlay contains one PHOTO and one OVERLAY.
MASK_GROUPUsed for masking, it contains either one OVERLAY_GROUP or any non-group layer, and a MASK.
CROP_GROUPUsed for crop contains ContentContainer and one SHAPE
COLLAGE_GROUPContains COLLAGE_CELL_GROUP-s
COLLAGE_CELL_GROUPContains one COLLAGE_CELL and CONTENT_CONTAINER
CALLOUT_GROUPContains 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