Spaces:
Running
Running
Add Unity WebGL build files
Browse files- Build/Retro-to-3D.data +2 -2
- index.html +15 -75
Build/Retro-to-3D.data
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:1f45ed1b57a20af5db17284f0cdbcd4ea9f9917cdb4fbfa912a488e7f718216e
|
| 3 |
+
size 83131642
|
index.html
CHANGED
|
@@ -25,85 +25,25 @@
|
|
| 25 |
</div>
|
| 26 |
<div id="unity-fullscreen-button" style="display: none;"></div>
|
| 27 |
<script>
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
const loaderUrl = buildUrl + "/Retro-to-3D.loader.js";
|
| 31 |
-
const config = {
|
| 32 |
-
dataUrl: buildUrl + "/Retro-to-3D.data",
|
| 33 |
-
frameworkUrl: buildUrl + "/Retro-to-3D.framework.js",
|
| 34 |
-
codeUrl: buildUrl + "/Retro-to-3D.wasm",
|
| 35 |
-
streamingAssetsUrl: "StreamingAssets",
|
| 36 |
-
companyName: "ilumine AI",
|
| 37 |
-
productName: "Pj - 2D-to-3D",
|
| 38 |
-
productVersion: "0.1.12",
|
| 39 |
-
};
|
| 40 |
-
|
| 41 |
-
const container = document.querySelector("#unity-container");
|
| 42 |
-
const canvas = document.querySelector("#unity-canvas");
|
| 43 |
-
const loadingCover = document.querySelector("#loading-cover");
|
| 44 |
-
const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");
|
| 45 |
-
const progressBarFull = document.querySelector("#unity-progress-bar-full");
|
| 46 |
-
const fullscreenButton = document.querySelector("#unity-fullscreen-button");
|
| 47 |
-
const spinner = document.querySelector('.spinner');
|
| 48 |
-
|
| 49 |
-
const canFullscreen = (function () {
|
| 50 |
-
for (const key of [
|
| 51 |
-
'exitFullscreen',
|
| 52 |
-
'webkitExitFullscreen',
|
| 53 |
-
'webkitCancelFullScreen',
|
| 54 |
-
'mozCancelFullScreen',
|
| 55 |
-
'msExitFullscreen',
|
| 56 |
-
]) {
|
| 57 |
-
if (key in document) {
|
| 58 |
-
return true;
|
| 59 |
-
}
|
| 60 |
-
}
|
| 61 |
-
return false;
|
| 62 |
-
}());
|
| 63 |
-
|
| 64 |
-
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
| 65 |
-
container.className = "unity-mobile";
|
| 66 |
-
config.devicePixelRatio = 1;
|
| 67 |
-
}
|
| 68 |
-
loadingCover.style.display = "";
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
}).then((unityInstance) => {
|
| 78 |
-
loadingCover.style.display = "none";
|
| 79 |
-
if (canFullscreen) {
|
| 80 |
-
if (!hideFullScreenButton) {
|
| 81 |
-
fullscreenButton.style.display = "";
|
| 82 |
}
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
}
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
});
|
| 90 |
-
};
|
| 91 |
-
document.body.appendChild(script);
|
| 92 |
</script>
|
| 93 |
-
|
| 94 |
-
function readFromClipboard() {
|
| 95 |
-
navigator.clipboard.readText().then(
|
| 96 |
-
function (text) {
|
| 97 |
-
if (typeof UnityInstance !== 'undefined') {
|
| 98 |
-
UnityInstance.SendMessage('ClipboardManager', 'OnTextPasted', text);
|
| 99 |
-
}
|
| 100 |
-
},
|
| 101 |
-
function (err) {
|
| 102 |
-
console.error('Error al leer del portapapeles: ', err);
|
| 103 |
-
}
|
| 104 |
-
);
|
| 105 |
-
}
|
| 106 |
-
</script>
|
| 107 |
</body>
|
| 108 |
|
| 109 |
</html>
|
|
|
|
| 25 |
</div>
|
| 26 |
<div id="unity-fullscreen-button" style="display: none;"></div>
|
| 27 |
<script>
|
| 28 |
+
// ... (Tu código JavaScript existente está aquí) ...
|
| 29 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
+
<!-- Aquí es donde hemos insertado el nuevo script -->
|
| 32 |
+
<script type="text/javascript">
|
| 33 |
+
function readFromClipboard() {
|
| 34 |
+
navigator.clipboard.readText().then(
|
| 35 |
+
function (text) {
|
| 36 |
+
if (typeof UnityInstance !== 'undefined') {
|
| 37 |
+
UnityInstance.SendMessage('ClipboardManager', 'OnTextPasted', text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
}
|
| 39 |
+
},
|
| 40 |
+
function (err) {
|
| 41 |
+
console.error('Error al leer del portapapeles: ', err);
|
| 42 |
}
|
| 43 |
+
);
|
| 44 |
+
}
|
|
|
|
|
|
|
|
|
|
| 45 |
</script>
|
| 46 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
</body>
|
| 48 |
|
| 49 |
</html>
|