Global

Members

GetBytesPerPixel :object

This is a class for image planes
Type:
  • object
Properties:
Name Type Description
GetByte function gets byte on the specified index (idx) => byte
SetByte function sets byte on the specified index (idx, byte) => void
JSBuffer function gets bytearray
SetBuffer function sets bytearray
Source:

(constant) MakeUpSDK

Deprecated:
  • since version 4.1. Please us MakeupSDK
Source:

(constant) SKINTONE_TARGET_QUALITY :SkinToneTargetQuality

Type:
Source:

(constant) TRACKING_QUALITY :TrackingQuality

Type:
Source:

defaultProviderSingleton :SDKProvider|undefined

Type:
Source:

Methods

CreateCmsMakeupEngine(width, height, preserveDrawingBuffer) → {Promise.<CmsMakeupEngine>}

Gets or creates a CmsMakeupEngine singleton instance.
Parameters:
Name Type Description
width number integer width of the output frame
height number integer height of the output frame
preserveDrawingBuffer boolean sets the flag on WebGl (default = false)
Source:
Returns:
MakeupEngine singleton.
Type
Promise.<CmsMakeupEngine>

CreateEyeShapeAnalyzer(onProgressCallback) → {Promise.<EyeShapeAnalyzer>}

Starts creating eye shape analyzer.
Returns a promise which will be resolved when analyzer has been created.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<EyeShapeAnalyzer>

CreateEyeToneAnalyzer(onProgressCallback) → {Promise.<EyeToneAnalyzer>}

Gets or creates a SkinToneAnalyzer singleton instance.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<EyeToneAnalyzer>

CreateFaceShapeAnalyzer(onProgressCallback) → {Promise.<FaceShapeAnalyzer>}

Starts creating shape analyzer.
Returns a promise which will be resolved when analyzer has been created.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<FaceShapeAnalyzer>

CreateFaceTracker() → {Promise.<FaceTracker>}

Gets or creates a FaceTracker singleton instance.
Source:
Returns:
FaceTracker singleton.
Type
Promise.<FaceTracker>

CreateHairToneAnalyzer(onProgressCallback) → {Promise.<HairToneAnalyzer>}

Starts creating hair tone analyzer.
Returns a promise which will be resolved when analyzer has been created.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<HairToneAnalyzer>

CreateLightConditionsAnalyzer(onProgressCallback) → {Promise.<LightConditionsAnalyzer>}

Starts creating light conditions analyzer.
Returns a promise which will be resolved when analyzer has been created.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<LightConditionsAnalyzer>

CreateLipShapeAnalyzer(onProgressCallback) → {Promise.<LipShapeAnalyzer>}

Starts creating lip shape analyzer.
Returns a promise which will be resolved when analyzer has been created.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<LipShapeAnalyzer>

CreateMakeUpEngine(width, height, preserveDrawingBuffer) → {Promise.<MakeupEngine>}

Parameters:
Name Type Description
width number integer width of the output frame
height number integer height of the output frame
preserveDrawingBuffer boolean sets the flag on WebGl (default = false)
Deprecated:
  • Please use CreateMakeupEngine method. Gets or creates a MakeUpEngine singleton instance.
Source:
Returns:
MakeUpEngine singleton.
Type
Promise.<MakeupEngine>

CreateMakeupEngine(width, height, preserveDrawingBuffer) → {Promise.<MakeupEngine>}

Gets or creates a MakeupEngine singleton instance.
Parameters:
Name Type Description
width number integer width of the output frame
height number integer height of the output frame
preserveDrawingBuffer boolean sets the flag on WebGl (default = false)
Source:
Returns:
MakeupEngine singleton.
Type
Promise.<MakeupEngine>

CreateSkinToneAnalyzer(onProgressCallback) → {Promise.<SkinToneAnalyzer>}

Gets or creates a SkinToneAnalyzer singleton instance.
Parameters:
Name Type Description
onProgressCallback undefined | onSkinToneProgressCallback callback which will be called every time loading progresses
Source:
Returns:
Type
Promise.<SkinToneAnalyzer>

GetEffectAnalyticsData(effect, finishNamesRecord) → {Omit.<EffectDataPayload, "session_uuid">}

Parameters:
Name Type Description
effect Effect
finishNamesRecord Map.<number, string>
Source:
Returns:
Type
Omit.<EffectDataPayload, "session_uuid">

