@galacean/engine-core 1.3.0-alpha.2 → 1.3.0-beta.5

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-core",
3
- "version": "1.3.0-alpha.2",
3
+ "version": "1.3.0-beta.5",
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-math": "1.3.0-alpha.2"
18
+ "@galacean/engine-math": "1.3.0-beta.5"
19
19
  },
20
20
  "devDependencies": {
21
- "@galacean/engine-design": "1.3.0-alpha.2"
21
+ "@galacean/engine-design": "1.3.0-beta.5"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
package/types/Entity.d.ts CHANGED
@@ -58,9 +58,10 @@ export declare class Entity extends EngineObject {
58
58
  /**
59
59
  * Add component based on the component type.
60
60
  * @param type - The type of the component
61
+ * @param args - The arguments of the component
61
62
  * @returns The component which has been added
62
63
  */
63
- addComponent<T extends Component>(type: new (entity: Entity) => T): T;
64
+ addComponent<T extends new (entity: Entity, ...args: any[]) => Component>(type: T, ...args: ComponentArguments<T>): InstanceType<T>;
64
65
  /**
65
66
  * Get component which match the type.
66
67
  * @param type - The type of the component
@@ -152,3 +153,5 @@ export declare class Entity extends EngineObject {
152
153
  */
153
154
  getInvModelMatrix(): Matrix;
154
155
  }
156
+ type ComponentArguments<T extends new (entity: Entity, ...args: any[]) => Component> = T extends new (entity: Entity, ...args: infer P) => Component ? P : never;
157
+ export {};
@@ -20,3 +20,6 @@ export { WrapMode } from "./enums/WrapMode";
20
20
  export * from "./Keyframe";
21
21
  export * from "./AnimatorLayerMask";
22
22
  export { StateMachineScript } from "./StateMachineScript";
23
+ export { AnimatorCondition } from "./AnimatorCondition";
24
+ export * from "./AnimatorControllerParameter";
25
+ export { LayerPathMask } from "./LayerPathMask";
@@ -102,11 +102,13 @@ export declare class ResourceManager {
102
102
  addContentRestorer<T extends EngineObject>(restorer: ContentRestorer<T>): void;
103
103
  private _assignDefaultOptions;
104
104
  private _loadSingleItem;
105
- private _pushSubAssetPromiseCallback;
105
+ private _loadMainAsset;
106
+ private _createSubAssetPromiseCallback;
106
107
  private _gc;
107
108
  private _getResolveResource;
108
109
  private _parseURL;
109
110
  private _parseQueryPath;
111
+ private _releaseSubAssetPromiseCallback;
110
112
  }
111
113
  /**
112
114
  * Declare ResourceLoader's decorator.
@@ -21,11 +21,13 @@ export declare abstract class Light extends Component {
21
21
  shadowNormalBias: number;
22
22
  /** Near plane value to use for shadow frustums. */
23
23
  shadowNearPlane: number;
24
- /** Shadow intensity, the larger the value, the clearer and darker the shadow. */
25
- shadowStrength: number;
24
+ private _shadowStrength;
26
25
  private _color;
27
26
  private _viewMat;
28
27
  private _inverseViewMat;
28
+ /** Shadow intensity, the larger the value, the clearer and darker the shadow, range [0,1]. */
29
+ get shadowStrength(): number;
30
+ set shadowStrength(value: number);
29
31
  /**
30
32
  * Light Color.
31
33
  */
@@ -22,6 +22,11 @@ export declare class SafeLoopArray<T> {
22
22
  * @param index - The index of the array
23
23
  */
24
24
  removeByIndex(index: number): void;
25
+ /**
26
+ * Remove item from array that pass the specified comparison function.
27
+ * @param filter - The comparison function
28
+ */
29
+ findAndRemove(filter: (value: T) => boolean): void;
25
30
  /**
26
31
  * The index of the item.
27
32
  * @param item - The item which want to get the index
@@ -1,3 +1,4 @@
1
1
  export { ClearableObjectPool } from "./ClearableObjectPool";
2
2
  export type { IPoolElement } from "./ObjectPool";
3
3
  export { ReturnableObjectPool } from "./ReturnableObjectPool";
4
+ export { SafeLoopArray } from "./SafeLoopArray";