|
|
<!DOCTYPE html> |
|
|
<html lang="zh-CN"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>中药饮片AI三维鉴别实训系统</title> |
|
|
<style> |
|
|
|
|
|
body { |
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
|
|
margin: 0; |
|
|
background-color: #f0f2f5; |
|
|
display: flex; |
|
|
height: 100vh; |
|
|
overflow: hidden; |
|
|
} |
|
|
|
|
|
|
|
|
.app-container { |
|
|
display: flex; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
} |
|
|
|
|
|
|
|
|
#sidebar { |
|
|
width: 240px; |
|
|
background-color: #fff; |
|
|
padding: 20px; |
|
|
box-shadow: 2px 0 5px rgba(0,0,0,0.1); |
|
|
overflow-y: auto; |
|
|
z-index: 10; |
|
|
} |
|
|
#sidebar h2 { |
|
|
margin-top: 0; |
|
|
color: #333; |
|
|
border-bottom: 2px solid #4a90e2; |
|
|
padding-bottom: 10px; |
|
|
} |
|
|
#herb-list { |
|
|
list-style: none; |
|
|
padding: 0; |
|
|
margin: 0; |
|
|
} |
|
|
#herb-list li { |
|
|
padding: 12px 15px; |
|
|
cursor: pointer; |
|
|
border-radius: 5px; |
|
|
margin-bottom: 8px; |
|
|
transition: background-color 0.3s, color 0.3s; |
|
|
} |
|
|
#herb-list li:hover { |
|
|
background-color: #e6f7ff; |
|
|
} |
|
|
#herb-list li.active { |
|
|
background-color: #4a90e2; |
|
|
color: white; |
|
|
font-weight: bold; |
|
|
} |
|
|
|
|
|
|
|
|
#viewer-container { |
|
|
flex-grow: 1; |
|
|
position: relative; |
|
|
} |
|
|
#c { |
|
|
display: block; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
} |
|
|
|
|
|
|
|
|
#loading-overlay { |
|
|
position: absolute; |
|
|
top: 0; |
|
|
left: 0; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
background-color: rgba(0, 0, 0, 0.7); |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
z-index: 20; |
|
|
transition: opacity 0.5s; |
|
|
pointer-events: none; |
|
|
opacity: 0; |
|
|
} |
|
|
#loading-overlay.visible { |
|
|
opacity: 1; |
|
|
pointer-events: auto; |
|
|
} |
|
|
.loading-box { |
|
|
text-align: center; |
|
|
color: white; |
|
|
background-color: rgba(40, 40, 40, 0.9); |
|
|
padding: 30px 40px; |
|
|
border-radius: 10px; |
|
|
} |
|
|
.loading-title { |
|
|
font-size: 1.2em; |
|
|
margin-bottom: 15px; |
|
|
} |
|
|
.progress-bar-container { |
|
|
width: 250px; |
|
|
height: 10px; |
|
|
background-color: #555; |
|
|
border-radius: 5px; |
|
|
overflow: hidden; |
|
|
margin: 0 auto; |
|
|
} |
|
|
#progress-bar { |
|
|
width: 0%; |
|
|
height: 100%; |
|
|
background-color: #4a90e2; |
|
|
border-radius: 5px; |
|
|
transition: width 0.2s ease-in-out; |
|
|
} |
|
|
#progress-text { |
|
|
margin-top: 15px; |
|
|
font-size: 1em; |
|
|
font-family: monospace; |
|
|
} |
|
|
|
|
|
|
|
|
.zoom-controls { |
|
|
position: absolute; |
|
|
bottom: 20px; |
|
|
right: 20px; |
|
|
z-index: 10; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
} |
|
|
.zoom-controls button { |
|
|
width: 40px; |
|
|
height: 40px; |
|
|
font-size: 24px; |
|
|
line-height: 40px; |
|
|
font-weight: bold; |
|
|
border: none; |
|
|
border-radius: 50%; |
|
|
background-color: rgba(0, 0, 0, 0.5); |
|
|
color: white; |
|
|
cursor: pointer; |
|
|
margin-top: 10px; |
|
|
transition: background-color 0.3s; |
|
|
} |
|
|
.zoom-controls button:hover { |
|
|
background-color: rgba(0, 0, 0, 0.7); |
|
|
} |
|
|
|
|
|
</style> |
|
|
</head> |
|
|
<body> |
|
|
|
|
|
<div class="app-container"> |
|
|
|
|
|
<div id="sidebar"> |
|
|
<h2>饮片目录</h2> |
|
|
<ul id="herb-list"> |
|
|
|
|
|
</ul> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div id="viewer-container"> |
|
|
<canvas id="c"></canvas> |
|
|
|
|
|
<div id="loading-overlay"> |
|
|
<div class="loading-box"> |
|
|
<div class="loading-title">正在加载模型...</div> |
|
|
<div class="progress-bar-container"> |
|
|
<div id="progress-bar"></div> |
|
|
</div> |
|
|
<div id="progress-text">0%</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="zoom-controls"> |
|
|
<button id="zoom-in-btn">+</button> |
|
|
<button id="zoom-out-btn">-</button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<script type="importmap"> |
|
|
{ |
|
|
"imports": { |
|
|
"three": "https://unpkg.com/three@0.160.0/build/three.module.js", |
|
|
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/" |
|
|
} |
|
|
} |
|
|
</script> |
|
|
<script type="module" src="main.js"></script> |
|
|
|
|
|
</body> |
|
|
</html> |