@galacean/engine-loader 1.6.7 → 1.6.8

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.
Files changed (107) hide show
  1. package/package.json +4 -4
  2. package/dist/main.js +0 -7355
  3. package/dist/main.js.map +0 -1
  4. package/dist/module.js +0 -7325
  5. package/dist/module.js.map +0 -1
  6. package/types/AnimationClipLoader.d.ts +0 -1
  7. package/types/AnimatorControllerLoader.d.ts +0 -1
  8. package/types/AudioLoader.d.ts +0 -1
  9. package/types/BufferLoader.d.ts +0 -1
  10. package/types/EnvLoader.d.ts +0 -1
  11. package/types/FontLoader.d.ts +0 -1
  12. package/types/GLTFContentRestorer.d.ts +0 -92
  13. package/types/GLTFLoader.d.ts +0 -22
  14. package/types/HDRLoader.d.ts +0 -1
  15. package/types/JSONLoader.d.ts +0 -1
  16. package/types/KTXCubeLoader.d.ts +0 -1
  17. package/types/KTXLoader.d.ts +0 -4
  18. package/types/MaterialLoader.d.ts +0 -1
  19. package/types/MeshLoader.d.ts +0 -1
  20. package/types/PhysicsMaterialLoader.d.ts +0 -1
  21. package/types/PrefabLoader.d.ts +0 -5
  22. package/types/PrimitiveMeshLoader.d.ts +0 -1
  23. package/types/ProjectLoader.d.ts +0 -1
  24. package/types/SceneLoader.d.ts +0 -1
  25. package/types/ShaderChunkLoader.d.ts +0 -9
  26. package/types/ShaderLoader.d.ts +0 -1
  27. package/types/SourceFontLoader.d.ts +0 -1
  28. package/types/SpriteAtlasLoader.d.ts +0 -1
  29. package/types/SpriteLoader.d.ts +0 -1
  30. package/types/TextLoader.d.ts +0 -1
  31. package/types/Texture2DContentRestorer.d.ts +0 -10
  32. package/types/Texture2DLoader.d.ts +0 -20
  33. package/types/TextureCubeContentRestorer.d.ts +0 -10
  34. package/types/TextureCubeLoader.d.ts +0 -1
  35. package/types/compressed-texture/KhronosTextureContainer.d.ts +0 -20
  36. package/types/compressed-texture/index.d.ts +0 -3
  37. package/types/compressed-texture/type.d.ts +0 -87
  38. package/types/gltf/GLTFResource.d.ts +0 -67
  39. package/types/gltf/GLTFSchema.d.ts +0 -822
  40. package/types/gltf/GLTFUtils.d.ts +0 -45
  41. package/types/gltf/extensions/EXT_meshopt_compression.d.ts +0 -26
  42. package/types/gltf/extensions/EXT_texture_webp.d.ts +0 -1
  43. package/types/gltf/extensions/GALACEAN_animation_event.d.ts +0 -1
  44. package/types/gltf/extensions/GALACEAN_materials_remap.d.ts +0 -1
  45. package/types/gltf/extensions/GLTFExtensionParser.d.ts +0 -46
  46. package/types/gltf/extensions/GLTFExtensionSchema.d.ts +0 -168
  47. package/types/gltf/extensions/KHR_lights_punctual.d.ts +0 -1
  48. package/types/gltf/extensions/KHR_materials_anisotropy.d.ts +0 -1
  49. package/types/gltf/extensions/KHR_materials_clearcoat.d.ts +0 -1
  50. package/types/gltf/extensions/KHR_materials_ior.d.ts +0 -1
  51. package/types/gltf/extensions/KHR_materials_iridescence.d.ts +0 -1
  52. package/types/gltf/extensions/KHR_materials_sheen.d.ts +0 -1
  53. package/types/gltf/extensions/KHR_materials_specular.d.ts +0 -1
  54. package/types/gltf/extensions/KHR_materials_transmission.d.ts +0 -1
  55. package/types/gltf/extensions/KHR_materials_unlit.d.ts +0 -1
  56. package/types/gltf/extensions/KHR_materials_variants.d.ts +0 -6
  57. package/types/gltf/extensions/KHR_materials_volume.d.ts +0 -1
  58. package/types/gltf/extensions/KHR_mesh_quantization.d.ts +0 -1
  59. package/types/gltf/extensions/KHR_texture_basisu.d.ts +0 -1
  60. package/types/gltf/extensions/KHR_texture_transform.d.ts +0 -1
  61. package/types/gltf/extensions/MeshoptDecoder.d.ts +0 -12
  62. package/types/gltf/extensions/index.d.ts +0 -21
  63. package/types/gltf/index.d.ts +0 -6
  64. package/types/gltf/parser/GLTFAnimationParser.d.ts +0 -12
  65. package/types/gltf/parser/GLTFAnimatorControllerParser.d.ts +0 -7
  66. package/types/gltf/parser/GLTFBufferParser.d.ts +0 -7
  67. package/types/gltf/parser/GLTFBufferViewParser.d.ts +0 -6
  68. package/types/gltf/parser/GLTFEntityParser.d.ts +0 -6
  69. package/types/gltf/parser/GLTFMaterialParser.d.ts +0 -15
  70. package/types/gltf/parser/GLTFMeshParser.d.ts +0 -20
  71. package/types/gltf/parser/GLTFParser.d.ts +0 -57
  72. package/types/gltf/parser/GLTFParserContext.d.ts +0 -74
  73. package/types/gltf/parser/GLTFSceneParser.d.ts +0 -11
  74. package/types/gltf/parser/GLTFSchemaParser.d.ts +0 -6
  75. package/types/gltf/parser/GLTFSkinParser.d.ts +0 -7
  76. package/types/gltf/parser/GLTFTextureParser.d.ts +0 -15
  77. package/types/gltf/parser/GLTFValidator.d.ts +0 -6
  78. package/types/gltf/parser/index.d.ts +0 -14
  79. package/types/index.d.ts +0 -35
  80. package/types/ktx2/KTX2Container.d.ts +0 -81
  81. package/types/ktx2/KTX2Loader.d.ts +0 -55
  82. package/types/ktx2/KTX2TargetFormat.d.ts +0 -27
  83. package/types/ktx2/WorkerPool.d.ts +0 -32
  84. package/types/ktx2/transcoder/AbstractTranscoder.d.ts +0 -55
  85. package/types/ktx2/transcoder/BinomialLLCTranscoder.d.ts +0 -8
  86. package/types/ktx2/transcoder/BinomialLLCWorkerCode.d.ts +0 -6
  87. package/types/prefab/PrefabParser.d.ts +0 -11
  88. package/types/prefab/PrefabResource.d.ts +0 -25
  89. package/types/resource-deserialize/index.d.ts +0 -21
  90. package/types/resource-deserialize/resources/animationClip/AnimationClipDecoder.d.ts +0 -18
  91. package/types/resource-deserialize/resources/mesh/MeshDecoder.d.ts +0 -8
  92. package/types/resource-deserialize/resources/mesh/type.d.ts +0 -31
  93. package/types/resource-deserialize/resources/parser/HierarchyParser.d.ts +0 -43
  94. package/types/resource-deserialize/resources/parser/ParserContext.d.ts +0 -30
  95. package/types/resource-deserialize/resources/parser/ReflectionParser.d.ts +0 -21
  96. package/types/resource-deserialize/resources/scene/EditorTextureLoader.d.ts +0 -4
  97. package/types/resource-deserialize/resources/scene/SceneParser.d.ts +0 -17
  98. package/types/resource-deserialize/resources/schema/BasicSchema.d.ts +0 -97
  99. package/types/resource-deserialize/resources/schema/MaterialSchema.d.ts +0 -102
  100. package/types/resource-deserialize/resources/schema/ProjectSchema.d.ts +0 -9
  101. package/types/resource-deserialize/resources/schema/SceneSchema.d.ts +0 -80
  102. package/types/resource-deserialize/resources/schema/index.d.ts +0 -4
  103. package/types/resource-deserialize/resources/texture2D/TextureDecoder.d.ts +0 -5
  104. package/types/resource-deserialize/utils/BufferReader.d.ts +0 -28
  105. package/types/resource-deserialize/utils/Decorator.d.ts +0 -11
  106. package/types/resource-deserialize/utils/FileHeader.d.ts +0 -9
  107. package/types/resource-deserialize/utils/Utils.d.ts +0 -5
@@ -1,102 +0,0 @@
1
- import { BlendFactor, BlendOperation, ColorWriteMask, CompareFunction, CullMode, RenderQueueType, StencilOperation } from "@galacean/engine-core";
2
- import type { IAssetRef, IColor, IVector2, IVector3 } from "./BasicSchema";
3
- export interface IRenderState {
4
- /** Blend state. */
5
- blendState: {
6
- /** The blend state of the render target. */
7
- targetBlendState: {
8
- /** Whether to enable blend. */
9
- enabled: boolean;
10
- /** color (RGB) blend operation. */
11
- colorBlendOperation: BlendOperation;
12
- /** alpha (A) blend operation. */
13
- alphaBlendOperation: BlendOperation;
14
- /** color blend factor (RGB) for source. */
15
- sourceColorBlendFactor: BlendFactor;
16
- /** alpha blend factor (A) for source. */
17
- sourceAlphaBlendFactor: BlendFactor;
18
- /** color blend factor (RGB) for destination. */
19
- destinationColorBlendFactor: BlendFactor;
20
- /** alpha blend factor (A) for destination. */
21
- destinationAlphaBlendFactor: BlendFactor;
22
- /** color mask. */
23
- colorWriteMask: ColorWriteMask;
24
- };
25
- blendColor: IColor;
26
- /** Whether to use (Alpha-to-Coverage) technology. */
27
- alphaToCoverage: boolean;
28
- };
29
- /** Depth state. */
30
- depthState: {
31
- /** Whether to enable the depth test. */
32
- enabled: boolean;
33
- /** Whether the depth value can be written.*/
34
- writeEnabled: boolean;
35
- /** Depth comparison function. */
36
- compareFunction: CompareFunction;
37
- };
38
- /** Stencil state. */
39
- stencilState: {
40
- /** Whether to enable stencil test. */
41
- enabled: boolean;
42
- /** Write the reference value of the stencil buffer. */
43
- referenceValue: number;
44
- /** Specifying a bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. */
45
- mask: number;
46
- /** Specifying a bit mask to enable or disable writing of individual bits in the stencil planes. */
47
- writeMask: number;
48
- /** The comparison function of the reference value of the front face of the geometry and the current buffer storage value. */
49
- compareFunctionFront: CompareFunction;
50
- /** The comparison function of the reference value of the back of the geometry and the current buffer storage value. */
51
- compareFunctionBack: CompareFunction;
52
- /** specifying the function to use for front face when both the stencil test and the depth test pass. */
53
- passOperationFront: StencilOperation;
54
- /** specifying the function to use for back face when both the stencil test and the depth test pass. */
55
- passOperationBack: StencilOperation;
56
- /** specifying the function to use for front face when the stencil test fails. */
57
- failOperationFront: StencilOperation;
58
- /** specifying the function to use for back face when the stencil test fails. */
59
- failOperationBack: StencilOperation;
60
- /** specifying the function to use for front face when the stencil test passes, but the depth test fails. */
61
- zFailOperationFront: StencilOperation;
62
- /** specifying the function to use for back face when the stencil test passes, but the depth test fails. */
63
- zFailOperationBack: StencilOperation;
64
- };
65
- /** Raster state. */
66
- rasterState: {
67
- /** Specifies whether or not front- and/or back-facing polygons can be culled. */
68
- cullMode: CullMode;
69
- /** The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. */
70
- depthBias: number;
71
- /** The scale factor for the variable depth offset for each polygon. */
72
- slopeScaledDepthBias: number;
73
- };
74
- /** Render queue type. */
75
- renderQueueType: RenderQueueType;
76
- }
77
- export interface IMaterialSchema {
78
- name: string;
79
- shader: string;
80
- shaderData: {
81
- [key: string]: {
82
- type: MaterialLoaderType;
83
- value: IVector3 | IVector2 | IColor | number | IAssetRef;
84
- };
85
- };
86
- macros: Array<{
87
- name: string;
88
- value?: string;
89
- }>;
90
- renderState: IRenderState;
91
- shaderRef: IAssetRef;
92
- }
93
- export declare enum MaterialLoaderType {
94
- Vector2 = "Vector2",
95
- Vector3 = "Vector3",
96
- Vector4 = "Vector4",
97
- Color = "Color",
98
- Float = "Float",
99
- Texture = "Texture",
100
- Boolean = "Boolean",
101
- Integer = "Integer"
102
- }
@@ -1,9 +0,0 @@
1
- export interface IProject {
2
- scene: string;
3
- files: {
4
- virtualPath: string;
5
- path: string;
6
- type: string;
7
- id: string;
8
- }[];
9
- }
@@ -1,80 +0,0 @@
1
- import { BackgroundMode, BackgroundTextureFillMode, BloomDownScaleMode, DiffuseMode, FogMode, ShadowCascadesMode, ShadowResolution, TonemappingMode } from "@galacean/engine-core";
2
- import type { IAssetRef, IColor, IHierarchyFile, IVector3 } from "./BasicSchema";
3
- export declare enum SpecularMode {
4
- Sky = "Sky",
5
- Custom = "Custom"
6
- }
7
- export interface IScene extends IHierarchyFile {
8
- name?: string;
9
- scene: {
10
- background: {
11
- mode: BackgroundMode;
12
- color: IColor;
13
- texture?: IAssetRef;
14
- textureFillMode?: BackgroundTextureFillMode;
15
- skyMesh?: IAssetRef;
16
- skyMaterial?: IAssetRef;
17
- };
18
- ambient: {
19
- diffuseMode: DiffuseMode;
20
- ambientLight: IAssetRef;
21
- customAmbientLight: IAssetRef;
22
- customSpecularTexture: IAssetRef;
23
- diffuseSolidColor: IColor;
24
- diffuseIntensity: number;
25
- specularIntensity: number;
26
- specularMode: SpecularMode;
27
- bakerResolution: number;
28
- };
29
- shadow?: {
30
- castShadows: boolean;
31
- enableTransparentShadow: boolean;
32
- shadowResolution: ShadowResolution;
33
- shadowDistance: number;
34
- shadowCascades: ShadowCascadesMode;
35
- shadowTwoCascadeSplits: number;
36
- shadowFourCascadeSplits: IVector3;
37
- shadowFadeBorder: number;
38
- };
39
- fog?: {
40
- fogMode: FogMode;
41
- fogStart: number;
42
- fogEnd: number;
43
- fogDensity: number;
44
- fogColor: IColor;
45
- };
46
- postProcess?: {
47
- isActive: boolean;
48
- bloom: {
49
- enabled: boolean;
50
- downScale: BloomDownScaleMode;
51
- threshold: number;
52
- scatter: number;
53
- intensity: number;
54
- tint: IColor;
55
- dirtTexture: IAssetRef;
56
- dirtIntensity: number;
57
- };
58
- tonemapping: {
59
- enabled: boolean;
60
- mode: TonemappingMode;
61
- };
62
- };
63
- ambientOcclusion?: {
64
- bias: number;
65
- bilateralThreshold: number;
66
- enabledAmbientOcclusion: boolean;
67
- intensity: number;
68
- power: number;
69
- quality: number;
70
- radius: number;
71
- minHorizonAngle: number;
72
- };
73
- };
74
- files: Array<{
75
- id: string;
76
- type: string;
77
- virtualPath: string;
78
- path: string;
79
- }>;
80
- }
@@ -1,4 +0,0 @@
1
- export * from "./BasicSchema";
2
- export * from "./MaterialSchema";
3
- export * from "./ProjectSchema";
4
- export * from "./SceneSchema";
@@ -1,5 +0,0 @@
1
- import { AssetPromise, Engine, Texture2D } from "@galacean/engine-core";
2
- import { BufferReader } from "../../utils/BufferReader";
3
- export declare class Texture2DDecoder {
4
- static decode(engine: Engine, bufferReader: BufferReader, restoredTexture?: Texture2D): AssetPromise<Texture2D>;
5
- }
@@ -1,28 +0,0 @@
1
- export declare class BufferReader {
2
- data: Uint8Array;
3
- private _dataView;
4
- private _littleEndian;
5
- private _position;
6
- private _baseOffset;
7
- constructor(data: Uint8Array, byteOffset?: number, byteLength?: number, littleEndian?: boolean);
8
- get position(): number;
9
- get offset(): number;
10
- nextUint8(): number;
11
- nextUint16(): number;
12
- nextUint32(): number;
13
- nextInt32(): number;
14
- nextInt32Array(len: number): Int32Array;
15
- nextFloat32(): number;
16
- nextFloat32Array(len: number): Float32Array;
17
- nextUint32Array(len: number): Uint32Array;
18
- nextUint8Array(len: number): Uint8Array;
19
- nextUint64(): number;
20
- nextStr(): string;
21
- /**
22
- * image data 放在最后
23
- */
24
- nextImageData(count?: number): Uint8Array;
25
- nextImagesData(count: number): Uint8Array[];
26
- skip(bytes: number): this;
27
- scan(maxByteLength: number, term?: number): Uint8Array;
28
- }
@@ -1,11 +0,0 @@
1
- import { AssetPromise, Engine } from "@galacean/engine-core";
2
- import type { BufferReader } from "./BufferReader";
3
- export declare const decoderMap: Record<string, {
4
- decode: (engine: Engine, bufferReader: BufferReader, ...arg: any[]) => AssetPromise<any>;
5
- }>;
6
- /**
7
- * Decoder decorator generator.
8
- * @param type - resource file type.
9
- * @returns Decoder decorator
10
- */
11
- export declare function decoder(type: string): ClassDecorator;
@@ -1,9 +0,0 @@
1
- export declare class FileHeader {
2
- totalLength: number;
3
- version: number;
4
- type: string;
5
- name: string;
6
- headerLength: number;
7
- static decode(arrayBuffer: ArrayBuffer): FileHeader;
8
- get dataLength(): number;
9
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Array buffer to string.
3
- * @param buf
4
- */
5
- export declare function ab2str(buf: ArrayBuffer): any;