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:
YHH
2025-12-26 14:50:35 +08:00
committed by GitHub
parent a84ff902e4
commit 155411e743
1936 changed files with 4147 additions and 11578 deletions

View File

@@ -0,0 +1,139 @@
.chunk-visualizer {
position: absolute;
pointer-events: none;
z-index: 100;
}
.chunk-visualizer-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.chunk-grid-cell {
position: absolute;
box-sizing: border-box;
border: 1px solid rgba(100, 149, 237, 0.3);
transition: background-color 0.2s ease;
}
.chunk-grid-cell.loaded {
background-color: rgba(100, 149, 237, 0.1);
border-color: rgba(100, 149, 237, 0.5);
}
.chunk-grid-cell.loading {
background-color: rgba(255, 193, 7, 0.2);
border-color: rgba(255, 193, 7, 0.6);
animation: chunk-loading-pulse 1s ease-in-out infinite;
}
.chunk-grid-cell.unloading {
background-color: rgba(255, 87, 34, 0.2);
border-color: rgba(255, 87, 34, 0.5);
}
.chunk-grid-cell.failed {
background-color: rgba(244, 67, 54, 0.2);
border-color: rgba(244, 67, 54, 0.6);
}
.chunk-grid-cell.anchor-chunk {
border-color: rgba(76, 175, 80, 0.8);
border-width: 2px;
}
@keyframes chunk-loading-pulse {
0%, 100% { opacity: 0.5; }
50% { opacity: 1; }
}
.chunk-coord-label {
position: absolute;
top: 2px;
left: 2px;
font-size: 10px;
color: rgba(255, 255, 255, 0.6);
font-family: monospace;
pointer-events: none;
}
.anchor-marker {
position: absolute;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: rgba(76, 175, 80, 0.8);
border: 2px solid #4caf50;
transform: translate(-50%, -50%);
z-index: 101;
}
.anchor-marker::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 4px;
height: 4px;
background-color: white;
border-radius: 50%;
transform: translate(-50%, -50%);
}
.load-radius-indicator {
position: absolute;
border: 2px dashed rgba(76, 175, 80, 0.5);
border-radius: 4px;
pointer-events: none;
}
.unload-radius-indicator {
position: absolute;
border: 1px dashed rgba(255, 87, 34, 0.3);
border-radius: 4px;
pointer-events: none;
}
.chunk-stats-panel {
position: absolute;
top: 8px;
right: 8px;
background: rgba(30, 30, 30, 0.9);
border: 1px solid #3e3e42;
border-radius: 4px;
padding: 8px 12px;
font-size: 11px;
color: #cccccc;
pointer-events: auto;
min-width: 140px;
}
.chunk-stats-panel h4 {
margin: 0 0 6px 0;
font-size: 12px;
color: #ffffff;
border-bottom: 1px solid #3e3e42;
padding-bottom: 4px;
}
.chunk-stats-row {
display: flex;
justify-content: space-between;
margin: 2px 0;
}
.chunk-stats-row .label {
color: #888888;
}
.chunk-stats-row .value {
font-family: monospace;
}
.chunk-stats-row .value.loaded { color: #64b5f6; }
.chunk-stats-row .value.loading { color: #ffc107; }
.chunk-stats-row .value.pending { color: #ff9800; }