feat(blueprint): refactor BlueprintComponent as proper ECS Component (#433)
* feat(blueprint): refactor BlueprintComponent as proper ECS Component - Convert BlueprintComponent from interface to actual ECS Component class - Add ready-to-use BlueprintSystem that extends EntitySystem - Remove deprecated legacy APIs (createBlueprintSystem, etc.) - Update all blueprint documentation (Chinese & English) - Simplify user API: just add BlueprintSystem and BlueprintComponent BREAKING CHANGE: BlueprintComponent is now a class extending Component, not an interface. Use `new BlueprintComponent()` instead of `createBlueprintComponentData()`. * chore(blueprint): add changeset for ECS component refactor * fix(node-editor): fix connections not rendering when node is collapsed - getPinPosition now returns node header position when pin element is not found - Added collapsedNodesKey to force re-render connections after collapse/expand - Input pins connect to left side, output pins to right side of collapsed nodes * chore(node-editor): add changeset for collapse connection fix * feat(blueprint): add Add Component nodes for entity-component creation - Add type-specific Add_ComponentName nodes via ComponentNodeGenerator - Add generic ECS_AddComponent node for dynamic component creation - Add ExecutionContext.getComponentClass() for component lookup - Add registerComponentClass() helper for manual component registration - Each Add node supports initial property values from @BlueprintProperty * docs: update changeset with Add Component feature * feat(blueprint): improve event nodes with Self output and auto-create BeginPlay - Event Begin Play now outputs Self entity - Event Tick now outputs Self entity + Delta Seconds - Event End Play now outputs Self entity - createEmptyBlueprint() now includes Event Begin Play by default - Added menuPath to all event nodes for better organization
This commit is contained in:
16
.changeset/blueprint-ecs-component.md
Normal file
16
.changeset/blueprint-ecs-component.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
"@esengine/blueprint": minor
|
||||
---
|
||||
|
||||
feat(blueprint): 添加 Add Component 节点支持 + ECS 模式重构
|
||||
|
||||
新功能:
|
||||
- 为每个 @BlueprintExpose 组件自动生成 Add_ComponentName 节点
|
||||
- Add 节点支持设置初始属性值
|
||||
- 添加通用 ECS_AddComponent 节点用于动态添加组件
|
||||
- 添加 registerComponentClass() 用于手动注册组件类
|
||||
|
||||
重构:
|
||||
- BlueprintComponent 使用 @ECSComponent 装饰器注册
|
||||
- BlueprintSystem 继承标准 System 基类
|
||||
- 简化组件 API,优化 VM 生命周期管理
|
||||
Reference in New Issue
Block a user