mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 22:58:44 +00:00
lottie: adjusted the effect distance
This commit is contained in:
parent
bf90903cd7
commit
74e494ec49
2 changed files with 2 additions and 2 deletions
|
@ -1426,7 +1426,7 @@ void LottieBuilder::updateEffect(LottieLayer* layer, float frameNo)
|
||||||
auto effect = static_cast<LottieFxDropShadow*>(*ef);
|
auto effect = static_cast<LottieFxDropShadow*>(*ef);
|
||||||
auto color = effect->color(frameNo);
|
auto color = effect->color(frameNo);
|
||||||
//seems the opacity range in dropshadow is 0 ~ 256
|
//seems the opacity range in dropshadow is 0 ~ 256
|
||||||
layer->scene->push(SceneEffect::DropShadow, color.rgb[0], color.rgb[1], color.rgb[2], std::min(255, (int)effect->opacity(frameNo)), (double)effect->angle(frameNo), (double)effect->distance(frameNo), (double)effect->blurness(frameNo) * BLUR_TO_SIGMA, QUALITY);
|
layer->scene->push(SceneEffect::DropShadow, color.rgb[0], color.rgb[1], color.rgb[2], std::min(255, (int)effect->opacity(frameNo)), (double)effect->angle(frameNo), (double)effect->distance(frameNo) * 0.5f, (double)effect->blurness(frameNo) * BLUR_TO_SIGMA, QUALITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LottieEffect::GaussianBlur: {
|
case LottieEffect::GaussianBlur: {
|
||||||
|
|
|
@ -1298,7 +1298,7 @@ void LottieParser::parseEffect(LottieEffect* effect, void(LottieParser::*func)(L
|
||||||
else skip(key);
|
else skip(key);
|
||||||
}
|
}
|
||||||
++idx;
|
++idx;
|
||||||
} else skip();
|
} else (this->*func)(effect, idx++);
|
||||||
} else skip();
|
} else skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue