DiamondYin commited on
Commit
e1cdfcb
1 Parent(s): cc7c303

“gitcommit”

Browse files
StreamingAssets/UnityServicesProjectConfiguration.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Keys":["com.unity.services.core.environment-name","com.unity.services.core.version","com.unity.services.core.initializer-assembly-qualified-names","com.unity.services.analytics.version","com.unity.services.analytics.initializer-assembly-qualified-names","com.unity.purchasing.version","com.unity.purchasing.initializer-assembly-qualified-names","com.unity.services.core.all-package-names","com.unity.services.core.cloud-environment"],"Values":[{"m_Value":"production","m_IsReadOnly":false},{"m_Value":"1.10.1","m_IsReadOnly":true},{"m_Value":"Unity.Services.Core.Registration.CorePackageInitializer, Unity.Services.Core.Registration, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"4.4.0","m_IsReadOnly":true},{"m_Value":"Ua2CoreInitializeCallback, Unity.Services.Analytics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"4.9.3","m_IsReadOnly":true},{"m_Value":"UnityEngine.Purchasing.Registration.IapCoreInitializeCallback, UnityEngine.Purchasing.Stores, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null","m_IsReadOnly":true},{"m_Value":"com.unity.services.core;com.unity.services.analytics;com.unity.purchasing","m_IsReadOnly":false},{"m_Value":"production","m_IsReadOnly":false}]}
TemplateData/MemoryProfiler.png ADDED
TemplateData/favicon.ico ADDED
TemplateData/fullscreen-button.png ADDED
TemplateData/progress-bar-empty-dark.png ADDED
TemplateData/progress-bar-empty-light.png ADDED
TemplateData/progress-bar-full-dark.png ADDED
TemplateData/progress-bar-full-light.png ADDED
TemplateData/style.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body { padding: 0; margin: 0 }
2
+ #unity-container { position: absolute }
3
+ #unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
4
+ #unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
5
+ #unity-canvas { background: #231F20 }
6
+ .unity-mobile #unity-canvas { width: 100%; height: 100% }
7
+ #unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
8
+ #unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
9
+ #unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
10
+ #unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
11
+ #unity-footer { position: relative }
12
+ .unity-mobile #unity-footer { display: none }
13
+ #unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
14
+ #unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
15
+ #unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
16
+ #unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
TemplateData/unity-logo-dark.png ADDED
TemplateData/unity-logo-light.png ADDED
TemplateData/webgl-logo.png ADDED
TemplateData/webmemd-icon.png ADDED
index.html CHANGED
@@ -1,19 +1,122 @@
1
  <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>hello,I'm yin. You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!DOCTYPE html>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
+ <title>Unity WebGL Player | New Unity Project</title>
7
+ <link rel="shortcut icon" href="TemplateData/favicon.ico">
8
+ <link rel="stylesheet" href="TemplateData/style.css">
9
+ </head>
10
+ <body>
11
+ <div id="unity-container" class="unity-desktop">
12
+ <canvas id="unity-canvas" width=960 height=600 tabindex="-1"></canvas>
13
+ <div id="unity-loading-bar">
14
+ <div id="unity-logo"></div>
15
+ <div id="unity-progress-bar-empty">
16
+ <div id="unity-progress-bar-full"></div>
17
+ </div>
18
+ </div>
19
+ <div id="unity-warning"> </div>
20
+ <div id="unity-footer">
21
+ <div id="unity-webgl-logo"></div>
22
+ <div id="unity-fullscreen-button"></div>
23
+ <div id="unity-build-title">New Unity Project</div>
24
+ </div>
25
+ </div>
26
+ <script>
27
+
28
+ var container = document.querySelector("#unity-container");
29
+ var canvas = document.querySelector("#unity-canvas");
30
+ var loadingBar = document.querySelector("#unity-loading-bar");
31
+ var progressBarFull = document.querySelector("#unity-progress-bar-full");
32
+ var fullscreenButton = document.querySelector("#unity-fullscreen-button");
33
+ var warningBanner = document.querySelector("#unity-warning");
34
+
35
+ // Shows a temporary message banner/ribbon for a few seconds, or
36
+ // a permanent error message on top of the canvas if type=='error'.
37
+ // If type=='warning', a yellow highlight color is used.
38
+ // Modify or remove this function to customize the visually presented
39
+ // way that non-critical warnings and error messages are presented to the
40
+ // user.
41
+ function unityShowBanner(msg, type) {
42
+ function updateBannerVisibility() {
43
+ warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
44
+ }
45
+ var div = document.createElement('div');
46
+ div.innerHTML = msg;
47
+ warningBanner.appendChild(div);
48
+ if (type == 'error') div.style = 'background: red; padding: 10px;';
49
+ else {
50
+ if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
51
+ setTimeout(function() {
52
+ warningBanner.removeChild(div);
53
+ updateBannerVisibility();
54
+ }, 5000);
55
+ }
56
+ updateBannerVisibility();
57
+ }
58
+
59
+ var buildUrl = "Build";
60
+ var loaderUrl = buildUrl + "/WaliwebGLgameFPS.loader.js";
61
+ var config = {
62
+ dataUrl: buildUrl + "/WaliwebGLgameFPS.data",
63
+ frameworkUrl: buildUrl + "/WaliwebGLgameFPS.framework.js",
64
+ codeUrl: buildUrl + "/WaliwebGLgameFPS.wasm",
65
+ streamingAssetsUrl: "StreamingAssets",
66
+ companyName: "DefaultCompany",
67
+ productName: "New Unity Project",
68
+ productVersion: "0.1",
69
+ showBanner: unityShowBanner,
70
+ };
71
+
72
+ // By default Unity keeps WebGL canvas render target size matched with
73
+ // the DOM size of the canvas element (scaled by window.devicePixelRatio)
74
+ // Set this to false if you want to decouple this synchronization from
75
+ // happening inside the engine, and you would instead like to size up
76
+ // the canvas DOM size and WebGL render target sizes yourself.
77
+ // config.matchWebGLToCanvasSize = false;
78
+
79
+ if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
80
+ // Mobile device style: fill the whole browser client area with the game canvas:
81
+
82
+ var meta = document.createElement('meta');
83
+ meta.name = 'viewport';
84
+ meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
85
+ document.getElementsByTagName('head')[0].appendChild(meta);
86
+ container.className = "unity-mobile";
87
+ canvas.className = "unity-mobile";
88
+
89
+ // To lower canvas resolution on mobile devices to gain some
90
+ // performance, uncomment the following line:
91
+ // config.devicePixelRatio = 1;
92
+
93
+
94
+ } else {
95
+ // Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
96
+
97
+ canvas.style.width = "960px";
98
+ canvas.style.height = "600px";
99
+ }
100
+
101
+ loadingBar.style.display = "block";
102
+
103
+ var script = document.createElement("script");
104
+ script.src = loaderUrl;
105
+ script.onload = () => {
106
+ createUnityInstance(canvas, config, (progress) => {
107
+ progressBarFull.style.width = 100 * progress + "%";
108
+ }).then((unityInstance) => {
109
+ loadingBar.style.display = "none";
110
+ fullscreenButton.onclick = () => {
111
+ unityInstance.SetFullscreen(1);
112
+ };
113
+ }).catch((message) => {
114
+ alert(message);
115
+ });
116
+ };
117
+
118
+ document.body.appendChild(script);
119
+
120
+ </script>
121
+ </body>
122
  </html>