Skip to content

Commit

Permalink
add particle system api
Browse files Browse the repository at this point in the history
  • Loading branch information
SantyWang committed Oct 12, 2023
1 parent 6e58f98 commit fc15dc3
Show file tree
Hide file tree
Showing 44 changed files with 612 additions and 199 deletions.
7 changes: 6 additions & 1 deletion cocos/particle/Impl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomDataMode, BoxShapeEmitFrom, PlaybackState, NoiseQuality, ConeShapeEmitFrom, CoordinateSpace, CurveRangeMode, GradientRangeMode, AnimationMode, TimeMode, RowMode, TextureMode, ScalingMode } from './define';
import { CustomDataMode, BoxShapeEmitFrom, PlaybackState, NoiseQuality, ConeShapeEmitFrom, CoordinateSpace, CurveRangeMode, GradientRangeMode, AnimationMode, TimeMode, RowMode, TextureMode, ScalingMode, ParticleSystemModuleStage } from './define';

export declare namespace Impl {
export class ParticleSystem {
Expand All @@ -23,6 +23,9 @@ export declare namespace Impl {
setCapacity(capacity: number): void;
setAutoRandomSeed(autoRandomSeed: boolean): void;
setRandomSeed(seed: number): void;

addModule(module: ParticleSystemModule): void;
removeModule(module: ParticleSystemModule): void;
}

export class ParticleSystemManager {
Expand Down Expand Up @@ -63,6 +66,8 @@ export declare namespace Impl {

export class ParticleSystemModule {
setEnabled(enable: boolean): void;
setStage(stage: ParticleSystemModuleStage): void;
setExecutionOrder(executionOrder: number): void;
dispose(): void;
}

Expand Down
24 changes: 21 additions & 3 deletions cocos/particle/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,24 @@ export enum ScalingMode {
SHAPE,
}

export enum ShapeType {
SPHERE,
CONE,
DONUT,
BOX,
CIRCLE,
EDGE,
RECTANGLE
}

export enum ParticleSystemModuleStage {
EMISSION,
SPAWN,
PRE_SOLVE_UPDATE,
POST_SOLVE_UPDATE,
RENDER
}

export const meshPosition = new Attribute(AttributeName.ATTR_POSITION, Format.RGB32F, false, 0); // mesh position
export const meshUv = new Attribute(AttributeName.ATTR_TEX_COORD, Format.RGB32F, false, 0); // mesh uv
export const meshNormal = new Attribute(AttributeName.ATTR_NORMAL, Format.RGB32F, false, 0); // mesh normal
Expand All @@ -217,6 +235,6 @@ export const meshColorRGBA32 = new Attribute(AttributeName.ATTR_COLOR, Format.RG
export const particlePosition = new Attribute('a_particle_position', Format.RGB32F, false, 1, true); // particle position
export const particleRotation = new Attribute('a_particle_rotation', Format.RGB32F, false, 1, true); // particle rotation
export const particleSize = new Attribute('a_particle_size', Format.RGB32F, false, 1, true); // particle size
export const particleColor = new Attribute('a_particle_color', Format.RGBA8, true, 1, true); // particle color
export const particleSubUVIndex = new Attribute('a_particle_sub_uv_index', Format.R32F, false, 1, true); // particle sub uv index
export const particleVelocity = new Attribute('a_particle_velocity', Format.RGB32F, false, 1, true); // particle velocity
export const particleColor = new Attribute('a_particle_color', Format.RGBA8, true, 1, true); // particle color
export const particleSubUVIndex = new Attribute('a_particle_sub_uv_index', Format.R32F, false, 1, true); // particle sub uv index
export const particleVelocity = new Attribute('a_particle_velocity', Format.RGB32F, false, 1, true); // particle velocity
4 changes: 3 additions & 1 deletion cocos/particle/modules/box-shape.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Enum, Vec3 } from '../../core';
import { ccclass, serializable, tooltip, type, visible } from '../../core/data/class-decorator';
import { BoxShapeEmitFrom } from '../define';
import { BoxShapeEmitFrom, ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';

Check failure on line 4 in cocos/particle/modules/box-shape.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModule } from '../particle-system-module';
import { Shape } from './shape';

@ccclass('cc.BoxShape')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 0)
export class BoxShape extends Shape {
/**
* @en Specify the position from which the particles are to be emitted.
Expand Down
3 changes: 3 additions & 0 deletions cocos/particle/modules/circle-shape.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { CCFloat, clamp, clamp01 } from '../../core';
import { ccclass, range, rangeStep, serializable, tooltip, type } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';

Check failure on line 5 in cocos/particle/modules/circle-shape.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModule } from '../particle-system-module';
import { DistributableShape } from './distributable-shape';

@ccclass('cc.CircleShape')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 0)
export class CircleShape extends DistributableShape {
@type(CCFloat)
@tooltip('i18n:ParticleSystem.CircleShape.radius')
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/color-by-speed.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Vec2 } from '../../core';
import { ccclass, rangeStep, serializable, tooltip, type } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { ParticleSystemModuleStage } from '../define';
import { GradientRange } from '../gradient-range';
import { Impl } from '../impl';

Check failure on line 6 in cocos/particle/modules/color-by-speed.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModule } from '../particle-system-module';
Expand All @@ -10,6 +11,7 @@ import { ParticleSystemModule } from '../particle-system-module';
* @en Controls the color of each particle based on its speed.
*/
@ccclass('cc.ColorBySpeed')
@ParticleSystemModule.register(ParticleSystemModuleStage.POST_SOLVE_UPDATE, 1)
export class ColorBySpeed extends ParticleSystemModule {
/**
* @zh 基于每个粒子的速度控制其颜色。
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/color-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { ccclass, type, serializable, tooltip } from 'cc.decorator';
import { ParticleSystemModule } from '../particle-system-module';
import { GradientRange } from '../gradient-range';
import { Impl } from '../impl';

Check failure on line 28 in cocos/particle/modules/color-over-lifetime.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModuleStage } from '../define';

/**
* @en
Expand All @@ -34,6 +35,7 @@ import { Impl } from '../impl';
* 本模块用于在粒子生命周期内对颜色进行改变,可以修改模块下的颜色渐变条来查看粒子颜色渐变效果。
*/
@ccclass('cc.ColorOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.POST_SOLVE_UPDATE, 0)
export class ColorOverLifetime extends ParticleSystemModule {
/**
* @en Change color over life time. Evaluate by key interpolation.
Expand Down
4 changes: 3 additions & 1 deletion cocos/particle/modules/cone-shape.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { CCFloat, clamp, clamp01, Enum } from '../../core';
import { ccclass, range, serializable, tooltip, type, visible } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { ConeShapeEmitFrom } from '../define';
import { ConeShapeEmitFrom, ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';

Check failure on line 5 in cocos/particle/modules/cone-shape.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModule } from '../particle-system-module';
import { DistributableShape } from './distributable-shape';

@ccclass('cc.ConeShape')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 0)
export class ConeShape extends DistributableShape {
@type(CCFloat)
@range([0, 90])
Expand Down
3 changes: 2 additions & 1 deletion cocos/particle/modules/curl-noise-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import { CCBoolean, CCFloat, CCInteger, clamp, clamp01, Enum, _decorator } from '../../core';
import { rangeMin, tooltip } from '../../core/data/decorators';
import { CurveRange, NEGATIVE_ONE_TO_ONE } from '../curve-range';
import { NoiseQuality } from '../define';
import { NoiseQuality, ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';

Check failure on line 29 in cocos/particle/modules/curl-noise-over-lifetime.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModule } from '../particle-system-module';

Expand All @@ -38,6 +38,7 @@ const { ccclass, serializable, type, range, visible } = _decorator;
* 为粒子添加噪声是创建有趣方案和效果的简单有效方法。
*/
@ccclass('cc.CurlNoiseOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 6)
export class CurlNoiseOverLifetime extends ParticleSystemModule {
@type(CCBoolean)
@tooltip('i18n:ParticleSystem.CurlNoiseOverLifetime.separateAxes')
Expand Down
3 changes: 2 additions & 1 deletion cocos/particle/modules/custom-data.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { CCInteger, clamp, Enum } from '../../core';
import { ccclass, range, serializable, tooltip, type, visible } from '../../core/data/class-decorator';
import { CurveRange } from '../curve-range';
import { CustomDataMode } from '../define';
import { CustomDataMode, ParticleSystemModuleStage } from '../define';
import { GradientRange } from '../gradient-range';
import { Impl } from '../impl';

Check failure on line 6 in cocos/particle/modules/custom-data.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.CustomData')
@ParticleSystemModule.register(ParticleSystemModuleStage.POST_SOLVE_UPDATE, 5)
export class CustomData extends ParticleSystemModule {
@type(Enum(CustomDataMode))
@tooltip('i18n:ParticleSystem.CustomData.mode1')
Expand Down
5 changes: 3 additions & 2 deletions cocos/particle/modules/dampen-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import { ccclass, tooltip, displayOrder, type, serializable, visible, range, rangeMin } from 'cc.decorator';
import { CCBoolean, CCFloat, clamp01, Enum } from '../../core';
import { CoordinateSpace } from '../define';
import { CoordinateSpace, ParticleSystemModuleStage } from '../define';
import { ParticleSystemModule } from '../particle-system-module';
import { CurveRange } from '../curve-range';
import { Impl } from '../impl';

Check failure on line 30 in cocos/particle/modules/dampen-over-lifetime.ts

View workflow job for this annotation

GitHub Actions / npm_test

Cannot find module '../impl' or its corresponding type declarations.
Expand All @@ -40,6 +40,7 @@ import { Impl } from '../impl';
* 每个轴上的粒子极限速度大小都是可以用曲线来进行编辑,修改曲线就能够看到粒子大小变化的效果了。
*/
@ccclass('cc.DampenOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 7)
export class DampenOverLifetime extends ParticleSystemModule {
/**
* @en Limit velocity on separate axis.
Expand Down Expand Up @@ -167,7 +168,7 @@ export class DampenOverLifetime extends ParticleSystemModule {
@visible(function (this: DampenOverLifetime): boolean {
return this.separateAxes;
})
@tooltip('i18n:limitVelocityOvertimeModule.space')
@tooltip('i18n:ParticleSystem.DampenOverLifetime..space')
public get space (): CoordinateSpace {
return this._space;
}
Expand Down
3 changes: 3 additions & 0 deletions cocos/particle/modules/donut-shape.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { CCFloat, clamp, clamp01 } from '../../core';
import { ccclass, range, serializable, tooltip, type } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';
import { DistributableShape } from './distributable-shape';

@ccclass('cc.DonutShape')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 0)
export class DonutShape extends DistributableShape {
@type(CCFloat)
@tooltip('i18n:ParticleSystem.DonutShape.radius')
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/drag-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { CCBoolean } from '../../core';
import { ccclass, serializable, tooltip, type } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.DragOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 8)
export class DragOverLifetime extends ParticleSystemModule {
@type(CurveRange)
@rangeMin(0)
Expand Down
3 changes: 3 additions & 0 deletions cocos/particle/modules/edge-shape.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { CCFloat } from '../../core';
import { ccclass, serializable, tooltip, type } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';
import { DistributableShape } from './distributable-shape';

@ccclass('cc.EdgeShape')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 0)
export class EdgeShape extends DistributableShape {
@type(CCFloat)
@tooltip('i18n:ParticleSystem.EdgeShape.length')
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/emission-by-burst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { CCFloat, CCInteger, clamp01 } from '../../core';
import { ccclass, displayOrder, editable, range, serializable, tooltip, type } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

Expand Down Expand Up @@ -101,6 +102,7 @@ export class Burst {
}

@ccclass('cc.EmissionByBurst')
@ParticleSystemModule.register(ParticleSystemModuleStage.EMISSION, 2)
export class EmissionByBurst extends ParticleSystemModule {
/**
* @en Burst triggers of the particle system.
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/emission-over-distance.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { serializable, range, tooltip } from '../../core';
import { ccclass, type } from '../../core/data/class-decorator';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.EmissionOverDistance')
@ParticleSystemModule.register(ParticleSystemModuleStage.EMISSION, 1)
export class EmissionOverDistance extends ParticleSystemModule {
/**
* @en The value curve of emission rate over distance.
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/emission-over-time.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { serializable, range, tooltip } from '../../core';
import { ccclass, type } from '../../core/data/class-decorator';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.EmissionOverTime')
@ParticleSystemModule.register(ParticleSystemModuleStage.EMISSION, 0)
export class EmissionOverTime extends ParticleSystemModule {
/**
* @en The value curve of emission rate over time.
Expand Down
3 changes: 2 additions & 1 deletion cocos/particle/modules/force-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import { ccclass, tooltip, displayOrder, type, serializable } from 'cc.decorator';
import { CCBoolean, Enum } from '../../core';
import { CoordinateSpace } from '../define';
import { CoordinateSpace, ParticleSystemModuleStage } from '../define';
import { CurveRange } from '../curve-range';
import { ParticleSystemModule } from '../particle-system-module';
import { Impl } from '../impl';
Expand All @@ -38,6 +38,7 @@ import { Impl } from '../impl';
* 每个轴上的受力大小都是可以用曲线来进行编辑,修改曲线就能够看到粒子受力变化的效果了。
*/
@ccclass('cc.ForceOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 0)
export class ForceOverLifetime extends ParticleSystemModule {
/**
* @en Force on the X axis.
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/gravity-over-lifetime.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { serializable, displayOrder, tooltip } from '../../core';
import { ccclass, type } from '../../core/data/class-decorator';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.GravityOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 1)
export class GravityOverLifetime extends ParticleSystemModule {
@type(CurveRange)
@tooltip('i18n:ParticleSystem.GravityOverLifetime.x')
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/inherit-start-velocity.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { CurveRange } from '../../../typedoc-index';
import { ccclass, serializable, tooltip, type } from '../../core/data/class-decorator';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.InheritStartVelocity')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 6)
export class InheritStartVelocity extends ParticleSystemModule {
@type(CurveRange)
@tooltip('i18n:ParticleSystem.InheritVelocity.rate')
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/inherit-velocity-over-lifetime.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { CurveRange } from '../../../typedoc-index';
import { ccclass, serializable, tooltip, type } from '../../core/data/class-decorator';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.InheritVelocityOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 5)
export class InheritVelocityOverLifetime extends ParticleSystemModule {
@type(CurveRange)
@tooltip('i18n:ParticleSystem.InheritVelocityOverLifetime.rate')
Expand Down
3 changes: 2 additions & 1 deletion cocos/particle/modules/linear-velocity-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

import { ccclass, tooltip, type, serializable } from 'cc.decorator';
import { CoordinateSpace } from '../define';
import { CoordinateSpace, ParticleSystemModuleStage } from '../define';
import { CurveRange } from '../curve-range';
import { ParticleSystemModule } from '../particle-system-module';
import { Impl } from '../impl';
Expand All @@ -40,6 +40,7 @@ import { Enum } from '../../core';
* 每个轴上的速度大小都是可以用曲线来进行编辑,修改曲线就能够看到粒子速度变化的效果了。
*/
@ccclass('cc.LinearVelocityOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 3)
export class LinearVelocityOverLifetime extends ParticleSystemModule {
/**
* @en Velocity on X axis.
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/orbital-velocity-over-lifetime.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { CurveRange } from '../../../typedoc-index';
import { ccclass, serializable, tooltip, type } from '../../core/data/class-decorator';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.OrbitalVelocityOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 4)
export class OrbitalVelocityOverLifetime extends ParticleSystemModule {
@type(CurveRange)
@tooltip('i18n:ParticleSystem.OrbitalVelocityOverLifetime.orbitalX')
Expand Down
3 changes: 3 additions & 0 deletions cocos/particle/modules/rectangle-shape.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { ccclass } from '../../core/data/class-decorator';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';
import { Shape } from './shape';

@ccclass('cc.RectangleShape')
@ParticleSystemModule.register(ParticleSystemModuleStage.SPAWN, 0)
export class RectangleShape extends Shape {
protected createImpl (): Impl.ParticleSystemModule {
return new Impl.RectangleShape();
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/rotation-by-speed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { CCBoolean, Vec2 } from '../../core';
import { ccclass, serializable, tooltip, type, visible } from '../../core/data/class-decorator';
import { rangeMin } from '../../core/data/decorators';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

@ccclass('cc.RotationBySpeed')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 10)
export class RotationBySpeed extends ParticleSystemModule {
@type(CCBoolean)
@tooltip('i18n:ParticleSystem.RotationBySpeed.separateAxes')
Expand Down
2 changes: 2 additions & 0 deletions cocos/particle/modules/rotation-over-lifetime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import { ccclass, tooltip, type, serializable, visible } from 'cc.decorator';
import { CCBoolean } from '../../core';
import { CurveRange } from '../curve-range';
import { ParticleSystemModuleStage } from '../define';
import { Impl } from '../impl';
import { ParticleSystemModule } from '../particle-system-module';

Expand All @@ -39,6 +40,7 @@ import { ParticleSystemModule } from '../particle-system-module';
* 每个轴上的旋转角速度都是可以用曲线来进行编辑,修改曲线就能够看到粒子受力变化的效果了。
*/
@ccclass('cc.RotationOverLifetime')
@ParticleSystemModule.register(ParticleSystemModuleStage.PRE_SOLVE_UPDATE, 9)
export class RotationOverLifetime extends ParticleSystemModule {
/**
* @en Rotation around separate axis.
Expand Down
Loading

0 comments on commit fc15dc3

Please sign in to comment.