-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
35 lines (34 loc) · 908 Bytes
/
index.html
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
32
33
34
35
<!DOCTYPE html>
<html lang="en" class="full">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ray Tracing WebGPU</title>
<style>
.full {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: fixed;
border: 0;
outline: 0;
margin: 0;
}
</style>
</head>
<body class="full">
<canvas id="mainCanvas" class="full"></canvas>
<script>
var canvas = document.getElementById('mainCanvas');
// canvas.width = window.innerWidth * window.devicePixelRatio;
// canvas.height = window.innerHeight * window.devicePixelRatio;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
canvas.addEventListener('mousedown', (e) => {
console.log(e.clientX, e.clientY);
})
</script>
<script type="module" src="/demo/index.ts"></script>
</body>
</html>