three三维大师作品艺术展馆第一视角参观场景代码
代码语言:html
所属分类:三维
代码描述:three三维大师作品艺术展馆第一视角参观场景代码
代码标签: three 三维 大师 作品 艺术 展馆 第一 视角 参观 场景 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>大师作品艺术展馆</title>
<style>
* {
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
html,
body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
font-family: "Microsoft YaHei", Arial, sans-serif;
background: #cadcf0;
color: #eef6ff;
}
#hud {
position: fixed;
top: 16px;
left: 16px;
z-index: 20;
width: min(360px, calc(100vw - 32px));
padding: 16px 18px;
border-radius: 18px;
background: rgba(12, 21, 35, 0.66);
border: 1px solid rgba(255, 255, 255, 0.14);
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(10px);
user-select: none;
pointer-events: none;
}
#hud .title {
font-size: 24px;
font-weight: 800;
letter-spacing: 1px;
margin-bottom: 8px;
}
#hud .sub {
font-size: 13px;
color: #cbd5e1;
line-height: 1.7;
margin-bottom: 10px;
}
#hud .line {
width: 100%;
height: 1px;
background: linear-gradient(90deg, rgba(255,255,255,0.25), transparent);
margin: 10px 0 12px;
}
#hud .meta {
font-size: 14px;
line-height: 1.8;
color: #e2e8f0;
}
#hud .meta span {
color: #93c5fd;
}
#inspectPanel {
position: fixed;
right: 16px;
bottom: 16px;
z-index: 21;
width: min(420px, calc(100vw - 32px));
padding: 16px 18px;
border-radius: 18px;
background: rgba(7, 14, 26, 0.78);
border: 1px solid rgba(255, 255, 255, 0.14);
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
backdrop-filter: blur(12px);
opacity: 0;
transform: translateY(10px);
transition: opacity 0.2s ease, transform 0.2s ease;
pointer-events: none;
}
#inspectPanel.show {
opacity: 1;
transform: translateY(0);
}
#inspectTitle {
font-size: 24px;
font-weight: 800;
color: #f8fafc;
margin-bottom: 8px;
}
#inspectMeta {
font-size: 14px;
color: #93c5fd;
margin-bottom: 10px;
}
#inspectDesc {
font-size: 14px;
line-height: 1.8;
color: #dbeafe;
}
#centerHint {
position: fixed;
inset: 0;
z-index: 19;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
opacity: 0;
transition: opacity 0.25s ease;
}
#centerHint.show {
opacity: 1;
}
#centerHint .panel {
text-align: center;
padding: 22px 28px;
border-radius: 22px;
background: rgba(5, 10, 20, 0.72);
border: 1px solid rgba(255, 255, 255, 0.14);
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
backdrop-filter: blur(10px);
}
#centerHint .big {
font-size: 30px;
font-weight: 800;
margin-bottom: 8px;
color: #f8fafc;
}
#centerHint .small {
font-size: 15px;
line-height: 1.8;
color: #cbd5e1;
}
#crosshair {
position: fixed;
left: 50%;
top: 50%;
z-index: 18;
width: 18px;
height: 18px;
margin-left: -9px;
margin-top: -9px;
opacity: 0;
transition: opacity 0.2s ease;
pointer-events: none;
}
#crosshair.show {
opacity: 1;
}
#crosshair::before,
#crosshair::after {
content: "";
position: absolute;
background: rgba(255, 255, 255, 0.92);
border-radius: 999px;
box-shadow: 0 0 10px rgba(255,255,255,0.35);
}
#crosshair::before {
left: 8px;
top: 0;
width: 2px;
height: 18px;
}
#crosshair::after {
left: 0;
top: 8px;
width: 18px;
height: 2px;
}
canvas {
display: block;
width: 100%;
height: 100%;
outline: none;
}
@media (max-width: 700px) {
#hud .title {
font-size: 20px;
}
#centerHint .big {
font-size: 26px;
}
}
</style>
</head>
<body>
<div id="hud">
<div class="title">大师作品艺术展馆</div>
<div class="sub">
点击画面进入漫游。<br />
鼠标移动视角,W A S D 行走,Shift 加速,Esc 退出。
</div>
<div class="line"></div>
<div class="meta">
当前位置:<span id="placeText">馆外庭院</span><br />
当前状态:<span id="statusText">点击画面开始参观</span><br />
展馆内容:<span>外部建筑 + 内部画廊 + 可近距离查看画作</span>
</div>
</div>
<div id="inspectPanel">
<div id="inspectTitle"></div>
<div id="inspectMeta"></div>
<div id="inspectDesc"></div>
</div>
<div id="centerHint" class="show">
<div class="panel">
<div class="big">点击进入展馆漫游</div>
<div class="small">
先从馆外广场出发,穿过正门进入大厅。<br />
将准星对准画作,即可查看作品信息。
</div>
</div>
</div>
<div id="cro.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0