This commit is contained in:
Dragon Fire
2021-03-06 12:34:38 -05:00
parent 206ec38659
commit d35ef6d7b2
+2 -2
View File
@@ -48,7 +48,7 @@ module.exports = class EyesCommand extends Command {
for (const face of faces) {
const landmarks = face.landmark;
const leftWidth = landmarks.left_eye_right_corner.x - landmarks.left_eye_left_corner.x;
const leftRatio = eyes.width / leftWidth;
const leftRatio = base.width / leftWidth;
const leftHeight = eyes.height * leftRatio;
ctx.drawImage(
eyes,
@@ -58,7 +58,7 @@ module.exports = class EyesCommand extends Command {
leftHeight
);
const rightWidth = landmarks.right_eye_right_corner.x - landmarks.right_eye_left_corner.x;
const rightRatio = eyes.width / rightWidth;
const rightRatio = base.width / rightWidth;
const rightHeight = eyes.height * rightRatio;
ctx.drawImage(
eyes,