Spaces:
Running
Running
Upload 9 files
Browse files- index.apple-touch-icon.png +0 -0
- index.audio.worklet.js +2 -2
- index.html +60 -60
- index.icon.png +0 -0
- index.js +0 -0
- index.pck +0 -0
- index.wasm +2 -2
index.apple-touch-icon.png
CHANGED
index.audio.worklet.js
CHANGED
@@ -167,7 +167,7 @@ class GodotProcessor extends AudioWorkletProcessor {
|
|
167 |
GodotProcessor.write_input(this.input_buffer, input);
|
168 |
this.input.write(this.input_buffer);
|
169 |
} else {
|
170 |
-
this.port.postMessage('Input buffer is full! Skipping input frame.');
|
171 |
}
|
172 |
}
|
173 |
const process_output = GodotProcessor.array_has_data(outputs);
|
@@ -184,7 +184,7 @@ class GodotProcessor extends AudioWorkletProcessor {
|
|
184 |
this.port.postMessage({ 'cmd': 'read', 'data': chunk });
|
185 |
}
|
186 |
} else {
|
187 |
-
this.port.postMessage('Output buffer has not enough frames! Skipping output frame.');
|
188 |
}
|
189 |
}
|
190 |
this.process_notify();
|
|
|
167 |
GodotProcessor.write_input(this.input_buffer, input);
|
168 |
this.input.write(this.input_buffer);
|
169 |
} else {
|
170 |
+
// this.port.postMessage('Input buffer is full! Skipping input frame.'); // Uncomment this line to debug input buffer.
|
171 |
}
|
172 |
}
|
173 |
const process_output = GodotProcessor.array_has_data(outputs);
|
|
|
184 |
this.port.postMessage({ 'cmd': 'read', 'data': chunk });
|
185 |
}
|
186 |
} else {
|
187 |
+
// this.port.postMessage('Output buffer has not enough frames! Skipping output frame.'); // Uncomment this line to debug output buffer.
|
188 |
}
|
189 |
}
|
190 |
this.process_notify();
|
index.html
CHANGED
@@ -1,61 +1,61 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html>
|
3 |
-
<head>
|
4 |
-
<title>My Template</title>
|
5 |
-
<meta charset="UTF-8">
|
6 |
-
<script src="https://unpkg.com/es-module-shims@1.7.0/dist/es-module-shims.js"></script>
|
7 |
-
<script type="importmap">
|
8 |
-
{
|
9 |
-
"imports": {
|
10 |
-
"@huggingface/hub": "https://cdn.jsdelivr.net/npm/@huggingface/hub@0.13.0/+esm"
|
11 |
-
}
|
12 |
-
}
|
13 |
-
</script>
|
14 |
-
</head>
|
15 |
-
<body>
|
16 |
-
<canvas id="canvas"></canvas>
|
17 |
-
|
18 |
-
<script type="module">
|
19 |
-
window.test = {}
|
20 |
-
//console.log(window.test)
|
21 |
-
</script>
|
22 |
-
<script type="module">
|
23 |
-
import { oauthLoginUrl, oauthHandleRedirectIfPresent } from "@huggingface/hub";
|
24 |
-
|
25 |
-
//console.log(window.huggingface)
|
26 |
-
|
27 |
-
window.signin_huggingface = async function signin_huggingface() {
|
28 |
-
console.log("signin_huggingface called")
|
29 |
-
// prompt=consent to re-trigger the consent screen instead of silently redirecting
|
30 |
-
window.location.href = (await oauthLoginUrl({scopes: window.huggingface.variables.OAUTH_SCOPES})) + "&prompt=consent";
|
31 |
-
}
|
32 |
-
|
33 |
-
async function signout_hugginfface() {
|
34 |
-
localStorage.removeItem("oauth");
|
35 |
-
window.location.href = window.location.href.replace(/\?.*$/, '');
|
36 |
-
window.location.reload();
|
37 |
-
}
|
38 |
-
async function get_huggingface_oauth(_js_callback){
|
39 |
-
console.log("huggingface env", window.huggingface);
|
40 |
-
|
41 |
-
let oauthResult = localStorage.getItem("oauth");
|
42 |
-
|
43 |
-
if (oauthResult) {
|
44 |
-
try {
|
45 |
-
oauthResult = JSON.parse(oauthResult);
|
46 |
-
} catch {
|
47 |
-
oauthResult = null;
|
48 |
-
}
|
49 |
-
}
|
50 |
-
oauthResult ||= await oauthHandleRedirectIfPresent();
|
51 |
-
_js_callback(oauthResult)
|
52 |
-
}
|
53 |
-
</script>
|
54 |
-
|
55 |
-
<script src="index.js"></script>
|
56 |
-
<script>
|
57 |
-
var engine = new Engine({"args":[],"canvasResizePolicy":2,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":
|
58 |
-
engine.startGame();
|
59 |
-
</script>
|
60 |
-
</body>
|
61 |
</html>
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>My Template</title>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<script src="https://unpkg.com/es-module-shims@1.7.0/dist/es-module-shims.js"></script>
|
7 |
+
<script type="importmap">
|
8 |
+
{
|
9 |
+
"imports": {
|
10 |
+
"@huggingface/hub": "https://cdn.jsdelivr.net/npm/@huggingface/hub@0.13.0/+esm"
|
11 |
+
}
|
12 |
+
}
|
13 |
+
</script>
|
14 |
+
</head>
|
15 |
+
<body>
|
16 |
+
<canvas id="canvas"></canvas>
|
17 |
+
|
18 |
+
<script type="module">
|
19 |
+
window.test = {}
|
20 |
+
//console.log(window.test)
|
21 |
+
</script>
|
22 |
+
<script type="module">
|
23 |
+
import { oauthLoginUrl, oauthHandleRedirectIfPresent } from "@huggingface/hub";
|
24 |
+
|
25 |
+
//console.log(window.huggingface)
|
26 |
+
|
27 |
+
window.signin_huggingface = async function signin_huggingface() {
|
28 |
+
console.log("signin_huggingface called")
|
29 |
+
// prompt=consent to re-trigger the consent screen instead of silently redirecting
|
30 |
+
window.location.href = (await oauthLoginUrl({scopes: window.huggingface.variables.OAUTH_SCOPES})) + "&prompt=consent";
|
31 |
+
}
|
32 |
+
|
33 |
+
async function signout_hugginfface() {
|
34 |
+
localStorage.removeItem("oauth");
|
35 |
+
window.location.href = window.location.href.replace(/\?.*$/, '');
|
36 |
+
window.location.reload();
|
37 |
+
}
|
38 |
+
async function get_huggingface_oauth(_js_callback){
|
39 |
+
console.log("huggingface env", window.huggingface);
|
40 |
+
|
41 |
+
let oauthResult = localStorage.getItem("oauth");
|
42 |
+
|
43 |
+
if (oauthResult) {
|
44 |
+
try {
|
45 |
+
oauthResult = JSON.parse(oauthResult);
|
46 |
+
} catch {
|
47 |
+
oauthResult = null;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
oauthResult ||= await oauthHandleRedirectIfPresent();
|
51 |
+
_js_callback(oauthResult)
|
52 |
+
}
|
53 |
+
</script>
|
54 |
+
|
55 |
+
<script src="index.js"></script>
|
56 |
+
<script>
|
57 |
+
var engine = new Engine({"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":234160,"index.wasm":35372023},"focusCanvas":true,"gdextensionLibs":[]});
|
58 |
+
engine.startGame();
|
59 |
+
</script>
|
60 |
+
</body>
|
61 |
</html>
|
index.icon.png
CHANGED
index.js
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
index.pck
CHANGED
Binary files a/index.pck and b/index.pck differ
|
|
index.wasm
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0cfd538cbf628a5626cd48db5e4ec7f883dcc22e1548b06fbe01b3450db316b9
|
3 |
+
size 35372023
|