This package exposes a React component that you can drop into your existing react app.
yarn add git+https://github.com/anisjonischkeit/FacePicker.git#latest
An example of the usage in a react app can be found in the examples folder.
type Position = {
x: number,
y: number
}
type Eyes = {
left: Position,
right: Position
}
type PropsType = {
faces: Array<Eyes>,
selection: ?number,
facesDidUpdate: ?((Array<Eyes>, ?number) => void),
imgUrl: string,
maxSize: ?{
width: ?int,
height: ?int
}
}
A list of faces that you wish to display on the FacePicker
The index of the face you wish to have selected
Callback that fires whenever a face's position is updated on the FacePicker
The url of an image to be passed in
The Maximum size that the image should be
make sure all of your changes are commited to git and pushed to the server, then run:
yarn release