Skip to content

Commit

Permalink
Try to fix webgl again
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimerson committed Dec 3, 2018
1 parent a708256 commit 5df68e9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ echo "Listing files in $(pwd)/Build/windows"
ls $(pwd)/Build/windows
echo "Listing files in $(pwd)/Build/webgl"
ls $(pwd)/Build/webgl
mv $(pwd)/Scripts/templates/index.html $(pwd)/Build/webgl/
mv $(pwd)/Scripts/templates/skim.json $(pwd)/Build/webgl/Build/
mv $(pwd)/Build/webgl/.data.unityweb $(pwd)/Build/webgl/skim.data.unityweb
mv $(pwd)/Build/webgl/.wasm.code.unityweb $(pwd)/Build/webgl/skim.wasm.code.unityweb
mv $(pwd)/Build/webgl/.wasm.framework.unityweb $(pwd)/Build/webgl/skim.wasm.framework.unityweb

echo 'Attempting to zip builds'
cd $(pwd)/Build
Expand Down
25 changes: 25 additions & 0 deletions Scripts/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | Skim</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script src="Build/UnityLoader.js"></script>
<script>
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/skim.json", {onProgress: UnityProgress});
</script>
</head>
<body>
<div class="webgl-content">
<div id="gameContainer" style="width: 960px; height: 600px"></div>
<div class="footer">
<div class="webgl-logo"></div>
<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
<div class="title">Skim</div>
</div>
</div>
</body>
</html>
13 changes: 13 additions & 0 deletions Scripts/templates/skim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"companyName": "DefaultCompany",
"productName": "Skim",
"dataUrl": "skim.data.unityweb",
"wasmCodeUrl": "skim.wasm.code.unityweb",
"wasmFrameworkUrl": "skim.wasm.framework.unityweb",
"TOTAL_MEMORY": 268435456,
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
"webglContextAttributes": {"preserveDrawingBuffer": false},
"splashScreenStyle": "Dark",
"backgroundColor": "#231F20",
"cacheControl": {"default": "must-revalidate"}
}

0 comments on commit 5df68e9

Please sign in to comment.