-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
692 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,64 @@ | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
overflow: hidden; | ||
background: #000000; | ||
} | ||
|
||
#unity-container { | ||
width: 100vw; | ||
height: 100vh; | ||
padding: 0; | ||
margin: 0 | ||
} | ||
|
||
#unity-container.unity-desktop { | ||
width: 100vw; | ||
height: 100vh | ||
} | ||
|
||
#unity-container.unity-mobile { | ||
width: 100vw; | ||
height: 100vh | ||
} | ||
|
||
#unity-canvas { | ||
background: #000000; | ||
width: 100vw; | ||
height: 100vh; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.unity-mobile #unity-canvas { | ||
width: 100vw; | ||
height: 100vh | ||
} | ||
|
||
#unity-loading-bar { | ||
position: absolute; | ||
left: 50%; | ||
top: 50%; | ||
transform: translate(-50%, -50%); | ||
display: none | ||
} | ||
|
||
#unity-logo { | ||
width: 154px; | ||
height: 130px; | ||
background: url('game_icon.png') no-repeat center | ||
} | ||
|
||
#unity-progress-bar-empty { | ||
width: 141px; | ||
height: 18px; | ||
margin-top: 10px; | ||
background: url('progress-bar-empty-dark.png') no-repeat center | ||
} | ||
|
||
#unity-progress-bar-full { | ||
width: 0%; | ||
height: 18px; | ||
margin-top: 10px; | ||
background: url('progress-bar-full-dark.png') no-repeat center | ||
} |
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,158 @@ | ||
|
||
#file_uploader { | ||
position: absolute; | ||
pointer-events: none; | ||
top: 0px; | ||
} | ||
#file_uploader.isDropInput { | ||
left: 1px; | ||
right: 4px; | ||
height: 200px; | ||
} | ||
#file_uploader.isButtonInput { | ||
width: 100%; | ||
height: 50px; | ||
} | ||
#file_uploader.overlay_canvas { | ||
position: absolute; | ||
top: 0%; | ||
left: 0%; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 2147483647; | ||
} | ||
#file_uploader.hidden { | ||
/*visibility: hidden;*/ /* cannot see but occupy */ | ||
display: none; /* take no place */ | ||
} | ||
|
||
#popup_dialog_warp { | ||
position: fixed; | ||
top: 0%; | ||
left: 0%; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 2147483647; | ||
background-color: rgba(0, 0, 0,0.8); | ||
} | ||
#popup_dialog { | ||
position:relative; | ||
background:#ffffff; | ||
-moz-border-radius: 5px; | ||
-webkit-border-radius: 5px; | ||
border-radius: 5px; | ||
padding: 10px; | ||
top:50%; | ||
left: 50%; | ||
-webkit-transform: translate(-50%, 0%); | ||
transform: translate(-50%, -50%); | ||
width: 50%; | ||
text-align: center; | ||
} | ||
|
||
|
||
#file_uploader_file_list.hidden { | ||
/*visibility: hidden;*/ /* cannot see but occupy */ | ||
display: none; /* take no place */ | ||
} | ||
|
||
#file_drop_area { | ||
pointer-events: auto; | ||
border: 2px dashed #ffffff; | ||
-moz-border-radius: 5px; | ||
-webkit-border-radius: 5px; | ||
border-radius: 5px; | ||
text-align: center; | ||
font: 20pt bold 'Vollkorn'; | ||
color: #ffffff; | ||
back-ground-color: rgb(192,192,0); | ||
|
||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
line-height: 200px; | ||
background-color: rgba(0, 0, 0,0.75); | ||
} | ||
#file_drop_area.overlay { | ||
top: 100%; | ||
left: 0%; | ||
-webkit-transform: translate(0%, -100%); | ||
transform: translate(0%, -100%); | ||
width: 100%; | ||
height: 98px; | ||
} | ||
#file_drop_area.onDragOver { | ||
border: 2px dashed rgb(192,192,0); | ||
color: rgb(192,192,0); | ||
} | ||
#file_drop_area.disable { | ||
pointer-events: none; | ||
opacity: 0.6; | ||
} | ||
|
||
#file_input_button { | ||
pointer-events: auto; | ||
overflow: hidden; | ||
text-align: center; | ||
color: white; | ||
background-color: #f00; | ||
border-radius: 8px; | ||
box-shadow:2px 2px 2px #555; | ||
transition: background-color 0.2s; | ||
|
||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
-webkit-transform: translate(-50%, -50%); | ||
transform: translate(-50%, -50%); | ||
width: 350px; | ||
height: 50px; | ||
line-height: 50px; | ||
cursor:pointer; | ||
} | ||
#file_input_button.overlay { | ||
top: 0%; | ||
left: 0%; | ||
-webkit-transform: translate(0%, 0%); | ||
transform: translate(0%, 0%); | ||
} | ||
#file_input_button:hover { | ||
color: white; | ||
background-color: #a00; | ||
transition: background-color 0.5s; | ||
} | ||
#file_input_button.disable { | ||
pointer-events: none; | ||
opacity: 0.6; | ||
} | ||
|
||
#file_input_description { | ||
padding: 0px 10px; | ||
} | ||
#popup_dialog_file_input_button_warp { | ||
height: 80px; | ||
} | ||
#popup_dialog_file_input_button { | ||
overflow: hidden; | ||
text-align: center; | ||
color: white; | ||
background-color: #f00; | ||
border-radius: 8px; | ||
box-shadow:2px 2px 2px #555; | ||
transition: background-color 0.2s; | ||
|
||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
-webkit-transform: translate(-50%, -50%); | ||
transform: translate(-50%, -50%); | ||
width: 300px; | ||
height: 50px; | ||
line-height: 50px; | ||
cursor:pointer; | ||
} | ||
#popup_dialog_file_file_input_button:hover { | ||
color: white; | ||
background-color: #a00; | ||
transition: background-color 0.5s; | ||
} |
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,74 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>LightMaterialulator</title> | ||
<link rel="shortcut icon" href="TemplateData/favicon.ico"> | ||
<link rel="stylesheet" href="TemplateData/style.css"> | ||
|
||
<!-- WebGLFileUploader --> | ||
<script src="js/npo.src.js"></script> | ||
<link rel="stylesheet" href="css/file_uploader.css"> | ||
<!-- --> | ||
|
||
</head> | ||
<body> | ||
<div id="unity-container" class="unity-desktop"> | ||
<canvas id="unity-canvas"></canvas> | ||
<div id="unity-loading-bar"> | ||
<div id="unity-logo"></div> | ||
<div id="unity-progress-bar-empty"> | ||
<div id="unity-progress-bar-full"></div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- WebGLFileUploader --> | ||
<!-- <div id="file_uploader"></div> --> | ||
<!-- <div id="file_uploader_file_list"></div> --> | ||
<!-- --> | ||
|
||
<script> | ||
var container = document.querySelector("#unity-container"); | ||
var canvas = document.querySelector("#unity-canvas"); | ||
var loadingBar = document.querySelector("#unity-loading-bar"); | ||
var progressBarFull = document.querySelector("#unity-progress-bar-full"); | ||
var buildUrl = "Build/"; | ||
var loaderUrl = buildUrl + "LightMaterialulator.loader.js"; | ||
var config = { | ||
dataUrl: buildUrl + "LightMaterialulator.data", | ||
frameworkUrl: buildUrl + "LightMaterialulator.framework.js", | ||
codeUrl: buildUrl + "LightMaterialulator.wasm", | ||
streamingAssetsUrl: "StreamingAssets", | ||
companyName: "r033", | ||
productName: "LightMaterialulator", | ||
productVersion: "1.0" | ||
}; | ||
|
||
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) { | ||
container.className = "unity-mobile"; | ||
config.devicePixelRatio = 1; | ||
canvas.style.height = "90%"; | ||
} else { | ||
canvas.style.width = "100%"; | ||
canvas.style.height = "100%"; | ||
} | ||
canvas.style.background = "url('" + buildUrl + "/') center / cover"; | ||
loadingBar.style.display = "block"; | ||
|
||
var script = document.createElement("script"); | ||
script.src = loaderUrl; | ||
script.onload = () => { | ||
createUnityInstance(canvas, config, (progress) => { | ||
progressBarFull.style.width = 100 * progress + "%"; | ||
}).then((unityInstance) => { | ||
loadingBar.style.display = "none"; | ||
}).catch((message) => { | ||
alert(message); | ||
}); | ||
}; | ||
document.body.appendChild(script); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.