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
852424e69d
commit
8b2024a8f4
2 changed files with 5 additions and 3 deletions
|
@ -1283,8 +1283,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->idx);
|
||||
jerry_object_set_sz(global, EXP_INDEX, index);
|
||||
jerry_value_free(index);
|
||||
|
@ -1392,7 +1394,7 @@ jerry_value_t LottieExpressions::evaluate(float frameNo, LottieExpression* exp)
|
|||
{
|
||||
if (exp->disabled) return jerry_undefined();
|
||||
|
||||
buildGlobal(exp);
|
||||
buildGlobal(frameNo, exp);
|
||||
|
||||
//main composition
|
||||
buildComp(exp->comp, frameNo, exp);
|
||||
|
|
|
@ -139,7 +139,7 @@ private:
|
|||
|
||||
void buildComp(LottieComposition* comp, float frameNo, LottieExpression* exp);
|
||||
void buildComp(jerry_value_t context, float frameNo, LottieLayer* comp, LottieExpression* exp);
|
||||
void buildGlobal(LottieExpression* exp);
|
||||
void buildGlobal(float frameNo, LottieExpression* exp);
|
||||
|
||||
//global object, attributes, methods
|
||||
jerry_value_t global;
|
||||
|
|
Loading…
Add table
Reference in a new issue