Skip to content

Commit 4ca2f8c

Browse files
authored
Merge pull request #6 from web3dev1337/feature/editor-usability-work1
feat: editor.html as default landing page
2 parents 73f1c6e + 74b7e5c commit 4ca2f8c

3 files changed

Lines changed: 89 additions & 77 deletions

File tree

classic.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>ShaderBrew — Classic Editor</title>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
7+
<style>
8+
body {
9+
color: #fff;
10+
font-family: Monospace;
11+
font-size: 13px;
12+
text-align: center;
13+
font-weight: bold;
14+
15+
background-color: #000;
16+
margin: 0px;
17+
overflow: hidden;
18+
}
19+
20+
canvas {
21+
display: block;
22+
position: absolute;
23+
top: 0;
24+
left: 0;
25+
right: 0;
26+
bottom: 0;
27+
margin: auto;
28+
}
29+
30+
#info {
31+
position: absolute;
32+
padding: 10px;
33+
width: 100%;
34+
text-align: center;
35+
color: #fff;
36+
}
37+
38+
a {
39+
color: orange;
40+
}
41+
42+
.lil-gui {
43+
min-width: 300px;
44+
--font-size: 14px;
45+
--input-font-size: 14px;
46+
--widget-height: 24px;
47+
--slider-knob-width: 3px;
48+
}
49+
</style>
50+
</head>
51+
<body>
52+
<div id="info">
53+
EffectTextureMaker [&nbsp;<a href="http://mebiusbox.github.io/docs/lab/effect_texture_maker" target="_blank">Ja</a
54+
>&nbsp;|&nbsp;<a href="http://mebiusbox.github.io/en/docs/lab/effect_texture_maker" target="_blank">En</a>&nbsp;]
55+
- Powered by <a href="http://threejs.org" target="_blank">three.js (r174)</a><br />
56+
<br />
57+
Special thanks to doxas, liovch, iq, KeyMaster-, knighty, XT95, Brandon Fogerty, FabriceNeyret2, TambakoJaguar,
58+
mu6k, anisoptera, namortrailblazer, vamoss, xbe, Iulian Marinescu Ghetau, Duke, hclarke, 104, vchizhov, smkgames,
59+
Stefan Gustavson, skaplun, Koltes, arxyz, diviaki, Sunpy, Hadyn, Dave_Hoskins, maysssam, joltz0r, Xor
60+
<div id="time" style="font-family: consolas; margin-top: 8px"></div>
61+
</div>
62+
<div
63+
id="inspector"
64+
style="position: absolute; left: 10px; top: 100px; width: 200px; height: 100px; font-family: consolas"
65+
></div>
66+
<script type="importmap">
67+
{
68+
"imports": {
69+
"three": "https://unpkg.com/three@0.174.0/build/three.module.min.js",
70+
"three/addons/": "https://unpkg.com/three@0.174.0/examples/jsm/",
71+
"pixy": "./pixy.module.min.js"
72+
}
73+
}
74+
</script>
75+
<script type="module" src="fxgen.module.min.js"></script>
76+
<script type="module" src="src/ui/top-nav.js"></script>
77+
</body>
78+
</html>

index.html

Lines changed: 8 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,11 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<title>EffectTextureMaker</title>
5-
<meta charset="utf-8" />
6-
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
7-
<style>
8-
body {
9-
color: #fff;
10-
font-family: Monospace;
11-
font-size: 13px;
12-
text-align: center;
13-
font-weight: bold;
14-
15-
background-color: #000;
16-
margin: 0px;
17-
overflow: hidden;
18-
}
19-
20-
canvas {
21-
display: block;
22-
position: absolute;
23-
top: 0;
24-
left: 0;
25-
right: 0;
26-
bottom: 0;
27-
margin: auto;
28-
}
29-
30-
#info {
31-
position: absolute;
32-
padding: 10px;
33-
width: 100%;
34-
text-align: center;
35-
color: #fff;
36-
}
37-
38-
a {
39-
color: orange;
40-
}
41-
42-
.lil-gui {
43-
min-width: 300px;
44-
--font-size: 14px;
45-
--input-font-size: 14px;
46-
--widget-height: 24px;
47-
--slider-knob-width: 3px;
48-
}
49-
</style>
50-
</head>
51-
<body>
52-
<div id="info">
53-
EffectTextureMaker [&nbsp;<a href="http://mebiusbox.github.io/docs/lab/effect_texture_maker" target="_blank">Ja</a
54-
>&nbsp;|&nbsp;<a href="http://mebiusbox.github.io/en/docs/lab/effect_texture_maker" target="_blank">En</a>&nbsp;]
55-
- Powered by <a href="http://threejs.org" target="_blank">three.js (r174)</a><br />
56-
<br />
57-
Special thanks to doxas, liovch, iq, KeyMaster-, knighty, XT95, Brandon Fogerty, FabriceNeyret2, TambakoJaguar,
58-
mu6k, anisoptera, namortrailblazer, vamoss, xbe, Iulian Marinescu Ghetau, Duke, hclarke, 104, vchizhov, smkgames,
59-
Stefan Gustavson, skaplun, Koltes, arxyz, diviaki, Sunpy, Hadyn, Dave_Hoskins, maysssam, joltz0r, Xor
60-
<div id="time" style="font-family: consolas; margin-top: 8px"></div>
61-
</div>
62-
<div
63-
id="inspector"
64-
style="position: absolute; left: 10px; top: 100px; width: 200px; height: 100px; font-family: consolas"
65-
></div>
66-
<script type="importmap">
67-
{
68-
"imports": {
69-
"three": "https://unpkg.com/three@0.174.0/build/three.module.min.js",
70-
"three/addons/": "https://unpkg.com/three@0.174.0/examples/jsm/",
71-
"pixy": "./pixy.module.min.js"
72-
}
73-
}
74-
</script>
75-
<script type="module" src="fxgen.module.min.js"></script>
76-
<script type="module" src="src/ui/top-nav.js"></script>
77-
</body>
3+
<head>
4+
<meta charset="utf-8"/>
5+
<meta http-equiv="refresh" content="0;url=editor.html"/>
6+
<title>ShaderBrew</title>
7+
</head>
8+
<body>
9+
<p>Redirecting to <a href="editor.html">ShaderBrew Editor</a>...</p>
10+
</body>
7811
</html>

src/ui/top-nav.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const NAV_GROUPS = [
2424
},
2525
{
2626
label: "Legacy",
27-
items: [{ label: "Classic", href: "index.html" }]
27+
items: [{ label: "Classic", href: "classic.html" }]
2828
}
2929
];
3030

@@ -88,7 +88,8 @@ function initTopNav() {
8888
title.textContent = "SHADERBREW";
8989
nav.appendChild(title);
9090

91-
const path = window.location.pathname.split("/").pop() || "index.html";
91+
const raw = window.location.pathname.split("/").pop() || "index.html";
92+
const path = raw === "index.html" ? "editor.html" : raw;
9293

9394
for (const group of NAV_GROUPS) {
9495
const groupEl = document.createElement("div");

0 commit comments

Comments
 (0)