feat(modules): 添加module.json配置

This commit is contained in:
yhh
2025-12-03 16:20:48 +08:00
parent e1d494b415
commit 37ab494e4a
26 changed files with 2356 additions and 147 deletions

View File

@@ -1,6 +1,6 @@
import type { IScene } from '@esengine/ecs-framework';
import { ComponentRegistry } from '@esengine/ecs-framework';
import type { IRuntimeModule, IPlugin, PluginDescriptor, SystemContext } from '@esengine/engine-core';
import type { IRuntimeModule, IPlugin, ModuleManifest, SystemContext } from '@esengine/engine-core';
import {
UITransformComponent,
@@ -95,18 +95,25 @@ class UIRuntimeModule implements IRuntimeModule {
}
}
const descriptor: PluginDescriptor = {
id: '@esengine/ui',
name: 'UI',
const manifest: ModuleManifest = {
id: 'ui',
name: '@esengine/ui',
displayName: 'UI System',
version: '1.0.0',
description: 'ECS-based UI system',
category: 'ui',
enabledByDefault: true,
isEnginePlugin: true
category: 'Rendering',
icon: 'Layout',
isCore: false,
defaultEnabled: false,
isEngineModule: true,
canContainContent: true,
dependencies: ['core', 'math'],
exports: { components: ['UICanvasComponent'] },
editorPackage: '@esengine/ui-editor'
};
export const UIPlugin: IPlugin = {
descriptor,
manifest,
runtimeModule: new UIRuntimeModule()
};