add offscreencanvas typedefs

pull/233/head
Vladimir Mandic 2021-11-26 11:55:52 -05:00
parent 8050f5ed99
commit 33f43137e0
14 changed files with 39 additions and 41 deletions

View File

@ -9,8 +9,9 @@
## Changelog ## 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 - fix face box scaling on detection
- cleanup - cleanup

View File

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

View File

@ -11927,7 +11927,7 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = 0; thetaY = 0;
if (isNaN(thetaZ)) if (isNaN(thetaZ))
thetaZ = 0; thetaZ = 0;
return { pitch: -thetaX, yaw: -thetaY, roll: -thetaZ }; return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
}; };
const meshToEulerAngle = (mesh2) => { const meshToEulerAngle = (mesh2) => {
const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1); const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1);

File diff suppressed because one or more lines are too long

2
dist/human.esm.js vendored
View File

@ -82358,7 +82358,7 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = 0; thetaY = 0;
if (isNaN(thetaZ)) if (isNaN(thetaZ))
thetaZ = 0; thetaZ = 0;
return { pitch: -thetaX, yaw: -thetaY, roll: -thetaZ }; return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
}; };
const meshToEulerAngle = (mesh2) => { const meshToEulerAngle = (mesh2) => {
const radians = (a12, a22, b1, b2) => Math.atan2(b2 - a22, b1 - a12); const radians = (a12, a22, b1, b2) => Math.atan2(b2 - a22, b1 - a12);

File diff suppressed because one or more lines are too long

2
dist/human.js vendored

File diff suppressed because one or more lines are too long

View File

@ -12004,7 +12004,7 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = 0; thetaY = 0;
if (isNaN(thetaZ)) if (isNaN(thetaZ))
thetaZ = 0; thetaZ = 0;
return { pitch: -thetaX, yaw: -thetaY, roll: -thetaZ }; return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
}; };
const meshToEulerAngle = (mesh2) => { const meshToEulerAngle = (mesh2) => {
const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1); const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1);

View File

@ -12005,7 +12005,7 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = 0; thetaY = 0;
if (isNaN(thetaZ)) if (isNaN(thetaZ))
thetaZ = 0; thetaZ = 0;
return { pitch: -thetaX, yaw: -thetaY, roll: -thetaZ }; return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
}; };
const meshToEulerAngle = (mesh2) => { const meshToEulerAngle = (mesh2) => {
const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1); const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1);

2
dist/human.node.js vendored
View File

@ -12004,7 +12004,7 @@ var calculateFaceAngle = (face5, imageSize) => {
thetaY = 0; thetaY = 0;
if (isNaN(thetaZ)) if (isNaN(thetaZ))
thetaZ = 0; thetaZ = 0;
return { pitch: -thetaX, yaw: -thetaY, roll: -thetaZ }; return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };
}; };
const meshToEulerAngle = (mesh2) => { const meshToEulerAngle = (mesh2) => {
const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1); const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1);

View File

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

View File

@ -78,7 +78,7 @@ export const calculateFaceAngle = (face, imageSize): {
if (isNaN(thetaX)) thetaX = 0; if (isNaN(thetaX)) thetaX = 0;
if (isNaN(thetaY)) thetaY = 0; if (isNaN(thetaY)) thetaY = 0;
if (isNaN(thetaZ)) thetaZ = 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 // simple Euler angle calculation based existing 3D mesh
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars // 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: { export declare const version: {
'tfjs-core': string; 'tfjs-core': string;
'tfjs-backend-cpu': string; 'tfjs-backend-cpu': string;

View File

@ -1,25 +1,24 @@
2021-11-24 16:12:45 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.4"} 2021-11-26 11:53:06 INFO:  Application: {"name":"@vladmandic/human","version":"2.5.4"}
2021-11-24 16:12:45 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} 2021-11-26 11:53:06 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true}
2021-11-24 16:12:45 INFO:  Toolchain: {"build":"0.6.4","esbuild":"0.13.15","typescript":"4.5.2","typedoc":"0.22.9","eslint":"8.3.0"} 2021-11-26 11:53:06 INFO:  Toolchain: {"build":"0.6.4","esbuild":"0.13.15","typescript":"4.5.2","typedoc":"0.22.10","eslint":"8.3.0"}
2021-11-24 16:12:45 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} 2021-11-26 11:53:06 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]}
2021-11-24 16:12:45 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} 2021-11-26 11:53:06 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]}
2021-11-24 16:12:45 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275} 2021-11-26 11:53:06 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":102,"outputBytes":1275}
2021-11-24 16:12:45 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":63,"inputBytes":556369,"outputBytes":464672} 2021-11-26 11:53:06 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":63,"inputBytes":556382,"outputBytes":464684}
2021-11-24 16:12:45 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283} 2021-11-26 11:53:06 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":1283}
2021-11-24 16:12:45 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":63,"inputBytes":556377,"outputBytes":464676} 2021-11-26 11:53:06 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":63,"inputBytes":556390,"outputBytes":464688}
2021-11-24 16:12:45 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350} 2021-11-26 11:53:06 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":149,"outputBytes":1350}
2021-11-24 16:12:45 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":63,"inputBytes":556444,"outputBytes":464748} 2021-11-26 11:53:06 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":63,"inputBytes":556457,"outputBytes":464760}
2021-11-24 16:12:45 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652} 2021-11-26 11:53:06 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1063,"outputBytes":1652}
2021-11-24 16:12:45 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912} 2021-11-26 11:53:06 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2326,"outputBytes":912}
2021-11-24 16:12:45 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":63,"inputBytes":556006,"outputBytes":466434} 2021-11-26 11:53:06 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":63,"inputBytes":556019,"outputBytes":466446}
2021-11-24 16:12:46 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2501333} 2021-11-26 11:53:07 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":110,"outputBytes":2501333}
2021-11-24 16:12:46 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":63,"inputBytes":3056427,"outputBytes":1626393} 2021-11-26 11:53:08 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":63,"inputBytes":3056440,"outputBytes":1626399}
2021-11-24 16:12:47 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":63,"inputBytes":3056427,"outputBytes":2974514} 2021-11-26 11:53:08 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":63,"inputBytes":3056440,"outputBytes":2974526}
2021-11-24 16:13:08 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":110} 2021-11-26 11:53:30 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":110}
2021-11-24 16:13:08 WARN:  You are running with an unsupported TypeScript version! TypeDoc supports 4.0, 4.1, 4.2, 4.3, 4.4 2021-11-26 11:53:38 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":52,"generated":true}
2021-11-24 16:13:16 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":52,"generated":true} 2021-11-26 11:53:38 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5864,"outputBytes":4127}
2021-11-24 16:13:16 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5864,"outputBytes":4127} 2021-11-26 11:53:38 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794}
2021-11-24 16:13:16 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":15174,"outputBytes":11794} 2021-11-26 11:54:16 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":94,"errors":0,"warnings":0}
2021-11-24 16:13:55 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":94,"errors":0,"warnings":0} 2021-11-26 11:54:16 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"}
2021-11-24 16:13:55 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} 2021-11-26 11:54:16 INFO:  Done...
2021-11-24 16:13:55 INFO:  Done...