Skip to content

Commit 2a170aa

Browse files
gkurtclaude
andcommitted
Add prebuilt Previewer WebGL assets under Unity/previewer
Parked here alongside Unity/injectable so they are hosted rather than carried in the ReactUnity/core monorepo. Copied verbatim from ReactUnity/previewer's public/ directory. Under Unity/ on purpose: the docs deploy in ReactUnity/core runs with clean: true and clean-exclude: Unity/**, so anything outside that prefix is wiped on the next docs deploy. public/ is dropped at Unity/previewer/ rather than flattened because index.html references Build/Previewer.* relatively, so https://reactunity.github.io/Unity/previewer/ is a working previewer page with no path rewriting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 4ec6a5c commit 2a170aa

9 files changed

Lines changed: 109 additions & 0 deletions

File tree

18.7 MB
Binary file not shown.
7.63 MB
Binary file not shown.

Unity/previewer/Build/Previewer.framework.js

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
102 KB
Binary file not shown.

Unity/previewer/Build/Previewer.loader.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
62 MB
Binary file not shown.
17.7 MB
Binary file not shown.

Unity/previewer/favicon.ico

37.2 KB
Binary file not shown.

Unity/previewer/index.html

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7+
<title>ReactUnity Previewer v0.20.0</title>
8+
9+
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap" rel="stylesheet">
10+
11+
<style>
12+
html,
13+
body {
14+
font-size: 0;
15+
margin: 0;
16+
height: 100%;
17+
overflow: hidden;
18+
}
19+
20+
#unity-canvas {
21+
height: 100%;
22+
width: 100%;
23+
}
24+
25+
.loader-center {
26+
position: absolute;
27+
left: 0;
28+
right: 0;
29+
top: 50%;
30+
height: 0;
31+
overflow: visible;
32+
display: block;
33+
pointer-events: none;
34+
user-select: none;
35+
-webkit-user-select: none;
36+
}
37+
38+
.loader {
39+
position: absolute;
40+
height: 50px;
41+
top: -25px;
42+
left: 50px;
43+
right: 50px;
44+
background: #c5cae9;
45+
border-radius: 10px;
46+
overflow: hidden;
47+
}
48+
49+
.loader-bar {
50+
height: 100%;
51+
background: #3f51b5;
52+
}
53+
</style>
54+
</head>
55+
56+
<body style="text-align: center">
57+
<canvas id="unity-canvas"
58+
style="background: #231F20"></canvas>
59+
60+
<div class="loader-center" id="loader-root">
61+
<div class="loader">
62+
<div class="loader-bar" id="loader-bar"></div>
63+
</div>
64+
</div>
65+
66+
<script src="Build/Previewer.loader.js"></script>
67+
<script>
68+
createUnityInstance(document.querySelector("#unity-canvas"), {
69+
dataUrl: "Build/Previewer.data",
70+
frameworkUrl: "Build/Previewer.framework.js",
71+
codeUrl: "Build/Previewer.wasm",
72+
streamingAssetsUrl: "StreamingAssets",
73+
companyName: "reactunity",
74+
productName: "dev-sample",
75+
productVersion: "0.1",
76+
}, function onProgress(progress) {
77+
var bar = document.querySelector("#loader-bar");
78+
if (bar) bar.style.width = (progress * 100) + '%';
79+
80+
var loader = document.querySelector("#loader-root");
81+
loader.style.display = progress < 1 ? 'block' : 'none';
82+
});
83+
</script>
84+
</body>
85+
86+
</html>

0 commit comments

Comments
 (0)