Virtual Makeup API

This pages describes the second version of Beauty API.

Download example

The new Beauty module allows to improve appearance of a user's face via the following built-in features:

Eyebrows

// Effect mCurrentEffect = ...
// set eyebrows color
mCurrentEffect.callJSMethod("Eyebrows.color", "0.8 0.4 0.2 0.4");
// reset eyebrows color
mCurrentEffect.callJSMethod("Eyebrows.clear", "");

Preview

Drag

A custom Eyebrows texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom eyebrows texture
mCurrentEffect.callJSMethod("Eyebrows.set", "eyebrows.png");

Eyeshadow

// Effect mCurrentEffect = ...
// set eyeshadow color
mCurrentEffect.callJSMethod("Eyeshadow.color", "0.6 0.5 1 0.6");
// reset eyeshadow color
mCurrentEffect.callJSMethod("Eyeshadow.clear", "");

Preview

Drag

A custom Eyeshadow texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom eyeshadow texture
mCurrentEffect.callJSMethod("Eyeshadow.set", "eyeshadow.png");

Eyeliner

// Effect mCurrentEffect = ...
// set eyeliner color
mCurrentEffect.callJSMethod("Eyeliner.color", "0 0 0");
// reset eyeliner color
mCurrentEffect.callJSMethod("Eyeliner.clear", "");

Preview

Drag

A custom Eyeliner texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom eyeliner texture
mCurrentEffect.callJSMethod("Eyeliner.set", "eyeliner.png");

Eyelashes

// Effect mCurrentEffect = ...
// set eyelashes color
mCurrentEffect.callJSMethod("Eyelashes.color", "0 0 0");
// reset eyelashes color
mCurrentEffect.callJSMethod("Eyelashes.clear", "");

Preview

Drag

A custom Eyelashes texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom eyelashes texture
mCurrentEffect.callJSMethod("Eyelashes.set", "eyelashes.png");

Eyes Color

// Effect mCurrentEffect = ...
// set eyes color
mCurrentEffect.callJSMethod("EyesColor.color", "0 0.2 0.8 0.64");
// reset eyes color
mCurrentEffect.callJSMethod("EyesColor.clear", "");

Preview

Drag

Foundation

// Effect mCurrentEffect = ...
// set foundation color
mCurrentEffect.callJSMethod("Foundation.color", "0.73 0.39 0.08 0.3");
// set foundation strength (skin smoothing)
mCurrentEffect.callJSMethod("Foundation.strength", "1");
// reset foundation strength and color
mCurrentEffect.callJSMethod("Foundation.clear", "");

Preview

Drag

A custom Foundation texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom foundation texture
mCurrentEffect.callJSMethod("Foundation.set", "foundation.png");

Contour

// Effect mCurrentEffect = ...
// set contour color
mCurrentEffect.callJSMethod("Contour.color", "0.3 0.1 0.1 0.6");
// reset contour color
mCurrentEffect.callJSMethod("Contour.clear", "");

Preview

Drag

A custom Contour texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom contour texture
mCurrentEffect.callJSMethod("Contour.set", "contour.png");

Highlighter

// Effect mCurrentEffect = ...
// set highlighter color
mCurrentEffect.callJSMethod("Highlighter.color", "0.75 0.74 0.74 0.4");
// reset highlighter color
mCurrentEffect.callJSMethod("Highlighter.clear", "");

Preview

Drag
// Effect mCurrentEffect = ...
// set a custom highlighter texture
mCurrentEffect.callJSMethod("Highlighter.set", "highlighter.png");

Blush

// Effect mCurrentEffect = ...
// set blush color
mCurrentEffect.callJSMethod("Blush.color", "0.7 0.1 0.2 0.5");
// reset blush color
mCurrentEffect.callJSMethod("Blush.clear", "");

Preview

Drag

A custom Blush texture may be provided by placing a corresponding .png or .ktx file into the effect's folder.

// Effect mCurrentEffect = ...
// set a custom blush texture
mCurrentEffect.callJSMethod("Blush.set", "blush.png");

Lipstick

There are two kinds of lipstick:

Matt

// Effect mCurrentEffect = ...
// set lips matt color
mCurrentEffect.callJSMethod("Lips.matt", "0.85 0.43 0.5 0.8");
// resets lips color
mCurrentEffect.callJSMethod("Lips.clear", "");

Preview

Drag

Shiny

// Effect mCurrentEffect = ...
// set lips shiny color
mCurrentEffect.callJSMethod("Lips.shiny", "1 0 0.49 1");
// resets lips color
mCurrentEffect.callJSMethod("Lips.clear", "");

Preview

Drag

Teeth Whitening

// Effect mCurrentEffect = ...
// set teeth whitening strength
mCurrentEffect.callJSMethod("TeethWhitening.strength", "1");
// resets teeth whitening
mCurrentEffect.callJSMethod("TeethWhitening.clear", "");

Preview

Drag

Face morphing

// Effect mCurrentEffect = ...
// set eyes enlarge strength
mCurrentEffect.callJSMethod("FaceMorph.eyes", "0.6");
// set checks slim down strength
mCurrentEffect.callJSMethod("FaceMorph.face", "0.5");
// set nose slim down strength
mCurrentEffect.callJSMethod("FaceMorph.nose", "1");

Preview

Drag
Last updated on