From 94ae6a2d8edbf4c2d091a87b8d8d903f101689b7 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 10 Apr 2021 23:16:06 -0400 Subject: [PATCH] update cdn links --- README.md | 29 ++++++++++++++++++++++------- wiki | 2 +- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c4ee88ae..ba128f5e 100644 --- a/README.md +++ b/README.md @@ -113,16 +113,13 @@ As presented in the demo application... ## Quick Start -Simply load `Human` directly from a CDN in your HTML file: +Simply load `Human` (*IIFE version*) directly from a cloud CDN in your HTML file: +(pick one: `jsdelirv`, `unpkg` or `cdnjs`) ```html -``` - -or - -```html + ``` For details, including how to use `Browser ESM` version or `NodeJS` version of `Human`, see [**Installation**](https://github.com/vladmandic/human/wiki/Install) @@ -154,7 +151,7 @@ function detectVideo() { human.draw.body(outputCanvas, result.body); human.draw.hand(outputCanvas, result.hand); human.draw.gesture(outputCanvas, result.gesture); - // and loop immediate to next frame + // and loop immediate to the next frame requestAnimationFrame(detectVideo); }); } @@ -162,6 +159,24 @@ function detectVideo() { detectVideo(); ``` +or using `async/await`: + +```js +// create instance of human with simple configuration using default values +const config = { backend: 'webgl' }; +const human = new Human(config); + +async function detectVideo() { + const inputVideo = document.getElementById('video-id'); + const outputCanvas = document.getElementById('canvas-id'); + const result = await human.detect(inputVideo); + human.draw.all(outputCanvas, result); + requestAnimationFrame(detectVideo); +} + +detectVideo(); +``` +


## Default models diff --git a/wiki b/wiki index 652dee10..3539f10b 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 652dee1013ae99789199cc229d6652b3323ae7de +Subproject commit 3539f10bcdd6d6d5b68bbca77969825ff8ffe00d