fix(editor): fix build errors and refactor behavior-tree architecture (#394)

* docs: add editor-app README with setup instructions

* docs: add separate EN/CN editor setup guides

* fix(editor): fix build errors and refactor behavior-tree architecture

- Fix fairygui-editor tsconfig extends path and add missing tsconfig.build.json
- Refactor behavior-tree-editor to not depend on asset-system in runtime
  - Create local BehaviorTreeRuntimeModule for pure runtime logic
  - Move asset loader registration to editor module install()
  - Add BehaviorTreeLoader for asset system integration
- Fix rapier2d WASM loader to not pass arguments to init()
- Add WASM base64 loader config to rapier2d tsup.config
- Update README documentation and simplify setup steps
This commit is contained in:
YHH
2025-12-30 11:13:26 +08:00
committed by GitHub
parent d21caa974e
commit b28169b186
25 changed files with 852 additions and 625 deletions

View File

@@ -121,9 +121,9 @@ export class WeChatRapier2DLoader implements IWasmLibraryLoader<RapierModule> {
// 导入 Rapier2D 标准版
const RAPIER = await import('@esengine/rapier2d');
// 初始化 WASM - 标准版需要提供 WASM 路径
const wasmPath = this._config.minigame?.wasmPath || 'wasm/rapier_wasm2d_bg.wasm';
await RAPIER.init(wasmPath);
// 初始化 WASM - WASM 已经作为 base64 嵌入到包中
// Initialize WASM - WASM is embedded as base64 in the package
await RAPIER.init();
return RAPIER;
} finally {

View File

@@ -53,10 +53,9 @@ export class WebRapier2DLoader implements IWasmLibraryLoader<RapierModule> {
// 动态导入标准版
const RAPIER = await import('@esengine/rapier2d');
// 初始化 WASM - 标准版需要提供 WASM 路径
// 构建时 WASM 文件会被复制到 wasm/ 目录
const wasmPath = this._config.web?.wasmPath || 'wasm/rapier_wasm2d_bg.wasm';
await RAPIER.init(wasmPath);
// 初始化 WASM - WASM 已经作为 base64 嵌入到包中
// Initialize WASM - WASM is embedded as base64 in the package
await RAPIER.init();
console.log(`[${this._config.name}] 加载完成`);
return RAPIER;