From c891a197e705ba19335a2d9e884bcf1131498ca2 Mon Sep 17 00:00:00 2001 From: w00445410 Date: Mon, 27 May 2024 08:57:44 +0000 Subject: [PATCH] particle emitrate bugfix Signed-off-by: w00445410 Change-Id: I879f95ee21c735f744d2b7f646a89da4a425aae1 --- frameworks/bridge/declarative_frontend/jsview/js_particle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/bridge/declarative_frontend/jsview/js_particle.cpp b/frameworks/bridge/declarative_frontend/jsview/js_particle.cpp index dc681f6f95a..c277f5bf7c8 100644 --- a/frameworks/bridge/declarative_frontend/jsview/js_particle.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/js_particle.cpp @@ -836,7 +836,7 @@ void JSParticle::ParseEmitterProps(std::vector& data, c auto emitRateProperty = paramObj->GetProperty("emitRate"); if (emitRateProperty->IsNumber()) { auto emitRateValue = emitRateProperty->ToNumber(); - emitterProperty.emitRate = emitRateValue > 0 ? emitRateValue : PARTICLE_DEFAULT_EMITTER_RATE; + emitterProperty.emitRate = emitRateValue >= 0 ? emitRateValue : PARTICLE_DEFAULT_EMITTER_RATE; } auto positionProperty = paramObj->GetProperty("position"); if (positionProperty->IsObject()) { -- Gitee