This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed
demo-ng/app/tabs/mlkit/facedetection Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 11import { Component } from "@angular/core" ;
2- import { MLKitDetectFacesOnDeviceResult } from "nativescript-plugin-firebase/mlkit/facedetection" ;
2+ import { MLKitDetectFacesOnDeviceResult , MLKitDetectFacesResultFace } from "nativescript-plugin-firebase/mlkit/facedetection" ;
33
44@Component ( {
55 selector : "mlkit-facedetection" ,
66 moduleId : module . id ,
77 templateUrl : "./facedetection.component.html" ,
88} )
99export class FaceDetectionComponent {
10- // TODO create a type (in the plugin) for these Arrays
11- faces : Array < {
12- smilingProbability ?: number ;
13- leftEyeOpenProbability ?: number ;
14- rightEyeOpenProbability ?: number ;
15- } > ;
10+ faces : Array < MLKitDetectFacesResultFace > ;
1611
1712 mlKitAllOK : string ;
1813
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ PACK_DIR=package;
55publish () {
66 cd $PACK_DIR
77 echo ' Publishing to npm...'
8+ # note that when using a tag: don't use regular version numbers as you can't publish those as 'latest' later
89# npm publish *.tgz --tag next
910 npm publish * .tgz
1011}
Original file line number Diff line number Diff line change 11import { MLKitOptions } from "../" ;
22import { MLKitCameraView , MLKitResult } from "../index" ;
33
4- export interface MLKitDetectFacesOnDeviceResult extends MLKitResult {
4+ export interface MLKitDetectFacesResultFace {
55 // TODO there are more properties we can return, see https://firebase.google.com/docs/ml-kit/android/detect-faces
6- faces : Array < {
7- smilingProbability ?: number ;
8- leftEyeOpenProbability ?: number ;
9- rightEyeOpenProbability ?: number ;
10- } > ;
6+ smilingProbability ?: number ;
7+ leftEyeOpenProbability ?: number ;
8+ rightEyeOpenProbability ?: number ;
9+ }
10+
11+ export interface MLKitDetectFacesOnDeviceResult extends MLKitResult {
12+ faces : Array < MLKitDetectFacesResultFace > ;
1113}
1214
1315export interface MLKitDetectFacesOnDeviceOptions extends MLKitOptions {
Original file line number Diff line number Diff line change 11{
22 "name" : " nativescript-plugin-firebase" ,
3- "version" : " 6.0.0 " ,
3+ "version" : " 6.0.1 " ,
44 "description" : " Fire. Base. Firebase!" ,
55 "main" : " firebase" ,
66 "typings" : " index.d.ts" ,
8888 " Google" ,
8989 " AdMob" ,
9090 " Invites" ,
91- " Dynamic Links"
91+ " Dynamic Links" ,
92+ " ML Kit" ,
93+ " Machine Learning"
9294 ],
9395 "author" : {
9496 "name" : " Eddy Verbruggen" ,
You can’t perform that action at this time.
0 commit comments