Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 75 additions & 5 deletions src/core/assets/@types/asset-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
SpriteAtlasAssetUserData,
RtSpriteFrameAssetUserData,
} from './userDatas';
import { ASSET_HANDLER_TYPES, SUPPORT_CREATE_TYPES } from './interface';

// 支持创建的资源类型(引擎类型)
export type ISupportCreateCCType =
Expand Down Expand Up @@ -71,12 +70,83 @@ export type IAssetType =
| 'RenderStage' // 渲染阶段
| 'RenderFlow'; // 渲染流程

/** 支持创建的资源类型(从常量数组派生) */
export type ISupportCreateType = typeof SUPPORT_CREATE_TYPES[number];
/** 支持创建的资源类型 */
export type ISupportCreateType =
| 'animation-clip'
| 'typescript'
| 'auto-atlas'
| 'effect'
| 'scene'
| 'prefab'
| 'material'
| 'texture-cube'
| 'terrain'
| 'physics-material'
| 'label-atlas'
| 'render-texture'
| 'directory'
| 'effect-header';


/** 资源处理器类型(从常量数组派生) */
export type AssetHandlerType = typeof ASSET_HANDLER_TYPES[number] | 'database';
/** 资源处理器类型 */
export type AssetHandlerType =
| 'directory'
| 'unknown'
| 'text'
| 'json'
| 'spine-data'
| 'dragonbones'
| 'dragonbones-atlas'
| 'terrain'
| 'javascript'
| 'typescript'
| 'scene'
| 'prefab'
| 'sprite-frame'
| 'tiled-map'
| 'buffer'
| 'image'
| 'sign-image'
| 'alpha-image'
| 'texture'
| 'texture-cube'
| 'erp-texture-cube'
| 'render-texture'
| 'texture-cube-face'
| 'rt-sprite-frame'
| 'gltf'
| 'gltf-mesh'
| 'gltf-animation'
| 'gltf-skeleton'
| 'gltf-material'
| 'gltf-scene'
| 'gltf-embeded-image'
| 'fbx'
| 'material'
| 'physics-material'
| 'effect'
| 'effect-header'
| 'audio-clip'
| 'animation-clip'
| 'animation-graph'
| 'animation-graph-variant'
| 'animation-mask'
| 'ttf-font'
| 'bitmap-font'
| 'particle'
| 'sprite-atlas'
| 'auto-atlas'
| 'label-atlas'
| 'render-pipeline'
| 'render-stage'
| 'render-flow'
| 'instantiation-material'
| 'instantiation-mesh'
| 'instantiation-skeleton'
| 'instantiation-animation'
| 'video-clip'
| '*'
| 'database';

export interface AssetUserDataMap {
'animation-clip': AnimationClipAssetUserData;
Expand Down
19 changes: 14 additions & 5 deletions src/core/assets/@types/userDatas.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
import { NormalImportSetting, TangentImportSetting } from './interface';
export declare enum NormalImportSetting {
optional = 0,
exclude = 1,
require = 2,
recalculate = 3,
}

export declare enum TangentImportSetting {
exclude = 0,
optional = 1,
require = 2,
recalculate = 3,
}
// 这个文件用于记录导入器的各种类型定义,导出声明文件的时候将导出这个配置文件
export type ImageImportType = 'raw' | 'texture' | 'normal map' | 'sprite-frame' | 'texture cube';

Expand Down Expand Up @@ -737,7 +749,4 @@ interface IFbxSetting {
* 匹配 DCC 原始模型名称。
*/
matchMeshNames?: boolean;
}

// 重新导出其他类型定义
export * from './interface';
}