@cocos/cocos-cli-types 0.0.1-alpha.22.2 → 0.0.1-alpha.23.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/assets.d.ts +58 -58
- package/builder.d.ts +285 -285
- package/{service.d.ts → cli.d.ts} +161 -1375
- package/configuration.d.ts +1 -1
- package/engine.d.ts +1 -1
- package/index.d.ts +1350 -213
- package/package.json +1 -1
- package/project.d.ts +7 -7
- package/scripting.d.ts +7 -7
package/index.d.ts
CHANGED
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import { __private } from 'cc';
|
|
4
4
|
import { ChunkInfo } from '@cocos/creator-programming-quick-pack/lib/loader';
|
|
5
|
+
import type { Component } from 'cc';
|
|
5
6
|
import { EventEmitter } from 'events';
|
|
7
|
+
import { default as i18n_2 } from 'i18next';
|
|
6
8
|
import { NextFunction } from 'express';
|
|
9
|
+
import type { Node as Node_2 } from 'cc';
|
|
7
10
|
import { Request as Request_2 } from 'express';
|
|
8
11
|
import { Response as Response_2 } from 'express';
|
|
12
|
+
import type { Scene as Scene_2 } from 'cc';
|
|
13
|
+
import type { Vec3 as Vec3_2 } from 'cc';
|
|
9
14
|
|
|
10
15
|
/** 动画剪辑资源的 userData */
|
|
11
|
-
declare interface AnimationClipAssetUserData {
|
|
16
|
+
export declare interface AnimationClipAssetUserData {
|
|
12
17
|
/** 动画名称 */
|
|
13
18
|
name: string;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
declare interface AnimationImportSetting {
|
|
21
|
+
export declare interface AnimationImportSetting {
|
|
17
22
|
/**
|
|
18
23
|
* glTf 中原始动画资源的名称。
|
|
19
24
|
*/
|
|
@@ -103,16 +108,16 @@ declare interface AnimationImportSetting {
|
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
/** 所有资源处理器类型的常量数组(用于 Zod enum 和 TypeScript type) */
|
|
106
|
-
declare const ASSET_HANDLER_TYPES: string[];
|
|
111
|
+
export declare const ASSET_HANDLER_TYPES: string[];
|
|
107
112
|
|
|
108
|
-
declare enum AssetActionEnum {
|
|
113
|
+
export declare enum AssetActionEnum {
|
|
109
114
|
'add' = 0,
|
|
110
115
|
'change' = 1,
|
|
111
116
|
'delete' = 2,
|
|
112
117
|
'none' = 3
|
|
113
118
|
}
|
|
114
119
|
|
|
115
|
-
declare interface AssetChangeInfo {
|
|
120
|
+
export declare interface AssetChangeInfo {
|
|
116
121
|
type: AssetChangeType;
|
|
117
122
|
uuid: string;
|
|
118
123
|
filePath: string;
|
|
@@ -120,12 +125,12 @@ declare interface AssetChangeInfo {
|
|
|
120
125
|
userData: object;
|
|
121
126
|
}
|
|
122
127
|
|
|
123
|
-
declare type AssetChangeType = AssetActionEnum;
|
|
128
|
+
export declare type AssetChangeType = AssetActionEnum;
|
|
124
129
|
|
|
125
130
|
/**
|
|
126
131
|
* 资源数据库启动参数
|
|
127
132
|
*/
|
|
128
|
-
declare interface AssetDBOptions {
|
|
133
|
+
export declare interface AssetDBOptions {
|
|
129
134
|
name: string;
|
|
130
135
|
target: string;
|
|
131
136
|
library: string;
|
|
@@ -147,7 +152,7 @@ declare interface AssetDBOptions {
|
|
|
147
152
|
importConcurrency?: number;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
|
-
declare interface AssetDBOptions_2 {
|
|
155
|
+
export declare interface AssetDBOptions_2 {
|
|
151
156
|
name: string;
|
|
152
157
|
target: string;
|
|
153
158
|
library: string;
|
|
@@ -169,9 +174,9 @@ declare interface AssetDBOptions_2 {
|
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
/** 资源处理器类型(从常量数组派生) */
|
|
172
|
-
declare type AssetHandlerType = typeof ASSET_HANDLER_TYPES[number] | 'database';
|
|
177
|
+
export declare type AssetHandlerType = typeof ASSET_HANDLER_TYPES[number] | 'database';
|
|
173
178
|
|
|
174
|
-
declare interface AssetInfo extends IAssetInfo {
|
|
179
|
+
export declare interface AssetInfo extends IAssetInfo {
|
|
175
180
|
// Asset name
|
|
176
181
|
// 资源名字
|
|
177
182
|
name: string;
|
|
@@ -215,14 +220,14 @@ declare interface AssetInfo extends IAssetInfo {
|
|
|
215
220
|
invalid: boolean;
|
|
216
221
|
}
|
|
217
222
|
|
|
218
|
-
declare interface AssetOperationOption {
|
|
223
|
+
export declare interface AssetOperationOption {
|
|
219
224
|
// 是否强制覆盖已经存在的文件,默认 false,传递后会直接覆盖文件,未传递时有冲突会直接抛异常
|
|
220
225
|
overwrite?: boolean;
|
|
221
226
|
// 是否自动重命名冲突文件,默认 false ,传递后会以内部规则自动重命名冲突文件,新的文件名可以在返回值中获取
|
|
222
227
|
rename?: boolean;
|
|
223
228
|
}
|
|
224
229
|
|
|
225
|
-
declare interface AssetOperationOption {
|
|
230
|
+
export declare interface AssetOperationOption {
|
|
226
231
|
// 是否强制覆盖已经存在的文件,默认 false
|
|
227
232
|
overwrite?: boolean;
|
|
228
233
|
// 是否自动重命名冲突文件,默认 false
|
|
@@ -290,7 +295,7 @@ export declare namespace Assets {
|
|
|
290
295
|
};
|
|
291
296
|
}
|
|
292
297
|
|
|
293
|
-
declare interface AssetUserDataMap {
|
|
298
|
+
export declare interface AssetUserDataMap {
|
|
294
299
|
'animation-clip': AnimationClipAssetUserData;
|
|
295
300
|
'auto-atlas': AutoAtlasAssetUserData;
|
|
296
301
|
'label-atlas': LabelAtlasAssetUserData;
|
|
@@ -328,13 +333,13 @@ declare interface AssetUserDataMap {
|
|
|
328
333
|
}
|
|
329
334
|
|
|
330
335
|
/** 音频资源的 userData */
|
|
331
|
-
declare interface AudioClipAssetUserData {
|
|
336
|
+
export declare interface AudioClipAssetUserData {
|
|
332
337
|
/** 下载模式:0-Web Audio, 1-DOM Audio */
|
|
333
338
|
downloadMode: number;
|
|
334
339
|
}
|
|
335
340
|
|
|
336
341
|
/** 自动图集资源的 userData */
|
|
337
|
-
declare interface AutoAtlasAssetUserData {
|
|
342
|
+
export declare interface AutoAtlasAssetUserData {
|
|
338
343
|
compressed: boolean;
|
|
339
344
|
dest: any;
|
|
340
345
|
/** 打包图像的尺寸 */
|
|
@@ -364,7 +369,7 @@ export declare namespace Base {
|
|
|
364
369
|
};
|
|
365
370
|
}
|
|
366
371
|
|
|
367
|
-
declare interface BaseItem {
|
|
372
|
+
export declare interface BaseItem {
|
|
368
373
|
/**
|
|
369
374
|
* @zh 在项目设置上显示的模块名称,支持 i18n 格式
|
|
370
375
|
* @en the module name displayed on the project settings, can be configured in i18n format.
|
|
@@ -415,7 +420,7 @@ declare interface BaseItem {
|
|
|
415
420
|
}
|
|
416
421
|
|
|
417
422
|
/** 位图字体资源的 userData */
|
|
418
|
-
declare interface BitmapFontAssetUserData {
|
|
423
|
+
export declare interface BitmapFontAssetUserData {
|
|
419
424
|
/** 字体配置 */
|
|
420
425
|
_fntConfig: any;
|
|
421
426
|
/** 字体大小 */
|
|
@@ -424,30 +429,30 @@ declare interface BitmapFontAssetUserData {
|
|
|
424
429
|
textureUuid: string;
|
|
425
430
|
}
|
|
426
431
|
|
|
427
|
-
declare interface CategoryDetail extends CategoryInfo {
|
|
432
|
+
export declare interface CategoryDetail extends CategoryInfo {
|
|
428
433
|
modules: IModules;
|
|
429
434
|
}
|
|
430
435
|
|
|
431
|
-
declare interface CategoryInfo {
|
|
436
|
+
export declare interface CategoryInfo {
|
|
432
437
|
label?: string;
|
|
433
438
|
description?: string;
|
|
434
439
|
checkable?: boolean;
|
|
435
440
|
required?: boolean;
|
|
436
441
|
}
|
|
437
442
|
|
|
438
|
-
declare interface CCEModuleConfig {
|
|
443
|
+
export declare interface CCEModuleConfig {
|
|
439
444
|
description: string;
|
|
440
445
|
main: string;
|
|
441
446
|
types: string;
|
|
442
447
|
}
|
|
443
448
|
|
|
444
|
-
declare type CCEModuleMap = {
|
|
449
|
+
export declare type CCEModuleMap = {
|
|
445
450
|
[moduleName: string]: CCEModuleConfig;
|
|
446
451
|
} & {
|
|
447
452
|
mapLocation: string;
|
|
448
453
|
};
|
|
449
454
|
|
|
450
|
-
declare function close_2(): Promise<void>;
|
|
455
|
+
export declare function close_2(): Promise<void>;
|
|
451
456
|
|
|
452
457
|
export declare namespace Configuration {
|
|
453
458
|
export {
|
|
@@ -473,19 +478,24 @@ export declare namespace Configuration {
|
|
|
473
478
|
/**
|
|
474
479
|
* 配置范围
|
|
475
480
|
*/
|
|
476
|
-
declare type ConfigurationScope = 'default' | 'project';
|
|
481
|
+
export declare type ConfigurationScope = 'default' | 'project';
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* 创建类型
|
|
485
|
+
*/
|
|
486
|
+
export declare const CREATE_TYPES: readonly ['scene', 'prefab'];
|
|
477
487
|
|
|
478
488
|
/**
|
|
479
489
|
* Create Asset // 创建资源
|
|
480
490
|
*/
|
|
481
|
-
declare function createAsset(options: CreateAssetOptions): Promise<IAssetInfo>;
|
|
491
|
+
export declare function createAsset(options: CreateAssetOptions): Promise<IAssetInfo>;
|
|
482
492
|
|
|
483
493
|
/**
|
|
484
494
|
* Create Asset By Type // 按类型创建资源
|
|
485
495
|
*/
|
|
486
|
-
declare function createAssetByType(ccType: ISupportCreateType, dirOrUrl: string, baseName: string, options?: CreateAssetByTypeOptions): Promise<IAssetInfo>;
|
|
496
|
+
export declare function createAssetByType(ccType: ISupportCreateType, dirOrUrl: string, baseName: string, options?: CreateAssetByTypeOptions): Promise<IAssetInfo>;
|
|
487
497
|
|
|
488
|
-
declare interface CreateAssetByTypeOptions extends AssetOperationOption {
|
|
498
|
+
export declare interface CreateAssetByTypeOptions extends AssetOperationOption {
|
|
489
499
|
/**
|
|
490
500
|
* 指定的模板名称,默认为 default
|
|
491
501
|
*/
|
|
@@ -497,7 +507,7 @@ declare interface CreateAssetByTypeOptions extends AssetOperationOption {
|
|
|
497
507
|
content?: string | Buffer | JSON;
|
|
498
508
|
}
|
|
499
509
|
|
|
500
|
-
declare interface CreateAssetOptions {
|
|
510
|
+
export declare interface CreateAssetOptions {
|
|
501
511
|
// 资源创建的输出地址,支持绝对路径和 url
|
|
502
512
|
target: string;
|
|
503
513
|
|
|
@@ -525,10 +535,10 @@ declare interface CreateAssetOptions {
|
|
|
525
535
|
/**
|
|
526
536
|
* Delete Asset // 删除资源
|
|
527
537
|
*/
|
|
528
|
-
declare function deleteAsset(dbPath: string): Promise<IAssetInfo | null>;
|
|
538
|
+
export declare function deleteAsset(dbPath: string): Promise<IAssetInfo | null>;
|
|
529
539
|
|
|
530
540
|
/** 文件夹资源的 userData */
|
|
531
|
-
declare interface DirectoryAssetUserData {
|
|
541
|
+
export declare interface DirectoryAssetUserData {
|
|
532
542
|
/** 是否是资源包 */
|
|
533
543
|
isBundle?: boolean;
|
|
534
544
|
/** 资源包配置 ID */
|
|
@@ -540,7 +550,7 @@ declare interface DirectoryAssetUserData {
|
|
|
540
550
|
}
|
|
541
551
|
|
|
542
552
|
/** Effect 着色器资源的 userData */
|
|
543
|
-
declare interface EffectAssetUserData {
|
|
553
|
+
export declare interface EffectAssetUserData {
|
|
544
554
|
/** 预编译组合 */
|
|
545
555
|
combinations?: any;
|
|
546
556
|
/** 编辑器相关数据 */
|
|
@@ -595,7 +605,7 @@ export declare namespace Engine {
|
|
|
595
605
|
};
|
|
596
606
|
}
|
|
597
607
|
|
|
598
|
-
declare interface EngineInfo {
|
|
608
|
+
export declare interface EngineInfo {
|
|
599
609
|
typescript: {
|
|
600
610
|
type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义)
|
|
601
611
|
builtin: string, // 内置引擎地址
|
|
@@ -610,19 +620,19 @@ declare interface EngineInfo {
|
|
|
610
620
|
version: string;
|
|
611
621
|
}
|
|
612
622
|
|
|
613
|
-
declare type EventEmitterMethods = Pick<EventEmitter, 'on' | 'off' | 'once' | 'emit'>;
|
|
623
|
+
export declare type EventEmitterMethods = Pick<EventEmitter, 'on' | 'off' | 'once' | 'emit'>;
|
|
614
624
|
|
|
615
|
-
declare interface ExecuteAssetDBScriptMethodOptions {
|
|
625
|
+
export declare interface ExecuteAssetDBScriptMethodOptions {
|
|
616
626
|
name: string;
|
|
617
627
|
method: string;
|
|
618
628
|
args?: any[];
|
|
619
629
|
}
|
|
620
630
|
|
|
621
|
-
declare interface Features {
|
|
631
|
+
export declare interface Features {
|
|
622
632
|
[feature: string]: IModuleItem;
|
|
623
633
|
}
|
|
624
634
|
|
|
625
|
-
declare interface FileNameCheckConfig {
|
|
635
|
+
export declare interface FileNameCheckConfig {
|
|
626
636
|
// 匹配规则
|
|
627
637
|
regStr: string;
|
|
628
638
|
// 匹配失败时的提示类型
|
|
@@ -631,16 +641,16 @@ declare interface FileNameCheckConfig {
|
|
|
631
641
|
failedInfo: string;
|
|
632
642
|
}
|
|
633
643
|
|
|
634
|
-
declare type Filter = 'none' | 'nearest' | 'linear';
|
|
644
|
+
export declare type Filter = 'none' | 'nearest' | 'linear';
|
|
635
645
|
|
|
636
|
-
declare interface FilterPluginOptions {
|
|
646
|
+
export declare interface FilterPluginOptions {
|
|
637
647
|
loadPluginInEditor?: boolean;
|
|
638
648
|
loadPluginInWeb?: boolean;
|
|
639
649
|
loadPluginInNative?: boolean;
|
|
640
650
|
loadPluginInMiniGame?: boolean;
|
|
641
651
|
}
|
|
642
652
|
|
|
643
|
-
declare interface FntData {
|
|
653
|
+
export declare interface FntData {
|
|
644
654
|
commonHeight?: number;
|
|
645
655
|
fontSize?: number;
|
|
646
656
|
atlasName?: string;
|
|
@@ -648,7 +658,7 @@ declare interface FntData {
|
|
|
648
658
|
kerningDict?: KerningDict;
|
|
649
659
|
}
|
|
650
660
|
|
|
651
|
-
declare interface FontDef {
|
|
661
|
+
export declare interface FontDef {
|
|
652
662
|
rect: {
|
|
653
663
|
x: number;
|
|
654
664
|
y: number;
|
|
@@ -660,35 +670,35 @@ declare interface FontDef {
|
|
|
660
670
|
xAdvance: number;
|
|
661
671
|
}
|
|
662
672
|
|
|
663
|
-
declare interface FontDefDictionary {
|
|
673
|
+
export declare interface FontDefDictionary {
|
|
664
674
|
[charId: number]: FontDef;
|
|
665
675
|
}
|
|
666
676
|
|
|
667
677
|
/**
|
|
668
678
|
* Generate Thumbnail // 生成资源缩略图
|
|
669
679
|
*/
|
|
670
|
-
declare function generateThumbnail(urlOrUUIDOrPath: string, size?: ThumbnailSize): Promise<ThumbnailInfo | null>;
|
|
680
|
+
export declare function generateThumbnail(urlOrUUIDOrPath: string, size?: ThumbnailSize): Promise<ThumbnailInfo | null>;
|
|
671
681
|
|
|
672
|
-
declare function get<T>(key: string, scope?: ConfigurationScope): Promise<T>;
|
|
682
|
+
export declare function get<T>(key: string, scope?: ConfigurationScope): Promise<T>;
|
|
673
683
|
|
|
674
|
-
declare function get_2(): Promise<Project_2>;
|
|
684
|
+
export declare function get_2(): Promise<Project_2>;
|
|
675
685
|
|
|
676
|
-
declare function getConfig(useDefault?: boolean): Promise<IEngineConfig>;
|
|
686
|
+
export declare function getConfig(useDefault?: boolean): Promise<IEngineConfig>;
|
|
677
687
|
|
|
678
|
-
declare function getConfigPath(): Promise<string>;
|
|
688
|
+
export declare function getConfigPath(): Promise<string>;
|
|
679
689
|
|
|
680
|
-
declare function getInfo(): Promise<EngineInfo>;
|
|
690
|
+
export declare function getInfo(): Promise<EngineInfo>;
|
|
681
691
|
|
|
682
|
-
declare function getInfo_2(): Promise<ProjectInfo>;
|
|
692
|
+
export declare function getInfo_2(): Promise<ProjectInfo>;
|
|
683
693
|
|
|
684
|
-
declare function getMetadata(): Promise<ICocosConfigurationNode[]>;
|
|
694
|
+
export declare function getMetadata(): Promise<ICocosConfigurationNode[]>;
|
|
685
695
|
|
|
686
|
-
declare function getProgrammingFacet(): Promise<ProgrammingFacet>;
|
|
696
|
+
export declare function getProgrammingFacet(): Promise<ProgrammingFacet>;
|
|
687
697
|
|
|
688
698
|
/**
|
|
689
699
|
* Get the MCP registration status.
|
|
690
700
|
*/
|
|
691
|
-
declare function getStatus(): {
|
|
701
|
+
export declare function getStatus(): {
|
|
692
702
|
registered: boolean;
|
|
693
703
|
url?: string;
|
|
694
704
|
};
|
|
@@ -696,7 +706,7 @@ declare function getStatus(): {
|
|
|
696
706
|
/**
|
|
697
707
|
* Get the server running status.
|
|
698
708
|
*/
|
|
699
|
-
declare function getStatus_2(): {
|
|
709
|
+
export declare function getStatus_2(): {
|
|
700
710
|
running: boolean;
|
|
701
711
|
url?: string;
|
|
702
712
|
};
|
|
@@ -705,10 +715,77 @@ declare function getStatus_2(): {
|
|
|
705
715
|
* Get the current server base URL.
|
|
706
716
|
* Returns undefined if the server is not running.
|
|
707
717
|
*/
|
|
708
|
-
declare function getUrl(): string | undefined;
|
|
718
|
+
export declare function getUrl(): string | undefined;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* 全局事件管理器
|
|
722
|
+
* 统一管理所有服务的事件监听,支持类型安全的事件订阅
|
|
723
|
+
*/
|
|
724
|
+
export declare class GlobalEventManager {
|
|
725
|
+
/**
|
|
726
|
+
* 监听指定类型的事件(类型安全版本)
|
|
727
|
+
* @param event 事件名称
|
|
728
|
+
* @param listener 事件监听器
|
|
729
|
+
*/
|
|
730
|
+
on<TEvents extends Record<string, any>>(event: keyof TEvents, listener: TEvents[keyof TEvents] extends void ? () => void : (payload: TEvents[keyof TEvents]) => void): void;
|
|
731
|
+
/**
|
|
732
|
+
* 监听指定类型的事件(通用版本)
|
|
733
|
+
* @param event 事件名称
|
|
734
|
+
* @param listener 事件监听器
|
|
735
|
+
*/
|
|
736
|
+
on(event: string, listener: (...args: any[]) => void): void;
|
|
737
|
+
/**
|
|
738
|
+
* 监听指定类型的事件(一次性,类型安全版本)
|
|
739
|
+
* @param event 事件名称
|
|
740
|
+
* @param listener 事件监听器
|
|
741
|
+
*/
|
|
742
|
+
once<TEvents extends Record<string, any>>(event: keyof TEvents, listener: TEvents[keyof TEvents] extends void ? () => void : (payload: TEvents[keyof TEvents]) => void): void;
|
|
743
|
+
/**
|
|
744
|
+
* 监听指定类型的事件(一次性,通用版本)
|
|
745
|
+
* @param event 事件名称
|
|
746
|
+
* @param listener 事件监听器
|
|
747
|
+
*/
|
|
748
|
+
once(event: string, listener: (...args: any[]) => void): void;
|
|
749
|
+
/**
|
|
750
|
+
* 移除指定类型的事件监听器(类型安全版本)
|
|
751
|
+
* @param event 事件名称
|
|
752
|
+
* @param listener 事件监听器
|
|
753
|
+
*/
|
|
754
|
+
off<TEvents extends Record<string, any>>(event: keyof TEvents, listener: TEvents[keyof TEvents] extends void ? () => void : (payload: TEvents[keyof TEvents]) => void): void;
|
|
755
|
+
/**
|
|
756
|
+
* 移除事件监听器(通用版本)
|
|
757
|
+
* @param event 事件名称
|
|
758
|
+
* @param listener 事件监听器
|
|
759
|
+
*/
|
|
760
|
+
off(event: string, listener: (...args: any[]) => void): void;
|
|
761
|
+
/**
|
|
762
|
+
* 发射指定类型的事件(类型安全版本)
|
|
763
|
+
* @param event 事件名称
|
|
764
|
+
* @param args 事件参数
|
|
765
|
+
*/
|
|
766
|
+
emit<TEvents extends Record<string, any>>(event: keyof TEvents, ...args: TEvents[keyof TEvents]): void;
|
|
767
|
+
/**
|
|
768
|
+
* 触发事件(通用版本)
|
|
769
|
+
* @param event 事件名称
|
|
770
|
+
* @param args 事件参数
|
|
771
|
+
*/
|
|
772
|
+
emit(event: string, ...args: any[]): void;
|
|
773
|
+
/**
|
|
774
|
+
* 跨进程广播,传的参数需要能被序列化
|
|
775
|
+
* @param event 事件名称
|
|
776
|
+
* @param args 事件参数
|
|
777
|
+
*/
|
|
778
|
+
broadcast<TEvents extends Record<string, any>>(event: keyof TEvents, ...args: TEvents[keyof TEvents]): void;
|
|
779
|
+
broadcast(event: string, ...args: any[]): void;
|
|
780
|
+
/**
|
|
781
|
+
* 清除事件监听器
|
|
782
|
+
* @param event 事件名称,如果不提供则清除所有
|
|
783
|
+
*/
|
|
784
|
+
clear(event?: string): void;
|
|
785
|
+
}
|
|
709
786
|
|
|
710
787
|
/** glTF 动画资源的 userData */
|
|
711
|
-
declare interface GltfAnimationAssetUserData {
|
|
788
|
+
export declare interface GltfAnimationAssetUserData {
|
|
712
789
|
gltfIndex: number;
|
|
713
790
|
events: Array<{
|
|
714
791
|
frame: number;
|
|
@@ -744,20 +821,20 @@ declare interface GltfAnimationAssetUserData {
|
|
|
744
821
|
}
|
|
745
822
|
|
|
746
823
|
/** glTF 嵌入图片子资源的 userData */
|
|
747
|
-
declare interface GltfEmbededImageAssetUserData extends IVirtualAssetUserData {
|
|
824
|
+
export declare interface GltfEmbededImageAssetUserData extends IVirtualAssetUserData {
|
|
748
825
|
/** 是否修复 Alpha 透明度瑕疵 */
|
|
749
826
|
fixAlphaTransparencyArtifacts?: boolean;
|
|
750
827
|
}
|
|
751
828
|
|
|
752
|
-
declare type GltfpackOptions = Record<string, any>;
|
|
829
|
+
export declare type GltfpackOptions = Record<string, any>;
|
|
753
830
|
|
|
754
831
|
/** glTF Skeleton 子资源的 userData */
|
|
755
|
-
declare interface GltfSkeletonAssetUserData extends IVirtualAssetUserData {
|
|
832
|
+
export declare interface GltfSkeletonAssetUserData extends IVirtualAssetUserData {
|
|
756
833
|
/** 骨骼数量 */
|
|
757
834
|
jointsLength?: number;
|
|
758
835
|
}
|
|
759
836
|
|
|
760
|
-
declare interface GlTFUserData {
|
|
837
|
+
export declare interface GlTFUserData {
|
|
761
838
|
assetFinder?: SerializedAssetFinder;
|
|
762
839
|
|
|
763
840
|
imageMetas: ImageMeta[];
|
|
@@ -888,14 +965,32 @@ declare interface GlTFUserData {
|
|
|
888
965
|
};
|
|
889
966
|
}
|
|
890
967
|
|
|
891
|
-
declare
|
|
968
|
+
export declare namespace i18n {
|
|
969
|
+
export {
|
|
970
|
+
i18n_2 as default
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* 添加/创建组件的选项
|
|
976
|
+
*/
|
|
977
|
+
export declare interface IAddComponentOptions {
|
|
978
|
+
nodePathOrUuid: string;
|
|
979
|
+
component: string;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export declare interface IApplyPrefabChangesParams {
|
|
983
|
+
nodePath: string;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
export declare interface IAssetConfig {
|
|
892
987
|
displayName?: string;
|
|
893
988
|
description?: string;
|
|
894
989
|
docURL?: string;
|
|
895
990
|
userDataConfig?: Record<string, IUerDataConfigItem>;
|
|
896
991
|
}
|
|
897
992
|
|
|
898
|
-
declare interface IAssetDBInfo extends AssetDBOptions {
|
|
993
|
+
export declare interface IAssetDBInfo extends AssetDBOptions {
|
|
899
994
|
// 当前数据库的启动状态
|
|
900
995
|
state: 'none' | 'start' | 'startup' | 'refresh'; // 是否已启动
|
|
901
996
|
|
|
@@ -906,7 +1001,7 @@ declare interface IAssetDBInfo extends AssetDBOptions {
|
|
|
906
1001
|
preImportExtList: string[];
|
|
907
1002
|
}
|
|
908
1003
|
|
|
909
|
-
declare interface IAssetInfo {
|
|
1004
|
+
export declare interface IAssetInfo {
|
|
910
1005
|
name: string; // 资源名字
|
|
911
1006
|
source: string; // url 地址
|
|
912
1007
|
loadUrl: string; // loader 加载的层级地址
|
|
@@ -942,7 +1037,7 @@ declare interface IAssetInfo {
|
|
|
942
1037
|
temp?: string; // 资源临时文件目录
|
|
943
1038
|
}
|
|
944
1039
|
|
|
945
|
-
declare interface IAssetMeta<T extends ISupportCreateType | 'unknown' = 'unknown'> {
|
|
1040
|
+
export declare interface IAssetMeta<T extends ISupportCreateType | 'unknown' = 'unknown'> {
|
|
946
1041
|
ver: string;
|
|
947
1042
|
importer: AssetHandlerType;
|
|
948
1043
|
imported: boolean;
|
|
@@ -957,7 +1052,23 @@ declare interface IAssetMeta<T extends ISupportCreateType | 'unknown' = 'unknown
|
|
|
957
1052
|
name?: string;
|
|
958
1053
|
}
|
|
959
1054
|
|
|
960
|
-
|
|
1055
|
+
/**
|
|
1056
|
+
* 场景相关处理接口
|
|
1057
|
+
*/
|
|
1058
|
+
export declare interface IAssetService extends IServiceEvents {
|
|
1059
|
+
/**
|
|
1060
|
+
* 资源发生变化时,进行处理
|
|
1061
|
+
* @param uuid
|
|
1062
|
+
*/
|
|
1063
|
+
assetChanged(uuid: string): Promise<void>;
|
|
1064
|
+
/**
|
|
1065
|
+
* 资源删除时,进行处理
|
|
1066
|
+
* @param uuid
|
|
1067
|
+
*/
|
|
1068
|
+
assetDeleted(uuid: string): Promise<void>;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
export declare type IAssetType =
|
|
961
1072
|
| ISupportCreateCCType
|
|
962
1073
|
| 'cc.Asset' // 基础资源类型(instantiation-asset)
|
|
963
1074
|
| 'cce.Database' // 数据库资源
|
|
@@ -986,7 +1097,7 @@ declare type IAssetType =
|
|
|
986
1097
|
/**
|
|
987
1098
|
* 配置基类接口
|
|
988
1099
|
*/
|
|
989
|
-
declare interface IBaseConfiguration extends EventEmitterMethods {
|
|
1100
|
+
export declare interface IBaseConfiguration extends EventEmitterMethods {
|
|
990
1101
|
/**
|
|
991
1102
|
* 模块名
|
|
992
1103
|
*/
|
|
@@ -1026,12 +1137,73 @@ declare interface IBaseConfiguration extends EventEmitterMethods {
|
|
|
1026
1137
|
save(): Promise<boolean>;
|
|
1027
1138
|
}
|
|
1028
1139
|
|
|
1029
|
-
declare interface
|
|
1140
|
+
export declare interface IBaseCreateNodeParams {
|
|
1141
|
+
path: string;
|
|
1142
|
+
name?: string;
|
|
1143
|
+
workMode?: '2d' | '3d';
|
|
1144
|
+
position?: IVec3;
|
|
1145
|
+
keepWorldTransform?: boolean;
|
|
1146
|
+
canvasRequired?: boolean;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* 基础标识
|
|
1151
|
+
*/
|
|
1152
|
+
export declare interface IBaseIdentifier {
|
|
1153
|
+
assetName: string;
|
|
1154
|
+
assetUuid: string;
|
|
1155
|
+
assetUrl: string;
|
|
1156
|
+
assetType: string;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
export declare interface ICameraService {
|
|
1160
|
+
init(): void;
|
|
1161
|
+
initFromConfig(): Promise<void>;
|
|
1162
|
+
is2D: boolean;
|
|
1163
|
+
focus(nodes?: string[] | null, editorCameraInfo?: any, immediate?: boolean): void;
|
|
1164
|
+
defaultFocus(uuid: string): void;
|
|
1165
|
+
rotateCameraToDir(dir: Vec3_2, rotateByViewDist: boolean): void;
|
|
1166
|
+
changeProjection(): void;
|
|
1167
|
+
setGridVisible(value: boolean): void;
|
|
1168
|
+
isGridVisible(): boolean;
|
|
1169
|
+
setCameraProperty(options: any): void;
|
|
1170
|
+
resetCameraProperty(): void;
|
|
1171
|
+
getCameraFov(): number;
|
|
1172
|
+
zoomUp(): void;
|
|
1173
|
+
zoomDown(): void;
|
|
1174
|
+
zoomReset(): void;
|
|
1175
|
+
alignNodeToSceneView(nodes: string[]): void;
|
|
1176
|
+
alignSceneViewToNode(nodes: string[]): void;
|
|
1177
|
+
onUpdate(deltaTime: number): void;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
export declare interface IChangeNodeOptions {
|
|
1181
|
+
source?: 'editor' | 'undo' | 'engine';
|
|
1182
|
+
type?: NodeEventType;
|
|
1183
|
+
propPath?: string;
|
|
1184
|
+
index?: number;
|
|
1185
|
+
record?: boolean;
|
|
1186
|
+
dumpImmediately?: boolean;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
export declare interface IChunkContent {
|
|
1030
1190
|
skeleton: null | string;
|
|
1031
1191
|
clips: string[];
|
|
1032
1192
|
}
|
|
1033
1193
|
|
|
1034
|
-
declare interface
|
|
1194
|
+
export declare interface ICLI {
|
|
1195
|
+
Scene: IServiceManager;
|
|
1196
|
+
SceneEvents: GlobalEventManager;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* 关闭场景/预制体选项
|
|
1201
|
+
*/
|
|
1202
|
+
export declare interface ICloseOptions {
|
|
1203
|
+
urlOrUUID?: string;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
export declare interface ICocosConfigurationNode {
|
|
1035
1207
|
id: string;
|
|
1036
1208
|
title: string;
|
|
1037
1209
|
group: string;
|
|
@@ -1039,7 +1211,7 @@ declare interface ICocosConfigurationNode {
|
|
|
1039
1211
|
properties: Record<string, ICocosConfigurationPropertySchema>;
|
|
1040
1212
|
}
|
|
1041
1213
|
|
|
1042
|
-
declare interface ICocosConfigurationPropertySchema {
|
|
1214
|
+
export declare interface ICocosConfigurationPropertySchema {
|
|
1043
1215
|
type: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
1044
1216
|
default?: unknown;
|
|
1045
1217
|
title?: string;
|
|
@@ -1056,21 +1228,206 @@ declare interface ICocosConfigurationPropertySchema {
|
|
|
1056
1228
|
required?: string[];
|
|
1057
1229
|
}
|
|
1058
1230
|
|
|
1059
|
-
declare interface ICollisionMatrix {
|
|
1231
|
+
export declare interface ICollisionMatrix {
|
|
1060
1232
|
[x: string]: number;
|
|
1061
1233
|
}
|
|
1062
1234
|
|
|
1235
|
+
/**
|
|
1236
|
+
* CLI 使用的组件信息,属性值以扁平的 key-value 形式呈现
|
|
1237
|
+
*/
|
|
1238
|
+
export declare interface IComponent extends IComponentIdentifier {
|
|
1239
|
+
properties: {
|
|
1240
|
+
[key: string]: IPropertyValueType;
|
|
1241
|
+
};
|
|
1242
|
+
prefab: ICompPrefabInfo | null;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* 编辑器使用的组件详细信息,属性值以 IProperty 编码形式呈现,
|
|
1247
|
+
* 包含 type、readonly、default 等元信息,用于编辑器 Inspector 面板渲染
|
|
1248
|
+
*/
|
|
1249
|
+
export declare interface IComponentForEditor extends IProperty {
|
|
1250
|
+
value: {
|
|
1251
|
+
enabled: IPropertyValueType;
|
|
1252
|
+
uuid: IPropertyValueType;
|
|
1253
|
+
name: IPropertyValueType;
|
|
1254
|
+
} & Record<string, IPropertyValueType>;
|
|
1255
|
+
mountedRoot?: string;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* 组件标识信息,包含组件的基本标识字段
|
|
1260
|
+
*/
|
|
1261
|
+
export declare interface IComponentIdentifier {
|
|
1262
|
+
cid: string;
|
|
1263
|
+
path: string;
|
|
1264
|
+
uuid: string;
|
|
1265
|
+
name: string;
|
|
1266
|
+
type: string;
|
|
1267
|
+
enabled: boolean;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* 组件服务接口,定义了所有组件相关的操作方法
|
|
1272
|
+
*/
|
|
1273
|
+
export declare interface IComponentService extends IServiceEvents {
|
|
1274
|
+
/**
|
|
1275
|
+
* 添加组件到指定节点,返回添加后的组件信息
|
|
1276
|
+
* @param params - 添加组件选项
|
|
1277
|
+
* @param params.nodePathOrUuid - 目标节点路径或 UUID
|
|
1278
|
+
* @param params.component - 组件类名,支持精确匹配('cc.Label')和模糊匹配('label')
|
|
1279
|
+
* @returns 添加成功后的组件信息
|
|
1280
|
+
*
|
|
1281
|
+
* @example
|
|
1282
|
+
* ```ts
|
|
1283
|
+
* // 通过节点路径 + 精确组件名
|
|
1284
|
+
* const comp = await addComponent({ nodePathOrUuid: 'Canvas/MyNode', component: 'cc.Label' });
|
|
1285
|
+
*
|
|
1286
|
+
* // 通过节点 UUID + 模糊组件名
|
|
1287
|
+
* const comp = await addComponent({ nodePathOrUuid: 'abc-123-uuid', component: 'label' });
|
|
1288
|
+
* ```
|
|
1289
|
+
*/
|
|
1290
|
+
addComponent(params: IAddComponentOptions): Promise<IComponent>;
|
|
1291
|
+
/**
|
|
1292
|
+
* 删除指定组件
|
|
1293
|
+
* @param params - 删除组件选项
|
|
1294
|
+
* @param params.path - 组件路径,支持路径、UUID 或资源 URL
|
|
1295
|
+
* @returns 删除成功返回 true,失败返回 false
|
|
1296
|
+
*/
|
|
1297
|
+
removeComponent(params: IRemoveComponentOptions): Promise<boolean>;
|
|
1298
|
+
/**
|
|
1299
|
+
* 设置组件属性
|
|
1300
|
+
* - CLI 调用时传入 ISetPropertyOptions,通过 componentPath 定位,属性为扁平键值对
|
|
1301
|
+
* - 编辑器调用时传入 ISetPropertyOptionsForEditor,通过节点 UUID + dump 路径定位,属性为 IProperty 格式
|
|
1302
|
+
*
|
|
1303
|
+
* @param params - 设置属性选项,根据调用方不同传入不同类型
|
|
1304
|
+
* @returns 设置成功返回 true,失败返回 false
|
|
1305
|
+
*
|
|
1306
|
+
* @example
|
|
1307
|
+
* ```ts
|
|
1308
|
+
* // CLI 方式:通过 componentPath 定位,直接传属性键值对
|
|
1309
|
+
* await setProperty({
|
|
1310
|
+
* componentPath: 'Canvas/cc.Label_1',
|
|
1311
|
+
* properties: { string: 'Hello', fontSize: 32 },
|
|
1312
|
+
* });
|
|
1313
|
+
*
|
|
1314
|
+
* // 编辑器方式:通过节点 UUID + dump 路径定位,传 IProperty 格式
|
|
1315
|
+
* await setProperty({
|
|
1316
|
+
* uuid: 'node-uuid',
|
|
1317
|
+
* path: '__comps__.0.string',
|
|
1318
|
+
* dump: { value: 'Hello', type: 'String' },
|
|
1319
|
+
* });
|
|
1320
|
+
* ```
|
|
1321
|
+
*/
|
|
1322
|
+
setProperty(params: ISetPropertyOptions | ISetPropertyOptionsForEditor): Promise<boolean>;
|
|
1323
|
+
/**
|
|
1324
|
+
* 查询组件信息
|
|
1325
|
+
* - 传入 IQueryComponentOptions 时,返回 IComponent 或 IComponent
|
|
1326
|
+
* - 传入 string 时,返回 IComponentForEditor
|
|
1327
|
+
*
|
|
1328
|
+
* @param params - 查询选项或组件路径字符串
|
|
1329
|
+
* @returns 如果传入的是 IQueryComponentOptions 时返回 IComponent,如果传入是string时返回 IComponentForEditor,未找到返回 null
|
|
1330
|
+
*
|
|
1331
|
+
* @example
|
|
1332
|
+
* ```ts
|
|
1333
|
+
* CLI 模式:返回 IComponent(扁平属性)
|
|
1334
|
+
* const comp = await queryComponent({ path: 'Canvas/cc.Label_1' }) as IComponent;
|
|
1335
|
+
*
|
|
1336
|
+
* 编辑器模式:直接传 string,这里是uuid,因为与cli重复了,也支持 path 和 url
|
|
1337
|
+
* const comp = await queryComponent('uuid') as IComponentForEditor;
|
|
1338
|
+
* ```
|
|
1339
|
+
*/
|
|
1340
|
+
queryComponent(params: IQueryComponentOptions | string): Promise<IComponent | IComponentForEditor | null>;
|
|
1341
|
+
/**
|
|
1342
|
+
* 获取所有已注册的组件类名,包含内置与自定义组件
|
|
1343
|
+
* @returns 组件类名数组,如 ['cc.Label', 'cc.Sprite', 'MyCustomComponent']
|
|
1344
|
+
*/
|
|
1345
|
+
queryAllComponent(): Promise<string[]>;
|
|
1346
|
+
/**
|
|
1347
|
+
* 创建组件(编辑器使用),与 addComponent 不同的是仅返回是否成功
|
|
1348
|
+
* @param params - 添加组件选项
|
|
1349
|
+
* @param params.nodePathOrUuid - 目标节点路径或 UUID
|
|
1350
|
+
* @param params.component - 组件类名
|
|
1351
|
+
* @returns 创建成功返回 true,失败返回 false
|
|
1352
|
+
*/
|
|
1353
|
+
createComponent(params: IAddComponentOptions): Promise<boolean>;
|
|
1354
|
+
/**
|
|
1355
|
+
* 复位组件,将组件所有属性恢复为默认值
|
|
1356
|
+
* @param params - 查询组件选项,用于定位要复位的组件
|
|
1357
|
+
* @param params.path - 组件路径,支持路径、UUID 或资源 URL
|
|
1358
|
+
* @returns 复位成功返回 true,失败返回 false
|
|
1359
|
+
*/
|
|
1360
|
+
resetComponent(params: IQueryComponentOptions): Promise<boolean>;
|
|
1361
|
+
/**
|
|
1362
|
+
* 获取所有注册类名,支持按继承关系过滤
|
|
1363
|
+
* @param options - 过滤选项,不传则返回所有注册类
|
|
1364
|
+
* @param options.extends - 父类名称,只返回继承自该类的子类,支持字符串或字符串数组
|
|
1365
|
+
* @param options.excludeSelf - 是否排除父类自身,默认 false
|
|
1366
|
+
* @returns 类名对象数组,如 [{ name: 'cc.Label' }, { name: 'cc.Sprite' }]
|
|
1367
|
+
*
|
|
1368
|
+
* @example
|
|
1369
|
+
* ```ts
|
|
1370
|
+
* // 查询所有注册类
|
|
1371
|
+
* const all = await queryClasses();
|
|
1372
|
+
*
|
|
1373
|
+
* // 查询 cc.Component 的所有子类(含自身)
|
|
1374
|
+
* const comps = await queryClasses({ extends: 'cc.Component' });
|
|
1375
|
+
*
|
|
1376
|
+
* // 查询 cc.Component 的所有子类(排除自身)
|
|
1377
|
+
* const subComps = await queryClasses({ extends: 'cc.Component', excludeSelf: true });
|
|
1378
|
+
* ```
|
|
1379
|
+
*/
|
|
1380
|
+
queryClasses(options?: IQueryClassesOptions): Promise<{
|
|
1381
|
+
name: string;
|
|
1382
|
+
}[]>;
|
|
1383
|
+
/**
|
|
1384
|
+
* 查询指定节点上所有组件暴露的可调用函数
|
|
1385
|
+
* @param uuid - 节点 UUID
|
|
1386
|
+
* @returns 节点上组件的函数信息,节点不存在时返回空对象
|
|
1387
|
+
*/
|
|
1388
|
+
queryComponentFunctionOfNode(uuid: string): Promise<any>;
|
|
1389
|
+
/**
|
|
1390
|
+
* 执行组件上的指定方法
|
|
1391
|
+
* @param options - 执行选项
|
|
1392
|
+
* @param options.uuid - 组件实例的 UUID
|
|
1393
|
+
* @param options.name - 要执行的方法名,如 'onLoad'、'start'
|
|
1394
|
+
* @param options.args - 方法参数列表
|
|
1395
|
+
* @returns 执行成功返回 true,失败返回 false
|
|
1396
|
+
*/
|
|
1397
|
+
executeComponentMethod(options: IExecuteComponentMethodOptions): Promise<boolean>;
|
|
1398
|
+
/**
|
|
1399
|
+
* 查询指定名称的组件是否已注册(是否存在对应脚本)
|
|
1400
|
+
* @param name - 组件类名,如 'cc.Label'
|
|
1401
|
+
* @returns 存在返回 true,不存在返回 false
|
|
1402
|
+
*/
|
|
1403
|
+
queryComponentHasScript(name: string): Promise<boolean>;
|
|
1404
|
+
init(): void;
|
|
1405
|
+
unregisterCompMgrEvents(): void;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
export declare interface ICompPrefabInfo {
|
|
1409
|
+
fileId: string;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1063
1412
|
/**
|
|
1064
1413
|
* 配置的格式
|
|
1065
1414
|
*/
|
|
1066
|
-
declare interface IConfiguration {
|
|
1415
|
+
export declare interface IConfiguration {
|
|
1067
1416
|
/**
|
|
1068
1417
|
* 其他配置
|
|
1069
1418
|
*/
|
|
1070
1419
|
[key: string]: any;
|
|
1071
1420
|
}
|
|
1072
1421
|
|
|
1073
|
-
declare interface
|
|
1422
|
+
export declare interface ICreateByAssetParams extends IBaseCreateNodeParams {
|
|
1423
|
+
dbURL: string;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
export declare interface ICreateByNodeTypeParams extends IBaseCreateNodeParams {
|
|
1427
|
+
nodeType: NodeType;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
export declare interface ICreateMenuInfo {
|
|
1074
1431
|
// 新建菜单名称,支持 i18n:xxx
|
|
1075
1432
|
label: string;
|
|
1076
1433
|
// 模板名称,默认为 default ,作为模板选择的唯一标识符
|
|
@@ -1093,7 +1450,28 @@ declare interface ICreateMenuInfo {
|
|
|
1093
1450
|
fileNameCheckConfigs?: FileNameCheckConfig[];
|
|
1094
1451
|
}
|
|
1095
1452
|
|
|
1096
|
-
|
|
1453
|
+
/**
|
|
1454
|
+
* 创建场景/预制体选项
|
|
1455
|
+
*/
|
|
1456
|
+
export declare interface ICreateOptions {
|
|
1457
|
+
type: ICreateType;
|
|
1458
|
+
baseName: string;
|
|
1459
|
+
targetDirectory: string;
|
|
1460
|
+
templateType?: TSceneTemplateType;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
export declare interface ICreatePrefabFromNodeParams {
|
|
1464
|
+
/** 要转换为预制体的源节点路径 */
|
|
1465
|
+
nodePath: string;
|
|
1466
|
+
/** 预制体资源保存 URL */
|
|
1467
|
+
dbURL: string;
|
|
1468
|
+
/** 是否强制覆盖现有资源 */
|
|
1469
|
+
overwrite?: boolean;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
export declare type ICreateType = typeof CREATE_TYPES[number];
|
|
1473
|
+
|
|
1474
|
+
export declare type ICroppingConfig = {
|
|
1097
1475
|
name: string;
|
|
1098
1476
|
cache: Record<string, IDisplayModuleCache>,
|
|
1099
1477
|
flags: IFlags_2,
|
|
@@ -1102,28 +1480,37 @@ declare type ICroppingConfig = {
|
|
|
1102
1480
|
moduleToFallBack?: Record<string, string>;
|
|
1103
1481
|
}
|
|
1104
1482
|
|
|
1105
|
-
declare type ICroppingConfigDeprecatedFeature = {
|
|
1483
|
+
export declare type ICroppingConfigDeprecatedFeature = {
|
|
1106
1484
|
value: boolean,
|
|
1107
1485
|
version: string
|
|
1108
1486
|
};
|
|
1109
1487
|
|
|
1110
|
-
declare interface ICustomJointTextureLayout {
|
|
1488
|
+
export declare interface ICustomJointTextureLayout {
|
|
1111
1489
|
textureLength: number;
|
|
1112
1490
|
contents: IChunkContent[];
|
|
1113
1491
|
}
|
|
1114
1492
|
|
|
1115
|
-
declare type IDefaultConfig = {
|
|
1493
|
+
export declare type IDefaultConfig = {
|
|
1116
1494
|
key: IDefaultConfigKeys;
|
|
1117
1495
|
name: string;
|
|
1118
1496
|
diyConfig: (cache: Record<string, IDisplayModuleCache>, flags: IFlags_2, includeModules: string[]) => void;
|
|
1119
1497
|
}
|
|
1120
1498
|
|
|
1121
|
-
declare type IDefaultConfigKeys = 'defaultConfig' | 'default2d' | 'default3d' | 'defaultNative' | 'defaultSmallGames'
|
|
1499
|
+
export declare type IDefaultConfigKeys = 'defaultConfig' | 'default2d' | 'default3d' | 'defaultNative' | 'defaultSmallGames'
|
|
1500
|
+
|
|
1501
|
+
export declare interface IDeleteNodeParams {
|
|
1502
|
+
path: string;
|
|
1503
|
+
keepWorldTransform?: boolean;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
export declare interface IDeleteNodeResult {
|
|
1507
|
+
path: string;
|
|
1508
|
+
}
|
|
1122
1509
|
|
|
1123
1510
|
/**
|
|
1124
1511
|
* 构建使用的设计分辨率数据
|
|
1125
1512
|
*/
|
|
1126
|
-
declare interface IDesignResolution {
|
|
1513
|
+
export declare interface IDesignResolution {
|
|
1127
1514
|
height: number;
|
|
1128
1515
|
width: number;
|
|
1129
1516
|
fitWidth?: boolean;
|
|
@@ -1131,19 +1518,63 @@ declare interface IDesignResolution {
|
|
|
1131
1518
|
policy?: number;
|
|
1132
1519
|
}
|
|
1133
1520
|
|
|
1134
|
-
declare interface IDisplayModuleCache {
|
|
1521
|
+
export declare interface IDisplayModuleCache {
|
|
1135
1522
|
_value: boolean;
|
|
1136
1523
|
_option?: string; // 保存下拉选项的值
|
|
1137
1524
|
_flags?: IFlags_2; // 保存下拉选项的值的联动开关
|
|
1138
1525
|
}
|
|
1139
1526
|
|
|
1140
|
-
declare interface IDisplayModuleItem extends IFeatureItem {
|
|
1527
|
+
export declare interface IDisplayModuleItem extends IFeatureItem {
|
|
1141
1528
|
_value: boolean;
|
|
1142
1529
|
_option?: string;
|
|
1143
1530
|
options?: Record<string, IDisplayModuleItem>;
|
|
1144
1531
|
}
|
|
1145
1532
|
|
|
1146
|
-
declare interface
|
|
1533
|
+
export declare interface IEditorService extends IServiceEvents {
|
|
1534
|
+
/**
|
|
1535
|
+
* 当前编辑器类型
|
|
1536
|
+
*/
|
|
1537
|
+
getCurrentEditorType(): 'scene' | 'prefab' | 'unknown';
|
|
1538
|
+
/**
|
|
1539
|
+
* 打开资产
|
|
1540
|
+
* @param params
|
|
1541
|
+
*/
|
|
1542
|
+
open(params: IOpenOptions): Promise<TEditorEntity>;
|
|
1543
|
+
/**
|
|
1544
|
+
* 关闭当前资产
|
|
1545
|
+
*/
|
|
1546
|
+
close(params: ICloseOptions): Promise<boolean>;
|
|
1547
|
+
/**
|
|
1548
|
+
* 保存资产
|
|
1549
|
+
*/
|
|
1550
|
+
save(params: ISaveOptions): Promise<IAssetInfo>;
|
|
1551
|
+
/**
|
|
1552
|
+
* 重载资产
|
|
1553
|
+
* @param params
|
|
1554
|
+
*/
|
|
1555
|
+
reload(params: IReloadOptions): Promise<ReloadResult>;
|
|
1556
|
+
/**
|
|
1557
|
+
* 创建新资产
|
|
1558
|
+
* @param params
|
|
1559
|
+
*/
|
|
1560
|
+
create(params: ICreateOptions): Promise<IBaseIdentifier>;
|
|
1561
|
+
/**
|
|
1562
|
+
* 是否有打开编辑器
|
|
1563
|
+
*/
|
|
1564
|
+
hasOpen(): Promise<boolean>;
|
|
1565
|
+
/**
|
|
1566
|
+
* 获取当前打开的资产
|
|
1567
|
+
*/
|
|
1568
|
+
queryCurrent(): Promise<TEditorEntity | null>;
|
|
1569
|
+
/**
|
|
1570
|
+
*
|
|
1571
|
+
*/
|
|
1572
|
+
getRootNode(): TEditorInstance | null;
|
|
1573
|
+
lock(): Promise<void>;
|
|
1574
|
+
unlock(): void;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
export declare interface IEngineConfig extends IEngineModuleConfig {
|
|
1147
1578
|
physicsConfig: IPhysicsConfig;
|
|
1148
1579
|
macroConfig?: Record<string, string | number | boolean>;
|
|
1149
1580
|
sortingLayers: { id: number, name: string, value: number }[];
|
|
@@ -1161,14 +1592,14 @@ declare interface IEngineConfig extends IEngineModuleConfig {
|
|
|
1161
1592
|
downloadMaxConcurrency: number;
|
|
1162
1593
|
}
|
|
1163
1594
|
|
|
1164
|
-
declare interface IEngineModuleConfig {
|
|
1595
|
+
export declare interface IEngineModuleConfig {
|
|
1165
1596
|
// ---- 模块配置相关 ----
|
|
1166
1597
|
includeModules: string[];
|
|
1167
1598
|
flags?: IFlags;
|
|
1168
1599
|
noDeprecatedFeatures?: { value: boolean, version: string };
|
|
1169
1600
|
}
|
|
1170
1601
|
|
|
1171
|
-
declare interface IEngineOptions {
|
|
1602
|
+
export declare interface IEngineOptions {
|
|
1172
1603
|
/**
|
|
1173
1604
|
* 引擎仓库根目录。
|
|
1174
1605
|
*/
|
|
@@ -1187,12 +1618,32 @@ declare interface IEngineOptions {
|
|
|
1187
1618
|
features: string[];
|
|
1188
1619
|
}
|
|
1189
1620
|
|
|
1190
|
-
declare interface IEngineProjectConfig extends Exclude<IEngineConfig, 'includeModules' | 'flags' | 'noDeprecatedFeatures'> {
|
|
1621
|
+
export declare interface IEngineProjectConfig extends Exclude<IEngineConfig, 'includeModules' | 'flags' | 'noDeprecatedFeatures'> {
|
|
1191
1622
|
configs?: Record<string, IEngineModuleConfig>;
|
|
1192
1623
|
globalConfigKey?: string;
|
|
1193
1624
|
}
|
|
1194
1625
|
|
|
1195
|
-
declare interface
|
|
1626
|
+
export declare interface IEngineService extends IServiceEvents {
|
|
1627
|
+
/**
|
|
1628
|
+
* 初始化引擎服务,目前是暂时引擎 mainLoop
|
|
1629
|
+
*/
|
|
1630
|
+
init(): Promise<void>;
|
|
1631
|
+
/**
|
|
1632
|
+
* 让引擎执行一帧
|
|
1633
|
+
*/
|
|
1634
|
+
repaintInEditMode(): Promise<void>;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* 执行组件方法的选项
|
|
1639
|
+
*/
|
|
1640
|
+
export declare interface IExecuteComponentMethodOptions {
|
|
1641
|
+
uuid: string;
|
|
1642
|
+
name: string;
|
|
1643
|
+
args: any[];
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
export declare interface IFbxSetting {
|
|
1196
1647
|
/**
|
|
1197
1648
|
* https://github.com/cocos-creator/FBX-glTF-conv/pull/26
|
|
1198
1649
|
*/
|
|
@@ -1228,11 +1679,11 @@ declare interface IFbxSetting {
|
|
|
1228
1679
|
matchMeshNames?: boolean;
|
|
1229
1680
|
}
|
|
1230
1681
|
|
|
1231
|
-
declare interface IFeatureGroup extends BaseItem {
|
|
1682
|
+
export declare interface IFeatureGroup extends BaseItem {
|
|
1232
1683
|
options: { [feature: string]: IFeatureItem };
|
|
1233
1684
|
}
|
|
1234
1685
|
|
|
1235
|
-
declare interface IFeatureItem extends BaseItem {
|
|
1686
|
+
export declare interface IFeatureItem extends BaseItem {
|
|
1236
1687
|
/**
|
|
1237
1688
|
* @zh 是否默认以及允许包含在上传的各个小游戏引擎插件内,目前由于部分引擎模块包体较大,默认不会打包在官方的微信引擎分离插件内。(临时方案)
|
|
1238
1689
|
* @en Whether it is included in the upload of the various engine plugins by default. Currently, because some engine modules are packaged in a large package, the official WeChat engine separation plugin does not package them by default. (Temporary solution)
|
|
@@ -1270,24 +1721,54 @@ declare interface IFeatureItem extends BaseItem {
|
|
|
1270
1721
|
cmakeConfig?: string;
|
|
1271
1722
|
}
|
|
1272
1723
|
|
|
1273
|
-
declare type IFlags = Record<string, boolean | number>;
|
|
1724
|
+
export declare type IFlags = Record<string, boolean | number>;
|
|
1274
1725
|
|
|
1275
|
-
declare type IFlags_2 = Record<string, boolean | number>;
|
|
1726
|
+
export declare type IFlags_2 = Record<string, boolean | number>;
|
|
1276
1727
|
|
|
1277
|
-
declare interface IGetPostConfig {
|
|
1728
|
+
export declare interface IGetPostConfig {
|
|
1278
1729
|
url: string | RegExp;
|
|
1279
1730
|
handler: (req: Request_2, res: Response_2, next?: NextFunction) => Promise<void>;
|
|
1280
1731
|
}
|
|
1281
1732
|
|
|
1282
|
-
declare interface
|
|
1733
|
+
export declare interface IGetPrefabInfoParams {
|
|
1734
|
+
nodePath: string;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
export declare interface IGizmoService {
|
|
1738
|
+
gizmoRootNode: any;
|
|
1739
|
+
foregroundNode: any;
|
|
1740
|
+
backgroundNode: any;
|
|
1741
|
+
transformToolData: any;
|
|
1742
|
+
transformToolName: string;
|
|
1743
|
+
isViewMode: boolean;
|
|
1744
|
+
init(): void;
|
|
1745
|
+
initFromConfig(): Promise<void>;
|
|
1746
|
+
saveConfig(): Promise<void>;
|
|
1747
|
+
changeTool(name: string): void;
|
|
1748
|
+
setCoordinate(coord: 'local' | 'global'): void;
|
|
1749
|
+
setPivot(pivot: 'pivot' | 'center'): void;
|
|
1750
|
+
lockGizmoTool(locked: boolean): void;
|
|
1751
|
+
setIconVisible(visible: boolean): void;
|
|
1752
|
+
showAllGizmoOfNode(node: any, recursive?: boolean): void;
|
|
1753
|
+
removeAllGizmoOfNode(node: any, recursive?: boolean): void;
|
|
1754
|
+
clearAllGizmos(): void;
|
|
1755
|
+
callAllGizmoFuncOfNode(node: any, funcName: string, ...params: any[]): boolean;
|
|
1756
|
+
onUpdate(deltaTime: number): void;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
export declare interface IInitEngineInfo {
|
|
1283
1760
|
importBase: string;
|
|
1284
1761
|
nativeBase: string;
|
|
1285
1762
|
writablePath: string;
|
|
1286
1763
|
serverURL?: string;
|
|
1287
1764
|
}
|
|
1288
1765
|
|
|
1766
|
+
export declare interface IIsPrefabInstanceParams {
|
|
1767
|
+
nodePath: string;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1289
1770
|
/** 图片资源的 userData */
|
|
1290
|
-
declare interface ImageAssetUserData {
|
|
1771
|
+
export declare interface ImageAssetUserData {
|
|
1291
1772
|
/** 图片类型 */
|
|
1292
1773
|
type: ImageImportType;
|
|
1293
1774
|
/** 垂直翻转 */
|
|
@@ -1311,9 +1792,9 @@ declare interface ImageAssetUserData {
|
|
|
1311
1792
|
alpha?: string;
|
|
1312
1793
|
}
|
|
1313
1794
|
|
|
1314
|
-
declare type ImageImportType = 'raw' | 'texture' | 'normal map' | 'sprite-frame' | 'texture cube';
|
|
1795
|
+
export declare type ImageImportType = 'raw' | 'texture' | 'normal map' | 'sprite-frame' | 'texture cube';
|
|
1315
1796
|
|
|
1316
|
-
declare interface ImageMeta {
|
|
1797
|
+
export declare interface ImageMeta {
|
|
1317
1798
|
/**
|
|
1318
1799
|
* 图片名字。
|
|
1319
1800
|
*/
|
|
@@ -1334,14 +1815,14 @@ declare interface ImageMeta {
|
|
|
1334
1815
|
remap?: string;
|
|
1335
1816
|
}
|
|
1336
1817
|
|
|
1337
|
-
declare interface IMiddlewareContribution {
|
|
1818
|
+
export declare interface IMiddlewareContribution {
|
|
1338
1819
|
get?: IGetPostConfig[];
|
|
1339
1820
|
post?: IGetPostConfig[];
|
|
1340
1821
|
staticFiles?: IStaticFileConfig[];
|
|
1341
1822
|
socket?: ISocketConfig;
|
|
1342
1823
|
}
|
|
1343
1824
|
|
|
1344
|
-
declare interface IModuleConfig {
|
|
1825
|
+
export declare interface IModuleConfig {
|
|
1345
1826
|
moduleTreeDump: {
|
|
1346
1827
|
default: IModules;
|
|
1347
1828
|
categories: Record<string, CategoryDetail>;
|
|
@@ -1358,43 +1839,150 @@ declare interface IModuleConfig {
|
|
|
1358
1839
|
}>;
|
|
1359
1840
|
}
|
|
1360
1841
|
|
|
1361
|
-
declare type IModuleItem = IFeatureItem | IFeatureGroup;
|
|
1842
|
+
export declare type IModuleItem = IFeatureItem | IFeatureGroup;
|
|
1843
|
+
|
|
1844
|
+
export declare type IModules = Record<string, IModuleItem>;
|
|
1845
|
+
|
|
1846
|
+
export declare interface IMountedChildrenInfo {
|
|
1847
|
+
targetInfo: ITargetInfo | null;
|
|
1848
|
+
nodes: INodeIdentifier[];
|
|
1849
|
+
}
|
|
1362
1850
|
|
|
1363
|
-
declare
|
|
1851
|
+
export declare interface IMountedComponentsInfo {
|
|
1852
|
+
targetInfo: ITargetInfo | null;
|
|
1853
|
+
components: IComponentIdentifier[];
|
|
1854
|
+
}
|
|
1364
1855
|
|
|
1365
1856
|
/**
|
|
1366
1857
|
* Import Asset // 导入资源
|
|
1367
1858
|
*/
|
|
1368
|
-
declare function importAsset(source: string, target: string, options?: AssetOperationOption): Promise<IAssetInfo[]>;
|
|
1859
|
+
export declare function importAsset(source: string, target: string, options?: AssetOperationOption): Promise<IAssetInfo[]>;
|
|
1369
1860
|
|
|
1370
|
-
declare interface ImportMap {
|
|
1861
|
+
export declare interface ImportMap {
|
|
1371
1862
|
imports?: Record<string, string>;
|
|
1372
1863
|
scopes?: Record<string, Record<string, string>>;
|
|
1373
1864
|
}
|
|
1374
1865
|
|
|
1375
|
-
declare function init(): Promise<void>;
|
|
1866
|
+
export declare function init(): Promise<void>;
|
|
1376
1867
|
|
|
1377
|
-
declare function init_2(projectPath: string): Promise<void>;
|
|
1868
|
+
export declare function init_2(projectPath: string): Promise<void>;
|
|
1378
1869
|
|
|
1379
|
-
declare function init_3(projectPath: string): Promise<void>;
|
|
1870
|
+
export declare function init_3(projectPath: string): Promise<void>;
|
|
1380
1871
|
|
|
1381
|
-
declare function init_4(projectPath: string): Promise<void>;
|
|
1872
|
+
export declare function init_4(projectPath: string): Promise<void>;
|
|
1382
1873
|
|
|
1383
|
-
declare function init_5(projectPath: string): Promise<void>;
|
|
1874
|
+
export declare function init_5(projectPath: string): Promise<void>;
|
|
1384
1875
|
|
|
1385
1876
|
/**
|
|
1386
1877
|
* Initialize the scene module.
|
|
1387
1878
|
* Registers the scene middleware and initializes scene config.
|
|
1388
1879
|
*/
|
|
1389
|
-
declare function init_6(): Promise<void>;
|
|
1880
|
+
export declare function init_6(): Promise<void>;
|
|
1881
|
+
|
|
1882
|
+
export declare function init_7(projectPath: string): Promise<void>;
|
|
1390
1883
|
|
|
1391
|
-
declare function
|
|
1884
|
+
export declare function initEngine(enginePath: string, projectPath: string, serverURL?: string): Promise<void>;
|
|
1392
1885
|
|
|
1393
|
-
declare function
|
|
1886
|
+
export declare function initProgrammingFacet(): Promise<ProgrammingFacet>;
|
|
1394
1887
|
|
|
1395
|
-
declare
|
|
1888
|
+
export declare interface INode extends INodeIdentifier {
|
|
1889
|
+
properties: INodeProperties;
|
|
1890
|
+
components?: IComponent[] | IComponentIdentifier[];
|
|
1891
|
+
children?: INode[];
|
|
1892
|
+
prefab: IPrefabInfo | null;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
export declare interface INodeIdentifier {
|
|
1896
|
+
nodeId: string;
|
|
1897
|
+
path: string;
|
|
1898
|
+
name: string;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
export declare interface INodeProperties {
|
|
1902
|
+
position: IVec3;
|
|
1903
|
+
rotation: IQuat;
|
|
1904
|
+
eulerAngles: IVec3;
|
|
1905
|
+
scale: IVec3;
|
|
1906
|
+
mobility: MobilityMode;
|
|
1907
|
+
layer: number;
|
|
1908
|
+
active: boolean;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* 节点的相关处理接口
|
|
1913
|
+
*/
|
|
1914
|
+
export declare interface INodeService extends IServiceEvents {
|
|
1915
|
+
/**
|
|
1916
|
+
* 创建节点
|
|
1917
|
+
* @param params
|
|
1918
|
+
*/
|
|
1919
|
+
createNodeByType(params: ICreateByNodeTypeParams): Promise<INode | null>;
|
|
1920
|
+
/**
|
|
1921
|
+
* 创建节点
|
|
1922
|
+
* @param params
|
|
1923
|
+
*/
|
|
1924
|
+
createNodeByAsset(params: ICreateByAssetParams): Promise<INode | null>;
|
|
1925
|
+
/**
|
|
1926
|
+
* 删除节点
|
|
1927
|
+
* @param params
|
|
1928
|
+
*/
|
|
1929
|
+
deleteNode(params: IDeleteNodeParams): Promise<IDeleteNodeResult | null>;
|
|
1930
|
+
/**
|
|
1931
|
+
* 更新节点
|
|
1932
|
+
* @param params
|
|
1933
|
+
*/
|
|
1934
|
+
updateNode(params: IUpdateNodeParams): Promise<IUpdateNodeResult>;
|
|
1935
|
+
/**
|
|
1936
|
+
* 查询节点
|
|
1937
|
+
*/
|
|
1938
|
+
queryNode(params: IQueryNodeParams): Promise<INode | null>;
|
|
1939
|
+
/**
|
|
1940
|
+
* 查询节点树(层级管理器格式)
|
|
1941
|
+
*/
|
|
1942
|
+
queryNodeTree(params: IQueryNodeTreeParams): Promise<INodeTreeItem | null>;
|
|
1943
|
+
}
|
|
1396
1944
|
|
|
1397
|
-
declare interface
|
|
1945
|
+
export declare interface INodeTreeComponent {
|
|
1946
|
+
isCustom: boolean;
|
|
1947
|
+
type: string;
|
|
1948
|
+
value: string;
|
|
1949
|
+
extends: string[];
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
export declare interface INodeTreeItem {
|
|
1953
|
+
name: string;
|
|
1954
|
+
active: boolean;
|
|
1955
|
+
locked: boolean;
|
|
1956
|
+
type: string;
|
|
1957
|
+
uuid: string;
|
|
1958
|
+
children: INodeTreeItem[];
|
|
1959
|
+
prefab: IPrefabStateInfo;
|
|
1960
|
+
parent: string;
|
|
1961
|
+
path: string;
|
|
1962
|
+
isScene: boolean;
|
|
1963
|
+
readonly: boolean;
|
|
1964
|
+
components: INodeTreeComponent[];
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* 打开场景/预制体选项
|
|
1969
|
+
*/
|
|
1970
|
+
export declare interface IOpenOptions {
|
|
1971
|
+
urlOrUUID: string;
|
|
1972
|
+
simpleNode?: boolean;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
export declare interface IOperationService {
|
|
1976
|
+
addListener(type: OperationEvent, listener: Function, priority?: number): void;
|
|
1977
|
+
removeListener(type: OperationEvent, listener: Function): void;
|
|
1978
|
+
dispatch(type: OperationEvent, ...args: any[]): void;
|
|
1979
|
+
emitMouseEvent(type: string, event: ISceneMouseEvent, dpr?: number): void;
|
|
1980
|
+
requestPointerLock(): void;
|
|
1981
|
+
exitPointerLock(): void;
|
|
1982
|
+
changePointer(type: string): void;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
export declare interface IPhysicsConfig {
|
|
1398
1986
|
gravity: IVec3Like; // (0,-10, 0)
|
|
1399
1987
|
allowSleep: boolean; // true
|
|
1400
1988
|
sleepThreshold: number; // 0.1,最小 0
|
|
@@ -1413,18 +2001,88 @@ declare interface IPhysicsConfig {
|
|
|
1413
2001
|
};
|
|
1414
2002
|
}
|
|
1415
2003
|
|
|
1416
|
-
declare interface IPhysicsMaterial {
|
|
2004
|
+
export declare interface IPhysicsMaterial {
|
|
1417
2005
|
friction: number; // 0.5
|
|
1418
2006
|
rollingFriction: number; // 0.1
|
|
1419
2007
|
spinningFriction: number; // 0.1
|
|
1420
2008
|
restitution: number; // 0.1
|
|
1421
2009
|
}
|
|
1422
2010
|
|
|
1423
|
-
declare interface IPluginScriptInfo extends PluginScriptInfo {
|
|
2011
|
+
export declare interface IPluginScriptInfo extends PluginScriptInfo {
|
|
1424
2012
|
url: string;
|
|
1425
2013
|
}
|
|
1426
2014
|
|
|
1427
|
-
declare interface
|
|
2015
|
+
export declare interface IPrefab {
|
|
2016
|
+
name: string;
|
|
2017
|
+
uuid: string;
|
|
2018
|
+
data: INodeIdentifier;
|
|
2019
|
+
optimizationPolicy: OptimizationPolicy;
|
|
2020
|
+
persistent: boolean;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
export declare interface IPrefabInfo {
|
|
2024
|
+
/** 关联的预制体资源信息 */
|
|
2025
|
+
asset?: IPrefab;
|
|
2026
|
+
root?: INodeIdentifier;
|
|
2027
|
+
instance?: IPrefabInstance;
|
|
2028
|
+
fileId: string;
|
|
2029
|
+
targetOverrides: ITargetOverrideInfo[];
|
|
2030
|
+
nestedPrefabInstanceRoots: INodeIdentifier[];
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
export declare interface IPrefabInstance {
|
|
2034
|
+
fileId: string;
|
|
2035
|
+
prefabRootNode?: INodeIdentifier;
|
|
2036
|
+
mountedChildren: IMountedChildrenInfo[];
|
|
2037
|
+
mountedComponents: IMountedComponentsInfo[];
|
|
2038
|
+
propertyOverrides: IPropertyOverrideInfo[];
|
|
2039
|
+
removedComponents: ITargetInfo[];
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
export declare interface IPrefabService extends IServiceEvents {
|
|
2043
|
+
/**
|
|
2044
|
+
* 将节点转换为预制体资源
|
|
2045
|
+
*/
|
|
2046
|
+
createPrefabFromNode(params: ICreatePrefabFromNodeParams): Promise<INode>;
|
|
2047
|
+
/**
|
|
2048
|
+
* 将节点的修改应用回预制体资源
|
|
2049
|
+
*/
|
|
2050
|
+
applyPrefabChanges(params: IApplyPrefabChangesParams): Promise<boolean>;
|
|
2051
|
+
/**
|
|
2052
|
+
* 重置节点到预制体原始状态
|
|
2053
|
+
*/
|
|
2054
|
+
revertToPrefab(params: IRevertToPrefabParams): Promise<boolean>;
|
|
2055
|
+
/**
|
|
2056
|
+
* 解耦预制体实例,使其成为普通节点
|
|
2057
|
+
*/
|
|
2058
|
+
unpackPrefabInstance(params: IUnpackPrefabInstanceParams): Promise<INode>;
|
|
2059
|
+
/**
|
|
2060
|
+
* 检查节点是否为预制体实例
|
|
2061
|
+
*/
|
|
2062
|
+
isPrefabInstance(params: IIsPrefabInstanceParams): Promise<boolean>;
|
|
2063
|
+
/**
|
|
2064
|
+
* 获取节点的预制体信息
|
|
2065
|
+
*/
|
|
2066
|
+
getPrefabInfo(params: IGetPrefabInfoParams): Promise<IPrefabInfo | null>;
|
|
2067
|
+
/**
|
|
2068
|
+
* 移除 prefab info
|
|
2069
|
+
* @param node
|
|
2070
|
+
* @param removeNested
|
|
2071
|
+
*/
|
|
2072
|
+
removePrefabInfoFromNode(node: Node_2, removeNested?: boolean): void;
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
export declare interface IPrefabStateInfo {
|
|
2076
|
+
state: PrefabState;
|
|
2077
|
+
isUnwrappable: boolean;
|
|
2078
|
+
isRevertable: boolean;
|
|
2079
|
+
isApplicable: boolean;
|
|
2080
|
+
isAddedChild: boolean;
|
|
2081
|
+
isNested: boolean;
|
|
2082
|
+
assetUuid: string;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
export declare interface IProject {
|
|
1428
2086
|
/**
|
|
1429
2087
|
* Gets the project directory path
|
|
1430
2088
|
*
|
|
@@ -1497,26 +2155,297 @@ declare interface IProject {
|
|
|
1497
2155
|
updateInfo<T>(keyOrValue: string | ProjectInfo, value?: T): Promise<boolean>;
|
|
1498
2156
|
}
|
|
1499
2157
|
|
|
1500
|
-
|
|
2158
|
+
/**
|
|
2159
|
+
* 组件的 dump 数据,以 IProperty 格式编码组件信息
|
|
2160
|
+
* 与 IComponent 不同,所有属性(包括 uuid, name, enabled)都通过 encodeObject 编码为 IProperty
|
|
2161
|
+
*/
|
|
2162
|
+
export declare interface IProperty {
|
|
2163
|
+
value: { [key: string]: IPropertyValueType } | IPropertyValueType;
|
|
2164
|
+
default?: any; // 默认值
|
|
2165
|
+
|
|
2166
|
+
// 多选节点之后,这里存储多个数据,用于自行判断多选后的显示效果,无需更新该数据
|
|
2167
|
+
values?: ({ [key: string]: IPropertyValueType } | IPropertyValueType)[];
|
|
2168
|
+
|
|
2169
|
+
lock?: { [key in keyof Vec4]?: IPropertyLock };
|
|
2170
|
+
|
|
2171
|
+
cid?: string;
|
|
2172
|
+
type?: string;
|
|
2173
|
+
ui?: { name: string; data?: any }; // 是否用指定的 UI 组件,name 是组件的名称
|
|
2174
|
+
readonly?: boolean;
|
|
2175
|
+
visible?: boolean;
|
|
2176
|
+
name?: string;
|
|
2177
|
+
|
|
2178
|
+
elementTypeData?: IProperty; // 数组里的数据的默认值 dump
|
|
2179
|
+
|
|
2180
|
+
path?: string; // 数据的搜索路径,这个是由使用方填充的
|
|
2181
|
+
|
|
2182
|
+
isArray?: boolean;
|
|
2183
|
+
invalid?: boolean;
|
|
2184
|
+
extends?: string[]; // 继承链
|
|
2185
|
+
displayName?: string; // 显示到界面上的名字
|
|
2186
|
+
displayOrder?: number; // 显示排序
|
|
2187
|
+
help?: string; // 帮助文档的 url 地址
|
|
2188
|
+
group?: IPropertyGroupOptions; // tab
|
|
2189
|
+
tooltip?: string; // 提示文本
|
|
2190
|
+
editor?: any; // 组件上定义的编辑器数据
|
|
2191
|
+
animatable?: boolean; // 是否可以在动画中编辑
|
|
2192
|
+
radioGroup?: boolean; // 是否渲染为 RadioGroup
|
|
2193
|
+
|
|
2194
|
+
// Enum
|
|
2195
|
+
enumList?: any[]; // enum 类型的 list 选项数组
|
|
2196
|
+
|
|
2197
|
+
bitmaskList?: any[];
|
|
2198
|
+
|
|
2199
|
+
// Number
|
|
2200
|
+
min?: number; // 数值类型的最小值
|
|
2201
|
+
max?: number; // 数值类型的最大值
|
|
2202
|
+
step?: number; // 数值类型的步进值
|
|
2203
|
+
slide?: boolean; // 数组是否显示为滑块
|
|
2204
|
+
unit?: string; // 显示的单位
|
|
2205
|
+
radian?: boolean; // 标识是否为角度
|
|
2206
|
+
|
|
2207
|
+
// Label
|
|
2208
|
+
multiline?: boolean; // 字符串是否允许换行
|
|
2209
|
+
// nullable?: boolean; 属性是否允许为空
|
|
2210
|
+
|
|
2211
|
+
optionalTypes?: string[]; // 对属性是 object 且是可变类型的数据的支持,比如 render-pipeline
|
|
2212
|
+
|
|
2213
|
+
userData?: { [key: string]: any }; // 用户透传的数据
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
export declare interface IPropertyGroupOptions {
|
|
2217
|
+
id: string // 默认 'default'
|
|
2218
|
+
name: string,
|
|
2219
|
+
displayOrder: number, // 默认 Infinity, 排在最后面
|
|
2220
|
+
style: string // 默认为 'tab'
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
export declare type IPropertyLock = {
|
|
2224
|
+
default: number;
|
|
2225
|
+
message: string
|
|
2226
|
+
};
|
|
2227
|
+
|
|
2228
|
+
export declare interface IPropertyOverrideInfo {
|
|
2229
|
+
targetInfo: ITargetInfo | null;
|
|
2230
|
+
propertyPath: string[];
|
|
2231
|
+
value?: any;
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
export declare type IPropertyValueType = IProperty | IProperty[] | null | undefined | number | boolean | string | Vec4 | Vec3 | Vec2 | Mat4 | any | Array<unknown>
|
|
2235
|
+
|
|
2236
|
+
export declare interface IQuat {
|
|
2237
|
+
x: number;
|
|
2238
|
+
y: number;
|
|
2239
|
+
z: number;
|
|
2240
|
+
w: number;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
/**
|
|
2244
|
+
* 查询注册类的过滤选项
|
|
2245
|
+
*/
|
|
2246
|
+
export declare interface IQueryClassesOptions {
|
|
2247
|
+
extends?: string | string[];
|
|
2248
|
+
excludeSelf?: boolean;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* 查询组件的选项
|
|
2253
|
+
*/
|
|
2254
|
+
export declare interface IQueryComponentOptions {
|
|
2255
|
+
path: string;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
export declare interface IQueryNodeParams {
|
|
2259
|
+
path: string;
|
|
2260
|
+
queryChildren: boolean;
|
|
2261
|
+
queryComponent: boolean;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
export declare interface IQueryNodeTreeParams {
|
|
2265
|
+
path?: string;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
export declare interface IRedirectInfo {
|
|
1501
2269
|
// 跳转资源的类型
|
|
1502
2270
|
type: string;
|
|
1503
2271
|
// 跳转资源的 uuid
|
|
1504
2272
|
uuid: string;
|
|
1505
2273
|
}
|
|
1506
2274
|
|
|
1507
|
-
|
|
2275
|
+
/**
|
|
2276
|
+
* 软刷新场景/预制体选项
|
|
2277
|
+
*/
|
|
2278
|
+
export declare interface IReloadOptions {
|
|
2279
|
+
urlOrUUID?: string;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* 删除组件的选项
|
|
2284
|
+
*/
|
|
2285
|
+
export declare interface IRemoveComponentOptions {
|
|
2286
|
+
path: string;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
export declare interface IRevertToPrefabParams {
|
|
2290
|
+
nodePath: string;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* 保持场景/预制体选项
|
|
2295
|
+
*/
|
|
2296
|
+
export declare interface ISaveOptions {
|
|
2297
|
+
urlOrUUID?: string;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* 场景信息
|
|
2302
|
+
*/
|
|
2303
|
+
export declare interface IScene extends IBaseIdentifier {
|
|
2304
|
+
name: string;
|
|
2305
|
+
prefab: IPrefabInfo | null;
|
|
2306
|
+
children: INode[];
|
|
2307
|
+
components: IComponentIdentifier[];
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
export declare interface ISceneMouseEvent {
|
|
2311
|
+
x: number;
|
|
2312
|
+
y: number;
|
|
2313
|
+
clientX: number;
|
|
2314
|
+
clientY: number;
|
|
2315
|
+
deltaX: number;
|
|
2316
|
+
deltaY: number;
|
|
2317
|
+
wheelDeltaX: number;
|
|
2318
|
+
wheelDeltaY: number;
|
|
2319
|
+
moveDeltaX: number;
|
|
2320
|
+
moveDeltaY: number;
|
|
2321
|
+
leftButton: boolean;
|
|
2322
|
+
middleButton: boolean;
|
|
2323
|
+
rightButton: boolean;
|
|
2324
|
+
button: number;
|
|
2325
|
+
buttons: number;
|
|
2326
|
+
ctrlKey: boolean;
|
|
2327
|
+
shiftKey: boolean;
|
|
2328
|
+
altKey: boolean;
|
|
2329
|
+
metaKey: boolean;
|
|
2330
|
+
hitPoint?: any;
|
|
2331
|
+
type?: string;
|
|
2332
|
+
handleName?: string;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
export declare interface ISceneViewService {
|
|
2336
|
+
init(): void;
|
|
2337
|
+
initFromConfig(): Promise<void>;
|
|
2338
|
+
saveConfig(): Promise<void>;
|
|
2339
|
+
setSceneLightOn(enable: boolean): void;
|
|
2340
|
+
querySceneLightOn(): boolean;
|
|
2341
|
+
onSceneOpened(scene: any): void;
|
|
2342
|
+
onSceneClosed(): void;
|
|
2343
|
+
onComponentAdded(comp: Component): void;
|
|
2344
|
+
onComponentRemoved(comp: Component): void;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
export declare interface IScriptService extends IServiceEvents {
|
|
2348
|
+
investigatePackerDriver(): Promise<void>;
|
|
2349
|
+
loadScript(): Promise<void>;
|
|
2350
|
+
removeScript(): Promise<void>;
|
|
2351
|
+
scriptChange(): Promise<void>;
|
|
2352
|
+
queryScriptCid(uuid: string): Promise<string | null>;
|
|
2353
|
+
queryScriptName(uuid: string): Promise<string | null>;
|
|
2354
|
+
isCustomComponent(classConstructor: Function): boolean;
|
|
2355
|
+
suspend(condition: Promise<any>): void;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
export declare interface ISelectionService {
|
|
2359
|
+
select(uuid: string): void;
|
|
2360
|
+
unselect(uuid: string): void;
|
|
2361
|
+
clear(): void;
|
|
2362
|
+
query(): string[];
|
|
2363
|
+
isSelect(uuid: string): boolean;
|
|
2364
|
+
reset(): void;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
export declare interface IServiceEvents {
|
|
2368
|
+
onEditorOpened?(): void;
|
|
2369
|
+
onEditorReload?(): void;
|
|
2370
|
+
onEditorClosed?(): void;
|
|
2371
|
+
onEditorSaved?(): void;
|
|
2372
|
+
onNodeBeforeChanged?(node: Node_2): void;
|
|
2373
|
+
onBeforeRemoveNode?(node: Node_2): void;
|
|
2374
|
+
onBeforeAddNode?(node: Node_2): void;
|
|
2375
|
+
onNodeChanged?(node: Node_2, opts: IChangeNodeOptions): void;
|
|
2376
|
+
onBeforeNodeAdded?(node: Node_2): void;
|
|
2377
|
+
onAddNode?(node: Node_2): void;
|
|
2378
|
+
onRemoveNode?(node: Node_2): void;
|
|
2379
|
+
onNodeAdded?(node: Node_2): void;
|
|
2380
|
+
onNodeRemoved?(node: Node_2): void;
|
|
2381
|
+
onAddComponent?(comp: Component): void;
|
|
2382
|
+
onRemoveComponent?(comp: Component): void;
|
|
2383
|
+
onSetPropertyComponent?(comp: Component): void;
|
|
2384
|
+
onComponentAdded?(comp: Component): void;
|
|
2385
|
+
onComponentRemoved?(comp: Component): void;
|
|
2386
|
+
onBeforeRemoveComponent?(comp: Component): void;
|
|
2387
|
+
onComponentBeforeChanged?(node: Node_2): void;
|
|
2388
|
+
onBeforeComponentAdded?(name: string, node: Node_2): void;
|
|
2389
|
+
onComponentChanged?(name: string, opts: IChangeNodeOptions): void;
|
|
2390
|
+
onAssetDeleted?(uuid: string): void;
|
|
2391
|
+
onAssetChanged?(uuid: string): void;
|
|
2392
|
+
onAssetRefreshed?(uuid: string): void;
|
|
2393
|
+
onScriptExecutionFinished?(): void;
|
|
2394
|
+
onSelectionSelect?(uuid: string, uuids: string[]): void;
|
|
2395
|
+
onSelectionUnselect?(uuid: string, uuids: string[]): void;
|
|
2396
|
+
onSelectionClear?(): void;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
export declare interface IServiceManager {
|
|
2400
|
+
Editor: IEditorService;
|
|
2401
|
+
Node: INodeService;
|
|
2402
|
+
Component: IComponentService;
|
|
2403
|
+
Script: IScriptService;
|
|
2404
|
+
Asset: IAssetService;
|
|
2405
|
+
Engine: IEngineService;
|
|
2406
|
+
Prefab: IPrefabService;
|
|
2407
|
+
Selection: ISelectionService;
|
|
2408
|
+
Operation: IOperationService;
|
|
2409
|
+
Undo: IUndoService;
|
|
2410
|
+
Camera: ICameraService;
|
|
2411
|
+
Gizmo: IGizmoService;
|
|
2412
|
+
SceneView: ISceneViewService;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
/**
|
|
2416
|
+
* CLI 设置组件属性的选项
|
|
2417
|
+
*/
|
|
2418
|
+
export declare interface ISetPropertyOptions {
|
|
2419
|
+
componentPath: string;
|
|
2420
|
+
properties: {
|
|
2421
|
+
[key: string]: null | undefined | number | boolean | string | object | Array<unknown>;
|
|
2422
|
+
};
|
|
2423
|
+
record?: boolean;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
/**
|
|
2427
|
+
* 编辑器设置组件属性的选项
|
|
2428
|
+
*/
|
|
2429
|
+
export declare interface ISetPropertyOptionsForEditor {
|
|
2430
|
+
uuid: string;
|
|
2431
|
+
path: string;
|
|
2432
|
+
dump: IProperty;
|
|
2433
|
+
record?: boolean;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
export declare interface ISocketConfig {
|
|
1508
2437
|
connection: (socket: any) => void;
|
|
1509
2438
|
disconnect: (socket: any) => void;
|
|
1510
2439
|
}
|
|
1511
2440
|
|
|
1512
|
-
declare interface ISplashBackgroundColor {
|
|
2441
|
+
export declare interface ISplashBackgroundColor {
|
|
1513
2442
|
x: number;
|
|
1514
2443
|
y: number;
|
|
1515
2444
|
z: number;
|
|
1516
2445
|
w: number;
|
|
1517
2446
|
}
|
|
1518
2447
|
|
|
1519
|
-
declare interface ISplashSetting {
|
|
2448
|
+
export declare interface ISplashSetting {
|
|
1520
2449
|
displayRatio: number;
|
|
1521
2450
|
totalTime: number;
|
|
1522
2451
|
watermarkLocation: 'default' | 'topLeft' | 'topRight' | 'topCenter' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
@@ -1535,12 +2464,12 @@ declare interface ISplashSetting {
|
|
|
1535
2464
|
}
|
|
1536
2465
|
}
|
|
1537
2466
|
|
|
1538
|
-
declare interface IStaticFileConfig {
|
|
2467
|
+
export declare interface IStaticFileConfig {
|
|
1539
2468
|
url: string;
|
|
1540
2469
|
path: string;
|
|
1541
2470
|
}
|
|
1542
2471
|
|
|
1543
|
-
declare type ISupportCreateCCType =
|
|
2472
|
+
export declare type ISupportCreateCCType =
|
|
1544
2473
|
| 'cc.AnimationClip' // 动画剪辑
|
|
1545
2474
|
| 'cc.Script' // 脚本(TypeScript/JavaScript)
|
|
1546
2475
|
| 'cc.SpriteAtlas' // 精灵图集(自动图集)
|
|
@@ -1558,9 +2487,21 @@ declare type ISupportCreateCCType =
|
|
|
1558
2487
|
| 'cc.AnimationGraphVariant';
|
|
1559
2488
|
|
|
1560
2489
|
/** 支持创建的资源类型(从常量数组派生) */
|
|
1561
|
-
declare type ISupportCreateType = typeof SUPPORT_CREATE_TYPES[number];
|
|
2490
|
+
export declare type ISupportCreateType = typeof SUPPORT_CREATE_TYPES[number];
|
|
2491
|
+
|
|
2492
|
+
export declare interface ITargetInfo {
|
|
2493
|
+
localID: string[];
|
|
2494
|
+
}
|
|
1562
2495
|
|
|
1563
|
-
declare interface
|
|
2496
|
+
export declare interface ITargetOverrideInfo {
|
|
2497
|
+
source: IComponentIdentifier | INodeIdentifier | null;
|
|
2498
|
+
sourceInfo: ITargetInfo | null;
|
|
2499
|
+
propertyPath: string[];
|
|
2500
|
+
target: INodeIdentifier | null;
|
|
2501
|
+
targetInfo: ITargetInfo | null;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
export declare interface IUerDataConfigItem {
|
|
1564
2505
|
key?: string; // 唯一标识符
|
|
1565
2506
|
// 配置显示的名字,如果需要翻译,则传入 i18n:${key}
|
|
1566
2507
|
label?: string;
|
|
@@ -1582,14 +2523,48 @@ declare interface IUerDataConfigItem {
|
|
|
1582
2523
|
};
|
|
1583
2524
|
}
|
|
1584
2525
|
|
|
1585
|
-
declare interface
|
|
2526
|
+
export declare interface IUndoService {
|
|
2527
|
+
beginRecording(uuids: string[], options?: any): string;
|
|
2528
|
+
endRecording(commandId: string): void;
|
|
2529
|
+
cancelRecording(commandId: string): void;
|
|
2530
|
+
undo(): Promise<void>;
|
|
2531
|
+
redo(): Promise<void>;
|
|
2532
|
+
snapshot(): void;
|
|
2533
|
+
reset(): void;
|
|
2534
|
+
isDirty(): boolean;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
export declare interface IUnpackPrefabInstanceParams {
|
|
2538
|
+
/** 要解耦的预制体实例节点 */
|
|
2539
|
+
nodePath: string;
|
|
2540
|
+
/** 递归解耦所有子预制体 */
|
|
2541
|
+
recursive?: boolean;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
export declare interface IUpdateNodeParams {
|
|
2545
|
+
path: string;
|
|
2546
|
+
name?: string;
|
|
2547
|
+
properties?: Partial<INodeProperties>;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
export declare interface IUpdateNodeResult {
|
|
2551
|
+
path: string;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
export declare interface IVec3 {
|
|
2555
|
+
x: number;
|
|
2556
|
+
y: number;
|
|
2557
|
+
z: number;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
export declare interface IVec3Like {
|
|
1586
2561
|
x: number;
|
|
1587
2562
|
y: number;
|
|
1588
2563
|
z: number;
|
|
1589
2564
|
}
|
|
1590
2565
|
|
|
1591
2566
|
/** glTF 虚拟子资源的通用 userData */
|
|
1592
|
-
declare interface IVirtualAssetUserData {
|
|
2567
|
+
export declare interface IVirtualAssetUserData {
|
|
1593
2568
|
/** 在 glTF 文件中的索引 */
|
|
1594
2569
|
gltfIndex?: number;
|
|
1595
2570
|
/** mesh 资源的面数 */
|
|
@@ -1605,20 +2580,20 @@ declare interface IVirtualAssetUserData {
|
|
|
1605
2580
|
}
|
|
1606
2581
|
|
|
1607
2582
|
/** JavaScript 资源的 userData */
|
|
1608
|
-
declare type JavaScriptAssetUserData = ScriptModuleUserData | PluginScriptUserData;
|
|
2583
|
+
export declare type JavaScriptAssetUserData = ScriptModuleUserData | PluginScriptUserData;
|
|
1609
2584
|
|
|
1610
2585
|
/** JSON 资源的 userData */
|
|
1611
|
-
declare interface JsonAssetUserData {
|
|
2586
|
+
export declare interface JsonAssetUserData {
|
|
1612
2587
|
/** 是否启用 JSON5 解析 */
|
|
1613
2588
|
json5?: boolean;
|
|
1614
2589
|
}
|
|
1615
2590
|
|
|
1616
|
-
declare interface KerningDict {
|
|
2591
|
+
export declare interface KerningDict {
|
|
1617
2592
|
[key: number]: number;
|
|
1618
2593
|
}
|
|
1619
2594
|
|
|
1620
2595
|
/** 标签图集资源的 userData */
|
|
1621
|
-
declare interface LabelAtlasAssetUserData {
|
|
2596
|
+
export declare interface LabelAtlasAssetUserData {
|
|
1622
2597
|
itemWidth: number;
|
|
1623
2598
|
itemHeight: number;
|
|
1624
2599
|
startChar: string;
|
|
@@ -1627,14 +2602,14 @@ declare interface LabelAtlasAssetUserData {
|
|
|
1627
2602
|
_fntConfig: FntData;
|
|
1628
2603
|
}
|
|
1629
2604
|
|
|
1630
|
-
declare interface LODsOption {
|
|
2605
|
+
export declare interface LODsOption {
|
|
1631
2606
|
// 屏占比
|
|
1632
2607
|
screenRatio: number;
|
|
1633
2608
|
// 和 lod0 的减面比
|
|
1634
2609
|
faceCount: number;
|
|
1635
2610
|
}
|
|
1636
2611
|
|
|
1637
|
-
declare const enum LogLevel {
|
|
2612
|
+
export declare const enum LogLevel {
|
|
1638
2613
|
NONE = 0,
|
|
1639
2614
|
Error = 1,
|
|
1640
2615
|
WARN = 2,
|
|
@@ -1642,12 +2617,34 @@ declare const enum LogLevel {
|
|
|
1642
2617
|
DEBUG = 4
|
|
1643
2618
|
}
|
|
1644
2619
|
|
|
1645
|
-
declare type MacroItem = {
|
|
2620
|
+
export declare type MacroItem = {
|
|
1646
2621
|
key: string;
|
|
1647
2622
|
value: boolean;
|
|
1648
2623
|
}
|
|
1649
2624
|
|
|
1650
|
-
declare type MakeRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
2625
|
+
export declare type MakeRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
2626
|
+
|
|
2627
|
+
export declare interface Mat4 {
|
|
2628
|
+
m00: number;
|
|
2629
|
+
m01: number;
|
|
2630
|
+
m02: number;
|
|
2631
|
+
m03: number;
|
|
2632
|
+
|
|
2633
|
+
m04: number;
|
|
2634
|
+
m05: number;
|
|
2635
|
+
m06: number;
|
|
2636
|
+
m07: number;
|
|
2637
|
+
|
|
2638
|
+
m08: number;
|
|
2639
|
+
m09: number;
|
|
2640
|
+
m10: number;
|
|
2641
|
+
m11: number;
|
|
2642
|
+
|
|
2643
|
+
m12: number;
|
|
2644
|
+
m13: number;
|
|
2645
|
+
m14: number;
|
|
2646
|
+
m15: number;
|
|
2647
|
+
}
|
|
1651
2648
|
|
|
1652
2649
|
export declare namespace Mcp {
|
|
1653
2650
|
export {
|
|
@@ -1657,26 +2654,26 @@ export declare namespace Mcp {
|
|
|
1657
2654
|
};
|
|
1658
2655
|
}
|
|
1659
2656
|
|
|
1660
|
-
declare interface MeshClusterOptions {
|
|
2657
|
+
export declare interface MeshClusterOptions {
|
|
1661
2658
|
enable: boolean;
|
|
1662
2659
|
coneCluster?: boolean;
|
|
1663
2660
|
}
|
|
1664
2661
|
|
|
1665
|
-
declare interface MeshCompressOptions {
|
|
2662
|
+
export declare interface MeshCompressOptions {
|
|
1666
2663
|
enable: boolean;
|
|
1667
2664
|
encode?: boolean;
|
|
1668
2665
|
compress?: boolean;
|
|
1669
2666
|
quantize?: boolean;
|
|
1670
2667
|
}
|
|
1671
2668
|
|
|
1672
|
-
declare interface MeshOptimizeOptions {
|
|
2669
|
+
export declare interface MeshOptimizeOptions {
|
|
1673
2670
|
enable: boolean;
|
|
1674
2671
|
vertexCache?: boolean;
|
|
1675
2672
|
vertexFetch?: boolean;
|
|
1676
2673
|
overdraw?: boolean;
|
|
1677
2674
|
}
|
|
1678
2675
|
|
|
1679
|
-
declare interface MeshOptimizerOption {
|
|
2676
|
+
export declare interface MeshOptimizerOption {
|
|
1680
2677
|
// 是否启用此功能
|
|
1681
2678
|
enable: boolean;
|
|
1682
2679
|
// 减面算法,默认 simplify
|
|
@@ -1686,7 +2683,7 @@ declare interface MeshOptimizerOption {
|
|
|
1686
2683
|
gltfpackOptions?: GltfpackOptions;
|
|
1687
2684
|
}
|
|
1688
2685
|
|
|
1689
|
-
declare interface MeshSimplifyOptions {
|
|
2686
|
+
export declare interface MeshSimplifyOptions {
|
|
1690
2687
|
enable: boolean;
|
|
1691
2688
|
targetRatio?: number;
|
|
1692
2689
|
autoErrorRate?: boolean;
|
|
@@ -1694,16 +2691,34 @@ declare interface MeshSimplifyOptions {
|
|
|
1694
2691
|
lockBoundary?: boolean;
|
|
1695
2692
|
}
|
|
1696
2693
|
|
|
1697
|
-
declare function migrate(): Promise<void>;
|
|
2694
|
+
export declare function migrate(): Promise<void>;
|
|
1698
2695
|
|
|
1699
|
-
declare function migrateFromProject(): Promise<IConfiguration>;
|
|
2696
|
+
export declare function migrateFromProject(): Promise<IConfiguration>;
|
|
1700
2697
|
|
|
1701
|
-
declare interface Migration {
|
|
2698
|
+
export declare interface Migration {
|
|
1702
2699
|
version: string;
|
|
1703
2700
|
migrate(moduleCache: Record<string, boolean>): Record<string, boolean>;
|
|
1704
2701
|
}
|
|
1705
2702
|
|
|
1706
|
-
declare
|
|
2703
|
+
export declare enum MobilityMode {
|
|
2704
|
+
/**
|
|
2705
|
+
* @en Static node
|
|
2706
|
+
* @zh 静态节点
|
|
2707
|
+
*/
|
|
2708
|
+
Static = 0,
|
|
2709
|
+
/**
|
|
2710
|
+
* @en Stationary node
|
|
2711
|
+
* @zh 固定节点
|
|
2712
|
+
*/
|
|
2713
|
+
Stationary = 1,
|
|
2714
|
+
/**
|
|
2715
|
+
* @en Movable node
|
|
2716
|
+
* @zh 可移动节点
|
|
2717
|
+
*/
|
|
2718
|
+
Movable = 2
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
export declare interface ModuleRenderConfig {
|
|
1707
2722
|
$schema?: string;
|
|
1708
2723
|
|
|
1709
2724
|
/**
|
|
@@ -1727,9 +2742,69 @@ declare interface ModuleRenderConfig {
|
|
|
1727
2742
|
/**
|
|
1728
2743
|
* Move Asset // 移动资源
|
|
1729
2744
|
*/
|
|
1730
|
-
declare function moveAsset(source: string, target: string, options?: AssetOperationOption): Promise<any>;
|
|
1731
|
-
|
|
1732
|
-
declare enum
|
|
2745
|
+
export declare function moveAsset(source: string, target: string, options?: AssetOperationOption): Promise<any>;
|
|
2746
|
+
|
|
2747
|
+
export declare enum NodeEventType {
|
|
2748
|
+
TRANSFORM_CHANGED = 'transform-changed',// 节点改变位置、旋转或缩放事件
|
|
2749
|
+
SIZE_CHANGED = 'size-changed',// 当节点尺寸改变时触发的事件
|
|
2750
|
+
ANCHOR_CHANGED = 'anchor-changed',// 当节点锚点改变时触发的事件
|
|
2751
|
+
CHILD_ADDED = 'child-added',// 节点子类添加
|
|
2752
|
+
CHILD_REMOVED = 'child-removed',// 节点子类移除
|
|
2753
|
+
PARENT_CHANGED = 'parent-changed',// 父节点改变时触发的事件
|
|
2754
|
+
CHILD_CHANGED = 'child-changed',// 子节点改变时触发的事件
|
|
2755
|
+
COMPONENT_CHANGED = 'component-changed',// 组件数据发生改变时
|
|
2756
|
+
ACTIVE_IN_HIERARCHY_CHANGE = 'active-in-hierarchy-changed',// 节点在hierarchy是否激活
|
|
2757
|
+
NOTIFY_NODE_CHANGED = 'notify-node-changed',
|
|
2758
|
+
PREFAB_INFO_CHANGED = 'prefab-info-changed',// prefab数据改变
|
|
2759
|
+
LIGHT_PROBE_CHANGED = 'light-probe-changed',// 光照探针数据改变
|
|
2760
|
+
SET_PROPERTY = 'set-property',// 设置节点上的属性
|
|
2761
|
+
MOVE_ARRAY_ELEMENT = 'move-array-element',// 调整一个数组类型的数据内某个 item 的位置
|
|
2762
|
+
REMOVE_ARRAY_ELEMENT = 'remove-array-element',// 删除一个数组元素
|
|
2763
|
+
CREATE_COMPONENT = 'create-component',// 创建一个组件
|
|
2764
|
+
RESET_COMPONENT = 'reset-component'
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
export declare enum NodeType {
|
|
2768
|
+
EMPTY = 'Empty',// 空节点
|
|
2769
|
+
TERRAIN = 'Terrain',// 地形节点
|
|
2770
|
+
CAMERA = 'Camera',// 摄像机节点(需要用过 TWorkMode 来区分 2D 和 3D)
|
|
2771
|
+
SPRITE = 'Sprite',// 精灵节点(需要用过 TWorkMode 来区分 2D 和 3D)
|
|
2772
|
+
SPRITE_SPLASH = 'SpriteSplash',// 单色
|
|
2773
|
+
GRAPHICS = 'Graphics',// 图形节点
|
|
2774
|
+
LABEL = 'Label',// 文本节点
|
|
2775
|
+
MASK = 'Mask',// 遮罩节点
|
|
2776
|
+
PARTICLE = 'Particle',// 粒子节点(需要用过 TWorkMode 来区分 2D 和 3D)
|
|
2777
|
+
TILED_MAP = 'TiledMap',// 瓦片地图节点
|
|
2778
|
+
CAPSULE = 'Capsule',// 胶囊体节点
|
|
2779
|
+
CONE = 'Cone',// 圆锥体节点
|
|
2780
|
+
CUBE = 'Cube',// 立方体节点
|
|
2781
|
+
CYLINDER = 'Cylinder',// 圆柱体节点
|
|
2782
|
+
PLANE = 'Plane',// 平面节点
|
|
2783
|
+
QUAD = 'Quad',// 四边形节点
|
|
2784
|
+
SPHERE = 'Sphere',// 球体节点
|
|
2785
|
+
TORUS = 'Torus',// 圆环体节点
|
|
2786
|
+
BUTTON = 'Button',// 按钮节点
|
|
2787
|
+
CANVAS = 'Canvas',// 画布节点(需要用过 TWorkMode 来区分 2D 和 3D)
|
|
2788
|
+
EDIT_BOX = 'EditBox',// 输入框节点
|
|
2789
|
+
LAYOUT = 'Layout',// 布局节点
|
|
2790
|
+
PAGE_VIEW = 'PageView',// 页面视图节点
|
|
2791
|
+
PROGRESS_BAR = 'ProgressBar',// 进度条节点
|
|
2792
|
+
RICH_TEXT = 'RichText',// 富文本节点
|
|
2793
|
+
SCROLL_VIEW = 'ScrollView',// 滚动视图节点
|
|
2794
|
+
SLIDER = 'Slider',// 滑动条节点
|
|
2795
|
+
TOGGLE = 'Toggle',// 切换节点
|
|
2796
|
+
TOGGLE_GROUP = 'ToggleGroup',// 切换组节点
|
|
2797
|
+
VIDEO_PLAYER = 'VideoPlayer',// 视频播放器节点
|
|
2798
|
+
WEB_VIEW = 'WebView',// 网页视图节点
|
|
2799
|
+
WIDGET = 'Widget',// 小部件节点
|
|
2800
|
+
DIRECTIONAL_LIGHT = 'Light-Directional',// 平行光
|
|
2801
|
+
SPHERE_LIGHT = 'Light-Sphere',// 球面光
|
|
2802
|
+
SPOT_LIGHT = 'Light-Spot',// 聚光灯
|
|
2803
|
+
PROBE_LIGHT = 'Light-Probe-Group',// 光照探针
|
|
2804
|
+
REFLECTION_LIGHT = 'Light-Reflection-Probe'
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
export declare enum NormalImportSetting {
|
|
1733
2808
|
/**
|
|
1734
2809
|
* 如果模型文件中包含法线信息则导出法线,否则不导出法线。
|
|
1735
2810
|
*/
|
|
@@ -1764,7 +2839,7 @@ declare enum NormalImportSetting {
|
|
|
1764
2839
|
* removeListener();
|
|
1765
2840
|
* ```
|
|
1766
2841
|
*/
|
|
1767
|
-
declare function onAssetAdded(listener: (info: IAssetInfo) => void): () => void;
|
|
2842
|
+
export declare function onAssetAdded(listener: (info: IAssetInfo) => void): () => void;
|
|
1768
2843
|
|
|
1769
2844
|
/**
|
|
1770
2845
|
* Listen to Asset Changed Event // 监听资源变更事件
|
|
@@ -1780,7 +2855,7 @@ declare function onAssetAdded(listener: (info: IAssetInfo) => void): () => void;
|
|
|
1780
2855
|
* removeListener();
|
|
1781
2856
|
* ```
|
|
1782
2857
|
*/
|
|
1783
|
-
declare function onAssetChanged(listener: (info: IAssetInfo) => void): () => void;
|
|
2858
|
+
export declare function onAssetChanged(listener: (info: IAssetInfo) => void): () => void;
|
|
1784
2859
|
|
|
1785
2860
|
/**
|
|
1786
2861
|
* Listen to Asset Removed Event // 监听资源删除事件
|
|
@@ -1796,7 +2871,7 @@ declare function onAssetChanged(listener: (info: IAssetInfo) => void): () => voi
|
|
|
1796
2871
|
* removeListener();
|
|
1797
2872
|
* ```
|
|
1798
2873
|
*/
|
|
1799
|
-
declare function onAssetRemoved(listener: (info: IAssetInfo) => void): () => void;
|
|
2874
|
+
export declare function onAssetRemoved(listener: (info: IAssetInfo) => void): () => void;
|
|
1800
2875
|
|
|
1801
2876
|
/**
|
|
1802
2877
|
* Register listener for when a specific database finishes starting.
|
|
@@ -1810,14 +2885,14 @@ declare function onAssetRemoved(listener: (info: IAssetInfo) => void): () => voi
|
|
|
1810
2885
|
* @param listener 回调函数,接收启动完成的 dbInfo
|
|
1811
2886
|
* @returns 移除监听的函数
|
|
1812
2887
|
*/
|
|
1813
|
-
declare function onDBReady(listener: (dbInfo: IAssetDBInfo) => void): () => void;
|
|
2888
|
+
export declare function onDBReady(listener: (dbInfo: IAssetDBInfo) => void): () => void;
|
|
1814
2889
|
|
|
1815
2890
|
/**
|
|
1816
2891
|
* 注册 configurationManager 保存事件的监听器
|
|
1817
2892
|
* 每次 cocos.config.json 被写入磁盘时触发
|
|
1818
2893
|
* @returns 取消监听的函数
|
|
1819
2894
|
*/
|
|
1820
|
-
declare function onDidSave(callback: () => void): () => void;
|
|
2895
|
+
export declare function onDidSave(callback: () => void): () => void;
|
|
1821
2896
|
|
|
1822
2897
|
/**
|
|
1823
2898
|
* Register listener for initialization progress.
|
|
@@ -1831,7 +2906,7 @@ declare function onDidSave(callback: () => void): () => void;
|
|
|
1831
2906
|
* @param listener 回调函数,包含当前进度、总数、当前处理的资源 url 和导入状态
|
|
1832
2907
|
* @returns 移除监听的函数
|
|
1833
2908
|
*/
|
|
1834
|
-
declare function onProgress(listener: (current: number, total: number, url: string, state: 'processing' | 'success' | 'failed') => void): () => void;
|
|
2909
|
+
export declare function onProgress(listener: (current: number, total: number, url: string, state: 'processing' | 'success' | 'failed') => void): () => void;
|
|
1835
2910
|
|
|
1836
2911
|
/**
|
|
1837
2912
|
* Register listener for when all asset databases are fully initialized.
|
|
@@ -1846,12 +2921,20 @@ declare function onProgress(listener: (current: number, total: number, url: stri
|
|
|
1846
2921
|
* @param listener 回调函数
|
|
1847
2922
|
* @returns 移除监听的函数
|
|
1848
2923
|
*/
|
|
1849
|
-
declare function onReady(listener: () => void): () => void;
|
|
2924
|
+
export declare function onReady(listener: () => void): () => void;
|
|
2925
|
+
|
|
2926
|
+
export declare function open_2(projectPath: string): Promise<void>;
|
|
1850
2927
|
|
|
1851
|
-
declare
|
|
2928
|
+
export declare type OperationEvent = SceneDragEvent | SceneKeyboardEvent | SceneMouseEvent | 'resize';
|
|
2929
|
+
|
|
2930
|
+
export declare enum OptimizationPolicy {
|
|
2931
|
+
AUTO = 0,
|
|
2932
|
+
SINGLE_INSTANCE = 1,
|
|
2933
|
+
MULTI_INSTANCE = 2
|
|
2934
|
+
}
|
|
1852
2935
|
|
|
1853
2936
|
/** 粒子资源的 userData */
|
|
1854
|
-
declare interface ParticleAssetUserData {
|
|
2937
|
+
export declare interface ParticleAssetUserData {
|
|
1855
2938
|
totalParticles: number;
|
|
1856
2939
|
life: number;
|
|
1857
2940
|
lifeVar: number;
|
|
@@ -1894,7 +2977,7 @@ declare interface ParticleAssetUserData {
|
|
|
1894
2977
|
spriteFrameUuid: string;
|
|
1895
2978
|
}
|
|
1896
2979
|
|
|
1897
|
-
declare interface PluginScriptInfo {
|
|
2980
|
+
export declare interface PluginScriptInfo {
|
|
1898
2981
|
/**
|
|
1899
2982
|
* 脚本文件。
|
|
1900
2983
|
*/
|
|
@@ -1903,7 +2986,7 @@ declare interface PluginScriptInfo {
|
|
|
1903
2986
|
}
|
|
1904
2987
|
|
|
1905
2988
|
/** JavaScript 插件脚本的 userData */
|
|
1906
|
-
declare interface PluginScriptUserData {
|
|
2989
|
+
export declare interface PluginScriptUserData {
|
|
1907
2990
|
isPlugin: true;
|
|
1908
2991
|
/** 界面没有开放给用户。默认开启 */
|
|
1909
2992
|
experimentalHideCommonJs?: boolean;
|
|
@@ -1921,14 +3004,21 @@ declare interface PluginScriptUserData {
|
|
|
1921
3004
|
}
|
|
1922
3005
|
|
|
1923
3006
|
/** 场景/预制体资源的 userData */
|
|
1924
|
-
declare interface PrefabAssetUserData {
|
|
3007
|
+
export declare interface PrefabAssetUserData {
|
|
1925
3008
|
/** 是否为持久节点 */
|
|
1926
3009
|
persistent?: boolean;
|
|
1927
3010
|
/** 同步节点名称 */
|
|
1928
3011
|
syncNodeName?: string;
|
|
1929
3012
|
}
|
|
1930
3013
|
|
|
1931
|
-
declare
|
|
3014
|
+
export declare enum PrefabState {
|
|
3015
|
+
NotAPrefab = 0,// Normal node, not a Prefab
|
|
3016
|
+
PrefabChild = 1,// Child node of a Prefab, without PrefabInstance
|
|
3017
|
+
PrefabInstance = 2,// Root node of a Prefab that contains a PrefabInstance
|
|
3018
|
+
PrefabLostAsset = 3
|
|
3019
|
+
}
|
|
3020
|
+
|
|
3021
|
+
export declare class ProgrammingFacet {
|
|
1932
3022
|
private _packerDriverUpdateCount;
|
|
1933
3023
|
private _asyncIteration;
|
|
1934
3024
|
static create(engine: IEngineOptions, projectPath: string): Promise<ProgrammingFacet>;
|
|
@@ -1975,7 +3065,7 @@ export declare namespace Project {
|
|
|
1975
3065
|
};
|
|
1976
3066
|
}
|
|
1977
3067
|
|
|
1978
|
-
declare class Project_2 implements IProject {
|
|
3068
|
+
export declare class Project_2 implements IProject {
|
|
1979
3069
|
/**
|
|
1980
3070
|
* The version of the Project
|
|
1981
3071
|
*/
|
|
@@ -2018,7 +3108,7 @@ declare class Project_2 implements IProject {
|
|
|
2018
3108
|
/**
|
|
2019
3109
|
* Project creator information
|
|
2020
3110
|
*/
|
|
2021
|
-
declare interface ProjectCreatorInfo {
|
|
3111
|
+
export declare interface ProjectCreatorInfo {
|
|
2022
3112
|
/**
|
|
2023
3113
|
* Version of the tool or engine used to create the project
|
|
2024
3114
|
*/
|
|
@@ -2047,7 +3137,7 @@ declare interface ProjectCreatorInfo {
|
|
|
2047
3137
|
/**
|
|
2048
3138
|
* Project information
|
|
2049
3139
|
*/
|
|
2050
|
-
declare interface ProjectInfo {
|
|
3140
|
+
export declare interface ProjectInfo {
|
|
2051
3141
|
/**
|
|
2052
3142
|
* Project name
|
|
2053
3143
|
*/
|
|
@@ -2084,39 +3174,39 @@ declare interface ProjectInfo {
|
|
|
2084
3174
|
* - '2d': 2D Project
|
|
2085
3175
|
* - '3d': 3D Project
|
|
2086
3176
|
*/
|
|
2087
|
-
declare type ProjectType = '2d' | '3d';
|
|
3177
|
+
export declare type ProjectType = '2d' | '3d';
|
|
2088
3178
|
|
|
2089
3179
|
/**
|
|
2090
3180
|
* Query Asset Config Map // 查询资源配置映射表
|
|
2091
3181
|
*/
|
|
2092
|
-
declare function queryAssetConfigMap(): Promise<Record<string, IAssetConfig>>;
|
|
3182
|
+
export declare function queryAssetConfigMap(): Promise<Record<string, IAssetConfig>>;
|
|
2093
3183
|
|
|
2094
3184
|
/**
|
|
2095
3185
|
* Query All Asset Database Info // 查询所有资源数据库信息
|
|
2096
3186
|
*/
|
|
2097
|
-
declare function queryAssetDBInfos(): Promise<Record<string, IAssetDBInfo>>;
|
|
3187
|
+
export declare function queryAssetDBInfos(): Promise<Record<string, IAssetDBInfo>>;
|
|
2098
3188
|
|
|
2099
3189
|
/**
|
|
2100
3190
|
* Query Asset Dependencies // 查询资源依赖
|
|
2101
3191
|
*/
|
|
2102
|
-
declare function queryAssetDependencies(uuidOrUrl: string, type?: QueryAssetType): Promise<string[]>;
|
|
3192
|
+
export declare function queryAssetDependencies(uuidOrUrl: string, type?: QueryAssetType): Promise<string[]>;
|
|
2103
3193
|
|
|
2104
3194
|
/**
|
|
2105
3195
|
* Query Asset Info // 查询资源信息
|
|
2106
3196
|
*/
|
|
2107
|
-
declare function queryAssetInfo(urlOrUUIDOrPath: string, dataKeys?: string[] | undefined): Promise<IAssetInfo | null>;
|
|
3197
|
+
export declare function queryAssetInfo(urlOrUUIDOrPath: string, dataKeys?: string[] | undefined): Promise<IAssetInfo | null>;
|
|
2108
3198
|
|
|
2109
3199
|
/**
|
|
2110
3200
|
* Batch Query Asset Info // 批量查询资源信息
|
|
2111
3201
|
*/
|
|
2112
|
-
declare function queryAssetInfos(options?: QueryAssetsOption): Promise<IAssetInfo[]>;
|
|
3202
|
+
export declare function queryAssetInfos(options?: QueryAssetsOption): Promise<IAssetInfo[]>;
|
|
2113
3203
|
|
|
2114
3204
|
/**
|
|
2115
3205
|
* Query Asset Metadata // 查询资源元数据
|
|
2116
3206
|
*/
|
|
2117
|
-
declare function queryAssetMeta(urlOrUUIDOrPath: string): Promise<IAssetMeta<'unknown'> | null>;
|
|
3207
|
+
export declare function queryAssetMeta(urlOrUUIDOrPath: string): Promise<IAssetMeta<'unknown'> | null>;
|
|
2118
3208
|
|
|
2119
|
-
declare interface QueryAssetsOption {
|
|
3209
|
+
export declare interface QueryAssetsOption {
|
|
2120
3210
|
ccType?: string | string[], // 'cc.ImageAsset' 这类,多个用数组
|
|
2121
3211
|
isBundle?: boolean, // 筛选 asset bundle 信息,搜索子包只能与 pattern 选项共存
|
|
2122
3212
|
importer?: string | string[], // 导入名称,多个用数组
|
|
@@ -2132,24 +3222,24 @@ declare interface QueryAssetsOption {
|
|
|
2132
3222
|
type?: string;
|
|
2133
3223
|
}
|
|
2134
3224
|
|
|
2135
|
-
declare type QueryAssetType = 'asset' | 'script' | 'all';
|
|
3225
|
+
export declare type QueryAssetType = 'asset' | 'script' | 'all';
|
|
2136
3226
|
|
|
2137
3227
|
/**
|
|
2138
3228
|
* Query Asset User Data Config // 查询资源用户数据配置
|
|
2139
3229
|
*/
|
|
2140
|
-
declare function queryAssetUserDataConfig(urlOrUuidOrPath: string): Promise<false | Record<string, IUerDataConfigItem> | undefined>;
|
|
3230
|
+
export declare function queryAssetUserDataConfig(urlOrUuidOrPath: string): Promise<false | Record<string, IUerDataConfigItem> | undefined>;
|
|
2141
3231
|
|
|
2142
3232
|
/**
|
|
2143
3233
|
* Query Asset Users // 查询资源使用者
|
|
2144
3234
|
*/
|
|
2145
|
-
declare function queryAssetUsers(uuidOrUrl: string, type?: QueryAssetType): Promise<string[]>;
|
|
3235
|
+
export declare function queryAssetUsers(uuidOrUrl: string, type?: QueryAssetType): Promise<string[]>;
|
|
2146
3236
|
|
|
2147
3237
|
/**
|
|
2148
3238
|
* Query Creatable Asset Map // 查询可创建资源映射表
|
|
2149
3239
|
*/
|
|
2150
|
-
declare function queryCreateMap(): Promise<ICreateMenuInfo[]>;
|
|
3240
|
+
export declare function queryCreateMap(): Promise<ICreateMenuInfo[]>;
|
|
2151
3241
|
|
|
2152
|
-
declare function queryLayerBuiltin(): Promise<{
|
|
3242
|
+
export declare function queryLayerBuiltin(): Promise<{
|
|
2153
3243
|
name: string;
|
|
2154
3244
|
value: number;
|
|
2155
3245
|
}[]>;
|
|
@@ -2157,34 +3247,34 @@ declare function queryLayerBuiltin(): Promise<{
|
|
|
2157
3247
|
/**
|
|
2158
3248
|
* Query Asset Path // 查询资源路径
|
|
2159
3249
|
*/
|
|
2160
|
-
declare function queryPath(urlOrUuid: string): Promise<string>;
|
|
3250
|
+
export declare function queryPath(urlOrUuid: string): Promise<string>;
|
|
2161
3251
|
|
|
2162
3252
|
/**
|
|
2163
3253
|
* Query Sorted Plugin Scripts // 查询排序后的插件脚本
|
|
2164
3254
|
*/
|
|
2165
|
-
declare function querySortedPlugins(filterOptions?: FilterPluginOptions): Promise<IPluginScriptInfo[]>;
|
|
3255
|
+
export declare function querySortedPlugins(filterOptions?: FilterPluginOptions): Promise<IPluginScriptInfo[]>;
|
|
2166
3256
|
|
|
2167
|
-
declare function querySortingLayerBuiltin(): Promise<readonly __private._cocos_sorting_sorting_layers__SortingItem[]>;
|
|
3257
|
+
export declare function querySortingLayerBuiltin(): Promise<readonly __private._cocos_sorting_sorting_layers__SortingItem[]>;
|
|
2168
3258
|
|
|
2169
3259
|
/**
|
|
2170
3260
|
* Query Thumbnail Handlers // 查询支持缩略图生成的资源处理器列表
|
|
2171
3261
|
*/
|
|
2172
|
-
declare function queryThumbnailHandlers(): string[];
|
|
3262
|
+
export declare function queryThumbnailHandlers(): string[];
|
|
2173
3263
|
|
|
2174
3264
|
/**
|
|
2175
3265
|
* Query Asset URL // 查询资源 URL
|
|
2176
3266
|
*/
|
|
2177
|
-
declare function queryUrl(uuidOrPath: string): Promise<string>;
|
|
3267
|
+
export declare function queryUrl(uuidOrPath: string): Promise<string>;
|
|
2178
3268
|
|
|
2179
3269
|
/**
|
|
2180
3270
|
* Query Asset UUID // 查询资源 UUID
|
|
2181
3271
|
*/
|
|
2182
|
-
declare function queryUUID(urlOrPath: string): Promise<string | null>;
|
|
3272
|
+
export declare function queryUUID(urlOrPath: string): Promise<string | null>;
|
|
2183
3273
|
|
|
2184
3274
|
/**
|
|
2185
3275
|
* Refresh Asset Directory // 刷新资源目录
|
|
2186
3276
|
*/
|
|
2187
|
-
declare function refresh(dir: string): Promise<number>;
|
|
3277
|
+
export declare function refresh(dir: string): Promise<number>;
|
|
2188
3278
|
|
|
2189
3279
|
/**
|
|
2190
3280
|
* MCP Facade Module
|
|
@@ -2205,7 +3295,7 @@ declare function refresh(dir: string): Promise<number>;
|
|
|
2205
3295
|
*
|
|
2206
3296
|
* @returns MCP endpoint URL (e.g. http://localhost:9527/mcp)
|
|
2207
3297
|
*/
|
|
2208
|
-
declare function register(): Promise<string>;
|
|
3298
|
+
export declare function register(): Promise<string>;
|
|
2209
3299
|
|
|
2210
3300
|
/**
|
|
2211
3301
|
* Register a middleware contribution (routes, static files, sockets)
|
|
@@ -2214,30 +3304,42 @@ declare function register(): Promise<string>;
|
|
|
2214
3304
|
* @param name Middleware identifier
|
|
2215
3305
|
* @param module Middleware contribution config
|
|
2216
3306
|
*/
|
|
2217
|
-
declare function register_2(name: string, module: IMiddlewareContribution): Promise<void>;
|
|
3307
|
+
export declare function register_2(name: string, module: IMiddlewareContribution): Promise<void>;
|
|
2218
3308
|
|
|
2219
3309
|
/**
|
|
2220
3310
|
* Reimport Asset // 重新导入资源
|
|
2221
3311
|
*/
|
|
2222
|
-
declare function reimportAsset(pathOrUrlOrUUID: string): Promise<IAssetInfo>;
|
|
3312
|
+
export declare function reimportAsset(pathOrUrlOrUUID: string): Promise<IAssetInfo>;
|
|
3313
|
+
|
|
3314
|
+
export declare function reload(): Promise<void>;
|
|
2223
3315
|
|
|
2224
|
-
|
|
3316
|
+
/**
|
|
3317
|
+
* 重载结果
|
|
3318
|
+
*/
|
|
3319
|
+
export declare enum ReloadResult {
|
|
3320
|
+
SUCCESS = 0,
|
|
3321
|
+
FAILED = 1,
|
|
3322
|
+
QUEUED = 2,
|
|
3323
|
+
NO_EDITOR = 3,
|
|
3324
|
+
ASSET_NOT_FOUND = 4,
|
|
3325
|
+
EDITOR_NOT_FOUND = 5
|
|
3326
|
+
}
|
|
2225
3327
|
|
|
2226
|
-
declare function remove(key: string, scope?: ConfigurationScope): Promise<boolean>;
|
|
3328
|
+
export declare function remove(key: string, scope?: ConfigurationScope): Promise<boolean>;
|
|
2227
3329
|
|
|
2228
3330
|
/**
|
|
2229
3331
|
* Rename Asset // 重命名资源
|
|
2230
3332
|
*/
|
|
2231
|
-
declare function renameAsset(source: string, target: string, options?: AssetOperationOption): Promise<any>;
|
|
3333
|
+
export declare function renameAsset(source: string, target: string, options?: AssetOperationOption): Promise<any>;
|
|
2232
3334
|
|
|
2233
3335
|
/** 渲染纹理资源的 userData */
|
|
2234
|
-
declare interface RenderTextureAssetUserData extends TextureBaseAssetUserData {
|
|
3336
|
+
export declare interface RenderTextureAssetUserData extends TextureBaseAssetUserData {
|
|
2235
3337
|
width: number;
|
|
2236
3338
|
height: number;
|
|
2237
3339
|
}
|
|
2238
3340
|
|
|
2239
3341
|
/** 渲染纹理精灵帧的 userData */
|
|
2240
|
-
declare interface RtSpriteFrameAssetUserData {
|
|
3342
|
+
export declare interface RtSpriteFrameAssetUserData {
|
|
2241
3343
|
/** 图片 UUID 或数据库 URI */
|
|
2242
3344
|
imageUuidOrDatabaseUri: string;
|
|
2243
3345
|
/** 宽度 */
|
|
@@ -2246,12 +3348,12 @@ declare interface RtSpriteFrameAssetUserData {
|
|
|
2246
3348
|
height?: number;
|
|
2247
3349
|
}
|
|
2248
3350
|
|
|
2249
|
-
declare function save(force?: boolean): Promise<void>;
|
|
3351
|
+
export declare function save(force?: boolean): Promise<void>;
|
|
2250
3352
|
|
|
2251
3353
|
/**
|
|
2252
3354
|
* Save Asset // 保存资源
|
|
2253
3355
|
*/
|
|
2254
|
-
declare function saveAsset(pathOrUrlOrUUID: string, data: string | Buffer): Promise<IAssetInfo>;
|
|
3356
|
+
export declare function saveAsset(pathOrUrlOrUUID: string, data: string | Buffer): Promise<IAssetInfo>;
|
|
2255
3357
|
|
|
2256
3358
|
export declare namespace Scene {
|
|
2257
3359
|
export {
|
|
@@ -2260,6 +3362,17 @@ export declare namespace Scene {
|
|
|
2260
3362
|
};
|
|
2261
3363
|
}
|
|
2262
3364
|
|
|
3365
|
+
/**
|
|
3366
|
+
* 场景模板类型
|
|
3367
|
+
*/
|
|
3368
|
+
export declare const SCENE_TEMPLATE_TYPE: readonly ['2d', '3d', 'quality'];
|
|
3369
|
+
|
|
3370
|
+
export declare type SceneDragEvent = 'onDragLeave' | 'onDragOver' | 'onDrop';
|
|
3371
|
+
|
|
3372
|
+
export declare type SceneKeyboardEvent = 'keydown' | 'keyup';
|
|
3373
|
+
|
|
3374
|
+
export declare type SceneMouseEvent = 'dblclick' | 'mousedown' | 'mousemove' | 'mouseup' | 'mousewheel';
|
|
3375
|
+
|
|
2263
3376
|
export declare namespace Scripting {
|
|
2264
3377
|
export {
|
|
2265
3378
|
init_7 as init,
|
|
@@ -2273,11 +3386,11 @@ export declare namespace Scripting {
|
|
|
2273
3386
|
}
|
|
2274
3387
|
|
|
2275
3388
|
/** JavaScript 脚本模块的 userData */
|
|
2276
|
-
declare interface ScriptModuleUserData {
|
|
3389
|
+
export declare interface ScriptModuleUserData {
|
|
2277
3390
|
isPlugin: false;
|
|
2278
3391
|
}
|
|
2279
3392
|
|
|
2280
|
-
declare interface SerializedAssetFinder {
|
|
3393
|
+
export declare interface SerializedAssetFinder {
|
|
2281
3394
|
meshes?: Array<string | null>;
|
|
2282
3395
|
animations?: Array<string | null>;
|
|
2283
3396
|
skeletons?: Array<string | null>;
|
|
@@ -2296,9 +3409,9 @@ export declare namespace Server {
|
|
|
2296
3409
|
};
|
|
2297
3410
|
}
|
|
2298
3411
|
|
|
2299
|
-
declare function set<T>(key: string, value: T, scope?: ConfigurationScope): Promise<boolean>;
|
|
3412
|
+
export declare function set<T>(key: string, value: T, scope?: ConfigurationScope): Promise<boolean>;
|
|
2300
3413
|
|
|
2301
|
-
declare interface SharedSettings {
|
|
3414
|
+
export declare interface SharedSettings {
|
|
2302
3415
|
useDefineForClassFields: boolean;
|
|
2303
3416
|
allowDeclareFields: boolean;
|
|
2304
3417
|
loose: boolean;
|
|
@@ -2314,7 +3427,7 @@ declare interface SharedSettings {
|
|
|
2314
3427
|
};
|
|
2315
3428
|
}
|
|
2316
3429
|
|
|
2317
|
-
declare interface SimplifyOptions {
|
|
3430
|
+
export declare interface SimplifyOptions {
|
|
2318
3431
|
// 压缩比例
|
|
2319
3432
|
targetRatio?: number;
|
|
2320
3433
|
// 防止破面
|
|
@@ -2326,13 +3439,13 @@ declare interface SimplifyOptions {
|
|
|
2326
3439
|
}
|
|
2327
3440
|
|
|
2328
3441
|
/** Spine 资源的 userData */
|
|
2329
|
-
declare interface SpineAssetUserData {
|
|
3442
|
+
export declare interface SpineAssetUserData {
|
|
2330
3443
|
/** 图集资源的 UUID */
|
|
2331
3444
|
atlasUuid: string;
|
|
2332
3445
|
}
|
|
2333
3446
|
|
|
2334
3447
|
/** 精灵图集资源的 userData */
|
|
2335
|
-
declare interface SpriteAtlasAssetUserData {
|
|
3448
|
+
export declare interface SpriteAtlasAssetUserData {
|
|
2336
3449
|
/** 图集纹理名称 */
|
|
2337
3450
|
atlasTextureName: string;
|
|
2338
3451
|
/** 纹理 UUID */
|
|
@@ -2345,12 +3458,12 @@ declare interface SpriteAtlasAssetUserData {
|
|
|
2345
3458
|
format: number;
|
|
2346
3459
|
}
|
|
2347
3460
|
|
|
2348
|
-
declare interface SpriteFrameAssetUserData extends SpriteFrameBaseAssetUserData {
|
|
3461
|
+
export declare interface SpriteFrameAssetUserData extends SpriteFrameBaseAssetUserData {
|
|
2349
3462
|
isUuid?: boolean;
|
|
2350
3463
|
imageUuidOrDatabaseUri: string;
|
|
2351
3464
|
}
|
|
2352
3465
|
|
|
2353
|
-
declare interface SpriteFrameBaseAssetUserData {
|
|
3466
|
+
export declare interface SpriteFrameBaseAssetUserData {
|
|
2354
3467
|
trimType?: string;
|
|
2355
3468
|
trimThreshold: number;
|
|
2356
3469
|
rotated: boolean;
|
|
@@ -2374,7 +3487,7 @@ declare interface SpriteFrameBaseAssetUserData {
|
|
|
2374
3487
|
vertices: SpriteFrameVertices;
|
|
2375
3488
|
}
|
|
2376
3489
|
|
|
2377
|
-
declare interface SpriteFrameVertices {
|
|
3490
|
+
export declare interface SpriteFrameVertices {
|
|
2378
3491
|
rawPosition: number[];
|
|
2379
3492
|
indexes: number[];
|
|
2380
3493
|
uv: number[];
|
|
@@ -2387,7 +3500,7 @@ declare interface SpriteFrameVertices {
|
|
|
2387
3500
|
/**
|
|
2388
3501
|
* Start Asset DB // 启动资源数据库,开始扫描和导入资源
|
|
2389
3502
|
*/
|
|
2390
|
-
declare function start(): Promise<void>;
|
|
3503
|
+
export declare function start(): Promise<void>;
|
|
2391
3504
|
|
|
2392
3505
|
/**
|
|
2393
3506
|
* Server Facade Module
|
|
@@ -2401,32 +3514,32 @@ declare function start(): Promise<void>;
|
|
|
2401
3514
|
* @param port Optional port number; auto-selected if omitted
|
|
2402
3515
|
* @returns The server base URL (e.g. http://localhost:9527)
|
|
2403
3516
|
*/
|
|
2404
|
-
declare function start_2(port?: number): Promise<string>;
|
|
3517
|
+
export declare function start_2(port?: number): Promise<string>;
|
|
2405
3518
|
|
|
2406
3519
|
/**
|
|
2407
3520
|
* 在独立的子进程中运行项目脚本编译
|
|
2408
3521
|
* 以避免阻塞主进程
|
|
2409
3522
|
*/
|
|
2410
|
-
declare function startCompileScript(assetChanges?: AssetChangeInfo[]): Promise<void>;
|
|
3523
|
+
export declare function startCompileScript(assetChanges?: AssetChangeInfo[]): Promise<void>;
|
|
2411
3524
|
|
|
2412
|
-
declare function startEngineCompilation(force?: boolean): Promise<void>;
|
|
3525
|
+
export declare function startEngineCompilation(force?: boolean): Promise<void>;
|
|
2413
3526
|
|
|
2414
3527
|
/**
|
|
2415
3528
|
* Start the scene worker process.
|
|
2416
3529
|
*
|
|
2417
3530
|
* @param projectPath Path to the project directory
|
|
2418
3531
|
*/
|
|
2419
|
-
declare function startupWorker(projectPath: string): Promise<void>;
|
|
3532
|
+
export declare function startupWorker(projectPath: string): Promise<void>;
|
|
2420
3533
|
|
|
2421
3534
|
/**
|
|
2422
3535
|
* Stop the Express HTTP server.
|
|
2423
3536
|
*/
|
|
2424
|
-
declare function stop_2(): Promise<void>;
|
|
3537
|
+
export declare function stop_2(): Promise<void>;
|
|
2425
3538
|
|
|
2426
3539
|
/** 支持创建的资源类型常量数组(用于 Zod enum 和 TypeScript type) */
|
|
2427
|
-
declare const SUPPORT_CREATE_TYPES: readonly ['animation-clip', 'typescript', 'auto-atlas', 'effect', 'scene', 'prefab', 'material', 'terrain', 'physics-material', 'label-atlas', 'render-texture', 'directory', 'effect-header'];
|
|
3540
|
+
export declare const SUPPORT_CREATE_TYPES: readonly ['animation-clip', 'typescript', 'auto-atlas', 'effect', 'scene', 'prefab', 'material', 'terrain', 'physics-material', 'label-atlas', 'render-texture', 'directory', 'effect-header'];
|
|
2428
3541
|
|
|
2429
|
-
declare enum TangentImportSetting {
|
|
3542
|
+
export declare enum TangentImportSetting {
|
|
2430
3543
|
/**
|
|
2431
3544
|
* 不在导出的网格中包含正切信息。
|
|
2432
3545
|
*/
|
|
@@ -2445,12 +3558,16 @@ declare enum TangentImportSetting {
|
|
|
2445
3558
|
recalculate = 3
|
|
2446
3559
|
}
|
|
2447
3560
|
|
|
2448
|
-
declare
|
|
3561
|
+
export declare type TEditorEntity = IScene | INode;
|
|
3562
|
+
|
|
3563
|
+
export declare type TEditorInstance = Scene_2 | Node_2;
|
|
3564
|
+
|
|
3565
|
+
export declare interface Texture2DAssetUserData extends TextureBaseAssetUserData {
|
|
2449
3566
|
isUuid?: boolean;
|
|
2450
3567
|
imageUuidOrDatabaseUri?: string;
|
|
2451
3568
|
}
|
|
2452
3569
|
|
|
2453
|
-
declare interface TextureBaseAssetUserData {
|
|
3570
|
+
export declare interface TextureBaseAssetUserData {
|
|
2454
3571
|
wrapModeS: WrapMode;
|
|
2455
3572
|
wrapModeT: WrapMode;
|
|
2456
3573
|
minfilter: Filter;
|
|
@@ -2459,7 +3576,7 @@ declare interface TextureBaseAssetUserData {
|
|
|
2459
3576
|
anisotropy: number;
|
|
2460
3577
|
}
|
|
2461
3578
|
|
|
2462
|
-
declare interface TextureCubeAssetUserData extends TextureBaseAssetUserData {
|
|
3579
|
+
export declare interface TextureCubeAssetUserData extends TextureBaseAssetUserData {
|
|
2463
3580
|
imageDatabaseUri?: string;
|
|
2464
3581
|
isRGBE: boolean;
|
|
2465
3582
|
|
|
@@ -2480,29 +3597,49 @@ declare interface TextureCubeAssetUserData extends TextureBaseAssetUserData {
|
|
|
2480
3597
|
bottom?: string;
|
|
2481
3598
|
}
|
|
2482
3599
|
|
|
2483
|
-
declare interface ThumbnailInfo {
|
|
3600
|
+
export declare interface ThumbnailInfo {
|
|
2484
3601
|
type: 'icon' | 'image',
|
|
2485
3602
|
value: string; // 具体 icon 名字或者 image 路径,image 路径支持绝对路径、 db:// 、 project:// 、和 packages:// 下的路径
|
|
2486
3603
|
}
|
|
2487
3604
|
|
|
2488
|
-
declare type ThumbnailSize = 'large' | 'small' | 'middle' | 'origin';
|
|
3605
|
+
export declare type ThumbnailSize = 'large' | 'small' | 'middle' | 'origin';
|
|
3606
|
+
|
|
3607
|
+
export declare type TSceneTemplateType = typeof SCENE_TEMPLATE_TYPE[number];
|
|
2489
3608
|
|
|
2490
3609
|
/**
|
|
2491
3610
|
* Clean up MCP state.
|
|
2492
3611
|
* Note: does NOT stop the Express server — use the Server module for that.
|
|
2493
3612
|
*/
|
|
2494
|
-
declare function unregister(): Promise<void>;
|
|
3613
|
+
export declare function unregister(): Promise<void>;
|
|
2495
3614
|
|
|
2496
3615
|
/**
|
|
2497
3616
|
* Update Asset User Data // 更新资源用户数据
|
|
2498
3617
|
*/
|
|
2499
|
-
declare function updateAssetUserData(urlOrUuidOrPath: string, path: string, value: any): Promise<any>;
|
|
3618
|
+
export declare function updateAssetUserData(urlOrUuidOrPath: string, path: string, value: any): Promise<any>;
|
|
2500
3619
|
|
|
2501
3620
|
/**
|
|
2502
3621
|
* Update Default User Data // 更新默认用户数据
|
|
2503
3622
|
*/
|
|
2504
|
-
declare function updateDefaultUserData(handler: string, path: string, value: any): Promise<void>;
|
|
3623
|
+
export declare function updateDefaultUserData(handler: string, path: string, value: any): Promise<void>;
|
|
3624
|
+
|
|
3625
|
+
export declare interface Vec2 {
|
|
3626
|
+
x: number;
|
|
3627
|
+
y: number;
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
export declare interface Vec3 {
|
|
3631
|
+
x: number;
|
|
3632
|
+
y: number;
|
|
3633
|
+
z: number;
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
export declare interface Vec4 {
|
|
3637
|
+
x: number;
|
|
3638
|
+
y: number;
|
|
3639
|
+
z: number;
|
|
3640
|
+
w: number;
|
|
3641
|
+
}
|
|
2505
3642
|
|
|
2506
|
-
declare type WrapMode = 'repeat' | 'clamp-to-edge' | 'mirrored-repeat';
|
|
3643
|
+
export declare type WrapMode = 'repeat' | 'clamp-to-edge' | 'mirrored-repeat';
|
|
2507
3644
|
|
|
2508
3645
|
export { };
|