new MakeUpEngine(width, height, features, finishes)
Parameters:
| Name | Type | Description |
|---|---|---|
width |
number | width of the output frame |
height |
number | height of the output frame |
features |
Object | predefined feature templates repository |
finishes |
Object | predefined finish templates repository |
- Deprecated:
- Please use MakeupEngine class instead.
This class is part of the SDK's core functionality.
It primarily serves two key functions:
Manipulating the current output of the view throught creating, displaying, updating, hiding, and removing makeup effects.
Exposure of FeatureTemplateRepository and FinishTemplateRepository deserialized from Feature.json and finishes.json files.
- Please use MakeupEngine class instead.
This class is part of the SDK's core functionality.
- Source:
Methods
ClearMakeUp()
- Deprecated:
- Please use ClearMakeup method. Destroys all created makeup features.
- Source:
CreateMakeUp(featureTemplate, finishTemplate, boundingBox)
Parameters:
| Name | Type | Description |
|---|---|---|
featureTemplate |
FeatureTemplate | FeatureTemplate object |
finishTemplate |
FinishTemplate | FinishTemplate object |
boundingBox |
BoundingBox | Quuartet specifying bounding box in which this effect is visible |
- Deprecated:
- Please use CreateMakeup method.
Creates makeup effect from given feature and finish templates.
Additionally, this function takes an array of floats specifying a bounding box in the following way: - Lower left x coordinate is the first element of the array - Lower left y coordinate is the second element of the array - Upper right x coordinate is the third element of the array - Upper right y coordinate is the fourth element of the array Bounding box is set in normalized image coordinates where point (0.0, 0.0) is the lower left corner of the output image while point (1.0, 1.0) is the upper right corner of the output image. This effect will be visible only when its location in the output image is inside of the bounding box. The default bounding box is contains the whole output image. If the input array has less than 4 elements, the default bounding box will be used.
Returns the promise which is resolved into the feature instance uniquely identifying the created effect.
- Please use CreateMakeup method.
Creates makeup effect from given feature and finish templates.
- Source:
DisplayMakeUp(effect)
Parameters:
| Name | Type | Description |
|---|---|---|
effect |
Effect | makeup effect |
- Deprecated:
- Please use DisplayMakeup method.
Displays given makeup effect.
- Please use DisplayMakeup method.
Displays given makeup effect.
- Source:
HideMakeUp(effect)
Parameters:
| Name | Type | Description |
|---|---|---|
effect |
Effect | makeup effect |
- Deprecated:
- Please use HideMakeup method.
Hides given makeup effect.
- Please use HideMakeup method.
Hides given makeup effect.
- Source:
RemoveMakeUp(effect)
Parameters:
| Name | Type | Description |
|---|---|---|
effect |
Effect | makeup effect |
- Deprecated:
- Please use RemoveMakeup method.
Destroys given makeup effect.
- Please use RemoveMakeup method.
Destroys given makeup effect.
- Source:
(async) UpdateMakeUp(effect) → {Promise.<void>}
Parameters:
| Name | Type | Description |
|---|---|---|
effect |
Effect | makeup effect |
- Deprecated:
- Please use UpdateMakeup method. Updates color and/or area parameters of the given makeup effect
- Source:
Returns:
- Type
- Promise.<void>