three-editor-ai 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declare/modules.d.ts +17 -1
- package/dist/index.js +3607 -3531
- package/package.json +1 -1
package/declare/modules.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type Stats from "three/examples/jsm/libs/stats.module.js";
|
|
|
8
8
|
import type { GUI } from "lil-gui";
|
|
9
9
|
import type { Vector3Like } from "./main";
|
|
10
10
|
import type { EditorEventApi } from "./events";
|
|
11
|
+
import type { ComponentMetadata } from "./component";
|
|
11
12
|
|
|
12
13
|
/* ------------------------------------------------------------------ *
|
|
13
14
|
* 场景
|
|
@@ -140,7 +141,7 @@ export interface EffectInstallArgs {
|
|
|
140
141
|
|
|
141
142
|
/**
|
|
142
143
|
* 自定义后期特效描述符。
|
|
143
|
-
* `id` 与 `install` 必填;`id` 已存在时 `installEffect` 直接返回已有 Pass。
|
|
144
|
+
* `id`、`description` 与 `install` 必填;`id` 已存在时 `installEffect` 直接返回已有 Pass。
|
|
144
145
|
*/
|
|
145
146
|
export interface EffectDescriptor {
|
|
146
147
|
/** 必填,唯一标识,同时作为 `effectComposer.SHEET[id]` 的键 */
|
|
@@ -149,6 +150,21 @@ export interface EffectDescriptor {
|
|
|
149
150
|
/** 面板显示名 */
|
|
150
151
|
name?: string;
|
|
151
152
|
|
|
153
|
+
/** 必填,通道描述,说明用途、可配置内容及行为 */
|
|
154
|
+
description: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 安装前的默认值。提供 `meta.init` 时定义对应字段。
|
|
158
|
+
* `install` 读取此对象写入新建的 Pass;已安装的通道不随它变化。
|
|
159
|
+
*/
|
|
160
|
+
initParams?: Record<string, unknown>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* 外层可配置项。`meta.init` 相对 `initParams`,`meta.props` 相对 `install` 返回的 Pass。
|
|
164
|
+
* 内核面板仍使用 `setPanel`。
|
|
165
|
+
*/
|
|
166
|
+
meta?: ComponentMetadata;
|
|
167
|
+
|
|
152
168
|
/** 必填,返回一个 Pass */
|
|
153
169
|
install: (args: EffectInstallArgs) => Pass | null | undefined;
|
|
154
170
|
|