@galacean/engine-core 0.0.0-experimental-0.9-plus.8 → 0.0.0-experimental-double11.1
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 +15851 -13975
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +15851 -13975
- package/dist/module.js +15837 -13971
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
- package/types/2d/enums/SpriteDirtyFlag.d.ts +13 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
- package/types/2d/index.d.ts +1 -0
- package/types/2d/sprite/Sprite.d.ts +5 -2
- package/types/2d/sprite/SpriteMask.d.ts +0 -11
- package/types/2d/sprite/SpriteRenderer.d.ts +15 -11
- package/types/2d/text/Font.d.ts +2 -7
- package/types/2d/text/TextRenderer.d.ts +0 -11
- package/types/2d/text/index.d.ts +1 -0
- package/types/Camera.d.ts +27 -8
- package/types/Component.d.ts +0 -8
- package/types/ComponentsDependencies.d.ts +17 -9
- package/types/ComponentsManager.d.ts +3 -2
- package/types/DisorderedArray.d.ts +4 -3
- package/types/Engine.d.ts +35 -43
- package/types/Entity.d.ts +2 -2
- package/types/ListenerUpdateFlag.d.ts +12 -0
- package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +8 -6
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/RenderElement.d.ts +8 -8
- package/types/RenderPipeline/RenderPass.d.ts +1 -1
- package/types/RenderPipeline/RenderQueue.d.ts +3 -5
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
- package/types/Renderer.d.ts +3 -12
- package/types/Scene.d.ts +0 -1
- package/types/Script.d.ts +18 -15
- package/types/Transform.d.ts +10 -12
- package/types/Utils.d.ts +28 -0
- package/types/animation/AnimationClip.d.ts +2 -1
- package/types/animation/Animator.d.ts +7 -4
- package/types/animation/AnimatorStateTransition.d.ts +12 -0
- package/types/animation/AnimatorTransitionBase.d.ts +10 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
- package/types/animation/enums/LayerState.d.ts +3 -1
- package/types/animation/enums/StateMachineState.d.ts +13 -0
- package/types/animation/index.d.ts +0 -4
- package/types/animation/internal/AnimatorPlayableObject.d.ts +23 -0
- package/types/animation/internal/CrossCurveData.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/IAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/PositionAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/RotationAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/ScaleAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/animation/internal/animationCurveOwner/Assembler/UniversalAnimationCurveOwnerAssembler.d.ts +1 -0
- package/types/asset/AssetType.d.ts +16 -16
- package/types/asset/LoadItem.d.ts +16 -9
- package/types/asset/ResourceManager.d.ts +17 -9
- package/types/asset/request.d.ts +7 -3
- package/types/base/Constant.d.ts +2 -1
- package/types/base/EngineObject.d.ts +1 -0
- package/types/base/EventDispatcher.d.ts +2 -15
- package/types/base/Time.d.ts +25 -24
- package/types/base/index.d.ts +0 -2
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/env-probe/CubeProbe.d.ts +0 -7
- package/types/env-probe/Probe.d.ts +0 -6
- package/types/fog/EXP2Fog.d.ts +15 -0
- package/types/fog/Fog.d.ts +14 -0
- package/types/fog/LinearFog.d.ts +22 -0
- package/types/fog/index.d.ts +3 -0
- package/types/graphic/Buffer.d.ts +5 -12
- package/types/graphic/Mesh.d.ts +5 -16
- package/types/graphic/Primitive.d.ts +1 -0
- package/types/graphic/SubPrimitive.d.ts +9 -0
- package/types/index.d.ts +8 -7
- package/types/input/InputManager.d.ts +1 -1
- package/types/input/interface/IInput.d.ts +1 -1
- package/types/lighting/AmbientLight.d.ts +4 -1
- package/types/lighting/DirectLight.d.ts +0 -1
- package/types/lighting/Light.d.ts +0 -1
- package/types/lighting/LightManager.d.ts +1 -0
- package/types/lighting/SpotLight.d.ts +0 -1
- package/types/material/BaseMaterial.d.ts +8 -10
- package/types/material/BlinnPhongMaterial.d.ts +0 -3
- package/types/material/Material.d.ts +3 -6
- package/types/material/PBRMaterial.d.ts +1 -1
- package/types/material/PBRSpecularMaterial.d.ts +1 -1
- package/types/material/UnlitMaterial.d.ts +1 -1
- package/types/mesh/BlendShape.d.ts +1 -1
- package/types/mesh/BlendShapeFrame.d.ts +28 -6
- package/types/mesh/MeshRenderer.d.ts +1 -11
- package/types/mesh/ModelMesh.d.ts +5 -5
- package/types/mesh/PrimitiveMesh.d.ts +4 -2
- package/types/mesh/SkinnedMeshRenderer.d.ts +0 -15
- package/types/particle/ParticleBufferUtils.d.ts +1 -0
- package/types/particle/ParticleGenerator.d.ts +72 -0
- package/types/particle/ParticleMaterial.d.ts +28 -0
- package/types/particle/ParticleRenderer.d.ts +2 -2
- package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
- package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
- package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
- package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
- package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
- package/types/particle/enums/ParticleStopMode.d.ts +6 -0
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
- package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
- package/types/particle/modules/Burst.d.ts +14 -0
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
- package/types/particle/modules/EmissionModule.d.ts +45 -0
- package/types/particle/modules/MainModule.d.ts +68 -0
- package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
- package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
- package/types/particle/modules/ParticleCurve.d.ts +56 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
- package/types/particle/modules/ParticleGradient.d.ts +94 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +42 -0
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
- package/types/particle/modules/shape/BaseShape.d.ts +12 -0
- package/types/particle/modules/shape/BoxShape.d.ts +11 -0
- package/types/particle/modules/shape/CircleShape.d.ts +17 -0
- package/types/particle/modules/shape/ConeShape.d.ts +28 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
- package/types/particle/modules/shape/SphereShape.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
- package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
- package/types/particle/modules/shape/index.d.ts +6 -0
- package/types/physics/CharacterController.d.ts +0 -2
- package/types/physics/Collider.d.ts +3 -2
- package/types/physics/PhysicsManager.d.ts +5 -22
- package/types/physics/PhysicsScene.d.ts +6 -2
- package/types/physics/joint/HingeJoint.d.ts +2 -2
- package/types/physics/joint/Joint.d.ts +3 -4
- package/types/physics/joint/SpringJoint.d.ts +3 -2
- package/types/physics/shape/BoxColliderShape.d.ts +2 -0
- package/types/physics/shape/CapsuleColliderShape.d.ts +2 -0
- package/types/physics/shape/ColliderShape.d.ts +4 -1
- package/types/physics/shape/PlaneColliderShape.d.ts +1 -0
- package/types/physics/shape/SphereColliderShape.d.ts +2 -0
- package/types/renderingHardwareInterface/index.d.ts +1 -0
- package/types/shader/Shader.d.ts +32 -23
- package/types/shader/ShaderData.d.ts +24 -24
- package/types/shader/ShaderMacro.d.ts +16 -0
- package/types/shader/ShaderPass.d.ts +9 -2
- package/types/shader/ShaderProperty.d.ts +7 -0
- package/types/shader/enums/RenderStateElementKey.d.ts +58 -0
- package/types/shader/index.d.ts +5 -1
- package/types/shaderlib/particle/index.d.ts +14 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +0 -1
- package/types/shadow/enum/ShadowMode.d.ts +13 -0
- package/types/sky/SkyBoxMaterial.d.ts +27 -9
- package/types/sky/index.d.ts +1 -0
- package/types/texture/RenderTarget.d.ts +2 -6
- package/types/texture/Texture.d.ts +8 -6
- package/types/texture/Texture2D.d.ts +3 -1
- package/types/texture/index.d.ts +1 -0
- package/types/trail/TrailRenderer.d.ts +0 -5
- package/types/SafeLoopArray.d.ts +0 -37
- /package/types/{animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts → RenderPipeline/CullingResults.d.ts} +0 -0
- /package/types/{animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts → RenderPipeline/DepthOnlyPass.d.ts} +0 -0
- /package/types/{animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts → RenderPipeline/PipelineUtils.d.ts} +0 -0
- /package/types/animation/{internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts → AnimatorStatePlayData.d.ts} +0 -0
- /package/types/animation/internal/{animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts → AnimatorStateInfo.d.ts} +0 -0
- /package/types/animation/internal/{animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts → AnimatorStateMachineData.d.ts} +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Event } from "./Event";
|
|
2
1
|
/**
|
|
3
2
|
* EventDispatcher, which can be inherited as a base class.
|
|
4
3
|
*/
|
|
5
4
|
export declare class EventDispatcher {
|
|
5
|
+
private static _dispatchingListenersPool;
|
|
6
6
|
private _events;
|
|
7
7
|
private _eventCount;
|
|
8
|
-
private _dispatchingListeners;
|
|
9
8
|
/**
|
|
10
9
|
* Determine whether there is event listening.
|
|
11
10
|
* @param event - Event name
|
|
@@ -44,15 +43,6 @@ export declare class EventDispatcher {
|
|
|
44
43
|
* @returns This
|
|
45
44
|
*/
|
|
46
45
|
once(event: string, fn: Function): EventDispatcher;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Use `on/once` instead.
|
|
49
|
-
* Add a listener function with the specified event name.
|
|
50
|
-
* @param event - Event name
|
|
51
|
-
* @param fn - Function
|
|
52
|
-
* @param once - Is it a one-time listener
|
|
53
|
-
* @returns this
|
|
54
|
-
*/
|
|
55
|
-
addEventListener(event: string, fn: Function, once?: boolean): EventDispatcher;
|
|
56
46
|
/**
|
|
57
47
|
* Remove the event listener(s) of the specified event name.
|
|
58
48
|
* @param event - Event name
|
|
@@ -71,9 +61,6 @@ export declare class EventDispatcher {
|
|
|
71
61
|
* @param event - Event name, delete all events if not passed
|
|
72
62
|
*/
|
|
73
63
|
removeAllEventListeners(event?: string): void;
|
|
74
|
-
|
|
75
|
-
* @deprecated Use `dispatch` instead.
|
|
76
|
-
*/
|
|
77
|
-
trigger(e: Event): void;
|
|
64
|
+
private _addEventListener;
|
|
78
65
|
private _clearEvent;
|
|
79
66
|
}
|
package/types/base/Time.d.ts
CHANGED
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provide time related information.
|
|
3
3
|
*/
|
|
4
4
|
export declare class Time {
|
|
5
5
|
private static _elapsedTimeProperty;
|
|
6
|
-
private
|
|
7
|
-
private
|
|
6
|
+
private static _deltaTimeProperty;
|
|
7
|
+
private _frameCount;
|
|
8
8
|
private _deltaTime;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
9
|
+
private _actualDeltaTime;
|
|
10
|
+
private _elapsedTime;
|
|
11
|
+
private _actualElapsedTime;
|
|
12
|
+
private _lastSystemTime;
|
|
11
13
|
private _elapsedTimeValue;
|
|
14
|
+
private _deltaTimeValue;
|
|
15
|
+
/** Maximum delta time allowed per frame in seconds. */
|
|
16
|
+
maximumDeltaTime: number;
|
|
17
|
+
/** The scale of time. */
|
|
18
|
+
timeScale: number;
|
|
12
19
|
get frameCount(): number;
|
|
13
20
|
/**
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
reset(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Current Time
|
|
20
|
-
*/
|
|
21
|
-
get nowTime(): number;
|
|
22
|
-
/**
|
|
23
|
-
* Time between two ticks
|
|
21
|
+
* The delta time in seconds from the last frame to the current frame.
|
|
22
|
+
*
|
|
23
|
+
* @remarks When the frame rate is low or stutter occurs, `deltaTime` will not exceed the value of `maximumDeltaTime` * `timeScale`.
|
|
24
24
|
*/
|
|
25
25
|
get deltaTime(): number;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* The amount of elapsed time in seconds since the start of the engine.
|
|
28
28
|
*/
|
|
29
|
-
get
|
|
30
|
-
set timeScale(s: number);
|
|
29
|
+
get elapsedTime(): number;
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
31
|
+
* The actual delta time in seconds from the last frame to the current frame.
|
|
32
|
+
*
|
|
33
|
+
* @remarks The actual delta time is not affected by `maximumDeltaTime` and `timeScale`.
|
|
33
34
|
*/
|
|
34
|
-
get
|
|
35
|
+
get actualDeltaTime(): number;
|
|
35
36
|
/**
|
|
36
|
-
* The elapsed time
|
|
37
|
+
* The amount of actual elapsed time in seconds since the start of the engine.
|
|
37
38
|
*/
|
|
38
|
-
get
|
|
39
|
+
get actualElapsedTime(): number;
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
41
|
+
* Constructor of the Time.
|
|
41
42
|
*/
|
|
42
|
-
|
|
43
|
+
constructor();
|
|
43
44
|
}
|
package/types/base/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export { Event } from "./Event";
|
|
2
1
|
export { EventDispatcher } from "./EventDispatcher";
|
|
3
2
|
export { Logger } from "./Logger";
|
|
4
3
|
export { Time } from "./Time";
|
|
5
|
-
export { Util, ObjectValues } from "./Util";
|
|
6
4
|
export { EngineObject } from "./EngineObject";
|
|
7
5
|
export * from "./Constant";
|
|
@@ -9,15 +9,8 @@ export declare class CubeProbe extends Probe {
|
|
|
9
9
|
* The position of the probe can be set, the default is the origin [0,0,0].
|
|
10
10
|
*/
|
|
11
11
|
position: Vector3;
|
|
12
|
-
/**
|
|
13
|
-
* @override
|
|
14
|
-
*/
|
|
15
|
-
protected readonly _isCube: boolean;
|
|
16
12
|
private oriViewMatrix;
|
|
17
13
|
private _oriFieldOfView;
|
|
18
|
-
/**
|
|
19
|
-
* @override
|
|
20
|
-
*/
|
|
21
14
|
onBeginRender(camera: Camera): void;
|
|
22
15
|
/**
|
|
23
16
|
* Store original camera parameters.
|
|
@@ -46,13 +46,7 @@ export declare abstract class Probe extends Script {
|
|
|
46
46
|
* @remarks Prevent issue: Feedback Loops Between Textures and the Framebuffer.
|
|
47
47
|
*/
|
|
48
48
|
onTextureChange(renderColorTexture: Texture): void;
|
|
49
|
-
/**
|
|
50
|
-
* @override
|
|
51
|
-
*/
|
|
52
49
|
onBeginRender(camera: Camera): void;
|
|
53
|
-
/**
|
|
54
|
-
* @override
|
|
55
|
-
*/
|
|
56
50
|
onEndRender(camera: Camera): void;
|
|
57
51
|
protected _reset(): void;
|
|
58
52
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { Fog } from "./Fog";
|
|
3
|
+
/**
|
|
4
|
+
* Exponential fog.
|
|
5
|
+
*/
|
|
6
|
+
export declare class EXP2Fog extends Fog {
|
|
7
|
+
private static _densityProperty;
|
|
8
|
+
/**
|
|
9
|
+
* Density of fog.
|
|
10
|
+
*/
|
|
11
|
+
get density(): number;
|
|
12
|
+
set density(value: number);
|
|
13
|
+
private _density;
|
|
14
|
+
constructor(entity: Entity);
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Color } from "@oasis-engine/math";
|
|
2
|
+
import { Component } from "../Component";
|
|
3
|
+
/**
|
|
4
|
+
* Fog.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Fog extends Component {
|
|
7
|
+
protected static _colorProperty: import("..").ShaderProperty;
|
|
8
|
+
/**
|
|
9
|
+
* Fog color.
|
|
10
|
+
*/
|
|
11
|
+
get color(): Color;
|
|
12
|
+
set color(value: Color);
|
|
13
|
+
private _color;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Entity } from "../Entity";
|
|
2
|
+
import { Fog } from "./Fog";
|
|
3
|
+
/**
|
|
4
|
+
* Linear fog, according to the distance of the camera linear difference fog density.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LinearFog extends Fog {
|
|
7
|
+
private static _nearProperty;
|
|
8
|
+
private static _farProperty;
|
|
9
|
+
/**
|
|
10
|
+
* Start of fog.
|
|
11
|
+
*/
|
|
12
|
+
get near(): number;
|
|
13
|
+
set near(value: number);
|
|
14
|
+
/**
|
|
15
|
+
* End of fog.
|
|
16
|
+
*/
|
|
17
|
+
get far(): number;
|
|
18
|
+
set far(value: number);
|
|
19
|
+
private _near;
|
|
20
|
+
private _far;
|
|
21
|
+
constructor(entity: Entity);
|
|
22
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
3
|
import { BufferBindFlag } from "./enums/BufferBindFlag";
|
|
4
4
|
import { BufferUsage } from "./enums/BufferUsage";
|
|
@@ -6,14 +6,11 @@ import { SetDataOptions } from "./enums/SetDataOptions";
|
|
|
6
6
|
/**
|
|
7
7
|
* Buffer.
|
|
8
8
|
*/
|
|
9
|
-
export declare class Buffer extends
|
|
10
|
-
_glBindTarget: number;
|
|
11
|
-
_glBufferUsage: number;
|
|
12
|
-
_nativeBuffer: WebGLBuffer;
|
|
13
|
-
private _hardwareRenderer;
|
|
9
|
+
export declare class Buffer extends GraphicsResource {
|
|
14
10
|
private _type;
|
|
15
11
|
private _byteLength;
|
|
16
12
|
private _bufferUsage;
|
|
13
|
+
private _platformBuffer;
|
|
17
14
|
/**
|
|
18
15
|
* Buffer binding flag.
|
|
19
16
|
*/
|
|
@@ -93,13 +90,9 @@ export declare class Buffer extends RefObject {
|
|
|
93
90
|
* @param dataLength - Output data length
|
|
94
91
|
*/
|
|
95
92
|
getData(data: ArrayBufferView, bufferByteOffset: number, dataOffset: number, dataLength: number): void;
|
|
96
|
-
|
|
97
|
-
* @override
|
|
98
|
-
* Destroy.
|
|
99
|
-
*/
|
|
100
|
-
_onDestroy(): void;
|
|
93
|
+
_rebuild(): void;
|
|
101
94
|
/**
|
|
102
95
|
* @deprecated
|
|
103
96
|
*/
|
|
104
|
-
resize(
|
|
97
|
+
resize(byteLength: number): void;
|
|
105
98
|
}
|
package/types/graphic/Mesh.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
-
import { RefObject } from "../asset/RefObject";
|
|
3
2
|
import { Engine } from "../Engine";
|
|
4
|
-
import {
|
|
5
|
-
import { IndexBufferBinding } from "../graphic/IndexBufferBinding";
|
|
3
|
+
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
6
4
|
import { SubMesh } from "../graphic/SubMesh";
|
|
7
|
-
import {
|
|
5
|
+
import { MeshTopology } from "../graphic/enums/MeshTopology";
|
|
8
6
|
/**
|
|
9
7
|
* Mesh.
|
|
10
8
|
*/
|
|
11
|
-
export declare abstract class Mesh extends
|
|
9
|
+
export declare abstract class Mesh extends GraphicsResource {
|
|
12
10
|
/** Name. */
|
|
13
11
|
name: string;
|
|
14
12
|
private _bounds;
|
|
@@ -55,16 +53,7 @@ export declare abstract class Mesh extends RefObject {
|
|
|
55
53
|
* Clear all sub-mesh.
|
|
56
54
|
*/
|
|
57
55
|
clearSubMesh(): void;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*/
|
|
61
|
-
_addRefCount(value: number): void;
|
|
62
|
-
/**
|
|
63
|
-
* @override
|
|
64
|
-
* Destroy.
|
|
65
|
-
*/
|
|
66
|
-
_onDestroy(): void;
|
|
67
|
-
protected _setVertexElements(elements: VertexElement[]): void;
|
|
68
|
-
protected _setIndexBufferBinding(binding: IndexBufferBinding | null): void;
|
|
56
|
+
_addReferCount(value: number): void;
|
|
57
|
+
_rebuild(): void;
|
|
69
58
|
private _onBoundsChanged;
|
|
70
59
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/index.d.ts
CHANGED
|
@@ -8,23 +8,21 @@ export { Entity } from "./Entity";
|
|
|
8
8
|
export { Component } from "./Component";
|
|
9
9
|
export { Script } from "./Script";
|
|
10
10
|
export { Renderer } from "./Renderer";
|
|
11
|
-
export { dependentComponents } from "./ComponentsDependencies";
|
|
11
|
+
export { dependentComponents, DependentMode } from "./ComponentsDependencies";
|
|
12
12
|
export { Camera } from "./Camera";
|
|
13
13
|
export { Transform } from "./Transform";
|
|
14
14
|
export { BoolUpdateFlag } from "./BoolUpdateFlag";
|
|
15
15
|
export type { EngineSettings } from "./EngineSettings";
|
|
16
|
+
export type { EngineConfiguration } from "./Engine";
|
|
16
17
|
export { request } from "./asset/request";
|
|
17
18
|
export { Loader } from "./asset/Loader";
|
|
19
|
+
export { ContentRestorer } from "./asset/ContentRestorer";
|
|
18
20
|
export { ResourceManager, resourceLoader } from "./asset/ResourceManager";
|
|
19
21
|
export { AssetPromise } from "./asset/AssetPromise";
|
|
20
22
|
export type { LoadItem } from "./asset/LoadItem";
|
|
21
23
|
export { AssetType } from "./asset/AssetType";
|
|
22
|
-
export {
|
|
23
|
-
export
|
|
24
|
-
export { RenderQueue } from "./RenderPipeline/RenderQueue";
|
|
25
|
-
export { RenderPass } from "./RenderPipeline/RenderPass";
|
|
26
|
-
export { MeshRenderElement } from "./RenderPipeline/MeshRenderElement";
|
|
27
|
-
export { SpriteElement } from "./RenderPipeline/SpriteElement";
|
|
24
|
+
export { ReferResource } from "./asset/ReferResource";
|
|
25
|
+
export * from "./RenderPipeline/index";
|
|
28
26
|
export * from "./base";
|
|
29
27
|
export { Background } from "./Background";
|
|
30
28
|
export { BackgroundMode } from "./enums/BackgroundMode";
|
|
@@ -51,3 +49,6 @@ export * from "./Layer";
|
|
|
51
49
|
export * from "./clone/CloneManager";
|
|
52
50
|
export * from "./renderingHardwareInterface/index";
|
|
53
51
|
export * from "./physics/index";
|
|
52
|
+
export * from "./Utils";
|
|
53
|
+
export { Basic2DBatcher } from "./RenderPipeline/Basic2DBatcher";
|
|
54
|
+
export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
|
|
@@ -6,9 +6,9 @@ import { Vector3 } from "@galacean/engine-math";
|
|
|
6
6
|
* InputManager manages device input such as mouse, touch, keyboard, etc.
|
|
7
7
|
*/
|
|
8
8
|
export declare class InputManager {
|
|
9
|
+
private _engine;
|
|
9
10
|
/** Sometimes the input module will not be initialized, such as off-screen rendering. */
|
|
10
11
|
private _initialized;
|
|
11
|
-
private _curFrameCount;
|
|
12
12
|
private _wheelManager;
|
|
13
13
|
private _pointerManager;
|
|
14
14
|
private _keyboardManager;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Color, SphericalHarmonics3 } from "@galacean/engine-math";
|
|
2
2
|
import { TextureCube } from "../texture";
|
|
3
3
|
import { DiffuseMode } from "./enums/DiffuseMode";
|
|
4
|
+
import { ReferResource } from "../asset/ReferResource";
|
|
5
|
+
import { Engine } from "../Engine";
|
|
4
6
|
/**
|
|
5
7
|
* Ambient light.
|
|
6
8
|
*/
|
|
7
|
-
export declare class AmbientLight {
|
|
9
|
+
export declare class AmbientLight extends ReferResource {
|
|
8
10
|
private static _shMacro;
|
|
9
11
|
private static _specularMacro;
|
|
10
12
|
private static _decodeRGBMMacro;
|
|
@@ -60,6 +62,7 @@ export declare class AmbientLight {
|
|
|
60
62
|
*/
|
|
61
63
|
get specularIntensity(): number;
|
|
62
64
|
set specularIntensity(value: number);
|
|
65
|
+
constructor(engine: Engine);
|
|
63
66
|
private _setDiffuseMode;
|
|
64
67
|
private _setSpecularTexture;
|
|
65
68
|
private _setSpecularTextureDecodeRGBM;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Engine } from "../Engine";
|
|
2
|
-
import { Shader } from "../shader";
|
|
2
|
+
import { Shader, ShaderProperty } from "../shader";
|
|
3
3
|
import { ShaderMacro } from "../shader/ShaderMacro";
|
|
4
4
|
import { BlendMode } from "./enums/BlendMode";
|
|
5
5
|
import { RenderFace } from "./enums/RenderFace";
|
|
6
6
|
import { Material } from "./Material";
|
|
7
7
|
export declare class BaseMaterial extends Material {
|
|
8
|
-
protected static _baseColorProp: import("../shader").ShaderProperty;
|
|
9
|
-
protected static _baseTextureProp: import("../shader").ShaderProperty;
|
|
10
8
|
protected static _baseTextureMacro: ShaderMacro;
|
|
11
|
-
protected static _tilingOffsetProp: import("../shader").ShaderProperty;
|
|
12
|
-
protected static _normalTextureProp: import("../shader").ShaderProperty;
|
|
13
|
-
protected static _normalIntensityProp: import("../shader").ShaderProperty;
|
|
14
9
|
protected static _normalTextureMacro: ShaderMacro;
|
|
15
|
-
protected static _emissiveColorProp: import("../shader").ShaderProperty;
|
|
16
|
-
protected static _emissiveTextureProp: import("../shader").ShaderProperty;
|
|
17
10
|
protected static _emissiveTextureMacro: ShaderMacro;
|
|
18
11
|
protected static _transparentMacro: ShaderMacro;
|
|
12
|
+
protected static _baseColorProp: ShaderProperty;
|
|
13
|
+
protected static _baseTextureProp: ShaderProperty;
|
|
14
|
+
protected static _tilingOffsetProp: ShaderProperty;
|
|
15
|
+
protected static _normalTextureProp: ShaderProperty;
|
|
16
|
+
protected static _normalIntensityProp: ShaderProperty;
|
|
17
|
+
protected static _emissiveColorProp: ShaderProperty;
|
|
18
|
+
protected static _emissiveTextureProp: ShaderProperty;
|
|
19
19
|
private static _alphaCutoffProp;
|
|
20
20
|
private static _alphaCutoffMacro;
|
|
21
21
|
private _renderFace;
|
|
@@ -75,12 +75,10 @@ export declare class BaseMaterial extends Material {
|
|
|
75
75
|
*/
|
|
76
76
|
setRenderFace(passIndex: number, renderFace: RenderFace): void;
|
|
77
77
|
/**
|
|
78
|
-
* @override
|
|
79
78
|
* Clone and return the instance.
|
|
80
79
|
*/
|
|
81
80
|
clone(): BaseMaterial;
|
|
82
81
|
/**
|
|
83
|
-
* @override
|
|
84
82
|
* Clone to the target material.
|
|
85
83
|
* @param target - target material
|
|
86
84
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { IClone } from "@galacean/engine-design";
|
|
2
|
-
import { RefObject } from "../asset/RefObject";
|
|
3
2
|
import { Engine } from "../Engine";
|
|
3
|
+
import { ReferResource } from "../asset/ReferResource";
|
|
4
4
|
import { Shader } from "../shader/Shader";
|
|
5
5
|
import { ShaderData } from "../shader/ShaderData";
|
|
6
6
|
import { RenderState } from "../shader/state/RenderState";
|
|
7
7
|
/**
|
|
8
8
|
* Material.
|
|
9
9
|
*/
|
|
10
|
-
export declare class Material extends
|
|
10
|
+
export declare class Material extends ReferResource implements IClone {
|
|
11
11
|
/** Name. */
|
|
12
12
|
name: string;
|
|
13
13
|
private _shaderData;
|
|
@@ -43,10 +43,7 @@ export declare class Material extends RefObject implements IClone {
|
|
|
43
43
|
* @param target - target material
|
|
44
44
|
*/
|
|
45
45
|
cloneTo(target: Material): void;
|
|
46
|
-
|
|
47
|
-
* @override
|
|
48
|
-
*/
|
|
49
|
-
_addRefCount(value: number): void;
|
|
46
|
+
_addReferCount(value: number): void;
|
|
50
47
|
/**
|
|
51
48
|
* @override
|
|
52
49
|
*/
|
|
@@ -6,7 +6,6 @@ import { BlendShapeFrame } from "./BlendShapeFrame";
|
|
|
6
6
|
export declare class BlendShape {
|
|
7
7
|
/** Name of BlendShape. */
|
|
8
8
|
name: string;
|
|
9
|
-
private _dataChangeManager;
|
|
10
9
|
private _frames;
|
|
11
10
|
/**
|
|
12
11
|
* Frames of BlendShape.
|
|
@@ -36,4 +35,5 @@ export declare class BlendShape {
|
|
|
36
35
|
clearFrames(): void;
|
|
37
36
|
private _addFrame;
|
|
38
37
|
private _updateUseNormalAndTangent;
|
|
38
|
+
private _frameDataChangeListener;
|
|
39
39
|
}
|
|
@@ -5,12 +5,28 @@ import { Vector3 } from "@galacean/engine-math";
|
|
|
5
5
|
export declare class BlendShapeFrame {
|
|
6
6
|
/** Weight of BlendShapeFrame. */
|
|
7
7
|
readonly weight: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
8
|
+
private _dirty;
|
|
9
|
+
private _deltaPositions;
|
|
10
|
+
private _deltaNormals;
|
|
11
|
+
private _deltaTangents;
|
|
12
|
+
/**
|
|
13
|
+
* Delta positions for the frame being added.
|
|
14
|
+
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
15
|
+
*/
|
|
16
|
+
get deltaPositions(): Vector3[];
|
|
17
|
+
set deltaPositions(value: Vector3[]);
|
|
18
|
+
/**
|
|
19
|
+
* Delta normals for the frame being added.
|
|
20
|
+
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
21
|
+
*/
|
|
22
|
+
get deltaNormals(): Vector3[];
|
|
23
|
+
set deltaNormals(value: Vector3[]);
|
|
24
|
+
/**
|
|
25
|
+
* Delta tangents for the frame being added.
|
|
26
|
+
* @remarks Need to re-assign after modification to ensure that the modification takes effect.
|
|
27
|
+
*/
|
|
28
|
+
get deltaTangents(): Vector3[];
|
|
29
|
+
set deltaTangents(value: Vector3[]);
|
|
14
30
|
/**
|
|
15
31
|
* Create a BlendShapeFrame.
|
|
16
32
|
* @param weight - Weight of BlendShapeFrame
|
|
@@ -20,3 +36,9 @@ export declare class BlendShapeFrame {
|
|
|
20
36
|
*/
|
|
21
37
|
constructor(weight: number, deltaPositions: Vector3[], deltaNormals?: Vector3[], deltaTangents?: Vector3[]);
|
|
22
38
|
}
|
|
39
|
+
export declare enum BlendShapeFrameDirty {
|
|
40
|
+
Position = 1,
|
|
41
|
+
Normal = 2,
|
|
42
|
+
Tangent = 4,
|
|
43
|
+
All = 7
|
|
44
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { BoundingBox } from "@galacean/engine-math";
|
|
2
|
-
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
1
|
import { Renderer } from "../Renderer";
|
|
4
2
|
import { Mesh } from "../graphic/Mesh";
|
|
5
3
|
/**
|
|
@@ -10,7 +8,7 @@ export declare class MeshRenderer extends Renderer {
|
|
|
10
8
|
private static _uv1Macro;
|
|
11
9
|
private static _normalMacro;
|
|
12
10
|
private static _tangentMacro;
|
|
13
|
-
private static
|
|
11
|
+
private static _enableVertexColorMacro;
|
|
14
12
|
private _enableVertexColor;
|
|
15
13
|
/**
|
|
16
14
|
* Mesh assigned to the renderer.
|
|
@@ -22,14 +20,6 @@ export declare class MeshRenderer extends Renderer {
|
|
|
22
20
|
*/
|
|
23
21
|
get enableVertexColor(): boolean;
|
|
24
22
|
set enableVertexColor(value: boolean);
|
|
25
|
-
/**
|
|
26
|
-
* @override
|
|
27
|
-
*/
|
|
28
|
-
protected _updateBounds(worldBounds: BoundingBox): void;
|
|
29
|
-
/**
|
|
30
|
-
* @override
|
|
31
|
-
*/
|
|
32
|
-
protected _render(context: RenderContext): void;
|
|
33
23
|
private _setMesh;
|
|
34
24
|
private _onMeshChanged;
|
|
35
25
|
}
|
|
@@ -15,7 +15,7 @@ export declare class ModelMesh extends Mesh {
|
|
|
15
15
|
private static _tempVec3;
|
|
16
16
|
private static _tempVec4;
|
|
17
17
|
private _vertexCount;
|
|
18
|
-
private
|
|
18
|
+
private _readable;
|
|
19
19
|
private _verticesFloat32;
|
|
20
20
|
private _verticesUint8;
|
|
21
21
|
private _indices;
|
|
@@ -42,9 +42,9 @@ export declare class ModelMesh extends Mesh {
|
|
|
42
42
|
private _customVertexElements;
|
|
43
43
|
private _vertexCountChanged;
|
|
44
44
|
/**
|
|
45
|
-
* Whether to
|
|
45
|
+
* Whether to read data of the mesh.
|
|
46
46
|
*/
|
|
47
|
-
get
|
|
47
|
+
get readable(): boolean;
|
|
48
48
|
/**
|
|
49
49
|
* Vertex count of current mesh.
|
|
50
50
|
*/
|
|
@@ -207,9 +207,9 @@ export declare class ModelMesh extends Mesh {
|
|
|
207
207
|
getBlendShapeName(index: number): string;
|
|
208
208
|
/**
|
|
209
209
|
* Upload Mesh Data to GPU.
|
|
210
|
-
* @param
|
|
210
|
+
* @param noLongerReadable - Whether to read data later. If true, you'll never read data anymore (free memory cache)
|
|
211
211
|
*/
|
|
212
|
-
uploadData(
|
|
212
|
+
uploadData(noLongerReadable: boolean): void;
|
|
213
213
|
/**
|
|
214
214
|
* Calculate mesh tangent.
|
|
215
215
|
* @remark need to set positions(with or not with indices), normals, uv before calculation.
|