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,377 @@
|
||||
/**
|
||||
* Animation Preview Panel Styles
|
||||
* 动画预览面板样式
|
||||
*/
|
||||
|
||||
.animation-preview-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background: var(--panel-background, #1e1e1e);
|
||||
color: var(--text-color, #cccccc);
|
||||
font-size: 12px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.animation-preview-panel.loading,
|
||||
.animation-preview-panel.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
color: var(--text-muted, #888888);
|
||||
}
|
||||
|
||||
.animation-preview-panel.loading .spin {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.animation-preview-panel.empty p {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.animation-preview-panel.empty .hint {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted, #666666);
|
||||
}
|
||||
|
||||
/* Header | 头部 */
|
||||
.panel-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 12px;
|
||||
background: var(--header-background, #252526);
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.asset-name {
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
color: var(--text-muted, #888888);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
background: var(--button-hover, #3c3c3c);
|
||||
color: var(--text-color, #cccccc);
|
||||
}
|
||||
|
||||
/* 3D Preview Viewport | 3D 预览视口 */
|
||||
.preview-viewport {
|
||||
padding: 8px;
|
||||
background: #1a1a1e;
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.preview-viewport canvas {
|
||||
display: block;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.model-preview-3d {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* No mesh message | 无网格消息 */
|
||||
.no-mesh-message {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px;
|
||||
background: var(--section-background, #2d2d2d);
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
color: var(--text-muted, #666666);
|
||||
}
|
||||
|
||||
/* Animation selector | 动画选择器 */
|
||||
.animation-selector {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.animation-selector label {
|
||||
flex-shrink: 0;
|
||||
color: var(--text-muted, #888888);
|
||||
}
|
||||
|
||||
.select-wrapper {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.select-wrapper select {
|
||||
width: 100%;
|
||||
padding: 4px 24px 4px 8px;
|
||||
background: var(--input-background, #3c3c3c);
|
||||
border: 1px solid var(--border-color, #5c5c5c);
|
||||
border-radius: 3px;
|
||||
color: var(--text-color, #cccccc);
|
||||
font-size: 12px;
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select-wrapper select:hover {
|
||||
border-color: var(--border-hover, #007acc);
|
||||
}
|
||||
|
||||
.select-wrapper svg {
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
pointer-events: none;
|
||||
color: var(--text-muted, #888888);
|
||||
}
|
||||
|
||||
/* Animation info | 动画信息 */
|
||||
.animation-info {
|
||||
padding: 8px 12px;
|
||||
background: var(--section-background, #2d2d2d);
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 2px 0;
|
||||
color: var(--text-muted, #888888);
|
||||
}
|
||||
|
||||
.info-row svg {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Timeline | 时间轴 */
|
||||
.timeline-section {
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.time-display {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 8px;
|
||||
font-family: monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.current-time {
|
||||
color: var(--accent-color, #007acc);
|
||||
}
|
||||
|
||||
.separator {
|
||||
color: var(--text-muted, #666666);
|
||||
}
|
||||
|
||||
.total-time {
|
||||
color: var(--text-muted, #888888);
|
||||
}
|
||||
|
||||
.timeline-track {
|
||||
position: relative;
|
||||
height: 20px;
|
||||
background: var(--track-background, #3c3c3c);
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.timeline-slider {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.timeline-slider::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
width: 12px;
|
||||
height: 20px;
|
||||
background: var(--accent-color, #007acc);
|
||||
border-radius: 2px;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.timeline-slider::-webkit-slider-thumb:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.timeline-slider::-moz-range-thumb {
|
||||
width: 12px;
|
||||
height: 20px;
|
||||
background: var(--accent-color, #007acc);
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.timeline-progress {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
background: var(--progress-color, rgba(0, 122, 204, 0.3));
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* Playback controls | 播放控制 */
|
||||
.playback-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.control-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: var(--button-background, #3c3c3c);
|
||||
border: 1px solid var(--border-color, #5c5c5c);
|
||||
border-radius: 4px;
|
||||
color: var(--text-color, #cccccc);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.control-button:hover {
|
||||
background: var(--button-hover, #4c4c4c);
|
||||
border-color: var(--border-hover, #007acc);
|
||||
}
|
||||
|
||||
.control-button:active {
|
||||
background: var(--button-active, #2c2c2c);
|
||||
}
|
||||
|
||||
.control-button.primary {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: var(--accent-color, #007acc);
|
||||
border-color: var(--accent-color, #007acc);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.control-button.primary:hover {
|
||||
background: var(--accent-hover, #1e8ad2);
|
||||
border-color: var(--accent-hover, #1e8ad2);
|
||||
}
|
||||
|
||||
/* Playback options | 播放选项 */
|
||||
.playback-options {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.option-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.option-row label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: var(--text-muted, #888888);
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.option-row select {
|
||||
padding: 2px 6px;
|
||||
background: var(--input-background, #3c3c3c);
|
||||
border: 1px solid var(--border-color, #5c5c5c);
|
||||
border-radius: 3px;
|
||||
color: var(--text-color, #cccccc);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.option-row input[type="checkbox"] {
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* No animations | 无动画 */
|
||||
.no-animations {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 16px;
|
||||
color: var(--text-muted, #666666);
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Model info | 模型信息 */
|
||||
.model-info {
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: var(--text-muted, #888888);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.model-info .info-row {
|
||||
color: var(--text-muted, #888888);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* Skeleton info | 骨骼信息 */
|
||||
.skeleton-info {
|
||||
padding: 12px;
|
||||
border-top: 1px solid var(--border-color, #3c3c3c);
|
||||
}
|
||||
|
||||
.skeleton-info .info-row {
|
||||
color: var(--text-muted, #888888);
|
||||
}
|
||||
Reference in New Issue
Block a user