added meme
This commit is contained in:
@@ -29,6 +29,8 @@
|
|||||||
<body>
|
<body>
|
||||||
<script src="sketch.js"></script>
|
<script src="sketch.js"></script>
|
||||||
<h1 style="color: white;" id="detector">No uwu detected</h1>
|
<h1 style="color: white;" id="detector">No uwu detected</h1>
|
||||||
|
<img src='https://gcdn.thunderstore.io/live/repository/icons/qwq_cloud-Boykisser_uwu_Suit-1.1.2.png.256x256_q95.png'
|
||||||
|
style="display: none;" id='meme' />
|
||||||
<h2 id="debug"></h2>
|
<h2 id="debug"></h2>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -29,15 +29,18 @@ function draw() {
|
|||||||
rightHand.index_finger_tip.x, rightHand.index_finger_tip.y
|
rightHand.index_finger_tip.x, rightHand.index_finger_tip.y
|
||||||
);
|
);
|
||||||
if (fDist < 50 && leftHand.thumb_tip.y < leftHand.index_finger_tip.y && rightHand.thumb_tip.y < rightHand.index_finger_tip.y) {
|
if (fDist < 50 && leftHand.thumb_tip.y < leftHand.index_finger_tip.y && rightHand.thumb_tip.y < rightHand.index_finger_tip.y) {
|
||||||
detector.innerText = "uwu\n👉👈";
|
detector.innerHTML = "uwu\n👉👈";
|
||||||
|
meme.style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
detector.innerText = "No uwu detected";
|
detector.innerHTML = "No uwu detected";
|
||||||
|
meme.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
detector.innerText = "No uwu detected";
|
detector.innerHTML = "No uwu detected";
|
||||||
|
meme.style.display = 'none';
|
||||||
}
|
}
|
||||||
// debug.innerText = `Hands detected: ${hands.length}\ndistance: ${hands.length == 2 ? fDist : "N/A"}`;
|
// debug.innerHTML = `Hands detected: ${hands.length}\ndistance: ${hands.length == 2 ? fDist : "N/A"}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const clamp = (min, num, max) => Math.min(Math.max(num, min), max);
|
const clamp = (min, num, max) => Math.min(Math.max(num, min), max);
|
||||||
Reference in New Issue
Block a user