add offscreencanvas typedefs

pull/356/head
Vladimir Mandic 2021-11-26 11:55:52 -05:00
parent a90e8ee723
commit 5ed2e15a4e
5 changed files with 5 additions and 6 deletions

View File

@ -9,8 +9,9 @@
## Changelog
### **HEAD -> main** 2021/11/23 mandic00@live.com
### **HEAD -> main** 2021/11/24 mandic00@live.com
- release preview
- fix face box scaling on detection
- cleanup

View File

@ -1,7 +1,7 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "types/lib/src/human.d.ts",
"bundledPackages": ["@tensorflow/tfjs-core", "@tensorflow/tfjs-converter"],
"bundledPackages": ["@tensorflow/tfjs-core", "@tensorflow/tfjs-converter", "@types/offscreencanvas"],
"compiler": {
"skipLibCheck": false
},

View File

@ -86,7 +86,7 @@
"rimraf": "^3.0.2",
"seedrandom": "^3.0.5",
"tslib": "^2.3.1",
"typedoc": "0.22.9",
"typedoc": "0.22.10",
"typescript": "4.5.2"
}
}

View File

@ -78,7 +78,7 @@ export const calculateFaceAngle = (face, imageSize): {
if (isNaN(thetaX)) thetaX = 0;
if (isNaN(thetaY)) thetaY = 0;
if (isNaN(thetaZ)) thetaZ = 0;
return { pitch: -thetaX, yaw: -thetaY, roll: -thetaZ };
return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
};
// simple Euler angle calculation based existing 3D mesh
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars

View File

@ -1,5 +1,3 @@
/// <reference types="offscreencanvas" />
export declare const version: {
'tfjs-core': string;
'tfjs-backend-cpu': string;