@galacean/engine-loader 1.4.0-alpha.0 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-loader",
3
- "version": "1.4.0-alpha.0",
3
+ "version": "1.4.0-alpha.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -18,9 +18,9 @@
18
18
  "types/**/*"
19
19
  ],
20
20
  "dependencies": {
21
- "@galacean/engine-core": "1.4.0-alpha.0",
22
- "@galacean/engine-rhi-webgl": "1.4.0-alpha.0",
23
- "@galacean/engine-math": "1.4.0-alpha.0"
21
+ "@galacean/engine-math": "1.4.0-alpha.2",
22
+ "@galacean/engine-rhi-webgl": "1.4.0-alpha.2",
23
+ "@galacean/engine-core": "1.4.0-alpha.2"
24
24
  },
25
25
  "scripts": {
26
26
  "b:types": "tsc"
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
- import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, Texture2D } from "@galacean/engine-core";
2
- import { RequestConfig } from "@galacean/engine-core/types/asset/request";
1
+ import { AssetPromise, BlendShape, Buffer, ContentRestorer, ModelMesh, RequestConfig, Texture2D } from "@galacean/engine-core";
3
2
  import { Vector2 } from "@galacean/engine-math";
4
3
  import { GLTFResource } from "./gltf/GLTFResource";
5
4
  import type { AccessorComponentType, IBufferView } from "./gltf/GLTFSchema";
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,4 @@
1
- import { AssetPromise, ContentRestorer, Texture2D } from "@galacean/engine-core";
2
- import { RequestConfig } from "@galacean/engine-core/types/asset/request";
1
+ import { AssetPromise, ContentRestorer, RequestConfig, Texture2D } from "@galacean/engine-core";
3
2
  /**
4
3
  * @internal
5
4
  */
@@ -1,5 +1,4 @@
1
- import { AssetPromise, ContentRestorer, TextureCube } from "@galacean/engine-core";
2
- import { RequestConfig } from "@galacean/engine-core/types/asset/request";
1
+ import { AssetPromise, ContentRestorer, RequestConfig, TextureCube } from "@galacean/engine-core";
3
2
  /**
4
3
  * @internal
5
4
  */
@@ -165,4 +165,13 @@ export interface IKHRMaterialsIridescence {
165
165
  iridescenceThicknessMaximum?: number;
166
166
  iridescenceThicknessTexture?: ITextureInfo;
167
167
  }
168
- export type GLTFExtensionSchema = IKHRLightsPunctual_Light | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRMaterialsAnisotropy | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node | IGalaceanAnimation | IKHRMaterialsIridescence | Object;
168
+ /**
169
+ * Interfaces from the KHR_materials_volume extension
170
+ */
171
+ export interface IKHRMaterialsVolume {
172
+ thicknessFactor?: number;
173
+ thicknessTexture?: ITextureInfo;
174
+ attenuationDistance?: number;
175
+ attenuationColor?: number[];
176
+ }
177
+ export type GLTFExtensionSchema = IKHRLightsPunctual_Light | IKHRMaterialsClearcoat | IKHRMaterialsIor | IKHRMaterialsUnlit | IKHRMaterialsPbrSpecularGlossiness | IKHRMaterialsSheen | IKHRMaterialsSpecular | IKHRMaterialsTransmission | IKHRMaterialsTranslucency | IKHRMaterialVariants_Mapping | IKHRMaterialVariants_Variants | IKHRMaterialsAnisotropy | IKHRTextureBasisU | IKHRTextureTransform | IKHRXmp | IKHRXmp_Node | IGalaceanAnimation | IKHRMaterialsIridescence | IKHRMaterialsVolume | Object;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/types/index.d.ts CHANGED
@@ -18,9 +18,11 @@ import "./SpriteAtlasLoader";
18
18
  import "./SpriteLoader";
19
19
  import "./Texture2DLoader";
20
20
  import "./TextureCubeLoader";
21
+ import "./AudioLoader";
21
22
  import "./ktx2/KTX2Loader";
22
23
  import "./ShaderLoader";
23
24
  import "./ShaderChunkLoader";
25
+ import "./PhysicsMaterialLoader";
24
26
  export { GLTFLoader } from "./GLTFLoader";
25
27
  export type { GLTFParams } from "./GLTFLoader";
26
28
  export * from "./SceneLoader";
@@ -1,15 +1,11 @@
1
1
  import { Component, Engine, EngineObject, Entity, ReferResource, ResourceManager, Scene } from "@galacean/engine-core";
2
- import type { IEntity, IHierarchyFile } from "../schema";
2
+ import type { IComponentRef, IEntity, IHierarchyFile } from "../schema";
3
3
  export declare enum ParserType {
4
4
  Prefab = 0,
5
5
  Scene = 1
6
6
  }
7
7
  /**
8
- * Parser context
9
- * @export
10
- * @class ParserContext
11
- * @template T
12
- * @template I
8
+ * @internal
13
9
  */
14
10
  export declare class ParserContext<T extends IHierarchyFile, I extends EngineObject> {
15
11
  readonly engine: Engine;
@@ -20,11 +16,10 @@ export declare class ParserContext<T extends IHierarchyFile, I extends EngineObj
20
16
  components: Map<string, Component>;
21
17
  rootIds: string[];
22
18
  strippedIds: string[];
19
+ componentWaitingMap: Map<string, Function[]>;
23
20
  readonly resourceManager: ResourceManager;
24
21
  constructor(engine: Engine, type: ParserType, resource: ReferResource | Scene);
25
- /**
26
- * Destroy the context.
27
- * @memberof ParserContext
28
- */
22
+ addComponent(id: string, component: Component): void;
23
+ getComponentByRef(ref: IComponentRef): Promise<Component>;
29
24
  clear(): void;
30
25
  }
@@ -15,4 +15,5 @@ export declare class ReflectionParser {
15
15
  private static _isClass;
16
16
  private static _isAssetRef;
17
17
  private static _isEntityRef;
18
+ private static _isComponentRef;
18
19
  }
@@ -87,3 +87,7 @@ export type IAssetRef = {
87
87
  export type IEntityRef = {
88
88
  entityId: string;
89
89
  };
90
+ export type IComponentRef = {
91
+ ownerId: string;
92
+ componentId: string;
93
+ };