@galacean/engine-core 0.0.0-experimental-renderSort.4 → 0.0.0-experimental-stateMachine.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/LICENSE +2 -2
- package/dist/main.js +22858 -21862
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +22858 -21862
- package/dist/module.js +21193 -20200
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/BasicResources.d.ts +1 -0
- package/types/Camera.d.ts +48 -8
- package/types/Canvas.d.ts +15 -5
- package/types/Component.d.ts +2 -0
- package/types/ComponentsManager.d.ts +3 -0
- package/types/DisorderedArray.d.ts +1 -0
- package/types/Engine.d.ts +9 -3
- package/types/Entity.d.ts +1 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +9 -32
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +1 -0
- package/types/RenderPipeline/RenderQueue.d.ts +1 -9
- package/types/RenderPipeline/{Index.d.ts → index.d.ts} +0 -1
- package/types/Renderer.d.ts +4 -1
- package/types/Scene.d.ts +14 -2
- package/types/SystemInfo.d.ts +2 -0
- package/types/Utils.d.ts +7 -1
- package/types/animation/AnimationClip.d.ts +32 -4
- package/types/animation/AnimationClipCurveBinding.d.ts +12 -2
- package/types/animation/Animator.d.ts +30 -1
- package/types/animation/AnimatorCondition.d.ts +13 -0
- package/types/animation/AnimatorController.d.ts +21 -2
- package/types/animation/AnimatorControllerLayer.d.ts +3 -0
- package/types/animation/AnimatorControllerParameter.d.ts +10 -0
- package/types/animation/AnimatorLayerMask.d.ts +45 -0
- package/types/animation/AnimatorState.d.ts +17 -4
- package/types/animation/AnimatorStateMachine.d.ts +39 -0
- package/types/animation/AnimatorTransition.d.ts +33 -0
- package/types/animation/Keyframe.d.ts +1 -1
- package/types/animation/LayerPathMask.d.ts +16 -0
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +7 -0
- package/types/animation/animationCurve/index.d.ts +1 -0
- package/types/animation/index.d.ts +1 -0
- package/types/asset/AssetPromise.d.ts +10 -5
- package/types/asset/AssetType.d.ts +2 -0
- package/types/asset/Loader.d.ts +7 -0
- package/types/asset/ReferResource.d.ts +3 -2
- package/types/asset/ResourceManager.d.ts +2 -0
- package/types/base/Constant.d.ts +1 -0
- package/types/enums/CameraType.d.ts +1 -0
- package/types/enums/Downsampling.d.ts +11 -0
- package/types/enums/MSAASamples.d.ts +13 -0
- package/types/index.d.ts +5 -1
- package/types/input/InputManager.d.ts +0 -2
- package/types/input/interface/IInput.d.ts +0 -8
- package/types/lighting/Light.d.ts +0 -1
- package/types/lighting/LightManager.d.ts +0 -1
- package/types/material/PBRMaterial.d.ts +23 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +2 -0
- package/types/particle/modules/MainModule.d.ts +2 -0
- package/types/particle/modules/shape/BaseShape.d.ts +2 -2
- package/types/particle/modules/shape/BoxShape.d.ts +2 -1
- package/types/particle/modules/shape/CircleShape.d.ts +2 -1
- package/types/particle/modules/shape/ConeShape.d.ts +2 -1
- package/types/particle/modules/shape/HemisphereShape.d.ts +2 -1
- package/types/particle/modules/shape/SphereShape.d.ts +2 -1
- package/types/particle/modules/shape/index.d.ts +1 -0
- package/types/physics/HitResult.d.ts +3 -0
- package/types/renderingHardwareInterface/IPlatformRenderTarget.d.ts +2 -2
- package/types/renderingHardwareInterface/index.d.ts +0 -1
- package/types/shader/Shader.d.ts +15 -2
- package/types/shader/state/DepthState.d.ts +2 -2
- package/types/shaderlib/ShaderFactory.d.ts +8 -1
- package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
- package/types/texture/RenderTarget.d.ts +5 -4
- package/types/texture/Texture.d.ts +1 -0
- package/types/texture/enums/RenderBufferDepthFormat.d.ts +11 -9
- package/types/texture/enums/TextureFormat.d.ts +30 -26
- package/types/xr/XRManager.d.ts +5 -0
- package/types/RenderPipeline/MeshRenderData.d.ts +0 -17
- package/types/RenderPipeline/RenderPass.d.ts +0 -55
- package/types/physics/PhysicsManager.d.ts +0 -76
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +0 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnimatorStateMachine } from "./AnimatorStateMachine";
|
|
2
2
|
import { AnimatorLayerBlendingMode } from "./enums/AnimatorLayerBlendingMode";
|
|
3
|
+
import { AnimatorLayerMask } from "./AnimatorLayerMask";
|
|
3
4
|
/**
|
|
4
5
|
* The Animation Layer contains a state machine that controls animations of a model or part of it.
|
|
5
6
|
*/
|
|
@@ -11,6 +12,8 @@ export declare class AnimatorControllerLayer {
|
|
|
11
12
|
blendingMode: AnimatorLayerBlendingMode;
|
|
12
13
|
/** The state machine for the layer. */
|
|
13
14
|
stateMachine: AnimatorStateMachine;
|
|
15
|
+
/** The AnimatorLayerMask is used to mask out certain entities from being animated by an AnimatorLayer. */
|
|
16
|
+
mask: AnimatorLayerMask;
|
|
14
17
|
/**
|
|
15
18
|
* @param name - The layer's name
|
|
16
19
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type AnimatorControllerParameterValue = number | string | boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Used to communicate between scripting and the controller, parameters can be set in scripting and used by the controller.
|
|
4
|
+
*/
|
|
5
|
+
export declare class AnimatorControllerParameter {
|
|
6
|
+
/** The name of the parameter. */
|
|
7
|
+
name: string;
|
|
8
|
+
/** The value of the parameter. */
|
|
9
|
+
value: AnimatorControllerParameterValue;
|
|
10
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { LayerPathMask } from "./LayerPathMask";
|
|
3
|
+
/**
|
|
4
|
+
* AnimatorLayerMask is used to mask out certain entities from being animated by an AnimatorLayer.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimatorLayerMask {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an AnimatorLayerMask instance by specifying an entity.
|
|
9
|
+
* This will automatically add path masks for the entity and all its children.
|
|
10
|
+
* @param entity - The root entity to create path masks for
|
|
11
|
+
*/
|
|
12
|
+
static createByEntity(entity: Entity): AnimatorLayerMask;
|
|
13
|
+
private static _addPathMaskWithChildren;
|
|
14
|
+
private _pathMasks;
|
|
15
|
+
private _pathMaskMap;
|
|
16
|
+
/**
|
|
17
|
+
* The list of path masks.
|
|
18
|
+
*/
|
|
19
|
+
get pathMasks(): Readonly<LayerPathMask[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Adds a path mask to the AnimatorLayerMask, the root path is "".
|
|
22
|
+
* @param path - The path to add a mask for
|
|
23
|
+
* @returns The created or existing LayerPathMask
|
|
24
|
+
*/
|
|
25
|
+
addPathMask(path: string): LayerPathMask;
|
|
26
|
+
/**
|
|
27
|
+
* Removes a path mask from the AnimatorLayerMask.
|
|
28
|
+
* @param path - The path of the mask to remove
|
|
29
|
+
*/
|
|
30
|
+
removePathMask(path: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get a path mask based on the given path.
|
|
33
|
+
* @param path - The path of the mask to get
|
|
34
|
+
* @returns The LayerPathMask for the given path
|
|
35
|
+
*/
|
|
36
|
+
getPathMask(path: string): LayerPathMask;
|
|
37
|
+
/**
|
|
38
|
+
* Sets the active state of a path mask.
|
|
39
|
+
* If recursive is true, it also sets the active state of all child path masks.
|
|
40
|
+
* @param path - The path of the mask to modify
|
|
41
|
+
* @param active - The active state to set
|
|
42
|
+
* @param withChildren - Whether to apply the active state recursively to child paths
|
|
43
|
+
*/
|
|
44
|
+
setPathMaskActive(path: string, active: boolean, withChildren?: boolean): void;
|
|
45
|
+
}
|
|
@@ -25,12 +25,20 @@ export declare class AnimatorState {
|
|
|
25
25
|
get clip(): AnimationClip;
|
|
26
26
|
set clip(clip: AnimationClip);
|
|
27
27
|
/**
|
|
28
|
-
* The start time of
|
|
28
|
+
* The start time of this state's clip
|
|
29
|
+
*/
|
|
30
|
+
get startTime(): number;
|
|
31
|
+
/**
|
|
32
|
+
* The end time of this state's clip
|
|
33
|
+
*/
|
|
34
|
+
get endTime(): number;
|
|
35
|
+
/**
|
|
36
|
+
* The normalized start time of the clip, the range is 0 to 1, default is 0.
|
|
29
37
|
*/
|
|
30
38
|
get clipStartTime(): number;
|
|
31
39
|
set clipStartTime(time: number);
|
|
32
40
|
/**
|
|
33
|
-
* The end time of the clip, the range is 0 to 1, default is 1.
|
|
41
|
+
* The normalized end time of the clip, the range is 0 to 1, default is 1.
|
|
34
42
|
*/
|
|
35
43
|
get clipEndTime(): number;
|
|
36
44
|
set clipEndTime(time: number);
|
|
@@ -39,10 +47,15 @@ export declare class AnimatorState {
|
|
|
39
47
|
*/
|
|
40
48
|
constructor(name: string);
|
|
41
49
|
/**
|
|
42
|
-
* Add an outgoing transition
|
|
50
|
+
* Add an outgoing transition.
|
|
43
51
|
* @param transition - The transition
|
|
44
52
|
*/
|
|
45
|
-
addTransition(transition: AnimatorStateTransition):
|
|
53
|
+
addTransition(transition: AnimatorStateTransition): AnimatorStateTransition;
|
|
54
|
+
/**
|
|
55
|
+
* Add an outgoing transition to the destination state.
|
|
56
|
+
* @param animatorState - The destination state
|
|
57
|
+
*/
|
|
58
|
+
addTransition(animatorState: AnimatorState): AnimatorStateTransition;
|
|
46
59
|
/**
|
|
47
60
|
* Remove a transition from the state.
|
|
48
61
|
* @param transition - The transition
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnimatorState } from "./AnimatorState";
|
|
2
|
+
import { AnimatorStateTransition } from "./AnimatorTransition";
|
|
2
3
|
export interface AnimatorStateMap {
|
|
3
4
|
[key: string]: AnimatorState;
|
|
4
5
|
}
|
|
@@ -13,6 +14,14 @@ export declare class AnimatorStateMachine {
|
|
|
13
14
|
* @remarks When the Animator's AnimatorController changed or the Animator's onEnable be triggered.
|
|
14
15
|
*/
|
|
15
16
|
defaultState: AnimatorState;
|
|
17
|
+
/**
|
|
18
|
+
* The list of entry transitions in the state machine.
|
|
19
|
+
*/
|
|
20
|
+
get entryTransitions(): Readonly<AnimatorStateTransition[]>;
|
|
21
|
+
/**
|
|
22
|
+
* The list of AnyState transitions.
|
|
23
|
+
*/
|
|
24
|
+
get anyStateTransitions(): Readonly<AnimatorStateTransition[]>;
|
|
16
25
|
/**
|
|
17
26
|
* Add a state to the state machine.
|
|
18
27
|
* @param name - The name of the new state
|
|
@@ -34,4 +43,34 @@ export declare class AnimatorStateMachine {
|
|
|
34
43
|
* @returns Unique name.
|
|
35
44
|
*/
|
|
36
45
|
makeUniqueStateName(name: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Add an entry transition.
|
|
48
|
+
* @param transition - The transition
|
|
49
|
+
*/
|
|
50
|
+
addEntryStateTransition(transition: AnimatorStateTransition): AnimatorStateTransition;
|
|
51
|
+
/**
|
|
52
|
+
* Add an entry transition to the destination state.
|
|
53
|
+
* @param animatorState - The destination state
|
|
54
|
+
*/
|
|
55
|
+
addEntryStateTransition(animatorState: AnimatorState): AnimatorStateTransition;
|
|
56
|
+
/**
|
|
57
|
+
* Remove an entry transition.
|
|
58
|
+
* @param transition - The transition
|
|
59
|
+
*/
|
|
60
|
+
removeEntryStateTransition(transition: AnimatorStateTransition): void;
|
|
61
|
+
/**
|
|
62
|
+
* Add an any transition.
|
|
63
|
+
* @param transition - The transition
|
|
64
|
+
*/
|
|
65
|
+
addAnyStateTransition(transition: AnimatorStateTransition): AnimatorStateTransition;
|
|
66
|
+
/**
|
|
67
|
+
* Add an any transition to the destination state.
|
|
68
|
+
* @param animatorState - The destination state
|
|
69
|
+
*/
|
|
70
|
+
addAnyStateTransition(animatorState: AnimatorState): AnimatorStateTransition;
|
|
71
|
+
/**
|
|
72
|
+
* Remove an any transition.
|
|
73
|
+
* @param transition - The transition
|
|
74
|
+
*/
|
|
75
|
+
removeAnyStateTransition(transition: AnimatorStateTransition): void;
|
|
37
76
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { AnimatorControllerParameterValue } from "./AnimatorControllerParameter";
|
|
2
|
+
import { AnimatorConditionMode } from "./enums/AnimatorConditionMode";
|
|
3
|
+
import { AnimatorCondition } from "./AnimatorCondition";
|
|
1
4
|
import { AnimatorState } from "./AnimatorState";
|
|
2
5
|
/**
|
|
3
6
|
* Transitions define when and how the state machine switch from on state to another. AnimatorTransition always originate from a StateMachine or a StateMachine entry.
|
|
@@ -11,4 +14,34 @@ export declare class AnimatorStateTransition {
|
|
|
11
14
|
exitTime: number;
|
|
12
15
|
/** The destination state of the transition. */
|
|
13
16
|
destinationState: AnimatorState;
|
|
17
|
+
/** Mutes the transition. The transition will never occur. */
|
|
18
|
+
mute: boolean;
|
|
19
|
+
/** Is the transition destination the exit of the current state machine. */
|
|
20
|
+
isExit: boolean;
|
|
21
|
+
private _conditions;
|
|
22
|
+
private _solo;
|
|
23
|
+
/** Mutes all other transitions in the source state. */
|
|
24
|
+
get solo(): boolean;
|
|
25
|
+
set solo(value: boolean);
|
|
26
|
+
/**
|
|
27
|
+
* The conditions in the transition.
|
|
28
|
+
*/
|
|
29
|
+
get conditions(): Readonly<AnimatorCondition[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Add a condition to a transition.
|
|
32
|
+
* @param mode - The AnimatorCondition mode of the condition
|
|
33
|
+
* @param parameter - The name of the parameter
|
|
34
|
+
* @param threshold - The threshold value of the condition
|
|
35
|
+
*/
|
|
36
|
+
addCondition(mode: AnimatorConditionMode, parameter: string, threshold?: AnimatorControllerParameterValue): AnimatorCondition;
|
|
37
|
+
/**
|
|
38
|
+
* Add a condition to a transition.
|
|
39
|
+
* @param animatorCondition - The condition to add
|
|
40
|
+
*/
|
|
41
|
+
addCondition(animatorCondition: AnimatorCondition): AnimatorCondition;
|
|
42
|
+
/**
|
|
43
|
+
* Remove a condition from the transition.
|
|
44
|
+
* @param condition - The condition to remove
|
|
45
|
+
*/
|
|
46
|
+
removeCondition(condition: AnimatorCondition): void;
|
|
14
47
|
}
|
|
@@ -17,4 +17,4 @@ export declare class Keyframe<V extends KeyframeValueType, T = V extends number
|
|
|
17
17
|
/**
|
|
18
18
|
* Type of Keyframe value.
|
|
19
19
|
*/
|
|
20
|
-
export type KeyframeValueType = number | Vector2 | Vector3 | Vector4 | number[] | Float32Array | Quaternion | Color | Rect | boolean | ReferResource;
|
|
20
|
+
export type KeyframeValueType = number | Vector2 | Vector3 | Vector4 | number[] | Float32Array | Quaternion | Color | Rect | string | boolean | ReferResource;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LayerPathMask represents a mask for a specific entity in an animation layer.
|
|
3
|
+
* It is used to control the animation whether to be applied to the entity or not.
|
|
4
|
+
*/
|
|
5
|
+
export declare class LayerPathMask {
|
|
6
|
+
/**
|
|
7
|
+
* It identifies a particular entity in the hierarchy.
|
|
8
|
+
* Example: "arm/left/hand" could be a path to the left hand of a character.
|
|
9
|
+
*/
|
|
10
|
+
path: string;
|
|
11
|
+
/**
|
|
12
|
+
* The active property is indicating whether the animation at this path is active or not.
|
|
13
|
+
* When true, the animation for this path is applied; when false, the animation for this path is ignored.
|
|
14
|
+
*/
|
|
15
|
+
active: boolean;
|
|
16
|
+
}
|
|
@@ -10,3 +10,4 @@ export { AnimationVector3Curve } from "./AnimationVector3Curve";
|
|
|
10
10
|
export { AnimationVector4Curve } from "./AnimationVector4Curve";
|
|
11
11
|
export { AnimationRefCurve } from "./AnimationRefCurve";
|
|
12
12
|
export { AnimationRectCurve } from "./AnimationRectCurve";
|
|
13
|
+
export { AnimationStringCurve } from "./AnimationStringCurve";
|
|
@@ -18,4 +18,5 @@ export { AnimatorCullingMode } from "./enums/AnimatorCullingMode";
|
|
|
18
18
|
export { InterpolationType } from "./enums/InterpolationType";
|
|
19
19
|
export { WrapMode } from "./enums/WrapMode";
|
|
20
20
|
export * from "./Keyframe";
|
|
21
|
+
export * from "./AnimatorLayerMask";
|
|
21
22
|
export { StateMachineScript } from "./StateMachineScript";
|
|
@@ -13,8 +13,10 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
|
13
13
|
get [Symbol.toStringTag](): string;
|
|
14
14
|
private _promise;
|
|
15
15
|
private _state;
|
|
16
|
-
private
|
|
17
|
-
private
|
|
16
|
+
private _taskCompleteProgress;
|
|
17
|
+
private _taskDetailProgress;
|
|
18
|
+
private _onTaskCompleteCallbacks;
|
|
19
|
+
private _onTaskDetailCallbacks;
|
|
18
20
|
private _onCancelHandler;
|
|
19
21
|
private _reject;
|
|
20
22
|
/**
|
|
@@ -27,10 +29,11 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
|
27
29
|
constructor(executor: AssetPromiseExecutor<T>);
|
|
28
30
|
/**
|
|
29
31
|
* Progress callback.
|
|
30
|
-
* @param callback
|
|
32
|
+
* @param onTaskComplete - This callback function provides information about the overall progress of the task. For example, in batch processing tasks, you can use the loaded and total parameters to calculate the percentage of task completion or display a progress bar
|
|
33
|
+
* @param onTaskDetail - This callback function provides detailed progress information about the task. For instance, in file downloading scenarios, you can use the loaded and total parameters to calculate the download progress percentage and utilize the url parameter to provide additional details such as download speed and estimated remaining time
|
|
31
34
|
* @returns AssetPromise
|
|
32
35
|
*/
|
|
33
|
-
onProgress(
|
|
36
|
+
onProgress(onTaskComplete: (loaded: number, total: number) => void, onTaskDetail?: (identifier: string, loaded: number, total: number) => void): AssetPromise<T>;
|
|
34
37
|
then<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): AssetPromise<TResult1 | TResult2>;
|
|
35
38
|
/**
|
|
36
39
|
* Attaches a callback for only the rejection of the Promise.
|
|
@@ -52,6 +55,8 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
|
52
55
|
cancel(): AssetPromise<T>;
|
|
53
56
|
}
|
|
54
57
|
interface AssetPromiseExecutor<T> {
|
|
55
|
-
(resolve: (value?: T | PromiseLike<T>) => void, reject?: (reason?: any) => void,
|
|
58
|
+
(resolve: (value?: T | PromiseLike<T>) => void, reject?: (reason?: any) => void, setTaskCompleteProgress?: TaskCompleteCallback, setTaskDetailProgress?: TaskDetailCallback, onCancel?: (callback: () => void) => void): void;
|
|
56
59
|
}
|
|
60
|
+
type TaskCompleteCallback = (loaded: number, total: number) => void;
|
|
61
|
+
type TaskDetailCallback = (url: string, loaded: number, total: number) => void;
|
|
57
62
|
export {};
|
package/types/asset/Loader.d.ts
CHANGED
|
@@ -24,7 +24,14 @@ export declare abstract class Loader<T> {
|
|
|
24
24
|
static getClass(className: string): {
|
|
25
25
|
new (...args: any): any;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Get the class name by class object.
|
|
29
|
+
* @param obj - class object
|
|
30
|
+
* @returns class name
|
|
31
|
+
*/
|
|
32
|
+
static getClassName(obj: Object): string;
|
|
27
33
|
private static _engineObjects;
|
|
34
|
+
private static _classNameMap;
|
|
28
35
|
constructor(useCache: boolean);
|
|
29
36
|
initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void>;
|
|
30
37
|
abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T>;
|
|
@@ -8,6 +8,7 @@ export declare abstract class ReferResource extends EngineObject implements IRef
|
|
|
8
8
|
/** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */
|
|
9
9
|
isGCIgnored: boolean;
|
|
10
10
|
private _refCount;
|
|
11
|
+
private _superResources;
|
|
11
12
|
/**
|
|
12
13
|
* Counted by valid references.
|
|
13
14
|
*/
|
|
@@ -15,8 +16,8 @@ export declare abstract class ReferResource extends EngineObject implements IRef
|
|
|
15
16
|
protected constructor(engine: Engine);
|
|
16
17
|
/**
|
|
17
18
|
* Destroy self.
|
|
18
|
-
* @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully
|
|
19
|
-
* @returns Whether the release was successful
|
|
19
|
+
* @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully
|
|
20
|
+
* @returns Whether the release was successful
|
|
20
21
|
*/
|
|
21
22
|
destroy(force?: boolean): boolean;
|
|
22
23
|
}
|
|
@@ -15,6 +15,8 @@ export declare class ResourceManager {
|
|
|
15
15
|
retryInterval: number;
|
|
16
16
|
/** The default timeout period for loading assets, in milliseconds. */
|
|
17
17
|
timeout: number;
|
|
18
|
+
/** Base url for loading assets. */
|
|
19
|
+
baseUrl: string | null;
|
|
18
20
|
private _loadingPromises;
|
|
19
21
|
/** Asset path pool, key is the `instanceID` of resource, value is asset path. */
|
|
20
22
|
private _assetPool;
|
package/types/base/Constant.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export declare enum GLCapabilityType {
|
|
|
96
96
|
colorBufferHalfFloat = "EXT_color_buffer_half_float",
|
|
97
97
|
textureFilterAnisotropic = "EXT_texture_filter_anisotropic",
|
|
98
98
|
blendMinMax = "EXT_blend_minmax",
|
|
99
|
+
fragDepth = "EXT_frag_depth",
|
|
99
100
|
astc = "WEBGL_compressed_texture_astc",
|
|
100
101
|
astc_webkit = "WEBKIT_WEBGL_compressed_texture_astc",
|
|
101
102
|
etc = "WEBGL_compressed_texture_etc",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-sample anti-aliasing samples.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum MSAASamples {
|
|
5
|
+
/** No multi-sample anti-aliasing. */
|
|
6
|
+
None = 1,
|
|
7
|
+
/** Multi-sample anti-aliasing with 2 samples. */
|
|
8
|
+
TwoX = 2,
|
|
9
|
+
/** Multi-sample anti-aliasing with 4 samples. */
|
|
10
|
+
FourX = 4,
|
|
11
|
+
/** Multi-sample anti-aliasing with 8 samples. */
|
|
12
|
+
EightX = 8
|
|
13
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Platform } from "./Platform";
|
|
2
2
|
export { Engine } from "./Engine";
|
|
3
3
|
export { SystemInfo } from "./SystemInfo";
|
|
4
|
-
export
|
|
4
|
+
export { Canvas } from "./Canvas";
|
|
5
5
|
export { Scene } from "./Scene";
|
|
6
6
|
export { SceneManager } from "./SceneManager";
|
|
7
7
|
export { Entity } from "./Entity";
|
|
@@ -29,8 +29,12 @@ export { BackgroundMode } from "./enums/BackgroundMode";
|
|
|
29
29
|
export { DepthTextureMode } from "./enums/DepthTextureMode";
|
|
30
30
|
export { FogMode } from "./enums/FogMode";
|
|
31
31
|
export { CameraClearFlags } from "./enums/CameraClearFlags";
|
|
32
|
+
export { CameraType } from "./enums/CameraType";
|
|
33
|
+
export { MSAASamples } from "./enums/MSAASamples";
|
|
34
|
+
export { Downsampling } from "./enums/Downsampling";
|
|
32
35
|
export { ColorSpace } from "./enums/ColorSpace";
|
|
33
36
|
export { BackgroundTextureFillMode } from "./enums/BackgroundTextureFillMode";
|
|
37
|
+
export { XRManager } from "./xr/XRManager";
|
|
34
38
|
export * from "./input/index";
|
|
35
39
|
export * from "./lighting/index";
|
|
36
40
|
export * from "./shadow/index";
|
|
@@ -9,6 +9,9 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
9
9
|
private static _roughnessProp;
|
|
10
10
|
private static _roughnessMetallicTextureProp;
|
|
11
11
|
private static _iorProp;
|
|
12
|
+
private static _anisotropyInfoProp;
|
|
13
|
+
private static _anisotropyTextureProp;
|
|
14
|
+
private _anisotropyRotation;
|
|
12
15
|
/**
|
|
13
16
|
* Index Of Refraction.
|
|
14
17
|
* @defaultValue `1.5`
|
|
@@ -33,6 +36,26 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
33
36
|
*/
|
|
34
37
|
get roughnessMetallicTexture(): Texture2D;
|
|
35
38
|
set roughnessMetallicTexture(value: Texture2D);
|
|
39
|
+
/**
|
|
40
|
+
* The strength of anisotropy, when anisotropyTexture is present, this value is multiplied by the blue channel.
|
|
41
|
+
* @defaultValue `0`
|
|
42
|
+
*/
|
|
43
|
+
get anisotropy(): number;
|
|
44
|
+
set anisotropy(value: number);
|
|
45
|
+
/**
|
|
46
|
+
* The rotation of the anisotropy in tangent, bitangent space, value in degrees.
|
|
47
|
+
* @defaultValue `0`
|
|
48
|
+
*/
|
|
49
|
+
get anisotropyRotation(): number;
|
|
50
|
+
set anisotropyRotation(value: number);
|
|
51
|
+
/**
|
|
52
|
+
* The anisotropy texture.
|
|
53
|
+
* @remarks
|
|
54
|
+
* Red and green channels represent the anisotropy direction in [-1, 1] tangent, bitangent space, to be rotated by anisotropyRotation.
|
|
55
|
+
* The blue channel contains strength as [0, 1] to be multiplied by anisotropy.
|
|
56
|
+
*/
|
|
57
|
+
get anisotropyTexture(): Texture2D;
|
|
58
|
+
set anisotropyTexture(value: Texture2D);
|
|
36
59
|
/**
|
|
37
60
|
* Create a pbr metallic-roughness workflow material instance.
|
|
38
61
|
* @param engine - Engine to which the material belongs
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
2
|
import { Entity } from "../Entity";
|
|
3
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
4
|
import { MeshRenderer } from "./MeshRenderer";
|
|
4
5
|
import { Skin } from "./Skin";
|
|
5
6
|
/**
|
|
@@ -38,6 +39,7 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
|
|
|
38
39
|
*/
|
|
39
40
|
get bones(): ReadonlyArray<Entity>;
|
|
40
41
|
set bones(value: ReadonlyArray<Entity>);
|
|
42
|
+
_updateShaderData(context: RenderContext, onlyMVP: boolean): void;
|
|
41
43
|
private _checkBlendShapeWeightLength;
|
|
42
44
|
private _onLocalBoundsChanged;
|
|
43
45
|
private _getEntityHierarchyPath;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Rand } from "@galacean/engine-math";
|
|
1
2
|
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
2
3
|
import { ParticleScaleMode } from "../enums/ParticleScaleMode";
|
|
3
4
|
import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
|
|
@@ -54,6 +55,7 @@ export declare class MainModule implements ICustomClone {
|
|
|
54
55
|
scalingMode: ParticleScaleMode;
|
|
55
56
|
/** If set to true, the Particle Generator automatically begins to play on startup. */
|
|
56
57
|
playOnEnabled: boolean;
|
|
58
|
+
readonly _gravityModifierRand: Rand;
|
|
57
59
|
private _generator;
|
|
58
60
|
private _gravity;
|
|
59
61
|
/**
|
|
@@ -4,9 +4,9 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
4
4
|
*/
|
|
5
5
|
export declare abstract class BaseShape {
|
|
6
6
|
/** The type of shape to emit particles from. */
|
|
7
|
-
shapeType: ParticleShapeType;
|
|
7
|
+
abstract readonly shapeType: ParticleShapeType;
|
|
8
8
|
/** Specifies whether the ShapeModule is enabled or disabled. */
|
|
9
|
-
|
|
9
|
+
enabled: boolean;
|
|
10
10
|
/** Randomizes the starting direction of particles. */
|
|
11
11
|
randomDirectionAmount: number;
|
|
12
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Vector3 } from "@galacean/engine-math";
|
|
2
2
|
import { BaseShape } from "./BaseShape";
|
|
3
|
+
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
3
4
|
/**
|
|
4
5
|
* Particle shape that emits particles from a box.
|
|
5
6
|
*/
|
|
6
7
|
export declare class BoxShape extends BaseShape {
|
|
7
8
|
private static _tempVector30;
|
|
9
|
+
readonly shapeType = ParticleShapeType.Box;
|
|
8
10
|
/** The size of the box. */
|
|
9
11
|
size: Vector3;
|
|
10
|
-
constructor();
|
|
11
12
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
2
|
import { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
|
|
3
|
+
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
3
4
|
/**
|
|
4
5
|
* Particle shape that emits particles from a circle.
|
|
5
6
|
*/
|
|
6
7
|
export declare class CircleShape extends BaseShape {
|
|
7
8
|
private static _tempPositionPoint;
|
|
9
|
+
readonly shapeType = ParticleShapeType.Circle;
|
|
8
10
|
/** Radius of the shape to emit particles from. */
|
|
9
11
|
radius: number;
|
|
10
12
|
/** Angle of the circle arc to emit particles from. */
|
|
@@ -13,5 +15,4 @@ export declare class CircleShape extends BaseShape {
|
|
|
13
15
|
arcMode: ParticleShapeArcMode;
|
|
14
16
|
/** The speed of complete 360 degree rotation. */
|
|
15
17
|
arcSpeed: number;
|
|
16
|
-
constructor();
|
|
17
18
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
+
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
2
3
|
/**
|
|
3
4
|
* Cone shape.
|
|
4
5
|
*/
|
|
@@ -7,6 +8,7 @@ export declare class ConeShape extends BaseShape {
|
|
|
7
8
|
private static _tempVector21;
|
|
8
9
|
private static _tempVector30;
|
|
9
10
|
private static _tempVector31;
|
|
11
|
+
readonly shapeType = ParticleShapeType.Cone;
|
|
10
12
|
/** Angle of the cone to emit particles from. */
|
|
11
13
|
angle: number;
|
|
12
14
|
/** Radius of the shape to emit particles from. */
|
|
@@ -15,7 +17,6 @@ export declare class ConeShape extends BaseShape {
|
|
|
15
17
|
length: number;
|
|
16
18
|
/** Cone emitter type. */
|
|
17
19
|
emitType: ConeEmitType;
|
|
18
|
-
constructor();
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Cone emitter type.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
+
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
2
3
|
/**
|
|
3
4
|
* Particle shape that emits particles from a hemisphere.
|
|
4
5
|
*/
|
|
5
6
|
export declare class HemisphereShape extends BaseShape {
|
|
7
|
+
readonly shapeType = ParticleShapeType.Hemisphere;
|
|
6
8
|
/** Radius of the shape to emit particles from. */
|
|
7
9
|
radius: number;
|
|
8
|
-
constructor();
|
|
9
10
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
+
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
2
3
|
/**
|
|
3
4
|
* Particle shape that emits particles from a sphere.
|
|
4
5
|
*/
|
|
5
6
|
export declare class SphereShape extends BaseShape {
|
|
7
|
+
readonly shapeType = ParticleShapeType.Sphere;
|
|
6
8
|
/** Radius of the shape to emit particles from. */
|
|
7
9
|
radius: number;
|
|
8
|
-
constructor();
|
|
9
10
|
}
|
|
@@ -4,3 +4,4 @@ export { ConeShape, ConeEmitType } from "./ConeShape";
|
|
|
4
4
|
export { HemisphereShape } from "./HemisphereShape";
|
|
5
5
|
export { SphereShape } from "./SphereShape";
|
|
6
6
|
export { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
|
|
7
|
+
export { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Entity } from "../Entity";
|
|
2
2
|
import { Vector3 } from "@galacean/engine-math";
|
|
3
|
+
import { ColliderShape } from "./shape";
|
|
3
4
|
/**
|
|
4
5
|
* Structure used to get information back from a raycast or a sweep.
|
|
5
6
|
*/
|
|
@@ -12,4 +13,6 @@ export declare class HitResult {
|
|
|
12
13
|
point: Vector3;
|
|
13
14
|
/** The normal of the surface the ray hit. */
|
|
14
15
|
normal: Vector3;
|
|
16
|
+
/** The shape of the collider that was hit. */
|
|
17
|
+
shape: ColliderShape;
|
|
15
18
|
}
|
|
@@ -5,10 +5,10 @@ import { TextureCubeFace } from "../texture";
|
|
|
5
5
|
export interface IPlatformRenderTarget {
|
|
6
6
|
/**
|
|
7
7
|
* Set which face and mipLevel of the cube texture to render to.
|
|
8
|
-
* @param faceIndex - Cube texture face
|
|
9
8
|
* @param mipLevel - Set mip level the data want to write
|
|
9
|
+
* @param faceIndex - Cube texture face
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
activeRenderTarget(mipLevel: number, faceIndex?: TextureCubeFace): void;
|
|
12
12
|
/**
|
|
13
13
|
* Blit FBO.
|
|
14
14
|
*/
|