GetProvider(pathToAssets, licenses, trackingQualityopt, accessTokenopt, cmsURLopt) → {Promise.<SDKProvider>}

Gets or creates a SDKProvider singleton instance.
Parameters:
Name Type Attributes Default Description
pathToAssets string url of the folder containing SDK Assets folder
licenses Object.<string, {license: string, isRaw: boolean}> Map between String key and String value where key is one of SKINTONE or MAKEUP and value is path to appropriate license for type defined by key.
trackingQuality TrackingQuality <optional>
TrackingQuality.HIGH sets the quality of internal face tracker used by the SDK. Possible values are: HIGH: 0(default) or LOW: 1
accessToken string <optional>
"" token used to provide access to the services.
cmsURL string <optional>
"https://cms.arbelle.ai:3000/api/v2.0" URL on which analytics requests are being sent. If no URL is provided, the default CMS URL will be used.
Source:
Returns:
SDKProvider singleton.
Type
Promise.<SDKProvider>

SetCallback(callback, withImageData) → {number}

Parameters:
Name Type Description
callback FrameProviderCallback
withImageData boolean flag to return frame as JS ImageData as the third arg. Defaults to `true`
Source:
Returns:
handle of callback you can use to clear it
Type
number

SetOnProgressCallback(onProgressCallback)

Sets onProgressCallback.
Parameters:
Name Type Description
onProgressCallback onProgressCallback callback which will be called every time loading progresses
Source:

colorToHex(color) → {string}

Parameters:
Name Type Description
color Color
Source:
Returns:
`0xffffff` formated rgb string
Type
string

denormalizeOpacity(alpha) → {number}

Parameters:
Name Type Description
alpha number
Source:
Returns:
in range [0, 100]
Type
number

(async) expandProductUsagePatternFetch(conf, pupId) → {Promise.<ProductUsagePattern>}

Parameters:
Name Type Description
conf CmsApiConfiguration
pupId number
Source:
Returns:
Type
Promise.<ProductUsagePattern>

(async) fetch_wrap(url) → {Promise.<unknown>}

Parameters:
Name Type Description
url string
Source:
Returns:
Type
Promise.<unknown>

(async) finishesMany(conf) → {Promise.<unknown>}

Parameters:
Name Type Description
conf CmsApiConfiguration
Source:
Returns:
Type
Promise.<unknown>

getFinishOpacity(finishName, effect) → {number}

Parameters:
Name Type Description
finishName string
effect Effect
Source:
Returns:
in range [0, 100]
Type
number

hexToColor(hex, a) → {Color}

Parameters:
Name Type Default Description
hex string Handles "0xRRGGBB" and "0xRGB" format only. "0x" prefix is fixed, R, G, B are hex numbers representing the obvious colors
a number 1 Alpha value. Defaults to 1.0 (fully opaque)
Source:
Returns:
- an RGB triplet, integers in range 0-255
Type
Color

hexToRgb(hex) → {Array.<number>}

Parameters:
Name Type Description
hex string Handles "0xRRGGBB" and "0xRGB" format only. "0x" prefix is fixed, R, G, B are hex numbers representing the obvious colors
Source:
Returns:
- an RGB triplet, integers in range 0-255
Type
Array.<number>

intersectMakeup(effect, effectController, pixelCoords)

Returns the uv area texture coordinates corresponding to position on the output view canvas that displays the makeup effect.
Parameters:
Name Type Description
effect Effect makeup effect
effectController EffectController the controller that controls the effect
pixelCoords Object pixel distance from the left ant top output view canvas edge
Source:

numToHex(x) → {string}

Parameters:
Name Type Description
x number
Source:
Returns:
hex representation of number
Type
string

(async) productUsagePatternsSingle(conf, pup_id) → {Promise.<unknown>}

Parameters:
Name Type Description
conf CmsApiConfiguration
pup_id number
Source:
Returns:
Type
Promise.<unknown>

(async) shadeColorsMany(conf, product_id) → {Promise.<unknown>}

Parameters:
Name Type Description
conf CmsApiConfiguration
product_id number
Source:
Returns:
Type
Promise.<unknown>

(async) tryToFetchshadeColorProductId(conf, shade_color_id) → {Promise.<(number|undefined)>}

Parameters:
Name Type Description
conf Omit.<CmsApiConfiguration, "languageCode">
shade_color_id number
Source:
Returns:
Type
Promise.<(number|undefined)>

