@galacean/engine-core 1.1.0-beta.2 → 1.1.0-beta.21
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 +7720 -7225
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +7720 -7225
- package/dist/module.js +7710 -7227
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/types.d.ts +3 -0
- package/types/2d/enums/SpriteModifyFlags.d.ts +2 -1
- package/types/Background.d.ts +8 -0
- package/types/Component.d.ts +1 -1
- package/types/DisorderedArray.d.ts +1 -1
- package/types/RenderPipeline/MeshRenderElement.d.ts +3 -1
- package/types/RenderPipeline/SpriteElement.d.ts +3 -1
- package/types/RenderPipeline/SpriteMaskElement.d.ts +3 -1
- package/types/RenderPipeline/TextRenderElement.d.ts +3 -1
- package/types/Scene.d.ts +6 -0
- package/types/asset/AssetPromise.d.ts +1 -0
- package/types/asset/ResourceManager.d.ts +0 -1
- package/types/enums/DepthMode.d.ts +8 -0
- 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/SkinnedMeshRenderer.d.ts +1 -1
- package/types/particle/ParticleGenerator.d.ts +0 -2
- package/types/particle/enum/ParticleShapeType.d.ts +1 -1
- package/types/particle/index.d.ts +10 -0
- package/types/particle/module/shape/BaseShape.d.ts +4 -7
- package/types/particle/module/shape/BoxShape.d.ts +3 -11
- package/types/particle/module/shape/CircleShape.d.ts +1 -9
- package/types/particle/module/shape/ConeShape.d.ts +1 -9
- package/types/particle/module/shape/HemisphereShape.d.ts +1 -9
- package/types/particle/module/shape/SphereShape.d.ts +1 -9
- package/types/particle/modules/EmissionModule.d.ts +0 -1
- package/types/particle/modules/MainModule.d.ts +7 -6
- 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/particle/moudules/Burst.d.ts +12 -4
- package/types/particle/moudules/Emission.d.ts +27 -11
- package/types/particle/moudules/ParticleCurve.d.ts +1 -17
- package/types/physics/Collider.d.ts +3 -1
- package/types/physics/PhysicsManager.d.ts +2 -4
- package/types/physics/PhysicsMaterial.d.ts +1 -0
- package/types/physics/joint/HingeJoint.d.ts +1 -1
- package/types/physics/joint/Joint.d.ts +4 -3
- package/types/physics/shape/ColliderShape.d.ts +2 -1
- package/types/physics/shape/SphereColliderShape.d.ts +1 -0
- package/types/shader/Shader.d.ts +1 -1
- package/types/xr/IXRDevice.d.ts +26 -0
- package/types/xr/XRManager.d.ts +91 -24
- package/types/xr/feature/XRFeatureManager.d.ts +65 -0
- package/types/xr/feature/XRFeatureType.d.ts +17 -0
- package/types/xr/feature/XRPlatformFeature.d.ts +17 -0
- package/types/xr/index.d.ts +16 -18
- package/types/xr/input/XRCamera.d.ts +28 -0
- package/types/xr/input/XRController.d.ts +38 -0
- package/types/xr/input/XRControllerPoseMode.d.ts +9 -0
- package/types/xr/input/XRInputButton.d.ts +19 -0
- package/types/xr/input/XRInputEvent.d.ts +21 -0
- package/types/xr/input/XRInputManager.d.ts +58 -0
- package/types/xr/input/XRInputType.d.ts +23 -0
- package/types/xr/input/XRTrackedUpdateFlag.d.ts +11 -0
- package/types/xr/input/XRTrackingState.d.ts +11 -0
- package/types/xr/session/XRSessionManager.d.ts +76 -0
- package/types/xr/session/XRSessionState.d.ts +13 -0
- package/types/xr/session/XRSessionType.d.ts +7 -0
- package/types/RenderPipeline/RenderElementX.d.ts +0 -12
- package/types/Ticker.d.ts +0 -30
- package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +0 -1
- package/types/graphic/PrimitiveVertexBinding.d.ts +0 -1
- package/types/particle/ParticleShaderMacro.d.ts +0 -1
- package/types/particle/ParticleShaderProperty.d.ts +0 -1
- package/types/particle/ParticleSystem.d.ts +0 -41
- package/types/particle/ParticleVertexElements.d.ts +0 -1
- package/types/particle/ParticleVertexUtils.d.ts +0 -1
- package/types/particle/modules/ShapeModule.d.ts +0 -9
- package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/moudules/EmissionModule.d.ts +0 -49
- package/types/particle/moudules/MainModule.d.ts +0 -59
- package/types/particle/moudules/ParticleGradient.d.ts +0 -28
- package/types/particle/moudules/ShapeModule.d.ts +0 -7
- package/types/particle/moudules/shape/BaseShape.d.ts +0 -28
- package/types/particle/moudules/shape/BoxShape.d.ts +0 -20
- package/types/particle/moudules/shape/CircleShape.d.ts +0 -27
- package/types/particle/moudules/shape/ConeShape.d.ts +0 -35
- package/types/particle/moudules/shape/HemisphereShape.d.ts +0 -23
- package/types/particle/moudules/shape/ShapeUtils.d.ts +0 -1
- package/types/particle/moudules/shape/SphereShape.d.ts +0 -23
- package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +0 -9
- package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +0 -15
- package/types/particle/moudules/shape/index.d.ts +0 -5
- package/types/utils/BoolUpdateFlag.d.ts +0 -12
- package/types/utils/DisorderedArray.d.ts +0 -18
- package/types/utils/UpdateFlag.d.ts +0 -20
- package/types/utils/UpdateFlagManager.d.ts +0 -1
- package/types/utils/Utils.d.ts +0 -31
- package/types/xr/component/XRPoseDriver.d.ts +0 -10
- package/types/xr/data/XRCamera.d.ts +0 -6
- package/types/xr/data/XRDevice.d.ts +0 -9
- package/types/xr/data/XRHandle.d.ts +0 -10
- package/types/xr/enum/EnumXRButton.d.ts +0 -5
- package/types/xr/enum/EnumXRDevicePhase.d.ts +0 -4
- package/types/xr/enum/EnumXRFeature.d.ts +0 -9
- package/types/xr/enum/EnumXRInputSource.d.ts +0 -8
- package/types/xr/enum/EnumXRMode.d.ts +0 -7
- package/types/xr/enum/EnumXRSubsystem.d.ts +0 -4
- package/types/xr/enum/EnumXRTrackingMode.d.ts +0 -7
- package/types/xr/feature/XRCameraManager.d.ts +0 -21
- package/types/xr/feature/XRFeature.d.ts +0 -29
- package/types/xr/feature/XRImageTrackManager.d.ts +0 -10
- package/types/xr/feature/XRInputManager.d.ts +0 -16
- package/types/xr/provider/XRProvider.d.ts +0 -19
- package/types/xr/subsystem/XRInputSubsystem.d.ts +0 -5
- package/types/xr/subsystem/XRSubsystem.d.ts +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.21",
|
|
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-beta.
|
|
18
|
+
"@galacean/engine-math": "1.1.0-beta.21"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.1.0-beta.
|
|
21
|
+
"@galacean/engine-design": "1.1.0-beta.21"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AssetType } from "../../asset/AssetType";
|
|
1
2
|
import { TextureFilterMode, TextureFormat, TextureWrapMode } from "../../texture";
|
|
2
3
|
/**
|
|
3
4
|
* The original data type of the atlas.
|
|
@@ -16,6 +17,8 @@ export interface AtlasConfig {
|
|
|
16
17
|
atlasItems: {
|
|
17
18
|
/** The url of the sub atlas. */
|
|
18
19
|
img: string;
|
|
20
|
+
/** Image type. */
|
|
21
|
+
type: AssetType;
|
|
19
22
|
/** Sprites contained in the sub atlas. */
|
|
20
23
|
sprites: AtlasSprite[];
|
|
21
24
|
}[];
|
package/types/Background.d.ts
CHANGED
|
@@ -33,11 +33,19 @@ export declare class Background {
|
|
|
33
33
|
*/
|
|
34
34
|
get texture(): Texture2D;
|
|
35
35
|
set texture(value: Texture2D);
|
|
36
|
+
/**
|
|
37
|
+
* Background texture fill mode.
|
|
38
|
+
* @remarks When `mode` is `BackgroundMode.Texture`, the property will take effects.
|
|
39
|
+
* @defaultValue `BackgroundTextureFillMode.FitHeight`
|
|
40
|
+
*/
|
|
41
|
+
get textureFillMode(): BackgroundTextureFillMode;
|
|
36
42
|
set textureFillMode(value: BackgroundTextureFillMode);
|
|
37
43
|
/**
|
|
38
44
|
* Constructor of Background.
|
|
39
45
|
* @param _engine Engine Which the background belongs to.
|
|
40
46
|
*/
|
|
41
47
|
constructor(_engine: Engine);
|
|
48
|
+
private _initMesh;
|
|
49
|
+
private _initMaterial;
|
|
42
50
|
private _createPlane;
|
|
43
51
|
}
|
package/types/Component.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Scene } from "./Scene";
|
|
|
5
5
|
* The base class of the components.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Component extends EngineObject {
|
|
8
|
+
protected _phasedActiveInScene: boolean;
|
|
8
9
|
private _phasedActive;
|
|
9
|
-
private _phasedActiveInScene;
|
|
10
10
|
private _enabled;
|
|
11
11
|
/**
|
|
12
12
|
* Indicates whether the component is enabled.
|
|
@@ -17,7 +17,7 @@ export declare class DisorderedArray<T> {
|
|
|
17
17
|
* @returns The replaced item is used to reset its index
|
|
18
18
|
*/
|
|
19
19
|
deleteByIndex(index: number): T;
|
|
20
|
-
forEach(callbackFn: (
|
|
20
|
+
forEach(callbackFn: (element: T) => void, swapFn: (element: T, index: number) => void): void;
|
|
21
21
|
forEachAndClean(callbackFn: (e: T) => void): void;
|
|
22
22
|
garbageCollection(): void;
|
|
23
23
|
private _startLoop;
|
|
@@ -4,14 +4,16 @@ import { Material } from "../material/Material";
|
|
|
4
4
|
import { Renderer } from "../Renderer";
|
|
5
5
|
import { ShaderPass } from "../shader/ShaderPass";
|
|
6
6
|
import { RenderState } from "../shader/state/RenderState";
|
|
7
|
+
import { IPoolElement } from "./IPoolElement";
|
|
7
8
|
import { RenderElement } from "./RenderElement";
|
|
8
9
|
/**
|
|
9
10
|
* Render element.
|
|
10
11
|
*/
|
|
11
|
-
export declare class MeshRenderElement extends RenderElement {
|
|
12
|
+
export declare class MeshRenderElement extends RenderElement implements IPoolElement {
|
|
12
13
|
/** Mesh. */
|
|
13
14
|
mesh: Mesh;
|
|
14
15
|
/** Sub mesh. */
|
|
15
16
|
subMesh: SubMesh;
|
|
16
17
|
setValue(component: Renderer, mesh: Mesh, subMesh: SubMesh, material: Material, renderState: RenderState, shaderPass: ShaderPass): void;
|
|
18
|
+
dispose(): void;
|
|
17
19
|
}
|
|
@@ -4,10 +4,12 @@ import { Renderer } from "../Renderer";
|
|
|
4
4
|
import { ShaderPass } from "../shader";
|
|
5
5
|
import { RenderState } from "../shader/state/RenderState";
|
|
6
6
|
import { Texture2D } from "../texture";
|
|
7
|
+
import { IPoolElement } from "./IPoolElement";
|
|
7
8
|
import { RenderElement } from "./RenderElement";
|
|
8
|
-
export declare class SpriteElement extends RenderElement {
|
|
9
|
+
export declare class SpriteElement extends RenderElement implements IPoolElement {
|
|
9
10
|
renderData: RenderData2D;
|
|
10
11
|
texture: Texture2D;
|
|
11
12
|
constructor();
|
|
12
13
|
setValue(component: Renderer, renderDate: RenderData2D, material: Material, texture: Texture2D, renderState: RenderState, shaderPass: ShaderPass): void;
|
|
14
|
+
dispose(): void;
|
|
13
15
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { RenderData2D } from "../2d/data/RenderData2D";
|
|
2
2
|
import { Material } from "../material/Material";
|
|
3
3
|
import { Renderer } from "../Renderer";
|
|
4
|
+
import { IPoolElement } from "./IPoolElement";
|
|
4
5
|
import { RenderElement } from "./RenderElement";
|
|
5
|
-
export declare class SpriteMaskElement extends RenderElement {
|
|
6
|
+
export declare class SpriteMaskElement extends RenderElement implements IPoolElement {
|
|
6
7
|
renderData: RenderData2D;
|
|
7
8
|
isAdd: boolean;
|
|
8
9
|
constructor();
|
|
9
10
|
setValue(component: Renderer, renderData: RenderData2D, material: Material): void;
|
|
11
|
+
dispose(): void;
|
|
10
12
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { IPoolElement } from "./IPoolElement";
|
|
1
2
|
import { RenderElement } from "./RenderElement";
|
|
2
3
|
import { SpriteElement } from "./SpriteElement";
|
|
3
|
-
export declare class TextRenderElement extends RenderElement {
|
|
4
|
+
export declare class TextRenderElement extends RenderElement implements IPoolElement {
|
|
4
5
|
charElements: SpriteElement[];
|
|
5
6
|
constructor();
|
|
7
|
+
dispose(): void;
|
|
6
8
|
}
|
package/types/Scene.d.ts
CHANGED
|
@@ -41,6 +41,12 @@ export declare class Scene extends EngineObject {
|
|
|
41
41
|
private _fogEnd;
|
|
42
42
|
private _fogDensity;
|
|
43
43
|
private _fogParams;
|
|
44
|
+
private _isActive;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the scene is active.
|
|
47
|
+
*/
|
|
48
|
+
get isActive(): boolean;
|
|
49
|
+
set isActive(value: boolean);
|
|
44
50
|
/**
|
|
45
51
|
* Scene-related shader data.
|
|
46
52
|
*/
|
|
@@ -7,7 +7,6 @@ export declare class DirectLight extends Light {
|
|
|
7
7
|
private static _cullingMaskProperty;
|
|
8
8
|
private static _colorProperty;
|
|
9
9
|
private static _directionProperty;
|
|
10
|
-
private static _combinedData;
|
|
11
10
|
private _reverseDirection;
|
|
12
11
|
/**
|
|
13
12
|
* Get direction.
|
|
@@ -18,3 +17,11 @@ export declare class DirectLight extends Light {
|
|
|
18
17
|
*/
|
|
19
18
|
get reverseDirection(): Vector3;
|
|
20
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Shader properties data of direct lights in the scene.
|
|
22
|
+
*/
|
|
23
|
+
export interface IDirectLightShaderData {
|
|
24
|
+
cullingMask: Int32Array;
|
|
25
|
+
color: Float32Array;
|
|
26
|
+
direction: Float32Array;
|
|
27
|
+
}
|
|
@@ -6,10 +6,6 @@ import { ShadowType } from "../shadow";
|
|
|
6
6
|
* Light base class.
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class Light extends Component {
|
|
9
|
-
/**
|
|
10
|
-
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
11
|
-
* */
|
|
12
|
-
protected static _maxLight: number;
|
|
13
9
|
/** Light Intensity */
|
|
14
10
|
intensity: number;
|
|
15
11
|
/**
|
|
@@ -2,5 +2,12 @@
|
|
|
2
2
|
* Light manager.
|
|
3
3
|
*/
|
|
4
4
|
export declare class LightManager {
|
|
5
|
+
/**
|
|
6
|
+
* Each type of light source is at most 10, beyond which it will not take effect.
|
|
7
|
+
* */
|
|
8
|
+
private static _maxLight;
|
|
9
|
+
private _directData;
|
|
10
|
+
private _pointData;
|
|
11
|
+
private _spotData;
|
|
5
12
|
private _getSunLightIndex;
|
|
6
13
|
}
|
|
@@ -8,7 +8,6 @@ export declare class PointLight extends Light {
|
|
|
8
8
|
private static _colorProperty;
|
|
9
9
|
private static _positionProperty;
|
|
10
10
|
private static _distanceProperty;
|
|
11
|
-
private static _combinedData;
|
|
12
11
|
/** Defines a distance cutoff at which the light's intensity must be considered zero. */
|
|
13
12
|
distance: number;
|
|
14
13
|
/**
|
|
@@ -16,3 +15,12 @@ export declare class PointLight extends Light {
|
|
|
16
15
|
*/
|
|
17
16
|
get position(): Vector3;
|
|
18
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Shader properties data of point lights in the scene.
|
|
20
|
+
*/
|
|
21
|
+
export interface IPointLightShaderData {
|
|
22
|
+
cullingMask: Int32Array;
|
|
23
|
+
color: Float32Array;
|
|
24
|
+
position: Float32Array;
|
|
25
|
+
distance: Float32Array;
|
|
26
|
+
}
|
|
@@ -11,7 +11,6 @@ export declare class SpotLight extends Light {
|
|
|
11
11
|
private static _distanceProperty;
|
|
12
12
|
private static _angleCosProperty;
|
|
13
13
|
private static _penumbraCosProperty;
|
|
14
|
-
private static _combinedData;
|
|
15
14
|
/** Defines a distance cutoff at which the light's intensity must be considered zero. */
|
|
16
15
|
distance: number;
|
|
17
16
|
/** Angle, in radians, from centre of spotlight where falloff begins. */
|
|
@@ -33,3 +32,15 @@ export declare class SpotLight extends Light {
|
|
|
33
32
|
*/
|
|
34
33
|
get reverseDirection(): Vector3;
|
|
35
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Shader properties data of spot lights in the scene.
|
|
37
|
+
*/
|
|
38
|
+
export interface ISpotLightShaderData {
|
|
39
|
+
cullingMask: Int32Array;
|
|
40
|
+
color: Float32Array;
|
|
41
|
+
position: Float32Array;
|
|
42
|
+
direction: Float32Array;
|
|
43
|
+
distance: Float32Array;
|
|
44
|
+
angleCos: Float32Array;
|
|
45
|
+
penumbraCos: Float32Array;
|
|
46
|
+
}
|
|
@@ -9,11 +9,11 @@ export declare class SkinnedMeshRenderer extends MeshRenderer {
|
|
|
9
9
|
private static _jointCountProperty;
|
|
10
10
|
private static _jointSamplerProperty;
|
|
11
11
|
private static _jointMatrixProperty;
|
|
12
|
+
private _localBounds;
|
|
12
13
|
private _jointDataCreateCache;
|
|
13
14
|
private _blendShapeWeights;
|
|
14
15
|
private _maxVertexUniformVectors;
|
|
15
16
|
private _rootBone;
|
|
16
|
-
private _localBounds;
|
|
17
17
|
private _jointMatrices;
|
|
18
18
|
private _jointTexture;
|
|
19
19
|
private _bones;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ParticleRenderer } from "./ParticleRenderer";
|
|
2
1
|
import { ParticleStopMode } from "./enums/ParticleStopMode";
|
|
3
2
|
import { ColorOverLifetimeModule } from "./modules/ColorOverLifetimeModule";
|
|
4
3
|
import { EmissionModule } from "./modules/EmissionModule";
|
|
@@ -47,7 +46,6 @@ export declare class ParticleGenerator {
|
|
|
47
46
|
*/
|
|
48
47
|
get randomSeed(): number;
|
|
49
48
|
set randomSeed(value: number);
|
|
50
|
-
constructor(renderer: ParticleRenderer);
|
|
51
49
|
/**
|
|
52
50
|
* Start emitting particles.
|
|
53
51
|
* @param withChildren - Whether to start the particle generator of the child entity
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { ParticleGenerator } from "./ParticleGenerator";
|
|
1
2
|
export { ParticleMaterial } from "./ParticleMaterial";
|
|
2
3
|
export { ParticleRenderer } from "./ParticleRenderer";
|
|
3
4
|
export { ParticleCurveMode } from "./enums/ParticleCurveMode";
|
|
@@ -7,6 +8,15 @@ export { ParticleScaleMode } from "./enums/ParticleScaleMode";
|
|
|
7
8
|
export { ParticleSimulationSpace } from "./enums/ParticleSimulationSpace";
|
|
8
9
|
export { ParticleStopMode } from "./enums/ParticleStopMode";
|
|
9
10
|
export { Burst } from "./modules/Burst";
|
|
11
|
+
export { ColorOverLifetimeModule } from "./modules/ColorOverLifetimeModule";
|
|
12
|
+
export { EmissionModule } from "./modules/EmissionModule";
|
|
13
|
+
export { MainModule } from "./modules/MainModule";
|
|
10
14
|
export { ParticleCompositeCurve } from "./modules/ParticleCompositeCurve";
|
|
15
|
+
export { ParticleCompositeGradient } from "./modules/ParticleCompositeGradient";
|
|
11
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";
|
|
12
22
|
export * from "./modules/shape/index";
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { IClone } from "@galacean/engine-design";
|
|
2
|
-
import { BoundingBox } from "@galacean/engine-math";
|
|
3
2
|
import { ParticleShapeType } from "../../enum/ParticleShapeType";
|
|
4
3
|
/**
|
|
5
4
|
* Configures the initial positions and directions of particles.
|
|
6
5
|
*/
|
|
7
|
-
export declare class BaseShape implements IClone {
|
|
8
|
-
/** The type of shape to emit particles from. */
|
|
9
|
-
shapeType: ParticleShapeType;
|
|
6
|
+
export declare abstract class BaseShape implements IClone {
|
|
10
7
|
/** Specifies whether the ShapeModule is enabled or disabled. */
|
|
11
8
|
enable: boolean;
|
|
9
|
+
/** The type of shape to emit particles from. */
|
|
10
|
+
shapeType: ParticleShapeType;
|
|
12
11
|
/** Randomizes the starting direction of particles. */
|
|
13
12
|
randomDirectionAmount: number;
|
|
14
13
|
/**
|
|
@@ -20,7 +19,5 @@ export declare class BaseShape implements IClone {
|
|
|
20
19
|
* @override
|
|
21
20
|
* @inheritDoc
|
|
22
21
|
*/
|
|
23
|
-
clone(): BaseShape;
|
|
24
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
25
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
22
|
+
abstract clone(): BaseShape;
|
|
26
23
|
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
+
import { Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import { BoundingBox, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
/**
|
|
4
|
-
* Box emitter shape
|
|
4
|
+
* Box emitter shape.
|
|
5
5
|
*/
|
|
6
6
|
export declare class BoxShape extends BaseShape {
|
|
7
7
|
/** Thickness of the box to emit particles from. */
|
|
8
|
-
|
|
8
|
+
size: Vector3;
|
|
9
9
|
constructor();
|
|
10
|
-
/**
|
|
11
|
-
* @inheritDoc
|
|
12
|
-
*/
|
|
13
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
18
10
|
cloneTo(destShape: BoxShape): void;
|
|
19
11
|
clone(): BoxShape;
|
|
20
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
import { ParticleShapeMultiModeValue } from "../../enum";
|
|
4
4
|
/**
|
|
5
5
|
* Circle Particle Emitter
|
|
@@ -13,14 +13,6 @@ export declare class CircleShape extends BaseShape {
|
|
|
13
13
|
/** The mode to generate particles around the arc. */
|
|
14
14
|
arcMode: ParticleShapeMultiModeValue;
|
|
15
15
|
constructor();
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
20
|
-
/**
|
|
21
|
-
* @inheritDoc
|
|
22
|
-
*/
|
|
23
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
24
16
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
25
17
|
cloneTo(destShape: CircleShape): void;
|
|
26
18
|
clone(): CircleShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector2, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
export declare enum ConeEmitType {
|
|
4
4
|
Base = 0,
|
|
5
5
|
BaseShell = 1,
|
|
@@ -21,14 +21,6 @@ export declare class ConeShape extends BaseShape {
|
|
|
21
21
|
/** Cone emitter subtype */
|
|
22
22
|
emitType: ConeEmitType;
|
|
23
23
|
constructor();
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
32
24
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
33
25
|
cloneTo(destShape: ConeShape): void;
|
|
34
26
|
clone(): ConeShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
/**
|
|
4
4
|
* Hemisphere emitter
|
|
5
5
|
*/
|
|
@@ -9,14 +9,6 @@ export declare class HemisphereShape extends BaseShape {
|
|
|
9
9
|
/** Whether emit from shell */
|
|
10
10
|
emitFromShell: boolean;
|
|
11
11
|
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
20
12
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
21
13
|
cloneTo(destShape: HemisphereShape): void;
|
|
22
14
|
clone(): HemisphereShape;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseShape } from "./BaseShape";
|
|
2
|
-
import {
|
|
2
|
+
import { Rand, Vector3 } from "@galacean/engine-math";
|
|
3
3
|
/**
|
|
4
4
|
* Sphere emitter
|
|
5
5
|
*/
|
|
@@ -9,14 +9,6 @@ export declare class SphereShape extends BaseShape {
|
|
|
9
9
|
/** Whether emit from shell */
|
|
10
10
|
emitFromShell: boolean;
|
|
11
11
|
constructor();
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
protected _getShapeBoundBox(boundBox: BoundingBox): void;
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
protected _getSpeedBoundBox(boundBox: BoundingBox): void;
|
|
20
12
|
_generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;
|
|
21
13
|
cloneTo(destShape: SphereShape): void;
|
|
22
14
|
clone(): SphereShape;
|
|
@@ -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;
|
|
@@ -57,7 +54,6 @@ export declare class MainModule implements ICustomClone {
|
|
|
57
54
|
scalingMode: ParticleScaleMode;
|
|
58
55
|
/** If set to true, the Particle Generator automatically begins to play on startup. */
|
|
59
56
|
playOnEnabled: boolean;
|
|
60
|
-
private _maxParticles;
|
|
61
57
|
private _generator;
|
|
62
58
|
private _gravity;
|
|
63
59
|
/**
|
|
@@ -65,4 +61,9 @@ export declare class MainModule implements ICustomClone {
|
|
|
65
61
|
*/
|
|
66
62
|
get maxParticles(): number;
|
|
67
63
|
set maxParticles(value: number);
|
|
64
|
+
/**
|
|
65
|
+
* The initial size of particles when the Particle Generator first spawns them.
|
|
66
|
+
*/
|
|
67
|
+
get startSize(): ParticleCompositeCurve;
|
|
68
|
+
set startSize(value: ParticleCompositeCurve);
|
|
68
69
|
}
|
|
@@ -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.
|
|
@@ -4,12 +4,20 @@ import { ParticleCurve } from "./ParticleCurve";
|
|
|
4
4
|
* A burst is a particle emission event, where a number of particles are all emitted at the same time
|
|
5
5
|
*/
|
|
6
6
|
export declare class Burst implements IClone {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
private _time;
|
|
8
|
+
private _count;
|
|
9
|
+
/**
|
|
10
|
+
* The time that each burst occurs.
|
|
11
|
+
*/
|
|
12
|
+
get time(): number;
|
|
13
|
+
/**
|
|
14
|
+
* The number of particles to emit.
|
|
15
|
+
*/
|
|
16
|
+
get count(): ParticleCurve;
|
|
9
17
|
/**
|
|
10
18
|
* Create burst object.
|
|
11
|
-
* @param time - Time to emit the burst
|
|
12
|
-
* @param count -
|
|
19
|
+
* @param time - Time to emit the burst.
|
|
20
|
+
* @param count - Minimum number of particles to emit.
|
|
13
21
|
*/
|
|
14
22
|
constructor(time: number, count: ParticleCurve);
|
|
15
23
|
/**
|
|
@@ -1,25 +1,41 @@
|
|
|
1
|
-
import { IClone } from "@galacean/engine-design";
|
|
2
1
|
import { Burst } from "./Burst";
|
|
3
|
-
import {
|
|
2
|
+
import { IClone } from "@galacean/engine-design";
|
|
4
3
|
/**
|
|
5
4
|
* The EmissionModule of a Particle System.
|
|
6
5
|
*/
|
|
7
6
|
export declare class EmissionModule implements IClone {
|
|
7
|
+
private _emissionRate;
|
|
8
|
+
private _emissionRateOverDistance;
|
|
9
|
+
private _bursts;
|
|
8
10
|
/** Specifies whether the EmissionModule is enabled or disabled. */
|
|
9
11
|
enable: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The rate of particle emission.
|
|
14
|
+
*/
|
|
15
|
+
get emissionRate(): number;
|
|
16
|
+
set emissionRate(value: number);
|
|
17
|
+
/**
|
|
18
|
+
* The rate at which the emitter spawns new particles over distance.
|
|
19
|
+
*/
|
|
20
|
+
get emissionRateOverDistance(): number;
|
|
21
|
+
set emissionRateOverDistance(value: number);
|
|
15
22
|
/**
|
|
16
23
|
* Gets the burst array.
|
|
17
24
|
*/
|
|
18
|
-
get bursts():
|
|
19
|
-
|
|
25
|
+
get bursts(): Burst[];
|
|
26
|
+
/**
|
|
27
|
+
* The current number of bursts.
|
|
28
|
+
*/
|
|
29
|
+
get burstCount(): number;
|
|
20
30
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
31
|
+
* Gets a single burst from the array of bursts.
|
|
32
|
+
* @param index - The index of the burst to retrieve.
|
|
33
|
+
* @return The burst data at the given index.
|
|
34
|
+
*/
|
|
35
|
+
getBurstByIndex(index: number): Burst;
|
|
36
|
+
/**
|
|
37
|
+
* Add a single burst from the array of bursts.
|
|
38
|
+
* @param burst - The burst data
|
|
23
39
|
*/
|
|
24
40
|
addBurst(burst: Burst): void;
|
|
25
41
|
/**
|