-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor.html
More file actions
43 lines (41 loc) · 2.47 KB
/
Copy patheditor.html
File metadata and controls
43 lines (41 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blacklight - Prop Editor</title>
<style>
:root { color-scheme: dark; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #111; }
#app { position: fixed; inset: 0; }
canvas { display: block; }
#crosshair { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,0.6); pointer-events: none; }
#help { position: fixed; left: 14px; bottom: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; color: #cfe8ff; opacity: 0.7; }
#blocker { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.85); cursor: pointer; color: #cfe8ff; font-family: ui-monospace, Menlo, monospace; text-align: center; }
#blocker.hidden { display: none; }
#fatal { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; display: none; padding: 12px 16px; background: #2a0d10; color: #ffb4ba; font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; white-space: pre-wrap; }
kbd { border: 1px solid rgba(207,232,255,0.3); border-radius: 4px; padding: 1px 6px; }
</style>
<script type="importmap">
{
"imports": {
"three": "./lib/three/three.module.js",
"three/addons/": "./lib/three/addons/"
}
}
</script>
</head>
<body>
<div id="fatal"></div>
<script>
function showFatal(t){ var e=document.getElementById("fatal"); e.textContent="⚠ "+t; e.style.display="block"; console.error("[Editor]",t); }
window.addEventListener("error", function(e){ if(e.target&&e.target.tagName){ if(e.target.tagName==="SCRIPT"||e.target.tagName==="LINK") showFatal("Failed to load "+(e.target.src||e.target.href)); return; } showFatal((e.message||"unknown")+(e.filename?"\n at "+e.filename+":"+e.lineno:"")); }, true);
</script>
<div id="app"></div>
<div id="crosshair"></div>
<div id="help">Editor · <kbd>WASD</kbd> move · <kbd>Mouse</kbd> look · <kbd>Esc</kbd> release · use the panel (top-right) to place props</div>
<div id="blocker"><div>BLACKLIGHT - PROP EDITOR<br><br>Click to enter. No monsters, no battery - just place props.<br>Pick a room and a prop in the panel, then move/rotate/scale.</div></div>
<script type="module" src="./src/editor.js"></script>
</body>
</html>