updateMakeupDebounce2(id, fn, delay)

Parameters:
Name Type Description
id effect.id or productUsagePattern.id, it's a mix of domains for this function. As things stand, it makes no sense to have both codepaths (MakeupEngine and CMSMakeupEngine) used at the same time. So problems/clashes should not occur, but this is still semantically unsound
fn action to invoke
delay in ms
Source:

(async) usagePatternAreasMany(conf, pup_id) → {Promise.<unknown>}

Parameters:
Name Type Description
conf CmsApiConfiguration
pup_id number
Source:
Returns:
Type
Promise.<unknown>

zip(arr1, arr2) → {Array.<UpaEffectPair>}

Pairs elements from two arrays into a sequence of tuples. The length of the returned array is equal to the length of the shorter input array. Non-generic specialised version.
Parameters:
Name Type Description
arr1 Array.<UsagePatternArea> The first array of elements.
arr2 Array.<Effect> The second array of elements.
Source:
Returns:
An array of tuples containing paired elements.
Type
Array.<UpaEffectPair>

Type Definitions

BoundingBox

Quuartet specifying bounding box in which this effect is visible.
Type:
  • Array.<number>
Source:

CmsApiConfiguration

Type:
  • Object
Properties:
Name Type Description
url string base url of api
accessToken string
languageCode string
Source:

Color

Class used as a container storing RGBA for color values.
Color is stored as floating point value in 0.0 to 1.0 range.
Type:
  • Object
Properties:
Name Type Description
r number Red channel float value.
g number Green channel float value.
b number Blue channel float value.
a number Alpha channel float value.
Source:

Effect

Effect instances are used to store information required to uniquely identify each created makeup entity.
Effect instances are created from FeatureTemplate and (optional) FinishTemplate instances passed to MakeupEngine::CreateMakeup function in the API. Objects of this type are read only.

Effect is defined by the following:
- id - unique identifier of the effect
- type - makeup type used to create the effect
- name - name of the effect
- elements - a list of elements comprising the effect
Type:
  • Object
Properties:
Name Type Description
id number Unique identifier of the effect
type string Makeup type used to create the effect
name string Name of the effect.
elements Array.<Element> A list of elements comprising the effect
boundingBox BoundingBox A bounding box in which this effect is visible
Source:

Element

Stores updatable rendering parameters of elements contained in a created makeup effect. Element instances are created from ElementTemplate instances attached to FeatureTemplate and or FinishTemplate used for creating the effect. Each ElementTemplate attached to both FeatureTemplate and FinishTemplate used to create the effect is mapped to a single Element.

Element is defined by the following:
- name: read-only member used for identification of between different elements
- color: color of the rendered feature
- area : area where the rendering will be performed.

Color is stored in Color class which contains a 4 dimensional vector specifying red, green, blue and alpha channels.
Area is specified as a name of the image file that contains a greyscale image specifying how much of the color of this Element should be used at each fragment of the mesh used for rendering of the effect containing this Element. For each pixel in the area image, if the pixel is white this 100% of color from this element will be used. If the pixel is black 100% of the color from the previous element will be used. The pixel values in between are lineraly interpolated.
Once an effect is created from a FeatureTemplate each ElementTemplate in the feature is mapped to one Element. The previous element of the first element in an effect is the output of the previous effect. If there are no previous effects displayed, the previous element is raw input image without augmentation.
The location where area images are stored is + "/Textures/Area/" + Effect.type + Element.area where Effect.type is type of the effect containing this Element and Element.area is the area parameter of this Element. The location for storing of the color map is + "/Textures/" + Element.texture + "/" + Effect.type + "/" + Effect.area. The is the url passed to the CreateMakeupEngine function in the API.
Since both the area image and the color map are used as a texture on a mesh used for rendering the feature it will only work correctly if the uv mapping used on the mesh matches those images. This means that those images can be reused between effects only if the effects have the same type. Therefore, when specifying a new custom area image or a new color map, the image file needs to be placed in the subfolder specific to the type of the effect the new image was created for.
The available meshes are stored in .obj format in the "Assets/Models" folder of the package. UV maps from these meshes should be used when creating new area images.
Type:
  • Object
