refactor(core): 移除 _activeWorlds 并优化 WorldManager 清理机制 (#220)

* refactor(core): 将 WorldManager 清理机制从定时器改为帧驱动

* refactor(core): 移除 WorldManager _activeWorlds 优化,简化状态管理

* test(core): 补充 WorldManager 测试用例

* docs(core): 更新 WorldManager cleanupFrameInterval 配置说明
This commit is contained in:
LINGYE
2025-11-09 17:35:07 +08:00
committed by GitHub
parent 6242c6daf3
commit b12cfba353
3 changed files with 389 additions and 178 deletions

View File

@@ -435,7 +435,7 @@ const worldManager = Core.services.resolve(WorldManager);
// {
// maxWorlds: 50,
// autoCleanup: true,
// cleanupInterval: 30000 // 30 秒
// cleanupFrameInterval: 1800 // 间隔多少帧清理闲置 World
// }
```