mirror of
https://gitee.com/sli97/behavior-eden-coco-plugin.git
synced 2024-12-25 11:19:06 +00:00
init
This commit is contained in:
commit
47104caa6e
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
#///////////////////////////
|
||||||
|
# Cocos Creator 3D Project
|
||||||
|
#///////////////////////////
|
||||||
|
library/
|
||||||
|
temp/
|
||||||
|
local/
|
||||||
|
build/
|
||||||
|
profiles/
|
||||||
|
native
|
||||||
|
#//////////////////////////
|
||||||
|
# NPM
|
||||||
|
#//////////////////////////
|
||||||
|
node_modules/
|
||||||
|
#//////////////////////////
|
||||||
|
# VSCode
|
||||||
|
#//////////////////////////
|
||||||
|
.vscode/
|
||||||
|
#//////////////////////////
|
||||||
|
# WebStorm
|
||||||
|
#//////////////////////////
|
||||||
|
.idea/
|
1210
@types/editor.d.ts
vendored
Normal file
1210
@types/editor.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16090
@types/electron.d.ts
vendored
Normal file
16090
@types/electron.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
66
@types/extension.d.ts
vendored
Normal file
66
@types/extension.d.ts
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
declare namespace Editor {
|
||||||
|
|
||||||
|
namespace Interface {
|
||||||
|
// ---- Package ---- start
|
||||||
|
interface PackageInfo {
|
||||||
|
debug: boolean;
|
||||||
|
enable: boolean;
|
||||||
|
// TODO 更名为 packageJSON 更合适
|
||||||
|
info: PackageJson;
|
||||||
|
invalid: boolean;
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
version: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PackageJson {
|
||||||
|
name: string;
|
||||||
|
version: string;
|
||||||
|
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
debug?: boolean;
|
||||||
|
description?: string;
|
||||||
|
main?: string;
|
||||||
|
editor?: string;
|
||||||
|
panel?: any;
|
||||||
|
migrations?: {
|
||||||
|
version: string;
|
||||||
|
profile?: string;
|
||||||
|
custom?: string;
|
||||||
|
}[];
|
||||||
|
contributions?: {
|
||||||
|
[key: string]: any;
|
||||||
|
builder?: string; // 构建插件注册脚本
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// ---- Package ---- end
|
||||||
|
|
||||||
|
// ---- UI ---- start
|
||||||
|
interface PanelInfo {
|
||||||
|
template?: string;
|
||||||
|
style?: string;
|
||||||
|
listeners?: { [key: string]: () => {} };
|
||||||
|
methods?: { [key: string]: Function };
|
||||||
|
$?: { [key: string]: string };
|
||||||
|
ready?(): void;
|
||||||
|
update?(...args: any[]): void;
|
||||||
|
beforeClose?(): void;
|
||||||
|
close?(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace UIKit {
|
||||||
|
interface UIPanelInfo extends PanelInfo {
|
||||||
|
// 向上触发事件
|
||||||
|
dispath(eventName: string, ...arg: any): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface EditorElementBase extends HTMLElement {
|
||||||
|
value: any;
|
||||||
|
dispath: (name: string, event: any) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// ---- UI ---- end
|
||||||
|
}
|
||||||
|
}
|
3
@types/index.d.ts
vendored
Normal file
3
@types/index.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/// <reference path="./editor.d.ts"/>
|
||||||
|
/// <reference path="./message.d.ts"/>
|
||||||
|
/// <reference path="./utils.d.ts"/>
|
37
@types/message.d.ts
vendored
Normal file
37
@types/message.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
import * as AssetDb from './packages/asset-db/@types/message';
|
||||||
|
import * as Builder from './packages/builder/@types/message';
|
||||||
|
import * as Engine from './packages/engine/@types/message';
|
||||||
|
import * as Information from './packages/information/@types/message';
|
||||||
|
import * as Preferences from './packages/preferences/@types/message';
|
||||||
|
import * as Program from './packages/program/@types/message';
|
||||||
|
import * as Programming from './packages/programming/@types/message';
|
||||||
|
import * as Project from './packages/project/@types/message';
|
||||||
|
import * as Scene from './packages/scene/@types/message';
|
||||||
|
import * as Server from './packages/server/@types/message';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface EditorMessageContent {
|
||||||
|
params: any[],
|
||||||
|
result: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface EditorMessageMap {
|
||||||
|
[x: string]: EditorMessageContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface EditorMessageMaps {
|
||||||
|
[x: string]: EditorMessageMap;
|
||||||
|
'asset-db': AssetDb.message;
|
||||||
|
'builder': Builder.message;
|
||||||
|
'engine': Engine.message;
|
||||||
|
'information': Information.message;
|
||||||
|
'preferences': Preferences.message;
|
||||||
|
'program': Program.message;
|
||||||
|
'programming': Programming.message;
|
||||||
|
'project': Project.message;
|
||||||
|
'scene': Scene.message;
|
||||||
|
'server': Server.message;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
16
@types/packages/adsense-h5g-plugin/@types/index.d.ts
vendored
Normal file
16
@types/packages/adsense-h5g-plugin/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/// <reference path='../../../@types/index.d.ts'/>
|
||||||
|
|
||||||
|
import { IBuildTaskOption } from '@editor/library-type/packages/builder/@types/public';
|
||||||
|
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export interface ITaskOptions extends IBuildTaskOption {
|
||||||
|
packages: { 'adsense-h5g-plugin': IOptions };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
adsensePropertyCode: string;
|
||||||
|
enableTestAd: boolean;
|
||||||
|
AFPHostPropertyCode: string;
|
||||||
|
otherAFPHostPropertyCode: boolean;
|
||||||
|
}
|
17
@types/packages/alipay-mini-game/@types/index.d.ts
vendored
Normal file
17
@types/packages/alipay-mini-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'alipay-mini-game': {
|
||||||
|
deviceOrientation: IOrientation;
|
||||||
|
separateEngine: boolean;
|
||||||
|
subpackages?: { name: string, root: string }[];
|
||||||
|
wasmSubpackage: boolean;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
73
@types/packages/android/@types/index.d.ts
vendored
Normal file
73
@types/packages/android/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
import { IOptions as INativeOption } from '@editor/library-type/packages/native';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'android': IOptions;
|
||||||
|
native: INativeOption;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64';
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
packageName: string;
|
||||||
|
orientation: {
|
||||||
|
landscapeRight: boolean;
|
||||||
|
landscapeLeft: boolean;
|
||||||
|
portrait: boolean;
|
||||||
|
upsideDown: boolean;
|
||||||
|
},
|
||||||
|
|
||||||
|
apiLevel: number;
|
||||||
|
appABIs: IAppABI[];
|
||||||
|
|
||||||
|
useDebugKeystore: boolean;
|
||||||
|
keystorePath: string;
|
||||||
|
keystorePassword: string;
|
||||||
|
keystoreAlias: string;
|
||||||
|
keystoreAliasPassword: string;
|
||||||
|
|
||||||
|
appBundle: boolean;
|
||||||
|
androidInstant: boolean;
|
||||||
|
inputSDK: boolean;
|
||||||
|
remoteUrl: string;
|
||||||
|
sdkPath: string;
|
||||||
|
ndkPath: string;
|
||||||
|
|
||||||
|
swappy: boolean;
|
||||||
|
|
||||||
|
renderBackEnd: {
|
||||||
|
vulkan: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
gles2: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildResult extends InternalBuildResult {
|
||||||
|
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICertificateSetting {
|
||||||
|
country: string;
|
||||||
|
state: string;
|
||||||
|
locality: string;
|
||||||
|
organizationalUnit: string;
|
||||||
|
organization: string;
|
||||||
|
email: string;
|
||||||
|
certificatePath: string;
|
||||||
|
|
||||||
|
password: string; // 密钥密码
|
||||||
|
confirmPassword: string; // 确认密钥密码
|
||||||
|
|
||||||
|
alias: string; // 密钥别名
|
||||||
|
aliasPassword: string;
|
||||||
|
confirmAliasPassword: string;
|
||||||
|
|
||||||
|
validity: number; // 有效期
|
||||||
|
}
|
17
@types/packages/animation-graph/@types/engine-editor-extras.d.ts
vendored
Normal file
17
@types/packages/animation-graph/@types/engine-editor-extras.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { InitialEditorData } from './private';
|
||||||
|
|
||||||
|
declare module 'cc/editor/new-gen-anim' {
|
||||||
|
import { editorExtrasTag } from 'cc';
|
||||||
|
|
||||||
|
interface PoseGraph {
|
||||||
|
[editorExtrasTag]?: {
|
||||||
|
rootOutputNodeEditorData?: InitialEditorData;
|
||||||
|
} & InitialEditorData;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace poseGraphOp {
|
||||||
|
interface PoseGraphNodeShell {
|
||||||
|
[editorExtrasTag]?: InitialEditorData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
5
@types/packages/animator/@types/vue.d.ts
vendored
Normal file
5
@types/packages/animator/@types/vue.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
declare module 'vue/dist/vue.js' {
|
||||||
|
import Vue from 'vue';
|
||||||
|
export * from 'vue';
|
||||||
|
export default Vue;
|
||||||
|
}
|
139
@types/packages/asset-db/@types/message.d.ts
vendored
Normal file
139
@types/packages/asset-db/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
import { AssetInfo, QueryAssetsOption, AssetOperationOption, IAssetMeta, MissingAssetInfo } from './public';
|
||||||
|
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'query-ready': {
|
||||||
|
params: [],
|
||||||
|
result: boolean,
|
||||||
|
},
|
||||||
|
'create-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string | Buffer | null,
|
||||||
|
] | [
|
||||||
|
string,
|
||||||
|
string | Buffer | null,
|
||||||
|
AssetOperationOption,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'import-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
] | [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
AssetOperationOption,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'copy-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
] | [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
AssetOperationOption,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'move-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
] | [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
AssetOperationOption,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'delete-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'open-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: void,
|
||||||
|
},
|
||||||
|
'save-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string | Buffer,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'save-asset-meta': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'reimport-asset': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: boolean,
|
||||||
|
},
|
||||||
|
'refresh-asset': {
|
||||||
|
params: [
|
||||||
|
string
|
||||||
|
],
|
||||||
|
result: boolean,
|
||||||
|
},
|
||||||
|
'query-asset-info': {
|
||||||
|
params: [
|
||||||
|
urlOrUUIDOrPath: string, // uuid | url | path
|
||||||
|
dataKeys?: string[],
|
||||||
|
],
|
||||||
|
result: AssetInfo | null,
|
||||||
|
},
|
||||||
|
'query-missing-asset-info': {
|
||||||
|
params: [
|
||||||
|
urlOrPath: string, // uuid | path
|
||||||
|
],
|
||||||
|
result: MissingAssetInfo | null,
|
||||||
|
},
|
||||||
|
'query-asset-meta': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: IAssetMeta | null,
|
||||||
|
},
|
||||||
|
'query-path': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: string | null,
|
||||||
|
},
|
||||||
|
'query-url': {
|
||||||
|
params: [
|
||||||
|
string
|
||||||
|
],
|
||||||
|
result: string | null,
|
||||||
|
},
|
||||||
|
'query-uuid': {
|
||||||
|
params: [
|
||||||
|
string
|
||||||
|
],
|
||||||
|
result: string | null,
|
||||||
|
},
|
||||||
|
'query-assets': {
|
||||||
|
params: [] | [
|
||||||
|
QueryAssetsOption,
|
||||||
|
] | [QueryAssetsOption, string[]],
|
||||||
|
result: AssetInfo[],
|
||||||
|
},
|
||||||
|
'generate-available-url': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: string,
|
||||||
|
},
|
||||||
|
}
|
113
@types/packages/asset-db/@types/public.d.ts
vendored
Normal file
113
@types/packages/asset-db/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
import { IAssetInfo } from './protected';
|
||||||
|
|
||||||
|
// Basic information about the resource
|
||||||
|
// 资源的基础信息
|
||||||
|
export interface AssetInfo extends IAssetInfo {
|
||||||
|
// Asset name
|
||||||
|
// 资源名字
|
||||||
|
name: string;
|
||||||
|
// Asset display name
|
||||||
|
// 资源用于显示的名字
|
||||||
|
displayName: string;
|
||||||
|
// URL
|
||||||
|
source: string;
|
||||||
|
// loader 加载的层级地址
|
||||||
|
path: string;
|
||||||
|
// loader 加载地址会去掉扩展名,这个参数不去掉
|
||||||
|
url: string;
|
||||||
|
// 绝对路径
|
||||||
|
file: string;
|
||||||
|
// 资源的唯一 ID
|
||||||
|
uuid: string;
|
||||||
|
// 使用的导入器名字
|
||||||
|
importer: string;
|
||||||
|
// 类型
|
||||||
|
type: string;
|
||||||
|
// 是否是文件夹
|
||||||
|
isDirectory: boolean;
|
||||||
|
// 导入资源的 map
|
||||||
|
library: { [key: string]: string };
|
||||||
|
// 子资源 map
|
||||||
|
subAssets: { [key: string]: AssetInfo };
|
||||||
|
// 是否显示
|
||||||
|
visible: boolean;
|
||||||
|
// 是否只读
|
||||||
|
readonly: boolean;
|
||||||
|
|
||||||
|
// 虚拟资源可以实例化成实体的话,会带上这个扩展名
|
||||||
|
instantiation?: string;
|
||||||
|
// 跳转指向资源
|
||||||
|
redirect?: IRedirectInfo;
|
||||||
|
// 继承类型
|
||||||
|
extends?: string[];
|
||||||
|
// 是否导入完成
|
||||||
|
imported: boolean;
|
||||||
|
// 是否导入失败
|
||||||
|
invalid: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRedirectInfo {
|
||||||
|
// 跳转资源的类型
|
||||||
|
type: string;
|
||||||
|
// 跳转资源的 uuid
|
||||||
|
uuid: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface QueryAssetsOption {
|
||||||
|
pattern?: string;
|
||||||
|
ccType?: string;
|
||||||
|
extname?: string;
|
||||||
|
importer?: string;
|
||||||
|
isBundle?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AssetOperationOption {
|
||||||
|
// 是否强制覆盖已经存在的文件,默认 false
|
||||||
|
overwrite?: boolean;
|
||||||
|
// 是否自动重命名冲突文件,默认 false
|
||||||
|
rename?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AssetDBOptions {
|
||||||
|
name: string;
|
||||||
|
target: string;
|
||||||
|
library: string;
|
||||||
|
temp: string;
|
||||||
|
interval: number;
|
||||||
|
/**
|
||||||
|
* 0: 忽略错误
|
||||||
|
* 1: 仅仅打印错误
|
||||||
|
* 2: 打印错误、警告
|
||||||
|
* 3: 打印错误、警告、日志
|
||||||
|
* 4: 打印错误、警告、日志、调试信息
|
||||||
|
*/
|
||||||
|
level: number;
|
||||||
|
ignoreFiles: string[];
|
||||||
|
preImportExtList?: string[];
|
||||||
|
readonly: boolean;
|
||||||
|
visible: boolean;
|
||||||
|
ignoreGlob?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExecuteAssetDBScriptMethodOptions {
|
||||||
|
name: string;
|
||||||
|
method: string;
|
||||||
|
args?: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAssetMeta {
|
||||||
|
ver: string;
|
||||||
|
importer: string;
|
||||||
|
imported: boolean;
|
||||||
|
uuid: string;
|
||||||
|
files: string[];
|
||||||
|
subMetas: {
|
||||||
|
[index: string]: IAssetMeta;
|
||||||
|
};
|
||||||
|
userData: {
|
||||||
|
[index: string]: any;
|
||||||
|
};
|
||||||
|
displayName: string;
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}
|
24
@types/packages/assets/@types/public.d.ts
vendored
Normal file
24
@types/packages/assets/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* 外部插件注册搜索方式指定返回的接口
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface SearchMenuItem
|
||||||
|
*/
|
||||||
|
export interface SearchMenuItem {
|
||||||
|
label: string;
|
||||||
|
key: string;
|
||||||
|
// handler 方法是外部扩展的搜索方法,返回 true 表示匹配搜索成功
|
||||||
|
// searchValue 表示 assets 面板输入的搜索内容,asset 表示匹配搜索时的节点信息
|
||||||
|
handler: (searchVale: string, asset: any) => boolean | Promise<boolean>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外部插件注册扩展的入口
|
||||||
|
* 可以是搜索方式或限定搜索类型
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface SearchExtension
|
||||||
|
*/
|
||||||
|
export interface SearchExtension {
|
||||||
|
searchMenu: Function; // 搜索方式
|
||||||
|
}
|
7
@types/packages/assets/@types/vue.d.ts
vendored
Normal file
7
@types/packages/assets/@types/vue.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// 因为外围使用了 'vue/dist/vue.js' 否则不需要此声明文件
|
||||||
|
|
||||||
|
declare module 'vue/dist/vue.js' {
|
||||||
|
import Vue from 'vue';
|
||||||
|
export * from 'vue';
|
||||||
|
export default Vue;
|
||||||
|
}
|
2
@types/packages/builder/@types/index.d.ts
vendored
Normal file
2
@types/packages/builder/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
export * from './public';
|
12
@types/packages/builder/@types/message.d.ts
vendored
Normal file
12
@types/packages/builder/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'open': {
|
||||||
|
params: [
|
||||||
|
panel: 'default' | 'build-bundle',
|
||||||
|
],
|
||||||
|
result: void,
|
||||||
|
},
|
||||||
|
'query-worker-ready': {
|
||||||
|
params: [],
|
||||||
|
result: boolean,
|
||||||
|
},
|
||||||
|
}
|
113
@types/packages/builder/@types/public/build-plugin.d.ts
vendored
Normal file
113
@types/packages/builder/@types/public/build-plugin.d.ts
vendored
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
import { ITextureCompressType, IPVRQuality, IASTCQuality, IETCQuality, ITextureFormatInfo } from './texture-compress';
|
||||||
|
import { IBuildTaskOption, IConsoleType } from './options';
|
||||||
|
import { IBuildResult } from './build-result';
|
||||||
|
|
||||||
|
export interface IBuildPluginConfig {
|
||||||
|
doc?: string; // 文档地址,支持 HTTP 地址,支持相对于编辑器官方 URL 的地址
|
||||||
|
hooks?: string; // relate url about IHook
|
||||||
|
options?: IDisplayOptions; // config of options
|
||||||
|
verifyRuleMap?: IVerificationRuleMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildPluginProfile {
|
||||||
|
builder?: {
|
||||||
|
common?: Record<string, any>;
|
||||||
|
// { platform: options }
|
||||||
|
options?: Record<string, Record<string, any>>;
|
||||||
|
// id: options
|
||||||
|
taskOptionsMap?: Record<string, any>;
|
||||||
|
}
|
||||||
|
__version__: string;
|
||||||
|
|
||||||
|
// 旧版本的数据格式,已废弃
|
||||||
|
common?: Record<string, any>;
|
||||||
|
// { platform: options }
|
||||||
|
options?: Record<string, Record<string, any>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IVerificationFunc = (val: any, ...arg: any[]) => boolean | Promise<boolean>;
|
||||||
|
export type IInternalVerificationFunc = (val: any, ...arg: any[]) => boolean;
|
||||||
|
|
||||||
|
export type IVerificationRuleMap = Record<string, IVerificationRule>;
|
||||||
|
|
||||||
|
export interface IVerificationRule {
|
||||||
|
func: IVerificationFunc;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
export interface IInternalVerificationRule {
|
||||||
|
func: IInternalVerificationFunc;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type IDisplayOptions = Record<string, IConfigItem>;
|
||||||
|
|
||||||
|
export type ArrayItem = {
|
||||||
|
label: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface IConfigItem {
|
||||||
|
key?: string; // 唯一标识符
|
||||||
|
// 配置显示的名字,如果需要翻译,则传入 i18n:${key}
|
||||||
|
label?: string;
|
||||||
|
// 设置的简单说明
|
||||||
|
description?: string;
|
||||||
|
|
||||||
|
experiment?: boolean; // 是否为实验性属性
|
||||||
|
// 默认值
|
||||||
|
default?: any;
|
||||||
|
// 配置的类型
|
||||||
|
type?: 'array' | 'object';
|
||||||
|
itemConfigs?: IConfigItem[] | Record<string, IConfigItem>;
|
||||||
|
verifyRules?: string[];
|
||||||
|
verifyKey?: string;
|
||||||
|
verifyLevel?: IConsoleType, // 不赋值是默认为 error,等级为 error 时校验不通过将会无法点击构建,其他则仅做界面提示
|
||||||
|
hidden?: boolean; // 是否隐藏
|
||||||
|
render?: {
|
||||||
|
ui: string;
|
||||||
|
attributes?: Record<string, string | boolean | number>;
|
||||||
|
items?: ArrayItem[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildPlugin {
|
||||||
|
configs?: BuildPlugin.Configs;
|
||||||
|
assetHandlers?: BuildPlugin.AssetHandlers;
|
||||||
|
load?: BuildPlugin.load;
|
||||||
|
unload?: BuildPlugin.Unload;
|
||||||
|
}
|
||||||
|
export type IBaseHooks = (options: IBuildTaskOption, result: IBuildResult) => Promise<void> | void;
|
||||||
|
export type IBuildStageHooks = (root: string, options: IBuildTaskOption) => Promise<void> | void;
|
||||||
|
|
||||||
|
export namespace BuildPlugin {
|
||||||
|
export type Configs = Record<string, IBuildPluginConfig>;
|
||||||
|
export type AssetHandlers = string;
|
||||||
|
export type load = () => Promise<void> | void;
|
||||||
|
export type Unload = () => Promise<void> | void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace BuildHook {
|
||||||
|
export type throwError = boolean; // 插件注入的钩子函数,在执行失败时是否直接退出构建流程
|
||||||
|
export type title = string; // 插件任务整体 title,支持 i18n 写法
|
||||||
|
|
||||||
|
export type onError = IBaseHooks; // 构建发生中断错误时的回调,仅作为事件通知,并不能劫持错误
|
||||||
|
|
||||||
|
export type onBeforeBuild = IBaseHooks;
|
||||||
|
export type onBeforeCompressSettings = IBaseHooks;
|
||||||
|
export type onAfterCompressSettings = IBaseHooks;
|
||||||
|
export type onAfterBuild = IBaseHooks;
|
||||||
|
|
||||||
|
export type onAfterMake = IBuildStageHooks;
|
||||||
|
export type onBeforeMake = IBuildStageHooks;
|
||||||
|
|
||||||
|
export type load = () => Promise<void> | void;
|
||||||
|
export type unload = () => Promise<void> | void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace AssetHandlers {
|
||||||
|
export type compressTextures = (
|
||||||
|
tasks: { src: string; dest: string; quality: number | IPVRQuality | IASTCQuality | IETCQuality; format: ITextureCompressType }[],
|
||||||
|
) => Promise<void>;
|
||||||
|
}
|
202
@types/packages/builder/@types/public/build-result.d.ts
vendored
Normal file
202
@types/packages/builder/@types/public/build-result.d.ts
vendored
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
/**
|
||||||
|
* settings.js 里定义的数据
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { ISplashSetting, ICustomJointTextureLayout, UUID, IPhysicsConfig, IOrientation } from './options';
|
||||||
|
|
||||||
|
// ****************************** settings ************************************************
|
||||||
|
|
||||||
|
// debug: true
|
||||||
|
// designResolution: {width: "960", height: "640", policy: 4}
|
||||||
|
// jsList: ["assets/resources/b.js", "assets/resources/a.js"]
|
||||||
|
// launchScene: "db://assets/New Scene-001.scene"
|
||||||
|
// platform: "web-desktop"
|
||||||
|
// rawAssets: {
|
||||||
|
// assets: {
|
||||||
|
// "0e95a9f8-d4e7-4849-875a-7a11dd692b34": ["mesh/env/gltf/textures/birch_yellow_mat_baseColor.png", "cc.ImageAsset"]
|
||||||
|
// }
|
||||||
|
// internal: {
|
||||||
|
// "1baf0fc9-befa-459c-8bdd-af1a450a0319": ["effects/builtin-standard.effect", "cc.EffectAsset"]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// scenes: [{url: "db://assets/New Scene-001.scene", uuid: "69dc4a42-cc6c-49fb-9a57-7de0c212f83d"},…]
|
||||||
|
// startScene: "current_scene"
|
||||||
|
|
||||||
|
export interface ISettings {
|
||||||
|
CocosEngine: string;
|
||||||
|
engine: {
|
||||||
|
debug: boolean;
|
||||||
|
macros: Record<string, any>;
|
||||||
|
customLayers: {name: string, bit: number}[];
|
||||||
|
sortingLayers: {id: number, name: string, value: number}[];
|
||||||
|
platform: string;
|
||||||
|
engineModules?: string[];
|
||||||
|
builtinAssets: string[];
|
||||||
|
};
|
||||||
|
physics?: IPhysicsConfig;
|
||||||
|
rendering: {
|
||||||
|
renderPipeline: string;
|
||||||
|
renderMode?: number;
|
||||||
|
// effect.bin
|
||||||
|
effectSettingsPath?: string;
|
||||||
|
};
|
||||||
|
assets: {
|
||||||
|
server: string;
|
||||||
|
remoteBundles: string[];
|
||||||
|
bundleVers: Record<string, string>;
|
||||||
|
preloadBundles: { bundle: string, version?: string }[];
|
||||||
|
importBase?: string;
|
||||||
|
nativeBase?: string;
|
||||||
|
subpackages: string[];
|
||||||
|
preloadAssets: string[];
|
||||||
|
jsbDownloaderMaxTasks?: number;
|
||||||
|
jsbDownloaderTimeout?: number;
|
||||||
|
projectBundles: string[];
|
||||||
|
};
|
||||||
|
plugins: {
|
||||||
|
jsList: string[];
|
||||||
|
};
|
||||||
|
scripting: {
|
||||||
|
scriptPackages?: string[];
|
||||||
|
};
|
||||||
|
launch: {
|
||||||
|
launchScene: string;
|
||||||
|
};
|
||||||
|
screen: {
|
||||||
|
frameRate?: number;
|
||||||
|
exactFitScreen: boolean;
|
||||||
|
orientation?: IOrientation;
|
||||||
|
designResolution: ISettingsDesignResolution;
|
||||||
|
};
|
||||||
|
splashScreen?: ISplashSetting;
|
||||||
|
animation: {
|
||||||
|
customJointTextureLayouts?: ICustomJointTextureLayout[];
|
||||||
|
};
|
||||||
|
profiling?: {
|
||||||
|
showFPS: boolean;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物理配置
|
||||||
|
export interface IVec3Like {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
z: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICollisionMatrix {
|
||||||
|
[x: string]: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPhysicsMaterial {
|
||||||
|
friction: number; // 0.5
|
||||||
|
rollingFriction: number; // 0.1
|
||||||
|
spinningFriction: number; // 0.1
|
||||||
|
restitution: number; // 0.1
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPackageInfo {
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
uuids: UUID[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISettingsDesignResolution {
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
policy: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IAssetPathBase {
|
||||||
|
bundleName?: string;
|
||||||
|
redirect?: string; // 重定向的 bundle 包名
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRawAssetPathInfo extends IAssetPathBase {
|
||||||
|
raw: string[];
|
||||||
|
}
|
||||||
|
export declare interface IAssetPathInfo extends IAssetPathBase {
|
||||||
|
raw?: string[];
|
||||||
|
json?: string;
|
||||||
|
groupIndex?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IJsonPathInfo extends IAssetPathBase {
|
||||||
|
json?: string;
|
||||||
|
groupIndex?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildPaths {
|
||||||
|
dir: string; // 构建资源输出地址( assets 所在的目录,并不一定与构建目录对应)
|
||||||
|
settings: string; // settings.json 输出地址
|
||||||
|
systemJs?: string; // system.js 生成地址
|
||||||
|
engineDir?: string; // 引擎生成地址
|
||||||
|
polyfillsJs?: string; // polyfill.js 生成地址
|
||||||
|
assets: string; // assets 目录
|
||||||
|
subpackages: string; // subpackages 目录
|
||||||
|
remote: string; // remote 目录
|
||||||
|
bundleScripts: string // bundle 的脚本,某些平台无法下载脚本,则将远程包中的脚本移到本地
|
||||||
|
applicationJS: string; // application.js 的生成地址
|
||||||
|
compileConfig?: string; // cocos.compile.config.json
|
||||||
|
importMap: string; // import-map 文件地址
|
||||||
|
|
||||||
|
plugins: Record<string, string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare class IBuildResult {
|
||||||
|
dest: string; // options 指定的构建目录
|
||||||
|
|
||||||
|
paths: IBuildPaths; // 构建后资源相关地址集合
|
||||||
|
|
||||||
|
settings?: ISettings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定的 uuid 资源是否包含在构建资源中
|
||||||
|
*/
|
||||||
|
containsAsset: (uuid: string) => boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定 uuid 原始资源的存放路径(不包括序列化 json)
|
||||||
|
* 自动图集的小图 uuid 和自动图集的 uuid 都将会查询到合图大图的生成路径
|
||||||
|
* 实际返回多个路径的情况:查询 uuid 为自动图集资源,且对应图集生成多张大图,纹理压缩会有多个图片格式路径
|
||||||
|
*/
|
||||||
|
getRawAssetPaths: (uuid: string) => IRawAssetPathInfo[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定 uuid 资源的序列化 json 路径
|
||||||
|
*/
|
||||||
|
getJsonPathInfo: (uuid: string) => IJsonPathInfo[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指定 uuid 资源的路径相关信息
|
||||||
|
* @return {raw?: string[]; json?: string; groupIndex?: number;}
|
||||||
|
* @return.raw: 该资源源文件的实际存储位置
|
||||||
|
* @return.json: 该资源序列化 json 的实际存储位置,不存在为空
|
||||||
|
* @return.groupIndex: 若该资源的序列化 json 在某个 json 分组内,这里标识在分组内的 index,不存在为空
|
||||||
|
*/
|
||||||
|
getAssetPathInfo: (uuid: string) => IAssetPathInfo[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBundleConfig {
|
||||||
|
importBase: string; // bundle 中 import 目录的名称,通常是 'import'
|
||||||
|
nativeBase: string; // native 中 native 目录的名称,通常是 'native'
|
||||||
|
name: string; // bundle 的名称,可以通过 bundle 名称加载 bundle
|
||||||
|
deps: string[]; // 该 bundle 依赖的其他 bundle 名称
|
||||||
|
uuids: UUID[]; // 该 bundle 中的所有资源的 uuid
|
||||||
|
paths: Record<string, any[]>; // 该 bundle 中可以通过路径加载的资源,参考以前 settings 中 rawAssets 的定义
|
||||||
|
scenes: Record<string, UUID|number>; // 该 bundle 中所有场景,场景名为 key, uuid 为 value
|
||||||
|
packs: Record<UUID, UUID[]>; // 该 bundle 中所有合并的 json, 参考以前 settings 中 packedAssets 的定义
|
||||||
|
versions: { import: Array<string|number>, native: Array<string|number> }; // 该 bundle 中所有资源的版本号,参考以前 settings 中 md5AssetsMap 的定义
|
||||||
|
redirect: Array<string|number>; // 该 bundle 中重定向到其他 bundle 的资源
|
||||||
|
debug: boolean; // 是否是 debug 模式,debug 模式会对 config.json 的数据进行压缩,所以运行时得解压
|
||||||
|
types?: string[]; // paths 中的类型数组,参考以前 settings 中 assetTypes 的定义
|
||||||
|
encrypted?: boolean; // 原生上使用,标记该 bundle 中的脚本是否加密
|
||||||
|
isZip?: boolean; // 是否是 zip 模式
|
||||||
|
zipVersion?: string;
|
||||||
|
extensionMap: Record<string, UUID[]>;
|
||||||
|
/**
|
||||||
|
* 是否有需要预加载的脚本,默认为 `true`。
|
||||||
|
*/
|
||||||
|
hasPreloadScript: boolean;
|
||||||
|
dependencyRelationships: Record<string, string[]>;
|
||||||
|
}
|
6
@types/packages/builder/@types/public/global.d.ts
vendored
Normal file
6
@types/packages/builder/@types/public/global.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { IBuild } from '.';
|
||||||
|
|
||||||
|
// 定义 builder 进程内的全局变量
|
||||||
|
declare global {
|
||||||
|
const Build: IBuild;
|
||||||
|
}
|
102
@types/packages/builder/@types/public/index.d.ts
vendored
Normal file
102
@types/packages/builder/@types/public/index.d.ts
vendored
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
import { ITransformOptions } from './options';
|
||||||
|
|
||||||
|
export * from './build-result';
|
||||||
|
export * from './build-plugin';
|
||||||
|
export * from './texture-compress';
|
||||||
|
export * from './options';
|
||||||
|
|
||||||
|
interface IAppendRes {
|
||||||
|
hash: string;
|
||||||
|
paths: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ICreateBundleOptions {
|
||||||
|
excludes?: string[];
|
||||||
|
debug?: boolean;
|
||||||
|
sourceMap?: boolean;
|
||||||
|
targets?: string;
|
||||||
|
}
|
||||||
|
export interface IBuildUtils {
|
||||||
|
/**
|
||||||
|
* 压缩 uuid
|
||||||
|
* 'fc991dd7-0033-4b80-9d41-c8a86a702e59' -> 'fc9913XADNLgJ1ByKhqcC5Z'
|
||||||
|
*/
|
||||||
|
compressUuid: (uuid: string, min: boolean) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解压缩 uuid
|
||||||
|
* 'fc9913XADNLgJ1ByKhqcC5Z' -> 'fc991dd7-0033-4b80-9d41-c8a86a702e59'
|
||||||
|
*/
|
||||||
|
decompressUuid: (uuid: string) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 翻译带有 i18n 开头的名称(i18n:test)(待定)
|
||||||
|
* 'i18n:test' -> '测试'
|
||||||
|
*/
|
||||||
|
transI18nName: (name: string) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 移除 db 前缀
|
||||||
|
* 'db://assets/test.jpg' -> 'assets/test.jpg'
|
||||||
|
*/
|
||||||
|
removeDbHeader: (url: string) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将 db 开头的 url 转为项目里的实际 url
|
||||||
|
* 'db://assets/test.jpg' -> 'c:/project/assets/test.jpg'
|
||||||
|
*/
|
||||||
|
dbUrlToRawPath: (url: string) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从路径里获取存在的 uuid
|
||||||
|
* 'E:\test3d\library\oc\0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c.json' -> '0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c'
|
||||||
|
*/
|
||||||
|
getUuidFromPath: (path: string) => string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查是否全局安装了 nodejs
|
||||||
|
*/
|
||||||
|
isInstallNodeJs: () => Promise<boolean>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逐文件拷贝
|
||||||
|
*/
|
||||||
|
copyDirSync: (src: string, dest: string) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取相对路径接口
|
||||||
|
* 返回 / 拼接的相对路径
|
||||||
|
*/
|
||||||
|
relativeUrl: (from: string, to: string) => string;
|
||||||
|
|
||||||
|
transformCode: (code: string, options: ITransformOptions) => Promise<string>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给指定路径添加 md5
|
||||||
|
*/
|
||||||
|
appendMd5ToPaths: (paths: string[]) => Promise<IAppendRes | null>;
|
||||||
|
|
||||||
|
calcMd5: (data: Buffer | string) => string;
|
||||||
|
|
||||||
|
copyPaths: (paths: { src: string; dest: string }[]) => Promise<void[]>;
|
||||||
|
|
||||||
|
createBundle: (src: string, dest: string, options?: ICreateBundleOptions) => Promise<unknown>;
|
||||||
|
}
|
||||||
|
export interface IBuild {
|
||||||
|
Utils: IBuildUtils;
|
||||||
|
|
||||||
|
LIBRARY_NAME: string;
|
||||||
|
IMPORT_HEADER: string;
|
||||||
|
NATIVE_HEADER: string;
|
||||||
|
ASSETS_HEADER: string;
|
||||||
|
SUBPACKAGES_HEADER: string;
|
||||||
|
REMOTE_HEADER: string;
|
||||||
|
BUNDLE_SCRIPTS_HEADER: string;
|
||||||
|
SCRIPT_NAME: string;
|
||||||
|
CONFIG_NAME: string;
|
||||||
|
BUNDLE_ZIP_NAME: string;
|
||||||
|
projectTempDir: string;
|
||||||
|
globalTempDir: string;
|
||||||
|
buildTemplateDir: string; // 构建模板地址 build-templates
|
||||||
|
isCommand: boolean; // 是否为命令行构建
|
||||||
|
}
|
263
@types/packages/builder/@types/public/options.d.ts
vendored
Normal file
263
@types/packages/builder/@types/public/options.d.ts
vendored
Normal file
@ -0,0 +1,263 @@
|
|||||||
|
import * as babel from '@babel/core';
|
||||||
|
|
||||||
|
export interface IPhysicsConfig {
|
||||||
|
gravity: IVec3Like; // (0,-10, 0)
|
||||||
|
allowSleep: boolean; // true
|
||||||
|
sleepThreshold: number; // 0.1,最小 0
|
||||||
|
autoSimulation: boolean; // true
|
||||||
|
fixedTimeStep: number; // 1 / 60 ,最小 0
|
||||||
|
maxSubSteps: number; // 1,最小 0
|
||||||
|
defaultMaterial?: string; // 物理材质 uuid
|
||||||
|
useNodeChains: boolean; // true
|
||||||
|
collisionMatrix: ICollisionMatrix;
|
||||||
|
physicsEngine: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IConsoleType = 'log' | 'warn' | 'error' | 'debug';
|
||||||
|
|
||||||
|
export interface IBuildOptionBase {
|
||||||
|
// packAutoAtlas: boolean;
|
||||||
|
taskName: string;
|
||||||
|
platform: Platform;
|
||||||
|
scenes: IBuildSceneItem[];
|
||||||
|
skipCompressTexture: boolean;
|
||||||
|
sourceMaps: boolean;
|
||||||
|
experimentalEraseModules: boolean;
|
||||||
|
bundleCommonChunk: boolean;
|
||||||
|
|
||||||
|
startScene: string;
|
||||||
|
// 构建后的游戏文件夹生成的路径
|
||||||
|
buildPath: string;
|
||||||
|
debug: boolean;
|
||||||
|
inlineSpriteFrames: boolean;
|
||||||
|
md5Cache: boolean;
|
||||||
|
|
||||||
|
// bundle 设置
|
||||||
|
mainBundleCompressionType: BundleCompressionType;
|
||||||
|
mainBundleIsRemote: boolean;
|
||||||
|
useBuiltinServer: boolean; // 使用内置的服务器地址,实验性功能
|
||||||
|
server?: string; // 服务器地址
|
||||||
|
startSceneAssetBundle: boolean; // 配置初始场景为远程包
|
||||||
|
bundleCommonJs?: string;
|
||||||
|
|
||||||
|
// 移除远程包 Bundle 的脚本, 小游戏平台将会自动勾选
|
||||||
|
moveRemoteBundleScript: boolean;
|
||||||
|
|
||||||
|
// 项目设置
|
||||||
|
includeModules?: string[];
|
||||||
|
renderPipeline?: string;
|
||||||
|
designResolution?: IBuildDesignResolution;
|
||||||
|
physicsConfig?: IPhysicsConfig;
|
||||||
|
flags?: Record<string, boolean>;
|
||||||
|
customLayers: { name: string, value: number }[];
|
||||||
|
sortingLayers: { id: number, name: string, value: number }[];
|
||||||
|
macroConfig?: Record<string, any>
|
||||||
|
|
||||||
|
// 是否使用自定义插屏选项
|
||||||
|
useSplashScreen?: boolean;
|
||||||
|
splashScreen: ISplashSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是预览进程发送的构建请求。
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
preview?: boolean;
|
||||||
|
|
||||||
|
buildMode?: 'normal' | 'bundle' | 'script';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建所需的完整参数
|
||||||
|
*/
|
||||||
|
export interface IBuildTaskOption extends IBuildOptionBase {
|
||||||
|
taskId?: string; // 指定构建任务 id,可选
|
||||||
|
logDest?: string; // 任务的指定构建输出地址,可选
|
||||||
|
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
outputName: string;
|
||||||
|
taskName: string;
|
||||||
|
polyfills?: IPolyFills;
|
||||||
|
nextStages?: string[];
|
||||||
|
resolution: {
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
policy: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建阶段性任务绑定分组
|
||||||
|
buildStageGroup?: Record<string, string[]>;
|
||||||
|
|
||||||
|
packages?: Record<string, any>;
|
||||||
|
id?: string; // 手动配置构建任务 id
|
||||||
|
// recompileConfig?: IRecompileConfig;
|
||||||
|
|
||||||
|
// 构建 Bundle 的指定包含传参,未传递时按照项目内所有 Bundle 的原始配置打包
|
||||||
|
// name 有一定的计算规则,作为选填项
|
||||||
|
bundleConfigs?: IBundleOptions[];
|
||||||
|
buildBundleOnly?: boolean; // 仅构建 Bundle
|
||||||
|
|
||||||
|
// 一些偏好设置选项
|
||||||
|
useBuildAssetCache?: boolean;
|
||||||
|
useBuildEngineCache?: boolean;
|
||||||
|
useBuildTextureCompressCache?: boolean;
|
||||||
|
useBuildAutoAtlasCache?: boolean;
|
||||||
|
__version__?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type UUID = string;
|
||||||
|
|
||||||
|
export interface ISplashSetting {
|
||||||
|
displayRatio: number;
|
||||||
|
totalTime: number;
|
||||||
|
watermarkLocation: 'default' | 'topLeft' | 'topRight' | 'topCenter' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
||||||
|
autoFit: boolean;
|
||||||
|
|
||||||
|
url?: string;
|
||||||
|
|
||||||
|
// 运行时使用的数据
|
||||||
|
bgBase64?: string;
|
||||||
|
base64src?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface ICustomJointTextureLayout {
|
||||||
|
textureLength: number;
|
||||||
|
contents: IChunkContent[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IChunkContent {
|
||||||
|
skeleton: null | string;
|
||||||
|
clips: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建使用的设计分辨率数据
|
||||||
|
*/
|
||||||
|
export interface IBuildDesignResolution {
|
||||||
|
height: number;
|
||||||
|
width: number;
|
||||||
|
fitWidth?: boolean;
|
||||||
|
fitHeight?: boolean;
|
||||||
|
policy?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建使用的场景的数据
|
||||||
|
*/
|
||||||
|
export interface IBuildSceneItem {
|
||||||
|
url: string;
|
||||||
|
uuid: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPolyFills {
|
||||||
|
/**
|
||||||
|
* True if async functions polyfills(i.e. regeneratorRuntime) needs to be included.
|
||||||
|
* You need to turn on this field if you want to use async functions in language.
|
||||||
|
*/
|
||||||
|
asyncFunctions?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, [core-js](https://github.com/zloirock/core-js) polyfills are included.
|
||||||
|
* The default options of [core-js-builder](https://github.com/zloirock/core-js/tree/master/packages/core-js-builder)
|
||||||
|
* will be used to build the core-js.
|
||||||
|
*/
|
||||||
|
coreJs?: boolean;
|
||||||
|
|
||||||
|
targets?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildSystemJsOption {
|
||||||
|
dest: string;
|
||||||
|
platform: string;
|
||||||
|
debug: boolean;
|
||||||
|
sourceMaps: boolean;
|
||||||
|
hotModuleReload?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ICompressPresetConfig {
|
||||||
|
name: string;
|
||||||
|
options: Record<ITextureCompressPlatform, Record<ITextureCompressType, { quality: number | string }>>;
|
||||||
|
}
|
||||||
|
export interface ITextureCompressConfigs {
|
||||||
|
userPreset: Record<string, ICompressPresetConfig>;
|
||||||
|
genMipmaps: boolean;
|
||||||
|
customConfigs: Record<string, ICompressPresetConfig>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// **************************** options *******************************************
|
||||||
|
export type Platform =
|
||||||
|
| 'web-desktop'
|
||||||
|
| 'web-mobile'
|
||||||
|
| 'wechatgame'
|
||||||
|
| 'wechatprogram'
|
||||||
|
| 'oppo-mini-game'
|
||||||
|
| 'vivo-mini-game'
|
||||||
|
| 'huawei-quick-game'
|
||||||
|
| 'alipay-mini-game'
|
||||||
|
| 'taobao-creative-app'
|
||||||
|
| 'taobao-mini-game'
|
||||||
|
| 'mac'
|
||||||
|
| 'ios'
|
||||||
|
| 'linux'
|
||||||
|
// | 'ios-app-clip'
|
||||||
|
| 'android'
|
||||||
|
| 'ohos'
|
||||||
|
| 'openharmony'
|
||||||
|
| 'windows'
|
||||||
|
| 'xiaomi-quick-game'
|
||||||
|
| 'baidu-mini-game'
|
||||||
|
| 'bytedance-mini-game'
|
||||||
|
| 'cocos-play'
|
||||||
|
| 'huawei-agc'
|
||||||
|
| 'link-sure'
|
||||||
|
| 'qtt'
|
||||||
|
| 'fb-instant-games'
|
||||||
|
| 'cocos-runtime'
|
||||||
|
| 'xr-meta'
|
||||||
|
| 'xr-huaweivr'
|
||||||
|
| 'xr-pico'
|
||||||
|
| 'xr-rokid'
|
||||||
|
| 'xr-monado'
|
||||||
|
| 'ar-android'
|
||||||
|
| 'ar-ios'
|
||||||
|
| 'xr-spaces'
|
||||||
|
| 'xr-seed'
|
||||||
|
| 'online'
|
||||||
|
| 'xr-gsxr'
|
||||||
|
| 'xr-yvr'
|
||||||
|
| 'xr-htc'
|
||||||
|
| 'xr-iqiyi'
|
||||||
|
| 'xr-skyworth'
|
||||||
|
| 'xr-ffalcon'
|
||||||
|
| 'xr-nreal'
|
||||||
|
| 'xr-inmo'
|
||||||
|
| 'xr-lenovo'
|
||||||
|
;
|
||||||
|
export type BundleCompressionType = 'none' | 'merge_dep' | 'merge_all_json' | 'subpackage' | 'zip';
|
||||||
|
|
||||||
|
export type IModules = 'esm' | 'commonjs' | 'systemjs';
|
||||||
|
export interface ITransformOptions {
|
||||||
|
importMapFormat: IModules;
|
||||||
|
plugins?: babel.PluginItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ITaskState = 'waiting' | 'success' | 'failure' | 'cancel' | 'processing' | 'none';
|
||||||
|
|
||||||
|
export interface ITaskItemJSON {
|
||||||
|
id: string;
|
||||||
|
progress: number;
|
||||||
|
state: ITaskState;
|
||||||
|
message: string;
|
||||||
|
time: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildTaskItemJSON extends ITaskItemJSON {
|
||||||
|
stage: 'build' | string;
|
||||||
|
options: IBuildTaskOption;
|
||||||
|
dirty: boolean;
|
||||||
|
rawOptions?: IBuildTaskOption;
|
||||||
|
type: 'build',
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IOrientation = 'auto' | 'landscape' | 'portrait';
|
118
@types/packages/builder/@types/public/texture-compress.d.ts
vendored
Normal file
118
@types/packages/builder/@types/public/texture-compress.d.ts
vendored
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
export type ITextureCompressType =
|
||||||
|
| 'jpg'
|
||||||
|
| 'png'
|
||||||
|
| 'webp'
|
||||||
|
| 'pvrtc_4bits_rgb'
|
||||||
|
| 'pvrtc_4bits_rgba'
|
||||||
|
| 'pvrtc_4bits_rgb_a'
|
||||||
|
| 'pvrtc_2bits_rgb'
|
||||||
|
| 'pvrtc_2bits_rgba'
|
||||||
|
| 'pvrtc_2bits_rgb_a'
|
||||||
|
| 'etc1_rgb'
|
||||||
|
| 'etc1_rgb_a'
|
||||||
|
| 'etc2_rgb'
|
||||||
|
| 'etc2_rgba'
|
||||||
|
| 'astc_4x4'
|
||||||
|
| 'astc_5x5'
|
||||||
|
| 'astc_6x6'
|
||||||
|
| 'astc_8x8'
|
||||||
|
| 'astc_10x5'
|
||||||
|
| 'astc_10x10'
|
||||||
|
| 'astc_12x12'
|
||||||
|
| string;
|
||||||
|
export type ITextureCompressPlatform = 'miniGame' | 'web' | 'ios' | 'android';
|
||||||
|
|
||||||
|
export interface IHandlerInfo {
|
||||||
|
type: 'program' | 'npm' | 'function';
|
||||||
|
info: ICommandInfo | Function;
|
||||||
|
func?: Function;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ITextureFormatConfig {
|
||||||
|
displayName: string;
|
||||||
|
options: IDisplayOptions;
|
||||||
|
formats: ITextureFormatInfo[]; // 未指定 formats 则当前格式 key 作为存储的格式 value
|
||||||
|
suffix: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AllTextureCompressConfig {
|
||||||
|
// 平台的纹理压缩支持成都配置
|
||||||
|
platformConfig: Record<string, PlatformConfig>;
|
||||||
|
// 所有支持的纹理压缩格式信息
|
||||||
|
formatsInfo: Record<string, ITextureFormatInfo>;
|
||||||
|
// 用户的自定义纹理压缩配置
|
||||||
|
customFormats: Record<string, ITextureFormatInfo>;
|
||||||
|
// 配置的平台分组配置
|
||||||
|
configGroups: IConfigGroups;
|
||||||
|
// 默认的支持格式
|
||||||
|
defaultSupport: ISupportFormat;
|
||||||
|
|
||||||
|
textureFormatConfigs: Record<string, ITextureFormatConfig>;
|
||||||
|
formatsInfo: Record<string, ITextureFormatInfo>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UserCompressConfig {
|
||||||
|
customConfigs: Record<string, ICustomConfig>;
|
||||||
|
defaultConfig: Record<string, {
|
||||||
|
name: string;
|
||||||
|
options: Record<string, Record<string, { quality: string | number}>>;
|
||||||
|
}>;
|
||||||
|
userPreset: Record<string, {
|
||||||
|
name: string;
|
||||||
|
options: Record<string, Record<string, { quality: string | number}>>;
|
||||||
|
}>;
|
||||||
|
genMipmaps: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PlatformConfig {
|
||||||
|
name: string;
|
||||||
|
textureCompressConfig: PlatformCompressConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface PlatformCompressConfig {
|
||||||
|
platformType: ITextureCompressPlatform; // 注册的纹理压缩平台类型
|
||||||
|
support: ISupportFormat; // 该平台支持的纹理压缩格式,按照推荐优先级排列
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICustomConfig {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
command: string;
|
||||||
|
format: string;
|
||||||
|
overwrite?: boolean;
|
||||||
|
num?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICommandInfo {
|
||||||
|
command: string;
|
||||||
|
params?: string[];
|
||||||
|
path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ITextureFormatInfo {
|
||||||
|
displayName: string;
|
||||||
|
value: ITextureCompressType | string;
|
||||||
|
formatSuffix?: string;
|
||||||
|
alpha?: boolean;
|
||||||
|
formatType?: string;
|
||||||
|
handler?: IHandlerInfo;
|
||||||
|
custom?: boolean;
|
||||||
|
params?: string[];
|
||||||
|
}
|
||||||
|
export interface ISupportFormat {
|
||||||
|
rgb: ITextureCompressType[];
|
||||||
|
rgba: ITextureCompressType[];
|
||||||
|
}
|
||||||
|
export interface IConfigGroupsInfo {
|
||||||
|
defaultSupport?: ISupportFormat,
|
||||||
|
support: ISupportFormat,
|
||||||
|
displayName: string;
|
||||||
|
icon: string;
|
||||||
|
}
|
||||||
|
export type IConfigGroups = Record<ITextureCompressPlatform, IConfigGroupsInfo>;
|
||||||
|
|
||||||
|
export type IPVRQuality = 'fastest' | 'fast' | 'normal' | 'high' | 'best';
|
||||||
|
export type IETCQuality = 'slow' | 'fast';
|
||||||
|
export type IASTCQuality = 'veryfast' | 'fast' | 'medium' | 'thorough' | 'exhaustive';
|
29
@types/packages/bytedance-mini-game/@types/index.d.ts
vendored
Normal file
29
@types/packages/bytedance-mini-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'auto' | 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
appid: string;
|
||||||
|
buildOpenDataContextTemplate: boolean;
|
||||||
|
orientation: IOrientation;
|
||||||
|
physX: {
|
||||||
|
use: 'physX' | 'project';
|
||||||
|
notPackPhysXLibs: boolean;
|
||||||
|
mutiThread: boolean;
|
||||||
|
subThreadCount: number;
|
||||||
|
epsilon: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
subpackages?: { name: string, root: string }[];
|
||||||
|
wasmSubpackage: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'bytedance-mini-game': IOptions;
|
||||||
|
};
|
||||||
|
}
|
1
@types/packages/certificate/@types/index.d.ts
vendored
Normal file
1
@types/packages/certificate/@types/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
1
@types/packages/channel-upload-tools/@types/index.d.ts
vendored
Normal file
1
@types/packages/channel-upload-tools/@types/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
33
@types/packages/console/@types/pritate.d.ts
vendored
Normal file
33
@types/packages/console/@types/pritate.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
export type logType = 'log' | 'warn' | 'error' | 'info';
|
||||||
|
export interface IMessageItem {
|
||||||
|
rows: number; // 内部有几行 包括 details & stacks
|
||||||
|
translateY: number;
|
||||||
|
show: boolean;
|
||||||
|
title: string;
|
||||||
|
content: string[]; // details
|
||||||
|
count: number; // 重复的个数
|
||||||
|
fold: boolean; // 折叠
|
||||||
|
type: logType;
|
||||||
|
message: any;
|
||||||
|
texture: string; // 纹理 light or dark
|
||||||
|
date?: number; // 格式化的时间
|
||||||
|
time?: number; // 时间戳
|
||||||
|
process?: string;
|
||||||
|
stack: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface INewItem {
|
||||||
|
type: logType
|
||||||
|
[propName: string]: any
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ILogCounter = Record<logType, number>;
|
||||||
|
|
||||||
|
export type IConsoleExtension = {
|
||||||
|
name: string,
|
||||||
|
key: string,
|
||||||
|
label: string,
|
||||||
|
value?: boolean,
|
||||||
|
show: boolean
|
||||||
|
}
|
684
@types/packages/engine-extends/@types/glTF.d.ts
vendored
Normal file
684
@types/packages/engine-extends/@types/glTF.d.ts
vendored
Normal file
@ -0,0 +1,684 @@
|
|||||||
|
export type GlTfId = number;
|
||||||
|
/**
|
||||||
|
* Indices of those attributes that deviate from their initialization value.
|
||||||
|
*/
|
||||||
|
export interface AccessorSparseIndices {
|
||||||
|
/**
|
||||||
|
* The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
||||||
|
*/
|
||||||
|
'bufferView': GlTfId;
|
||||||
|
/**
|
||||||
|
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
||||||
|
*/
|
||||||
|
'byteOffset'?: number;
|
||||||
|
/**
|
||||||
|
* The indices data type.
|
||||||
|
*/
|
||||||
|
'componentType': 5121 | 5123 | 5125 | number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
|
||||||
|
*/
|
||||||
|
export interface AccessorSparseValues {
|
||||||
|
/**
|
||||||
|
* The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
||||||
|
*/
|
||||||
|
'bufferView': GlTfId;
|
||||||
|
/**
|
||||||
|
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
||||||
|
*/
|
||||||
|
'byteOffset'?: number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sparse storage of attributes that deviate from their initialization value.
|
||||||
|
*/
|
||||||
|
export interface AccessorSparse {
|
||||||
|
/**
|
||||||
|
* Number of entries stored in the sparse array.
|
||||||
|
*/
|
||||||
|
'count': number;
|
||||||
|
/**
|
||||||
|
* Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.
|
||||||
|
*/
|
||||||
|
'indices': AccessorSparseIndices;
|
||||||
|
/**
|
||||||
|
* Array of size `count` times number of components, storing the displaced accessor attributes pointed by `indices`. Substituted values must have the same `componentType` and number of components as the base accessor.
|
||||||
|
*/
|
||||||
|
'values': AccessorSparseValues;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's `vertexAttribPointer()` defines an attribute in a buffer.
|
||||||
|
*/
|
||||||
|
export interface Accessor {
|
||||||
|
/**
|
||||||
|
* The index of the bufferView.
|
||||||
|
*/
|
||||||
|
'bufferView'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The offset relative to the start of the bufferView in bytes.
|
||||||
|
*/
|
||||||
|
'byteOffset'?: number;
|
||||||
|
/**
|
||||||
|
* The datatype of components in the attribute.
|
||||||
|
*/
|
||||||
|
'componentType': 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | number;
|
||||||
|
/**
|
||||||
|
* Specifies whether integer data values should be normalized.
|
||||||
|
*/
|
||||||
|
'normalized'?: boolean;
|
||||||
|
/**
|
||||||
|
* The number of attributes referenced by this accessor.
|
||||||
|
*/
|
||||||
|
'count': number;
|
||||||
|
/**
|
||||||
|
* Specifies if the attribute is a scalar, vector, or matrix.
|
||||||
|
*/
|
||||||
|
'type': 'SCALAR' | 'VEC2' | 'VEC3' | 'VEC4' | 'MAT2' | 'MAT3' | 'MAT4' | string;
|
||||||
|
/**
|
||||||
|
* Maximum value of each component in this attribute.
|
||||||
|
*/
|
||||||
|
'max'?: number[];
|
||||||
|
/**
|
||||||
|
* Minimum value of each component in this attribute.
|
||||||
|
*/
|
||||||
|
'min'?: number[];
|
||||||
|
/**
|
||||||
|
* Sparse storage of attributes that deviate from their initialization value.
|
||||||
|
*/
|
||||||
|
'sparse'?: AccessorSparse;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The index of the node and TRS property that an animation channel targets.
|
||||||
|
*/
|
||||||
|
export interface AnimationChannelTarget {
|
||||||
|
/**
|
||||||
|
* The index of the node to target.
|
||||||
|
*/
|
||||||
|
'node'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The name of the node's TRS property to modify, or the "weights" of the Morph Targets it instantiates. For the "translation" property, the values that are provided by the sampler are the translation along the x, y, and z axes. For the "rotation" property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale" property, the values are the scaling factors along the x, y, and z axes.
|
||||||
|
*/
|
||||||
|
'path': 'translation' | 'rotation' | 'scale' | 'weights' | string;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Targets an animation's sampler at a node's property.
|
||||||
|
*/
|
||||||
|
export interface AnimationChannel {
|
||||||
|
/**
|
||||||
|
* The index of a sampler in this animation used to compute the value for the target.
|
||||||
|
*/
|
||||||
|
'sampler': GlTfId;
|
||||||
|
/**
|
||||||
|
* The index of the node and TRS property to target.
|
||||||
|
*/
|
||||||
|
'target': AnimationChannelTarget;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
||||||
|
*/
|
||||||
|
export interface AnimationSampler {
|
||||||
|
/**
|
||||||
|
* The index of an accessor containing keyframe input values, e.g., time.
|
||||||
|
*/
|
||||||
|
'input': GlTfId;
|
||||||
|
/**
|
||||||
|
* Interpolation algorithm.
|
||||||
|
*/
|
||||||
|
'interpolation'?: 'LINEAR' | 'STEP' | 'CUBICSPLINE' | string;
|
||||||
|
/**
|
||||||
|
* The index of an accessor, containing keyframe output values.
|
||||||
|
*/
|
||||||
|
'output': GlTfId;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A keyframe animation.
|
||||||
|
*/
|
||||||
|
export interface Animation {
|
||||||
|
/**
|
||||||
|
* An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets.
|
||||||
|
*/
|
||||||
|
'channels': AnimationChannel[];
|
||||||
|
/**
|
||||||
|
* An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
||||||
|
*/
|
||||||
|
'samplers': AnimationSampler[];
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Metadata about the glTF asset.
|
||||||
|
*/
|
||||||
|
export interface Asset {
|
||||||
|
/**
|
||||||
|
* A copyright message suitable for display to credit the content creator.
|
||||||
|
*/
|
||||||
|
'copyright'?: string;
|
||||||
|
/**
|
||||||
|
* Tool that generated this glTF model. Useful for debugging.
|
||||||
|
*/
|
||||||
|
'generator'?: string;
|
||||||
|
/**
|
||||||
|
* The glTF version that this asset targets.
|
||||||
|
*/
|
||||||
|
'version': string;
|
||||||
|
/**
|
||||||
|
* The minimum glTF version that this asset targets.
|
||||||
|
*/
|
||||||
|
'minVersion'?: string;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A buffer points to binary geometry, animation, or skins.
|
||||||
|
*/
|
||||||
|
export interface Buffer {
|
||||||
|
/**
|
||||||
|
* The uri of the buffer.
|
||||||
|
*/
|
||||||
|
'uri'?: string;
|
||||||
|
/**
|
||||||
|
* The length of the buffer in bytes.
|
||||||
|
*/
|
||||||
|
'byteLength': number;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A view into a buffer generally representing a subset of the buffer.
|
||||||
|
*/
|
||||||
|
export interface BufferView {
|
||||||
|
/**
|
||||||
|
* The index of the buffer.
|
||||||
|
*/
|
||||||
|
'buffer': GlTfId;
|
||||||
|
/**
|
||||||
|
* The offset into the buffer in bytes.
|
||||||
|
*/
|
||||||
|
'byteOffset'?: number;
|
||||||
|
/**
|
||||||
|
* The length of the bufferView in bytes.
|
||||||
|
*/
|
||||||
|
'byteLength': number;
|
||||||
|
/**
|
||||||
|
* The stride, in bytes.
|
||||||
|
*/
|
||||||
|
'byteStride'?: number;
|
||||||
|
/**
|
||||||
|
* The target that the GPU buffer should be bound to.
|
||||||
|
*/
|
||||||
|
'target'?: 34962 | 34963 | number;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* An orthographic camera containing properties to create an orthographic projection matrix.
|
||||||
|
*/
|
||||||
|
export interface CameraOrthographic {
|
||||||
|
/**
|
||||||
|
* The floating-point horizontal magnification of the view. Must not be zero.
|
||||||
|
*/
|
||||||
|
'xmag': number;
|
||||||
|
/**
|
||||||
|
* The floating-point vertical magnification of the view. Must not be zero.
|
||||||
|
*/
|
||||||
|
'ymag': number;
|
||||||
|
/**
|
||||||
|
* The floating-point distance to the far clipping plane. `zfar` must be greater than `znear`.
|
||||||
|
*/
|
||||||
|
'zfar': number;
|
||||||
|
/**
|
||||||
|
* The floating-point distance to the near clipping plane.
|
||||||
|
*/
|
||||||
|
'znear': number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A perspective camera containing properties to create a perspective projection matrix.
|
||||||
|
*/
|
||||||
|
export interface CameraPerspective {
|
||||||
|
/**
|
||||||
|
* The floating-point aspect ratio of the field of view.
|
||||||
|
*/
|
||||||
|
'aspectRatio'?: number;
|
||||||
|
/**
|
||||||
|
* The floating-point vertical field of view in radians.
|
||||||
|
*/
|
||||||
|
'yfov': number;
|
||||||
|
/**
|
||||||
|
* The floating-point distance to the far clipping plane.
|
||||||
|
*/
|
||||||
|
'zfar'?: number;
|
||||||
|
/**
|
||||||
|
* The floating-point distance to the near clipping plane.
|
||||||
|
*/
|
||||||
|
'znear': number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
|
||||||
|
*/
|
||||||
|
export interface Camera {
|
||||||
|
/**
|
||||||
|
* An orthographic camera containing properties to create an orthographic projection matrix.
|
||||||
|
*/
|
||||||
|
'orthographic'?: CameraOrthographic;
|
||||||
|
/**
|
||||||
|
* A perspective camera containing properties to create a perspective projection matrix.
|
||||||
|
*/
|
||||||
|
'perspective'?: CameraPerspective;
|
||||||
|
/**
|
||||||
|
* Specifies if the camera uses a perspective or orthographic projection.
|
||||||
|
*/
|
||||||
|
'type': 'perspective' | 'orthographic' | string;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.
|
||||||
|
*/
|
||||||
|
export interface Image {
|
||||||
|
/**
|
||||||
|
* The uri of the image.
|
||||||
|
*/
|
||||||
|
'uri'?: string;
|
||||||
|
/**
|
||||||
|
* The image's MIME type. Required if `bufferView` is defined.
|
||||||
|
*/
|
||||||
|
'mimeType'?: 'image/jpeg' | 'image/png' | string;
|
||||||
|
/**
|
||||||
|
* The index of the bufferView that contains the image. Use this instead of the image's uri property.
|
||||||
|
*/
|
||||||
|
'bufferView'?: GlTfId;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Reference to a texture.
|
||||||
|
*/
|
||||||
|
export interface TextureInfo {
|
||||||
|
/**
|
||||||
|
* The index of the texture.
|
||||||
|
*/
|
||||||
|
'index': GlTfId;
|
||||||
|
/**
|
||||||
|
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
||||||
|
*/
|
||||||
|
'texCoord'?: number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
|
||||||
|
*/
|
||||||
|
export interface MaterialPbrMetallicRoughness {
|
||||||
|
/**
|
||||||
|
* The material's base color factor.
|
||||||
|
*/
|
||||||
|
'baseColorFactor'?: number[];
|
||||||
|
/**
|
||||||
|
* The base color texture.
|
||||||
|
*/
|
||||||
|
'baseColorTexture'?: TextureInfo;
|
||||||
|
/**
|
||||||
|
* The metalness of the material.
|
||||||
|
*/
|
||||||
|
'metallicFactor'?: number;
|
||||||
|
/**
|
||||||
|
* The roughness of the material.
|
||||||
|
*/
|
||||||
|
'roughnessFactor'?: number;
|
||||||
|
/**
|
||||||
|
* The metallic-roughness texture.
|
||||||
|
*/
|
||||||
|
'metallicRoughnessTexture'?: TextureInfo;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
export interface MaterialNormalTextureInfo {
|
||||||
|
'index'?: any;
|
||||||
|
'texCoord'?: any;
|
||||||
|
/**
|
||||||
|
* The scalar multiplier applied to each normal vector of the normal texture.
|
||||||
|
*/
|
||||||
|
'scale'?: number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
export interface MaterialOcclusionTextureInfo {
|
||||||
|
'index'?: any;
|
||||||
|
'texCoord'?: any;
|
||||||
|
/**
|
||||||
|
* A scalar multiplier controlling the amount of occlusion applied.
|
||||||
|
*/
|
||||||
|
'strength'?: number;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The material appearance of a primitive.
|
||||||
|
*/
|
||||||
|
export interface Material {
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
/**
|
||||||
|
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of `pbrMetallicRoughness` apply.
|
||||||
|
*/
|
||||||
|
'pbrMetallicRoughness'?: MaterialPbrMetallicRoughness;
|
||||||
|
/**
|
||||||
|
* The normal map texture.
|
||||||
|
*/
|
||||||
|
'normalTexture'?: MaterialNormalTextureInfo;
|
||||||
|
/**
|
||||||
|
* The occlusion map texture.
|
||||||
|
*/
|
||||||
|
'occlusionTexture'?: MaterialOcclusionTextureInfo;
|
||||||
|
/**
|
||||||
|
* The emissive map texture.
|
||||||
|
*/
|
||||||
|
'emissiveTexture'?: TextureInfo;
|
||||||
|
/**
|
||||||
|
* The emissive color of the material.
|
||||||
|
*/
|
||||||
|
'emissiveFactor'?: number[];
|
||||||
|
/**
|
||||||
|
* The alpha rendering mode of the material.
|
||||||
|
*/
|
||||||
|
'alphaMode'?: 'OPAQUE' | 'MASK' | 'BLEND' | string;
|
||||||
|
/**
|
||||||
|
* The alpha cutoff value of the material.
|
||||||
|
*/
|
||||||
|
'alphaCutoff'?: number;
|
||||||
|
/**
|
||||||
|
* Specifies whether the material is double sided.
|
||||||
|
*/
|
||||||
|
'doubleSided'?: boolean;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Geometry to be rendered with the given material.
|
||||||
|
*/
|
||||||
|
export interface MeshPrimitive {
|
||||||
|
/**
|
||||||
|
* A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
|
||||||
|
*/
|
||||||
|
'attributes': {
|
||||||
|
[k: string]: GlTfId;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* The index of the accessor that contains the indices.
|
||||||
|
*/
|
||||||
|
'indices'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The index of the material to apply to this primitive when rendering.
|
||||||
|
*/
|
||||||
|
'material'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The type of primitives to render.
|
||||||
|
*/
|
||||||
|
'mode'?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;
|
||||||
|
/**
|
||||||
|
* An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.
|
||||||
|
*/
|
||||||
|
'targets'?: {
|
||||||
|
[k: string]: GlTfId;
|
||||||
|
}[];
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.
|
||||||
|
*/
|
||||||
|
export interface Mesh {
|
||||||
|
/**
|
||||||
|
* An array of primitives, each defining geometry to be rendered with a material.
|
||||||
|
*/
|
||||||
|
'primitives': MeshPrimitive[];
|
||||||
|
/**
|
||||||
|
* Array of weights to be applied to the Morph Targets.
|
||||||
|
*/
|
||||||
|
'weights'?: number[];
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), only TRS properties may be present; `matrix` will not be present.
|
||||||
|
*/
|
||||||
|
export interface Node {
|
||||||
|
/**
|
||||||
|
* The index of the camera referenced by this node.
|
||||||
|
*/
|
||||||
|
'camera'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The indices of this node's children.
|
||||||
|
*/
|
||||||
|
'children'?: GlTfId[];
|
||||||
|
/**
|
||||||
|
* The index of the skin referenced by this node.
|
||||||
|
*/
|
||||||
|
'skin'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* A floating-point 4x4 transformation matrix stored in column-major order.
|
||||||
|
*/
|
||||||
|
'matrix'?: number[];
|
||||||
|
/**
|
||||||
|
* The index of the mesh in this node.
|
||||||
|
*/
|
||||||
|
'mesh'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
||||||
|
*/
|
||||||
|
'rotation'?: number[];
|
||||||
|
/**
|
||||||
|
* The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
|
||||||
|
*/
|
||||||
|
'scale'?: number[];
|
||||||
|
/**
|
||||||
|
* The node's translation along the x, y, and z axes.
|
||||||
|
*/
|
||||||
|
'translation'?: number[];
|
||||||
|
/**
|
||||||
|
* The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh.
|
||||||
|
*/
|
||||||
|
'weights'?: number[];
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Texture sampler properties for filtering and wrapping modes.
|
||||||
|
*/
|
||||||
|
export interface Sampler {
|
||||||
|
/**
|
||||||
|
* Magnification filter.
|
||||||
|
*/
|
||||||
|
'magFilter'?: 9728 | 9729 | number;
|
||||||
|
/**
|
||||||
|
* Minification filter.
|
||||||
|
*/
|
||||||
|
'minFilter'?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;
|
||||||
|
/**
|
||||||
|
* s wrapping mode.
|
||||||
|
*/
|
||||||
|
'wrapS'?: 33071 | 33648 | 10497 | number;
|
||||||
|
/**
|
||||||
|
* t wrapping mode.
|
||||||
|
*/
|
||||||
|
'wrapT'?: 33071 | 33648 | 10497 | number;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The root nodes of a scene.
|
||||||
|
*/
|
||||||
|
export interface Scene {
|
||||||
|
/**
|
||||||
|
* The indices of each root node.
|
||||||
|
*/
|
||||||
|
'nodes'?: GlTfId[];
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Joints and matrices defining a skin.
|
||||||
|
*/
|
||||||
|
export interface Skin {
|
||||||
|
/**
|
||||||
|
* The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were pre-applied.
|
||||||
|
*/
|
||||||
|
'inverseBindMatrices'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
|
||||||
|
*/
|
||||||
|
'skeleton'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* Indices of skeleton nodes, used as joints in this skin.
|
||||||
|
*/
|
||||||
|
'joints': GlTfId[];
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A texture and its sampler.
|
||||||
|
*/
|
||||||
|
export interface Texture {
|
||||||
|
/**
|
||||||
|
* The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used.
|
||||||
|
*/
|
||||||
|
'sampler'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* The index of the image used by this texture.
|
||||||
|
*/
|
||||||
|
'source'?: GlTfId;
|
||||||
|
'name'?: any;
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* The root object for a glTF asset.
|
||||||
|
*/
|
||||||
|
export interface GlTf {
|
||||||
|
/**
|
||||||
|
* Names of glTF extensions used somewhere in this asset.
|
||||||
|
*/
|
||||||
|
'extensionsUsed'?: string[];
|
||||||
|
/**
|
||||||
|
* Names of glTF extensions required to properly load this asset.
|
||||||
|
*/
|
||||||
|
'extensionsRequired'?: string[];
|
||||||
|
/**
|
||||||
|
* An array of accessors.
|
||||||
|
*/
|
||||||
|
'accessors'?: Accessor[];
|
||||||
|
/**
|
||||||
|
* An array of keyframe animations.
|
||||||
|
*/
|
||||||
|
'animations'?: Animation[];
|
||||||
|
/**
|
||||||
|
* Metadata about the glTF asset.
|
||||||
|
*/
|
||||||
|
'asset': Asset;
|
||||||
|
/**
|
||||||
|
* An array of buffers.
|
||||||
|
*/
|
||||||
|
'buffers'?: Buffer[];
|
||||||
|
/**
|
||||||
|
* An array of bufferViews.
|
||||||
|
*/
|
||||||
|
'bufferViews'?: BufferView[];
|
||||||
|
/**
|
||||||
|
* An array of cameras.
|
||||||
|
*/
|
||||||
|
'cameras'?: Camera[];
|
||||||
|
/**
|
||||||
|
* An array of images.
|
||||||
|
*/
|
||||||
|
'images'?: Image[];
|
||||||
|
/**
|
||||||
|
* An array of materials.
|
||||||
|
*/
|
||||||
|
'materials'?: Material[];
|
||||||
|
/**
|
||||||
|
* An array of meshes.
|
||||||
|
*/
|
||||||
|
'meshes'?: Mesh[];
|
||||||
|
/**
|
||||||
|
* An array of nodes.
|
||||||
|
*/
|
||||||
|
'nodes'?: Node[];
|
||||||
|
/**
|
||||||
|
* An array of samplers.
|
||||||
|
*/
|
||||||
|
'samplers'?: Sampler[];
|
||||||
|
/**
|
||||||
|
* The index of the default scene.
|
||||||
|
*/
|
||||||
|
'scene'?: GlTfId;
|
||||||
|
/**
|
||||||
|
* An array of scenes.
|
||||||
|
*/
|
||||||
|
'scenes'?: Scene[];
|
||||||
|
/**
|
||||||
|
* An array of skins.
|
||||||
|
*/
|
||||||
|
'skins'?: Skin[];
|
||||||
|
/**
|
||||||
|
* An array of textures.
|
||||||
|
*/
|
||||||
|
'textures'?: Texture[];
|
||||||
|
'extensions'?: any;
|
||||||
|
'extras'?: any;
|
||||||
|
[k: string]: any;
|
||||||
|
}
|
109
@types/packages/engine-extends/@types/gltf-validator.d.ts
vendored
Normal file
109
@types/packages/engine-extends/@types/gltf-validator.d.ts
vendored
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
|
||||||
|
declare module 'gltf-validator' {
|
||||||
|
/**
|
||||||
|
* Returns a version string.
|
||||||
|
*/
|
||||||
|
export const version: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of supported extensions names.
|
||||||
|
*/
|
||||||
|
export const supportedExtensions: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param uri Relative URI of the external resource.
|
||||||
|
* @returns Promise with Uint8Array data.
|
||||||
|
*/
|
||||||
|
export type ExternalResourceFunction = (uri: string) => Promise<Uint8Array>;
|
||||||
|
|
||||||
|
export interface ValidationOptions {
|
||||||
|
/**
|
||||||
|
* Absolute or relative asset URI that will be copied to validation report.
|
||||||
|
*/
|
||||||
|
uri?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Max number of reported issues. Use 0 for unlimited output.
|
||||||
|
*/
|
||||||
|
maxIssues?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of ignored issue codes.
|
||||||
|
*/
|
||||||
|
ignoredIssues?: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object with overridden severities for issue codes.
|
||||||
|
*/
|
||||||
|
severityOverrides?: {
|
||||||
|
[x: string]: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function for loading external resources. If omitted, external resources are not validated.
|
||||||
|
*/
|
||||||
|
externalResourceFunction?: ExternalResourceFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to false to skip reading of accessor data.
|
||||||
|
*/
|
||||||
|
validateAccessorData?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Resource {
|
||||||
|
pointer: string;
|
||||||
|
mimeType: string;
|
||||||
|
storage: string;
|
||||||
|
uri: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Report {
|
||||||
|
uri: string;
|
||||||
|
mimeType: string;
|
||||||
|
validatorVersion: string;
|
||||||
|
validatedAt: string;
|
||||||
|
issues: {
|
||||||
|
numErrors: number;
|
||||||
|
numWarnings: number;
|
||||||
|
numInfos: number;
|
||||||
|
numHints: number;
|
||||||
|
messages: Array<{
|
||||||
|
code: string;
|
||||||
|
message: string;
|
||||||
|
pointer: string;
|
||||||
|
severity: number;
|
||||||
|
}>;
|
||||||
|
truncated: boolean;
|
||||||
|
};
|
||||||
|
info: {
|
||||||
|
version: string;
|
||||||
|
generator: string;
|
||||||
|
resources: Array<{
|
||||||
|
pointer: string;
|
||||||
|
mimeType: string;
|
||||||
|
storage: string;
|
||||||
|
uri: string;
|
||||||
|
}>;
|
||||||
|
hasAnimations: boolean;
|
||||||
|
hasMaterials: boolean;
|
||||||
|
hasMorphTargets: boolean;
|
||||||
|
hasSkins: boolean;
|
||||||
|
hasTextures: boolean;
|
||||||
|
hasDefaultScene: boolean;
|
||||||
|
primitivesCount: number;
|
||||||
|
maxAttributesUsed: number;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateBytes(data: Uint8Array, options?: ValidationOptions): Promise<Report>;
|
||||||
|
|
||||||
|
export function validateString(json: string, options?: ValidationOptions): Promise<Report>;
|
||||||
|
|
||||||
|
export const enum Severity {
|
||||||
|
Error = 0,
|
||||||
|
|
||||||
|
Warning = 1,
|
||||||
|
|
||||||
|
Information = 2,
|
||||||
|
}
|
||||||
|
}
|
811
@types/packages/engine-extends/@types/i18n-well-defined.d.ts
vendored
Normal file
811
@types/packages/engine-extends/@types/i18n-well-defined.d.ts
vendored
Normal file
@ -0,0 +1,811 @@
|
|||||||
|
declare module '@base/electron-i18n' {
|
||||||
|
export function translation(key: string, language?: any): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare interface I18NWellDefinedDictionary {
|
||||||
|
['about.title']: [];
|
||||||
|
['about.editor']: [];
|
||||||
|
['about.engine']: [];
|
||||||
|
['about.version']: [];
|
||||||
|
['animator.title']: [];
|
||||||
|
['animator.loading.wait_scene_ready']: [];
|
||||||
|
['animator.loading.init_animation_data']: [];
|
||||||
|
['animator.mask.need_select_node']: [];
|
||||||
|
['animator.mask.need_animation_component']: [];
|
||||||
|
['animator.mask.need_animation_clip']: [];
|
||||||
|
['animator.mask.enter_animation_mode']: [];
|
||||||
|
['animator.mask.add_animation_component']: [];
|
||||||
|
['animator.mask.add_animation_clip']: [];
|
||||||
|
['animator.toolbar.exit']: [];
|
||||||
|
['animator.toolbar.setting']: [];
|
||||||
|
['animator.toolbar.order']: [];
|
||||||
|
['animator.toolbar.jump_first_frame']: [];
|
||||||
|
['animator.toolbar.jump_prev_frame']: [];
|
||||||
|
['animator.toolbar.play_animation']: [];
|
||||||
|
['animator.toolbar.stop_animation']: [];
|
||||||
|
['animator.toolbar.pause_animation']: [];
|
||||||
|
['animator.toolbar.jump_next_frame']: [];
|
||||||
|
['animator.toolbar.jump_last_frame']: [];
|
||||||
|
['animator.toolbar.insert_event']: [];
|
||||||
|
['animator.toolbar.save_clip']: [];
|
||||||
|
['animator.property.title']: [];
|
||||||
|
['animator.property.create_prop']: [];
|
||||||
|
['animator.property.remove_prop']: [];
|
||||||
|
['animator.property.clear_keys']: [];
|
||||||
|
['animator.property.create_key']: [];
|
||||||
|
['animator.property.remove_key']: [];
|
||||||
|
['animator.property.copy_key']: [];
|
||||||
|
['animator.property.paste_key']: [];
|
||||||
|
['animator.property.spacing_key']: [];
|
||||||
|
['animator.property.spacing_frame']: [];
|
||||||
|
['animator.event.title']: [];
|
||||||
|
['animator.event.add_func']: [];
|
||||||
|
['animator.event.del_func']: [];
|
||||||
|
['animator.event.add_params']: [];
|
||||||
|
['animator.event.del_params']: [];
|
||||||
|
['animator.event.clear_params']: [];
|
||||||
|
['animator.event.create']: [];
|
||||||
|
['animator.event.paste']: [];
|
||||||
|
['animator.bezier.title']: [];
|
||||||
|
['animator.bezier.click_to_apply']: [];
|
||||||
|
['animator.node.title']: [];
|
||||||
|
['animator.node.move_data']: [];
|
||||||
|
['animator.node.move_data_to']: [];
|
||||||
|
['animator.node.clear_data']: [];
|
||||||
|
['animator.preview_row.line_tips']: [];
|
||||||
|
['animator.preview_row.open_curve_editor']: [];
|
||||||
|
['animator.preview_row.asset_type_should_be']: [];
|
||||||
|
['animator.preview_row.asset_position_tips']: [];
|
||||||
|
['animator.is_save']: [];
|
||||||
|
['animator.is_save_message']: [];
|
||||||
|
['animator.is_paste_overwrite']: [];
|
||||||
|
['animator.is_paste_overwrite_message']: [];
|
||||||
|
['animator.overwrite']: [];
|
||||||
|
['animator.is_clear']: [];
|
||||||
|
['animator.is_clear_message']: [];
|
||||||
|
['animator.is_move_data']: [];
|
||||||
|
['animator.is_move_data_message']: [];
|
||||||
|
['animator.is_remove_prop.title']: [];
|
||||||
|
['animator.is_remove_prop.message']: [];
|
||||||
|
['animator.is_remove_prop.remove']: [];
|
||||||
|
['animator.is_clear_prop.title']: [];
|
||||||
|
['animator.is_clear_prop.message']: [];
|
||||||
|
['animator.is_clear_prop.remove']: [];
|
||||||
|
['animator.move']: [];
|
||||||
|
['animator.clear']: [];
|
||||||
|
['animator.copy']: [];
|
||||||
|
['animator.paste']: [];
|
||||||
|
['animator.save']: [];
|
||||||
|
['animator.abort']: [];
|
||||||
|
['animator.cancel']: [];
|
||||||
|
['animator.edit']: [];
|
||||||
|
['animator.delete']: [];
|
||||||
|
['animator.toolbar.spacing_frame']: [];
|
||||||
|
['asset-db.mask.startup']: [];
|
||||||
|
['asset-db.mask.loading']: [];
|
||||||
|
['asset-db.debug-mode']: [];
|
||||||
|
['asset-db.operate.dialogError']: [];
|
||||||
|
['asset-db.operate.dialogWarning']: [];
|
||||||
|
['asset-db.operate.dialogQuestion']: [];
|
||||||
|
['asset-db.operate.dialogInfo']: [];
|
||||||
|
['asset-db.fail.readonly']: [];
|
||||||
|
['asset-db.createAsset.fail.unknown']: [];
|
||||||
|
['asset-db.createAsset.fail.url']: [];
|
||||||
|
['asset-db.createAsset.fail.exist']: [];
|
||||||
|
['asset-db.createAsset.fail.drop']: [];
|
||||||
|
['asset-db.createAsset.fail.toUrl']: [];
|
||||||
|
['asset-db.createAsset.fail.uuid']: [];
|
||||||
|
['asset-db.createAsset.fail.content']: [];
|
||||||
|
['asset-db.createAsset.fail.readonly']: [];
|
||||||
|
['asset-db.createAsset.warn.overwrite']: [];
|
||||||
|
['asset-db.dropAsset.overwrite']: [];
|
||||||
|
['asset-db.dropAsset.reserve']: [];
|
||||||
|
['asset-db.dropAsset.fail.unknown']: [];
|
||||||
|
['asset-db.dropAsset.fail.url']: [];
|
||||||
|
['asset-db.dropAsset.fail.filepaths']: [];
|
||||||
|
['asset-db.dropAsset.fail.readonly']: [];
|
||||||
|
['asset-db.dropAsset.warn.overwrite']: [];
|
||||||
|
['asset-db.dropAsset.warn.sameway']: [];
|
||||||
|
['asset-db.saveAsset.fail.unknown']: [];
|
||||||
|
['asset-db.saveAsset.fail.uuid']: [];
|
||||||
|
['asset-db.saveAsset.fail.content']: [];
|
||||||
|
['asset-db.saveAsset.fail.readonly']: [];
|
||||||
|
['asset-db.saveAssetMeta.fail.unknown']: [];
|
||||||
|
['asset-db.saveAssetMeta.fail.uuid']: [];
|
||||||
|
['asset-db.saveAssetMeta.fail.content']: [];
|
||||||
|
['asset-db.saveAssetMeta.fail.readonly']: [];
|
||||||
|
['asset-db.copyAsset.fail.unknown']: [];
|
||||||
|
['asset-db.copyAsset.fail.url']: [];
|
||||||
|
['asset-db.copyAsset.fail.source']: [];
|
||||||
|
['asset-db.copyAsset.fail.target']: [];
|
||||||
|
['asset-db.copyAsset.fail.include']: [];
|
||||||
|
['asset-db.copyAsset.fail.parent']: [];
|
||||||
|
['asset-db.copyAsset.fail.readonly']: [];
|
||||||
|
['asset-db.copyAsset.fail.metauuid']: [];
|
||||||
|
['asset-db.moveAsset.fail.unknown']: [];
|
||||||
|
['asset-db.moveAsset.fail.url']: [];
|
||||||
|
['asset-db.moveAsset.fail.source']: [];
|
||||||
|
['asset-db.moveAsset.fail.target']: [];
|
||||||
|
['asset-db.moveAsset.fail.exist']: [];
|
||||||
|
['asset-db.moveAsset.fail.include']: [];
|
||||||
|
['asset-db.moveAsset.fail.parent']: [];
|
||||||
|
['asset-db.moveAsset.fail.readonly_source']: [];
|
||||||
|
['asset-db.moveAsset.fail.readonly']: [];
|
||||||
|
['asset-db.moveAsset.warn.overwrite']: [];
|
||||||
|
['asset-db.deleteAsset.fail.unknown']: [];
|
||||||
|
['asset-db.deleteAsset.fail.url']: [];
|
||||||
|
['asset-db.deleteAsset.fail.unexist']: [];
|
||||||
|
['asset-db.deleteAsset.fail.readonly']: [];
|
||||||
|
['asset-db.preferences.log_level']: [];
|
||||||
|
['asset-db.preferences.log_level_debug']: [];
|
||||||
|
['asset-db.preferences.log_level_log']: [];
|
||||||
|
['asset-db.preferences.log_level_warn']: [];
|
||||||
|
['asset-db.preferences.log_level_error']: [];
|
||||||
|
['asset-db.importers.glTF.glTF_asset_group_mesh']: [];
|
||||||
|
['asset-db.importers.glTF.glTF_asset_group_animation']: [];
|
||||||
|
['asset-db.importers.glTF.glTF_asset_group_node']: [];
|
||||||
|
['asset-db.importers.glTF.glTF_asset_group_skin']: [];
|
||||||
|
['asset-db.importers.glTF.glTF_asset_group_sampler']: [];
|
||||||
|
['asset-db.importers.glTF.glTF_asset']: [{
|
||||||
|
group: any;
|
||||||
|
index: any;
|
||||||
|
name: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.glTF_asset_no_name']: [{
|
||||||
|
group: any;
|
||||||
|
index: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.unsupported_alpha_mode']: [{
|
||||||
|
material: any;
|
||||||
|
mode: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.unsupported_texture_parameter']: [{
|
||||||
|
texture: any;
|
||||||
|
sampler: any;
|
||||||
|
type: any;
|
||||||
|
value: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.texture_parameter_min_filter']: [];
|
||||||
|
['asset-db.importers.glTF.texture_parameter_mag_filter']: [];
|
||||||
|
['asset-db.importers.glTF.unsupported_channel_path']: [{
|
||||||
|
animation: any;
|
||||||
|
channel: any;
|
||||||
|
path: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.reference_skin_in_different_scene']: [{
|
||||||
|
node: any;
|
||||||
|
skin: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.disallow_cubic_spline_channel_split']: [{
|
||||||
|
animation: any;
|
||||||
|
channel: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.failed_to_calculate_tangents_due_to_lack_of_normals']: [{
|
||||||
|
mesh: any;
|
||||||
|
primitive: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.failed_to_calculate_tangents_due_to_lack_of_uvs']: [{
|
||||||
|
mesh: any;
|
||||||
|
primitive: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.failed_to_load_image']: [{
|
||||||
|
url: any;
|
||||||
|
reason: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.glTF.image_uri_should_be_file_url']: [];
|
||||||
|
['asset-db.importers.glTF.failed_to_convert_tga']: [];
|
||||||
|
['asset-db.importers.fbx.failed_to_convert_fbx_file']: [{
|
||||||
|
path: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.fbx.no_available_fbx_temp_dir']: [];
|
||||||
|
['asset-db.importers.fbx.fbx2glTF_exists_with_non_zero_code']: [{
|
||||||
|
code: any;
|
||||||
|
output: any;
|
||||||
|
}];
|
||||||
|
['asset-db.importers.javascript.transform_failure']: [{
|
||||||
|
path: any;
|
||||||
|
reason: any;
|
||||||
|
}];
|
||||||
|
['assets.title']: [];
|
||||||
|
['assets.previewTitle']: [];
|
||||||
|
['assets.menu.createMenu']: [];
|
||||||
|
['assets.menu.searchPlaceholder_name']: [];
|
||||||
|
['assets.menu.searchPlaceholder_uuid']: [];
|
||||||
|
['assets.menu.searchPlaceholder_type']: [];
|
||||||
|
['assets.menu.searchTip']: [];
|
||||||
|
['assets.menu.search']: [];
|
||||||
|
['assets.menu.searchName']: [];
|
||||||
|
['assets.menu.searchUuid']: [];
|
||||||
|
['assets.menu.searchType']: [];
|
||||||
|
['assets.menu.sort']: [];
|
||||||
|
['assets.menu.sortName']: [];
|
||||||
|
['assets.menu.sortType']: [];
|
||||||
|
['assets.menu.refresh']: [];
|
||||||
|
['assets.menu.allExpand']: [];
|
||||||
|
['assets.menu.allCollapse']: [];
|
||||||
|
['assets.menu.new']: [];
|
||||||
|
['assets.menu.newFolder']: [];
|
||||||
|
['assets.menu.newJavaScript']: [];
|
||||||
|
['assets.menu.newTypeScript']: [];
|
||||||
|
['assets.menu.newCubeMap']: [];
|
||||||
|
['assets.menu.newScene']: [];
|
||||||
|
['assets.menu.newMaterial']: [];
|
||||||
|
['assets.menu.newPhysicsMaterial']: [];
|
||||||
|
['assets.menu.newEffect']: [];
|
||||||
|
['assets.menu.newChunk']: [];
|
||||||
|
['assets.menu.newAnimation']: [];
|
||||||
|
['assets.menu.renderPipeline']: [];
|
||||||
|
['assets.menu.forwardPipeline']: [];
|
||||||
|
['assets.menu.renderPipelineTS']: [];
|
||||||
|
['assets.menu.RenderFlowTS']: [];
|
||||||
|
['assets.menu.RenderStageTS']: [];
|
||||||
|
['assets.menu.newPac']: [];
|
||||||
|
['assets.menu.newTerrain']: [];
|
||||||
|
['assets.menu.copy']: [];
|
||||||
|
['assets.menu.cut']: [];
|
||||||
|
['assets.menu.paste']: [];
|
||||||
|
['assets.menu.delete']: [];
|
||||||
|
['assets.menu.rename']: [];
|
||||||
|
['assets.menu.selectall']: [];
|
||||||
|
['assets.menu.readonly']: [];
|
||||||
|
['assets.menu.revealInlibrary']: [];
|
||||||
|
['assets.menu.reimport']: [];
|
||||||
|
['assets.menu.revealInExplorer']: [];
|
||||||
|
['assets.menu.showUuid']: [];
|
||||||
|
['assets.menu.recommendTS']: [];
|
||||||
|
['assets.operate.cutReady']: [];
|
||||||
|
['assets.operate.cutDone']: [];
|
||||||
|
['assets.operate.copyReady']: [];
|
||||||
|
['assets.operate.copyDone']: [];
|
||||||
|
['assets.operate.dialogError']: [];
|
||||||
|
['assets.operate.dialogWarning']: [];
|
||||||
|
['assets.operate.dialogQuestion']: [];
|
||||||
|
['assets.operate.dialogInfo']: [];
|
||||||
|
['assets.operate.refreshing']: [];
|
||||||
|
['assets.operate.assetDataError']: [];
|
||||||
|
['assets.operate.sureDelete']: [{
|
||||||
|
length: any;
|
||||||
|
filelist: any;
|
||||||
|
}];
|
||||||
|
['assets.operate.renameFail']: [];
|
||||||
|
['assets.operate.pasteFail_parent_into_child']: [];
|
||||||
|
['assets.operate.refreshFail']: [];
|
||||||
|
['assets.operate.readDefaultFileFail']: [];
|
||||||
|
['assets.operate.errorNewnameDuplicate']: [];
|
||||||
|
['assets.operate.errorNewnameUnlegal']: [];
|
||||||
|
['assets.operate.errorNewnameEmpty']: [];
|
||||||
|
['assets.operate.errorScriptName']: [];
|
||||||
|
['assets.operate.errorScriptClassName']: [];
|
||||||
|
['assets.deprecate.fire']: [];
|
||||||
|
['builder.title']: [];
|
||||||
|
['builder.create_user_template']: [];
|
||||||
|
['builder.build_config']: [];
|
||||||
|
['builder.build']: [];
|
||||||
|
['builder.compile']: [];
|
||||||
|
['builder.select_all']: [];
|
||||||
|
['builder.open_compile_file']: [];
|
||||||
|
['builder.source_map']: [];
|
||||||
|
['builder.recompile_engine']: [];
|
||||||
|
['builder.debug_mode']: [];
|
||||||
|
['builder.web_debugger']: [];
|
||||||
|
['builder.require']: [];
|
||||||
|
['builder.new_build_task']: [];
|
||||||
|
['builder.empty_task_holder']: [];
|
||||||
|
['builder.empty_scene']: [];
|
||||||
|
['builder.reveal_in_explorer']: [];
|
||||||
|
['builder.view_build_config']: [];
|
||||||
|
['builder.recompile']: [];
|
||||||
|
['builder.compress_texture']: [];
|
||||||
|
['builder.pack_autoAtlas']: [];
|
||||||
|
['builder.replace_splash_screen']: [];
|
||||||
|
['builder.run']: [];
|
||||||
|
['builder.open']: [];
|
||||||
|
['builder.export']: [];
|
||||||
|
['builder.import']: [];
|
||||||
|
['builder.export_build_config']: [];
|
||||||
|
['builder.import_build_config']: [];
|
||||||
|
['builder.include_project_setting']: [];
|
||||||
|
['builder.only_build_panel']: [];
|
||||||
|
['builder.options.taskName']: [];
|
||||||
|
['builder.options.name']: [];
|
||||||
|
['builder.options.platform']: [];
|
||||||
|
['builder.options.build_path']: [];
|
||||||
|
['builder.options.start_scene']: [];
|
||||||
|
['builder.options.inline_SpriteFrames']: [];
|
||||||
|
['builder.options.merge_json_by_scene']: [];
|
||||||
|
['builder.options.merge_start_scene']: [];
|
||||||
|
['builder.options.orientation']: [];
|
||||||
|
['builder.options.scenes']: [];
|
||||||
|
['builder.options.debug']: [];
|
||||||
|
['builder.options.resolution']: [];
|
||||||
|
['builder.options.preview_url']: [];
|
||||||
|
['builder.options.source_map']: [];
|
||||||
|
['builder.options.force_combile_engine']: [];
|
||||||
|
['builder.options.web_debugger']: [];
|
||||||
|
['builder.options.compress_texture']: [];
|
||||||
|
['builder.options.pack_autoAtlas']: [];
|
||||||
|
['builder.package']: [];
|
||||||
|
['builder.package_hint']: [];
|
||||||
|
['builder.desktop_icon']: [];
|
||||||
|
['builder.desktop_icon_hint']: [];
|
||||||
|
['builder.version_name']: [];
|
||||||
|
['builder.version_name_hint']: [];
|
||||||
|
['builder.version_number']: [];
|
||||||
|
['builder.version_number_hint']: [];
|
||||||
|
['builder.support_min_platform']: [];
|
||||||
|
['builder.support_min_platform_hint']: [];
|
||||||
|
['builder.full_screen']: [];
|
||||||
|
['builder.screen_orientation']: [];
|
||||||
|
['builder.landscape']: [];
|
||||||
|
['builder.portrait']: [];
|
||||||
|
['builder.tiny_packet_mode']: [];
|
||||||
|
['builder.tiny_packet_path']: [];
|
||||||
|
['builder.tiny_packet_path_hint']: [];
|
||||||
|
['builder.keystore']: [];
|
||||||
|
['builder.use_debug_keystore']: [];
|
||||||
|
['builder.private_pem_path']: [];
|
||||||
|
['builder.private_pem_path_hint']: [];
|
||||||
|
['builder.certificate_pem_path']: [];
|
||||||
|
['builder.certificate_pem_path_hint']: [];
|
||||||
|
['builder.print_finger']: [];
|
||||||
|
['builder.pack_res_to_first_pack']: [];
|
||||||
|
['builder.custom_npm_path']: [];
|
||||||
|
['builder.custom_npm_path_hint']: [];
|
||||||
|
['builder.custom_manifest_data']: [];
|
||||||
|
['builder.custom_manifest_data_error']: [];
|
||||||
|
['builder.remote_url']: [];
|
||||||
|
['builder.not_install_nodejs_windows_error']: [];
|
||||||
|
['builder.not_install_nodejs_mac_error']: [];
|
||||||
|
['builder.rpk_installing']: [];
|
||||||
|
['builder.rpk_install_fail']: [];
|
||||||
|
['builder.rpk_install_success']: [];
|
||||||
|
['builder.not_mainfest_data']: [];
|
||||||
|
['builder.npm_installed_success']: [];
|
||||||
|
['builder.npm_install_fail']: [];
|
||||||
|
['builder.oppo.new']: [];
|
||||||
|
['builder.oppo.not_empty']: [];
|
||||||
|
['builder.oppo.icon_not_exist']: [];
|
||||||
|
['builder.oppo.signature_not_exist']: [];
|
||||||
|
['builder.oppo.private_pem_path_error']: [];
|
||||||
|
['builder.oppo.certificate_pem_path_error']: [];
|
||||||
|
['builder.certificate.country']: [];
|
||||||
|
['builder.certificate.state']: [];
|
||||||
|
['builder.certificate.locality']: [];
|
||||||
|
['builder.certificate.organization']: [];
|
||||||
|
['builder.certificate.organizationalUnit']: [];
|
||||||
|
['builder.certificate.commonName']: [];
|
||||||
|
['builder.certificate.email']: [];
|
||||||
|
['builder.certificate.certificatePath']: [];
|
||||||
|
['builder.certificate.generate']: [];
|
||||||
|
['builder.certificate.build_certificate_complete']: [];
|
||||||
|
['builder.certificate.build_certificate_fail']: [];
|
||||||
|
['builder.huawei.select_certificate_path']: [];
|
||||||
|
['builder.huawei.install_nodejs_before_view_certificate']: [];
|
||||||
|
['builder.huawei.select_certificate_path_after_view_certificate']: [];
|
||||||
|
['builder.huawei.certificate_fingerprint']: [];
|
||||||
|
['builder.huawei.certificate_fingerprint_error']: [];
|
||||||
|
['builder.huawei.use_native_renderer']: [];
|
||||||
|
['builder.wechat_game.separate_engine']: [];
|
||||||
|
['builder.wechat_game.separate_engine_tips']: [];
|
||||||
|
['builder.wechat_game.client_path_error']: [{
|
||||||
|
path: any;
|
||||||
|
}];
|
||||||
|
['builder.wechat_game.client_info_path_err']: [{
|
||||||
|
path: any;
|
||||||
|
}];
|
||||||
|
['builder.wechat_game.client_version_low']: [];
|
||||||
|
['builder.wechat_game.remote_server_address']: [];
|
||||||
|
['builder.wechat_game.remote_server_address_tips']: [];
|
||||||
|
['builder.wechat_game.sub_context']: [];
|
||||||
|
['builder.wechat_game.sub_context_tips']: [];
|
||||||
|
['builder.wechat_game.build_sub']: [];
|
||||||
|
['builder.wechat_game.build_sub_tips']: [];
|
||||||
|
['builder.wechat_game.wechatgame_app_path_empty']: [];
|
||||||
|
['builder.error.build_error']: [];
|
||||||
|
['builder.error.dirty_info']: [];
|
||||||
|
['builder.error.build_dir_not_exists']: [{
|
||||||
|
buildDir: any;
|
||||||
|
}];
|
||||||
|
['builder.error.build_path_contains_space']: [];
|
||||||
|
['builder.error.build_path_contains_chinese']: [];
|
||||||
|
['builder.error.can_not_empty']: [];
|
||||||
|
['builder.error.project_name_not_legal']: [];
|
||||||
|
['builder.error.package_name_not_legal']: [];
|
||||||
|
['builder.error.package_name_start_with_number']: [];
|
||||||
|
['builder.error.select_scenes_to_build']: [];
|
||||||
|
['builder.error.binary_api_level']: [];
|
||||||
|
['builder.error.path_too_long_title']: [];
|
||||||
|
['builder.error.path_too_long_desc']: [{
|
||||||
|
max_length: any;
|
||||||
|
}];
|
||||||
|
['builder.error.keep_raw_texture_of_atlas']: [{
|
||||||
|
texturePath: any;
|
||||||
|
pacPath: any;
|
||||||
|
assetPath: any;
|
||||||
|
}];
|
||||||
|
['builder.error.arm64_not_support']: [{
|
||||||
|
current_api: any;
|
||||||
|
min_version: any;
|
||||||
|
}];
|
||||||
|
['builder.warn.same_url']: [];
|
||||||
|
['builder.tasks.build_asset']: [];
|
||||||
|
['builder.tasks.build_engine']: [];
|
||||||
|
['builder.tasks.build_img']: [];
|
||||||
|
['builder.tasks.build_json']: [];
|
||||||
|
['builder.tasks.build_atlas']: [];
|
||||||
|
['builder.tasks.build_script']: [];
|
||||||
|
['builder.tasks.build_suffix']: [];
|
||||||
|
['builder.tasks.build_template']: [];
|
||||||
|
['builder.tasks.load_script']: [];
|
||||||
|
['builder.tasks.sort_asset']: [];
|
||||||
|
['builder.tasks.sort_image']: [];
|
||||||
|
['builder.tasks.sort_script']: [];
|
||||||
|
['builder.tasks.sort_sprite_frame']: [];
|
||||||
|
['builder.tasks.sort_texture']: [];
|
||||||
|
['builder.tasks.sort_json']: [];
|
||||||
|
['builder.tasks.settings.compress']: [];
|
||||||
|
['builder.tasks.settings.design_resolution']: [];
|
||||||
|
['builder.tasks.settings.group']: [];
|
||||||
|
['builder.tasks.settings.md5']: [];
|
||||||
|
['builder.tasks.settings.scene']: [];
|
||||||
|
['builder.tasks.settings.script']: [];
|
||||||
|
['builder.tips.enter_name']: [];
|
||||||
|
['builder.tips.taskName']: [];
|
||||||
|
['builder.tips.build_path']: [];
|
||||||
|
['builder.tips.build_scenes']: [];
|
||||||
|
['builder.tips.inline_SpriteFrames']: [];
|
||||||
|
['builder.tips.md5Cache']: [];
|
||||||
|
['builder.tips.merge_start_scene']: [];
|
||||||
|
['builder.tips.debug']: [];
|
||||||
|
['builder.tips.resolution']: [];
|
||||||
|
['builder.tips.web_debugger']: [];
|
||||||
|
['builder.tips.creat_template_success']: [];
|
||||||
|
['builder.tips.set_start_scene']: [];
|
||||||
|
['builder.splash_setting.title']: [];
|
||||||
|
['builder.splash_setting.drag_img_here']: [];
|
||||||
|
['builder.splash_setting.img_loading']: [];
|
||||||
|
['builder.splash_setting.confirm']: [];
|
||||||
|
['builder.splash_setting.settings.total_time']: [];
|
||||||
|
['builder.splash_setting.settings.display_ratio']: [];
|
||||||
|
['builder.splash_setting.settings.clear_color']: [];
|
||||||
|
['builder.splash_setting.settings.effect']: [];
|
||||||
|
['builder.splash_setting.settings.display_watermark']: [];
|
||||||
|
['builder.splash_setting.is_save_dialog.title']: [];
|
||||||
|
['builder.splash_setting.is_save_dialog.save']: [];
|
||||||
|
['builder.splash_setting.is_save_dialog.cancel']: [];
|
||||||
|
['builder.splash_setting.is_save_dialog.abort']: [];
|
||||||
|
['builder.is_remove_task.title']: [];
|
||||||
|
['builder.is_remove_task.has_building_task']: [];
|
||||||
|
['builder.is_remove_task.message']: [];
|
||||||
|
['builder.is_remove_task.remove']: [];
|
||||||
|
['builder.is_remove_task.deep_remove']: [];
|
||||||
|
['builder.is_remove_task.cancel']: [];
|
||||||
|
['builder.is_stop_build.title']: [];
|
||||||
|
['builder.is_stop_build.message']: [];
|
||||||
|
['builder.is_stop_build.stop']: [];
|
||||||
|
['builder.is_stop_build.cancel']: [];
|
||||||
|
['builder.is_close_win.title']: [];
|
||||||
|
['builder.is_close_win.message']: [];
|
||||||
|
['builder.is_close_win.force_close']: [];
|
||||||
|
['builder.is_close_win.cancel']: [];
|
||||||
|
['builder.is_save_scene.title']: [];
|
||||||
|
['builder.is_save_scene.message']: [];
|
||||||
|
['builder.is_save_scene.save']: [];
|
||||||
|
['builder.is_save_scene.ignore']: [];
|
||||||
|
['builder.is_save_scene.cancel']: [];
|
||||||
|
['builder.merge_json_by_scene']: [];
|
||||||
|
['builder.not_require']: [];
|
||||||
|
['builder.options.open_compile_file']: [];
|
||||||
|
['builder.custom_manifest_file_path']: [];
|
||||||
|
['builder.custom_manifest_file_path_hint']: [];
|
||||||
|
['builder.install_nodejs_before_view_certificate']: [];
|
||||||
|
['builder.window_default_npm_path_error']: [];
|
||||||
|
['builder.mac_default_npm_path_error']: [];
|
||||||
|
['builder.oppo.package_name_error']: [];
|
||||||
|
['builder.huawei.certificate_fingerprint_window_error']: [];
|
||||||
|
['builder.huawei.certificate_fingerprint_mac_error']: [];
|
||||||
|
['console.title']: [];
|
||||||
|
['console.editorLog']: [];
|
||||||
|
['console.cocosLog']: [];
|
||||||
|
['console.tabbar.regex']: [];
|
||||||
|
['console.preferences.display_date']: [];
|
||||||
|
['console.preferences.font_size']: [];
|
||||||
|
['console.preferences.line_height']: [];
|
||||||
|
['engine.title']: [];
|
||||||
|
['engine.compile_engine']: [];
|
||||||
|
['engine.wait_quick_compile']: [];
|
||||||
|
['engine.confirm']: [];
|
||||||
|
['engine.browse']: [];
|
||||||
|
['engine.open']: [];
|
||||||
|
['engine.engine_directory_illegal']: [];
|
||||||
|
['engine.engine_compile_failed']: [];
|
||||||
|
['engine.engine_compile_crash']: [];
|
||||||
|
['engine.javascript_engine']: [];
|
||||||
|
['engine.use_builtin_engine']: [];
|
||||||
|
['engine.custom_engine_path']: [];
|
||||||
|
['engine.QUICK_COMPILER.engine_modified_info']: [];
|
||||||
|
['engine.resources_docs_1']: [];
|
||||||
|
['engine.resources_docs_2']: [];
|
||||||
|
['engine.resources_docs_3']: [];
|
||||||
|
['engine.resources_docs_4']: [];
|
||||||
|
['hierarchy.title']: [];
|
||||||
|
['hierarchy.menu.createMenu']: [];
|
||||||
|
['hierarchy.menu.searchPlaceholder']: [];
|
||||||
|
['hierarchy.menu.searchPlaceholder_name']: [];
|
||||||
|
['hierarchy.menu.searchPlaceholder_uuid']: [];
|
||||||
|
['hierarchy.menu.searchPlaceholder_component']: [];
|
||||||
|
['hierarchy.menu.searchTip']: [];
|
||||||
|
['hierarchy.menu.search']: [];
|
||||||
|
['hierarchy.menu.searchName']: [];
|
||||||
|
['hierarchy.menu.searchUuid']: [];
|
||||||
|
['hierarchy.menu.searchComponent']: [];
|
||||||
|
['hierarchy.menu.refresh']: [];
|
||||||
|
['hierarchy.menu.allExpand']: [];
|
||||||
|
['hierarchy.menu.allCollapse']: [];
|
||||||
|
['hierarchy.menu.newNode']: [];
|
||||||
|
['hierarchy.menu.newNodeEmpty']: [];
|
||||||
|
['hierarchy.menu.new3dObject']: [];
|
||||||
|
['hierarchy.menu.new3dCube']: [];
|
||||||
|
['hierarchy.menu.new3dCylinder']: [];
|
||||||
|
['hierarchy.menu.new3dSphere']: [];
|
||||||
|
['hierarchy.menu.new3dCapsule']: [];
|
||||||
|
['hierarchy.menu.new3dCone']: [];
|
||||||
|
['hierarchy.menu.new3dTorus']: [];
|
||||||
|
['hierarchy.menu.new3dPlane']: [];
|
||||||
|
['hierarchy.menu.new3dQuad']: [];
|
||||||
|
['hierarchy.menu.newLightObject']: [];
|
||||||
|
['hierarchy.menu.newLightDirectional']: [];
|
||||||
|
['hierarchy.menu.newLightSphere']: [];
|
||||||
|
['hierarchy.menu.newLightSpot']: [];
|
||||||
|
['hierarchy.menu.newCameraObject']: [];
|
||||||
|
['hierarchy.menu.newTerrain']: [];
|
||||||
|
['hierarchy.menu.newEffects']: [];
|
||||||
|
['hierarchy.menu.newEffectsParticle']: [];
|
||||||
|
['hierarchy.menu.newUI']: [];
|
||||||
|
['hierarchy.menu.newUICanvas']: [];
|
||||||
|
['hierarchy.menu.newUISprite']: [];
|
||||||
|
['hierarchy.menu.newUILabel']: [];
|
||||||
|
['hierarchy.menu.newUIButton']: [];
|
||||||
|
['hierarchy.menu.newUIToggle']: [];
|
||||||
|
['hierarchy.menu.newUIToggleGroup']: [];
|
||||||
|
['hierarchy.menu.newUISlider']: [];
|
||||||
|
['hierarchy.menu.newUIProgressBar']: [];
|
||||||
|
['hierarchy.menu.newUIWidget']: [];
|
||||||
|
['hierarchy.menu.newUIEditBox']: [];
|
||||||
|
['hierarchy.menu.newUILayout']: [];
|
||||||
|
['hierarchy.menu.newUIScrollView']: [];
|
||||||
|
['hierarchy.menu.newUIMask']: [];
|
||||||
|
['hierarchy.menu.copy']: [];
|
||||||
|
['hierarchy.menu.cut']: [];
|
||||||
|
['hierarchy.menu.paste']: [];
|
||||||
|
['hierarchy.menu.delete']: [];
|
||||||
|
['hierarchy.menu.rename']: [];
|
||||||
|
['hierarchy.menu.duplicate']: [];
|
||||||
|
['hierarchy.menu.showUuid']: [];
|
||||||
|
['hierarchy.menu.link_prefab']: [];
|
||||||
|
['hierarchy.menu.link_prefab_error_node_empty']: [];
|
||||||
|
['hierarchy.menu.link_prefab_error_node_isScene']: [];
|
||||||
|
['hierarchy.menu.link_prefab_error_asset_empty']: [];
|
||||||
|
['hierarchy.menu.link_prefab_error_asset_invalid']: [];
|
||||||
|
['hierarchy.menu.link_prefab_make_sure']: [];
|
||||||
|
['hierarchy.menu.unlink_prefab']: [];
|
||||||
|
['hierarchy.menu.unlink_prefab_error_prefab_empty']: [];
|
||||||
|
['hierarchy.menu.errorNewnameEmpty']: [];
|
||||||
|
['hierarchy.operate.cutReady']: [];
|
||||||
|
['hierarchy.operate.cutDone']: [];
|
||||||
|
['hierarchy.operate.copyReady']: [];
|
||||||
|
['hierarchy.operate.copyDone']: [];
|
||||||
|
['hierarchy.operate.duplicateDone']: [];
|
||||||
|
['hierarchy.operate.dialogError']: [];
|
||||||
|
['hierarchy.operate.dialogWarning']: [];
|
||||||
|
['hierarchy.operate.dialogQuestion']: [];
|
||||||
|
['hierarchy.operate.dialogInfo']: [];
|
||||||
|
['hierarchy.operate.renameFail']: [];
|
||||||
|
['inspector.title']: [];
|
||||||
|
['inspector.add_component']: [];
|
||||||
|
['inspector.lock_unlock']: [];
|
||||||
|
['inspector.backward_selection']: [];
|
||||||
|
['inspector.forward_selection']: [];
|
||||||
|
['inspector.menu.remove_component']: [];
|
||||||
|
['inspector.menu.move_up_component']: [];
|
||||||
|
['inspector.menu.move_down_component']: [];
|
||||||
|
['inspector.menu.copy_node_value']: [];
|
||||||
|
['inspector.menu.paste_node_value']: [];
|
||||||
|
['inspector.menu.copy_component']: [];
|
||||||
|
['inspector.menu.paste_component']: [];
|
||||||
|
['inspector.menu.paste_component_values']: [];
|
||||||
|
['inspector.asset.directory.is_subpackage']: [];
|
||||||
|
['inspector.asset.directory.subpackage_name']: [];
|
||||||
|
['inspector.asset.javascript.plugin']: [];
|
||||||
|
['inspector.asset.javascript.loadPluginInWeb']: [];
|
||||||
|
['inspector.asset.javascript.loadPluginInEditor']: [];
|
||||||
|
['inspector.asset.javascript.loadPluginInNative']: [];
|
||||||
|
['inspector.asset.fbx.browse']: [];
|
||||||
|
['inspector.asset.spriteFrame.edit']: [];
|
||||||
|
['inspector.asset.texture.modeWarn']: [];
|
||||||
|
['inspector.node.layer.confirm_message']: [];
|
||||||
|
['inspector.node.layer.change_children']: [];
|
||||||
|
['inspector.node.layer.change_self']: [];
|
||||||
|
['inspector.gradient.title']: [];
|
||||||
|
['inspector.curve_editor.title']: [];
|
||||||
|
['inspector.sprite_editor.title']: [];
|
||||||
|
['inspector.sprite_editor.scale']: [];
|
||||||
|
['inspector.sprite_editor.reset']: [];
|
||||||
|
['inspector.sprite_editor.save']: [];
|
||||||
|
['inspector.sprite_editor.saveError']: [];
|
||||||
|
['inspector.sprite_editor.border']: [];
|
||||||
|
['inspector.sprite_editor.left']: [];
|
||||||
|
['inspector.sprite_editor.right']: [];
|
||||||
|
['inspector.sprite_editor.top']: [];
|
||||||
|
['inspector.sprite_editor.bottom']: [];
|
||||||
|
['inspector.check_is_saved.message']: [];
|
||||||
|
['inspector.check_is_saved.save']: [];
|
||||||
|
['inspector.check_is_saved.abort']: [];
|
||||||
|
['inspector.prefab.local']: [];
|
||||||
|
['inspector.prefab.reset']: [];
|
||||||
|
['inspector.prefab.save']: [];
|
||||||
|
['inspector.prefab.link']: [];
|
||||||
|
['inspector.prefab.unlink']: [];
|
||||||
|
['inspector.prefab.lost']: [];
|
||||||
|
['inspector.prefab.exist']: [];
|
||||||
|
['packager.title']: [];
|
||||||
|
['packager.menu.internal']: [];
|
||||||
|
['packager.menu.project']: [];
|
||||||
|
['packager.menu.global']: [];
|
||||||
|
['packager.menu.add']: [];
|
||||||
|
['packager.menu.addProject']: [];
|
||||||
|
['packager.menu.addGlobal']: [];
|
||||||
|
['packager.menu.addLabel']: [];
|
||||||
|
['packager.menu.addSuccess']: [];
|
||||||
|
['packager.menu.import']: [];
|
||||||
|
['packager.menu.importProject']: [];
|
||||||
|
['packager.menu.importGlobal']: [];
|
||||||
|
['packager.menu.importSuccess']: [];
|
||||||
|
['packager.menu.install']: [];
|
||||||
|
['packager.menu.installProject']: [];
|
||||||
|
['packager.menu.installGlobal']: [];
|
||||||
|
['packager.menu.installSuccess']: [];
|
||||||
|
['packager.menu.selectDirectory']: [];
|
||||||
|
['packager.menu.search']: [];
|
||||||
|
['packager.menu.openFolder']: [];
|
||||||
|
['packager.menu.author']: [];
|
||||||
|
['packager.menu.state']: [];
|
||||||
|
['packager.menu.remove']: [];
|
||||||
|
['packager.menu.removeSuccess']: [];
|
||||||
|
['packager.menu.removeConfirm']: [];
|
||||||
|
['packager.menu.enable']: [];
|
||||||
|
['packager.menu.disable']: [];
|
||||||
|
['packager.menu.enabled']: [];
|
||||||
|
['packager.menu.disabled']: [];
|
||||||
|
['packager.menu.invalid']: [];
|
||||||
|
['packager.menu.confirm']: [];
|
||||||
|
['packager.menu.addError']: [];
|
||||||
|
['packager.menu.importError']: [];
|
||||||
|
['preferences.title']: [];
|
||||||
|
['preferences.nav.general']: [];
|
||||||
|
['preferences.nav.edit']: [];
|
||||||
|
['preferences.nav.extension']: [];
|
||||||
|
['preferences.nav.native']: [];
|
||||||
|
['preferences.nav.laboratory']: [];
|
||||||
|
['preferences.general.language']: [];
|
||||||
|
['preferences.general.step']: [];
|
||||||
|
['preferences.general.preci']: [];
|
||||||
|
['preferences.general.theme']: [];
|
||||||
|
['preferences.general.themeColor']: [];
|
||||||
|
['preferences.general.preview_ip']: [];
|
||||||
|
['preferences.edit.script_editor']: [];
|
||||||
|
['preferences.edit.picture_editor']: [];
|
||||||
|
['preferences.edit.browse']: [];
|
||||||
|
['preferences.edit.remove']: [];
|
||||||
|
['preferences.edit.internal']: [];
|
||||||
|
['preferences.native.wechatgame_app_path']: [];
|
||||||
|
['preferences.extension.package']: [];
|
||||||
|
['preferences.laboratory.about']: [];
|
||||||
|
['preferences.laboratory.new_add_component']: [];
|
||||||
|
['preferences.browse']: [];
|
||||||
|
['preferences.open']: [];
|
||||||
|
['preview.title']: [];
|
||||||
|
['preview.automatic']: [];
|
||||||
|
['preview.automatic_tooltip']: [];
|
||||||
|
['preview.scene_is_empty']: [];
|
||||||
|
['preview.play']: [];
|
||||||
|
['preview.refresh_device']: [];
|
||||||
|
['preview.scan']: [];
|
||||||
|
['preview.create_template']: [];
|
||||||
|
['preview.load_current_scene_error']: [];
|
||||||
|
['preview.creat_template_success']: [];
|
||||||
|
['project-setting.title']: [];
|
||||||
|
['project-setting.nav.preview']: [];
|
||||||
|
['project-setting.nav.groupList']: [];
|
||||||
|
['project-setting.nav.modules']: [];
|
||||||
|
['project-setting.nav.engine']: [];
|
||||||
|
['project-setting.nav.layer']: [];
|
||||||
|
['project-setting.nav.graphics']: [];
|
||||||
|
['project-setting.nav.general']: [];
|
||||||
|
['project-setting.nav.projectPath']: [];
|
||||||
|
['project-setting.nav.wizardPath']: [];
|
||||||
|
['project-setting.preview.start_scene']: [];
|
||||||
|
['project-setting.preview.auto_refresh']: [];
|
||||||
|
['project-setting.preview.current_scene']: [];
|
||||||
|
['project-setting.preview.simulator_setting_type']: [];
|
||||||
|
['project-setting.preview.global']: [];
|
||||||
|
['project-setting.preview.project']: [];
|
||||||
|
['project-setting.preview.simulator_device_orientation']: [];
|
||||||
|
['project-setting.preview.simulator_resolution']: [];
|
||||||
|
['project-setting.preview.customize_resolution']: [];
|
||||||
|
['project-setting.preview.vertical']: [];
|
||||||
|
['project-setting.preview.horizontal']: [];
|
||||||
|
['project-setting.modules.title']: [];
|
||||||
|
['project-setting.modules.info']: [];
|
||||||
|
['project-setting.modules.warn']: [];
|
||||||
|
['project-setting.modules.module']: [];
|
||||||
|
['project-setting.modules.inquiry']: [];
|
||||||
|
['project-setting.modules.submodule']: [];
|
||||||
|
['project-setting.modules.inquiry_all']: [];
|
||||||
|
['project-setting.engine.cocos_default']: [];
|
||||||
|
['project-setting.engine.user_customize']: [];
|
||||||
|
['project-setting.engine.renderPipeline']: [];
|
||||||
|
['project-setting.engine.physics']: [];
|
||||||
|
['project-setting.engine.builtin']: [];
|
||||||
|
['project-setting.engine.cannon']: [];
|
||||||
|
['project-setting.engine.ammo']: [];
|
||||||
|
['project-setting.general.browse']: [];
|
||||||
|
['project-setting.general.ts_compiler']: [];
|
||||||
|
['project-setting.general.tslint.title']: [];
|
||||||
|
['project-setting.general.tslint.default']: [];
|
||||||
|
['project-setting.general.tslint.path']: [];
|
||||||
|
['project-setting.general.section_canvas']: [];
|
||||||
|
['project-setting.general.design_resolution']: [];
|
||||||
|
['project-setting.general.width']: [];
|
||||||
|
['project-setting.general.height']: [];
|
||||||
|
['project-setting.general.fit_width']: [];
|
||||||
|
['project-setting.general.fit_height']: [];
|
||||||
|
['project-setting.general.type_check_level']: [];
|
||||||
|
['project-setting.general.type_check_tips.disable']: [];
|
||||||
|
['project-setting.general.type_check_tips.checkOnly']: [];
|
||||||
|
['project-setting.general.type_check_tips.fatalOnError']: [];
|
||||||
|
['scene.title']: [];
|
||||||
|
['scene.new']: [];
|
||||||
|
['scene.save']: [];
|
||||||
|
['scene.save_as']: [];
|
||||||
|
['scene.develop']: [];
|
||||||
|
['scene.terrain.is_create_message']: [];
|
||||||
|
['scene.terrain.is_create']: [];
|
||||||
|
['scene.terrain.cancel']: [];
|
||||||
|
['scene.terrain.edit']: [];
|
||||||
|
['scene.terrain.save']: [];
|
||||||
|
['scene.terrain.delete']: [];
|
||||||
|
['scene.terrain.abort']: [];
|
||||||
|
['scene.messages.warning']: [];
|
||||||
|
['scene.messages.scenario_modified']: [];
|
||||||
|
['scene.messages.want_to_save']: [];
|
||||||
|
['scene.messages.save']: [];
|
||||||
|
['scene.messages.dont_save']: [];
|
||||||
|
['scene.messages.cancel']: [];
|
||||||
|
['scene.messages.save_as_fail']: [];
|
||||||
|
['scene.save_prefab']: [];
|
||||||
|
['scene.close_prefab']: [];
|
||||||
|
['scene.save_clip']: [];
|
||||||
|
['scene.close_clip']: [];
|
||||||
|
['scene.gizmos.icon3d']: [];
|
||||||
|
['scene.gizmos.showGrid']: [];
|
||||||
|
['scene.ui_tools.zoom_up']: [];
|
||||||
|
['scene.ui_tools.zoom_down']: [];
|
||||||
|
['scene.ui_tools.zoom_reset']: [];
|
||||||
|
['scene.ui_tools.align_top']: [];
|
||||||
|
['scene.ui_tools.align_v_center']: [];
|
||||||
|
['scene.ui_tools.align_bottom']: [];
|
||||||
|
['scene.ui_tools.align_left']: [];
|
||||||
|
['scene.ui_tools.align_h_center']: [];
|
||||||
|
['scene.ui_tools.align_right']: [];
|
||||||
|
['scene.ui_tools.distribute_top']: [];
|
||||||
|
['scene.ui_tools.distribute_v_center']: [];
|
||||||
|
['scene.ui_tools.distribute_bottom']: [];
|
||||||
|
['scene.ui_tools.distribute_left']: [];
|
||||||
|
['scene.ui_tools.distribute_h_center']: [];
|
||||||
|
['scene.ui_tools.distribute_right']: [];
|
||||||
|
['tester.auto_tooltip']: [];
|
||||||
|
['tester.play_tooltip']: [];
|
||||||
|
['tester.pause_tooltip']: [];
|
||||||
|
['ui-kit.title']: [];
|
||||||
|
}
|
160
@types/packages/engine-extends/@types/third-parts.d.ts
vendored
Normal file
160
@types/packages/engine-extends/@types/third-parts.d.ts
vendored
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
declare module 'tga-js' {
|
||||||
|
export default class TGA {
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
getImageData(imageData?: ImageData): ImageData | {width: number, height: number, data: Uint8ClampedArray};
|
||||||
|
constructor();
|
||||||
|
load(data: Buffer): null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'psd.js' {
|
||||||
|
import PNG from 'pngjs';
|
||||||
|
export default class PSD {
|
||||||
|
constructor (data: Buffer);
|
||||||
|
|
||||||
|
parse();
|
||||||
|
|
||||||
|
image: {
|
||||||
|
toPng(): PNG;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'draco3dgltf' {
|
||||||
|
export function createDecoderModule(options: DecoderModuleOptions): typeof DecoderModule;
|
||||||
|
|
||||||
|
// eslint-disable-next-line
|
||||||
|
export interface DecoderModuleOptions {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line
|
||||||
|
interface DecoderModule {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace DecoderModule {
|
||||||
|
function destroy(decoder: Decoder): void;
|
||||||
|
|
||||||
|
function destroy(buffer: DecoderBuffer): void;
|
||||||
|
|
||||||
|
function destroy(int32Array: DracoInt32Array): void;
|
||||||
|
|
||||||
|
function destroy(mesh: Geometry): void;
|
||||||
|
|
||||||
|
export class DecoderBuffer {
|
||||||
|
public Init(buffer: Int8Array, size: number): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Decoder {
|
||||||
|
public GetEncodedGeometryType(buffer: DecoderBuffer): GeometryType;
|
||||||
|
|
||||||
|
public DecodeBufferToMesh(buffer: DecoderBuffer, mesh: Mesh): Status;
|
||||||
|
|
||||||
|
public DecodeBufferToPointCloud(buffer: DecoderBuffer, pointCloud: PointCloud): Status;
|
||||||
|
|
||||||
|
public GetFaceFromMesh(geometry: Geometry, index: number, out: DracoInt32Array): void;
|
||||||
|
|
||||||
|
public GetAttributeId(geometry: Geometry, attributeType: AttributeType): number;
|
||||||
|
|
||||||
|
public GetAttributeByUniqueId(geometry: Geometry, uniqueId: number): Attribute;
|
||||||
|
|
||||||
|
public GetAttribute(geometry: Geometry, attributeId: number): Attribute;
|
||||||
|
|
||||||
|
public GetAttributeInt8ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt8Array): void;
|
||||||
|
|
||||||
|
public GetAttributeInt16ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt16Array): void;
|
||||||
|
|
||||||
|
public GetAttributeInt32ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt32Array): void;
|
||||||
|
|
||||||
|
public GetAttributeUInt8ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt8Array): void;
|
||||||
|
|
||||||
|
public GetAttributeUInt16ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt16Array): void;
|
||||||
|
|
||||||
|
public GetAttributeUInt32ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt32Array): void;
|
||||||
|
|
||||||
|
public GetAttributeFloatForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoFloat32Array): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Status {
|
||||||
|
public ok(): boolean;
|
||||||
|
public error_msg(): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum GeometryType {
|
||||||
|
// See below
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TRIANGULAR_MESH: GeometryType;
|
||||||
|
|
||||||
|
export const POINT_CLOUD: GeometryType;
|
||||||
|
|
||||||
|
export class Mesh {
|
||||||
|
public ptr: number;
|
||||||
|
|
||||||
|
public num_faces(): number;
|
||||||
|
|
||||||
|
public num_points(): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PointCloud {
|
||||||
|
public ptr: number;
|
||||||
|
|
||||||
|
public num_points(): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Geometry = Mesh | PointCloud;
|
||||||
|
|
||||||
|
enum AttributeType {
|
||||||
|
// See below
|
||||||
|
}
|
||||||
|
|
||||||
|
export const POSITION: AttributeType;
|
||||||
|
export const NORMAL: AttributeType;
|
||||||
|
export const COLOR: AttributeType;
|
||||||
|
export const TEX_COORD: AttributeType;
|
||||||
|
|
||||||
|
class Attribute {
|
||||||
|
private constructor();
|
||||||
|
public num_components(): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoInt8Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoInt16Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoInt32Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoUInt8Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoUInt16Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoUInt32Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DracoFloat32Array {
|
||||||
|
public size(): number;
|
||||||
|
public GetValue(index: number): number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare const EditorExtends: any;
|
51
@types/packages/engine/@types/editor-extends/index.d.ts
vendored
Normal file
51
@types/packages/engine/@types/editor-extends/index.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import ScriptManager from './manager/script';
|
||||||
|
import NodeManager from './manager/node';
|
||||||
|
import ComponentManager from './manager/component';
|
||||||
|
import AssetManager from './manager/asset';
|
||||||
|
import DialogManager from './manager/dialog';
|
||||||
|
export declare const Script: ScriptManager;
|
||||||
|
export declare const Node: NodeManager;
|
||||||
|
export declare const Component: ComponentManager;
|
||||||
|
export declare const Asset: AssetManager;
|
||||||
|
export declare const Dialog: DialogManager;
|
||||||
|
import * as Uuid from './utils/uuid';
|
||||||
|
export declare const UuidUtils: typeof Uuid;
|
||||||
|
export declare let GeometryUtils: any;
|
||||||
|
export declare let PrefabUtils: any;
|
||||||
|
export declare let serialize: any;
|
||||||
|
export declare let serializeCompiled: any;
|
||||||
|
import { MissingClassReporter } from './missing-reporter/missing-class-reporter';
|
||||||
|
import { MissingObjectReporter } from './missing-reporter/missing-object-reporter';
|
||||||
|
export { walkProperties } from './missing-reporter/object-walker';
|
||||||
|
export declare const MissingReporter: {
|
||||||
|
classInstance: {
|
||||||
|
reporter: MissingClassReporter;
|
||||||
|
classFinder(id: any, data: any, owner: any, propName: any): any;
|
||||||
|
hasMissingClass: boolean;
|
||||||
|
reportMissingClass(asset: any): void;
|
||||||
|
reset(): void;
|
||||||
|
};
|
||||||
|
class: typeof MissingClassReporter;
|
||||||
|
object: typeof MissingObjectReporter;
|
||||||
|
};
|
||||||
|
export declare function init(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* 启动各个管理器
|
||||||
|
*/
|
||||||
|
export declare function start(): void;
|
||||||
|
/**
|
||||||
|
* 关闭各个管理器
|
||||||
|
*/
|
||||||
|
export declare function stop(): void;
|
||||||
|
export declare function emit(name: string | symbol, ...args: string[]): void;
|
||||||
|
export declare function on(name: string | symbol, handle: (...args: any[]) => void): void;
|
||||||
|
export declare function removeListener(name: string | symbol, handle: (...args: any[]) => void): void;
|
||||||
|
declare global {
|
||||||
|
export const EditorExtends: typeof import('.');
|
||||||
|
export namespace cce {
|
||||||
|
namespace Utils {
|
||||||
|
const serialize: typeof import('./utils/serialize/index')['serialize'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=index.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/editor-extends/index.ts"],"names":[],"mappings":"AAIA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,eAAO,MAAM,MAAM,eAAoB,CAAC;AACxC,eAAO,MAAM,IAAI,aAAkB,CAAC;AACpC,eAAO,MAAM,SAAS,kBAAuB,CAAC;AAC9C,eAAO,MAAM,KAAK,cAAmB,CAAC;AACtC,eAAO,MAAM,MAAM,eAAoB,CAAC;AAGxC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,eAAO,MAAM,SAAS,aAAO,CAAC;AAG9B,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC;AAG9B,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC;AAE5B,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC;AAC1B,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAGlC,OAAO,EAAE,oBAAoB,EAAgB,MAAM,2CAA2C,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,eAAO,MAAM,eAAe;;;;;;;;;;CAI3B,CAAC;AAEF,wBAAsB,IAAI,kBAQzB;AAED;;GAEG;AACH,wBAAgB,KAAK,SAIpB;AAED;;GAEG;AACH,wBAAgB,IAAI,SAInB;AAID,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,QAE5D;AAED,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,QAEzE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,QAErF;AAED,OAAO,CAAC,MAAM,CAAC;IACX,MAAM,CAAC,MAAM,aAAa,EAAE,cAAc,GAAG,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,CAAC;QACjB,UAAiB,KAAK,CAAC;YACZ,MAAM,SAAS,EAAE,cAAc,yBAAyB,CAAC,CAAC,WAAW,CAAC,CAAC;SACjF;KACJ;CACJ"}
|
15
@types/packages/engine/@types/editor-extends/manager/asset.d.ts
vendored
Normal file
15
@types/packages/engine/@types/editor-extends/manager/asset.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
export default class AssetManager {
|
||||||
|
/**
|
||||||
|
* 查询一个资源的 info 信息
|
||||||
|
* @param uuid
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
queryAssetInfo(uuid: string, callback: Function): void;
|
||||||
|
/**
|
||||||
|
* 查询一个路径下的资源
|
||||||
|
* @param url
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
getAssetInfoFromUrl(url: string): any;
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=asset.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/asset.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,OAAO,YAAY;IAE7B;;;;OAIG;IACI,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IActD;;;;OAIG;IACI,mBAAmB,CAAC,GAAG,EAAE,MAAM;CAgBzC"}
|
63
@types/packages/engine/@types/editor-extends/manager/component.d.ts
vendored
Normal file
63
@types/packages/engine/@types/editor-extends/manager/component.d.ts
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
import { EventEmitter } from 'events';
|
||||||
|
interface MenuItem {
|
||||||
|
component: Function;
|
||||||
|
menuPath: string;
|
||||||
|
priority: number;
|
||||||
|
}
|
||||||
|
export default class ComponentManager extends EventEmitter {
|
||||||
|
allow: boolean;
|
||||||
|
_menus: MenuItem[];
|
||||||
|
/**
|
||||||
|
* 添加一个组件的菜单项
|
||||||
|
* @param component
|
||||||
|
* @param path
|
||||||
|
* @param priority
|
||||||
|
*/
|
||||||
|
addMenu(component: Function, path: string, priority?: number): void;
|
||||||
|
/**
|
||||||
|
* 删除一个组件的菜单项
|
||||||
|
* @param component
|
||||||
|
*/
|
||||||
|
removeMenu(component: Function): void;
|
||||||
|
/**
|
||||||
|
* 查询已经注册的组件菜单项
|
||||||
|
*/
|
||||||
|
getMenus(): MenuItem[];
|
||||||
|
_map: {
|
||||||
|
[index: string]: any;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 新增一个组件
|
||||||
|
* 1. 调用Node的addComponent时会调用此方法
|
||||||
|
* 2. Node添加到场景树时,会遍历身上的组件调用此方法
|
||||||
|
* @param uuid
|
||||||
|
* @param component
|
||||||
|
*/
|
||||||
|
add(uuid: string, component: any): void;
|
||||||
|
/**
|
||||||
|
* 删除一个组件
|
||||||
|
* 1. 调用Node的_removeComponent时会调用此方法,removeComponent会在下一帧调用_removeComponent,
|
||||||
|
* removeComponent会调用一些Component的生命周期函数,而_removeComponent不会。
|
||||||
|
* 2. Node添加到场景树时,会遍历身上的组件调用此方法
|
||||||
|
* @param uuid
|
||||||
|
*/
|
||||||
|
remove(uuid: string): void;
|
||||||
|
/**
|
||||||
|
* 清空全部数据
|
||||||
|
*/
|
||||||
|
clear(): void;
|
||||||
|
/**
|
||||||
|
* 获取一个指定的组件
|
||||||
|
* @param uuid
|
||||||
|
*/
|
||||||
|
getComponent(uuid: string): any;
|
||||||
|
/**
|
||||||
|
* 获取所有的组件数据
|
||||||
|
*/
|
||||||
|
getComponents(): {
|
||||||
|
[index: string]: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=component.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,UAAU,QAAQ;IACd,SAAS,EAAE,QAAQ,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IAEtD,KAAK,UAAS;IAKd,MAAM,EAAE,QAAQ,EAAE,CAAM;IAExB;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAY5D;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,QAAQ;IAW9B;;OAEG;IACH,QAAQ;IAOR,IAAI,EAAE;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAM;IAKlC;;;;;;OAMG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG;IAYhC;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAiBnB;;OAEG;IACH,KAAK;IASL;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM;IAIzB;;OAEG;IACH,aAAa;;;CAGhB"}
|
32
@types/packages/engine/@types/editor-extends/manager/dialog.d.ts
vendored
Normal file
32
@types/packages/engine/@types/editor-extends/manager/dialog.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
interface MessageDialogOptions {
|
||||||
|
title?: string;
|
||||||
|
detail?: string;
|
||||||
|
default?: number;
|
||||||
|
cancel?: number;
|
||||||
|
buttons?: string[];
|
||||||
|
}
|
||||||
|
export default class Dialog {
|
||||||
|
/**
|
||||||
|
* 信息弹窗
|
||||||
|
* @param message 显示的消息
|
||||||
|
* @param options 信息弹窗可选参数
|
||||||
|
* @param window 依附于哪个窗口(插件主进程才可使用)
|
||||||
|
*/
|
||||||
|
info(message: string, options?: MessageDialogOptions): Promise<unknown>;
|
||||||
|
/**
|
||||||
|
* 警告弹窗
|
||||||
|
* @param message 警告信息
|
||||||
|
* @param options 警告弹窗可选参数
|
||||||
|
* @param window 依附于哪个窗口(插件主进程才可使用)
|
||||||
|
*/
|
||||||
|
warn(message: string, options?: MessageDialogOptions): Promise<unknown>;
|
||||||
|
/**
|
||||||
|
* 错误弹窗
|
||||||
|
* @param message 错误信息
|
||||||
|
* @param options 错误弹窗可选参数
|
||||||
|
* @param window 依附于哪个窗口(插件主进程才可使用)
|
||||||
|
*/
|
||||||
|
error(message: string, options?: MessageDialogOptions): Promise<unknown>;
|
||||||
|
}
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=dialog.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/dialog.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,OAAO,MAAM;IACvB;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;IAYxD;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;IAYxD;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;CAW5D"}
|
49
@types/packages/engine/@types/editor-extends/manager/node.d.ts
vendored
Normal file
49
@types/packages/engine/@types/editor-extends/manager/node.d.ts
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
/// <reference types="node" />
|
||||||
|
import type { Node } from 'cc';
|
||||||
|
import { EventEmitter } from 'events';
|
||||||
|
export default class NodeManager extends EventEmitter {
|
||||||
|
allow: boolean;
|
||||||
|
_map: {
|
||||||
|
[index: string]: any;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 新增一个节点,当引擎将一个节点添加到场景树中,同时会遍历子节点,递归的调用这个方法。
|
||||||
|
* @param uuid
|
||||||
|
* @param node
|
||||||
|
*/
|
||||||
|
add(uuid: string, node: any): void;
|
||||||
|
/**
|
||||||
|
* 删除一个节点,当引擎将一个节点从场景树中移除,同时会遍历子节点,递归的调用这个方法。
|
||||||
|
* @param uuid
|
||||||
|
*/
|
||||||
|
remove(uuid: string): void;
|
||||||
|
/**
|
||||||
|
* 清空所有数据
|
||||||
|
*/
|
||||||
|
clear(): void;
|
||||||
|
/**
|
||||||
|
* 获取一个节点数据,查的范围包括被删除的节点
|
||||||
|
* @param uuid
|
||||||
|
*/
|
||||||
|
getNode(uuid: string): Node | null;
|
||||||
|
/**
|
||||||
|
* 获取所有的节点数据
|
||||||
|
*/
|
||||||
|
getNodes(): {
|
||||||
|
[index: string]: any;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 获取场景中使用了某个资源的节点
|
||||||
|
* @param uuid asset uuid
|
||||||
|
*/
|
||||||
|
getNodesByAsset(uuid: string): string[];
|
||||||
|
/**
|
||||||
|
* 获取所有在场景树中的节点数据
|
||||||
|
*/
|
||||||
|
getNodesInScene(): {
|
||||||
|
[index: string]: any;
|
||||||
|
};
|
||||||
|
changeNodeUUID(oldUUID: string, newUUID: string): void;
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=node.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/node.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IAEjD,KAAK,UAAS;IAEd,IAAI,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;IAIpC;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;IAY3B;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAiBnB;;OAEG;IACH,KAAK;IAQL;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIlC;;OAEG;IACH,QAAQ;;;IAIR;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM;IAqC5B;;OAEG;IACH,eAAe;;;IAIf,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAelD"}
|
26
@types/packages/engine/@types/editor-extends/manager/script.d.ts
vendored
Normal file
26
@types/packages/engine/@types/editor-extends/manager/script.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
import { EventEmitter } from 'events';
|
||||||
|
export default class ScriptManager extends EventEmitter {
|
||||||
|
allow: boolean;
|
||||||
|
_map: {
|
||||||
|
[index: string]: Function[];
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 将一个 ctor 放到一个脚本注册 class 的数组里
|
||||||
|
* @param uuid
|
||||||
|
* @param ctor
|
||||||
|
*/
|
||||||
|
add(uuid: string, ctor: Function): void;
|
||||||
|
/**
|
||||||
|
* 在 uuid 指向的脚本 ctor 数组里删除对应的 ctor
|
||||||
|
* @param uuid
|
||||||
|
* @param ctor
|
||||||
|
*/
|
||||||
|
remove(uuid: string, ctor: Function): void;
|
||||||
|
/**
|
||||||
|
* 获取指定模块内注册的 class 列表
|
||||||
|
* @param uuid
|
||||||
|
*/
|
||||||
|
getCtors(uuid: string): Function[];
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=script.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/script.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IAEnD,KAAK,UAAS;IAEd,IAAI,EAAE;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAA;KAAC,CAAK;IAExC;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;IAYhC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;IAenC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM;CAGxB"}
|
13
@types/packages/engine/@types/editor-extends/missing-reporter/missing-class-reporter.d.ts
vendored
Normal file
13
@types/packages/engine/@types/editor-extends/missing-reporter/missing-class-reporter.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { MissingReporter } from './missing-reporter';
|
||||||
|
export declare class MissingClassReporter extends MissingReporter {
|
||||||
|
report(): void;
|
||||||
|
reportByOwner(): void;
|
||||||
|
}
|
||||||
|
export declare const MissingClass: {
|
||||||
|
reporter: MissingClassReporter;
|
||||||
|
classFinder(id: any, data: any, owner: any, propName: any): any;
|
||||||
|
hasMissingClass: boolean;
|
||||||
|
reportMissingClass(asset: any): void;
|
||||||
|
reset(): void;
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=missing-class-reporter.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"missing-class-reporter.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/missing-class-reporter.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAqFrD,qBAAa,oBAAqB,SAAQ,eAAe;IAErD,MAAM;IAQN,aAAa;CA6BhB;AAGD,eAAO,MAAM,YAAY;;oBAEL,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG;;8BAY/B,GAAG;;CAahC,CAAC"}
|
8
@types/packages/engine/@types/editor-extends/missing-reporter/missing-object-reporter.d.ts
vendored
Normal file
8
@types/packages/engine/@types/editor-extends/missing-reporter/missing-object-reporter.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { MissingReporter } from './missing-reporter';
|
||||||
|
export declare class MissingObjectReporter extends MissingReporter {
|
||||||
|
root: any;
|
||||||
|
doReport(obj: any, value: any, parsedObjects: any, rootUrl: any, inRootBriefLocation: any): Promise<void>;
|
||||||
|
report(): void;
|
||||||
|
reportByOwner(): void;
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=missing-object-reporter.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"missing-object-reporter.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/missing-object-reporter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA8BrD,qBAAa,qBAAsB,SAAQ,eAAe;IAEtD,IAAI,EAAE,GAAG,CAAC;IAEJ,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG;IA8E/F,MAAM;IA4BN,aAAa;CA+BhB"}
|
20
@types/packages/engine/@types/editor-extends/missing-reporter/missing-reporter.d.ts
vendored
Normal file
20
@types/packages/engine/@types/editor-extends/missing-reporter/missing-reporter.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
export declare class MissingReporter {
|
||||||
|
outputLevel: 'debug' | 'warn' | 'error';
|
||||||
|
static INFO_DETAILED: string;
|
||||||
|
static getObjectType(obj: any): "component" | "prefab" | "scene" | "asset";
|
||||||
|
missingObjects: Set<unknown>;
|
||||||
|
missingOwners: Map<any, any>;
|
||||||
|
root: any;
|
||||||
|
report(): void;
|
||||||
|
reportByOwner(): void;
|
||||||
|
constructor(root?: any);
|
||||||
|
reset(): void;
|
||||||
|
stash(obj: any): void;
|
||||||
|
/**
|
||||||
|
* stashByOwner 和 stash 的区别在于,stash 要求对象中有值,stashByOwner 允许对象的值为空
|
||||||
|
* @param {any} [value] - 如果 value 未设置,不会影响提示信息,只不过提示信息可能会不够详细
|
||||||
|
*/
|
||||||
|
stashByOwner(owner: any, propName: any, value: any): void;
|
||||||
|
removeStashedByOwner(owner: any, propName: any): any;
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=missing-reporter.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"missing-reporter.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/missing-reporter.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe;IAExB,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAW;IAElD,MAAM,CAAC,aAAa,SAA8B;IAElD,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG;IAgB7B,cAAc,eAAa;IAG3B,aAAa,gBAAa;IAE1B,IAAI,EAAE,GAAG,CAAC;IAEV,MAAM;IACN,aAAa;gBAED,IAAI,CAAC,EAAE,GAAG;IAItB,KAAK;IAML,KAAK,CAAC,GAAG,EAAE,GAAG;IAId;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IASlD,oBAAoB,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;CAoBjD"}
|
43
@types/packages/engine/@types/editor-extends/missing-reporter/object-walker.d.ts
vendored
Normal file
43
@types/packages/engine/@types/editor-extends/missing-reporter/object-walker.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
export declare class ObjectWalkerBehavior {
|
||||||
|
walk(obj: any, key: any, val: any): void;
|
||||||
|
root: any;
|
||||||
|
constructor(root: any);
|
||||||
|
parseObject(val: any): void;
|
||||||
|
parseCCClass(val: any, klass: any, props: any): void;
|
||||||
|
forIn(val: any): void;
|
||||||
|
forEach(val: any): void;
|
||||||
|
}
|
||||||
|
export declare class ObjectWalker extends ObjectWalkerBehavior {
|
||||||
|
iteratee: any;
|
||||||
|
parsedObjects: any;
|
||||||
|
parsedKeys: any;
|
||||||
|
ignoreParent: any;
|
||||||
|
ignoreSubPrefabHelper: any;
|
||||||
|
walked: Set<unknown>;
|
||||||
|
constructor(root: any, iteratee: any, options?: any);
|
||||||
|
walk(obj: any, key: any, val: any): void;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Traverse all objects recursively
|
||||||
|
* @param {Object} root
|
||||||
|
* @param {Function} iteratee
|
||||||
|
* @param {Object} iteratee.object
|
||||||
|
* @param {String} iteratee.property
|
||||||
|
* @param {Object} iteratee.value - per object will be navigated ONLY once in this parameter
|
||||||
|
* @param {Object[]} iteratee.parsedObjects - parsed object path, NOT contains the "object" parameter
|
||||||
|
*/
|
||||||
|
export declare function walk(root: any, iteratee: any): void;
|
||||||
|
/**
|
||||||
|
* Traverse all object's properties recursively
|
||||||
|
* @param {Object} root
|
||||||
|
* @param {Function} iteratee
|
||||||
|
* @param {Object} iteratee.object
|
||||||
|
* @param {String} iteratee.property - per object property will be navigated ONLY once in this parameter
|
||||||
|
* @param {Object} iteratee.value - per object may be navigated MORE than once in this parameter
|
||||||
|
* @param {Object[]} iteratee.parsedObjects - parsed object path, NOT contains the "object" parameter
|
||||||
|
* @param {Object} [options]
|
||||||
|
* @param {Boolean} [options.dontSkipNull = false]
|
||||||
|
*/
|
||||||
|
export declare function walkProperties(root: any, iteratee: any, options: any): void;
|
||||||
|
export declare function getNextProperty(parsedObjects: any, parsingObject: any, object: any): string;
|
||||||
|
//# sourceMappingURL=object-walker.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"object-walker.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/object-walker.ts"],"names":[],"mappings":"AAIA,qBAAa,oBAAoB;IAC7B,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAEjC,IAAI,EAAE,GAAG,CAAC;gBAEE,IAAI,EAAE,GAAG;IAIrB,WAAW,CAAC,GAAG,EAAE,GAAG;IAwBpB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAU7C,KAAK,CAAC,GAAG,EAAE,GAAG;IAWd,OAAO,CAAC,GAAG,EAAE,GAAG;CAKnB;AAMD,qBAAa,YAAa,SAAQ,oBAAoB;IAClD,QAAQ,EAAE,GAAG,CAAC;IACd,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,EAAE,GAAG,CAAC;IAChB,YAAY,EAAE,GAAG,CAAC;IAClB,qBAAqB,EAAE,GAAG,CAAC;IAE3B,MAAM,eAAa;gBAEP,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG;IAuBnD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CAmCpC;AAGD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,QAE5C;AAYD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,QAwBpE;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,UAiBlF"}
|
7
@types/packages/engine/@types/editor-extends/utils/deserialize.d.ts
vendored
Normal file
7
@types/packages/engine/@types/editor-extends/utils/deserialize.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* 反序列化指定数据,并处理其中涉及的资源引用。
|
||||||
|
* @param serialized 序列化后的数据。
|
||||||
|
* @returns 反序列化的结果。
|
||||||
|
*/
|
||||||
|
export declare function deserializeFull(serialized: unknown): Promise<unknown>;
|
||||||
|
//# sourceMappingURL=deserialize.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"deserialize.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/deserialize.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,OAAO,oBAiCxD"}
|
19
@types/packages/engine/@types/editor-extends/utils/geometry.d.ts
vendored
Normal file
19
@types/packages/engine/@types/editor-extends/utils/geometry.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { gfx } from 'cc';
|
||||||
|
interface IWritableArrayLike<T> {
|
||||||
|
length: number;
|
||||||
|
[index: number]: T;
|
||||||
|
}
|
||||||
|
export declare const calculateNormals: (positions: ArrayLike<number>, indices: ArrayLike<number>, out?: IWritableArrayLike<number>) => IWritableArrayLike<number>;
|
||||||
|
export declare const calculateTangents: (positions: ArrayLike<number>, indices: ArrayLike<number>, normals: ArrayLike<number>, uvs: ArrayLike<number>, out?: IWritableArrayLike<number>) => IWritableArrayLike<number>;
|
||||||
|
export declare function forEachFace(indices: ArrayLike<number>, primitiveMode: gfx.PrimitiveMode, callback: (faceIndices: number[]) => any): void;
|
||||||
|
export declare class MeshSplitInfo {
|
||||||
|
indices: number[];
|
||||||
|
jointSet: Set<number>;
|
||||||
|
primitiveMode: gfx.PrimitiveMode;
|
||||||
|
constructor(primitiveMode?: any);
|
||||||
|
}
|
||||||
|
export declare const splitBasedOnJoints: (joints: ArrayLike<number>, indices: ArrayLike<number>, primitiveMode: gfx.PrimitiveMode, capacity: number) => MeshSplitInfo[];
|
||||||
|
export declare function getUintArrayCtor(maxElement: number): Uint8ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor;
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=geometry.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/geometry.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AAGzB,UAAU,kBAAkB,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,cAQN,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,QAAO,mBAAmB,MAAM,CAAC,+BAyBjG,CAAC;AAEL,eAAO,MAAM,iBAAiB,cAcP,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,OACnF,UAAU,MAAM,CAAC,QAAO,mBAAmB,MAAM,CAAC,+BAgD3D,CAAC;AAEL,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,GAAG,QAoEjI;AAED,qBAAa,aAAa;IACf,OAAO,EAAE,MAAM,EAAE,CAAM;IACvB,QAAQ,cAAqB;IAE7B,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC;gBAC5B,aAAa,MAAsC;CAGlE;AAED,eAAO,MAAM,kBAAkB,WAsBX,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,iBAAiB,IAAI,aAAa,YAAY,MAAM,oBAyBjH,CAAC;AAEL,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,2EAIlD"}
|
18
@types/packages/engine/@types/editor-extends/utils/prefab.d.ts
vendored
Normal file
18
@types/packages/engine/@types/editor-extends/utils/prefab.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { Component, Node, Prefab } from 'cc';
|
||||||
|
interface IAddPrefabInfoOption {
|
||||||
|
nodeFileIdGenerator?: (node: Node) => string;
|
||||||
|
compFileIdGenerator?: (comp: Component, index: number) => string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 递归循环所有的子节点,执行 handle 方法
|
||||||
|
* @param {*} node
|
||||||
|
* @param {*} handle
|
||||||
|
*/
|
||||||
|
export declare function walkNode(node: Node, handle: (node: Node, isChild: boolean) => boolean | void, isChild?: boolean): void;
|
||||||
|
export declare function visitObjTypeReferences(node: Node, visitor: any): void;
|
||||||
|
export declare function addPrefabInfo(targetNode: Node, rootNode: Node, asset: Prefab, opts?: IAddPrefabInfoOption): void;
|
||||||
|
export declare function checkAndStripNode(node: Node, quiet?: boolean | undefined): Record<string, any>;
|
||||||
|
export declare function addPrefabInstance(node: Node): void;
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=prefab.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"prefab.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/prefab.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAuB,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAKlE,UAAU,oBAAoB;IAC1B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAC7C,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACpE;AAID;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,GAAC,IAAI,EAAE,OAAO,UAAQ,QAU3G;AAID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAyB9D;AAyBD,wBAAgB,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,QAoE7G;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,GAAE,OAAO,GAAG,SAAqB,uBA6EnF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,QAQ3C"}
|
55
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/builder.d.ts
vendored
Normal file
55
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/builder.d.ts
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { ValueType, deserialize } from 'cc';
|
||||||
|
import { Node, IRefsBuilder, TraceableDict } from './types';
|
||||||
|
import { IBuilder, IBuilderOptions, PropertyOptions, IArrayOptions, IClassOptions, ICustomClassOptions, IObjParsingInfo } from '../parser';
|
||||||
|
import D = deserialize.Internal;
|
||||||
|
declare type Empty = D.Empty_;
|
||||||
|
import File = D.File_;
|
||||||
|
declare type IFileData = D.IFileData_;
|
||||||
|
declare type IRefs = D.IRefs_;
|
||||||
|
export declare const FORMAT_VERSION = 1;
|
||||||
|
declare namespace RefsBuilder {
|
||||||
|
class Impl implements IRefsBuilder {
|
||||||
|
private beforeOffsetRefs;
|
||||||
|
private afterOffsetRefs;
|
||||||
|
private ctx;
|
||||||
|
constructor(ctx: Builder);
|
||||||
|
addRef(owner: Node, key: string | number, target: Node): number;
|
||||||
|
build(): IRefs | null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export declare function reduceEmptyArray<T extends any[]>(array: T): T | Empty;
|
||||||
|
export default class Builder implements IBuilder {
|
||||||
|
stringify: boolean;
|
||||||
|
minify: boolean;
|
||||||
|
noNativeDep: boolean;
|
||||||
|
sharedUuids: TraceableDict<string>;
|
||||||
|
sharedStrings: TraceableDict<string>;
|
||||||
|
refsBuilder: RefsBuilder.Impl;
|
||||||
|
dependAssets: (string | number | Node)[];
|
||||||
|
private rootNode;
|
||||||
|
private normalNodes;
|
||||||
|
private advancedNodes;
|
||||||
|
private classNodes;
|
||||||
|
private data;
|
||||||
|
constructor(options: IBuilderOptions);
|
||||||
|
setProperty_Array(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IArrayOptions): IObjParsingInfo;
|
||||||
|
setProperty_Dict(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: PropertyOptions): IObjParsingInfo;
|
||||||
|
setProperty_Class(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IClassOptions): IObjParsingInfo;
|
||||||
|
setProperty_CustomizedClass(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: ICustomClassOptions): IObjParsingInfo;
|
||||||
|
setProperty_ParsedObject(ownerInfo: IObjParsingInfo, key: string | number, valueInfo: IObjParsingInfo, formerlySerializedAs: string | null): void;
|
||||||
|
setProperty_Raw(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||||
|
setProperty_ValueType(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, value: ValueType, options: PropertyOptions): IObjParsingInfo | null;
|
||||||
|
setProperty_TypedArray(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||||
|
setProperty_AssetUuid(owner: object, ownerInfo: IObjParsingInfo, key: string | number, uuid: string, options: PropertyOptions): void;
|
||||||
|
setRoot(objInfo: IObjParsingInfo): void;
|
||||||
|
private setDynamicProperty;
|
||||||
|
private collectInstances;
|
||||||
|
private dumpInstances;
|
||||||
|
private dumpInstanceTypes;
|
||||||
|
private dumpDependUuids;
|
||||||
|
dump(): object | string;
|
||||||
|
}
|
||||||
|
export declare function getRootData(data: IFileData): IFileData[File.Instances];
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=builder.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/builder.ts"],"names":[],"mappings":"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"}
|
12
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/create-class-mask.d.ts
vendored
Normal file
12
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/create-class-mask.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { deserialize } from 'cc';
|
||||||
|
import D = deserialize.Internal;
|
||||||
|
declare type IClass = D.IClass_;
|
||||||
|
declare type IMask = D.IMask_;
|
||||||
|
import { ClassNode, CustomClassNode } from './types';
|
||||||
|
export default function (classNodes: (ClassNode | CustomClassNode)[]): {
|
||||||
|
sharedClasses: (IClass | string)[];
|
||||||
|
sharedMasks: IMask[];
|
||||||
|
};
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=create-class-mask.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"create-class-mask.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/create-class-mask.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,WAAW,EACd,MAAM,IAAI,CAAC;AAGZ,OAAO,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;AAEhC,aAAK,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC;AAExB,aAAK,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AA4JnF,MAAM,CAAC,OAAO,WAAU,UAAU,EAAE,CAAC,SAAS,GAAC,eAAe,CAAC,EAAE,GAAG;IAChE,aAAa,EAAE,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAAC;IACjC,WAAW,EAAE,KAAK,EAAE,CAAC;CACxB,CAkCA"}
|
8
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/pack-jsons.d.ts
vendored
Normal file
8
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/pack-jsons.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { deserialize } from 'cc';
|
||||||
|
import D = deserialize.Internal;
|
||||||
|
declare type IFileData = D.IFileData_;
|
||||||
|
declare type IPackedFileData = D.IPackedFileData_;
|
||||||
|
export default function packJSONs(datas: IFileData[]): IPackedFileData;
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=pack-jsons.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"pack-jsons.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/pack-jsons.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,WAAW,EACd,MAAM,IAAI,CAAC;AAGZ,OAAO,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;AAShC,aAAK,SAAS,GAAG,CAAC,CAAC,UAAU,CAAC;AAE9B,aAAK,eAAe,GAAG,CAAC,CAAC,gBAAgB,CAAC;AAgL1C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,eAAe,CAwCrE"}
|
101
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/types.d.ts
vendored
Normal file
101
@types/packages/engine/@types/editor-extends/utils/serialize/compiled/types.d.ts
vendored
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { deserialize } from 'cc';
|
||||||
|
import D = deserialize.Internal;
|
||||||
|
declare type OtherObjectData = D.OtherObjectData_;
|
||||||
|
declare type AnyData = D.AnyData_;
|
||||||
|
import DataTypeID = D.DataTypeID_;
|
||||||
|
declare type DataTypes = D.DataTypes_;
|
||||||
|
declare type IClassObjectData = D.IClassObjectData_;
|
||||||
|
declare type ICustomObjectData = D.ICustomObjectData_;
|
||||||
|
declare type ICustomObjectDataContent = D.ICustomObjectDataContent_;
|
||||||
|
declare type IDictData = D.IDictData_;
|
||||||
|
declare type IMask = D.IMask_;
|
||||||
|
declare type IClass = D.IClass_;
|
||||||
|
export declare class TraceableItem {
|
||||||
|
result: any;
|
||||||
|
private tracers;
|
||||||
|
private keys;
|
||||||
|
static compareByRefCount(lhs: TraceableItem, rhs: TraceableItem): number;
|
||||||
|
private static readonly NO_RESULT;
|
||||||
|
constructor();
|
||||||
|
traceBy(tracer: object, key: (string | number)): void;
|
||||||
|
movedTo(index: number): void;
|
||||||
|
}
|
||||||
|
export declare class TraceableDict<T> {
|
||||||
|
static readonly PLACEHOLDER = 0;
|
||||||
|
private values;
|
||||||
|
trace(source: any, tracer: object, key: (string | number)): TraceableItem;
|
||||||
|
traceString(source: string, tracer: object, key: (string | number)): void;
|
||||||
|
get(source: any): TraceableItem | undefined;
|
||||||
|
getSortedItems(): TraceableItem[];
|
||||||
|
dump(offset?: number): T[];
|
||||||
|
}
|
||||||
|
export interface IRefsBuilder {
|
||||||
|
addRef(owner: Node, key: string | number, target: Node): number;
|
||||||
|
}
|
||||||
|
declare type DynamicType = DataTypeID.Array | DataTypeID.Dict | DataTypeID.Class | DataTypeID.CustomizedClass;
|
||||||
|
declare type DerivedType = DataTypeID.InstanceRef | // 被多个对象复用时
|
||||||
|
DataTypeID.SimpleType | // 可以完美被 json 序列化时
|
||||||
|
DataTypeID.Array_AssetRefByInnerObj | DataTypeID.Array_Class | DataTypeID.Array_InstanceRef;
|
||||||
|
declare type StaticType = DataTypeID.SimpleType | DataTypeID.ValueType | DataTypeID.ValueTypeCreated | DataTypeID.TRS | DataTypeID.AssetRefByInnerObj;
|
||||||
|
export declare class Node {
|
||||||
|
selfType: DynamicType | DerivedType;
|
||||||
|
refCount: number;
|
||||||
|
indexed: boolean;
|
||||||
|
shouldBeIndexed: boolean;
|
||||||
|
private _index;
|
||||||
|
get instanceIndex(): number;
|
||||||
|
set instanceIndex(val: number);
|
||||||
|
get refType(): DynamicType | DerivedType;
|
||||||
|
static compareByRefCount(lhs: Node, rhs: Node): number;
|
||||||
|
constructor(dataTypeID: DynamicType);
|
||||||
|
setStatic<T extends StaticType>(key: string | number, dataTypeID: T, data: DataTypes[T]): void;
|
||||||
|
setDynamic(target: Node, key?: string | number): void;
|
||||||
|
static readonly AssetPlaceholderType = DataTypeID.SimpleType;
|
||||||
|
static readonly AssetPlaceholderValue: null;
|
||||||
|
setAssetRefPlaceholderOnIndexed(key: string | number): void;
|
||||||
|
dumpRecursively(refsBuilder: IRefsBuilder): (IClassObjectData | OtherObjectData);
|
||||||
|
}
|
||||||
|
export declare class ArrayNode extends Node {
|
||||||
|
types: (DataTypeID | undefined)[];
|
||||||
|
datas: (AnyData | Node)[];
|
||||||
|
static DeriveTypes: D.DataTypeID_[][];
|
||||||
|
constructor(length: number);
|
||||||
|
setStatic(key: number, dataTypeID: StaticType, data: AnyData): void;
|
||||||
|
setDynamic(target: Node, key: number): void;
|
||||||
|
setAssetRefPlaceholderOnIndexed(key: number): void;
|
||||||
|
dumpRecursively(refsBuilder: IRefsBuilder): (import("cc").__private._cocos_serialization_deserialize__AnyData | Node)[];
|
||||||
|
}
|
||||||
|
export declare class DictNode extends Node {
|
||||||
|
data: IDictData;
|
||||||
|
json: Record<string, DataTypes[DataTypeID.SimpleType]>;
|
||||||
|
dynamics: Record<string, Node>;
|
||||||
|
constructor();
|
||||||
|
setStatic(key: string, dataTypeID: StaticType, value: AnyData): void;
|
||||||
|
setDynamic(target: Node, key: string): void;
|
||||||
|
dumpRecursively(refsBuilder: IRefsBuilder): IDictData | object;
|
||||||
|
}
|
||||||
|
export declare class ClassNode extends Node {
|
||||||
|
ctor: string;
|
||||||
|
simpleKeys: string[];
|
||||||
|
private simpleValues;
|
||||||
|
advanceds: (string | number | boolean | object | number[] | import("cc").__private._cocos_serialization_deserialize__IClassObjectData | import("cc").__private._cocos_serialization_deserialize__IClassObjectData[] | import("cc").__private._cocos_serialization_deserialize__IDictData | import("cc").__private._cocos_serialization_deserialize__IArrayData | import("cc").__private._cocos_serialization_deserialize__IValueTypeData | import("cc").__private._cocos_serialization_deserialize__ITRSData | import("cc").__private._cocos_serialization_deserialize__ICustomObjectData | Node | null | undefined)[];
|
||||||
|
dumped: IClassObjectData | undefined;
|
||||||
|
static fromData(clazz: IClass, mask: IMask, data: IClassObjectData): ClassNode;
|
||||||
|
constructor(ctor: string);
|
||||||
|
setStatic(key: string, dataTypeID: StaticType, value: AnyData): void;
|
||||||
|
setDynamic(target: Node, key: string): void;
|
||||||
|
dumpRecursively(refsBuilder: IRefsBuilder): IClassObjectData;
|
||||||
|
}
|
||||||
|
export declare class CustomClassNode extends Node {
|
||||||
|
ctor: string;
|
||||||
|
content: ICustomObjectDataContent;
|
||||||
|
dumped: ICustomObjectData | undefined;
|
||||||
|
static fromData(ctor: string, data: ICustomObjectData): CustomClassNode;
|
||||||
|
constructor(ctor: string, content: ICustomObjectDataContent);
|
||||||
|
setStatic(key: string, dataTypeID: StaticType, value: AnyData): void;
|
||||||
|
setDynamic(target: Node, key: string): void;
|
||||||
|
dumpRecursively(refsBuilder: IRefsBuilder): ICustomObjectData;
|
||||||
|
}
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=types.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/types.ts"],"names":[],"mappings":"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"}
|
74
@types/packages/engine/@types/editor-extends/utils/serialize/dynamic-builder.d.ts
vendored
Normal file
74
@types/packages/engine/@types/editor-extends/utils/serialize/dynamic-builder.d.ts
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { Asset, ValueType, Constructor } from 'cc';
|
||||||
|
import { IBuilder, IBuilderOptions, PropertyOptions, IArrayOptions, IClassOptions, ICustomClassOptions, IObjParsingInfo } from './parser';
|
||||||
|
import { CCON } from 'cc/editor/serialization';
|
||||||
|
declare namespace Format {
|
||||||
|
export interface Class {
|
||||||
|
__type__: string;
|
||||||
|
[prop: string]: AnyItem;
|
||||||
|
}
|
||||||
|
export interface CustomizedClass extends Class {
|
||||||
|
content: any;
|
||||||
|
}
|
||||||
|
export interface TypedArray extends Class {
|
||||||
|
__type__: 'TypedArray';
|
||||||
|
ctor: string;
|
||||||
|
array: any[];
|
||||||
|
}
|
||||||
|
export interface InstanceReference {
|
||||||
|
__id__: number;
|
||||||
|
}
|
||||||
|
export interface AssetReference {
|
||||||
|
__uuid__: string;
|
||||||
|
}
|
||||||
|
type RawItem = number | string | boolean | null;
|
||||||
|
type Item = Class | InstanceReference | RawItem;
|
||||||
|
type Dict = {
|
||||||
|
[key in string]: AnyItem;
|
||||||
|
};
|
||||||
|
type Array = AnyItem[];
|
||||||
|
export type Object = Class | Dict | Array;
|
||||||
|
export type AnyItem = Item | Dict | Array;
|
||||||
|
export {};
|
||||||
|
}
|
||||||
|
interface IObjAndId extends IObjParsingInfo {
|
||||||
|
data: Format.AnyItem;
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
export default class DynamicBuilder implements IBuilder {
|
||||||
|
stringify: boolean;
|
||||||
|
minify: boolean;
|
||||||
|
forceInline: boolean;
|
||||||
|
private serializedList;
|
||||||
|
constructor(options: IBuilderOptions);
|
||||||
|
setProperty_Array(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: IArrayOptions): IObjAndId;
|
||||||
|
setProperty_Dict(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: PropertyOptions): IObjAndId;
|
||||||
|
private addObject;
|
||||||
|
setProperty_Class(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: IClassOptions): IObjAndId;
|
||||||
|
setProperty_CustomizedClass(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: ICustomClassOptions): IObjAndId;
|
||||||
|
setProperty_ParsedObject(ownerInfo: IObjAndId, key: string | number, valueInfo: IObjAndId, formerlySerializedAs: string | null): void;
|
||||||
|
setProperty_Raw(owner: object, ownerInfo: IObjAndId, key: string | number, value: any, options: PropertyOptions): void;
|
||||||
|
setProperty_ValueType(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, value: ValueType, options: PropertyOptions): IObjAndId;
|
||||||
|
setProperty_TypedArray(owner: object, ownerInfo: IObjAndId, key: string | number, value: any, options: PropertyOptions): void;
|
||||||
|
setProperty_AssetUuid(owner: object, ownerInfo: IObjAndId, key: string | number, uuid: string, options: PropertyOptions): void;
|
||||||
|
setRoot(objInfo: IObjAndId): void;
|
||||||
|
dump(): object | string | CCON;
|
||||||
|
private _useCCON;
|
||||||
|
private _mainBufferBuilder;
|
||||||
|
private _dumpAsJson;
|
||||||
|
private _dumpAsCCON;
|
||||||
|
private _getMainJsonData;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Create a pseudo object which will be force serialized as a reference to any asset by specified uuid.
|
||||||
|
*/
|
||||||
|
export declare function asAsset(uuid: string, type?: Constructor<Asset>): Asset | null;
|
||||||
|
/**
|
||||||
|
* Set the asset's name directly in JSON object
|
||||||
|
*/
|
||||||
|
export declare function setName(data: Format.AnyItem, name: string): void;
|
||||||
|
export declare function findRootObject(data: Format.AnyItem, type: string): string | number | boolean | Format.InstanceReference | {
|
||||||
|
[x: string]: Format.AnyItem;
|
||||||
|
} | null;
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=dynamic-builder.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"dynamic-builder.d.ts","sourceRoot":"","sources":["../../../../source/editor-extends/utils/serialize/dynamic-builder.ts"],"names":[],"mappings":"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"}
|
13
@types/packages/engine/@types/editor-extends/utils/serialize/index.d.ts
vendored
Normal file
13
@types/packages/engine/@types/editor-extends/utils/serialize/index.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { IOptions } from './parser';
|
||||||
|
export declare function serialize(obj: Exclude<any, null | undefined>, options?: IOptions): string | object;
|
||||||
|
export declare namespace serialize {
|
||||||
|
var asAsset: typeof import("./dynamic-builder").asAsset;
|
||||||
|
var setName: typeof import("./dynamic-builder").setName;
|
||||||
|
var findRootObject: typeof import("./dynamic-builder").findRootObject;
|
||||||
|
}
|
||||||
|
export declare function serializeCompiled(obj: Exclude<any, null | undefined>, options: IOptions): string | object;
|
||||||
|
export declare namespace serializeCompiled {
|
||||||
|
var getRootData: typeof import("./compiled/builder").getRootData;
|
||||||
|
var packJSONs: typeof import("./compiled/pack-jsons").default;
|
||||||
|
}
|
||||||
|
//# sourceMappingURL=index.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/editor-extends/utils/serialize/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,QAAQ,EAAE,MAAM,UAAU,CAAC;AAI5D,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,GAAG,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAwBlG;yBAxBe,SAAS;;;;;AA8BzB,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,GAAC,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAMvG;yBANe,iBAAiB"}
|
112
@types/packages/engine/@types/editor-extends/utils/serialize/parser.d.ts
vendored
Normal file
112
@types/packages/engine/@types/editor-extends/utils/serialize/parser.d.ts
vendored
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
/// <reference types="../../../../node_modules/cc/cc" />
|
||||||
|
import { ValueType } from 'cc';
|
||||||
|
interface IPropertyOptions {
|
||||||
|
formerlySerializedAs?: string;
|
||||||
|
defaultValue?: any;
|
||||||
|
expectedType?: string;
|
||||||
|
}
|
||||||
|
export declare type PropertyOptions = IPropertyOptions | null;
|
||||||
|
export interface IArrayOptions extends IPropertyOptions {
|
||||||
|
writeOnlyArray: any[];
|
||||||
|
}
|
||||||
|
export interface IClassOptions extends IPropertyOptions {
|
||||||
|
type: string;
|
||||||
|
/**
|
||||||
|
* 此类的实例永远只会被一个地方引用到。
|
||||||
|
*/
|
||||||
|
uniquelyReferenced?: boolean;
|
||||||
|
}
|
||||||
|
export interface ICustomClassOptions extends IClassOptions {
|
||||||
|
content: any;
|
||||||
|
}
|
||||||
|
export interface IObjParsingInfo {
|
||||||
|
}
|
||||||
|
export interface IBuilder {
|
||||||
|
setProperty_Raw(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||||
|
setProperty_Class(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IClassOptions): IObjParsingInfo;
|
||||||
|
setProperty_CustomizedClass(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: ICustomClassOptions): IObjParsingInfo;
|
||||||
|
setProperty_ValueType(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, value: ValueType, options: PropertyOptions): IObjParsingInfo | null;
|
||||||
|
setProperty_TypedArray(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||||
|
setProperty_AssetUuid(owner: object, ownerInfo: IObjParsingInfo, key: string | number, uuid: string, options: PropertyOptions): void;
|
||||||
|
setProperty_Array(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IArrayOptions): IObjParsingInfo;
|
||||||
|
setProperty_Dict(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: PropertyOptions): IObjParsingInfo;
|
||||||
|
setProperty_ParsedObject(ownerInfo: IObjParsingInfo, key: string | number, valueInfo: IObjParsingInfo, formerlySerializedAs: string | null): void;
|
||||||
|
setRoot(objInfo: IObjParsingInfo): void;
|
||||||
|
dump(): any;
|
||||||
|
}
|
||||||
|
export interface IBuilderOptions {
|
||||||
|
builder?: 'dynamic' | 'compiled';
|
||||||
|
stringify?: boolean;
|
||||||
|
minify?: boolean;
|
||||||
|
noNativeDep?: boolean;
|
||||||
|
forceInline?: boolean;
|
||||||
|
/**
|
||||||
|
* Outputs as CCON.
|
||||||
|
*
|
||||||
|
* CCON denotes `Cocos Creator Object Notation`(let's imagine JSON as JavaScript Object Notation).
|
||||||
|
* It allows binary representation of some value but loses the readability.
|
||||||
|
*
|
||||||
|
* CCON can be represented as two formal:
|
||||||
|
* - JSON + Binary file(s)
|
||||||
|
* - Single Binary file
|
||||||
|
* However `serialize()` produces whole `CCON` and you could select a suitable formal.
|
||||||
|
* As Cocos Creator 3.3, the `useCCON` only be turned on
|
||||||
|
* when it's going to serialize `AnimationClip` into library or into production.
|
||||||
|
*/
|
||||||
|
useCCON?: boolean;
|
||||||
|
}
|
||||||
|
export interface IParserOptions {
|
||||||
|
compressUuid?: boolean;
|
||||||
|
discardInvalid?: boolean;
|
||||||
|
dontStripDefault?: boolean;
|
||||||
|
missingClassReporter?: any;
|
||||||
|
missingObjectReporter?: any;
|
||||||
|
reserveContentsForSyncablePrefab?: boolean;
|
||||||
|
_exporting?: boolean;
|
||||||
|
useCCON?: boolean;
|
||||||
|
keepNodeUuid?: boolean;
|
||||||
|
recordAssetDepends?: string[];
|
||||||
|
}
|
||||||
|
export declare class Parser {
|
||||||
|
exporting: boolean;
|
||||||
|
mustCompresseUuid: boolean;
|
||||||
|
discardInvalid: boolean;
|
||||||
|
dontStripDefault: boolean;
|
||||||
|
missingClassReporter: any;
|
||||||
|
missingObjectReporter: any;
|
||||||
|
reserveContentsForAllSyncablePrefab: boolean;
|
||||||
|
keepNodeUuid: boolean;
|
||||||
|
recordAssetDepends: IParserOptions['recordAssetDepends'];
|
||||||
|
private builder;
|
||||||
|
private root;
|
||||||
|
private prefabRoot;
|
||||||
|
private assetExists;
|
||||||
|
private parsingInfos;
|
||||||
|
private customExportingCtxCache;
|
||||||
|
private _serializationContext;
|
||||||
|
private assetDepends?;
|
||||||
|
constructor(builder: IBuilder, options: IParserOptions);
|
||||||
|
parse(obj: object): void;
|
||||||
|
private checkMissingAsset;
|
||||||
|
private isObjRemoved;
|
||||||
|
private setParsedObj;
|
||||||
|
private verifyNotParsedValue;
|
||||||
|
private canDiscardByPrefabRoot;
|
||||||
|
private enumerateClass;
|
||||||
|
static isDefaultTrs(trs: any): boolean;
|
||||||
|
private parseField;
|
||||||
|
/**
|
||||||
|
* 解析对象
|
||||||
|
* 1. 调用 builder 的 API 声明一个新的【空对象】
|
||||||
|
* 2. 对可引用对象,标记解析状态,防止循环解析
|
||||||
|
* 3. 【最后】枚举对象包含的其它属性
|
||||||
|
*/
|
||||||
|
private parseObjField;
|
||||||
|
private enumerateDict;
|
||||||
|
private enumerateBindedDict;
|
||||||
|
}
|
||||||
|
export interface IOptions extends IParserOptions, IBuilderOptions {
|
||||||
|
}
|
||||||
|
export default function serialize(obj: Exclude<any, null | undefined>, options: IOptions): string | object;
|
||||||
|
export {};
|
||||||
|
//# sourceMappingURL=parser.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../source/editor-extends/utils/serialize/parser.ts"],"names":[],"mappings":"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"}
|
20
@types/packages/engine/@types/editor-extends/utils/uuid.d.ts
vendored
Normal file
20
@types/packages/engine/@types/editor-extends/utils/uuid.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
export declare const NonUuidMark = ".";
|
||||||
|
export declare function compressUuid(uuid: string, min: boolean): string;
|
||||||
|
export declare function decompressUuid(uuid: string): string;
|
||||||
|
export declare function isUuid(str: string): string;
|
||||||
|
export declare function uuid(compress?: boolean): string;
|
||||||
|
export declare function compressUUID(uuid: string, min: boolean): string;
|
||||||
|
export declare function compressHex(hexString: string, reservedHeadLength: number): string;
|
||||||
|
export declare function decompressUUID(uuid: string): string;
|
||||||
|
export declare function isUUID(str: string): string;
|
||||||
|
export declare function getUuidFromLibPath(path: string): string;
|
||||||
|
export declare function generate(compress?: boolean): string;
|
||||||
|
/**
|
||||||
|
* 从一个名字转换成一个 id
|
||||||
|
* 这是个有损压缩,并不能够还原成原来的名字
|
||||||
|
* 注意:此方法需要和 asset-db 保持一致
|
||||||
|
* @param id
|
||||||
|
* @param extend
|
||||||
|
*/
|
||||||
|
export declare function nameToSubId(name: string, extend?: number): string;
|
||||||
|
//# sourceMappingURL=uuid.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/uuid.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,UAEtD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAE1C;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,UAEjC;AAED,wBAAgB,IAAI,CAAC,QAAQ,UAAO,UAEnC;AAID,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,UAEtD;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,UAExE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAE1C;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,UAEjC;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAE9C;AAED,wBAAgB,QAAQ,CAAC,QAAQ,UAAO,UAEvC;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAI,UAEnD"}
|
23
@types/packages/engine/@types/engine-compiler/index.d.ts
vendored
Normal file
23
@types/packages/engine/@types/engine-compiler/index.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
interface IRebuildOptions {
|
||||||
|
debugNative?: boolean;
|
||||||
|
isNativeScene?: boolean;
|
||||||
|
}
|
||||||
|
export declare function compileEngine(directory: string, force?: boolean): Promise<void>;
|
||||||
|
export declare function rebuild(options?: IRebuildOptions): Promise<void>;
|
||||||
|
export declare function rebuildImportMaps(): Promise<void>;
|
||||||
|
interface IEngineGlobalConfig {
|
||||||
|
'builtin': boolean;
|
||||||
|
'custom': string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据全局配置与项目配置、默认值等计算出真正的引擎使用路径
|
||||||
|
* @param globalConfig
|
||||||
|
* @param projectConfig
|
||||||
|
* @param builtinPath
|
||||||
|
*/
|
||||||
|
export declare function getRightEngine(config: IEngineGlobalConfig, builtinPath: string): {
|
||||||
|
version: string;
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
|
export * as default from './index';
|
||||||
|
//# sourceMappingURL=index.d.ts.map
|
@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../static/engine-compiler/source/index.ts"],"names":[],"mappings":"AAqBA,UAAU,eAAe;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AACD,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,iBAqCrE;AAuED,wBAAsB,OAAO,CAAC,OAAO,CAAC,EAAE,eAAe,iBA+CtD;AAED,wBAAsB,iBAAiB,kBAkBtC;AAsOD,UAAU,mBAAmB;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM;;;EAY9E;AA6HD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA"}
|
15
@types/packages/engine/@types/index.d.ts
vendored
Normal file
15
@types/packages/engine/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
export * from './module';
|
||||||
|
export interface EngineInfo {
|
||||||
|
typescript: {
|
||||||
|
type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义)
|
||||||
|
custom: string; // 自定义引擎地址
|
||||||
|
builtin: string, // 内置引擎地址
|
||||||
|
path: string; // 当前使用的引擎路径,为空也表示编译失败
|
||||||
|
},
|
||||||
|
native: {
|
||||||
|
type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义)
|
||||||
|
custom: string; // 自定义引擎地址
|
||||||
|
builtin: string; // 内置引擎地址
|
||||||
|
path: string; // 当前使用的引擎路径,为空也表示编译失败
|
||||||
|
},
|
||||||
|
}
|
22
@types/packages/engine/@types/message.d.ts
vendored
Normal file
22
@types/packages/engine/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { EngineInfo } from './index';
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'query-info': {
|
||||||
|
params: [] | [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: {
|
||||||
|
version: string;
|
||||||
|
path: string;
|
||||||
|
nativeVersion: string; // 原生引擎类型 'custom' 'builtin'
|
||||||
|
nativePath: string;
|
||||||
|
editor: string;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'query-engine-info': {
|
||||||
|
params: [] | [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: EngineInfo,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
78
@types/packages/engine/@types/module.d.ts
vendored
Normal file
78
@types/packages/engine/@types/module.d.ts
vendored
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
|
||||||
|
export type IModules = Record<string, IModuleItem>;
|
||||||
|
|
||||||
|
export interface IFlagBaseItem {
|
||||||
|
/**
|
||||||
|
* Display text.
|
||||||
|
*/
|
||||||
|
label: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*/
|
||||||
|
description?: string;
|
||||||
|
|
||||||
|
native?: string;
|
||||||
|
|
||||||
|
wechatPlugin?: boolean;
|
||||||
|
|
||||||
|
default?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBaseItem {
|
||||||
|
/**
|
||||||
|
* Display text.
|
||||||
|
*/
|
||||||
|
label: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*/
|
||||||
|
description?: string;
|
||||||
|
|
||||||
|
required?: boolean;
|
||||||
|
|
||||||
|
native?: string;
|
||||||
|
|
||||||
|
wechatPlugin?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IModuleItem extends IBaseItem {
|
||||||
|
/**
|
||||||
|
* Display text.
|
||||||
|
*/
|
||||||
|
label: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*/
|
||||||
|
description?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether if the feature of options allow multiple selection.
|
||||||
|
*/
|
||||||
|
multi?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If have default it will checked
|
||||||
|
*/
|
||||||
|
default?: string[];
|
||||||
|
|
||||||
|
options?: Record<string, IBaseItem>;
|
||||||
|
|
||||||
|
category?: string;
|
||||||
|
|
||||||
|
flags?: Record<string, IFlagBaseItem>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IDisplayModuleItem extends IModuleItem {
|
||||||
|
_value: boolean;
|
||||||
|
_option?: string;
|
||||||
|
options?: Record<string, IDisplayModuleItem>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IDisplayModuleCache {
|
||||||
|
_value: boolean;
|
||||||
|
_option?: string;
|
||||||
|
flags?: Record<string, boolean>;
|
||||||
|
}
|
15
@types/packages/fb-instant-games/@types/index.d.ts
vendored
Normal file
15
@types/packages/fb-instant-games/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'auto' | 'landscape' | 'portrait';
|
||||||
|
export interface IOptions {
|
||||||
|
orientation: IOrientation;
|
||||||
|
embedWebDebugger: boolean;
|
||||||
|
}
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'fb-instant-games': IOptions;
|
||||||
|
}
|
||||||
|
}
|
50
@types/packages/huawei-agc/@types/index.d.ts
vendored
Normal file
50
@types/packages/huawei-agc/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'android': IOptions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64';
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
packageName: string;
|
||||||
|
orientation: {
|
||||||
|
landscapeRight: boolean;
|
||||||
|
landscapeLeft: boolean;
|
||||||
|
portrait: boolean;
|
||||||
|
upsideDown: boolean;
|
||||||
|
},
|
||||||
|
|
||||||
|
apiLevel: number;
|
||||||
|
appABIs: IAppABI[];
|
||||||
|
|
||||||
|
useDebugKeystore: boolean;
|
||||||
|
keystorePath: string;
|
||||||
|
keystorePassword: string;
|
||||||
|
keystoreAlias: string;
|
||||||
|
keystoreAliasPassword: string;
|
||||||
|
|
||||||
|
appBundle: boolean;
|
||||||
|
androidInstant: boolean;
|
||||||
|
remoteUrl: string;
|
||||||
|
sdkPath: string;
|
||||||
|
ndkPath: string;
|
||||||
|
|
||||||
|
renderBackEnd: {
|
||||||
|
vulkan: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
gles2: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildResult extends InternalBuildResult {
|
||||||
|
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||||
|
}
|
35
@types/packages/huawei-quick-game/@types/index.d.ts
vendored
Normal file
35
@types/packages/huawei-quick-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'huawei-quick-game': IOptions;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
package: string;
|
||||||
|
icon: string;
|
||||||
|
versionName: string;
|
||||||
|
versionCode: string;
|
||||||
|
minPlatformVersion: string;
|
||||||
|
deviceOrientation: IOrientation;
|
||||||
|
useDebugKey: boolean;
|
||||||
|
privatePemPath: string;
|
||||||
|
certificatePemPath: string;
|
||||||
|
|
||||||
|
fullScreen: boolean;
|
||||||
|
logLevel: string;
|
||||||
|
manifestPath?: string;
|
||||||
|
separateEngine: boolean;
|
||||||
|
|
||||||
|
subpackages?: { name: string, resource: string }[];
|
||||||
|
wasmSubpackage: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICompileOptions {
|
||||||
|
name: string;
|
||||||
|
}
|
32
@types/packages/information/@types/message.d.ts
vendored
Normal file
32
@types/packages/information/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import { IDialogAction, IQueryInformation } from './public';
|
||||||
|
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'query-information': {
|
||||||
|
params: [
|
||||||
|
tag: string,
|
||||||
|
options?: {
|
||||||
|
force?: boolean,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
result: IQueryInformation | null,
|
||||||
|
},
|
||||||
|
'open-information-dialog': {
|
||||||
|
params: [
|
||||||
|
tag: string,
|
||||||
|
dialogOptions?: { [key: string]: string }
|
||||||
|
],
|
||||||
|
result: IDialogAction,
|
||||||
|
},
|
||||||
|
'has-dialog': {
|
||||||
|
params: [
|
||||||
|
tag: string,
|
||||||
|
],
|
||||||
|
result: boolean,
|
||||||
|
},
|
||||||
|
'close-dialog': {
|
||||||
|
params: [
|
||||||
|
tag: string,
|
||||||
|
],
|
||||||
|
result: void,
|
||||||
|
}
|
||||||
|
}
|
35
@types/packages/information/@types/public.d.ts
vendored
Normal file
35
@types/packages/information/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
export interface IContribution {
|
||||||
|
tags?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 某个功能的问卷数据
|
||||||
|
export interface IInformationItem {
|
||||||
|
// 380 这个 id 是为了兼容后端接口还没给到 id,先用 tag 作为标识索引的
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
enable: boolean;
|
||||||
|
[id: string]: {
|
||||||
|
complete: boolean;
|
||||||
|
form: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 问卷弹窗操作结果
|
||||||
|
export interface IDialogAction {
|
||||||
|
// reject 用户拒绝填写问卷、断网且 10s 内关闭了弹窗
|
||||||
|
// resolve 用户正常填写完数据、用户不需要填写
|
||||||
|
// unusual 提交表单填写异常
|
||||||
|
action: 'reject' | 'resolve' | 'unusual',
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询某个功能的问卷数据
|
||||||
|
export interface IQueryInformation {
|
||||||
|
status: 'success' | 'cache' | 'network_failure' | 'network_exception';
|
||||||
|
data?: IInformationItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 所有功能问卷数据
|
||||||
|
export interface IInformationData {
|
||||||
|
// 功能问卷数据
|
||||||
|
[tag: string]: IInformationItem
|
||||||
|
}
|
42
@types/packages/ios/@types/index.d.ts
vendored
Normal file
42
@types/packages/ios/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'ios': IOptions;
|
||||||
|
native: {
|
||||||
|
JobSystem: 'none' | 'tbb' | 'taskFlow';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildResult extends InternalBuildResult {
|
||||||
|
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
executableName: string;
|
||||||
|
packageName: string;
|
||||||
|
orientation: {
|
||||||
|
landscapeRight: boolean;
|
||||||
|
landscapeLeft: boolean;
|
||||||
|
portrait: boolean;
|
||||||
|
upsideDown: boolean;
|
||||||
|
},
|
||||||
|
skipUpdateXcodeProject: boolean;
|
||||||
|
renderBackEnd: {
|
||||||
|
metal: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
gles2: boolean;
|
||||||
|
},
|
||||||
|
osTarget: {
|
||||||
|
iphoneos: boolean,
|
||||||
|
simulator: boolean,
|
||||||
|
},
|
||||||
|
developerTeam?: string,
|
||||||
|
targetVersion: string,
|
||||||
|
}
|
18
@types/packages/linux/@types/index.d.ts
vendored
Normal file
18
@types/packages/linux/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'linux': IOptions;
|
||||||
|
native: any;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IOptions {
|
||||||
|
renderBackEnd: {
|
||||||
|
metal: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
gles2: boolean;
|
||||||
|
},
|
||||||
|
}
|
30
@types/packages/mac/@types/index.d.ts
vendored
Normal file
30
@types/packages/mac/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'mac': IOptions;
|
||||||
|
native: any;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
executableName: string;
|
||||||
|
packageName: string;
|
||||||
|
renderBackEnd: {
|
||||||
|
metal: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
gles2: boolean;
|
||||||
|
},
|
||||||
|
supportM1: boolean;
|
||||||
|
skipUpdateXcodeProject: boolean;
|
||||||
|
targetVersion: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildCache extends InternalBuildResult {
|
||||||
|
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||||
|
}
|
36
@types/packages/ohos/@types/index.d.ts
vendored
Normal file
36
@types/packages/ohos/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'ohos': IOptions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
packageName: string;
|
||||||
|
orientation: {
|
||||||
|
landscapeRight: boolean;
|
||||||
|
landscapeLeft: boolean;
|
||||||
|
portrait: boolean;
|
||||||
|
upsideDown: boolean;
|
||||||
|
},
|
||||||
|
|
||||||
|
apiLevel: number;
|
||||||
|
sdkPath: string;
|
||||||
|
ndkPath: string;
|
||||||
|
|
||||||
|
renderBackEnd: {
|
||||||
|
// vulkan: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
// gles2: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildResult extends InternalBuildResult {
|
||||||
|
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||||
|
}
|
40
@types/packages/openharmony/@types/index.d.ts
vendored
Normal file
40
@types/packages/openharmony/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'openharmony': IOptions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IAppABI = 'armeabi-v7a' | 'arm64-v8a';
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
packageName: string;
|
||||||
|
orientation: {
|
||||||
|
landscapeRight: boolean;
|
||||||
|
landscapeLeft: boolean;
|
||||||
|
portrait: boolean;
|
||||||
|
upsideDown: boolean;
|
||||||
|
},
|
||||||
|
|
||||||
|
apiLevel: number;
|
||||||
|
sdkPath: string;
|
||||||
|
ndkPath: string;
|
||||||
|
appABIs: IAppABI[];
|
||||||
|
|
||||||
|
renderBackEnd: {
|
||||||
|
// vulkan: boolean;
|
||||||
|
gles3: boolean;
|
||||||
|
// gles2: boolean;
|
||||||
|
};
|
||||||
|
useAotOptimization: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBuildResult extends InternalBuildResult {
|
||||||
|
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||||
|
}
|
33
@types/packages/oppo-mini-game/@types/index.d.ts
vendored
Normal file
33
@types/packages/oppo-mini-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protected';
|
||||||
|
|
||||||
|
export type IOrientation = 'landscape' | 'portrait';
|
||||||
|
export interface ITaskOption extends IInternalBuildOptions {
|
||||||
|
packages: {
|
||||||
|
'oppo-mini-game': IOptions;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IOptions {
|
||||||
|
package: string;
|
||||||
|
icon: string;
|
||||||
|
versionName: string;
|
||||||
|
versionCode: string;
|
||||||
|
minPlatformVersion: string;
|
||||||
|
deviceOrientation: IOrientation;
|
||||||
|
useDebugKey: boolean;
|
||||||
|
privatePemPath: string;
|
||||||
|
certificatePemPath: string;
|
||||||
|
hasSubPackage?: boolean;
|
||||||
|
separateEngine: boolean;
|
||||||
|
|
||||||
|
subpackages?: { name: string, root: string }[];
|
||||||
|
wasmSubpackage: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICompileOptions {
|
||||||
|
name: string;
|
||||||
|
useDebugKey: boolean;
|
||||||
|
hasSubPackage: boolean;
|
||||||
|
}
|
60
@types/packages/package-asset/@types/public.d.ts
vendored
Normal file
60
@types/packages/package-asset/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
export interface MenuAssetInfo {
|
||||||
|
// 资源名字
|
||||||
|
name: string;
|
||||||
|
// 资源用于显示的名字
|
||||||
|
displayName: string;
|
||||||
|
// loader 加载的层级地址
|
||||||
|
url: string;
|
||||||
|
// 绝对路径
|
||||||
|
file: string;
|
||||||
|
// 资源的唯一 ID
|
||||||
|
uuid: string;
|
||||||
|
// 使用的导入器名字
|
||||||
|
importer: string;
|
||||||
|
// 类型
|
||||||
|
type: string;
|
||||||
|
// 是否是文件夹
|
||||||
|
isDirectory: boolean;
|
||||||
|
// 是否只读
|
||||||
|
readonly: boolean;
|
||||||
|
// 虚拟资源可以实例化成实体的话,会带上这个扩展名
|
||||||
|
instantiation?: string;
|
||||||
|
// 跳转指向资源
|
||||||
|
redirect?: IRedirectInfo;
|
||||||
|
// 继承类型
|
||||||
|
extends?: string[];
|
||||||
|
// 是否导入完成
|
||||||
|
imported: boolean;
|
||||||
|
// 是否导入失败
|
||||||
|
invalid: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRedirectInfo {
|
||||||
|
// 跳转资源的类型
|
||||||
|
type: string;
|
||||||
|
// 跳转资源的 uuid
|
||||||
|
uuid: string;
|
||||||
|
}
|
||||||
|
export interface IAssetInfo {
|
||||||
|
name: string; // 资源名字
|
||||||
|
displayName: string; // 资源用于显示的名字
|
||||||
|
source: string; // url 地址
|
||||||
|
path: string; // loader 加载的层级地址
|
||||||
|
url: string; // loader 加载地址会去掉扩展名,这个参数不去掉
|
||||||
|
file: string; // 绝对路径
|
||||||
|
uuid: string; // 资源的唯一 ID
|
||||||
|
importer: string; // 使用的导入器名字
|
||||||
|
imported: boolean; // 是否结束导入过程
|
||||||
|
invalid: boolean; // 是否导入成功
|
||||||
|
type: string; // 类型
|
||||||
|
isDirectory: boolean; // 是否是文件夹
|
||||||
|
library: { [key: string]: string }; // 导入资源的 map
|
||||||
|
subAssets: { [key: string]: IAssetInfo }; // 子资源 map
|
||||||
|
visible: boolean; // 是否显示
|
||||||
|
readonly: boolean; // 是否只读
|
||||||
|
|
||||||
|
instantiation?: string; // 虚拟资源可以实例化成实体的话,会带上这个扩展名
|
||||||
|
redirect?: IRedirectInfo; // 跳转指向资源
|
||||||
|
meta?: any,
|
||||||
|
fatherInfo?: any;
|
||||||
|
}
|
66
@types/packages/preferences/@types/index.d.ts
vendored
Normal file
66
@types/packages/preferences/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
export interface IPanelInfo {
|
||||||
|
template?: string;
|
||||||
|
style?: string;
|
||||||
|
listeners?: { [key: string]: (...arg: any) => {} };
|
||||||
|
methods?: { [key: string]: Function };
|
||||||
|
$?: { [key: string]: string };
|
||||||
|
ready?(): void;
|
||||||
|
update?(...args: any[]): void;
|
||||||
|
beforeClose?(): void;
|
||||||
|
close?(): void;
|
||||||
|
exportConfig?(): Promise<ExportConfig>;
|
||||||
|
importConfig?(configs: ExportConfig): Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PreferencesLaboratory {
|
||||||
|
label: string;
|
||||||
|
description?: string;
|
||||||
|
path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PreferencesProperties {
|
||||||
|
[key: string]: {
|
||||||
|
description?: string;
|
||||||
|
label: string;
|
||||||
|
render: {
|
||||||
|
ui: string;
|
||||||
|
attributes?: {
|
||||||
|
[key: string]: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PreferencesConfigs {
|
||||||
|
[key: string]: {
|
||||||
|
custom?: string;
|
||||||
|
laboratory?: PreferencesLaboratory[] | null;
|
||||||
|
properties?: PreferencesProperties | null;
|
||||||
|
title: string;
|
||||||
|
version: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PreferencesProtocol = 'default' | 'global' | 'local';
|
||||||
|
|
||||||
|
export interface ExportConfig {
|
||||||
|
[key: string]: {
|
||||||
|
type?: PreferencesProtocol;
|
||||||
|
value: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExportConfigs {
|
||||||
|
'__version__'?: string;
|
||||||
|
'properties'?: ExportConfig;
|
||||||
|
'laboratory'?: ExportConfig;
|
||||||
|
'custom'?: ExportConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExportPreferencesConfigs {
|
||||||
|
[key: string]: ExportConfigs;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PreferencesHandlers {
|
||||||
|
[key: string]: IPanelInfo;
|
||||||
|
}
|
28
@types/packages/preferences/@types/message.d.ts
vendored
Normal file
28
@types/packages/preferences/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { PreferencesProtocol } from './index';
|
||||||
|
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'open-settings': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
...any[],
|
||||||
|
],
|
||||||
|
result: undefined,
|
||||||
|
},
|
||||||
|
'query-config': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string?,
|
||||||
|
PreferencesProtocol?,
|
||||||
|
],
|
||||||
|
result: any,
|
||||||
|
},
|
||||||
|
'set-config': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
any,
|
||||||
|
PreferencesProtocol?,
|
||||||
|
],
|
||||||
|
result: boolean,
|
||||||
|
}
|
||||||
|
}
|
1
@types/packages/preview/@types/index.d.ts
vendored
Normal file
1
@types/packages/preview/@types/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './protect/';
|
28
@types/packages/program/@types/message.d.ts
vendored
Normal file
28
@types/packages/program/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { IProgramInfo } from './public';
|
||||||
|
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
"query-program-info": {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
],
|
||||||
|
result: IProgramInfo | null,
|
||||||
|
},
|
||||||
|
"query-programs": {
|
||||||
|
params: [],
|
||||||
|
result: Record<string, Record<string, IProgramInfo>>
|
||||||
|
}
|
||||||
|
"open-program": {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
Record<string, any>?,
|
||||||
|
],
|
||||||
|
result: Promise<boolean>,
|
||||||
|
},
|
||||||
|
"open-url": {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
Record<string, any>?,
|
||||||
|
],
|
||||||
|
result: Promise<boolean>,
|
||||||
|
}
|
||||||
|
}
|
18
@types/packages/program/@types/public.d.ts
vendored
Normal file
18
@types/packages/program/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
export interface IProgramInfo {
|
||||||
|
// 应用程序员名称
|
||||||
|
label: string;
|
||||||
|
// 应用程序描述
|
||||||
|
description?: string;
|
||||||
|
// 应用程序的命令行参数菜单的配置数据
|
||||||
|
// 参数的 key 是调用时传递参数的 key
|
||||||
|
arguments?: Record<string, IProgramArgument>;
|
||||||
|
// 应用程序所在路径
|
||||||
|
path: string;
|
||||||
|
// 应用程序的命令行参数
|
||||||
|
commandArgument?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IProgramArgument {
|
||||||
|
// 参数的描述
|
||||||
|
label?: string;
|
||||||
|
}
|
7
@types/packages/programming/@types/message.d.ts
vendored
Normal file
7
@types/packages/programming/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { SharedSettings } from './protected'
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'query-shared-settings': {
|
||||||
|
params: [],
|
||||||
|
result: SharedSettings,
|
||||||
|
};
|
||||||
|
}
|
62
@types/packages/project/@types/index.d.ts
vendored
Normal file
62
@types/packages/project/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
export type ProjectProtocol = 'default' | 'project';
|
||||||
|
|
||||||
|
export interface IPanelInfo {
|
||||||
|
template?: string;
|
||||||
|
style?: string;
|
||||||
|
listeners?: { [key: string]: (...arg: any) => {} };
|
||||||
|
methods?: { [key: string]: Function };
|
||||||
|
$?: { [key: string]: string };
|
||||||
|
ready?(): void;
|
||||||
|
update?(...args: any[]): void;
|
||||||
|
beforeClose?(): void;
|
||||||
|
close?(): void;
|
||||||
|
exportConfig?(): Promise<Record<string, any>>;
|
||||||
|
importConfig?(configs: Record<string, any>): Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectSettingsTab {
|
||||||
|
tab: string;
|
||||||
|
subTab: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectConfigs {
|
||||||
|
[key: string]: {
|
||||||
|
title: string;
|
||||||
|
version: string;
|
||||||
|
tabs: ProjectTabs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectTabs {
|
||||||
|
[key: stirng]: {
|
||||||
|
content?: ProjectContent | null;
|
||||||
|
custom?: string;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectContent {
|
||||||
|
[key: string]: {
|
||||||
|
description?: string;
|
||||||
|
label: string;
|
||||||
|
render: {
|
||||||
|
ui: string;
|
||||||
|
attributes?: {
|
||||||
|
[key: string]: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExportProjectConfigs {
|
||||||
|
[key: string]: {
|
||||||
|
'__version__'?: string;
|
||||||
|
[key: string]: Record<string, any>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectHandlers {
|
||||||
|
[key: string]: {
|
||||||
|
[key: string]: IPanelInfo;
|
||||||
|
}
|
||||||
|
}
|
27
@types/packages/project/@types/message.d.ts
vendored
Normal file
27
@types/packages/project/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import { ProjectProtocol } from './index';
|
||||||
|
export interface message extends EditorMessageMap {
|
||||||
|
'open-settings': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
...any[],
|
||||||
|
],
|
||||||
|
result: undefined,
|
||||||
|
},
|
||||||
|
'query-config': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string?,
|
||||||
|
ProjectProtocol?,
|
||||||
|
],
|
||||||
|
result: any,
|
||||||
|
},
|
||||||
|
'set-config': {
|
||||||
|
params: [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
any,
|
||||||
|
],
|
||||||
|
result: boolean,
|
||||||
|
}
|
||||||
|
}
|
2
@types/packages/runtime-dev-tools/@types/index.d.ts
vendored
Normal file
2
@types/packages/runtime-dev-tools/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/// <reference path='../../../@types/index'/>
|
||||||
|
export * from '../../../@types/editor';
|
176
@types/packages/scene/@types/animation/public.d.ts
vendored
Normal file
176
@types/packages/scene/@types/animation/public.d.ts
vendored
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
import { EmbeddedPlayerGroup, RealCurve } from 'cc';
|
||||||
|
import { ICurveData, ICurveDumpData, IPropCustomData } from './private';
|
||||||
|
|
||||||
|
export type IAnimationType = 'cc.Animation' | 'cc.SkeletalAnimation' | 'cc.animation.AnimationController';
|
||||||
|
|
||||||
|
export interface IKeyDumpData {
|
||||||
|
frame: number;
|
||||||
|
dump: any; // value的dump数据
|
||||||
|
inTangent?: number;
|
||||||
|
inTangentWeight?: number;
|
||||||
|
outTangent?: number;
|
||||||
|
outTangentWeight?: number;
|
||||||
|
interpMode?: number;
|
||||||
|
broken?: boolean;
|
||||||
|
tangentWeightMode?: number;
|
||||||
|
imgUrl?: string;
|
||||||
|
easingMethod?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IDumpType {
|
||||||
|
value: string;
|
||||||
|
extends?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IClipInfo {
|
||||||
|
name: string;
|
||||||
|
uuid: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 动画相关操作的返回值结果
|
||||||
|
export interface IAniResultBase {
|
||||||
|
state: 'success' | 'failure';
|
||||||
|
result: any | null;
|
||||||
|
reason?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAniEditInfo extends IAniResultBase {
|
||||||
|
result: null | {
|
||||||
|
root: string;
|
||||||
|
node?: any;
|
||||||
|
aniComp?: IAnimationType;
|
||||||
|
clipsMenu?: IClipInfo[];
|
||||||
|
defaultClip?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimationEditData {
|
||||||
|
root: string;
|
||||||
|
curEditClip: AnimationClip | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPropCurveDumpData {
|
||||||
|
nodePath: string;
|
||||||
|
// 原始的 keyframe 数据
|
||||||
|
keyframes: IKeyDumpData[];
|
||||||
|
displayName: string;
|
||||||
|
key: string;
|
||||||
|
type?: IDumpType;
|
||||||
|
preExtrap: number;
|
||||||
|
postExtrap: number;
|
||||||
|
isCurveSupport: boolean; // 是否支持贝塞尔曲线编辑
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyKeySrcInfo {
|
||||||
|
curvesDump: IPropCurveDumpData[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyNodeSrcInfo {
|
||||||
|
curvesDump: IPropCurveDumpData[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyAuxSrc {
|
||||||
|
name: string;
|
||||||
|
frame: number;
|
||||||
|
data: IPropCustomData;
|
||||||
|
}
|
||||||
|
export interface IAnimCopyAuxDest {
|
||||||
|
name: string;
|
||||||
|
frame: number;
|
||||||
|
data: IPropCustomData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyNodeDstInfo {
|
||||||
|
nodePath: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IEventDump {
|
||||||
|
frame: number;
|
||||||
|
func: string;
|
||||||
|
params: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IEventDump {
|
||||||
|
frame: number;
|
||||||
|
func: string;
|
||||||
|
params: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPlayableInfo {
|
||||||
|
type: 'animation-clip' | 'particle-system';
|
||||||
|
clip?: string;
|
||||||
|
path?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IEmbeddedPlayers {
|
||||||
|
begin: number;
|
||||||
|
end: number;
|
||||||
|
reconciledSpeed: boolean;
|
||||||
|
playable?: IPlayableInfo;
|
||||||
|
group: string;
|
||||||
|
displayName?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AnimationClipPlayerInfo extends IPlayableInfo {
|
||||||
|
clip: string;
|
||||||
|
path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ParticleSystemPlayerInfo extends IPlayableInfo {
|
||||||
|
path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AuxiliaryCurveListItem {
|
||||||
|
name: string;
|
||||||
|
curve: ICurveDumpData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EditorAnimationClipDump {
|
||||||
|
name: string;
|
||||||
|
duration: number;
|
||||||
|
sample: number;
|
||||||
|
speed: number;
|
||||||
|
wrapMode: number;
|
||||||
|
|
||||||
|
curves: ICurveDumpData[];
|
||||||
|
events: IEventDump[];
|
||||||
|
embeddedPlayers: IEmbeddedPlayers[];
|
||||||
|
time: number;
|
||||||
|
isLock: boolean;
|
||||||
|
embeddedPlayerGroups: EmbeddedPlayerGroup[];
|
||||||
|
|
||||||
|
auxiliaryCurves: Record<string, IPropCurveDumpData>;
|
||||||
|
|
||||||
|
isSkeleton: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EditorEmbeddedPlayer extends IEmbeddedPlayers {
|
||||||
|
_embeddedPlayer: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyEmbeddedPlayersSrcInfo {
|
||||||
|
embeddedPlayersDump: IEmbeddedPlayers[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyEventSrcInfo {
|
||||||
|
eventsDump: IEventDump[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyPropSrcInfo {
|
||||||
|
curvesDump: IPropCurveDumpData[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyPropDstInfo {
|
||||||
|
nodePath: string;
|
||||||
|
propKeys?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyKeyDstInfo {
|
||||||
|
nodePath: string;
|
||||||
|
propKeys?: string[];
|
||||||
|
startFrame: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAnimCopyEventDstInfo {
|
||||||
|
startFrame: number;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user