mirror of https://github.com/vladmandic/human
disable use of path2d in node
parent
4ed8c9c190
commit
7a1707cf18
|
@ -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
|
||||
|
|
|
@ -278,7 +278,7 @@ export async function face(inCanvas: AnyCanvas, result: Array<FaceResult>, 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);
|
||||
|
|
Loading…
Reference in New Issue