webgl_demo / index.html
Severian's picture
Update index.html
6ae8d51 verified
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cymatic Sphere in WebGL</title>
<style>
html, body, canvas {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
background: #000;
}
.divcanvas {
width: 66%;
height: 66%;
position: relative;
}
.playpause {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
font-size: 60px;
display: flex;
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, 0.3);
transition: opacity 0.2s ease-in-out;
}
.playpausehide, .playpause:hover {
opacity: 0;
}
.iframe .divcanvas {
display: block;
}
</style>
</head>
<body onload="main()">
<div class="divcanvas">
<canvas id="canvas"></canvas>
<div class="playpause"></div>
</div>
<!-- webgl-utils provides basic shader compiling and canvas resizing -->
<script src="https://webglfundamentals.org/webgl/resources/webgl-utils.js"></script>
<script src="./test.js"></script>
</body>
</html>