1.0.21 • Published 2 months ago

face-age v1.0.21

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Browsers support

FirefoxChromeSafari Edge IE11
31+ ✔35+ ✔6+ ✔Edge ✔(IE11)

Getting started

Installing
npm install face-age --save
yarn add face-age --save
Direct <script> include
<script src="https://cdn.jsdelivr.net/npm/face-age"></script>

Usage

import FaceAge from 'face-age'

To create a basic analysis with minimal configuration, write the following:

const options = {
    faceageId: '<Face Age Client Id>',
    type: 'skincare-analyzer',
}
const faceAge = new FaceAge(document.getElementById('FaceAge-module'), options)
faceAge.render()

Options

You can set the analysis options with new FaceAge(). If you want to change the global default options, you can use object options.

type

  • Type: String
  • Default: 'skincare'
  • Options:
    • 'skincare': create a new crop box
    • 'skincare-analyze': move the canvas

Define the analysis display mode. If you set the type to skincare, only the possibility of receiving the image will be displayed, while the skincare-analyze value is entered, the image will be received and the received data will also be displayed.

access

  • Type: Array
  • Default: ['dark_circle', 'eye_bag', 'eye_wrinkles', 'deep_wrinkles', 'wrinkles', 'acnes', 'pores', 'pigment']

You can set it to display more limited analysis information.

showCamera

  • Type: Boolean
  • Default: true

You can set it to use the camera to load the image.

showUpload

  • Type: Boolean
  • Default: true

You can specify whether users can upload images.

showFacePoint

  • Type: Boolean
  • Default: true

Ability to display analysis points on the face.

Methods

After analyzing the image, you should get the result. You can use the following commands for this.

getSkins()

To get information

faceAge.getSkins()

onload()

Using this function, you can call a specific command (for example, loading products) after the analysis is finished

faceAge.onload((response) => {
    console.log(response)
})

Contacts

Website: getfaceage.com

Email: dev@getfaceage.com

1.0.21

2 months ago

1.0.20

4 months ago

1.0.19

5 months ago

1.0.18

7 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.13

7 months ago

1.0.12

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.0

8 months ago