@galacean/engine-core 1.1.0-alpha.3 → 1.1.0-alpha.4
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 +3159 -1230
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +3159 -1230
- package/dist/module.js +3150 -1232
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Camera.d.ts +2 -0
- package/types/ComponentsManager.d.ts +3 -2
- package/types/DisorderedArray.d.ts +5 -3
- package/types/RenderPipeline/RenderData.d.ts +8 -1
- package/types/Renderer.d.ts +2 -2
- package/types/animation/Keyframe.d.ts +4 -3
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
- package/types/animation/animationCurve/index.d.ts +2 -0
- package/types/asset/GraphicsResource.d.ts +4 -0
- package/types/clone/ComponentCloner.d.ts +2 -0
- package/types/graphic/Mesh.d.ts +2 -3
- package/types/graphic/index.d.ts +1 -0
- package/types/mesh/ModelMesh.d.ts +8 -1
- package/types/particle/ParticleRenderer.d.ts +41 -231
- package/types/particle/index.d.ts +12 -1
- package/types/shaderlib/ShaderFactory.d.ts +2 -2
- package/types/shaderlib/ShaderLib.d.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "1.1.0-alpha.
|
|
18
|
+
"@galacean/engine-math": "1.1.0-alpha.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.1.0-alpha.
|
|
21
|
+
"@galacean/engine-design": "1.1.0-alpha.4"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
package/types/Camera.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ import { TextureCubeFace } from "./texture/enums/TextureCubeFace";
|
|
|
15
15
|
export declare class Camera extends Component {
|
|
16
16
|
private static _inverseViewMatrixProperty;
|
|
17
17
|
private static _cameraPositionProperty;
|
|
18
|
+
private static _cameraForwardProperty;
|
|
19
|
+
private static _cameraUpProperty;
|
|
18
20
|
private static _cameraDepthBufferParamsProperty;
|
|
19
21
|
/** Whether to enable frustum culling, it is enabled by default. */
|
|
20
22
|
enableFrustumCulling: boolean;
|
|
@@ -2,6 +2,7 @@ import { Camera } from "./Camera";
|
|
|
2
2
|
import { Component } from "./Component";
|
|
3
3
|
import { Renderer } from "./Renderer";
|
|
4
4
|
import { Script } from "./Script";
|
|
5
|
+
import { Animator } from "./animation";
|
|
5
6
|
/**
|
|
6
7
|
* The manager of the components.
|
|
7
8
|
*/
|
|
@@ -25,8 +26,8 @@ export declare class ComponentsManager {
|
|
|
25
26
|
removeOnLateUpdateScript(script: Script): void;
|
|
26
27
|
addOnPhysicsUpdateScript(script: Script): void;
|
|
27
28
|
removeOnPhysicsUpdateScript(script: Script): void;
|
|
28
|
-
addOnUpdateAnimations(animation:
|
|
29
|
-
removeOnUpdateAnimations(animation:
|
|
29
|
+
addOnUpdateAnimations(animation: Animator): void;
|
|
30
|
+
removeOnUpdateAnimations(animation: Animator): void;
|
|
30
31
|
addOnUpdateRenderers(renderer: Renderer): void;
|
|
31
32
|
removeOnUpdateRenderers(renderer: Renderer): void;
|
|
32
33
|
addPendingDestroyScript(component: Script): void;
|
|
@@ -11,14 +11,16 @@ export declare class DisorderedArray<T> {
|
|
|
11
11
|
delete(element: T): void;
|
|
12
12
|
set(index: number, element: T): void;
|
|
13
13
|
get(index: number): T;
|
|
14
|
-
startLoop(): void;
|
|
15
14
|
/**
|
|
16
15
|
* Delete the element at the specified index.
|
|
17
16
|
* @param index - The index of the element to be deleted
|
|
18
17
|
* @returns The replaced item is used to reset its index
|
|
19
18
|
*/
|
|
20
19
|
deleteByIndex(index: number): T;
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
forEach(callbackFn: (e: T) => void): void;
|
|
21
|
+
forEachAndClean(callbackFn: (e: T) => void): void;
|
|
23
22
|
garbageCollection(): void;
|
|
23
|
+
private _startLoop;
|
|
24
|
+
private _endLoop;
|
|
25
|
+
private _endLoopAndClear;
|
|
24
26
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { SubMesh } from "../graphic";
|
|
2
|
+
import { Primitive } from "../graphic/Primitive";
|
|
1
3
|
import { Material } from "../material";
|
|
2
4
|
import { Renderer } from "../Renderer";
|
|
3
|
-
|
|
5
|
+
import { IPoolElement } from "./IPoolElement";
|
|
6
|
+
export declare class RenderData implements IPoolElement {
|
|
4
7
|
component: Renderer;
|
|
5
8
|
material: Material;
|
|
9
|
+
primitive: Primitive;
|
|
10
|
+
subPrimitive: SubMesh;
|
|
6
11
|
multiRenderData: boolean;
|
|
12
|
+
setX(component: Renderer, material: Material, primitive: Primitive, subPrimitive: SubMesh): void;
|
|
13
|
+
dispose(): void;
|
|
7
14
|
}
|
package/types/Renderer.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BoundingBox, Vector4 } from "@galacean/engine-math";
|
|
2
2
|
import { Component } from "./Component";
|
|
3
|
-
import {
|
|
3
|
+
import { IComponentCustomClone } from "./clone/ComponentCloner";
|
|
4
4
|
import { Material } from "./material";
|
|
5
5
|
import { ShaderData } from "./shader/ShaderData";
|
|
6
6
|
/**
|
|
7
7
|
* Basis for all renderers.
|
|
8
8
|
* @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
|
|
9
9
|
*/
|
|
10
|
-
export declare class Renderer extends Component implements
|
|
10
|
+
export declare class Renderer extends Component implements IComponentCustomClone {
|
|
11
11
|
private static _tempVector0;
|
|
12
12
|
private static _receiveShadowMacro;
|
|
13
13
|
private static _localMatrixProperty;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Color, Quaternion, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
1
|
+
import { Color, Quaternion, Rect, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
+
import { ReferResource } from "../asset/ReferResource";
|
|
2
3
|
/**
|
|
3
4
|
* Keyframe.
|
|
4
5
|
* @typeParam V - Type of Keyframe value
|
|
5
6
|
*/
|
|
6
|
-
export declare class Keyframe<V extends KeyframeValueType, T = V extends number ? number : V extends Vector2 ? Vector2 : V extends Vector3 ? Vector3 : V extends Vector4 | Color | Quaternion ? Vector4 : V extends number[] | Float32Array ? number[] : never> {
|
|
7
|
+
export declare class Keyframe<V extends KeyframeValueType, T = V extends number ? number : V extends Vector2 ? Vector2 : V extends Vector3 ? Vector3 : V extends Vector4 | Color | Quaternion | Rect ? Vector4 : V extends number[] | Float32Array ? number[] : V extends ReferResource ? ReferResource : never> {
|
|
7
8
|
/** The time of the Keyframe. */
|
|
8
9
|
time: number;
|
|
9
10
|
/** The value of the Keyframe. */
|
|
@@ -16,4 +17,4 @@ export declare class Keyframe<V extends KeyframeValueType, T = V extends number
|
|
|
16
17
|
/**
|
|
17
18
|
* Type of Keyframe value.
|
|
18
19
|
*/
|
|
19
|
-
export type KeyframeValueType = number | Vector2 | Vector3 | Vector4 | number[] | Float32Array | Quaternion | Color | boolean;
|
|
20
|
+
export type KeyframeValueType = number | Vector2 | Vector3 | Vector4 | number[] | Float32Array | Quaternion | Color | Rect | boolean | ReferResource;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Rect } from "@galacean/engine-math";
|
|
2
|
+
import { AnimationCurve } from "./AnimationCurve";
|
|
3
|
+
/**
|
|
4
|
+
* Store a collection of Keyframes that can be evaluated over time.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimationRectCurve extends AnimationCurve<Rect> {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReferResource } from "../../asset/ReferResource";
|
|
2
|
+
import { AnimationCurve } from "./AnimationCurve";
|
|
3
|
+
/**
|
|
4
|
+
* Store a collection of Keyframes that can be evaluated over time.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AnimationRefCurve extends AnimationCurve<ReferResource> {
|
|
7
|
+
constructor();
|
|
8
|
+
}
|
|
@@ -8,3 +8,5 @@ export { AnimationQuaternionCurve } from "./AnimationQuaternionCurve";
|
|
|
8
8
|
export { AnimationVector2Curve } from "./AnimationVector2Curve";
|
|
9
9
|
export { AnimationVector3Curve } from "./AnimationVector3Curve";
|
|
10
10
|
export { AnimationVector4Curve } from "./AnimationVector4Curve";
|
|
11
|
+
export { AnimationRefCurve } from "./AnimationRefCurve";
|
|
12
|
+
export { AnimationRectCurve } from "./AnimationRectCurve";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Engine } from "../Engine";
|
|
2
2
|
import { ReferResource } from "./ReferResource";
|
|
3
3
|
export declare abstract class GraphicsResource extends ReferResource {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the content of the resource is lost.
|
|
6
|
+
*/
|
|
7
|
+
get isContentLost(): boolean;
|
|
4
8
|
protected constructor(engine: Engine);
|
|
5
9
|
}
|
package/types/graphic/Mesh.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
|
-
import {
|
|
3
|
+
import { ReferResource } from "../asset/ReferResource";
|
|
4
4
|
import { SubMesh } from "../graphic/SubMesh";
|
|
5
5
|
import { MeshTopology } from "../graphic/enums/MeshTopology";
|
|
6
6
|
/**
|
|
7
7
|
* Mesh.
|
|
8
8
|
*/
|
|
9
|
-
export declare abstract class Mesh extends
|
|
9
|
+
export declare abstract class Mesh extends ReferResource {
|
|
10
10
|
/** Name. */
|
|
11
11
|
name: string;
|
|
12
12
|
private _bounds;
|
|
@@ -54,6 +54,5 @@ export declare abstract class Mesh extends GraphicsResource {
|
|
|
54
54
|
*/
|
|
55
55
|
clearSubMesh(): void;
|
|
56
56
|
_addReferCount(value: number): void;
|
|
57
|
-
_rebuild(): void;
|
|
58
57
|
private _onBoundsChanged;
|
|
59
58
|
}
|
package/types/graphic/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Mesh } from "../graphic/Mesh";
|
|
|
5
5
|
import { VertexBufferBinding } from "../graphic/VertexBufferBinding";
|
|
6
6
|
import { VertexElement } from "../graphic/VertexElement";
|
|
7
7
|
import { BlendShape } from "./BlendShape";
|
|
8
|
+
import { VertexAttribute } from "./enums/VertexAttribute";
|
|
8
9
|
/**
|
|
9
10
|
* Mesh containing common vertex elements of the model.
|
|
10
11
|
*/
|
|
@@ -54,7 +55,7 @@ export declare class ModelMesh extends Mesh {
|
|
|
54
55
|
/**
|
|
55
56
|
* Vertex buffer binding collection.
|
|
56
57
|
*/
|
|
57
|
-
get vertexBufferBindings():
|
|
58
|
+
get vertexBufferBindings(): ReadonlyArray<VertexBufferBinding>;
|
|
58
59
|
/**
|
|
59
60
|
* BlendShapes of this ModelMesh.
|
|
60
61
|
*/
|
|
@@ -187,6 +188,12 @@ export declare class ModelMesh extends Mesh {
|
|
|
187
188
|
* @param firstIndex - First vertex buffer index, the default value is 0
|
|
188
189
|
*/
|
|
189
190
|
setVertexBufferBindings(vertexBufferBindings: VertexBufferBinding[], firstIndex?: number): void;
|
|
191
|
+
/**
|
|
192
|
+
* Get `VertexElement` by attribute.
|
|
193
|
+
* @param attribute - Vertex attribute
|
|
194
|
+
* @returns Vertex element
|
|
195
|
+
*/
|
|
196
|
+
getVertexElement(attribute: VertexAttribute): VertexElement | null;
|
|
190
197
|
/**
|
|
191
198
|
* Add a BlendShape for this ModelMesh.
|
|
192
199
|
* @param blendShape - The BlendShape
|
|
@@ -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,12 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ParticleMaterial } from "./ParticleMaterial";
|
|
2
|
+
export { ParticleRenderer } from "./ParticleRenderer";
|
|
3
|
+
export { ParticleCurveMode } from "./enums/ParticleCurveMode";
|
|
4
|
+
export { ParticleGradientMode } from "./enums/ParticleGradientMode";
|
|
5
|
+
export { ParticleRenderMode } from "./enums/ParticleRenderMode";
|
|
6
|
+
export { ParticleScaleMode } from "./enums/ParticleScaleMode";
|
|
7
|
+
export { ParticleSimulationSpace } from "./enums/ParticleSimulationSpace";
|
|
8
|
+
export { ParticleStopMode } from "./enums/ParticleStopMode";
|
|
9
|
+
export { Burst } from "./modules/Burst";
|
|
10
|
+
export { ParticleCompositeCurve } from "./modules/ParticleCompositeCurve";
|
|
11
|
+
export { CurveKey, ParticleCurve } from "./modules/ParticleCurve";
|
|
12
|
+
export * from "./modules/shape/index";
|
|
@@ -1,5 +1,6 @@
|
|
|
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
|
/**
|
|
5
6
|
* GLSL extension.
|
|
@@ -14,4 +15,3 @@ declare class ShaderFactory {
|
|
|
14
15
|
static convertTo300(shader: string, isFrag?: boolean): string;
|
|
15
16
|
private static _replaceMRTShader;
|
|
16
17
|
}
|
|
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;
|