File size: 7,948 Bytes
a882064
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en-us">
<head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>Huggy</title>
    <link rel="shortcut icon" href="TemplateData/favicon.ico">
    <link rel="stylesheet" href="TemplateData/style.css">
    <style>

        div#discordButton button {

            position: absolute;

            left: 0px;

        }

    </style>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body class="dark">
    <!-- Modal -->
    <div class="modal fade" id="infoModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <img class="modal-title" id="exampleModalLabel" src="./TemplateData/logo.png" alt="logo" style="max-height:200px" class="img-fluid" />
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <h3> What is Huggy 🐢? </h3>
                    <p> Huggy is a dog that <b>learned how to catch the stick with deep reinforcement learning</b> - throw the stick to see how he has learned!</p>
                    <p> If you like the game, don't forget to click on the like πŸ’– button.</p>
                    <p>
                        Do you want to learn more about Deep RL? πŸ€–
                        We launched a <b>free class from beginner to expert!</b>
                        πŸ‘‰ <a href="https://forms.gle/iCCam61Q1Hbj4ogV7" target="_blank">Start here</a>
                    </p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success" data-dismiss="modal">Let me play!</button>
                </div>
            </div>
        </div>
    </div>

    <!-- Modal --

        <div class="modal fade" id="infoModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">

          <div class="modal-dialog" role="document">

            <div class="modal-content">

              <div class="modal-header">

                <img class="modal-title" id="exampleModalLabel" src="./TemplateData/logo.png" alt="logo" style="max-height:200px" class="img-fluid"/>

                <button type="button" class="close" data-dismiss="modal" aria-label="Close">

                  <span aria-hidden="true">&times;</span>

                </button>

              </div>

              <div class="modal-body">

                <h1> Huggy does not work on Space for now here's the new link 🐢: <a href="https://singularite.itch.io/huggy" target="_blank">>https://singularite.itch.io/huggy</a> </h1>

                <h3> Huggy does not work on Space for now here's the new link 🐢: <a href="https://singularite.itch.io/huggy" target="_blank">>https://singularite.itch.io/huggy</a> </h3>

                <p> Huggy is a dog that <b>learned how to catch the stick with deep reinforcement learning</b> - throw the stick to see how he has learned!</p>

                <p> If you like the game, don't forget to click on the like πŸ’– button.</p>

                <p> Do you want to learn more about Deep RL? πŸ€–

    We launched a <b>free class from beginner to expert!</b>

    πŸ‘‰ <a href="https://forms.gle/iCCam61Q1Hbj4ogV7" target="_blank">Start here</a>   </p>

              </div>

              <div class="modal-footer">

                <button type="button" class="btn btn-success" data-dismiss="modal">Let me play!</button>

              </div>

            </div>

          </div>

        </div>-->

    <div id="unity-container" class="unity-desktop">
        <canvas id="unity-canvas"></canvas>
    </div>
    <div id="loading-cover" style="display:none;">
        <div id="unity-loading-bar">
            <div id="unity-logo"><img src="logo.png"></div>
            <div id="unity-progress-bar-empty" style="display: none;">
                <div id="unity-progress-bar-full"></div>
            </div>
            <div class="spinner"></div>
        </div>
    </div>
    <div id="unity-fullscreen-button" style="display: none;"></div>
    <script>

        const hideFullScreenButton = "";

        const buildUrl = "Build";

        const loaderUrl = buildUrl + "/Huggy.loader.js";

        const config = {

            dataUrl: buildUrl + "/Huggy.data.unityweb",

            frameworkUrl: buildUrl + "/Huggy.framework.js.unityweb",

            codeUrl: buildUrl + "/Huggy.wasm.unityweb",

            streamingAssetsUrl: "StreamingAssets",

            companyName: "Hugging Face",

            productName: "Huggy",

            productVersion: "0.1",

        };



        const container = document.querySelector("#unity-container");

        const canvas = document.querySelector("#unity-canvas");

        const loadingCover = document.querySelector("#loading-cover");

        const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");

        const progressBarFull = document.querySelector("#unity-progress-bar-full");

        const fullscreenButton = document.querySelector("#unity-fullscreen-button");

        const spinner = document.querySelector('.spinner');



        const canFullscreen = (function () {

            for (const key of [

                'exitFullscreen',

                'webkitExitFullscreen',

                'webkitCancelFullScreen',

                'mozCancelFullScreen',

                'msExitFullscreen',

            ]) {

                if (key in document) {

                    return true;

                }

            }

            return false;

        }());



        if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {

            container.className = "unity-mobile";

            config.devicePixelRatio = 1;

        }

        loadingCover.style.display = "";



        const script = document.createElement("script");

        script.src = loaderUrl;

        script.onload = () => {

            createUnityInstance(canvas, config, (progress) => {

                spinner.style.display = "none";

                progressBarEmpty.style.display = "";

                progressBarFull.style.width = `${100 * progress}%`;

            }).then((unityInstance) => {

                loadingCover.style.display = "none";

                if (canFullscreen) {

                    if (!hideFullScreenButton) {

                        fullscreenButton.style.display = "";

                    }

                    fullscreenButton.onclick = () => {

                        unityInstance.SetFullscreen(1);

                    };

                }

            }).catch((message) => {

                alert(message);

            });

        };

        document.body.appendChild(script);

    </script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF" crossorigin="anonymous"></script>
    <script>

        $(document).ready(function () {

            $("#infoModal").modal('show');

        });

    </script>
</body>
</html>