diff --git a/cocos/3d/framework/particle/animator/texture-animation.ts b/cocos/3d/framework/particle/animator/texture-animation.ts index 9f5135a00e..c2b71bd2e7 100644 --- a/cocos/3d/framework/particle/animator/texture-animation.ts +++ b/cocos/3d/framework/particle/animator/texture-animation.ts @@ -59,7 +59,7 @@ export default class TextureAnimationModule { set enable (val) { this._enable = val; - (this.ps!.getComponent(cc.ParticleSystemRenderer) as any)._updateMaterialParams(); + (this.ps!.renderer as any)._updateMaterialParams(); } @property({ diff --git a/cocos/3d/framework/particle/particle-system-component.ts b/cocos/3d/framework/particle/particle-system-component.ts index d9905f9d75..d1fc013080 100644 --- a/cocos/3d/framework/particle/particle-system-component.ts +++ b/cocos/3d/framework/particle/particle-system-component.ts @@ -316,7 +316,7 @@ export class ParticleSystemComponent extends RenderableComponent { @property({ type: ParticleSystemRenderer, }) - private renderer: ParticleSystemRenderer = new ParticleSystemRenderer(); + public renderer: ParticleSystemRenderer = new ParticleSystemRenderer(); private _isPlaying: boolean; private _isPaused: boolean; @@ -487,6 +487,7 @@ export class ParticleSystemComponent extends RenderableComponent { } vec3.scale(particle.velocity, particle.velocity, this.startSpeed.evaluate(this._time / this.duration, rand)!); + vec3.copy(particle.ultimateVelocity, particle.velocity); switch (this._simulationSpace) { case Space.Local: diff --git a/cocos/3d/framework/particle/renderer/particle-system-renderer.ts b/cocos/3d/framework/particle/renderer/particle-system-renderer.ts index fd1085bfc0..b8a74209bc 100644 --- a/cocos/3d/framework/particle/renderer/particle-system-renderer.ts +++ b/cocos/3d/framework/particle/renderer/particle-system-renderer.ts @@ -340,8 +340,6 @@ export default class ParticleSystemRenderer { } if (this.particleSystem.velocityOvertimeModule.enable) { this.particleSystem.velocityOvertimeModule.animate(p); - } else { - vec3.copy(p.ultimateVelocity, p.velocity); } if (this.particleSystem.limitVelocityOvertimeModule.enable) { this.particleSystem.limitVelocityOvertimeModule.animate(p);