Properties:
Name Type Description
name string Name of the element.
color Color Color of the rendered feature.
texture string Path used to store color map of the rendered feature.
useColor Boolean Some of the feature elements do not use coloring step in their pipelines. Set to true if element uses (RGB) of the color, otherwise it only uses the alpha channel to control intensity.
useTexture Boolean Some of the feature elements do not use coloring step in their pipelines. Set to true If element should use the provided color map stored in texture member, otherwise it only uses the alpha channel provided in the color member to control intensity.
area string | ImageData Name of the image file specifying the area where rendering of this element will be performed.
Source:

ElementTemplate

Contains rendering information of each element of a makeup feature.

Each element template consists of the following:
- name: the name of the element
- area: the area where rendering will be performed
- color: the color of the area where rendering will be performed
- pipeline: rendering steps to use when rendering this element.

Color is stored in Color class which contains a 4 dimensional vector specifying red, green, blue and alpha channels. Additionally, color can be provided as a path to a file containign color map to use.
Area is specified as a name of the image file that contains a greyscale image specifying how much of the color of this ElementTemplate should be used at each fragment of the mesh used for rendering of the feature containing this ElementTemplate. For each pixel in the area image, if the pixel is white 100% of color from this element template will be used. If the pixel is black 100% of the color from the previous element will be used. The pixel values in between are lineraly interpolated.
Once an effect is created from a feature each element template in the feature is mapped to one element. The previous element of the first element in an effect is the output of the previous effect. If there are no previous effects displayed, the previous element is raw input image without augmentation.
The location where area images are stored is + "/Textures/Area/" + FeatureTemplate.type + ElementTemplate.area where FeatureTemplate.type is type of the feature containing this ElementTemplate and ElementTemplate.area is the area parameter of this ElementTemplate. The location where color maps are + "/Textures/" + ElementTemplate.texture + "/" + FeatureTemplate.type + "/" + FeatureTemplate.area. The is the url passed to the CreateMakeupEngine function in the API.
Since both the area image and the color map are used as a texture on a mesh used for rendering the feature it will only work correctly if the uv mapping used on the mesh matches those images. This means that those images can be reused between features only if the features have the same type. Therefore, when specifying a new custom area image or a new color map, the image file needs to be placed in the subfolder specific to the type of the feature the new image was created for.
The available meshes are stored in .obj format in the "Assets/Models" folder of the package. UV maps from these meshes should be used when creating new area textures.
Type:
  • Object
Properties:
Name Type Description
name; string Name of the element.
area; string Name of the image file specifying the area where rendering of this element will be performed.
color; Color Color of the area where rendering will be performed.
texture; string Path used to store color map of the rendered feature.
pipeline; PipeTemplate Rendering steps to use when rendering this element.
useColor; Boolean Some of the feature elements do not use coloring step in their pipelines. Set to true if element uses (RGB) of the color, otherwise it only uses the alpha channel to control intensity.
useTexture; Boolean Some of the feature elements do not use coloring step in their pipelines. Set to true If element should use the provided color map stored in texture member, otherwise it only uses the alpha channel provided in the color member to control intensity.
Source:

EyeShapeCallback(EyeShapeAnalyzerResult)

Parameters:
Name Type Description
EyeShapeAnalyzerResult Object Analyzed eye shape
Properties
Name Type Description
estimates EyeShapeEstimates Object containing model estimates for each of the 4 possible eyeshape classes (Almond, Hooded, Monolid, Round).
frameIndex number Index of the frame that has been analyzed.
status "OFF" | "OK" | "RECOVERING" | "INIT" Indicates tracking status.
Source:

EyeToneCallback(EyeToneAnalyzerResult)

Parameters:
Name Type Description
EyeToneAnalyzerResult Object Analyzed eye shape
Properties
Name Type Description
estimates EyeToneEstimates Object containing estimates for hue, saturation and lightness.
frameIndex number Index of the frame that has been analyzed.
EyeShapeAnalyzerResult.status "OFF" | "OK" | "RECOVERING" | "INIT" Indicates tracking status.
Source:

FaceShapeCallback(FaceShapeAnalyzerResult)

Parameters:
Name Type Description
FaceShapeAnalyzerResult Object Analyzed face shape
Properties
Name Type Description
estimates FaceShapeEstimates Object containing model estimates for each of the 5 possible faceshape classes (Heart, Oblong, Oval, Round, Square).
frameIndex number Index of the frame that has been analyzed.
status "OFF" | "OK" | "RECOVERING" | "INIT" Indicates tracking status.
Source:

