@galacean/engine-core 2.0.0-alpha.27 → 2.0.0-alpha.28
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 +168 -43
- package/dist/main.js.map +1 -1
- package/dist/module.js +168 -43
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/particle/modules/shape/BaseShape.d.ts +30 -0
- package/types/particle/modules/shape/BoxShape.d.ts +0 -1
- package/types/particle/modules/shape/CircleShape.d.ts +0 -1
- package/types/particle/modules/shape/ConeShape.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.28",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"types/**/*"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@galacean/engine-math": "2.0.0-alpha.
|
|
21
|
+
"@galacean/engine-math": "2.0.0-alpha.28"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "2.0.0-alpha.
|
|
24
|
+
"@galacean/engine-design": "2.0.0-alpha.28"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
2
3
|
import { UpdateFlagManager } from "../../../UpdateFlagManager";
|
|
3
4
|
/**
|
|
4
5
|
* Base class for all particle shapes.
|
|
5
6
|
*/
|
|
6
7
|
export declare abstract class BaseShape {
|
|
8
|
+
private static _tempQuaternion;
|
|
7
9
|
/** The type of shape to emit particles from. */
|
|
8
10
|
abstract readonly shapeType: ParticleShapeType;
|
|
9
11
|
protected _updateManager: UpdateFlagManager;
|
|
10
12
|
private _enabled;
|
|
11
13
|
private _randomDirectionAmount;
|
|
14
|
+
private _position;
|
|
15
|
+
private _rotation;
|
|
16
|
+
private _scale;
|
|
17
|
+
private _matrix;
|
|
18
|
+
private _transformDirty;
|
|
19
|
+
private _hasShapeTransform;
|
|
12
20
|
/**
|
|
13
21
|
* Specifies whether the ShapeModule is enabled or disabled.
|
|
14
22
|
*/
|
|
@@ -19,4 +27,26 @@ export declare abstract class BaseShape {
|
|
|
19
27
|
*/
|
|
20
28
|
get randomDirectionAmount(): number;
|
|
21
29
|
set randomDirectionAmount(value: number);
|
|
30
|
+
/**
|
|
31
|
+
* Apply a local position offset to the shape.
|
|
32
|
+
*/
|
|
33
|
+
get position(): Vector3;
|
|
34
|
+
set position(value: Vector3);
|
|
35
|
+
/**
|
|
36
|
+
* Apply a local rotation to the shape, specified as euler angles in degrees.
|
|
37
|
+
*/
|
|
38
|
+
get rotation(): Vector3;
|
|
39
|
+
set rotation(value: Vector3);
|
|
40
|
+
/**
|
|
41
|
+
* Apply a local scale to the shape.
|
|
42
|
+
*/
|
|
43
|
+
get scale(): Vector3;
|
|
44
|
+
set scale(value: Vector3);
|
|
45
|
+
constructor();
|
|
46
|
+
protected abstract _generateLocalPositionAndDirection(rand: Rand, emitTime: number, position: Vector3, direction: Vector3): void;
|
|
47
|
+
protected abstract _getLocalPositionRange(outMin: Vector3, outMax: Vector3): void;
|
|
48
|
+
protected abstract _getLocalDirectionRange(outMin: Vector3, outMax: Vector3): void;
|
|
49
|
+
protected _onTransformChanged: () => void;
|
|
50
|
+
private _getMatrix;
|
|
51
|
+
private _transformDirectionRange;
|
|
22
52
|
}
|
|
@@ -5,7 +5,6 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
5
5
|
* Particle shape that emits particles from a box.
|
|
6
6
|
*/
|
|
7
7
|
export declare class BoxShape extends BaseShape {
|
|
8
|
-
private static _tempVector30;
|
|
9
8
|
readonly shapeType = ParticleShapeType.Box;
|
|
10
9
|
private _size;
|
|
11
10
|
/**
|
|
@@ -5,7 +5,6 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
5
5
|
* Particle shape that emits particles from a circle.
|
|
6
6
|
*/
|
|
7
7
|
export declare class CircleShape extends BaseShape {
|
|
8
|
-
private static _tempPositionPoint;
|
|
9
8
|
readonly shapeType = ParticleShapeType.Circle;
|
|
10
9
|
private _radius;
|
|
11
10
|
private _arc;
|
|
@@ -4,10 +4,6 @@ import { ParticleShapeType } from "./enums/ParticleShapeType";
|
|
|
4
4
|
* Cone shape.
|
|
5
5
|
*/
|
|
6
6
|
export declare class ConeShape extends BaseShape {
|
|
7
|
-
private static _tempVector20;
|
|
8
|
-
private static _tempVector21;
|
|
9
|
-
private static _tempVector30;
|
|
10
|
-
private static _tempVector31;
|
|
11
7
|
readonly shapeType = ParticleShapeType.Cone;
|
|
12
8
|
private _angle;
|
|
13
9
|
private _radius;
|