Skip to main content
This page matches SDK 2.0.0. Makeup / reshape / style enums: Parameter enums. Auth: Auth & License.
Package: facebetter. Typical import:

EngineConfig

Web does not accept appId / appKey on this object. Web does not support offline .lic. isValid() is true when licenseToken is a non-empty string. Fetch the token from your server before init(). See Auth & License.

BeautyEffectEngine

Lifecycle

engine.initialized is true after a successful init().

Skin

Reshape

setReshape(param, value) — param is Reshape.*, value in [-1.0, 1.0]. See Parameter enums.

Body reshape

setBodyReshape(param, value) — param is BodyReshape.*, value in [0.0, 1.0]. Requires resource_body.fbd via addResourcePack first. See Parameter enums and Optional resource packs.

Makeup

Intensity [0, 1]. Style / color enums: Parameter enums.

Filter / sticker

Virtual background / chroma key

Callbacks

Processing

  • input: ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | Uint8ClampedArray
  • width / height required only for Uint8ClampedArray
Returns an output GL_TEXTURE_2D handle. Mirror is not applied on this path. Prefer processImage.

Stats

Enums (JS)

Values match native. Full makeup / reshape tables: Parameter enums.
Also exported: SmoothingStyle, WhiteningStyle, LipstickColor, BlushStyle, BlushColor, ContourStyle, EyeShadowStyle, EyeShadowColor, EyeLinerStyle, EyeLinerColor, EyebrowStyle, EyebrowColor, EyelashStyle, EyelashColor, PupilColor.

FacebetterError

Numeric codes: 0, -1 … -8. See Error handling.