mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-21 04:46:45 -05:00
Upload files to "deepest"
This commit is contained in:
parent
e87a6718cd
commit
6717db2be3
85
deepest/index.html
Normal file
85
deepest/index.html
Normal file
@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Deepest Sword</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
background: #000;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div#gameContainer {
|
||||
background: transparent !important;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
div#gameContainer canvas {
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="gameContainer">
|
||||
<canvas id="unity-canvas"></canvas>
|
||||
<script src="Build/WebBuilds.loader.js"></script>
|
||||
<script>
|
||||
createUnityInstance(document.querySelector("#unity-canvas"), {
|
||||
dataUrl: "Build/WebBuilds.data",
|
||||
frameworkUrl: "Build/WebBuilds.framework.js",
|
||||
codeUrl: "Build/WebBuilds.wasm",
|
||||
streamingAssetsUrl: "StreamingAssets",
|
||||
companyName: "Cosmic Adventure Squad",
|
||||
productName: "Deepest Sword",
|
||||
productVersion: "0.1.5c",
|
||||
}).then(function(instance) {
|
||||
var canvas = instance.Module.canvas;
|
||||
var container = canvas.parentElement;
|
||||
|
||||
function onResize() {
|
||||
var w;
|
||||
var h;
|
||||
|
||||
if (scaleToFit) {
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
|
||||
var r = 540 / 960;
|
||||
|
||||
if (w * r > window.innerHeight) {
|
||||
w = Math.min(w, Math.ceil(h / r));
|
||||
}
|
||||
h = Math.floor(w * r);
|
||||
} else {
|
||||
w = 960;
|
||||
h = 540;
|
||||
}
|
||||
|
||||
container.style.width = canvas.style.width = w + "px";
|
||||
container.style.height = canvas.style.height = h + "px";
|
||||
container.style.top = Math.floor((window.innerHeight - h) / 2) + "px";
|
||||
container.style.left = Math.floor((window.innerWidth - w) / 2) + "px";
|
||||
}
|
||||
|
||||
var scaleToFit;
|
||||
try {
|
||||
scaleToFit = !!JSON.parse("");
|
||||
} catch (e) {
|
||||
scaleToFit = true;
|
||||
}
|
||||
window.addEventListener('resize', onResize);
|
||||
onResize();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user