frame tweening allows user to interpolate two frames
over a speicified duration. This Tweening functionality
can be particularly powerful when combined with state-based
(a.k.a. Marker) animation playback in Lottie.
For example, apps support state machine based animations,
where the transition sequences between states are not linear
and can occur in highly irregular directions.
Experimental APIs:
- Result LottieAnimation::tween(float from, float to, float progress)
- Tvg_Result tvg_lottie_animation_tween(Tvg_Animation* animation, float from, float to, float progress)
Dodge d / (1 - s):
- handle d = 0 first to avoid 0/0 when s = 1
- for d != 0 and s = 1, the formula results in d/0 (infinity),
which maps to 1 in the 0-1 range (or 255 in the 0-255 range)
Burn 1 - (1 - d) / s:
- handle d = 1 first to avoid 0/0 when s = 0
- for d != 1 and s = 0, the formula results in 1 - 0/0 -> 1 - inf = -inf
Negative infinity in the 0-1 range corresponds to the minimum possible
value, which is 0 (255 if we operate in 0-255 range).
Replaced ceil and direct casts with nearbyint to improve
viewport size calculation. This ensures consistent
approach with the fastTrack case in sw_engine.
@Issue: https://github.com/thorvg/thorvg/issues/3148
Unify the common parts of the parsing logic
by applying a strategy pattern,
allowing the behavior to vary based on the effect type.
This helps to reduce the size and improved the parsing safety.
Changed the unit of the segment from a normalized value to frame numbers,
ensuring alignment with other frame control interfaces.
Note that This change may break backward compatibility.
issue: https://github.com/thorvg/thorvg/issues/3116
Applied the compromised approach for the gaussian blur
since the effect is a bit burdensome for cpu processing
as animatable effects.
- Optimized performance and quality with negligible observable differences.
- Disabled the border option until specific use cases are identified.
RenderMethod effects methods would have changes:
+ update() //update the effects if any
- prepare() -> region() //update the effect drawing region
- effect() -> render() //draw the effect
Fix heap buffer overflow in texture mapping rasterizer by adding proper
bounds checking for texture coordinates. This prevents accessing memory
outside of the allocated image buffer during texture sampling and
interpolation.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
issue: https://github.com/thorvg/thorvg/issues/3102