Hermet Park
2478a5f65a
lottie/expressions: feature support enhancement
...
- revised the transformation building logic.
- rectified to properly search "this" composition layers.
- rectified the linear interpolation implementation.
- added "pingpong" looping attributes.
2024-09-30 15:38:05 +09:00
Hermet Park
4e3d027fa7
lottie: code refactoring
...
- removed unnecessary variables.
- migrated the composition methods to the precomp layer.
2024-09-30 15:38:00 +09:00
Hermet Park
d7e4fc7d6a
lottie: ++optimization with object culling
...
More precisely, culling the render objects by
determining if the group has no renderable objects.
Additionally, check opacity to quickly return
in the rendering process.
2024-09-30 15:37:40 +09:00
Hermet Park
935d3d83ae
lottie: hotfix with an intermediate patch merge.
2024-09-30 15:37:32 +09:00
Hermet Park
7a6d2e0c5a
lottie: ++scene rendering optimization
...
Apply LottieRenderPooler to texts.
2024-09-30 15:37:26 +09:00
Hermet Park
d671f8637b
lottie/expressions: ++coverage enhancement
...
Allow to access layer index globally.
2024-09-30 15:36:24 +09:00
Hermet Park
0b66cd422e
lottie/expressions: added a missing polystar property build.
2024-09-30 15:35:59 +09:00
Hermet Park
699063625b
lottie: ++scene rendering optimization
...
Apply LottieRenderPooler to path/rect/ellipse/polystar.
This enhances the animation performance: ~10%
2024-09-30 15:34:57 +09:00
Hermet Park
ba3d2b77a1
lottie: introduced LottieRenderPooler
...
LottieRenderPooler is designed to manages rendering
instances(paints) efficiently through a simple pooling
mechanism to resuse among the animations
This replaces the previous individusal paints implemenations
among solidfill, precomp vierport and pictures,
also fix a potential paints corruption problems.
2024-09-30 15:33:49 +09:00
Hermet Park
e27b8ddf25
lottie/parser: tiny binary size reduction
2024-09-30 15:30:47 +09:00
Mira Grudzinska
774e4f5156
lottie: support 'direction' in ellipses
2024-09-30 15:30:29 +09:00
Mira Grudzinska
177bae539c
lottie: remove unnecessary cast
2024-09-30 15:30:18 +09:00
Hermet Park
12b7c634f7
lottie: clarify shape direction.
...
There are only two options clockwise or counter-clockwise.
2024-09-30 15:29:22 +09:00
Mira Grudzinska
bba48a8084
lottie: apply direction to rect
2024-09-30 15:29:22 +09:00
Hermet Park
43a5bf2fce
lottie: ++ scene composing optimization
...
retain resuable layer solid paint during animation.
2024-09-30 15:29:22 +09:00
Hermet Park
3adee7238c
lottie: ++ scene composing optimization
...
retain reusable precomp clipper shapes during animation.
2024-09-30 15:29:22 +09:00
Hermet Park
192135835f
lottie: ++memory access stability
...
Internal matrix can be null.
This update prevents such cases by using a safer API.
2024-09-30 15:29:07 +09:00
Jinny You
0953d000c1
lottie/text: Support text range selector (Phase 1)
...
This patch provides initial support for the text range selector. Full support will be added gradually in subsequent steps. This is the first step.
Text range selector with following properties:
1. Text Range Selector (Units)
2. Text Style
- Fill Color
- Fill Opacity
- Stroke Color
- Stroke Width
- Stroke Opacity
- Opacity
- Rotation
- Position
- Scale
2024-09-30 15:28:24 +09:00
Hermet Park
12d0504a23
common: replace the round() with nearbyint()
...
nearbyint() is 2x faster than round() in our local test.
2024-09-30 15:24:39 +09:00
Mira Grudzinska
8e78745e2e
lottie: improvement 3d rotation
...
For rotation around the X and Y axes, the transformation
matrix was incorrectly created - elements e12 and e21
were omitted. Now fixed.
2024-09-30 15:23:08 +09:00
Hermet Park
4f58124754
common/math: code refactoring
...
- migrate tvgLine to tvgMath
- associate line functions with classes.
2024-09-30 15:22:46 +09:00
Hermet Park
c9d1df3957
common/math: code refactoring
...
Replaced the prefix "math" with "tvg" namespace.
2024-09-30 15:22:38 +09:00
Hermet Park
d3a900701f
common/math: introduced custom atan2()
...
the custom atan2 algorithm by Remez.
see: https://en.wikipedia.org/wiki/Remez_algorithm
This improved the Lottie example by ~2ms.
Total atan2 performance time was reduced by 43%
2024-09-30 15:21:27 +09:00
Hermet Park
aff7f61819
lottie: code refactoring
...
- _draw() returns boolean whether merging shape is allowed or not.
- renamed some internal variables.
2024-09-30 15:20:54 +09:00
Mira Grudzinska
c64923336d
lottie: enhance support for ao: 1
...
Adding support for auto-orient=true for frames <= first
and >= last, as well as for positions specified without
outer and inner tangent.
2024-09-30 15:20:46 +09:00
Mira Grudzinska
5276663c45
lottie: add support for image size
...
The width and height of the image must
be specified in the Lottie file and must
be taken into account during rendering.
2024-09-30 15:11:34 +09:00
Hermet Park
69d1d8dcd5
lottie: ++thread safety.
...
comp pointer is used for checking if the header is ready.
It can be written in a worker thread and needs a critical
section on the reader side.
This also potentally improve the thread efficiency
from the segment() / marker() function calls.
2024-09-30 12:57:08 +09:00
Hermet Park
ce50165103
common: Fix a compilation failure on VS 2017
...
issue: https://github.com/thorvg/thorvg/issues/2512
2024-09-30 12:49:06 +09:00
Hermet Park
359ad22b3a
lottie: fix a regression bug of masking
...
InverseAlphaMasking should be applied as intended,
but it was mistakenly reverted to alpha.
regression in v0.14.0 by: 2c7a83406e
2024-09-30 12:48:50 +09:00
Hermet Park
dd0705eef9
lottie: allow image asset sharing among LottiePicture instances
...
Previously, the Lottie builder didn't account for image asset sharing
among multiple layers. This update rectifies the situation.
issue: https://github.com/thorvg/thorvg/issues/2428
2024-09-30 12:48:08 +09:00
Hermet Park
98e613e3f0
lottie/parser: optimization++
...
Skip the data constructuion if the mask mode
is none. it's not used at all.
2024-09-30 12:46:49 +09:00
Hermet Park
b94c30675c
lottie/builder: revise the masking update.
...
Append the mask shape to the previous one, instead of composition,
when it's able by the condition.
issue: https://github.com/thorvg/thorvg/issues/2426
2024-09-30 12:46:40 +09:00
Hermet Park
74cd0ba0e7
common: code refactoring
...
replaced min/max with the standard library
2024-09-30 12:45:14 +09:00
Hermet Park
fad80deceb
lottie: remove exception handling
...
don't stop the parsing when the data type is incorrect.
just let it slide.
issue: https://github.com/thorvg/thorvg/issues/2389
2024-09-30 12:42:17 +09:00
Hermet Park
dfa2b78ad8
lottie/rapidjson: --assert
...
Save binary size about 0.8kb
2024-09-30 12:42:10 +09:00
Josh Soref
e3c66db301
common: fix 178+ spelling errors
2024-09-30 12:41:38 +09:00
Vincent Torri
ab7ff34674
json loader: fix warnings in jerryscript on Windows
2024-09-30 12:37:03 +09:00
Hermet Park
f3469350b9
lottie: fix a data-race problem
...
make it sync call before accessing the composition data
from marker and segments.
issue: https://github.com/thorvg/thorvg/issues/2462
2024-06-27 14:42:27 +09:00
Hermet Park
933176e309
lottie: hotfix for preventing a crash.
...
MaskMode=None is not properly addressed,
Prevent the crash from the use-case.
issue: https://github.com/thorvg/thorvg/issues/2426
2024-06-27 14:42:27 +09:00
Hermet Park
a0c6025132
lottie: fix a compile error on MSC with clang.
...
issue: https://github.com/thorvg/thorvg/issues/2347
2024-06-27 14:42:27 +09:00
Mira Grudzinska
d9326921fa
lottie: fix repeater order
...
Assigning numbers 1 or 2 to a bool always
resulted in true. Now fixed and repeated
shapes are drawn in the proper order.
If the repeater had no elements, iterating
shapes from the end would result in a segf.
This issue is now fixed.
2024-06-24 14:56:31 +09:00
Jinny You
8a1a3e54ee
lottie: Add exception for lottie doesn't have exported glyph
...
Added handling logic for missing characters to prevent program hang.
2024-06-24 14:42:33 +09:00
Jinny You
2f26dc33a9
lottie: Fix invalid font match
...
When Lottie has similar font names, it incorrectly matches fonts due to a logic bug.
This error causes an infinite loop when searching for glyphs.
2024-06-24 14:42:19 +09:00
Mira Grudzinska
e6f4b5a2a8
common: strokeTrim api introduced
...
New api sets/gets the trim of the stroke
along the defined path segment, allowing
control over which part of the stroke is
visible.
@issue: https://github.com/thorvg/thorvg/issues/2190
2024-06-24 14:37:53 +09:00
Mira Grudzinska
bdd506bbb8
lottie: fix matte layer finding
...
Layer identifiers do not have to be unique within
the entire file - they are unique within a given
group. Searching the entire composition to find
the referenced matte was an incorrect approach.
Error introduced by 1ee79a6c2a
@Issue: https://github.com/thorvg/thorvg/issues/2349
2024-06-24 14:37:29 +09:00
Mira Grudzinska
f14be7c33b
common: fix typos & remove unused var
2024-06-24 14:36:43 +09:00
Mira Grudzinska
5e9b07ea54
lottie: parsing obj property inside this obj
...
Shape's property 'direction' should be parsed
together with other properties specific for
the shape. This solves the issue with direction-
it wasn't working.
2024-06-24 14:36:36 +09:00
Hermet Park
d8888923d1
lottie/builder: revise the layer build logic
...
Promote the text/image updates to the layer level.
2024-06-24 14:36:05 +09:00
Hermet Park
53f2a3f10b
lottie: try packing data compactly.
2024-06-24 14:35:40 +09:00
Hermet Park
33883f302d
lottie: optimize the internal data
...
encode the object name with the hash value
to save memory and enable fast data comparison.
2024-06-24 14:35:34 +09:00