- 캔버스 편집 UI 표시/숨김 기능을 추가했습니다. - 에디터 툴바에 토글 버튼을 추가하여 UI 표시 상태를 제어할 수 있습니다. - 에디터 UI가 숨겨졌을 때 캔버스에 마우스 이벤트가 전달되지 않도록 수정했습니다.
328 lines
6.0 KiB
CSS
328 lines
6.0 KiB
CSS
/* src/editor/editor.css */
|
|
.distortion-editor {
|
|
font-family:
|
|
-apple-system,
|
|
BlinkMacSystemFont,
|
|
"Segoe UI",
|
|
Roboto,
|
|
sans-serif;
|
|
background: #1e1e1e;
|
|
color: #e0e0e0;
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
.editor-toolbar {
|
|
max-width: 1600px;
|
|
margin: 0 auto 16px;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 12px;
|
|
}
|
|
.editor-toggle-btn {
|
|
padding: 10px 20px;
|
|
background: #383838;
|
|
color: #e0e0e0;
|
|
border: 2px solid #555;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.editor-toggle-btn:hover {
|
|
background: #404040;
|
|
border-color: #00aaff;
|
|
}
|
|
.editor-toggle-btn.active {
|
|
background: #2d5a7a;
|
|
border-color: #00aaff;
|
|
color: #fff;
|
|
}
|
|
.editor-main {
|
|
display: flex;
|
|
gap: 20px;
|
|
max-width: 1600px;
|
|
margin: 0 auto;
|
|
}
|
|
.editor-canvas-container {
|
|
flex: 1;
|
|
background: #2a2a2a;
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
.editor-canvas {
|
|
position: relative;
|
|
background: #000;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
|
|
}
|
|
.editor-sidebar {
|
|
width: 320px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
}
|
|
.area-list {
|
|
background: #2a2a2a;
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
.area-list-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
.area-list-header h3 {
|
|
margin: 0;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
.btn-add {
|
|
padding: 6px 12px;
|
|
background: #00aaff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.btn-add:hover:not(:disabled) {
|
|
background: #0088cc;
|
|
}
|
|
.btn-add:disabled {
|
|
background: #555;
|
|
cursor: not-allowed;
|
|
opacity: 0.5;
|
|
}
|
|
.area-list-items {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
.area-list-empty {
|
|
text-align: center;
|
|
color: #888;
|
|
padding: 20px;
|
|
font-size: 13px;
|
|
}
|
|
.area-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 12px;
|
|
background: #383838;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
border: 2px solid transparent;
|
|
}
|
|
.area-item:hover {
|
|
background: #404040;
|
|
}
|
|
.area-item.selected {
|
|
background: #2d5a7a;
|
|
border-color: #00aaff;
|
|
}
|
|
.area-item-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
.area-item-name {
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
color: #fff;
|
|
}
|
|
.area-item-strength {
|
|
font-size: 12px;
|
|
color: #aaa;
|
|
}
|
|
.btn-remove {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: #ff4444;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 18px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.btn-remove:hover {
|
|
background: #cc0000;
|
|
}
|
|
.parameter-panel {
|
|
background: #2a2a2a;
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
}
|
|
.parameter-panel h3 {
|
|
margin: 0 0 16px 0;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
.parameter-panel-empty {
|
|
text-align: center;
|
|
color: #888;
|
|
padding: 40px 20px;
|
|
font-size: 13px;
|
|
}
|
|
.parameter-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
.parameter-group label {
|
|
display: block;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: #ccc;
|
|
margin-bottom: 8px;
|
|
}
|
|
.slider {
|
|
width: 100%;
|
|
height: 6px;
|
|
border-radius: 3px;
|
|
background: #444;
|
|
outline: none;
|
|
-webkit-appearance: none;
|
|
}
|
|
.slider::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background: #00aaff;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.slider::-webkit-slider-thumb:hover {
|
|
background: #0088cc;
|
|
}
|
|
.slider::-moz-range-thumb {
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background: #00aaff;
|
|
cursor: pointer;
|
|
border: none;
|
|
transition: background 0.2s;
|
|
}
|
|
.slider::-moz-range-thumb:hover {
|
|
background: #0088cc;
|
|
}
|
|
.input-number {
|
|
width: 100%;
|
|
padding: 8px;
|
|
background: #383838;
|
|
border: 1px solid #555;
|
|
border-radius: 4px;
|
|
color: #fff;
|
|
font-size: 14px;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
}
|
|
.input-number:focus {
|
|
border-color: #00aaff;
|
|
}
|
|
.select {
|
|
width: 100%;
|
|
padding: 8px;
|
|
background: #383838;
|
|
border: 1px solid #555;
|
|
border-radius: 4px;
|
|
color: #fff;
|
|
font-size: 14px;
|
|
outline: none;
|
|
cursor: pointer;
|
|
transition: border-color 0.2s;
|
|
}
|
|
.select:focus {
|
|
border-color: #00aaff;
|
|
}
|
|
.points-display {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
.point-coord {
|
|
padding: 8px;
|
|
background: #383838;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-family: "Courier New", monospace;
|
|
color: #aaa;
|
|
}
|
|
.point-handle {
|
|
z-index: 10;
|
|
transition: transform 0.1s, box-shadow 0.1s;
|
|
}
|
|
.point-handle:hover {
|
|
transform: translate(-50%, -50%) scale(1.2);
|
|
box-shadow: 0 4px 8px rgba(0, 170, 255, 0.5);
|
|
}
|
|
.point-handle.dragging {
|
|
cursor: grabbing;
|
|
transform: translate(-50%, -50%) scale(1.3);
|
|
box-shadow: 0 6px 12px rgba(0, 170, 255, 0.7);
|
|
}
|
|
.area-list-items::-webkit-scrollbar,
|
|
.parameter-panel::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
.area-list-items::-webkit-scrollbar-track,
|
|
.parameter-panel::-webkit-scrollbar-track {
|
|
background: #1e1e1e;
|
|
border-radius: 4px;
|
|
}
|
|
.area-list-items::-webkit-scrollbar-thumb,
|
|
.parameter-panel::-webkit-scrollbar-thumb {
|
|
background: #555;
|
|
border-radius: 4px;
|
|
}
|
|
.area-list-items::-webkit-scrollbar-thumb:hover,
|
|
.parameter-panel::-webkit-scrollbar-thumb:hover {
|
|
background: #666;
|
|
}
|
|
@media (max-width: 1200px) {
|
|
.editor-main {
|
|
flex-direction: column;
|
|
}
|
|
.editor-sidebar {
|
|
width: 100%;
|
|
flex-direction: row;
|
|
}
|
|
.area-list,
|
|
.parameter-panel {
|
|
flex: 1;
|
|
}
|
|
}
|
|
@media (max-width: 768px) {
|
|
.editor-sidebar {
|
|
flex-direction: column;
|
|
}
|
|
.points-display {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
/*# sourceMappingURL=index.css.map */ |