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>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Arial', sans-serif;
overflow: hidden;
background: #1a1a1a;
user-select: none;
-webkit-user-select: none;
}
#canvas {
width: 100%;
height: 100vh;
display: block;
cursor: crosshair;
touch-action: none;
}
#ui {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
pointer-events: none;
}
#hud {
position: absolute;
top: 20px; left: 20px;
background: rgba(0,0,0,0.8);
padding: 20px;
border-radius: 15px;
color: white;
min-width: 250px;
box-shadow: 0 4px 20px rgba(0,0,0,0.5);
pointer-events: auto;
}
.hud-title {
font-size: 24px; font-weight: bold;
margin-bottom: 15px; color: #4CAF50;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.stat {
display: flex; justify-content: space-between;
margin: 10px 0; font-size: 16px;
}
.stat-label { color: #aaa; }
.stat-value { color: #fff; font-weight: bold; }
#progress-bar {
width: 100%; height: 25px;
background: rgba(255,255,255,0.2);
border-radius: 12px; overflow: hidden;
margin-top: 10px; border: 2px solid #4CAF50;
}
#progress-fill {
height: 100%;
background: linear-gradient(90deg, #4CAF50, #8BC34A);
width: 0%; transition: width 0.3s;
display: flex; align-items: center;
justify-content: center;
color: white; font-weight: bold;
}
#tools {
position: absolute;
top: 20px; right: 20px;
background: rgba(0,0,0,0.8);
padding: 15px; border-radius: 15px;
box-shadow: 0 4px 20px rgba(0,0,0,0.5);
pointer-events: auto;
}
.tool {
width: 60px; height: 60px; margin: 5px;
background: rgba(255,255.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0