This commit is contained in:
Dragon Fire
2024-03-23 21:09:20 -04:00
parent 5a0dc15fb1
commit 110c30ba67
+1 -1
View File
@@ -46,7 +46,7 @@ module.exports = class AnimeEyesCommand extends Command {
const eyeWidth = face.box.width / 5; const eyeWidth = face.box.width / 5;
const eyeHeight = face.box.height / 5; const eyeHeight = face.box.height / 5;
const leftEyeData = face.keypoints.find(landmark => landmark.name === 'leftEye'); const leftEyeData = face.keypoints.find(landmark => landmark.name === 'leftEye');
ctx.drawImage(rightEye, leftEyeData.x - eyeWidth, leftEyeData.y - eyeHeight, eyeWidth, eyeHeight; ctx.drawImage(rightEye, leftEyeData.x - eyeWidth, leftEyeData.y - eyeHeight, eyeWidth, eyeHeight);
const rightEyeData = face.keypoints.find(landmark => landmark.name === 'rightEye'); const rightEyeData = face.keypoints.find(landmark => landmark.name === 'rightEye');
ctx.drawImage(leftEye, rightEyeData.x - eyeWidth, rightEyeData.y - eyeHeight, eyeWidth, eyeHeight); ctx.drawImage(leftEye, rightEyeData.x - eyeWidth, rightEyeData.y - eyeHeight, eyeWidth, eyeHeight);
} }