FaceTrackerCallback(BeautyFaceData)

Parameters:
Name Type Description
BeautyFaceData Object Structure used as container for all face tracking and detection results. WARNING: this returns unmanaged objects and BeautyFaceData and all resources accessed should be cleaned up with delete() to prevent memory leaks
Source:

FeatureTemplate

Stores a definition of template used to create of virtual makeup.

One makeup feature template contains all information required to render virtual makeup:
- mesh
- area
- color
- description of blending and filtering algorithms required to augment the camera feed with virtual makeup.

One FeatureTemplate instance can contain multiple rendering elements which share the mesh but can have different application area, color or blending and filtering algorithm.
The simplest use-case for this class is using one of the predefined template specified in FeatureTemplateRepository obtained from MakeupEngine::GetFeatures function and setting the color of each element in elements array, then passing the feature template to MakeupEngine:CreateMakeup function to create the virtual makeup corresponding to the given template.

FeatureTemplate is defined by the following:
- name: name of the feature. This value is used for identification of templates used for describing different makeup features. Does not have to be unique.
- type: type of the feature. Defines a mesh used to represent this feature when rendering.
- elements: defines a list of elements required for rendering of this feature. Each element uses the same mesh defined by the type parameter.
The following types are supported: - Lipstick
- Lipliner
- Mascara
- Foundation
- Highlighter
- Blush
- Concealer
- Eyeliner
- Eyeshadow
- Eyebrows
- EyebrowLine
- Eyebrows_1 - deprecated
- Eyebrows_2 - deprecated
- Eyebrows_3 - deprecated
Each type maps to a single mesh. The meshes used are stored in .obj format in the "StreamingAssets/Models" folder. The name of the .obj corresponds to the type name.
Type:
  • Object
Properties:
Name Type Description
name string Name of the feature.
type string Type of the feature. Specifies one of the predefined meshes to use to represent this feature.
elements Array.<ElementTemplate> A list of elements required for rendering this feature.
Source:

FetchProductUsagePatternConfiguration

Configuration required to access a specific product usage pattern.
Type:
  • Object
Properties:
Name Type Description
id number Unique identifier for the product usage pattern.
languageCode string The appropriate language code of the specific product usage pattern.
Source:

FilterParameterTemplate

Contains filter parameter information.

Filter parameter is specified by the following:
- name: name of the parameter to set
- type: type of the parameter. The system currently supports floating point and texture types. Type defines how the given value will be parsed and represented.
- value: value of the parameter. Value is provided as a string, regardless of type. Texture inputs are given by name of the texture. Currently the only supported texture inputs are a custom mask names defined in PipeTemplate object.
Type:
  • Object
Properties:
Name Type Description
name string Name of the input parameter.
value string Value of the input parameter.
type string Type of the input parameter.
Source:

FilterQueueTemplate

Contains information defining a single step in the rendering pipeline of each makeup feature element.

Single step of the rendering pipeline consists of a blend mode, an optional lists of preprocessing and an optional list of postprocessing filters.

The engine supports the following blend modes:
- Overlay: performs overlay blend mode
- AlphaBlendUseMaskAlpha: performs traditional transparency blending using binary mask as alpha channel
- Screen: performs screen blend mode

Each blend is performed between the output of the preprocessing stack and the output of the previous blend or previous postprocessing stack. Used blend mode is specified via name member.
Specifically, the initial blend is performed between colored a mesh representing queried makeup feature and the first preprocessing stack.

Preprocessing filters are applied in sequence starting from raw camera feed. Postprocessing filters are applied in sequence starting from the output of blending.
Type:
  • Object
Properties:
Name Type Description
blend string Name of the used blend mode.
origin string The input image for this filter queue. The following values are supported:
- video: the input image into this filter queue is the input image provided to the engine by the API consumer.
- previous: the input image into this filter queue is the output image of the previous element in the pipeline.

The default value for origin is `video`.
preprocess Array.<FilterTemplate> List of preprocessing filters to apply.
postprocess Array.<FilterTemplate> List of postprocessing filters to apply.
switchLayers boolean If set to true, the output of preprocess is used as a top layer. Otherwise, output from the previous blend is used as a top layer for blending.
Source:

FilterTemplate

Defines a name and a parameters list specifiying a filter.

Each filter must take an image as input and returns and image processed by an filtering algorithm. Optionally, a filter can take additional parameters which are stored in parameters member.

