mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
lottie/expressions: hotfix
issue: https://github.com/thorvg/thorvg/issues/3400
This commit is contained in:
parent
934a6e5418
commit
d0f33a1bc5
2 changed files with 5 additions and 3 deletions
|
@ -1266,8 +1266,10 @@ static void _buildMath(jerry_value_t context)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LottieExpressions::buildGlobal(LottieExpression* exp)
|
void LottieExpressions::buildGlobal(float frameNo, LottieExpression* exp)
|
||||||
{
|
{
|
||||||
|
jerry_object_set_native_ptr(comp, &freeCb, _expcontent(exp, frameNo, exp->layer));
|
||||||
|
|
||||||
auto index = jerry_number(exp->layer->ix);
|
auto index = jerry_number(exp->layer->ix);
|
||||||
jerry_object_set_sz(global, EXP_INDEX, index);
|
jerry_object_set_sz(global, EXP_INDEX, index);
|
||||||
jerry_value_free(index);
|
jerry_value_free(index);
|
||||||
|
@ -1382,7 +1384,7 @@ jerry_value_t LottieExpressions::evaluate(float frameNo, LottieExpression* exp)
|
||||||
{
|
{
|
||||||
if (exp->disabled && exp->writables.empty()) return jerry_undefined();
|
if (exp->disabled && exp->writables.empty()) return jerry_undefined();
|
||||||
|
|
||||||
buildGlobal(exp);
|
buildGlobal(frameNo, exp);
|
||||||
|
|
||||||
//main composition
|
//main composition
|
||||||
buildComp(exp->comp, frameNo, exp);
|
buildComp(exp->comp, frameNo, exp);
|
||||||
|
|
|
@ -140,7 +140,7 @@ private:
|
||||||
|
|
||||||
void buildComp(LottieComposition* comp, float frameNo, LottieExpression* exp);
|
void buildComp(LottieComposition* comp, float frameNo, LottieExpression* exp);
|
||||||
void buildComp(jerry_value_t context, float frameNo, LottieLayer* comp, LottieExpression* exp);
|
void buildComp(jerry_value_t context, float frameNo, LottieLayer* comp, LottieExpression* exp);
|
||||||
void buildGlobal(LottieExpression* exp);
|
void buildGlobal(float frameNo, LottieExpression* exp);
|
||||||
void buildWritables(LottieExpression* exp);
|
void buildWritables(LottieExpression* exp);
|
||||||
|
|
||||||
Point toPoint2d(jerry_value_t obj);
|
Point toPoint2d(jerry_value_t obj);
|
||||||
|
|
Loading…
Add table
Reference in a new issue