refactor: reorganize package structure and decouple framework packages (#338)
* refactor: reorganize package structure and decouple framework packages ## Package Structure Reorganization - Reorganized 55 packages into categorized subdirectories: - packages/framework/ - Generic framework (Laya/Cocos compatible) - packages/engine/ - ESEngine core modules - packages/rendering/ - Rendering modules (WASM dependent) - packages/physics/ - Physics modules - packages/streaming/ - World streaming - packages/network-ext/ - Network extensions - packages/editor/ - Editor framework and plugins - packages/rust/ - Rust WASM engine - packages/tools/ - Build tools and SDK ## Framework Package Decoupling - Decoupled behavior-tree and blueprint packages from ESEngine dependencies - Created abstracted interfaces (IBTAssetManager, IBehaviorTreeAssetContent) - ESEngine-specific code moved to esengine/ subpath exports - Framework packages now usable with Cocos/Laya without ESEngine ## CI Configuration - Updated CI to only type-check and lint framework packages - Added type-check:framework and lint:framework scripts ## Breaking Changes - Package import paths changed due to directory reorganization - ESEngine integrations now use subpath imports (e.g., '@esengine/behavior-tree/esengine') * fix: update es-engine file path after directory reorganization * docs: update README to focus on framework over engine * ci: only build framework packages, remove Rust/WASM dependencies * fix: remove esengine subpath from behavior-tree and blueprint builds ESEngine integration code will only be available in full engine builds. Framework packages are now purely engine-agnostic. * fix: move network-protocols to framework, build both in CI * fix: update workflow paths from packages/core to packages/framework/core * fix: exclude esengine folder from type-check in behavior-tree and blueprint * fix: update network tsconfig references to new paths * fix: add test:ci:framework to only test framework packages in CI * fix: only build core and math npm packages in CI * fix: exclude test files from CodeQL and fix string escaping security issue
This commit is contained in:
@@ -0,0 +1,339 @@
|
||||
/**
|
||||
* Tile Animation Editor Styles
|
||||
* 瓦片动画编辑器样式
|
||||
*/
|
||||
|
||||
.tile-animation-editor-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.tile-animation-editor {
|
||||
background: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 8px;
|
||||
width: 600px;
|
||||
max-height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.animation-editor-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #3c3c3c;
|
||||
background: #2d2d2d;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
.animation-editor-header h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.animation-editor-header .close-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #808080;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.animation-editor-header .close-btn:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.animation-editor-content {
|
||||
display: flex;
|
||||
padding: 16px;
|
||||
gap: 16px;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Preview Section */
|
||||
.animation-preview-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.preview-box {
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.animation-preview-canvas {
|
||||
display: block;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
.preview-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.preview-btn {
|
||||
background: #3c3c3c;
|
||||
border: none;
|
||||
color: #e0e0e0;
|
||||
cursor: pointer;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.preview-btn:hover {
|
||||
background: #4c4c4c;
|
||||
}
|
||||
|
||||
.preview-btn.active {
|
||||
background: #0e639c;
|
||||
}
|
||||
|
||||
.frame-indicator {
|
||||
font-size: 12px;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
/* Frames Section */
|
||||
.animation-frames-section {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.frames-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
font-size: 12px;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.frame-count {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.frames-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
min-height: 150px;
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.frames-empty {
|
||||
text-align: center;
|
||||
color: #808080;
|
||||
font-size: 12px;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
|
||||
.frame-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 8px;
|
||||
background: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 4px;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.frame-item:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.frame-item.drag-over {
|
||||
border-color: #0e639c;
|
||||
background: #1e3a5f;
|
||||
}
|
||||
|
||||
.frame-drag-handle {
|
||||
color: #606060;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.frame-preview {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.frame-preview canvas {
|
||||
display: block;
|
||||
image-rendering: pixelated;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.frame-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.frame-tile-id {
|
||||
color: #808080;
|
||||
min-width: 32px;
|
||||
}
|
||||
|
||||
.frame-duration-input {
|
||||
width: 60px;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
padding: 4px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.frame-duration-input:focus {
|
||||
outline: none;
|
||||
border-color: #0e639c;
|
||||
}
|
||||
|
||||
.duration-unit {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.frame-delete-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #808080;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.frame-delete-btn:hover {
|
||||
background: #5a1d1d;
|
||||
color: #ff6b6b;
|
||||
}
|
||||
|
||||
/* Tileset Section */
|
||||
.animation-tileset-section {
|
||||
border-top: 1px solid #3c3c3c;
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.tileset-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
font-size: 12px;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.default-duration {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.default-duration input {
|
||||
width: 60px;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
padding: 4px 6px;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.default-duration input:focus {
|
||||
outline: none;
|
||||
border-color: #0e639c;
|
||||
}
|
||||
|
||||
.tileset-scroll-container {
|
||||
max-height: 150px;
|
||||
overflow: auto;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.animation-tileset-canvas {
|
||||
display: block;
|
||||
image-rendering: pixelated;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.animation-editor-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
border-top: 1px solid #3c3c3c;
|
||||
background: #2d2d2d;
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
.footer-right {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.btn-primary,
|
||||
.btn-secondary {
|
||||
padding: 6px 16px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: #0e639c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: #1177bb;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: #4c4c4c;
|
||||
}
|
||||
@@ -0,0 +1,379 @@
|
||||
/* ==================== Tile Set Selector Panel Styles ==================== */
|
||||
|
||||
.tileset-selector-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #252526;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ==================== Mode Toggle ==================== */
|
||||
.tileset-mode-toggle {
|
||||
display: flex;
|
||||
padding: 6px 8px;
|
||||
gap: 2px;
|
||||
background: #1e1e1e;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.mode-toggle-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
background: #2d2d30;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
color: #888;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.mode-toggle-btn:first-child {
|
||||
border-radius: 3px 0 0 3px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.mode-toggle-btn:last-child {
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.mode-toggle-btn:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.mode-toggle-btn.active {
|
||||
background: #094771;
|
||||
border-color: #0078d4;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mode-toggle-btn.active:hover {
|
||||
background: #0a5a8a;
|
||||
}
|
||||
|
||||
.mode-toggle-btn svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
/* ==================== Tool Buttons Row ==================== */
|
||||
.tileset-tools {
|
||||
display: flex;
|
||||
padding: 8px;
|
||||
gap: 4px;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
background: #2d2d30;
|
||||
}
|
||||
|
||||
.tileset-tool-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
padding: 8px 4px;
|
||||
background: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.tileset-tool-btn span {
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tileset-tool-btn svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.tileset-tool-btn:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
border-color: #4c4c4c;
|
||||
}
|
||||
|
||||
.tileset-tool-btn.active {
|
||||
background: linear-gradient(180deg, #ffc107 0%, #e6a800 100%);
|
||||
border-color: #cc9600;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.tileset-tool-btn.active:hover {
|
||||
background: linear-gradient(180deg, #ffd54f 0%, #ffca28 100%);
|
||||
}
|
||||
|
||||
.tileset-tool-btn.active svg {
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
/* ==================== Tileset Selector Section ==================== */
|
||||
.tileset-selector {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.tileset-selector-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.tileset-selector label {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.tileset-selector-actions {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.tileset-action-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
|
||||
.tileset-action-btn svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.tileset-action-btn:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
/* ==================== Tileset Dropdown ==================== */
|
||||
.tileset-dropdown-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tileset-dropdown-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
padding: 0 8px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
color: #c0c0c0;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.1s ease;
|
||||
}
|
||||
|
||||
.tileset-dropdown-btn:hover {
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.tileset-dropdown-btn span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tileset-dropdown-btn svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
color: #888;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tileset-dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin-top: 2px;
|
||||
background: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
||||
z-index: 100;
|
||||
max-height: 180px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.tileset-dropdown-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
padding: 0 10px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #c0c0c0;
|
||||
font-size: 11px;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s ease;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.tileset-dropdown-item:hover {
|
||||
background: #3c3c3c;
|
||||
}
|
||||
|
||||
.tileset-dropdown-item.selected {
|
||||
background: #094771;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tileset-dropdown-item.add-new {
|
||||
color: #4fc3f7;
|
||||
}
|
||||
|
||||
.tileset-dropdown-divider {
|
||||
height: 1px;
|
||||
background: #3c3c3c;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
/* ==================== Header with Zoom and Title ==================== */
|
||||
.tileset-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 28px;
|
||||
padding: 0 8px;
|
||||
background: #2a2a2a;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.tileset-zoom-label {
|
||||
font-size: 10px;
|
||||
color: #666;
|
||||
margin-right: 8px;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
}
|
||||
|
||||
.tileset-title {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
/* ==================== Preview Area ==================== */
|
||||
.tileset-preview-area {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 180px;
|
||||
overflow: auto;
|
||||
background: #1a1a1a;
|
||||
}
|
||||
|
||||
.tileset-empty-hint {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ==================== Collision Mode Hint ==================== */
|
||||
.collision-mode-hint {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.collision-mode-hint svg {
|
||||
color: #0078d4;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.collision-mode-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #e0e0e0;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.collision-mode-desc {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.tileset-select-btn {
|
||||
padding: 8px 16px;
|
||||
background: transparent;
|
||||
border: 1px dashed #444;
|
||||
border-radius: 3px;
|
||||
color: #4fc3f7;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.tileset-select-btn:hover {
|
||||
background: rgba(79, 195, 247, 0.1);
|
||||
border-color: #4fc3f7;
|
||||
}
|
||||
|
||||
/* ==================== Selection Info ==================== */
|
||||
.tileset-selection-info {
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
font-size: 10px;
|
||||
color: #888;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border-top: 1px solid #1a1a1a;
|
||||
background: #2d2d30;
|
||||
}
|
||||
|
||||
/* ==================== Scrollbar ==================== */
|
||||
.tileset-preview-area::-webkit-scrollbar,
|
||||
.tileset-dropdown-menu::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.tileset-preview-area::-webkit-scrollbar-track,
|
||||
.tileset-dropdown-menu::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.tileset-preview-area::-webkit-scrollbar-thumb,
|
||||
.tileset-dropdown-menu::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.tileset-preview-area::-webkit-scrollbar-thumb:hover,
|
||||
.tileset-dropdown-menu::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
@@ -0,0 +1,722 @@
|
||||
/* ==================== Tilemap Details Panel Styles ==================== */
|
||||
|
||||
.tilemap-details-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #252526;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* ==================== Header ==================== */
|
||||
.details-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 32px;
|
||||
padding: 0 10px;
|
||||
background: #2d2d30;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.details-header-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.details-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.details-search-inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.details-search-inline svg {
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.details-search-inline input {
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #c0c0c0;
|
||||
font-size: 11px;
|
||||
width: 60px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.details-search-inline input::placeholder {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.details-settings-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
|
||||
.details-settings-btn:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
/* ==================== Content ==================== */
|
||||
.details-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.details-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
color: #555;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ==================== Section Styles ==================== */
|
||||
.details-section {
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.details-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 28px;
|
||||
padding: 0 10px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: #c0c0c0;
|
||||
background: #2a2a2a;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s ease;
|
||||
}
|
||||
|
||||
.details-section-header:hover {
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.details-section-header svg {
|
||||
color: #888;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.details-section-content {
|
||||
padding: 6px 0;
|
||||
background: #252526;
|
||||
}
|
||||
|
||||
/* ==================== Property Row ==================== */
|
||||
.property-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 26px;
|
||||
padding: 0 10px 0 20px;
|
||||
}
|
||||
|
||||
.property-row:hover {
|
||||
background: #2a2a2a;
|
||||
}
|
||||
|
||||
.property-row.indented {
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.property-row label {
|
||||
flex: 0 0 100px;
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.property-value {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* ==================== Layer Count Badge ==================== */
|
||||
.layer-count-badge {
|
||||
font-size: 11px;
|
||||
color: #4fc3f7;
|
||||
background: rgba(79, 195, 247, 0.15);
|
||||
padding: 2px 8px;
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* ==================== Input Styles ==================== */
|
||||
.property-row input[type="number"],
|
||||
.property-row input[type="text"],
|
||||
.property-row select {
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
padding: 0 6px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 2px;
|
||||
color: #c0c0c0;
|
||||
font-size: 11px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.property-row input[type="number"]:focus,
|
||||
.property-row input[type="text"]:focus,
|
||||
.property-row select:focus {
|
||||
border-color: #0078d4;
|
||||
}
|
||||
|
||||
/* ==================== Toggle Row ==================== */
|
||||
.toggle-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* ==================== Property Toggle - Unified Style ==================== */
|
||||
.property-toggle {
|
||||
position: relative;
|
||||
width: 36px;
|
||||
height: 18px;
|
||||
border-radius: 9px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.property-toggle-off {
|
||||
background: #2a2a2a;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
|
||||
.property-toggle-off:hover:not(:disabled) {
|
||||
background: #333;
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.property-toggle-on {
|
||||
background: #3b82f6;
|
||||
border: 1px solid #3b82f6;
|
||||
}
|
||||
|
||||
.property-toggle-on:hover:not(:disabled) {
|
||||
background: #2563eb;
|
||||
border-color: #2563eb;
|
||||
}
|
||||
|
||||
.property-toggle:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.property-toggle-thumb {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
transition: transform 0.15s ease;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.property-toggle-off .property-toggle-thumb {
|
||||
left: 2px;
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.property-toggle-on .property-toggle-thumb {
|
||||
left: 2px;
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
/* Color Field */
|
||||
.property-color-wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.property-color-preview {
|
||||
width: 32px;
|
||||
height: 22px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #3a3a3a;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.property-color-preview:hover {
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.property-input-color {
|
||||
width: 0;
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.property-input-color-text {
|
||||
flex: 1;
|
||||
min-width: 60px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.property-input {
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3a3a3a;
|
||||
border-radius: 2px;
|
||||
padding: 0 6px;
|
||||
color: #ddd;
|
||||
font-size: 11px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.property-input:hover {
|
||||
border-color: #4a4a4a;
|
||||
}
|
||||
|
||||
.property-input:focus {
|
||||
outline: none;
|
||||
border-color: #d4a029;
|
||||
}
|
||||
|
||||
/* ==================== Asset Dropdown Button ==================== */
|
||||
.asset-dropdown {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
padding: 0 6px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 2px;
|
||||
color: #c0c0c0;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.asset-dropdown:hover {
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.asset-dropdown span {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.asset-dropdown svg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
color: #888;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ==================== Material Field - AssetField Style ==================== */
|
||||
.material-section-content {
|
||||
padding: 8px 10px 8px 20px;
|
||||
}
|
||||
|
||||
.material-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.material-field__label {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.material-field__content {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Thumbnail Preview */
|
||||
.material-field__thumbnail {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3a3a3a;
|
||||
border-radius: 2px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
transition: border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.material-field__thumbnail:hover {
|
||||
border-color: #4a4a4a;
|
||||
}
|
||||
|
||||
.material-field__thumbnail-icon {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* Right side container */
|
||||
.material-field__right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Dropdown selector */
|
||||
.material-field__dropdown {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 22px;
|
||||
padding: 0 8px;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #3a3a3a;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s ease;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.material-field__dropdown:hover {
|
||||
border-color: #4a4a4a;
|
||||
}
|
||||
|
||||
.material-field__value {
|
||||
flex: 1;
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.material-field__dropdown.has-value .material-field__value {
|
||||
color: #ddd;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.material-field__dropdown-arrow {
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* Action buttons row */
|
||||
.material-field__actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.material-field__btn {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #2a2a2a;
|
||||
border: 1px solid #3a3a3a;
|
||||
border-radius: 2px;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.material-field__btn:hover {
|
||||
background: #3a3a3a;
|
||||
border-color: #4a4a4a;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.material-field__btn--clear:hover {
|
||||
background: #4a2020;
|
||||
border-color: #5a3030;
|
||||
color: #f87171;
|
||||
}
|
||||
|
||||
/* ==================== Layer List ==================== */
|
||||
.layer-list-container {
|
||||
margin: 4px 10px 4px 20px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 2px;
|
||||
max-height: 100px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.layer-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
color: #c0c0c0;
|
||||
cursor: pointer;
|
||||
transition: background 0.1s ease;
|
||||
}
|
||||
|
||||
.layer-list-item:hover {
|
||||
background: #2a2a2a;
|
||||
}
|
||||
|
||||
.layer-list-item.selected {
|
||||
background: #094771;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.layer-list-item .layer-icon {
|
||||
font-size: 9px;
|
||||
color: #4fc3f7;
|
||||
}
|
||||
|
||||
/* ==================== Layer Visibility Button ==================== */
|
||||
.layer-visibility-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
color: #4fc3f7;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.layer-visibility-btn:hover {
|
||||
background: rgba(79, 195, 247, 0.2);
|
||||
}
|
||||
|
||||
.layer-visibility-btn.hidden {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.layer-visibility-btn.hidden:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.layer-list-item.selected .layer-visibility-btn {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.layer-list-item.selected .layer-visibility-btn.hidden {
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
/* ==================== Layer Action Buttons ==================== */
|
||||
.layer-actions-row {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
padding: 4px 10px 6px 20px;
|
||||
}
|
||||
|
||||
.layer-action-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: #2d2d30;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 2px;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
|
||||
.layer-action-btn svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.layer-action-btn:hover:not(:disabled) {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.layer-action-btn:disabled {
|
||||
opacity: 0.35;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.layer-action-btn.add {
|
||||
background: #1a3a1a;
|
||||
border-color: #2a5a2a;
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
.layer-action-btn.add:hover {
|
||||
background: #2a5a2a;
|
||||
color: #7cd87c;
|
||||
}
|
||||
|
||||
.layer-action-btn.danger:hover:not(:disabled) {
|
||||
background: #5a2020;
|
||||
border-color: #7a3030;
|
||||
color: #f06060;
|
||||
}
|
||||
|
||||
/* ==================== Selected Layer Name ==================== */
|
||||
.selected-layer-name {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
.selected-layer-name.editable {
|
||||
cursor: text;
|
||||
padding: 2px 4px;
|
||||
border-radius: 2px;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
|
||||
.selected-layer-name.editable:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.layer-name-input {
|
||||
width: 100%;
|
||||
height: 22px;
|
||||
padding: 0 6px;
|
||||
background: #1e1e1e;
|
||||
border: 1px solid #0078d4;
|
||||
border-radius: 2px;
|
||||
color: #c0c0c0;
|
||||
font-size: 11px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* ==================== Select Dropdown ==================== */
|
||||
.property-row select {
|
||||
appearance: none;
|
||||
padding-right: 20px;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 6px center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ==================== Slider Property ==================== */
|
||||
.slider-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.property-slider {
|
||||
flex: 1;
|
||||
height: 4px;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background: #3c3c3c;
|
||||
border-radius: 2px;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.property-slider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #0078d4;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
|
||||
.property-slider::-webkit-slider-thumb:hover {
|
||||
background: #1a8cff;
|
||||
}
|
||||
|
||||
.property-slider::-moz-range-thumb {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #0078d4;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.slider-value {
|
||||
font-size: 10px;
|
||||
color: #888;
|
||||
min-width: 32px;
|
||||
text-align: right;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
}
|
||||
|
||||
/* ==================== Scrollbar ==================== */
|
||||
.details-content::-webkit-scrollbar,
|
||||
.layer-list-container::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.details-content::-webkit-scrollbar-track,
|
||||
.layer-list-container::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.details-content::-webkit-scrollbar-thumb,
|
||||
.layer-list-container::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.details-content::-webkit-scrollbar-thumb:hover,
|
||||
.layer-list-container::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
@@ -0,0 +1,564 @@
|
||||
/* ==================== Tilemap Editor Styles ==================== */
|
||||
|
||||
/* Main Panel - 3-Column Layout */
|
||||
.tilemap-editor-panel {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
background: #1e1e1e;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
/* ==================== Panel Divider ==================== */
|
||||
.panel-divider {
|
||||
flex-shrink: 0;
|
||||
background: #1a1a1a;
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
|
||||
.panel-divider.horizontal {
|
||||
width: 4px;
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.panel-divider.vertical {
|
||||
height: 4px;
|
||||
cursor: row-resize;
|
||||
}
|
||||
|
||||
.panel-divider:hover {
|
||||
background: #0078d4;
|
||||
}
|
||||
|
||||
.panel-divider:active {
|
||||
background: #005a9e;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.tilemap-editor-panel .tilemap-editor-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tilemap-editor-panel .tilemap-editor-empty svg {
|
||||
margin-bottom: 16px;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.tilemap-editor-panel .tilemap-editor-empty h3 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.tilemap-editor-panel .tilemap-editor-empty p {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* ==================== Center Viewport ==================== */
|
||||
.tilemap-viewport {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
background: #1a1a1a;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ==================== Viewport Toolbar - 优化样式 ==================== */
|
||||
.viewport-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 32px;
|
||||
padding: 0 6px;
|
||||
background: #2d2d30;
|
||||
border-bottom: 1px solid #1a1a1a;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.viewport-toolbar-left,
|
||||
.viewport-toolbar-center,
|
||||
.viewport-toolbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.viewport-toolbar-center {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.viewport-btn-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1px;
|
||||
background: #252526;
|
||||
border-radius: 3px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.viewport-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 3px;
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
color: #a0a0a0;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.viewport-btn:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.viewport-btn.active {
|
||||
background: #094771;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.viewport-btn.icon {
|
||||
width: 24px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.viewport-btn.snap-btn {
|
||||
padding: 0 6px;
|
||||
gap: 2px;
|
||||
font-size: 10px;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
}
|
||||
|
||||
.viewport-btn.snap-btn svg {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.viewport-separator {
|
||||
width: 1px;
|
||||
height: 18px;
|
||||
background: #3c3c3c;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.zoom-display {
|
||||
min-width: 36px;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: #a0a0a0;
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
}
|
||||
|
||||
/* Exit fullscreen button */
|
||||
.viewport-btn.exit-fullscreen {
|
||||
background: linear-gradient(180deg, #e05a50 0%, #c0443a 100%);
|
||||
color: #fff;
|
||||
padding: 0 10px;
|
||||
gap: 4px;
|
||||
font-weight: 500;
|
||||
border: 1px solid #a03028;
|
||||
}
|
||||
|
||||
.viewport-btn.exit-fullscreen:hover {
|
||||
background: linear-gradient(180deg, #f06a60 0%, #d0544a 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* ==================== Info Overlay ==================== */
|
||||
.viewport-info-overlay {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 8px;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(30, 30, 30, 0.95);
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 3px;
|
||||
font-size: 11px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.viewport-info-overlay .info-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: #888;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.viewport-info-overlay .info-item strong {
|
||||
color: #c0c0c0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.viewport-info-overlay .info-item.warning {
|
||||
color: #e6a700;
|
||||
}
|
||||
|
||||
.viewport-info-overlay .info-item.warning svg {
|
||||
flex-shrink: 0;
|
||||
color: #e6a700;
|
||||
}
|
||||
|
||||
/* ==================== Canvas Container ==================== */
|
||||
.viewport-canvas-container {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
background:
|
||||
linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
|
||||
linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
|
||||
linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
|
||||
linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
|
||||
background-size: 20px 20px;
|
||||
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.tilemap-canvas-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tilemap-canvas {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ==================== Ruler ==================== */
|
||||
.viewport-ruler {
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.ruler-marker {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.ruler-line {
|
||||
width: 100px;
|
||||
height: 2px;
|
||||
background: #555;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ruler-line::before,
|
||||
.ruler-line::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
width: 2px;
|
||||
height: 10px;
|
||||
background: #555;
|
||||
}
|
||||
|
||||
.ruler-line::before {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.ruler-line::after {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.ruler-marker span {
|
||||
font-size: 10px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* ==================== Watermark ==================== */
|
||||
.viewport-watermark {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: rgba(255, 255, 255, 0.08);
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
/* ==================== Icon Buttons ==================== */
|
||||
.icon-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
background: transparent;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.icon-button:disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.icon-button.small {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.icon-button.danger:hover {
|
||||
background: #5a1d1d;
|
||||
color: #f48771;
|
||||
}
|
||||
|
||||
/* ==================== Asset Picker Dialog ==================== */
|
||||
.asset-picker-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.asset-picker-dialog {
|
||||
width: 500px;
|
||||
max-height: 600px;
|
||||
background: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.asset-picker-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #3c3c3c;
|
||||
}
|
||||
|
||||
.asset-picker-header h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.asset-picker-close {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.asset-picker-close:hover {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.asset-picker-search {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
border-bottom: 1px solid #3c3c3c;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.asset-picker-search input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #e0e0e0;
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.asset-picker-search input::placeholder {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.asset-picker-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 300px;
|
||||
max-height: 400px;
|
||||
}
|
||||
|
||||
.asset-picker-tree {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.asset-picker-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.asset-picker-item:hover {
|
||||
background: #2d2d30;
|
||||
}
|
||||
|
||||
.asset-picker-item.selected {
|
||||
background: #094771;
|
||||
}
|
||||
|
||||
.asset-picker-item-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.asset-picker-item-name {
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.asset-picker-loading,
|
||||
.asset-picker-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.asset-picker-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
border-top: 1px solid #3c3c3c;
|
||||
}
|
||||
|
||||
.asset-picker-selected {
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.asset-picker-selected .placeholder {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.asset-picker-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.asset-picker-actions button {
|
||||
padding: 6px 12px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.asset-picker-actions .btn-cancel {
|
||||
background: #3c3c3c;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
.asset-picker-actions .btn-cancel:hover {
|
||||
background: #4c4c4c;
|
||||
}
|
||||
|
||||
.asset-picker-actions .btn-confirm {
|
||||
background: #0078d4;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.asset-picker-actions .btn-confirm:hover:not(:disabled) {
|
||||
background: #106ebe;
|
||||
}
|
||||
|
||||
.asset-picker-actions .btn-confirm:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.asset-picker-preview {
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
background: #252526;
|
||||
border: 1px solid #3c3c3c;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.asset-picker-preview img {
|
||||
display: block;
|
||||
max-width: 150px;
|
||||
max-height: 150px;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
/* ==================== Tileset Canvas ==================== */
|
||||
.tileset-canvas {
|
||||
cursor: crosshair;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
Reference in New Issue
Block a user