The engine supports the following filters:
- Smoothing: performs face smoothing filter on the input image
- Greyscale: performs greyscale conversion on the input image
- Threshold: performs binary thresholding operation on the input image
- Multply: performs multiplication of the given image with a custom mask texture specified as input parameter
- HighPass: performs gaussian high pass filter on the input image
- Blur - performs gaussian blur on the input image

The filter applied is defined by name member.
Input parameters of each filter can be set using FilterParameterTemplate class
Type:
  • Object
Properties:
Name Type Description
name string Name of the filter to apply.
parameters Array.<FilterParameterTemplate> List of optional filter parameters.
Source:

Finish

Finish retrieved from the cms. Contains information for rendering a specific FinishTemplate from MakeupEngine Additional data not required for rendering has been omitted for simplicity. For the complete type please refer to the official specification for API endpoints: https://cms.arbelle.ai/docs/v2.0
Type:
  • Object
Properties:
Name Type Description
name string name of the finish, this value should equal any finish.name from MakeupEngine.GetFinishes
Source:

FinishTemplate

Stores a definition of makeup finish.

Each finish is a named rendering pipeline which can be reused with any of the features.
Provides methods for setup of blending and filtering procedures and parameters for finishes.
Type:
  • Object
Properties:
Name Type Description
name string Name of the finish.
transparency number Transparency of the finish.
pipeline PipeTemplate Rendering steps to use when rendering the finish.
useColor boolean
useTexture boolean
texture string Texture identifier or path used for the finish.
Source:

FrameProviderCallback(id, imageData)

This callback type is called `FrameProviderCallback`
Parameters:
Name Type Description
id number
imageData ImageData
Source:

FrameProvider_Image

This is a class for images
Type:
  • object
Properties:
Name Type Description
GetSize function gets total size of the image in bytes
GetWidth function
GetHeight function
GetPlaneCount function gets number of planes
GetPlane function gets a plane on the specified index
Source:

HairToneCallback(HairToneAnalyzerResult)

Parameters:
Name Type Description
HairToneAnalyzerResult Object Analyzed hair tone
Properties
Name Type Description
estimates HairToneEstimates Object containing estimates of hue, saturation and lightness values.
frameIndex number Index of the frame that has been analyzed.
status "OFF" | "OK" | "RECOVERING" | "INIT" Indicates tracking status. If no hair has been detected, returned status will be set to "INIT".
Source:

LightConditionsCallback(LightConditionsAnalyzerResult)

Parameters:
Name Type Description
LightConditionsAnalyzerResult Object Analyzed light conditions
Properties
Name Type Description
hasNoBacklight float Boolean value indicating the presence or absence of backlight in the analyzed image.
hasNoBacklightProbability float float value ranging from 0-1 representing model's confidence that backlight is present in the image.
isFaceUniformlyLit boolean Boolean value indicating whether the face in the image is uniformly lit.
isFaceUniformlyLitProbability boolean float value ranging from 0-1 representing model's confidence that the face in the image is uniformly lit.
frameIndex number Index of the frame that has been analyzed.
Source:

LipShapeCallback(LipShapeAnalyzerResult)

Parameters:
Name Type Description
LipShapeAnalyzerResult Object Analyzed lip shape.
Properties
Name Type Description
estimates LipShapeEstimates Object containing model estimates for each of the 5 possible lip shape classes (Thin, Regular, Full, HeavyUpper, HeavyLower).
frameIndex number Index of the frame that has been analyzed.
status "OFF" | "OK" | "RECOVERING" | "INIT" Indicates tracking status.
Source:

MaskTemplate

Contains a definition of a custom mask.

Custom mask is defined by name and a reference which is used to determine the location of the image file containg the mask. The location for storing of custom masks is + "/Textures/" + MaskTemnplate.texture + "/" + FeatureTemplate.type + "/" + FeatureTemplate.area. The is the url passed to the CreateMakeupEngine function in the API.
The mesh custom mask should use is derived from the type of FeatureTemplate instance this MaskTemplate is contained in.
Type:
  • Object
Properties:
Name Type Description
name string Name of the custom texture used for identification purposes. Should be unique within a single FeatureTemplate instance.
texture string Internal texture storage path to base texture.
Source:

PipeTemplate

Stores a list of blending and filtering steps required to render a virtual makeup feature.

