-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (28 loc) · 1.11 KB
/
index.html
File metadata and controls
31 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.8.0/p5.js"></script>
<link rel="stylesheet" type="text/css" href="style.css" />
<meta charset="utf-8" />
<script type="module">
import { mediaPipe } from "./mediaPipe.js";
// this simple script is used to import the functions from mediaPipe.js
// rather than heavily modify mediaPipe.js to work with p5.js
// this is method to expose mediaPipe.js functions to the global scope
// A single object called "mediaPipe" is put into global scope
// within the "mediaPipe" object we can access all the predictions as follows:
// mediaPipe.predictWebcam() <- pass this your video
// mediaPipe.handednesses <- right/left handedness
// mediaPipe.landmarks <- 3d landmarks
// mediaPipe.worldLandmarks <- 3d landmarks in world coordinates
// make mediaPipe available everywhere
window.mediaPipe = mediaPipe;
</script>
</head>
<body>
<main>
<ul id="predictions"></ul>
</main>
<script src="sketch.js"></script>
</body>
</html>