@galacean/engine-loader 1.3.0-alpha.0 → 1.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +23 -0
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +23 -0
- package/dist/module.js +23 -0
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +17 -1
- package/types/gltf/GLTFParser.d.ts +0 -9
- package/types/gltf/GLTFPipeline.d.ts +0 -23
- package/types/gltf/GLTFUtil.d.ts +0 -53
- package/types/gltf/Schema.d.ts +0 -814
- package/types/gltf/extensions/ExtensionParser.d.ts +0 -8
- package/types/gltf/extensions/KHR_draco_mesh_compression.d.ts +0 -1
- package/types/gltf/extensions/Schema.d.ts +0 -142
- package/types/gltf/parser/AnimationParser.d.ts +0 -7
- package/types/gltf/parser/BufferParser.d.ts +0 -7
- package/types/gltf/parser/EntityParser.d.ts +0 -9
- package/types/gltf/parser/MaterialParser.d.ts +0 -8
- package/types/gltf/parser/MeshParser.d.ts +0 -13
- package/types/gltf/parser/Parser.d.ts +0 -21
- package/types/gltf/parser/ParserContext.d.ts +0 -46
- package/types/gltf/parser/SceneParser.d.ts +0 -11
- package/types/gltf/parser/SkinParser.d.ts +0 -6
- package/types/gltf/parser/TextureParser.d.ts +0 -8
- package/types/gltf/parser/Validator.d.ts +0 -5
- package/types/ktx2/BinomialLLCTranscoder/BinomialLLCTranscoder.d.ts +0 -13
- package/types/ktx2/BinomialLLCTranscoder/TranscodeWorkerCode.d.ts +0 -33
- package/types/ktx2/KhronosTranscoder/KhronosTranscoder.d.ts +0 -17
- package/types/ktx2/KhronosTranscoder/TranscoderWorkerCode.d.ts +0 -34
- package/types/ktx2/TranscodeResult.d.ts +0 -10
- package/types/ktx2/constants.d.ts +0 -7
- package/types/ktx2/zstddec.d.ts +0 -62
- package/types/resource-deserialize/resources/animationClip/ComponentMap.d.ts +0 -2
- package/types/resource-deserialize/resources/parser/PrefabParser.d.ts +0 -5
- package/types/resource-deserialize/resources/prefab/PrefabDesign.d.ts +0 -70
- package/types/resource-deserialize/resources/prefab/PrefabParser.d.ts +0 -14
- package/types/resource-deserialize/resources/prefab/PrefabParserContext.d.ts +0 -5
- package/types/resource-deserialize/resources/prefab/ReflectionParser.d.ts +0 -14
- package/types/resource-deserialize/resources/scene/SceneParserContext.d.ts +0 -9
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { EngineObject } from "@galacean/engine-core";
|
|
2
|
-
import { ParserContext } from "../parser/ParserContext";
|
|
3
|
-
import { ExtensionSchema } from "./Schema";
|
|
4
|
-
export declare abstract class ExtensionParser {
|
|
5
|
-
initialize(): void;
|
|
6
|
-
parseEngineResource(schema: ExtensionSchema, parseResource: EngineObject, context: ParserContext, ...extra: any[]): void | Promise<void>;
|
|
7
|
-
createEngineResource(schema: ExtensionSchema, context: ParserContext, ...extra: any[]): EngineObject | Promise<EngineObject>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { IMaterialNormalTextureInfo, ITextureInfo } from "../Schema";
|
|
2
|
-
/**
|
|
3
|
-
* Interfaces from the KHR_lights_punctual extension
|
|
4
|
-
*/
|
|
5
|
-
export interface IKHRLightsPunctual_LightNode {
|
|
6
|
-
light: number;
|
|
7
|
-
}
|
|
8
|
-
export interface IKHRLightsPunctual_Light {
|
|
9
|
-
type: "directional" | "point" | "spot";
|
|
10
|
-
color?: number[];
|
|
11
|
-
intensity?: number;
|
|
12
|
-
range?: number;
|
|
13
|
-
spot?: {
|
|
14
|
-
innerConeAngle?: number;
|
|
15
|
-
outerConeAngle?: number;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface IKHRLightsPunctual {
|
|
19
|
-
lights: IKHRLightsPunctual_Light[];
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Interfaces from the KHR_draco_mesh_compression extension
|
|
23
|
-
*/
|
|
24
|
-
export interface IKHRDracoMeshCompression {
|
|
25
|
-
bufferView: number;
|
|
26
|
-
attributes: {
|
|
27
|
-
[name: string]: number;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Interfaces from the KHR_materials_clearcoat extension
|
|
32
|
-
*/
|
|
33
|
-
export interface IKHRMaterialsClearcoat {
|
|
34
|
-
clearcoatFactor: number;
|
|
35
|
-
clearcoatTexture: ITextureInfo;
|
|
36
|
-
clearcoatRoughnessFactor: number;
|
|
37
|
-
clearcoatRoughnessTexture: ITextureInfo;
|
|
38
|
-
clearcoatNormalTexture: IMaterialNormalTextureInfo;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Interfaces from the KHR_materials_ior extension
|
|
42
|
-
*/
|
|
43
|
-
export interface IKHRMaterialsIor {
|
|
44
|
-
ior: number;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Interfaces from the KHR_materials_unlit extension
|
|
48
|
-
*/
|
|
49
|
-
export interface IKHRMaterialsUnlit {
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Interfaces from the KHR_materials_pbrSpecularGlossiness extension
|
|
53
|
-
*/
|
|
54
|
-
export interface IKHRMaterialsPbrSpecularGlossiness {
|
|
55
|
-
diffuseFactor: number[];
|
|
56
|
-
diffuseTexture: ITextureInfo;
|
|
57
|
-
specularFactor: number[];
|
|
58
|
-
glossinessFactor: number;
|
|
59
|
-
specularGlossinessTexture: ITextureInfo;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Interfaces from the KHR_materials_sheen extension
|
|
63
|
-
*/
|
|
64
|
-
export interface IKHRMaterialsSheen {
|
|
65
|
-
sheenColorFactor?: number[];
|
|
66
|
-
sheenColorTexture?: ITextureInfo;
|
|
67
|
-
sheenRoughnessFactor?: number;
|
|
68
|
-
sheenRoughnessTexture?: ITextureInfo;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Interfaces from the KHR_materials_specular extension
|
|
72
|
-
*/
|
|
73
|
-
export interface IKHRMaterialsSpecular {
|
|
74
|
-
specularFactor: number;
|
|
75
|
-
specularColorFactor: number[];
|
|
76
|
-
specularTexture: ITextureInfo;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Interfaces from the KHR_materials_transmission extension
|
|
80
|
-
*/
|
|
81
|
-
export interface IKHRMaterialsTransmission {
|
|
82
|
-
transmissionFactor?: number;
|
|
83
|
-
transmissionTexture?: ITextureInfo;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Interfaces from the KHR_materials_translucency extension
|
|
87
|
-
*/
|
|
88
|
-
export interface IKHRMaterialsTranslucency {
|
|
89
|
-
translucencyFactor?: number;
|
|
90
|
-
translucencyTexture?: ITextureInfo;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Interfaces from the KHR_materials_variants extension
|
|
94
|
-
*/
|
|
95
|
-
export interface IKHRMaterialVariants_Mapping {
|
|
96
|
-
mappings: Array<{
|
|
97
|
-
variants: number[];
|
|
98
|
-
material: number;
|
|
99
|
-
}>;
|
|
100
|
-
extensions?: any;
|
|
101
|
-
extras?: any;
|
|
102
|
-
}
|
|
103
|
-
export interface IKHRMaterialVariants_Variant {
|
|
104
|
-
name: string;
|
|
105
|
-
extensions?: any;
|
|
106
|
-
extras?: any;
|
|
107
|
-
}
|
|
108
|
-
export interface IKHRMaterialVariants_Variants {
|
|
109
|
-
variants: Array<IKHRMaterialVariants_Variant>;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Interfaces from the KHR_texture_basisu extension
|
|
113
|
-
*/
|
|
114
|
-
export interface IKHRTextureBasisU {
|
|
115
|
-
source: number;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Interfaces from the KHR_texture_transform extension
|
|
119
|
-
*/
|
|
120
|
-
export interface IKHRTextureTransform {
|
|
121
|
-
offset?: number[];
|
|
122
|
-
rotation?: number;
|
|
123
|
-
scale?: number[];
|
|
124
|
-
texCoord?: number;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Interfaces from the KHR_xmp extension
|
|
128
|
-
*/
|
|
129
|
-
export interface IKHRXmp {
|
|
130
|
-
packets: Array<{
|
|
131
|
-
[key: string]: unknown;
|
|
132
|
-
}>;
|
|
133
|
-
}
|
|
134
|
-
export interface IKHRXmp_Node {
|
|
135
|
-
packet: number;
|
|
136
|
-
}
|
|
137
|
-
export interface IGalaceanMaterialRemap {
|
|
138
|
-
refId: string;
|
|
139
|
-
key?: string;
|
|
140
|
-
isClone?: boolean;
|
|
141
|
-
}
|
|
142
|
-
export type ExtensionSchema = IKHRLightsPunctual_Light | IKHRDracoMeshCompression | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AnimationClip, AssetPromise } from "@galacean/engine-core";
|
|
2
|
-
import { Parser } from "./Parser";
|
|
3
|
-
import { ParserContext } from "./ParserContext";
|
|
4
|
-
export declare class AnimationParser extends Parser {
|
|
5
|
-
parse(context: ParserContext): AssetPromise<AnimationClip[]>;
|
|
6
|
-
private _addCurve;
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AssetPromise } from "@galacean/engine-core";
|
|
2
|
-
import { Parser } from "./Parser";
|
|
3
|
-
import { ParserContext } from "./ParserContext";
|
|
4
|
-
export declare class BufferParser extends Parser {
|
|
5
|
-
parse(context: ParserContext): AssetPromise<void>;
|
|
6
|
-
private _isGLB;
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Parser } from "./Parser";
|
|
2
|
-
import { ParserContext } from "./ParserContext";
|
|
3
|
-
export declare class EntityParser extends Parser {
|
|
4
|
-
/** @internal */
|
|
5
|
-
static _defaultName: String;
|
|
6
|
-
parse(context: ParserContext): void;
|
|
7
|
-
private _buildEntityTree;
|
|
8
|
-
private _createSceneRoots;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Material } from "@galacean/engine-core";
|
|
2
|
-
import { Parser } from "./Parser";
|
|
3
|
-
import { ParserContext } from "./ParserContext";
|
|
4
|
-
export declare class MaterialParser extends Parser {
|
|
5
|
-
/** @internal */
|
|
6
|
-
static _parseTextureTransform(material: Material, extensions: any, context: ParserContext): void;
|
|
7
|
-
parse(context: ParserContext): AssetPromise<Material[]>;
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, ModelMesh } from "@galacean/engine-core";
|
|
2
|
-
import { Parser } from "./Parser";
|
|
3
|
-
import { ParserContext } from "./ParserContext";
|
|
4
|
-
export declare class MeshParser extends Parser {
|
|
5
|
-
private static _tempVector3;
|
|
6
|
-
parse(context: ParserContext): AssetPromise<ModelMesh[][]>;
|
|
7
|
-
private _parseMeshFromGLTFPrimitive;
|
|
8
|
-
private _createBlendShape;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
*/
|
|
12
|
-
private _parseMeshFromGLTFPrimitiveDraco;
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AnimationClip, AssetPromise, EngineObject, Material, Mesh } from "@galacean/engine-core";
|
|
2
|
-
import { ExtensionParser } from "../extensions/ExtensionParser";
|
|
3
|
-
import { ExtensionSchema } from "../extensions/Schema";
|
|
4
|
-
import { ParserContext } from "./ParserContext";
|
|
5
|
-
export declare abstract class Parser {
|
|
6
|
-
private static _extensionParsers;
|
|
7
|
-
static parseEngineResource(extensionName: string, extensionSchema: ExtensionSchema, parseResource: EngineObject, context: ParserContext, ...extra: any[]): void;
|
|
8
|
-
static createEngineResource<T extends EngineObject>(extensionName: string, extensionSchema: ExtensionSchema, context: ParserContext, ...extra: any[]): T | Promise<T>;
|
|
9
|
-
static hasExtensionParser(extensionName: string): boolean;
|
|
10
|
-
static initialize(extensionName: string): void;
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
static _addExtensionParser(extensionName: string, extensionParser: ExtensionParser): void;
|
|
15
|
-
abstract parse(context: ParserContext): AssetPromise<any> | void | Material | AnimationClip | Mesh;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Declare ExtensionParser's decorator.
|
|
19
|
-
* @param extensionName - Extension name
|
|
20
|
-
*/
|
|
21
|
-
export declare function registerExtension(extensionName: string): (parser: new () => ExtensionParser) => void;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { AnimationClip, AssetPromise, Buffer, Entity, Material, ModelMesh, Texture2D, TypedArray } from "@galacean/engine-core";
|
|
2
|
-
import { GLTFResource } from "../GLTFResource";
|
|
3
|
-
import { IGLTF } from "../Schema";
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export declare class ParserContext {
|
|
8
|
-
gltf: IGLTF;
|
|
9
|
-
buffers: ArrayBuffer[];
|
|
10
|
-
glTFResource: GLTFResource;
|
|
11
|
-
keepMeshData: boolean;
|
|
12
|
-
hasSkinned: boolean;
|
|
13
|
-
/** chain asset promise */
|
|
14
|
-
chainPromises: AssetPromise<any>[];
|
|
15
|
-
accessorBufferCache: Record<string, BufferInfo>;
|
|
16
|
-
texturesPromiseInfo: PromiseInfo<Texture2D[]>;
|
|
17
|
-
materialsPromiseInfo: PromiseInfo<Material[]>;
|
|
18
|
-
meshesPromiseInfo: PromiseInfo<ModelMesh[][]>;
|
|
19
|
-
animationClipsPromiseInfo: PromiseInfo<AnimationClip[]>;
|
|
20
|
-
defaultSceneRootPromiseInfo: PromiseInfo<Entity>;
|
|
21
|
-
masterPromiseInfo: PromiseInfo<GLTFResource>;
|
|
22
|
-
promiseMap: Record<string, AssetPromise<any>>;
|
|
23
|
-
constructor(url: string);
|
|
24
|
-
private _initPromiseInfo;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
export declare class BufferInfo {
|
|
30
|
-
data: TypedArray;
|
|
31
|
-
interleaved: boolean;
|
|
32
|
-
stride: number;
|
|
33
|
-
vertexBuffer: Buffer;
|
|
34
|
-
vertexBindingInfos: Record<number, number>;
|
|
35
|
-
constructor(data: TypedArray, interleaved: boolean, stride: number);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
export declare class PromiseInfo<T> {
|
|
41
|
-
promise: AssetPromise<T>;
|
|
42
|
-
resolve: (value?: T | PromiseLike<T>) => void;
|
|
43
|
-
reject: (reason?: any) => void;
|
|
44
|
-
setProgress: (progress: number) => void;
|
|
45
|
-
onCancel: (callback: () => void) => void;
|
|
46
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Entity } from "@galacean/engine-core";
|
|
2
|
-
import { Parser } from "./Parser";
|
|
3
|
-
import { ParserContext } from "./ParserContext";
|
|
4
|
-
export declare class SceneParser extends Parser {
|
|
5
|
-
private static _defaultMaterial;
|
|
6
|
-
private static _getDefaultMaterial;
|
|
7
|
-
parse(context: ParserContext): AssetPromise<Entity>;
|
|
8
|
-
private _createCamera;
|
|
9
|
-
private _createRenderer;
|
|
10
|
-
private _createAnimator;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AssetPromise, Texture2D } from "@galacean/engine-core";
|
|
2
|
-
import { Parser } from "./Parser";
|
|
3
|
-
import { ParserContext } from "./ParserContext";
|
|
4
|
-
export declare class TextureParser extends Parser {
|
|
5
|
-
private static _wrapMap;
|
|
6
|
-
parse(context: ParserContext): AssetPromise<Texture2D[]>;
|
|
7
|
-
private _parseSampler;
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { KTX2TargetFormat } from "../KTX2TargetFormat";
|
|
2
|
-
import { TranscodeResult } from "../TranscodeResult";
|
|
3
|
-
/** @internal */
|
|
4
|
-
export declare class BinomialLLCTranscoder {
|
|
5
|
-
readonly workerLimit: number;
|
|
6
|
-
static MessageId: number;
|
|
7
|
-
private _transcodeWorkerPool;
|
|
8
|
-
private _initPromise;
|
|
9
|
-
constructor(workerLimit: number);
|
|
10
|
-
init(): Promise<any>;
|
|
11
|
-
transcode(buffer: ArrayBuffer, format: KTX2TargetFormat): Promise<TranscodeResult>;
|
|
12
|
-
destroy(): void;
|
|
13
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
type MessageType = "init" | "transcode";
|
|
2
|
-
export interface IBaseMessage {
|
|
3
|
-
type: MessageType;
|
|
4
|
-
}
|
|
5
|
-
export interface IInitMessage extends IBaseMessage {
|
|
6
|
-
type: "init";
|
|
7
|
-
transcoderWasm: ArrayBuffer;
|
|
8
|
-
}
|
|
9
|
-
export interface ITranscodeMessage extends IBaseMessage {
|
|
10
|
-
type: "transcode";
|
|
11
|
-
format: number;
|
|
12
|
-
buffer: ArrayBuffer;
|
|
13
|
-
}
|
|
14
|
-
export type IMessage = IInitMessage | ITranscodeMessage;
|
|
15
|
-
export type TranscodeResult = {
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
hasAlpha: boolean;
|
|
19
|
-
format: number;
|
|
20
|
-
faces: Array<{
|
|
21
|
-
data: Uint8Array;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
}>[];
|
|
25
|
-
faceCount: number;
|
|
26
|
-
};
|
|
27
|
-
export type TranscodeResponse = {
|
|
28
|
-
id: number;
|
|
29
|
-
type: "transcoded";
|
|
30
|
-
} & TranscodeResult;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare function TranscodeWorkerCode(): void;
|
|
33
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { KTX2Container } from "../KTX2Container";
|
|
2
|
-
import { KTX2TargetFormat } from "../KTX2TargetFormat";
|
|
3
|
-
import { TranscodeResult } from "./TranscoderWorkerCode";
|
|
4
|
-
/** @internal */
|
|
5
|
-
export declare class KhronosTranscoder {
|
|
6
|
-
readonly workerLimit: number;
|
|
7
|
-
readonly type: KTX2TargetFormat;
|
|
8
|
-
static transcoderMap: {
|
|
9
|
-
0: string;
|
|
10
|
-
};
|
|
11
|
-
private _transcodeWorkerPool;
|
|
12
|
-
private _initPromise;
|
|
13
|
-
constructor(workerLimit: number, type: KTX2TargetFormat);
|
|
14
|
-
init(): Promise<any>;
|
|
15
|
-
transcode(ktx2Container: KTX2Container): Promise<TranscodeResult>;
|
|
16
|
-
destroy(): void;
|
|
17
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface EncodedData {
|
|
2
|
-
buffer: Uint8Array;
|
|
3
|
-
levelWidth: number;
|
|
4
|
-
levelHeight: number;
|
|
5
|
-
uncompressedByteLength: number;
|
|
6
|
-
}
|
|
7
|
-
type MessageType = "init" | "transcode";
|
|
8
|
-
export interface IBaseMessage {
|
|
9
|
-
type: MessageType;
|
|
10
|
-
}
|
|
11
|
-
export interface IInitMessage extends IBaseMessage {
|
|
12
|
-
type: "init";
|
|
13
|
-
transcoderWasm: ArrayBuffer;
|
|
14
|
-
}
|
|
15
|
-
export interface ITranscodeMessage extends IBaseMessage {
|
|
16
|
-
type: "transcode";
|
|
17
|
-
format: number;
|
|
18
|
-
needZstd: boolean;
|
|
19
|
-
data: EncodedData[][];
|
|
20
|
-
}
|
|
21
|
-
export type IMessage = IInitMessage | ITranscodeMessage;
|
|
22
|
-
export type TranscodeResult = {
|
|
23
|
-
data: Array<{
|
|
24
|
-
data: Uint8Array;
|
|
25
|
-
width: number;
|
|
26
|
-
height: number;
|
|
27
|
-
}>;
|
|
28
|
-
};
|
|
29
|
-
export type TranscodeResponse = {
|
|
30
|
-
id: number;
|
|
31
|
-
type: "transcoded";
|
|
32
|
-
} & TranscodeResult;
|
|
33
|
-
export declare function TranscodeWorkerCode(): void;
|
|
34
|
-
export {};
|
package/types/ktx2/zstddec.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* From https://github.com/donmccurdy/zstddec by Don McCurdy
|
|
3
|
-
*/
|
|
4
|
-
interface DecoderExports {
|
|
5
|
-
memory: Uint8Array;
|
|
6
|
-
ZSTD_findDecompressedSize: (compressedPtr: number, compressedSize: number) => number;
|
|
7
|
-
ZSTD_decompress: (uncompressedPtr: number, uncompressedSize: number, compressedPtr: number, compressedSize: number) => number;
|
|
8
|
-
malloc: (ptr: number) => number;
|
|
9
|
-
free: (ptr: number) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* ZSTD (Zstandard) decoder.
|
|
13
|
-
*/
|
|
14
|
-
export declare class ZSTDDecoder {
|
|
15
|
-
static heap: Uint8Array;
|
|
16
|
-
static IMPORT_OBJECT: {
|
|
17
|
-
env: {
|
|
18
|
-
emscripten_notify_memory_growth: () => void;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
static instance: {
|
|
22
|
-
exports: DecoderExports;
|
|
23
|
-
};
|
|
24
|
-
static WasmModuleURL: string;
|
|
25
|
-
_initPromise: Promise<any>;
|
|
26
|
-
init(): Promise<void>;
|
|
27
|
-
_init(result: WebAssembly.WebAssemblyInstantiatedSource): void;
|
|
28
|
-
decode(array: Uint8Array, uncompressedSize?: number): Uint8Array;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
31
|
-
/**
|
|
32
|
-
* BSD License
|
|
33
|
-
*
|
|
34
|
-
* For Zstandard software
|
|
35
|
-
*
|
|
36
|
-
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc. All rights reserved.
|
|
37
|
-
*
|
|
38
|
-
* Redistribution and use in source and binary forms, with or without modification,
|
|
39
|
-
* are permitted provided that the following conditions are met:
|
|
40
|
-
*
|
|
41
|
-
* * Redistributions of source code must retain the above copyright notice, this
|
|
42
|
-
* list of conditions and the following disclaimer.
|
|
43
|
-
*
|
|
44
|
-
* * Redistributions in binary form must reproduce the above copyright notice,
|
|
45
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
46
|
-
* and/or other materials provided with the distribution.
|
|
47
|
-
*
|
|
48
|
-
* * Neither the name Facebook nor the names of its contributors may be used to
|
|
49
|
-
* endorse or promote products derived from this software without specific
|
|
50
|
-
* prior written permission.
|
|
51
|
-
*
|
|
52
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
53
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
54
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
55
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
56
|
-
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
57
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
58
|
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
59
|
-
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
60
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
61
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
62
|
-
*/
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { BackgroundMode } from "@galacean/engine-core";
|
|
2
|
-
import { IRefObject } from "@galacean/engine-core/types/asset/IRefObject";
|
|
3
|
-
import { IColor } from "../mesh/IModelMesh";
|
|
4
|
-
export interface IPrefabFile {
|
|
5
|
-
entities: Array<IEntity>;
|
|
6
|
-
}
|
|
7
|
-
export interface IScene extends IPrefabFile {
|
|
8
|
-
scene: {
|
|
9
|
-
background: {
|
|
10
|
-
mode: BackgroundMode;
|
|
11
|
-
color: IColor;
|
|
12
|
-
texture?: IRefObject;
|
|
13
|
-
sky?: IRefObject;
|
|
14
|
-
};
|
|
15
|
-
ambient: {
|
|
16
|
-
ambientLight: IRefObject;
|
|
17
|
-
diffuseSolidColor: IColor;
|
|
18
|
-
diffuseIntensity: number;
|
|
19
|
-
specularIntensity: number;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
files: Array<{
|
|
23
|
-
id: string;
|
|
24
|
-
type: string;
|
|
25
|
-
virtualPath: string;
|
|
26
|
-
path: string;
|
|
27
|
-
}>;
|
|
28
|
-
}
|
|
29
|
-
export interface IVector3 {
|
|
30
|
-
x: number;
|
|
31
|
-
y: number;
|
|
32
|
-
z: number;
|
|
33
|
-
}
|
|
34
|
-
export interface IBasicEntity {
|
|
35
|
-
name?: string;
|
|
36
|
-
id?: string;
|
|
37
|
-
components?: Array<IComponent>;
|
|
38
|
-
isActive?: boolean;
|
|
39
|
-
position?: IVector3;
|
|
40
|
-
rotation?: IVector3;
|
|
41
|
-
scale?: IVector3;
|
|
42
|
-
children?: Array<string>;
|
|
43
|
-
parent?: string;
|
|
44
|
-
}
|
|
45
|
-
export type IEntity = IBasicEntity | IRefEntity;
|
|
46
|
-
export interface IRefEntity extends IBasicEntity {
|
|
47
|
-
assetRefId: string;
|
|
48
|
-
key?: string;
|
|
49
|
-
isClone?: boolean;
|
|
50
|
-
}
|
|
51
|
-
export type IComponent = {
|
|
52
|
-
id: string;
|
|
53
|
-
refId?: string;
|
|
54
|
-
} & IClassObject;
|
|
55
|
-
export type IMethodParams = Array<IBasicType>;
|
|
56
|
-
export type IClassObject = {
|
|
57
|
-
class: string;
|
|
58
|
-
constructParams?: IMethodParams;
|
|
59
|
-
methods?: {
|
|
60
|
-
[methodName: string]: Array<IMethodParams>;
|
|
61
|
-
};
|
|
62
|
-
props?: {
|
|
63
|
-
[key: string]: IBasicType | IMethodParams;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export type IBasicType = string | number | boolean | null | undefined | IAssetRef | IClassObject | IMethodParams;
|
|
67
|
-
export type IAssetRef = {
|
|
68
|
-
key?: string;
|
|
69
|
-
refId: string;
|
|
70
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Entity, Engine } from "@galacean/engine-core";
|
|
2
|
-
import type { IPrefabFile } from "../schema";
|
|
3
|
-
import { PrefabParserContext } from "./PrefabParserContext";
|
|
4
|
-
import HierarchyParser from "../parser/HierarchyParser";
|
|
5
|
-
export declare class PrefabParser extends HierarchyParser<Entity, PrefabParserContext> {
|
|
6
|
-
/**
|
|
7
|
-
* Parse prefab data.
|
|
8
|
-
* @param engine - the engine of the parser context
|
|
9
|
-
* @param prefabData - prefab data which is exported by editor
|
|
10
|
-
* @returns a promise of prefab
|
|
11
|
-
*/
|
|
12
|
-
static parse(engine: Engine, prefabData: IPrefabFile): PrefabParser;
|
|
13
|
-
protected handleRootEntity(id: string): void;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Engine, Entity } from "@galacean/engine-core";
|
|
2
|
-
import { IBasicType, IClassObject, IEntity } from "./PrefabDesign";
|
|
3
|
-
export declare class ReflectionParser {
|
|
4
|
-
static customParseComponentHandles: Map<string, Function>;
|
|
5
|
-
static registerCustomParseComponent(componentType: string, handle: Function): void;
|
|
6
|
-
static parseEntity(entityConfig: IEntity, engine: Engine): Promise<Entity>;
|
|
7
|
-
private static getEntityByConfig;
|
|
8
|
-
static parseClassObject(item: IClassObject, engine: Engine, resourceManager?: any): Promise<any>;
|
|
9
|
-
static parseBasicType(value: IBasicType, engine: Engine, resourceManager?: any): Promise<any>;
|
|
10
|
-
static parsePropsAndMethods(instance: any, item: Omit<IClassObject, "class">, engine: Engine, resourceManager?: any): Promise<any>;
|
|
11
|
-
static parseMethod(instance: any, methodName: string, methodParams: Array<IBasicType>, engine: Engine, resourceManager?: any): Promise<any>;
|
|
12
|
-
private static _isClass;
|
|
13
|
-
private static _isRef;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Scene } from "@galacean/engine-core";
|
|
2
|
-
import { IScene } from "../schema";
|
|
3
|
-
import { ParserContext } from "../parser/ParserContext";
|
|
4
|
-
export declare class SceneParserContext extends ParserContext<IScene, Scene> {
|
|
5
|
-
readonly originalData: IScene;
|
|
6
|
-
readonly engine: any;
|
|
7
|
-
readonly scene: Scene;
|
|
8
|
-
constructor(originalData: IScene, engine: any, scene: Scene);
|
|
9
|
-
}
|