three实现三维人物姿势及位置镜头调整代码
代码语言:html
所属分类:三维
代码描述:three实现三维人物姿势及位置镜头调整代码,方便后期给ai图片及视频生成作为参考。
代码标签: 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>3D 人物姿势调整与截图工具</title>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: #f0f0f0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
user-select: none;
}
#canvas-container {
width: 100%;
height: 100%;
display: block;
}
/* 状态与控制提示面板 */
#info-panel {
position: absolute;
top: 20px;
left: 20px;
background: rgba(255, 255, 255, 0.9);
padding: 15px 20px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
max-width: 300px;
pointer-events: none;
transition: opacity 0.3s;
}
#info-panel h3 {
margin: 0 0 8px 0;
font-size: 16px;
color: #333;
}
#info-panel p {
margin: 4px 0;
font-size: 13px;
color: #666;
line-height: 1.4;
}
#info-panel .shortcut-key {
background: #e0e0e0;
padding: 2px 5px;
border-radius: 3px;
font-family: monospace;
font-weight: bold;
}
#status-bar {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.75);
color: #fff;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
pointer-events: none;
display: none;
}
/* 自定义 lil-gui 的基础位置 */
.lil-gui {
--background-color: rgba(20, 20, 20, 0.9) !important;
--text-color: #e0e0e0 !important;
--title-background-color: #2c2c2c !important;
font-family: inherit !important;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
}
</style>
<!-- 导入 Map 用于管理 Three.js 依赖 -->
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.128.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.128.0/examples/jsm/"
.........完整代码请登录后点击上方下载按钮下载查看















网友评论0