-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathembed.html
42 lines (30 loc) · 1.03 KB
/
embed.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
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<title>Portality Splat Viewer</title>
<link rel="stylesheet" href="styles.css">
<meta name="viewport" content="width=device-width, user-scalable=no">
</head>
<body>
<div id="canvas-container">
<canvas id="gl-canvas" style="width: 100%; height:100%;"></canvas>
<div id="loadingSymbol" style="display: none;">
<img src="img/rotating.svg" alt="Loading..." />
</div>
</div>
</body>
<script type="module">
import './3rdparty/interact.min.js';
import { readParams } from './gausssplatrenderer.js';
// Function to resize the canvas to full window size
function resizeCanvas() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
let canvas = document.getElementById("gl-canvas");
// Listen for window resize events
window.addEventListener('resize', resizeCanvas);
resizeCanvas(); // Initial resize
readParams(new URLSearchParams(window.location.search), canvas, interact);
</script>
</html>