mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 15:57:47 +02:00
Fix
This commit is contained in:
@@ -52,8 +52,8 @@ module.exports = class EyesCommand extends Command {
|
|||||||
const leftHeight = eyes.height * leftRatio;
|
const leftHeight = eyes.height * leftRatio;
|
||||||
ctx.drawImage(
|
ctx.drawImage(
|
||||||
eyes,
|
eyes,
|
||||||
landmarks.left_eye_left_corner.x - leftWidth,
|
landmarks.left_eye_left_corner.x - (leftWidth / 2),
|
||||||
landmarks.left_eye_left_corner.y - (leftHeight / 2) - leftHeight,
|
landmarks.left_eye_left_corner.y - (leftHeight / 2) - (leftHeight / 2),
|
||||||
leftWidth * 2,
|
leftWidth * 2,
|
||||||
leftHeight * 2
|
leftHeight * 2
|
||||||
);
|
);
|
||||||
@@ -62,8 +62,8 @@ module.exports = class EyesCommand extends Command {
|
|||||||
const rightHeight = eyes.height * rightRatio;
|
const rightHeight = eyes.height * rightRatio;
|
||||||
ctx.drawImage(
|
ctx.drawImage(
|
||||||
eyes,
|
eyes,
|
||||||
landmarks.right_eye_left_corner.x - rightWidth,
|
landmarks.right_eye_left_corner.x - (rightWidth / 2),
|
||||||
landmarks.right_eye_left_corner.y - (rightHeight / 2) - rightHeight,
|
landmarks.right_eye_left_corner.y - (rightHeight / 2) - (rightHeight / 2),
|
||||||
rightWidth * 2,
|
rightWidth * 2,
|
||||||
rightHeight * 2
|
rightHeight * 2
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user