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>Three.js 建房 + 重力 + 地震模拟(cannon-es)</title>
<style>
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1020; }
#wrap { position: fixed; inset: 0; }
#ui {
position: fixed; left: 12px; top: 12px; z-index: 10;
background: rgba(10, 14, 28, 0.72);
color: #e7ecff; font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial;
padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
width: 320px; backdrop-filter: blur(6px);
}
#ui h3 { margin: 0 0 8px; font-size: 14px; font-weight: 650; }
#ui .row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; margin: 8px 0; }
#ui select, #ui button, #ui input[type="range"] {
width: 100%; box-sizing: border-box;
background: rgba(255,255,255,.08);
border: 1px solid rgba(255,255,255,.14);
color: #e7ecff;
border-radius: 8px;
padding: 8px 10px;
outline: none;
}
#ui button { cursor: pointer; }
#ui button:hover { background: rgba(255,255,255,.12); }
#ui .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
#ui .btns3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 10px; }
#hint {
margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12);
color: rgba(231,236,255,.86); font-size: 12px;
}
#status {
margin-top: 8px; font-size: 12px;
color: rgba(231,236,255,.86);
display: grid; gap: 6px;
}
#status code { color: #cfe2ff; }
canvas { display: block; }
</style>
</h.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0