forked from InfiniBrains/MedicalImageViewer
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ e62d37d 🚀
- Loading branch information
0 parents
commit 2f81ae0
Showing
10 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Keys":["com.unity.services.core.version","com.unity.services.core.initializer-assembly-qualified-names","com.unity.services.core.all-package-names"],"Values":[{"m_Value":"1.6.0","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":"com.unity.services.core","m_IsReadOnly":false}]} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
html { | ||
box-sizing: border-box; | ||
} | ||
*, *:before, *:after { | ||
box-sizing: inherit; | ||
} | ||
html, body { | ||
height: 100%; | ||
} | ||
canvas { | ||
display: block; | ||
} | ||
body { | ||
margin: 0; | ||
} | ||
#unity-container { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
#unity-canvas { | ||
width: 100%; | ||
height: 100%; | ||
background: #231F20; | ||
} | ||
#loading-cover { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
#unity-loading-bar { | ||
flex: 1 1 auto; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
#unity-logo { | ||
text-align: center; | ||
} | ||
#unity-logo img { | ||
max-width: 80%; | ||
} | ||
#unity-progress-bar-empty { | ||
width: 80%; | ||
height: 24px; | ||
margin: 10px 20px 20px 10px; | ||
text-align: left; | ||
border: 1px solid white; | ||
padding: 2px; | ||
} | ||
#unity-progress-bar-full { | ||
width: 0%; | ||
height: 100%; | ||
background: white; | ||
} | ||
.light #unity-progress-bar-empty { | ||
border-color: black; | ||
} | ||
.light #unity-progress-bar-full { | ||
background: black; | ||
} | ||
|
||
#unity-fullscreen-button { | ||
position: absolute; | ||
right: 10px; | ||
bottom: 10px; | ||
width: 38px; | ||
height: 38px; | ||
background: url('fullscreen-button.png') no-repeat center; | ||
background-size: contain; | ||
} | ||
|
||
.spinner, | ||
.spinner:after { | ||
border-radius: 50%; | ||
width: 5em; | ||
height: 5em; | ||
} | ||
.spinner { | ||
margin: 10px; | ||
font-size: 10px; | ||
position: relative; | ||
text-indent: -9999em; | ||
border-top: 1.1em solid rgba(255, 255, 255, 0.2); | ||
border-right: 1.1em solid rgba(255, 255, 255, 0.2); | ||
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2); | ||
border-left: 1.1em solid #ffffff; | ||
transform: translateZ(0); | ||
animation: spinner-spin 1.1s infinite linear; | ||
} | ||
@keyframes spinner-spin { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<!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>DocDoViewer</title> | ||
<link rel="shortcut icon" href="TemplateData/favicon.ico"> | ||
<link rel="stylesheet" href="TemplateData/style.css"> | ||
</head> | ||
<body class="dark"> | ||
<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 + "/WebGL.loader.js"; | ||
const config = { | ||
dataUrl: buildUrl + "/WebGL.data.unityweb", | ||
frameworkUrl: buildUrl + "/WebGL.framework.js.unityweb", | ||
codeUrl: buildUrl + "/WebGL.wasm.unityweb", | ||
streamingAssetsUrl: "StreamingAssets", | ||
companyName: "InfiniBrains", | ||
productName: "DocDoViewer", | ||
productVersion: "0.0.19", | ||
}; | ||
|
||
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> | ||
</body> | ||
</html> |