diablo2-web/play.html

449 lines
12 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Diablo II: Lord of Destruction · Online Client (play.html)</title>
<script>
window.__d2SkipAutoBoot = true;
</script>
<style>
@font-face {
font-family: "D2Exocet";
src: url("/ui/fonts/D2Exocet.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "D2Formal436";
src: url("/ui/fonts/D2Formal436.ttf") format("truetype");
font-weight: 100 900;
font-style: normal;
font-display: swap;
}
:root {
color-scheme: dark;
--font-display: "D2Exocet", "Cinzel", "Times New Roman", "Liberation Serif", "Noto Serif", "Songti SC", "Noto Serif SC", serif;
--font-body: "D2Formal436", "Times New Roman", "Liberation Serif", "Noto Serif", "Songti SC", "Noto Serif SC", serif;
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
width: 100%;
height: 100vh;
background: #050505;
color: #e8dcc8;
font: 13px/1.45 var(--font-body);
overflow: hidden;
user-select: none;
display: flex;
flex-direction: column;
}
#d2-toolbar-container {
flex: 0 0 auto;
width: 100%;
z-index: 50;
}
#d2-toolbar,
.d2-toolbar {
position: relative;
z-index: 1000;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
gap: 12px;
width: 100%;
height: 32px;
min-height: 32px;
max-height: 32px;
padding: 0 12px;
box-sizing: border-box;
background: linear-gradient(180deg, #1b1712 0%, #0d0b08 100%);
border-bottom: 1px solid #4a3c24;
color: #d6c496;
font-family: var(--font-display);
font-size: 12px;
line-height: 1;
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
user-select: none;
}
.d2-toolbar__group {
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
flex-shrink: 0;
gap: 6px;
white-space: nowrap;
}
.d2-toolbar__status {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 8px;
border-radius: 3px;
background: #14110d;
border: 1px solid #352b1b;
}
.d2-toolbar__status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
background: #6b6b6b;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.d2-toolbar__status-dot--disconnected { background: #767676; }
.d2-toolbar__status-dot--connecting { background: #e6a822; box-shadow: 0 0 6px #e6a822; }
.d2-toolbar__status-dot--bncs { background: #4495e8; box-shadow: 0 0 6px #4495e8; }
.d2-toolbar__status-dot--mcp { background: #36c5d6; box-shadow: 0 0 6px #36c5d6; }
.d2-toolbar__status-dot--d2gs { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.d2-toolbar__status-dot--error { background: #e74c3c; box-shadow: 0 0 6px #e74c3c; }
.d2-toolbar__rtt {
font-family: "JetBrains Mono", "Consolas", monospace;
font-size: 11px;
color: #a89974;
}
.d2-toolbar__label {
color: #b59e68;
font-size: 11px;
letter-spacing: 0.03em;
}
.d2-toolbar__select {
height: 22px;
padding: 0 6px;
background: #120f0b;
border: 1px solid #4a3c24;
border-radius: 2px;
color: #e2d1a0;
font-size: 11px;
cursor: pointer;
outline: none;
}
.d2-toolbar__select:hover,
.d2-toolbar__btn:hover {
border-color: #c7b377;
color: #fff2c6;
}
.d2-toolbar__btn {
display: inline-flex;
align-items: center;
justify-content: center;
height: 22px;
padding: 0 8px;
background: linear-gradient(180deg, #2b2316 0%, #17120b 100%);
border: 1px solid #574629;
border-radius: 2px;
color: #dfc991;
font-size: 11px;
cursor: pointer;
}
.d2-toolbar__btn--active {
background: linear-gradient(180deg, #524020 0%, #2e2310 100%);
border-color: #d4b46a;
color: #fff5d6;
}
.d2-toolbar__diag {
position: absolute;
top: 32px;
left: 12px;
right: 12px;
z-index: 1001;
display: none;
align-items: center;
justify-content: space-between;
padding: 6px 10px;
background: rgba(38, 12, 10, 0.96);
border: 1px solid #a93226;
border-top: none;
border-radius: 0 0 4px 4px;
color: #ffd6d1;
font-size: 12px;
}
.d2-toolbar__diag--visible {
display: flex;
}
#play-workspace {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: row;
align-items: stretch;
justify-content: center;
overflow: hidden;
position: relative;
}
#play-stage-wrapper {
flex: 1 1 auto;
width: 100%;
height: 100%;
min-width: 0;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
background: #000;
position: relative;
overflow: hidden;
}
#play-stage {
position: relative;
aspect-ratio: 4 / 3;
width: min(100%, calc((100vh - 36px) * 4 / 3));
height: min(100%, calc(100vw * 3 / 4));
max-width: 100%;
max-height: 100%;
background: #000;
box-shadow: 0 0 42px rgba(0, 0, 0, 0.95), 0 0 0 1px #2e251b;
overflow: hidden;
}
#bnet-shell {
position: absolute;
inset: 0;
z-index: 15;
display: flex;
align-items: center;
justify-content: center;
background: #000;
}
#bnet-canvas {
width: 100%;
height: 100%;
display: block;
image-rendering: pixelated;
}
#view {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
background: #080706;
z-index: 5;
image-rendering: pixelated;
}
#d2-hud-canvas {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: block;
z-index: 10;
pointer-events: none;
image-rendering: pixelated;
}
#play-disconnect-banner {
position: absolute;
top: 14px;
left: 50%;
transform: translateX(-50%);
z-index: 30;
background: rgba(42, 12, 12, 0.94);
border: 1px solid #c94a4a;
color: #ffd6d6;
padding: 6px 14px;
border-radius: 4px;
font-size: 12px;
letter-spacing: 0.03em;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}
#play-disconnect-banner[hidden] {
display: none !important;
}
#d2-boot-loading {
position: absolute;
inset: 0;
z-index: 28;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: radial-gradient(circle at center, #18120c 0%, #050403 78%);
color: #e8dcc8;
padding: 24px;
}
#d2-boot-loading[hidden] {
display: none !important;
}
.d2-boot-panel {
width: 480px;
max-width: 92%;
background: rgba(12, 9, 6, 0.94);
border: 1px solid #8c6f39;
box-shadow: 0 0 32px rgba(0, 0, 0, 0.95), inset 0 0 14px rgba(140, 111, 57, 0.16);
padding: 22px 26px 20px;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.d2-boot-title {
font-family: var(--font-display);
font-size: 18px;
font-weight: 700;
letter-spacing: 0.08em;
color: #d8b868;
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
text-align: center;
}
.d2-boot-subtitle {
font-family: var(--font-body);
font-size: 12px;
letter-spacing: 0.06em;
color: #b7a588;
text-align: center;
}
#d2-boot-progress-bar {
width: 100%;
height: 22px;
background: #070504;
border: 1px solid #9c7c42;
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.95);
position: relative;
overflow: hidden;
}
#d2-boot-progress-fill {
width: 0%;
height: 100%;
background: linear-gradient(90deg, #56100c 0%, #9b2217 55%, #d68a28 100%);
box-shadow: 0 0 12px rgba(214, 138, 40, 0.45);
transition: width 60ms linear;
}
#d2-boot-progress-percent {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font-display);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.06em;
color: #f6ebd4;
text-shadow: 0 1px 3px #000, 0 0 6px #000;
pointer-events: none;
}
.d2-boot-meta {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
font-family: var(--font-body);
font-size: 12px;
color: #ccb996;
min-height: 18px;
overflow: hidden;
}
.d2-boot-file-label {
color: #9e8863;
flex: 0 0 auto;
}
#d2-boot-progress-file {
color: #f0dfb8;
font-family: var(--font-body);
font-size: 12px;
max-width: 290px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#d2-boot-progress-count {
color: #8f7b58;
font-size: 11px;
flex: 0 0 auto;
}
#d2-inspector-container {
flex: 0 0 auto;
max-height: 100%;
overflow-y: auto;
z-index: 40;
background: #0e0c0a;
border-left: 1px solid #2b2319;
}
</style>
</head>
<body>
<div id="d2-toolbar-container"></div>
<div id="play-workspace">
<div id="play-stage-wrapper">
<div id="play-stage">
<div id="d2-boot-loading">
<div class="d2-boot-panel">
<div class="d2-boot-title">DIABLO II: LORD OF DESTRUCTION</div>
<div class="d2-boot-subtitle">正在下载游戏资源 · LOADING RESOURCES</div>
<div
id="d2-boot-progress-bar"
role="progressbar"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="0"
>
<div id="d2-boot-progress-fill" style="width: 0%"></div>
<div id="d2-boot-progress-percent">0%</div>
</div>
<div class="d2-boot-meta">
<span class="d2-boot-file-label">正在下载:</span>
<span id="d2-boot-progress-file">正在初始化...</span>
<span id="d2-boot-progress-count">(0/0)</span>
</div>
</div>
</div>
<div id="bnet-shell">
<canvas id="bnet-canvas" width="800" height="600"></canvas>
</div>
<canvas id="view" width="800" height="600"></canvas>
<canvas id="d2-hud-canvas" width="800" height="600"></canvas>
<div id="play-disconnect-banner" hidden></div>
</div>
</div>
<div id="d2-inspector-container"></div>
</div>
<script type="module" src="/src/client/main.ts"></script>
</body>
</html>