@galacean/engine-core 0.0.0-experimental-double11.4 → 0.0.0-experimental-double11.6
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 +15500 -12197
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +15500 -12197
- package/dist/module.js +16092 -12812
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Background.d.ts +8 -0
- package/types/Camera.d.ts +32 -8
- package/types/Component.d.ts +1 -0
- package/types/ComponentsManager.d.ts +0 -2
- package/types/DisorderedArray.d.ts +8 -1
- package/types/Engine.d.ts +9 -4
- package/types/Entity.d.ts +2 -0
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +2 -3
- package/types/RenderPipeline/RenderData.d.ts +8 -1
- package/types/RenderPipeline/RenderElement.d.ts +2 -4
- package/types/RenderPipeline/RenderQueue.d.ts +4 -2
- package/types/RenderPipeline/enums/PipelineStage.d.ts +2 -0
- package/types/Renderer.d.ts +2 -2
- package/types/Scene.d.ts +9 -4
- package/types/SceneManager.d.ts +28 -5
- package/types/Script.d.ts +0 -1
- package/types/animation/Keyframe.d.ts +4 -3
- package/types/animation/animationCurve/index.d.ts +2 -0
- package/types/animation/index.d.ts +4 -0
- package/types/asset/AssetType.d.ts +5 -1
- package/types/asset/GraphicsResource.d.ts +4 -0
- package/types/asset/Loader.d.ts +3 -1
- package/types/asset/ResourceManager.d.ts +8 -2
- package/types/base/Constant.d.ts +1 -0
- package/types/clone/ComponentCloner.d.ts +4 -1
- package/types/graphic/Buffer.d.ts +22 -6
- package/types/graphic/BufferUtil.d.ts +1 -0
- package/types/graphic/Mesh.d.ts +2 -3
- package/types/graphic/VertexElement.d.ts +10 -6
- package/types/graphic/index.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/input/InputManager.d.ts +2 -2
- package/types/lighting/DirectLight.d.ts +8 -1
- package/types/lighting/Light.d.ts +0 -4
- package/types/lighting/LightManager.d.ts +7 -0
- package/types/lighting/PointLight.d.ts +9 -1
- package/types/lighting/SpotLight.d.ts +12 -1
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/ModelMesh.d.ts +70 -42
- package/types/mesh/PrimitiveMesh.d.ts +4 -2
- package/types/mesh/Skin.d.ts +3 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +20 -11
- package/types/mesh/index.d.ts +6 -5
- package/types/particle/ParticleGenerator.d.ts +0 -2
- package/types/particle/ParticleRenderer.d.ts +41 -231
- package/types/particle/index.d.ts +22 -1
- package/types/particle/modules/MainModule.d.ts +7 -5
- package/types/particle/modules/ParticleGeneratorModule.d.ts +0 -1
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +1 -1
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +0 -4
- package/types/physics/Collider.d.ts +1 -0
- package/types/physics/index.d.ts +7 -7
- package/types/physics/joint/HingeJoint.d.ts +1 -1
- package/types/physics/joint/Joint.d.ts +4 -2
- package/types/physics/joint/SpringJoint.d.ts +1 -2
- package/types/physics/shape/BoxColliderShape.d.ts +0 -2
- package/types/physics/shape/CapsuleColliderShape.d.ts +0 -2
- package/types/physics/shape/ColliderShape.d.ts +2 -4
- package/types/physics/shape/PlaneColliderShape.d.ts +0 -1
- package/types/physics/shape/SphereColliderShape.d.ts +1 -2
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +0 -1
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +1 -1
- package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +1 -1
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +1 -1
- package/types/shader/Shader.d.ts +22 -0
- package/types/shader/ShaderPart.d.ts +5 -0
- package/types/shader/ShaderPass.d.ts +8 -0
- package/types/shader/SubShader.d.ts +0 -1
- package/types/shader/index.d.ts +1 -0
- package/types/shaderlib/ShaderFactory.d.ts +2 -7
- package/types/shaderlib/ShaderLib.d.ts +11 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -6
- package/types/texture/RenderTarget.d.ts +1 -2
- package/types/texture/Texture2D.d.ts +1 -1
- package/types/texture/Texture2DArray.d.ts +1 -1
- package/types/texture/TextureCube.d.ts +1 -1
- package/types/texture/enums/TextureFormat.d.ts +55 -49
|
@@ -1,235 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare enum ParticleRendererBlendMode {
|
|
8
|
-
Transparent = 0,
|
|
9
|
-
Additive = 1
|
|
10
|
-
}
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
+
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
3
|
+
import { Renderer } from "../Renderer";
|
|
4
|
+
import { ModelMesh } from "../mesh/ModelMesh";
|
|
5
|
+
import { ParticleGenerator } from "./ParticleGenerator";
|
|
6
|
+
import { ParticleRenderMode } from "./enums/ParticleRenderMode";
|
|
11
7
|
/**
|
|
12
8
|
* Particle Renderer Component.
|
|
13
9
|
*/
|
|
14
|
-
export declare class ParticleRenderer extends
|
|
15
|
-
|
|
16
|
-
private static
|
|
17
|
-
private static
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
private
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
private _isUseOriginColor;
|
|
50
|
-
private _isScaleByLifetime;
|
|
51
|
-
private _is2d;
|
|
52
|
-
private _isFadeIn;
|
|
53
|
-
private _isFadeOut;
|
|
54
|
-
private _playOnEnable;
|
|
55
|
-
private _blendMode;
|
|
56
|
-
/**
|
|
57
|
-
* Sprite sheet of texture.
|
|
58
|
-
*/
|
|
59
|
-
spriteSheet: {
|
|
60
|
-
x: number;
|
|
61
|
-
y: number;
|
|
62
|
-
w: number;
|
|
63
|
-
h: number;
|
|
64
|
-
}[];
|
|
65
|
-
/**
|
|
66
|
-
* Texture of particle.
|
|
67
|
-
*/
|
|
68
|
-
get texture(): Texture;
|
|
69
|
-
set texture(texture: Texture);
|
|
70
|
-
/**
|
|
71
|
-
* Position of particles.
|
|
72
|
-
*/
|
|
73
|
-
get position(): Vector3;
|
|
74
|
-
set position(value: Vector3);
|
|
75
|
-
/**
|
|
76
|
-
* Random range of positions.
|
|
77
|
-
*/
|
|
78
|
-
get positionRandomness(): Vector3;
|
|
79
|
-
set positionRandomness(value: Vector3);
|
|
80
|
-
/**
|
|
81
|
-
* Array of fixed positions.
|
|
82
|
-
*/
|
|
83
|
-
get positionArray(): Vector3[];
|
|
84
|
-
set positionArray(value: Vector3[]);
|
|
85
|
-
/**
|
|
86
|
-
* Velocity of particles.
|
|
87
|
-
*/
|
|
88
|
-
get velocity(): Vector3;
|
|
89
|
-
set velocity(value: Vector3);
|
|
90
|
-
/**
|
|
91
|
-
* Random range of velocity.
|
|
92
|
-
*/
|
|
93
|
-
get velocityRandomness(): Vector3;
|
|
94
|
-
set velocityRandomness(value: Vector3);
|
|
95
|
-
/**
|
|
96
|
-
* Acceleration of particles.
|
|
97
|
-
*/
|
|
98
|
-
get acceleration(): Vector3;
|
|
99
|
-
set acceleration(value: Vector3);
|
|
100
|
-
/**
|
|
101
|
-
* Random range of acceleration.
|
|
102
|
-
*/
|
|
103
|
-
get accelerationRandomness(): Vector3;
|
|
104
|
-
set accelerationRandomness(value: Vector3);
|
|
105
|
-
/**
|
|
106
|
-
* Color of particles.
|
|
107
|
-
*/
|
|
108
|
-
get color(): Color;
|
|
109
|
-
set color(value: Color);
|
|
110
|
-
/**
|
|
111
|
-
* Random range of color.
|
|
112
|
-
*/
|
|
113
|
-
get colorRandomness(): number;
|
|
114
|
-
set colorRandomness(value: number);
|
|
115
|
-
/**
|
|
116
|
-
* Size of particles.
|
|
117
|
-
*/
|
|
118
|
-
get size(): number;
|
|
119
|
-
set size(value: number);
|
|
120
|
-
/**
|
|
121
|
-
* Random range of size.
|
|
122
|
-
*/
|
|
123
|
-
get sizeRandomness(): number;
|
|
124
|
-
set sizeRandomness(value: number);
|
|
125
|
-
/**
|
|
126
|
-
* Alpha of particles.
|
|
127
|
-
*/
|
|
128
|
-
get alpha(): number;
|
|
129
|
-
set alpha(value: number);
|
|
130
|
-
/**
|
|
131
|
-
* Random range of alpha.
|
|
132
|
-
*/
|
|
133
|
-
get alphaRandomness(): number;
|
|
134
|
-
set alphaRandomness(value: number);
|
|
135
|
-
/**
|
|
136
|
-
* Angle of particles.
|
|
137
|
-
*/
|
|
138
|
-
get angle(): number;
|
|
139
|
-
set angle(value: number);
|
|
140
|
-
/**
|
|
141
|
-
* Random range of angle.
|
|
142
|
-
*/
|
|
143
|
-
get angleRandomness(): number;
|
|
144
|
-
set angleRandomness(value: number);
|
|
145
|
-
/**
|
|
146
|
-
* Rotate velocity of particles.
|
|
147
|
-
*/
|
|
148
|
-
get rotateVelocity(): number;
|
|
149
|
-
set rotateVelocity(value: number);
|
|
150
|
-
/**
|
|
151
|
-
* Random range of rotate velocity.
|
|
152
|
-
*/
|
|
153
|
-
get rotateVelocityRandomness(): number;
|
|
154
|
-
set rotateVelocityRandomness(value: number);
|
|
155
|
-
/**
|
|
156
|
-
* Lifetime of particles.
|
|
157
|
-
*/
|
|
158
|
-
get lifetime(): number;
|
|
159
|
-
set lifetime(value: number);
|
|
160
|
-
/**
|
|
161
|
-
* Random range of start time.
|
|
162
|
-
*/
|
|
163
|
-
get startTimeRandomness(): number;
|
|
164
|
-
set startTimeRandomness(value: number);
|
|
165
|
-
/**
|
|
166
|
-
* Scale factor of particles.
|
|
167
|
-
*/
|
|
168
|
-
get scale(): number;
|
|
169
|
-
set scale(value: number);
|
|
170
|
-
/**
|
|
171
|
-
* Max count of particles.
|
|
172
|
-
*/
|
|
173
|
-
get maxCount(): number;
|
|
174
|
-
set maxCount(value: number);
|
|
175
|
-
/**
|
|
176
|
-
* Whether play once.
|
|
177
|
-
*/
|
|
178
|
-
get isOnce(): boolean;
|
|
179
|
-
set isOnce(value: boolean);
|
|
180
|
-
/**
|
|
181
|
-
* Whether follow the direction of velocity.
|
|
182
|
-
*/
|
|
183
|
-
get isRotateToVelocity(): boolean;
|
|
184
|
-
set isRotateToVelocity(value: boolean);
|
|
185
|
-
/**
|
|
186
|
-
* Whether use origin color.
|
|
187
|
-
*/
|
|
188
|
-
get isUseOriginColor(): boolean;
|
|
189
|
-
set isUseOriginColor(value: boolean);
|
|
190
|
-
/**
|
|
191
|
-
* Whether scale by lifetime.
|
|
192
|
-
*/
|
|
193
|
-
get isScaleByLifetime(): boolean;
|
|
194
|
-
set isScaleByLifetime(value: boolean);
|
|
195
|
-
/**
|
|
196
|
-
* Whether 2D rendering.
|
|
197
|
-
*/
|
|
198
|
-
get is2d(): boolean;
|
|
199
|
-
set is2d(value: boolean);
|
|
200
|
-
/**
|
|
201
|
-
* Whether fade in.
|
|
202
|
-
*/
|
|
203
|
-
get isFadeIn(): boolean;
|
|
204
|
-
set isFadeIn(value: boolean);
|
|
205
|
-
/**
|
|
206
|
-
* Whether fade out.
|
|
207
|
-
*/
|
|
208
|
-
get isFadeOut(): boolean;
|
|
209
|
-
set isFadeOut(value: boolean);
|
|
210
|
-
/**
|
|
211
|
-
* Whether play on enable.
|
|
212
|
-
*/
|
|
213
|
-
get playOnEnable(): boolean;
|
|
214
|
-
set playOnEnable(value: boolean);
|
|
215
|
-
/**
|
|
216
|
-
* Blend mode of the particle renderer's material.
|
|
217
|
-
*/
|
|
218
|
-
get blendMode(): ParticleRendererBlendMode;
|
|
219
|
-
set blendMode(value: ParticleRendererBlendMode);
|
|
220
|
-
constructor(props: any);
|
|
221
|
-
/**
|
|
222
|
-
* Start emitting.
|
|
223
|
-
*/
|
|
224
|
-
start(): void;
|
|
225
|
-
/**
|
|
226
|
-
* Stop emitting.
|
|
227
|
-
*/
|
|
228
|
-
stop(): void;
|
|
229
|
-
private _createMaterial;
|
|
230
|
-
private _createMesh;
|
|
231
|
-
private _updateBuffer;
|
|
232
|
-
private _updateSingleBuffer;
|
|
233
|
-
private _updateSingleUv;
|
|
234
|
-
private _onColorChanged;
|
|
10
|
+
export declare class ParticleRenderer extends Renderer {
|
|
11
|
+
private static readonly _billboardModeMacro;
|
|
12
|
+
private static readonly _stretchedBillboardModeMacro;
|
|
13
|
+
private static readonly _horizontalBillboardModeMacro;
|
|
14
|
+
private static readonly _verticalBillboardModeMacro;
|
|
15
|
+
private static readonly _renderModeMeshMacro;
|
|
16
|
+
private static readonly _pivotOffsetProperty;
|
|
17
|
+
private static readonly _lengthScale;
|
|
18
|
+
private static readonly _speedScale;
|
|
19
|
+
private static readonly _currentTime;
|
|
20
|
+
/** Particle generator. */
|
|
21
|
+
readonly generator: ParticleGenerator;
|
|
22
|
+
/** Specifies how much particles stretch depending on their velocity. */
|
|
23
|
+
velocityScale: number;
|
|
24
|
+
/** How much are the particles stretched in their direction of motion, defined as the length of the particle compared to its width. */
|
|
25
|
+
lengthScale: number;
|
|
26
|
+
/** The pivot of particle. */
|
|
27
|
+
pivot: Vector3;
|
|
28
|
+
private _renderMode;
|
|
29
|
+
private _currentRenderModeMacro;
|
|
30
|
+
private _mesh;
|
|
31
|
+
private _supportInstancedArrays;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies how particles are rendered.
|
|
34
|
+
*/
|
|
35
|
+
get renderMode(): ParticleRenderMode;
|
|
36
|
+
set renderMode(value: ParticleRenderMode);
|
|
37
|
+
/**
|
|
38
|
+
* The mesh of particle.
|
|
39
|
+
* @remarks Valid when `renderMode` is `Mesh`.
|
|
40
|
+
*/
|
|
41
|
+
get mesh(): ModelMesh;
|
|
42
|
+
set mesh(value: ModelMesh);
|
|
43
|
+
protected _render(context: RenderContext): void;
|
|
44
|
+
protected _onDestroy(): void;
|
|
235
45
|
}
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ParticleGenerator } from "./ParticleGenerator";
|
|
2
|
+
export { ParticleMaterial } from "./ParticleMaterial";
|
|
3
|
+
export { ParticleRenderer } from "./ParticleRenderer";
|
|
4
|
+
export { ParticleCurveMode } from "./enums/ParticleCurveMode";
|
|
5
|
+
export { ParticleGradientMode } from "./enums/ParticleGradientMode";
|
|
6
|
+
export { ParticleRenderMode } from "./enums/ParticleRenderMode";
|
|
7
|
+
export { ParticleScaleMode } from "./enums/ParticleScaleMode";
|
|
8
|
+
export { ParticleSimulationSpace } from "./enums/ParticleSimulationSpace";
|
|
9
|
+
export { ParticleStopMode } from "./enums/ParticleStopMode";
|
|
10
|
+
export { Burst } from "./modules/Burst";
|
|
11
|
+
export { ColorOverLifetimeModule } from "./modules/ColorOverLifetimeModule";
|
|
12
|
+
export { EmissionModule } from "./modules/EmissionModule";
|
|
13
|
+
export { MainModule } from "./modules/MainModule";
|
|
14
|
+
export { ParticleCompositeCurve } from "./modules/ParticleCompositeCurve";
|
|
15
|
+
export { ParticleCompositeGradient } from "./modules/ParticleCompositeGradient";
|
|
16
|
+
export { CurveKey, ParticleCurve } from "./modules/ParticleCurve";
|
|
17
|
+
export { GradientAlphaKey, GradientColorKey, ParticleGradient } from "./modules/ParticleGradient";
|
|
18
|
+
export { RotationOverLifetimeModule } from "./modules/RotationOverLifetimeModule";
|
|
19
|
+
export { SizeOverLifetimeModule } from "./modules/SizeOverLifetimeModule";
|
|
20
|
+
export { TextureSheetAnimationModule } from "./modules/TextureSheetAnimationModule";
|
|
21
|
+
export { VelocityOverLifetimeModule } from "./modules/VelocityOverLifetimeModule";
|
|
22
|
+
export * from "./modules/shape/index";
|
|
@@ -26,22 +26,19 @@ export declare class MainModule implements ICustomClone {
|
|
|
26
26
|
startSpeed: ParticleCompositeCurve;
|
|
27
27
|
/** A flag to enable specifying particle size individually for each axis. */
|
|
28
28
|
startSize3D: boolean;
|
|
29
|
-
/** The initial size of particles when the Particle Generator first spawns them. */
|
|
30
|
-
startSize: ParticleCompositeCurve;
|
|
31
29
|
/** The initial size of particles along the x-axis when the Particle Generator first spawns them. */
|
|
32
30
|
startSizeX: ParticleCompositeCurve;
|
|
33
31
|
/** The initial size of particles along the y-axis when the Particle Generator first spawns them. */
|
|
34
32
|
startSizeY: ParticleCompositeCurve;
|
|
35
33
|
/** The initial size of particles along the z-axis when the Particle Generator first spawns them. */
|
|
36
34
|
startSizeZ: ParticleCompositeCurve;
|
|
37
|
-
/** A flag to enable 3D particle rotation. */
|
|
35
|
+
/** A flag to enable 3D particle rotation, when disabled, only `startRotationZ` is used. */
|
|
38
36
|
startRotation3D: boolean;
|
|
39
|
-
/** The initial rotation of particles when the Particle Generator first spawns them. */
|
|
40
|
-
startRotation: ParticleCompositeCurve;
|
|
41
37
|
/** The initial rotation of particles around the x-axis when emitted.*/
|
|
42
38
|
startRotationX: ParticleCompositeCurve;
|
|
43
39
|
/** The initial rotation of particles around the y-axis when emitted. */
|
|
44
40
|
startRotationY: ParticleCompositeCurve;
|
|
41
|
+
/** The initial rotation of particles around the z-axis when emitted. */
|
|
45
42
|
startRotationZ: ParticleCompositeCurve;
|
|
46
43
|
/** Makes some particles spin in the opposite direction. */
|
|
47
44
|
flipRotation: number;
|
|
@@ -65,4 +62,9 @@ export declare class MainModule implements ICustomClone {
|
|
|
65
62
|
*/
|
|
66
63
|
get maxParticles(): number;
|
|
67
64
|
set maxParticles(value: number);
|
|
65
|
+
/**
|
|
66
|
+
* The initial size of particles when the Particle Generator first spawns them.
|
|
67
|
+
*/
|
|
68
|
+
get startSize(): ParticleCompositeCurve;
|
|
69
|
+
set startSize(value: ParticleCompositeCurve);
|
|
68
70
|
}
|
|
@@ -7,6 +7,5 @@ export declare abstract class ParticleGeneratorModule {
|
|
|
7
7
|
/** Specifies whether the module is enabled or not. */
|
|
8
8
|
enabled: boolean;
|
|
9
9
|
protected _generator: ParticleGenerator;
|
|
10
|
-
constructor(generator: ParticleGenerator);
|
|
11
10
|
protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro, enableMacro: ShaderMacro): ShaderMacro;
|
|
12
11
|
}
|
|
@@ -18,7 +18,7 @@ export declare class RotationOverLifetimeModule extends ParticleGeneratorModule
|
|
|
18
18
|
static readonly _maxCurveXProperty: ShaderProperty;
|
|
19
19
|
static readonly _maxCurveYProperty: ShaderProperty;
|
|
20
20
|
static readonly _maxCurveZProperty: ShaderProperty;
|
|
21
|
-
/** Specifies whether the rotation is separate on each axis, when disabled only
|
|
21
|
+
/** Specifies whether the rotation is separate on each axis, when disabled, only `rotationZ` is used. */
|
|
22
22
|
separateAxes: boolean;
|
|
23
23
|
/** Rotation over lifetime for z axis. */
|
|
24
24
|
rotationX: ParticleCompositeCurve;
|
|
@@ -26,10 +26,6 @@ export declare class TextureSheetAnimationModule extends ParticleGeneratorModule
|
|
|
26
26
|
* */
|
|
27
27
|
get tiling(): Vector2;
|
|
28
28
|
set tiling(value: Vector2);
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
cloneTo(dest: TextureSheetAnimationModule): void;
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
35
31
|
* Texture sheet animation type.
|
package/types/physics/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { HitResult } from "./HitResult";
|
|
2
|
-
export { PhysicsManager } from "./PhysicsManager";
|
|
3
|
-
export { PhysicsMaterial } from "./PhysicsMaterial";
|
|
4
1
|
export { CharacterController } from "./CharacterController";
|
|
5
|
-
export * from "./shape";
|
|
6
|
-
export * from "./joint";
|
|
7
|
-
export * from "./enums";
|
|
8
2
|
export { Collider } from "./Collider";
|
|
3
|
+
export { CollisionDetectionMode, DynamicCollider, DynamicColliderConstraints } from "./DynamicCollider";
|
|
4
|
+
export { HitResult } from "./HitResult";
|
|
5
|
+
export { PhysicsMaterial } from "./PhysicsMaterial";
|
|
6
|
+
export { PhysicsScene } from "./PhysicsScene";
|
|
9
7
|
export { StaticCollider } from "./StaticCollider";
|
|
10
|
-
export
|
|
8
|
+
export * from "./enums";
|
|
9
|
+
export * from "./joint";
|
|
10
|
+
export * from "./shape";
|
|
@@ -28,7 +28,7 @@ export declare class HingeJoint extends Joint {
|
|
|
28
28
|
/**
|
|
29
29
|
* The angular velocity of the joint in degrees per second.
|
|
30
30
|
*/
|
|
31
|
-
get velocity(): Readonly<
|
|
31
|
+
get velocity(): Readonly<number>;
|
|
32
32
|
/**
|
|
33
33
|
* Enables the joint's limits. Disabled by default.
|
|
34
34
|
*/
|
|
@@ -3,12 +3,14 @@ import { Vector3 } from "@galacean/engine-math";
|
|
|
3
3
|
import { Component } from "../../Component";
|
|
4
4
|
import { Entity } from "../../Entity";
|
|
5
5
|
import { Collider } from "../Collider";
|
|
6
|
+
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
6
7
|
/**
|
|
7
8
|
* A base class providing common functionality for joints.
|
|
8
9
|
* @decorator `@dependentComponents(Collider, DependentMode.CheckOnly)`
|
|
9
10
|
*/
|
|
10
|
-
export declare class Joint extends Component {
|
|
11
|
-
protected
|
|
11
|
+
export declare class Joint extends Component implements ICustomClone {
|
|
12
|
+
protected _colliderInfo: JointColliderInfo;
|
|
13
|
+
protected _connectedColliderInfo: JointColliderInfo;
|
|
12
14
|
protected _nativeJoint: IJoint;
|
|
13
15
|
private _force;
|
|
14
16
|
private _torque;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Vector3 } from "@galacean/engine-math";
|
|
2
|
-
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
3
2
|
import { Joint } from "./Joint";
|
|
4
3
|
/**
|
|
5
4
|
* A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
|
|
6
5
|
*/
|
|
7
|
-
export declare class SpringJoint extends Joint
|
|
6
|
+
export declare class SpringJoint extends Joint {
|
|
8
7
|
private _minDistance;
|
|
9
8
|
private _maxDistance;
|
|
10
9
|
private _tolerance;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IClone } from "@galacean/engine-design";
|
|
2
1
|
import { PhysicsMaterial } from "../PhysicsMaterial";
|
|
3
2
|
import { Vector3 } from "@galacean/engine-math";
|
|
4
3
|
import { Collider } from "../Collider";
|
|
4
|
+
import { ICustomClone } from "../../clone/ComponentCloner";
|
|
5
5
|
/**
|
|
6
6
|
* Abstract class for collider shapes.
|
|
7
7
|
*/
|
|
8
|
-
export declare abstract class ColliderShape implements
|
|
8
|
+
export declare abstract class ColliderShape implements ICustomClone {
|
|
9
9
|
private static _idGenerator;
|
|
10
10
|
protected _id: number;
|
|
11
11
|
protected _material: PhysicsMaterial;
|
|
@@ -47,8 +47,6 @@ export declare abstract class ColliderShape implements IClone {
|
|
|
47
47
|
get isTrigger(): boolean;
|
|
48
48
|
set isTrigger(value: boolean);
|
|
49
49
|
protected constructor();
|
|
50
|
-
abstract clone(): ColliderShape;
|
|
51
|
-
cloneTo(target: ColliderShape): void;
|
|
52
50
|
private _setPosition;
|
|
53
51
|
private _setRotation;
|
|
54
52
|
}
|
|
@@ -10,6 +10,5 @@ export declare class SphereColliderShape extends ColliderShape {
|
|
|
10
10
|
get radius(): number;
|
|
11
11
|
set radius(value: number);
|
|
12
12
|
constructor();
|
|
13
|
-
|
|
14
|
-
cloneTo(target: SphereColliderShape): void;
|
|
13
|
+
_cloneTo(target: SphereColliderShape): void;
|
|
15
14
|
}
|
|
@@ -3,6 +3,5 @@ export interface IPlatformBuffer {
|
|
|
3
3
|
bind(): void;
|
|
4
4
|
setData(byteLength: number, data: ArrayBuffer | ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number, options?: SetDataOptions): void;
|
|
5
5
|
getData(data: ArrayBufferView, bufferByteOffset?: number, dataOffset?: number, dataLength?: number): void;
|
|
6
|
-
resize(byteLength: number): void;
|
|
7
6
|
destroy(): void;
|
|
8
7
|
}
|
|
@@ -23,7 +23,7 @@ export interface IPlatformTexture2D extends IPlatformTexture {
|
|
|
23
23
|
* @param x - X coordinate of area start
|
|
24
24
|
* @param y - Y coordinate of area start
|
|
25
25
|
*/
|
|
26
|
-
setImageSource(imageSource: TexImageSource
|
|
26
|
+
setImageSource(imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
|
|
27
27
|
/**
|
|
28
28
|
* Get the pixel color buffer according to the specified area.
|
|
29
29
|
* @param x - X coordinate of area start
|
|
@@ -25,7 +25,7 @@ export interface IPlatformTexture2DArray extends IPlatformTexture {
|
|
|
25
25
|
* @param x - X coordinate of area start
|
|
26
26
|
* @param y - Y coordinate of area start
|
|
27
27
|
*/
|
|
28
|
-
setImageSource(index: number, imageSource: TexImageSource
|
|
28
|
+
setImageSource(index: number, imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
|
|
29
29
|
/**
|
|
30
30
|
* Get the pixel color buffer according to the specified area.
|
|
31
31
|
* @param elementIndex - The texture array element index
|
|
@@ -26,7 +26,7 @@ export interface IPlatformTextureCube extends IPlatformTexture {
|
|
|
26
26
|
* @param x - X coordinate of area start
|
|
27
27
|
* @param y - Y coordinate of area start
|
|
28
28
|
*/
|
|
29
|
-
setImageSource(face: TextureCubeFace, imageSource: TexImageSource
|
|
29
|
+
setImageSource(face: TextureCubeFace, imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
|
|
30
30
|
/**
|
|
31
31
|
* Get the pixel color buffer according to the specified cube face and area.
|
|
32
32
|
* @param face - You can choose which cube face to read
|
package/types/shader/Shader.d.ts
CHANGED
|
@@ -9,6 +9,27 @@ import { SubShader } from "./SubShader";
|
|
|
9
9
|
export declare class Shader {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
private static _shaderMap;
|
|
12
|
+
/**
|
|
13
|
+
* Create a shader by source code.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
*
|
|
17
|
+
* ShaderLab must be enabled first as follows:
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Import shaderLab
|
|
20
|
+
* import { ShaderLab } from "@galacean/engine-shader-lab";
|
|
21
|
+
* // Create engine with shaderLab
|
|
22
|
+
* const engine = await WebGLEngine.create({ canvas: "canvas", new ShaderLab() });
|
|
23
|
+
* ...
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param shaderSource - shader code
|
|
27
|
+
* @returns Shader
|
|
28
|
+
*
|
|
29
|
+
* @throws
|
|
30
|
+
* Throw string exception if shaderLab has not been enabled properly.
|
|
31
|
+
*/
|
|
32
|
+
static create(shaderSource: string): Shader;
|
|
12
33
|
/**
|
|
13
34
|
* Create a shader.
|
|
14
35
|
* @param name - Name of the shader
|
|
@@ -53,6 +74,7 @@ export declare class Shader {
|
|
|
53
74
|
* @returns Is the compiled shader variant valid
|
|
54
75
|
*/
|
|
55
76
|
compileVariant(engine: Engine, macros: string[]): boolean;
|
|
77
|
+
private static _applyConstRenderStates;
|
|
56
78
|
/**
|
|
57
79
|
* @deprecated Please use `ShaderMacro.getByName` instead
|
|
58
80
|
*
|
|
@@ -3,7 +3,12 @@ import { ShaderTagKey } from "./ShaderTagKey";
|
|
|
3
3
|
* Base class for shader structure.
|
|
4
4
|
*/
|
|
5
5
|
export declare abstract class ShaderPart {
|
|
6
|
+
protected _name: string;
|
|
6
7
|
private _tagsMap;
|
|
8
|
+
/**
|
|
9
|
+
* Name.
|
|
10
|
+
*/
|
|
11
|
+
get name(): string;
|
|
7
12
|
/**
|
|
8
13
|
* Set tag by key name.
|
|
9
14
|
* @param keyName - Key name of the tag
|
|
@@ -6,6 +6,14 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
6
6
|
private static _shaderPassCounter;
|
|
7
7
|
private _vertexSource;
|
|
8
8
|
private _fragmentSource;
|
|
9
|
+
/**
|
|
10
|
+
* Create a shader pass.
|
|
11
|
+
* @param name - Shader pass name
|
|
12
|
+
* @param vertexSource - Vertex shader source
|
|
13
|
+
* @param fragmentSource - Fragment shader source
|
|
14
|
+
* @param tags - Tags
|
|
15
|
+
*/
|
|
16
|
+
constructor(name: string, vertexSource: string, fragmentSource: string, tags?: Record<string, number | string | boolean>);
|
|
9
17
|
/**
|
|
10
18
|
* Create a shader pass.
|
|
11
19
|
* @param vertexSource - Vertex shader source
|
package/types/shader/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { BlendOperation } from "./enums/BlendOperation";
|
|
|
3
3
|
export { ColorWriteMask } from "./enums/ColorWriteMask";
|
|
4
4
|
export { CompareFunction } from "./enums/CompareFunction";
|
|
5
5
|
export { CullMode } from "./enums/CullMode";
|
|
6
|
+
export { RenderStateElementKey as RenderStateDataKey } from "./enums/RenderStateElementKey";
|
|
6
7
|
export { RenderQueueType } from "./enums/RenderQueueType";
|
|
7
8
|
export { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
8
9
|
export { StencilOperation } from "./enums/StencilOperation";
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
declare class ShaderFactory {
|
|
1
|
+
export declare class ShaderFactory {
|
|
2
2
|
static parseCustomMacros(macros: string[]): string;
|
|
3
|
+
static registerInclude(includeName: string, includeSource: string): void;
|
|
3
4
|
static parseIncludes(src: string): string;
|
|
4
|
-
/**
|
|
5
|
-
* GLSL extension.
|
|
6
|
-
* @param extensions - such as ["GL_EXT_shader_texture_lod"]
|
|
7
|
-
* */
|
|
8
|
-
static parseExtension(extensions: string[]): string;
|
|
9
5
|
/**
|
|
10
6
|
* Convert lower GLSL version to GLSL 300 es.
|
|
11
7
|
* @param shader - code
|
|
@@ -14,4 +10,3 @@ declare class ShaderFactory {
|
|
|
14
10
|
static convertTo300(shader: string, isFrag?: boolean): string;
|
|
15
11
|
private static _replaceMRTShader;
|
|
16
12
|
}
|
|
17
|
-
export { ShaderFactory };
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
export declare const ShaderLib: {
|
|
2
|
+
particle_common: string;
|
|
3
|
+
velocity_over_lifetime_module: string;
|
|
4
|
+
rotation_over_lifetime_module: string;
|
|
5
|
+
size_over_lifetime_module: string;
|
|
6
|
+
color_over_lifetime_module: string;
|
|
7
|
+
texture_sheet_animation_module: string;
|
|
8
|
+
sphere_billboard: string;
|
|
9
|
+
stretched_billboard: string;
|
|
10
|
+
vertical_billboard: string;
|
|
11
|
+
horizontal_billboard: string;
|
|
12
|
+
particle_mesh: string;
|
|
2
13
|
normal_get: string;
|
|
3
14
|
pbr_frag_define: string;
|
|
4
15
|
pbr_helper: string;
|