@galacean/engine-loader 0.0.0-experimental-double11.13 → 0.0.0-experimental-shaderlab.0
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 +224 -160
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +224 -160
- package/dist/module.js +225 -161
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
- package/types/Texture2DLoader.d.ts +9 -1
- package/types/gltf/parser/GLTFJSONParser.d.ts +7 -0
- package/types/gltf/parser/GLTFParserContext.d.ts +1 -0
- package/types/gltf/parser/GLTFSceneParser.d.ts +0 -1
- package/types/index.d.ts +1 -1
- package/types/ktx2/KTX2Loader.d.ts +12 -2
- package/types/resource-deserialize/resources/parser/ReflectionParser.d.ts +1 -1
- package/types/resource-deserialize/resources/schema/BasicSchema.d.ts +2 -0
- package/types/resource-deserialize/resources/schema/MaterialSchema.d.ts +1 -1
- package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +3 -1
- package/types/resource-deserialize/utils/BufferReader.d.ts +1 -1
- package/types/gltf/extensions/OASIS_materials_remap.d.ts +0 -1
- package/types/resource-deserialize/resources/animationClip/type.d.ts +0 -30
- package/types/resource-deserialize/resources/animatorController/AnimatorControllerDecoder.d.ts +0 -6
- package/types/resource-deserialize/resources/animatorController/type.d.ts +0 -0
- /package/types/gltf/extensions/{OASIS_animation.d.ts → KHR_materials_anisotropy.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-loader",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-shaderlab.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-core": "0.0.0-experimental-
|
|
19
|
-
"@galacean/engine-
|
|
20
|
-
"@galacean/engine-
|
|
21
|
-
"@galacean/engine-
|
|
18
|
+
"@galacean/engine-core": "0.0.0-experimental-shaderlab.0",
|
|
19
|
+
"@galacean/engine-rhi-webgl": "0.0.0-experimental-shaderlab.0",
|
|
20
|
+
"@galacean/engine-draco": "0.0.0-experimental-shaderlab.0",
|
|
21
|
+
"@galacean/engine-math": "0.0.0-experimental-shaderlab.0"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextureFormat } from "@galacean/engine-core";
|
|
1
|
+
import { TextureFilterMode, TextureFormat, TextureWrapMode } from "@galacean/engine-core";
|
|
2
2
|
/**
|
|
3
3
|
* Texture2D loader params interface.
|
|
4
4
|
*/
|
|
@@ -7,4 +7,12 @@ export interface Texture2DParams {
|
|
|
7
7
|
format: TextureFormat;
|
|
8
8
|
/** Whether to use multi-level texture, default is true. */
|
|
9
9
|
mipmap: boolean;
|
|
10
|
+
/** Wrapping mode for texture coordinate S. */
|
|
11
|
+
wrapModeU: TextureWrapMode;
|
|
12
|
+
/** Wrapping mode for texture coordinate T. */
|
|
13
|
+
wrapModeV: TextureWrapMode;
|
|
14
|
+
/** Filter mode for texture. */
|
|
15
|
+
filterMode: TextureFilterMode;
|
|
16
|
+
/** Anisotropic level for texture. */
|
|
17
|
+
anisoLevel: number;
|
|
10
18
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IGLTF } from "../GLTFSchema";
|
|
2
|
+
import { GLTFParser } from "./GLTFParser";
|
|
3
|
+
import { GLTFParserContext } from "./GLTFParserContext";
|
|
4
|
+
export declare class GLTFJSONParser extends GLTFParser {
|
|
5
|
+
parse(context: GLTFParserContext): Promise<IGLTF>;
|
|
6
|
+
private _isGLB;
|
|
7
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -22,6 +22,6 @@ export * from "./SceneLoader";
|
|
|
22
22
|
export type { Texture2DParams } from "./Texture2DLoader";
|
|
23
23
|
export { parseSingleKTX } from "./compressed-texture";
|
|
24
24
|
export * from "./gltf";
|
|
25
|
-
export { KTX2Loader } from "./ktx2/KTX2Loader";
|
|
25
|
+
export { KTX2Loader, KTX2Transcoder } from "./ktx2/KTX2Loader";
|
|
26
26
|
export { KTX2TargetFormat } from "./ktx2/KTX2TargetFormat";
|
|
27
27
|
export * from "./resource-deserialize";
|
|
@@ -25,22 +25,29 @@ export declare class KTX2Loader extends Loader<Texture2D | TextureCube> {
|
|
|
25
25
|
private static _getBinomialLLCTranscoder;
|
|
26
26
|
private static _getKhronosTranscoder;
|
|
27
27
|
private static _getEngineTextureFormat;
|
|
28
|
-
initialize(
|
|
28
|
+
initialize(_: Engine, configuration: EngineConfiguration): Promise<void>;
|
|
29
29
|
/**
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
32
|
load(item: LoadItem & {
|
|
33
33
|
params?: KTX2Params;
|
|
34
34
|
}, resourceManager: ResourceManager): AssetPromise<Texture2D | TextureCube>;
|
|
35
|
-
private _isKhronosSupported;
|
|
36
35
|
}
|
|
37
36
|
/**
|
|
38
37
|
* KTX2 loader params interface.
|
|
39
38
|
*/
|
|
40
39
|
export interface KTX2Params {
|
|
41
40
|
/** Priority transcoding format queue which is preferred options, default is BC7/ASTC/BC3_BC1/ETC/PVRTC/R8G8B8A8. */
|
|
41
|
+
/** @deprecated */
|
|
42
42
|
priorityFormats: KTX2TargetFormat[];
|
|
43
43
|
}
|
|
44
|
+
/** Used for initialize KTX2 transcoder. */
|
|
45
|
+
export declare enum KTX2Transcoder {
|
|
46
|
+
/** BinomialLLC transcoder. */
|
|
47
|
+
BinomialLLC = 0,
|
|
48
|
+
/** Khronos transcoder. */
|
|
49
|
+
Khronos = 1
|
|
50
|
+
}
|
|
44
51
|
declare module "@galacean/engine-core" {
|
|
45
52
|
interface EngineConfiguration {
|
|
46
53
|
/** KTX2 loader options. */
|
|
@@ -48,7 +55,10 @@ declare module "@galacean/engine-core" {
|
|
|
48
55
|
/** Worker count for transcoder, default is 4. */
|
|
49
56
|
workerCount?: number;
|
|
50
57
|
/** Global transcoding format queue which will be used if not specified in per-instance param, default is BC7/ASTC/BC3_BC1/ETC/PVRTC/R8G8B8A8. */
|
|
58
|
+
/** @deprecated */
|
|
51
59
|
priorityFormats?: KTX2TargetFormat[];
|
|
60
|
+
/** Used for initialize KTX2 transcoder, default is BinomialLLC. */
|
|
61
|
+
transcoder?: KTX2Transcoder;
|
|
52
62
|
};
|
|
53
63
|
}
|
|
54
64
|
}
|
|
@@ -10,7 +10,7 @@ export declare class ReflectionParser {
|
|
|
10
10
|
parseClassObject(item: IClassObject): Promise<any>;
|
|
11
11
|
parsePropsAndMethods(instance: any, item: Omit<IClassObject, "class">): Promise<any>;
|
|
12
12
|
parseMethod(instance: any, methodName: string, methodParams: Array<IBasicType>): Promise<any>;
|
|
13
|
-
parseBasicType(value: IBasicType): Promise<any>;
|
|
13
|
+
parseBasicType(value: IBasicType, originValue?: any): Promise<any>;
|
|
14
14
|
private _getEntityByConfig;
|
|
15
15
|
private static _isClass;
|
|
16
16
|
private static _isAssetRef;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Layer } from "@galacean/engine-core";
|
|
1
2
|
export interface IVector3 {
|
|
2
3
|
x: number;
|
|
3
4
|
y: number;
|
|
@@ -33,6 +34,7 @@ export interface IBasicEntity {
|
|
|
33
34
|
scale?: IVector3;
|
|
34
35
|
children?: Array<string>;
|
|
35
36
|
parent?: string;
|
|
37
|
+
layer?: Layer;
|
|
36
38
|
}
|
|
37
39
|
export type IEntity = IBasicEntity | IRefEntity;
|
|
38
40
|
export interface IRefEntity extends IBasicEntity {
|
|
@@ -79,7 +79,7 @@ export interface IMaterialSchema {
|
|
|
79
79
|
shader: string;
|
|
80
80
|
shaderData: {
|
|
81
81
|
[key: string]: {
|
|
82
|
-
type: "Vector2" | "Vector3" | "Vector4" | "Color" | "Float" | "Texture";
|
|
82
|
+
type: "Vector2" | "Vector3" | "Vector4" | "Color" | "Float" | "Texture" | "Boolean" | "Integer";
|
|
83
83
|
value: IVector3 | IVector2 | IColor | number | IAssetRef;
|
|
84
84
|
};
|
|
85
85
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackgroundMode, DiffuseMode, ShadowCascadesMode, ShadowResolution } from "@galacean/engine-core";
|
|
2
2
|
import type { IReferable } from "@galacean/engine-core/types/asset/IReferable";
|
|
3
|
-
import type { IColor, IPrefabFile } from "./BasicSchema";
|
|
3
|
+
import type { IColor, IPrefabFile, IVector3 } from "./BasicSchema";
|
|
4
4
|
export declare enum SpecularMode {
|
|
5
5
|
Sky = "Sky",
|
|
6
6
|
Custom = "Custom"
|
|
@@ -30,6 +30,8 @@ export interface IScene extends IPrefabFile {
|
|
|
30
30
|
shadowResolution: ShadowResolution;
|
|
31
31
|
shadowDistance: number;
|
|
32
32
|
shadowCascades: ShadowCascadesMode;
|
|
33
|
+
shadowTwoCascadeSplits: number;
|
|
34
|
+
shadowFourCascadeSplits: IVector3;
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
37
|
files: Array<{
|
|
@@ -2,7 +2,7 @@ export declare class BufferReader {
|
|
|
2
2
|
data: Uint8Array;
|
|
3
3
|
private _dataView;
|
|
4
4
|
private _littleEndian;
|
|
5
|
-
private
|
|
5
|
+
private _position;
|
|
6
6
|
private _baseOffset;
|
|
7
7
|
constructor(data: Uint8Array, byteOffset?: number, byteLength?: number, littleEndian?: boolean);
|
|
8
8
|
get position(): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AnimationProperty, InterpolableValueType } from "@oasis-engine/core";
|
|
2
|
-
export declare enum ComponentClass {
|
|
3
|
-
Transform = 0,
|
|
4
|
-
SkinnedMeshRenderer = 1,
|
|
5
|
-
Other = 2
|
|
6
|
-
}
|
|
7
|
-
export declare const PropertyNameMap: string[];
|
|
8
|
-
export interface IAnimationClipAsset {
|
|
9
|
-
objectId: string;
|
|
10
|
-
name: string;
|
|
11
|
-
events: Array<{
|
|
12
|
-
time: number;
|
|
13
|
-
functionName: string;
|
|
14
|
-
parameter: string;
|
|
15
|
-
}>;
|
|
16
|
-
curveBindings: Array<{
|
|
17
|
-
relativePath: string;
|
|
18
|
-
property: AnimationProperty;
|
|
19
|
-
curve: {
|
|
20
|
-
interpolation: number;
|
|
21
|
-
keys: Array<{
|
|
22
|
-
time: number;
|
|
23
|
-
value: any;
|
|
24
|
-
inTangent: any;
|
|
25
|
-
outTangent: any;
|
|
26
|
-
}>;
|
|
27
|
-
valueType: InterpolableValueType;
|
|
28
|
-
};
|
|
29
|
-
}>;
|
|
30
|
-
}
|
package/types/resource-deserialize/resources/animatorController/AnimatorControllerDecoder.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Engine, AnimatorController, AnimationClip } from "@oasis-engine/core";
|
|
2
|
-
import type { BufferReader } from "../../utils/BufferReader";
|
|
3
|
-
export declare class AnimatorControllerDecoder {
|
|
4
|
-
static decode(engine: Engine, bufferReader: BufferReader): Promise<AnimatorController>;
|
|
5
|
-
static loadAndSetClip(engine: Engine, path: string, objectId: string): Promise<AnimationClip>;
|
|
6
|
-
}
|
|
File without changes
|
|
File without changes
|