Contains of a list of MaskTemplate objects defining custom masks which can be used as inputs in filters.
Contains a list of FilterQueueTemplate objects each of which define a single step in the rendering procedure.
Type:
  • Object
Properties:
Name Type Description
masks Array.<MaskTemplate> List storing custom mask definitions.
filters Array.<FilterQueueTemplate> List storing blending and filtering steps of rendering procedure of a makeup feature.
Source:

ProductUsagePattern

Expanded product usage pattern retrieved from the cms. Additional data not required for rendering has been omitted for simplicity. For the complete type please refer to the official specification for API endpoints: https://cms.arbelle.ai/docs/v2.0
Type:
  • Object
Properties:
Name Type Description
id number Unique identifier for the usage pattern.
product number | undefined Unique identifier for the product of this usage pattern.
usagePatternAreas Array.<UsagePatternArea> Array of usage pattern areas.
Source:

ShadeColor

Shade color retrieved from the cms. Shade color contains the complete color information for rendering of a specific Effect Additional data not required for rendering has been omitted for simplicity. For the complete type please refer to the official specification for API endpoints: https://cms.arbelle.ai/docs/v2.0
Type:
  • Object
Properties:
Name Type Description
id number | undefined Unique identifier of the shade color.
finish Finish Finish used to enhance the shade color.
colorOpacity number Opacity level of the color. Range is from [0, 100].
Can be updated with UpdateMakeup
finishOpacity number Opacity level of the finish. Range is from [0, 100].
Can be updated with UpdateMakeup
rendering string Hex string representing the color. The format is "0xffffff".
Can be updated with UpdateMakeup
Source:

SkinToneCallback(SkinToneAnalyzerResult)

Parameters:
Name Type Description
SkinToneAnalyzerResult Object Analyzed skin tone
Properties
Name Type Description
monk "MONK_1" | "MONK_2" | "MONK_3" | "MONK_4" | "MONK_5" | "MONK_6" | "MONK_7" | "MONK_8" | "MONK_9" | "MONK_10" | "UNDEFINED" Estimated Monk skin tone The monk skin tone scale is a scale describing human skin color. The scale consist of 10 categories, where a lower number maps to lighter while a higher to darker skin tones.
decimalMonk number Numerical value of predicted monk skin tone.
RGB Array.<number> This property now represents apparent RGB instead of the original Google RGB representation, of various monk skin tones.
renderRGB Array.<number> Deprecated: RGB of various monk skin tones that will give more realistic rendering results
HSL Array.<number> Apparent hue, saturation and light of skin
frameIndex number Index of the frame that has been analyzed.
status "OFF" | "OK" | "RECOVERING" | "INIT" Indicates tracking status.
Deprecated:
  • SkinToneAnalyzerResult.renderRGB - will be removed in future versions, SkinToneAnalyzerResult.RGB - It will be used as apparent RGB representation of various monk skin tones
Source:

SkinToneTargetQuality

Type:
  • number
Source:

TrackingQuality

Type:
  • number
Source:

UpaEffectPair

Type:
  • Object
Properties:
Name Type Description
upa UsagePatternArea
effect Effect
Source:

UpdateMakeupConfig

Configuration
Type:
  • Object
Properties:
Name Type Attributes Default Description
boundingBox BoundingBox <optional>
New bounding box to be set, if undefined the previous value is retained
analyticsDebounceTime number <optional>
300 Define how long the debounce delay for analytics should be
Source:

UsagePatternArea

Usage pattern area retrieved from the cms. Usage pattern defines what application area to render. Additional data not required for rendering has been omitted for simplicity. For the complete type please refer to the official specification for API endpoints: https://cms.arbelle.ai/docs/v2.0
Type:
  • Object
Properties:
Name Type Description
applicationArea string Name of the application area this should equal one FeatureTemplate.name found in MakeupEngine.GetFeatures
shadeColor ShadeColor ShadeColor defined for a specific usage pattern area
Source:

onProgressCallback(progress)

Parameters:
Name Type Description
progress number a number from 0 to 1 indicating the progress level
Source:

onSkinToneProgressCallback(status)

Parameters:
Name Type Description
status Object information on current progress
Properties
Name Type Description
contentLength number the whole length of the content in bytes
receivedLength number the currently received length in bytes
progress number a number from 0 to 1 indicating the progress level
done boolean true if the creation process is done, false otherwise
Source: