add experimental webgu demo

pull/280/head
Vladimir Mandic 2021-08-14 13:39:26 -04:00
parent df58810073
commit 6f5d4d2fe2
2 changed files with 2 additions and 3 deletions

View File

@ -11,9 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
### **HEAD -> main** 2021/08/14 mandic00@live.com
### **origin/main** 2021/08/13 mandic00@live.com
- complete async work
- list detect cameras
- switch to async data reads

View File

@ -7,6 +7,7 @@ import type { Result, Face, Body, Hand, Item, Gesture, Person } from './result';
const bufferedResult: Result = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0 };
export function calc(newResult: Result): Result {
if (!newResult) return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0 };
// each record is only updated using deep clone when number of detected record changes, otherwise it will converge by itself
// otherwise bufferedResult is a shallow clone of result plus updated local calculated values
// thus mixing by-reference and by-value assignments to minimize memory operations