File size: 1,471 Bytes
96e7bf7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Learn WebGL</title>
</head>
<style>
    html,
    body,
    canvas {
        height: 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0
    }

    .divcanvas {
        width: 66%;
        height: 66%;
        position: relative;
    }

    .playpause {
        position: absolute;
        left: 0px;
        top: 0px;
        width: 100%;
        height: 100%;
        font-size: 60px;
        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>

<body onload="main()">
    <div class="divcanvas">
        <canvas id="canvas"></canvas>
        <div class="playpause"></div>
    </div>
</body>
<!--
for most samples webgl-utils only provides shader compiling/linking and
canvas resizing because why clutter the examples with code that's the same in every sample.
See https://webglfundamentals.org/webgl/lessons/webgl-boilerplate.html
and https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
for webgl-utils, m3, m4, and webgl-lessons-ui.
-->
<script src="https://webglfundamentals.org/webgl/resources/webgl-utils.js"></script>
<script src="./test.js"></script>

</html>