@galacean/engine-core 2.0.0-alpha.49 → 2.0.0-alpha.50
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 +89 -74
- package/dist/main.js.map +1 -1
- package/dist/module.js +89 -74
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/assembler/ISpriteRenderer.d.ts +2 -2
- package/types/2d/sprite/Sprite.d.ts +3 -3
- package/types/2d/sprite/SpriteMask.d.ts +1 -1
- package/types/2d/sprite/SpriteRenderer.d.ts +1 -1
- package/types/2d/text/CharInfo.d.ts +1 -1
- package/types/2d/text/Font.d.ts +1 -1
- package/types/2d/text/SubFont.d.ts +2 -2
- package/types/2d/text/TextRenderer.d.ts +2 -2
- package/types/Background.d.ts +2 -2
- package/types/Camera.d.ts +3 -3
- package/types/Component.d.ts +2 -2
- package/types/Engine.d.ts +1 -1
- package/types/Entity.d.ts +19 -19
- package/types/RenderPipeline/Blitter.d.ts +1 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -1
- package/types/RenderPipeline/PipelineUtils.d.ts +1 -1
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +1 -1
- package/types/RenderPipeline/RenderContext.d.ts +5 -5
- package/types/RenderPipeline/VertexArea.d.ts +2 -2
- package/types/Renderer.d.ts +8 -8
- package/types/Scene.d.ts +7 -8
- package/types/SceneManager.d.ts +5 -6
- package/types/Utils.d.ts +1 -1
- package/types/animation/AnimationClipCurveBinding.d.ts +1 -1
- package/types/animation/AnimationEvent.d.ts +2 -2
- package/types/animation/Animator.d.ts +1 -1
- package/types/animation/AnimatorController.d.ts +2 -2
- package/types/animation/AnimatorControllerParameter.d.ts +1 -1
- package/types/animation/AnimatorState.d.ts +3 -3
- package/types/animation/AnimatorStateInstance.d.ts +1 -1
- package/types/animation/AnimatorStateTransition.d.ts +1 -1
- package/types/animation/Keyframe.d.ts +1 -1
- package/types/animation/animationCurve/AnimationCurve.d.ts +2 -2
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +4 -4
- package/types/animation/internal/AnimatorLayerData.d.ts +1 -1
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +4 -4
- package/types/asset/AssetPromise.d.ts +4 -4
- package/types/asset/JSONAsset.d.ts +1 -1
- package/types/asset/Loader.d.ts +2 -2
- package/types/asset/ResourceManager.d.ts +1 -1
- package/types/audio/AudioClip.d.ts +1 -1
- package/types/audio/AudioSource.d.ts +2 -2
- package/types/env-probe/Probe.d.ts +1 -1
- package/types/graphic/Buffer.d.ts +2 -2
- package/types/graphic/Mesh.d.ts +2 -2
- package/types/graphic/Primitive.d.ts +5 -5
- package/types/input/keyboard/KeyboardManager.d.ts +1 -1
- package/types/input/pointer/emitter/IHitResult.d.ts +1 -1
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +3 -3
- package/types/lighting/KHR_lights.d.ts +13 -1
- package/types/mesh/BlendShape.d.ts +1 -1
- package/types/mesh/BlendShapeFrame.d.ts +4 -4
- package/types/mesh/BlendShapeManager.d.ts +1 -1
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/ModelMesh.d.ts +4 -4
- package/types/mesh/PrimitiveMesh.d.ts +1 -1
- package/types/mesh/SkinnedMeshRenderer.d.ts +1 -1
- package/types/particle/ParticleGenerator.d.ts +1 -1
- package/types/particle/modules/ParticleCompositeCurve.d.ts +2 -2
- package/types/particle/modules/ParticleCompositeGradient.d.ts +1 -1
- package/types/particle/modules/ParticleGeneratorModule.d.ts +1 -1
- package/types/particle/modules/ParticleGradient.d.ts +4 -4
- package/types/particle/modules/SubEmitter.d.ts +2 -2
- package/types/particle/modules/shape/MeshShape.d.ts +2 -2
- package/types/particle/modules/shape/ShapeUtils.d.ts +1 -1
- package/types/physics/HitResult.d.ts +2 -2
- package/types/physics/joint/Joint.d.ts +3 -3
- package/types/physics/shape/ColliderShape.d.ts +3 -3
- package/types/physics/shape/MeshColliderShape.d.ts +2 -2
- package/types/postProcess/PostProcess.d.ts +6 -6
- package/types/postProcess/PostProcessEffectParameter.d.ts +2 -2
- package/types/postProcess/PostProcessManager.d.ts +1 -1
- package/types/postProcess/PostProcessPass.d.ts +2 -2
- package/types/shader/Shader.d.ts +8 -8
- package/types/shader/ShaderData.d.ts +3 -3
- package/types/shader/ShaderMacro.d.ts +2 -2
- package/types/shader/state/BlendState.d.ts +1 -1
- package/types/shader/state/DepthState.d.ts +1 -1
- package/types/shader/state/RasterState.d.ts +1 -1
- package/types/shader/state/RenderState.d.ts +1 -1
- package/types/shader/state/StencilState.d.ts +1 -1
- package/types/sky/Sky.d.ts +4 -4
- package/types/texture/RenderTarget.d.ts +3 -3
- package/types/utils/DisorderedArray.d.ts +1 -1
- package/types/xr/XRManager.d.ts +2 -2
|
@@ -25,10 +25,10 @@ export declare class AnimationCurveOwner<V extends KeyframeValueType> {
|
|
|
25
25
|
cureType: IAnimationCurveCalculator<V>;
|
|
26
26
|
updateMark: number;
|
|
27
27
|
private _assembler;
|
|
28
|
-
constructor(target: Entity, type: ComponentConstructor, component: Component, property: string, getProperty: string, cureType: IAnimationCurveCalculator<V>);
|
|
29
|
-
evaluateValue(curve: AnimationCurve<V>, time: number, additive: boolean): KeyframeValueType;
|
|
30
|
-
evaluateCrossFadeValue(srcCurve: AnimationCurve<V
|
|
31
|
-
crossFadeFromPoseAndApplyValue(destCurve: AnimationCurve<V
|
|
28
|
+
constructor(target: Entity, type: ComponentConstructor, component: Component, property: string, getProperty: string | undefined, cureType: IAnimationCurveCalculator<V>);
|
|
29
|
+
evaluateValue(curve: AnimationCurve<V>, time: number, additive: boolean): KeyframeValueType | undefined;
|
|
30
|
+
evaluateCrossFadeValue(srcCurve: AnimationCurve<V> | null | undefined, destCurve: AnimationCurve<V> | null | undefined, srcTime: number, destTime: number, crossWeight: number, additive: boolean): KeyframeValueType;
|
|
31
|
+
crossFadeFromPoseAndApplyValue(destCurve: AnimationCurve<V> | null | undefined, destTime: number, crossWeight: number, additive: boolean): KeyframeValueType;
|
|
32
32
|
revertDefaultValue(): void;
|
|
33
33
|
getEvaluateValue(out: V): V;
|
|
34
34
|
saveDefaultValue(): void;
|
|
@@ -57,8 +57,8 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
|
57
57
|
* @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
|
|
58
58
|
* @returns AssetPromise
|
|
59
59
|
*/
|
|
60
|
-
onProgress(onTaskComplete
|
|
61
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1
|
|
60
|
+
onProgress(onTaskComplete?: (loaded: number, total: number) => void, onTaskDetail?: (identifier: string, loaded: number, total: number) => void): AssetPromise<T>;
|
|
61
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): AssetPromise<TResult1 | TResult2>;
|
|
62
62
|
/**
|
|
63
63
|
* Attaches a callback for only the rejection of the Promise.
|
|
64
64
|
* @param onRejected - The callback to execute when the Promise is rejected.
|
|
@@ -77,10 +77,10 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
|
|
|
77
77
|
* Cancel promise request.
|
|
78
78
|
* @returns Asset promise
|
|
79
79
|
*/
|
|
80
|
-
cancel(): AssetPromise<T
|
|
80
|
+
cancel(): AssetPromise<T> | undefined;
|
|
81
81
|
}
|
|
82
82
|
interface AssetPromiseExecutor<T> {
|
|
83
|
-
(resolve: (value?: T | PromiseLike<T>) => void, reject
|
|
83
|
+
(resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void, setTaskCompleteProgress: TaskCompleteCallback, setTaskDetailProgress: TaskDetailCallback, onCancel: (callback: () => void) => void): void;
|
|
84
84
|
}
|
|
85
85
|
type TaskCompleteCallback = (loaded: number, total: number) => void;
|
|
86
86
|
type TaskDetailCallback = (url: string, loaded: number, total: number) => void;
|
package/types/asset/Loader.d.ts
CHANGED
|
@@ -28,10 +28,10 @@ export declare abstract class Loader<T> {
|
|
|
28
28
|
* @param obj - class object
|
|
29
29
|
* @returns class name
|
|
30
30
|
*/
|
|
31
|
-
static getClassName(obj:
|
|
31
|
+
static getClassName(obj: object): string | undefined;
|
|
32
32
|
private static _engineObjects;
|
|
33
33
|
private static _classNameMap;
|
|
34
34
|
constructor(useCache: boolean);
|
|
35
|
-
initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void
|
|
35
|
+
initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void> | void;
|
|
36
36
|
abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T>;
|
|
37
37
|
}
|
|
@@ -21,8 +21,8 @@ export declare class AudioSource extends Component {
|
|
|
21
21
|
/**
|
|
22
22
|
* The audio clip to play.
|
|
23
23
|
*/
|
|
24
|
-
get clip(): AudioClip;
|
|
25
|
-
set clip(value: AudioClip);
|
|
24
|
+
get clip(): AudioClip | null;
|
|
25
|
+
set clip(value: AudioClip | null);
|
|
26
26
|
/**
|
|
27
27
|
* Whether the clip playing right now.
|
|
28
28
|
*/
|
|
@@ -45,7 +45,7 @@ export declare abstract class Probe extends Script {
|
|
|
45
45
|
* Provide hooks for users to exchange Texture.
|
|
46
46
|
* @remarks Prevent issue: Feedback Loops Between Textures and the Framebuffer.
|
|
47
47
|
*/
|
|
48
|
-
onTextureChange(renderColorTexture: Texture): void;
|
|
48
|
+
onTextureChange(renderColorTexture: Texture | null): void;
|
|
49
49
|
onBeginRender(camera: Camera): void;
|
|
50
50
|
onEndRender(camera: Camera): void;
|
|
51
51
|
protected _reset(): void;
|
|
@@ -41,7 +41,7 @@ export declare class Buffer extends GraphicsResource {
|
|
|
41
41
|
* Buffer must be readable.
|
|
42
42
|
* If the data you get is modified, must call `setData()` to update buffer to GPU.
|
|
43
43
|
*/
|
|
44
|
-
get data(): Uint8Array;
|
|
44
|
+
get data(): Uint8Array | null;
|
|
45
45
|
/**
|
|
46
46
|
* Create Buffer.
|
|
47
47
|
* @param engine - Engine
|
|
@@ -91,7 +91,7 @@ export declare class Buffer extends GraphicsResource {
|
|
|
91
91
|
* @param dataLength - Data length
|
|
92
92
|
* @param options - Update strategy: None/Discard/NoOverwrite
|
|
93
93
|
*/
|
|
94
|
-
setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number, options: SetDataOptions): void;
|
|
94
|
+
setData(data: ArrayBuffer | ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number | undefined, options: SetDataOptions): void;
|
|
95
95
|
/**
|
|
96
96
|
* Get buffer data.
|
|
97
97
|
* @param data - Output buffer data
|
package/types/graphic/Mesh.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { Primitive } from "./Primitive";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare abstract class Mesh extends ReferResource {
|
|
15
15
|
/** Name. */
|
|
16
|
-
name: string;
|
|
16
|
+
name: string | undefined;
|
|
17
17
|
/** @internal */
|
|
18
18
|
_primitive: Primitive;
|
|
19
19
|
/** @internal */
|
|
@@ -87,7 +87,7 @@ export declare abstract class Mesh extends ReferResource {
|
|
|
87
87
|
/**
|
|
88
88
|
* @internal
|
|
89
89
|
*/
|
|
90
|
-
_setVertexBufferBinding(index: number, binding: VertexBufferBinding): void;
|
|
90
|
+
_setVertexBufferBinding(index: number, binding: VertexBufferBinding | null): void;
|
|
91
91
|
/**
|
|
92
92
|
* @internal
|
|
93
93
|
*/
|
|
@@ -12,11 +12,11 @@ import { VertexElement } from "./VertexElement";
|
|
|
12
12
|
export declare class Primitive extends GraphicsResource {
|
|
13
13
|
enableVAO: boolean;
|
|
14
14
|
instanceCount: number;
|
|
15
|
-
vertexBufferBindings: VertexBufferBinding[];
|
|
15
|
+
vertexBufferBindings: (VertexBufferBinding | null)[];
|
|
16
16
|
/** @internal */
|
|
17
17
|
_vertexElementMap: Record<string, VertexElement>;
|
|
18
18
|
/** @internal */
|
|
19
|
-
_glIndexType: number;
|
|
19
|
+
_glIndexType: number | undefined;
|
|
20
20
|
/** @internal */
|
|
21
21
|
_glIndexByteCount: number;
|
|
22
22
|
/** @internal */
|
|
@@ -25,7 +25,7 @@ export declare class Primitive extends GraphicsResource {
|
|
|
25
25
|
private _indexBufferBinding;
|
|
26
26
|
private _platformPrimitive;
|
|
27
27
|
get vertexElements(): VertexElement[];
|
|
28
|
-
get indexBufferBinding(): IndexBufferBinding;
|
|
28
|
+
get indexBufferBinding(): IndexBufferBinding | null;
|
|
29
29
|
constructor(engine: Engine);
|
|
30
30
|
addVertexElement(element: VertexElement): void;
|
|
31
31
|
removeVertexElement(index: number): void;
|
|
@@ -35,13 +35,13 @@ export declare class Primitive extends GraphicsResource {
|
|
|
35
35
|
*/
|
|
36
36
|
setVertexElement(index: number, element: VertexElement): void;
|
|
37
37
|
setVertexElementsLength(length: number): void;
|
|
38
|
-
setVertexBufferBinding(index: number, binding: VertexBufferBinding): void;
|
|
38
|
+
setVertexBufferBinding(index: number, binding: VertexBufferBinding | null): void;
|
|
39
39
|
/**
|
|
40
40
|
* Set vertex buffer binding.
|
|
41
41
|
* @param vertexBufferBindings - Vertex buffer binding
|
|
42
42
|
* @param firstIndex - First vertex buffer index, the default value is 0
|
|
43
43
|
*/
|
|
44
|
-
setVertexBufferBindings(vertexBufferBindings: VertexBufferBinding[], firstIndex?: number): void;
|
|
44
|
+
setVertexBufferBindings(vertexBufferBindings: (VertexBufferBinding | null)[], firstIndex?: number): void;
|
|
45
45
|
setIndexBufferBinding(binding: IndexBufferBinding | null): void;
|
|
46
46
|
draw(shaderProgram: ShaderProgram, subMesh: SubPrimitive): void;
|
|
47
47
|
_addReferCount(value: number): void;
|
|
@@ -8,7 +8,7 @@ import { IInput } from "../interface/IInput";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class KeyboardManager implements IInput {
|
|
10
10
|
/** @internal */
|
|
11
|
-
_curHeldDownKeyToIndexMap: number[];
|
|
11
|
+
_curHeldDownKeyToIndexMap: (number | null)[];
|
|
12
12
|
/** @internal */
|
|
13
13
|
_upKeyToFrameCountMap: number[];
|
|
14
14
|
/** @internal */
|
|
@@ -6,9 +6,9 @@ import { PointerEventEmitter } from "./PointerEventEmitter";
|
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
export declare class PhysicsPointerEventEmitter extends PointerEventEmitter {
|
|
9
|
-
protected _enteredEntity: Entity;
|
|
10
|
-
protected _pressedEntity: Entity;
|
|
11
|
-
protected _draggedEntity: Entity;
|
|
9
|
+
protected _enteredEntity: Entity | null;
|
|
10
|
+
protected _pressedEntity: Entity | null;
|
|
11
|
+
protected _draggedEntity: Entity | null;
|
|
12
12
|
processRaycast(scenes: readonly Scene[], pointer: Pointer): void;
|
|
13
13
|
processDrag(pointer: Pointer): void;
|
|
14
14
|
processDown(pointer: Pointer): void;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
import { AmbientLight } from "./AmbientLight";
|
|
2
|
+
import { DirectLight } from "./DirectLight";
|
|
3
|
+
import { PointLight } from "./PointLight";
|
|
4
|
+
import { SpotLight } from "./SpotLight";
|
|
1
5
|
declare class KHR_lights {
|
|
2
|
-
static parseLights(lights: any):
|
|
6
|
+
static parseLights(lights: any): {
|
|
7
|
+
component: typeof AmbientLight | typeof DirectLight | typeof PointLight | typeof SpotLight;
|
|
8
|
+
props: {
|
|
9
|
+
name: string;
|
|
10
|
+
color: number[];
|
|
11
|
+
intensity: number;
|
|
12
|
+
angle?: number;
|
|
13
|
+
};
|
|
14
|
+
}[];
|
|
3
15
|
}
|
|
4
16
|
export { KHR_lights };
|
|
@@ -32,7 +32,7 @@ export declare class BlendShape {
|
|
|
32
32
|
* @param deltaNormals - Delta normals for the frame being added
|
|
33
33
|
* @param deltaTangents - Delta tangents for the frame being added
|
|
34
34
|
*/
|
|
35
|
-
addFrame(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]): BlendShapeFrame;
|
|
35
|
+
addFrame(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[] | null, deltaTangents?: Vector3[] | null): BlendShapeFrame;
|
|
36
36
|
/**
|
|
37
37
|
* Add a BlendShapeFrame.
|
|
38
38
|
* @param frame - The BlendShapeFrame.
|
|
@@ -16,19 +16,19 @@ export declare class BlendShapeFrame {
|
|
|
16
16
|
* Delta positions for the frame being added.
|
|
17
17
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
18
18
|
*/
|
|
19
|
-
get deltaPositions(): Vector3[];
|
|
19
|
+
get deltaPositions(): Vector3[] | null;
|
|
20
20
|
set deltaPositions(value: Vector3[]);
|
|
21
21
|
/**
|
|
22
22
|
* Delta normals for the frame being added.
|
|
23
23
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
24
24
|
*/
|
|
25
|
-
get deltaNormals(): Vector3[];
|
|
25
|
+
get deltaNormals(): Vector3[] | null;
|
|
26
26
|
set deltaNormals(value: Vector3[]);
|
|
27
27
|
/**
|
|
28
28
|
* Delta tangents for the frame being added.
|
|
29
29
|
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
30
30
|
*/
|
|
31
|
-
get deltaTangents(): Vector3[];
|
|
31
|
+
get deltaTangents(): Vector3[] | null;
|
|
32
32
|
set deltaTangents(value: Vector3[]);
|
|
33
33
|
/**
|
|
34
34
|
* Create a BlendShapeFrame.
|
|
@@ -37,7 +37,7 @@ export declare class BlendShapeFrame {
|
|
|
37
37
|
* @param deltaNormals - Delta normals for the frame being added
|
|
38
38
|
* @param deltaTangents - Delta tangents for the frame being added
|
|
39
39
|
*/
|
|
40
|
-
constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]);
|
|
40
|
+
constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[] | null, deltaTangents?: Vector3[] | null);
|
|
41
41
|
/**
|
|
42
42
|
* @internal
|
|
43
43
|
*/
|
|
@@ -11,11 +11,11 @@ export declare class BufferMesh extends Mesh {
|
|
|
11
11
|
/**
|
|
12
12
|
* Vertex buffer binding collection.
|
|
13
13
|
*/
|
|
14
|
-
get vertexBufferBindings(): Readonly<VertexBufferBinding[]>;
|
|
14
|
+
get vertexBufferBindings(): Readonly<(VertexBufferBinding | null)[]>;
|
|
15
15
|
/**
|
|
16
16
|
* Index buffer binding.
|
|
17
17
|
*/
|
|
18
|
-
get indexBufferBinding(): IndexBufferBinding;
|
|
18
|
+
get indexBufferBinding(): IndexBufferBinding | null;
|
|
19
19
|
/**
|
|
20
20
|
* Vertex element collection.
|
|
21
21
|
*/
|
|
@@ -62,7 +62,7 @@ export declare class ModelMesh extends Mesh {
|
|
|
62
62
|
/**
|
|
63
63
|
* Vertex buffer binding collection.
|
|
64
64
|
*/
|
|
65
|
-
get vertexBufferBindings(): ReadonlyArray<VertexBufferBinding>;
|
|
65
|
+
get vertexBufferBindings(): ReadonlyArray<VertexBufferBinding | null>;
|
|
66
66
|
/**
|
|
67
67
|
* BlendShapes of this ModelMesh.
|
|
68
68
|
*/
|
|
@@ -167,7 +167,7 @@ export declare class ModelMesh extends Mesh {
|
|
|
167
167
|
/**
|
|
168
168
|
* Get indices for the mesh.
|
|
169
169
|
*/
|
|
170
|
-
getIndices(): Uint8Array | Uint16Array | Uint32Array;
|
|
170
|
+
getIndices(): Uint8Array | Uint16Array | Uint32Array | null;
|
|
171
171
|
/**
|
|
172
172
|
* Set vertex elements.
|
|
173
173
|
* @param elements - Vertex element collection
|
|
@@ -232,11 +232,11 @@ export declare class ModelMesh extends Mesh {
|
|
|
232
232
|
/**
|
|
233
233
|
* @internal
|
|
234
234
|
*/
|
|
235
|
-
_setVertexBufferBinding(index: number, binding: VertexBufferBinding): void;
|
|
235
|
+
_setVertexBufferBinding(index: number, binding: VertexBufferBinding | null): void;
|
|
236
236
|
/**
|
|
237
237
|
* @internal
|
|
238
238
|
*/
|
|
239
|
-
_getVertexTypedArray(vertexDataBuffer: ArrayBufferLike, dataType: DataType): TypedArray;
|
|
239
|
+
_getVertexTypedArray(vertexDataBuffer: ArrayBufferLike, dataType: DataType): TypedArray | undefined;
|
|
240
240
|
/**
|
|
241
241
|
* @internal
|
|
242
242
|
*/
|
|
@@ -127,7 +127,7 @@ export declare class PrimitiveMesh {
|
|
|
127
127
|
/**
|
|
128
128
|
* @internal
|
|
129
129
|
*/
|
|
130
|
-
static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
130
|
+
static _setCylinderData(cylinderMesh: ModelMesh, radiusTop: number | undefined, radiusBottom: number | undefined, height: number | undefined, radialSegments: number | undefined, heightSegments: number | undefined, noLongerAccessible: boolean, isRestoreMode: boolean, restoreVertexBuffer?: Buffer): void;
|
|
131
131
|
/**
|
|
132
132
|
* @internal
|
|
133
133
|
*/
|
|
@@ -213,7 +213,7 @@ export declare class ParticleGenerator extends DataObject implements ICloneHook<
|
|
|
213
213
|
/**
|
|
214
214
|
* @internal
|
|
215
215
|
*/
|
|
216
|
-
_emitFromSubEmitter(count: number, worldPosition: Vector3, inheritColor: Color, inheritSize: Vector3, inheritRotation: Vector3, worldDirection?: Vector3): void;
|
|
216
|
+
_emitFromSubEmitter(count: number, worldPosition: Vector3, inheritColor: Color | null, inheritSize: Vector3 | null, inheritRotation: Vector3 | null, worldDirection?: Vector3 | null): void;
|
|
217
217
|
private _addFeedbackParticle;
|
|
218
218
|
private _clearActiveParticles;
|
|
219
219
|
private _retireActiveParticles;
|
|
@@ -77,11 +77,11 @@ export declare class ParticleCompositeCurve extends DataObject {
|
|
|
77
77
|
* @param lerpFactor - Lerp factor between two constants or curves, Valid when `mode` is set to `TwoConstants` or `TwoCurves`
|
|
78
78
|
* @returns - The result curve value
|
|
79
79
|
*/
|
|
80
|
-
evaluate(time: number, lerpFactor: number): number;
|
|
80
|
+
evaluate(time: number | undefined, lerpFactor: number | undefined): number;
|
|
81
81
|
/**
|
|
82
82
|
* @internal
|
|
83
83
|
*/
|
|
84
|
-
_evaluateCumulative(normalizedAge: number, lerpFactor: number): number;
|
|
84
|
+
_evaluateCumulative(normalizedAge: number, lerpFactor: number | undefined): number;
|
|
85
85
|
/**
|
|
86
86
|
* @internal
|
|
87
87
|
*/
|
|
@@ -57,5 +57,5 @@ export declare class ParticleCompositeGradient extends DataObject {
|
|
|
57
57
|
* @param lerpFactor - Lerp factor between two constants or gradients, Valid when `mode` is set to `TwoConstants` or `TwoGradients`
|
|
58
58
|
* @param out - The result color
|
|
59
59
|
*/
|
|
60
|
-
evaluate(time: number, lerpFactor: number, out: Color): void;
|
|
60
|
+
evaluate(time: number | undefined, lerpFactor: number | undefined, out: Color): void;
|
|
61
61
|
}
|
|
@@ -18,6 +18,6 @@ export declare abstract class ParticleGeneratorModule extends DataObject {
|
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
20
|
constructor(generator: ParticleGenerator);
|
|
21
|
-
protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro, enableMacro: ShaderMacro): ShaderMacro;
|
|
21
|
+
protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro | null, enableMacro: ShaderMacro | null): ShaderMacro | null;
|
|
22
22
|
protected _onCompositeCurveChange(lastValue: ParticleCompositeCurve, value: ParticleCompositeCurve): void;
|
|
23
23
|
}
|
|
@@ -23,7 +23,7 @@ export declare class ParticleGradient extends DataObject {
|
|
|
23
23
|
* @param colorKeys - The color keys of the gradient
|
|
24
24
|
* @param alphaKeys - The alpha keys of the gradient
|
|
25
25
|
*/
|
|
26
|
-
constructor(colorKeys?: GradientColorKey[], alphaKeys?: GradientAlphaKey[]);
|
|
26
|
+
constructor(colorKeys?: GradientColorKey[] | null, alphaKeys?: GradientAlphaKey[] | null);
|
|
27
27
|
/**
|
|
28
28
|
* Add a color key to the gradient.
|
|
29
29
|
* @param key - The key
|
|
@@ -84,7 +84,7 @@ export declare class ParticleGradient extends DataObject {
|
|
|
84
84
|
*/
|
|
85
85
|
export declare class GradientColorKey extends DataObject {
|
|
86
86
|
/** @internal */
|
|
87
|
-
_onValueChanged: () => void;
|
|
87
|
+
_onValueChanged: (() => void) | null;
|
|
88
88
|
private _time;
|
|
89
89
|
private _color;
|
|
90
90
|
/**
|
|
@@ -102,14 +102,14 @@ export declare class GradientColorKey extends DataObject {
|
|
|
102
102
|
* @param time - The time of the gradient colorKey
|
|
103
103
|
* @param color - The alpha component of the gradient colorKey
|
|
104
104
|
*/
|
|
105
|
-
constructor(time: number, color: Color);
|
|
105
|
+
constructor(time: number, color: Color | undefined);
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* The alpha key of the particle gradient.
|
|
109
109
|
*/
|
|
110
110
|
export declare class GradientAlphaKey extends DataObject {
|
|
111
111
|
/** @internal */
|
|
112
|
-
_onValueChanged: () => void;
|
|
112
|
+
_onValueChanged: (() => void) | null;
|
|
113
113
|
private _time;
|
|
114
114
|
private _alpha;
|
|
115
115
|
/**
|
|
@@ -15,13 +15,13 @@ export declare class SubEmitter extends DataObject {
|
|
|
15
15
|
/** Number of sub particles emitted per parent event. */
|
|
16
16
|
emitCount: number;
|
|
17
17
|
/** @internal */
|
|
18
|
-
_module: SubEmittersModule;
|
|
18
|
+
_module: SubEmittersModule | null;
|
|
19
19
|
private _emitter;
|
|
20
20
|
private _type;
|
|
21
21
|
/**
|
|
22
22
|
* Target particle renderer the sub particles emit into.
|
|
23
23
|
*/
|
|
24
|
-
get emitter(): ParticleRenderer;
|
|
24
|
+
get emitter(): ParticleRenderer | null;
|
|
25
25
|
set emitter(value: ParticleRenderer);
|
|
26
26
|
/**
|
|
27
27
|
* Which parent-particle event drives this slot.
|
|
@@ -16,8 +16,8 @@ export declare class MeshShape extends BaseShape implements ICloneHook<MeshShape
|
|
|
16
16
|
/**
|
|
17
17
|
* Mesh to emit particles from.
|
|
18
18
|
*/
|
|
19
|
-
get mesh(): ModelMesh;
|
|
20
|
-
set mesh(value: ModelMesh);
|
|
19
|
+
get mesh(): ModelMesh | null;
|
|
20
|
+
set mesh(value: ModelMesh | null);
|
|
21
21
|
/**
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
@@ -9,5 +9,5 @@ export declare class ShapeUtils {
|
|
|
9
9
|
static randomPointInsideUnitCircle(out: Vector2, rand: Rand): void;
|
|
10
10
|
static _randomPointUnitSphere(out: Vector3, rand: Rand): void;
|
|
11
11
|
static _randomPointInsideUnitSphere(out: Vector3, rand: Rand): void;
|
|
12
|
-
static _randomPointInsideHalfUnitBox(out: Vector3, rand
|
|
12
|
+
static _randomPointInsideHalfUnitBox(out: Vector3, rand: Rand): void;
|
|
13
13
|
}
|
|
@@ -6,7 +6,7 @@ import { ColliderShape } from "./shape";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class HitResult {
|
|
8
8
|
/** The entity that was hit. */
|
|
9
|
-
entity: Entity;
|
|
9
|
+
entity: Entity | null;
|
|
10
10
|
/** The distance from the ray's origin to the impact point. */
|
|
11
11
|
distance: number;
|
|
12
12
|
/** The impact point in world space where the ray hit the collider. */
|
|
@@ -14,5 +14,5 @@ export declare class HitResult {
|
|
|
14
14
|
/** The normal of the surface the ray hit. */
|
|
15
15
|
normal: Vector3;
|
|
16
16
|
/** The shape of the collider that was hit. */
|
|
17
|
-
shape: ColliderShape;
|
|
17
|
+
shape: ColliderShape | null;
|
|
18
18
|
}
|
|
@@ -14,14 +14,14 @@ export declare abstract class Joint extends Component {
|
|
|
14
14
|
private static _tempMatrix;
|
|
15
15
|
protected _colliderInfo: JointColliderInfo;
|
|
16
16
|
protected _connectedColliderInfo: JointColliderInfo;
|
|
17
|
-
protected _nativeJoint: IJoint;
|
|
17
|
+
protected _nativeJoint: IJoint | null;
|
|
18
18
|
private _force;
|
|
19
19
|
private _torque;
|
|
20
20
|
private _automaticConnectedAnchor;
|
|
21
21
|
/**
|
|
22
22
|
* The connected collider.
|
|
23
23
|
*/
|
|
24
|
-
get connectedCollider(): Collider;
|
|
24
|
+
get connectedCollider(): Collider | null;
|
|
25
25
|
set connectedCollider(value: Collider);
|
|
26
26
|
/**
|
|
27
27
|
* The anchor position.
|
|
@@ -92,7 +92,7 @@ export declare abstract class Joint extends Component {
|
|
|
92
92
|
* @internal
|
|
93
93
|
*/
|
|
94
94
|
declare class JointColliderInfo extends DataObject {
|
|
95
|
-
collider: Collider;
|
|
95
|
+
collider: Collider | null;
|
|
96
96
|
anchor: Vector3;
|
|
97
97
|
actualAnchor: Vector3;
|
|
98
98
|
massScale: number;
|
|
@@ -10,9 +10,9 @@ import type { ICloneHook } from "../../clone/ICloneHook";
|
|
|
10
10
|
export declare abstract class ColliderShape extends DataObject implements ICloneHook<ColliderShape> {
|
|
11
11
|
private static _idGenerator;
|
|
12
12
|
/** @internal */
|
|
13
|
-
_collider: Collider;
|
|
13
|
+
_collider: Collider | null;
|
|
14
14
|
/** @internal */
|
|
15
|
-
_nativeShape: IColliderShape;
|
|
15
|
+
_nativeShape: IColliderShape | null;
|
|
16
16
|
/** @internal */
|
|
17
17
|
_isShapeAttached: boolean;
|
|
18
18
|
protected _id: number;
|
|
@@ -30,7 +30,7 @@ export declare abstract class ColliderShape extends DataObject implements IClone
|
|
|
30
30
|
/**
|
|
31
31
|
* Collider owner of this shape.
|
|
32
32
|
*/
|
|
33
|
-
get collider(): Collider;
|
|
33
|
+
get collider(): Collider | null;
|
|
34
34
|
/**
|
|
35
35
|
* Unique id for this shape.
|
|
36
36
|
*/
|
|
@@ -28,8 +28,8 @@ export declare class MeshColliderShape extends ColliderShape {
|
|
|
28
28
|
* The mesh used for collision detection.
|
|
29
29
|
* @remarks The mesh must have accessible data (not released after upload).
|
|
30
30
|
*/
|
|
31
|
-
get mesh(): ModelMesh;
|
|
32
|
-
set mesh(value: ModelMesh);
|
|
31
|
+
get mesh(): ModelMesh | null;
|
|
32
|
+
set mesh(value: ModelMesh | null);
|
|
33
33
|
/**
|
|
34
34
|
* {@inheritDoc ColliderShape.getClosestPoint}
|
|
35
35
|
*/
|
|
@@ -35,22 +35,22 @@ export declare class PostProcess extends Component {
|
|
|
35
35
|
/**
|
|
36
36
|
* Get the PostProcessEffect by type.
|
|
37
37
|
* @param type - The type of PostProcessEffect
|
|
38
|
-
* @returns The
|
|
38
|
+
* @returns The effect, or `undefined` if none matches.
|
|
39
39
|
*/
|
|
40
|
-
getEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T
|
|
40
|
+
getEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T> | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Add a PostProcessEffect to the PostProcess.
|
|
43
43
|
* @remarks Only one effect of the same type can be added to the PostProcess.
|
|
44
44
|
* @param type - The type of PostProcessEffect
|
|
45
|
-
* @returns The
|
|
45
|
+
* @returns The added effect, or `undefined` if the type already exists.
|
|
46
46
|
*/
|
|
47
|
-
addEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T
|
|
47
|
+
addEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T> | undefined;
|
|
48
48
|
/**
|
|
49
49
|
* Remove a PostProcessEffect from the PostProcess.
|
|
50
50
|
* @param type - The type of PostProcessEffect
|
|
51
|
-
* @returns The
|
|
51
|
+
* @returns The removed effect, or `undefined` if none matches.
|
|
52
52
|
*/
|
|
53
|
-
removeEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T
|
|
53
|
+
removeEffect<T extends typeof PostProcessEffect>(type: T): InstanceType<T> | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* @internal
|
|
56
56
|
* @inheritdoc
|
|
@@ -58,12 +58,12 @@ export declare class PostProcessEffectBoolParameter extends PostProcessEffectPar
|
|
|
58
58
|
/**
|
|
59
59
|
* Represents a texture parameter of a post process effect.
|
|
60
60
|
*/
|
|
61
|
-
export declare class PostProcessEffectTextureParameter extends PostProcessEffectParameter<Texture> {
|
|
61
|
+
export declare class PostProcessEffectTextureParameter extends PostProcessEffectParameter<Texture | null> {
|
|
62
62
|
/**
|
|
63
63
|
* Create a new texture parameter.
|
|
64
64
|
* @param value - The default texture of the parameter
|
|
65
65
|
*/
|
|
66
|
-
constructor(value: Texture);
|
|
66
|
+
constructor(value: Texture | null);
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Represents a color parameter of a post process effect.
|
|
@@ -60,7 +60,7 @@ export declare class PostProcessManager {
|
|
|
60
60
|
/**
|
|
61
61
|
* @internal
|
|
62
62
|
*/
|
|
63
|
-
_render(camera: Camera, srcRenderTarget: RenderTarget, destRenderTarget: RenderTarget): void;
|
|
63
|
+
_render(camera: Camera, srcRenderTarget: RenderTarget, destRenderTarget: RenderTarget | null): void;
|
|
64
64
|
/**
|
|
65
65
|
* @internal
|
|
66
66
|
*/
|
|
@@ -40,9 +40,9 @@ export declare abstract class PostProcessPass extends EngineObject {
|
|
|
40
40
|
* Execute the post process pass if it is active.
|
|
41
41
|
* @param camera - The camera used to render
|
|
42
42
|
* @param srcTexture - The source texture from last render target
|
|
43
|
-
* @param destTarget - The destination render target
|
|
43
|
+
* @param destTarget - The destination render target, or null for the canvas
|
|
44
44
|
*/
|
|
45
|
-
abstract onRender(camera: Camera, srcTexture: Texture2D, destTarget: RenderTarget): void;
|
|
45
|
+
abstract onRender(camera: Camera, srcTexture: Texture2D, destTarget: RenderTarget | null): void;
|
|
46
46
|
/**
|
|
47
47
|
* @internal
|
|
48
48
|
* @inheritdoc
|