three实现3d导演台编辑器代码

代码语言:html

所属分类:三维

代码描述:three实现3d导演台编辑器代码

代码标签: three 3d 导演台 编辑器 代码

下面为部分代码预览,完整代码请点击下载或在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导演台 - Director's Stage</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Microsoft YaHei', sans-serif; overflow: hidden; background: #1a1a2e; }
        #canvas-container { width: 100vw; height: 100vh; position: relative; }
        canvas { display: block; }

        #toolbar {
            position: fixed; top: 0; left: 0; right: 0; height: 50px;
            background: linear-gradient(135deg, #16213e, #0f3460);
            display: flex; align-items: center; padding: 0 15px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.5); z-index: 100;
            border-bottom: 1px solid #e94560; flex-wrap: nowrap; overflow-x: auto;
        }
        #toolbar h1 { color: #e94560; font-size: 16px; margin-right: 20px; white-space: nowrap; }
        .tool-btn {
            padding: 6px 12px; margin: 0 3px; border: 1px solid #e94560;
            background: rgba(233,69,96,0.1); color: #fff; border-radius: 4px;
            cursor: pointer; font-size: 12px; transition: all 0.3s; white-space: nowrap;
        }
        .tool-btn:hover { background: #e94560; transform: translateY(-1px); }
        .tool-btn.active { background: #e94560; box-shadow: 0 0 10px rgba(233,69,96,0.5); }

        #left-panel {
            position: fixed; left: 0; top: 50px; bottom: 30px; width: 250px;
            background: rgba(22,33,62,0.95); border-right: 1px solid #333;
            overflow-y: auto; z-index: 90; padding: 10px;
        }
        .panel-section { margin-bottom: 15px; }
        .panel-title {
            color: #e94560; font-size: 13px; font-weight: bold;
            padding: 8px 0; border-bottom: 1px solid #333; margin-bottom: 8px;
        }
        .panel-item {
            padding: 7px 10px; margin: 3px 0; background: rgba(255,255,255,0.05);
            border-radius: 4px; color: #ccc; font-size: 12px; cursor: pointer;
            transition: all 0.2s; display: flex; justify-content: space-between; align-items: center;
        }
        .panel-item:hover { background: rgba(233,69,96,0.2); color: #fff; }
        .panel-item.selected { background: rgba(233,69,96,0.3); border-left: 3px solid #e94560; }

        #right-panel {
            position: fixed; right: 0; top: 50px; bottom: 30px; width: 270px;
            background: rgba(22,33,62,0.95); border-left: 1px solid #333;
            overflow-y: auto; z-index: 90; padding: 10px;
        }
        .prop-group { margin-bottom: 10px; }
        .prop-label { color: #aaa; font-size: 11px; margin-bottom: 4px; display: block; }
        .prop-row { display: flex; gap: 4px; margin-bottom: 5px; align-items: center; }
        .prop-input {
            width: 100%; padding: 4px 6px; background: #1a1a2e; border: 1px solid #444;
            color: #fff; border-radius: 3px; font-size: 11px;
        }
        .prop-input:focus { border-color: #e94560; outline: none; }
        .xyz-label { color: #e94560; font-size: 10px; width: 14px; text-align: center; }

        #status-bar {
            position: fixed; bottom: 0; left: 0; right: 0; height: 30px;
            background: rgba(15,52,96,0.95); display: flex; align-items: center;
            padding: 0 15px; font-size: 11px; color: #888; z-index: 100;
            border-top: 1px solid #333;
        }

        .props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
        .prop-btn {
            padding: 8px 5px; text-align: center; background: rgba(255,255,255,0.05);
            border: 1px solid #444; border-radius: 4px; color: #ccc; font-size: 11px;
            cursor: pointer; transition: all 0.2s;
        }
        .prop-btn:hover { border-color: #e94560; color: #e94560; background: rgba(233,69,96,0.1); }

        .joint-slider { width: 100%; margin: 2px 0; accent-color: #e94560; height: 14px; }
        .joint-name { color: #aaa; font-size: 11px; display: block; margin-top: 6px; }

        .batch-controls { display: flex; flex-wrap: wrap; gap: 5px; }
        .batch-btn {
            padding: 5px 10px; background: rgba(233,69,96,0.15); border: 1px solid #e94560;
            color: #fff; border-radius: 3px; font-size: 11px; cursor: pointer;
        }
        .batch-btn:hover { background: #e94560; }

        .modal-overlay {
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.7); z-index: 200; justify-content: center; align-items: center;
        }
        .modal-overlay.show { display: flex; }
        .modal {
            background: #16213e; border: 1px solid #e94560; border-radius: 8px;
            padding: 20px; min-width: 300px;
        }
        .modal h3 { color: #e94560; margin-bottom: 15px; }
        .modal label { color: #aaa; font-size: 12px; display: block; margin-top: 8px; }
        .modal input, .modal select {
            width: 100%; padding: 8px; margin: 4px 0; background: #1a1a2e;
            border: 1px solid #444; color: #fff; border-radius: 4px;
        }

        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: #1a1a2e; }
        ::-webkit-scrollbar-thumb { background: #e94560; border-radius: 3px; }

        .cam-preset {
            display: inline-block; padding: 4px 8px; margin: 2px;
            background: rgba(255,255,255,0.05); border: 1px solid #555;
            border-radius: 3px; color: #ccc; font-size: 10px; cursor: pointer;
        }
        .cam-preset:hover { border-color: #e94560; color: #e94560; }

        .slider-container { display: flex; align-items: center; gap: 4px; margin: 2px 0; }
        .slider-container input[type="range"] { flex: 1; }
        .slider-value { color: #e94560; font-size: 10px; width: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0