Skip to content

Commit d48b254

Browse files
leyileyi
authored andcommitted
update
1 parent 1822cb5 commit d48b254

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

demogorgon.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,25 @@ <h1>WARNING: GATE OPEN</h1>
8888
<div style="border-bottom: 1px solid #ff0000; margin-bottom: 10px; padding-bottom: 5px; font-weight: bold;">RENDER
8989
CONSOLE</div>
9090
<div class="control-group">
91-
<label>EXPOSURE (曝光度)</label>
91+
<label>EXPOSURE</label>
9292
<input type="range" id="exposure-slider" min="0" max="5" step="0.1" value="1.5">
9393
</div>
9494
<div class="control-group">
95-
<label>AMBIENT (环境光)</label>
95+
<label>AMBIENT LIGHT</label>
9696
<input type="range" id="ambient-slider" min="0" max="5" step="0.1" value="1.2">
9797
</div>
9898
<div class="control-group">
99-
<label>MAIN LIGHT (主灯)</label>
99+
<label>MAIN LIGHT</label>
100100
<input type="range" id="main-light-slider" min="0" max="10" step="0.1" value="2.0">
101101
</div>
102102
<div class="control-group">
103-
<label>FLICKER BASE (闪烁基准)</label>
103+
<label>FLICKER BASE</label>
104104
<input type="range" id="flicker-slider" min="0" max="500" step="10" value="50">
105105
</div>
106+
<div class="control-group" style="display: flex; align-items: center; gap: 10px;">
107+
<label style="margin-bottom: 0;">WIREFRAME MODE</label>
108+
<input type="checkbox" id="wireframe-check" style="width: auto;">
109+
</div>
106110
</div>
107111

108112
<div id="loading" class="loading">Locating Demogorgon...</div>
@@ -184,9 +188,9 @@ <h1>WARNING: GATE OPEN</h1>
184188
console.error(error);
185189
let msg = 'Error: demogorgon.glb not found';
186190
if (window.location.protocol === 'file:') {
187-
msg = '⚠️ 浏览器安全限制:无法通过 file:// 协议加载 3D 模型。<br><br>请使用 VS Code <b>Live Server</b> 插件或 Python <b>http.server</b> 运行此页面。';
191+
msg = '⚠️ Browser Security Restriction: Cannot load 3D models via file:// protocol.<br><br>Please use VS Code <b>Live Server</b> or a local web server.';
188192
} else {
189-
msg = 'ERROR: Could not find "demogorgon.glb" in the current folder.';
193+
msg = 'ERROR: Could not find "demogorgon.glb" in the current folder.<br>Check filename casing or ensure the file is uploaded to GitHub.';
190194
}
191195
document.getElementById('loading').innerText = msg;
192196
document.getElementById('loading').style.color = '#ff0000';
@@ -199,6 +203,15 @@ <h1>WARNING: GATE OPEN</h1>
199203
document.getElementById('exposure-slider').addEventListener('input', (e) => {
200204
renderer.toneMappingExposure = parseFloat(e.target.value);
201205
});
206+
document.getElementById('wireframe-check').addEventListener('change', (e) => {
207+
if (model) {
208+
model.traverse(n => {
209+
if (n.isMesh) {
210+
n.material.wireframe = e.target.checked;
211+
}
212+
});
213+
}
214+
});
202215
document.getElementById('ambient-slider').addEventListener('input', (e) => {
203216
ambientLight.intensity = parseFloat(e.target.value);
204217
});

0 commit comments

Comments
 (0)