diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d558277..791fbd27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ### **HEAD -> main** 2021/11/09 mandic00@live.com +- add liveness module and facerecognition demo +- initial version of facerecognition demo - rebuild - add type defs when working with relative path imports - disable humangl backend if webgl 1.0 is detected diff --git a/src/util/draw.ts b/src/util/draw.ts index 96b963cf..5f2cabee 100644 --- a/src/util/draw.ts +++ b/src/util/draw.ts @@ -278,7 +278,7 @@ export async function face(inCanvas: AnyCanvas, result: Array, drawO ctx.fill(); } } - if (localOptions.drawGaze && f.rotation?.angle) { + if (localOptions.drawGaze && f.rotation?.angle && typeof Path2D !== 'undefined') { ctx.strokeStyle = 'pink'; const valX = (f.box[0] + f.box[2] / 2) - (f.box[3] * rad2deg(f.rotation.angle.yaw) / 90); const valY = (f.box[1] + f.box[3] / 2) + (f.box[2] * rad2deg(f.rotation.angle.pitch) / 90);