Commit graph

3784 commits

Author SHA1 Message Date
Hermet Park
fa332dbc84 binding/wasm: code refactoring
removed a bunch of #ifdefs and consolidated
implementations across engines.
2025-03-28 23:02:58 +09:00
Jinny You
1928f46e6a examples: Add default font fallback to LottieExpressions demo
Text Doc Expressions sample requires default font to show.
2025-03-28 17:02:11 +09:00
Hermet Park
11f59c03ae lottie/expressions: support wiggle effect
usage: wiggle(freq, amp, octaves=1, amp_mult=.5, t=time)

issue: https://github.com/thorvg/thorvg/issues/1640
2025-03-28 13:41:48 +09:00
Hermet Park
1e1be53136 lottie: --compiler warnings on clang
removed uninitialized value and override marks
2025-03-28 01:33:57 +09:00
Hermet Park
e002d68338 Revert "gl_engine: Introduce gauss blur effect for opengl renderer"
This reverts commit 131c194124.

note: Lottie animation is broken
2025-03-28 00:28:27 +09:00
Sergii Liebodkin
131c194124 gl_engine: Introduce gauss blur effect for opengl renderer
issue: https://github.com/thorvg/thorvg/issues/3054
2025-03-27 22:51:02 +09:00
Hermet Park
a4f927e3ef examples: updated lottie assets 2025-03-27 22:40:10 +09:00
Hermet Park
afd780bfa9 wg_engine: set default file permissions 644 for consistency 2025-03-27 22:19:36 +09:00
Hermet Park
786d0b2d02 lottie/expressions: code clean up 2025-03-27 22:19:31 +09:00
Jinny You
588bcf5264 wasm: fix build error when WebGPU is disabled (SW/GL only)
Fixed a build error that occurred when the WebGPU feature was disabled due to a missing feature check condition. The issue affected building with the software and OpenGL only backends.

issue: #3356
2025-03-27 17:48:20 +09:00
Hermet Park
93cb33fb8e lottie: improve the compatiblity
merge the scene with more accurate condition to allow
the evenodd pathes among the lottie render tree.
2025-03-27 14:06:19 +09:00
Hermet Park
e5d55d0651 lottie: safety++
Don't apply matte — it's already been pushed into the scene.
This is a corner-case bug that occurs when the Lottie data
violates the specification.
2025-03-27 12:43:17 +09:00
Hermet Park
fba861cb4f lottie: fixed a regression bug
reverted stroke optimization from the previous cullting stragtegy.
introduced by d386a5654a
2025-03-27 12:43:11 +09:00
Dragoș Tiselice
3b5b0e7eaa capi: fix name mismatch 2025-03-27 12:42:43 +09:00
Hermet Park
3136cac6e4 Revert "lottie: minor optimization"
This reverts commit 51bc7e81f8.

note: side effect!
2025-03-26 20:56:24 +09:00
Hermet Park
745b4f4628 loaders: ++chores 2025-03-26 17:27:14 +09:00
Dragoș Tiselice
bc5d90c157 capi: exposed Accessor apis
This patch adds basic Accessor API to the C bindings
2025-03-26 17:10:00 +09:00
Jinny You
6ee410e042 lottie/expressions: text document support
- Handle text value of text document.
- Expand `add()` for string concatenation.
- Restore jerry_value_is_string()
2025-03-26 12:19:41 +09:00
Hermet Park
ffdb30cba2 lottie: don't evaluate local font text again 2025-03-26 12:19:32 +09:00
Hermet Park
51bc7e81f8 lottie: minor optimization
trim out a group when it has only one child.
2025-03-26 00:28:20 +09:00
Hermet Park
bd520c1c69 ttf: ++thread safety
Properly allow the ttf loader sharable among threads.

issue: https://github.com/thorvg/thorvg/issues/3165
2025-03-25 17:02:58 +09:00
Hermet Park
756f866d54 renderer: safety++
introduced a threshold for the minimum dash size
to prevent excessive fragmentation.

issue: https://github.com/thorvg/thorvg/issues/3332
2025-03-24 23:50:57 +09:00
Hermet Park
be0cbc356a sw_engine: hotfix a out of bound image access.
this simply revert logic from the previous change:
https://github.com/thorvg/thorvg/pull/2552

issue: https://github.com/thorvg/thorvg/issues/3327
2025-03-24 22:22:13 +09:00
Hermet Park
56d5396b7a common: ++loader thread safety
fortitfy the thread safety
in multi-threaded resource loading.

issue: https://github.com/thorvg/thorvg/issues/3306
2025-03-24 18:18:30 +09:00
Hermet Park
02baa6b462 examples: added LottieInteraction sample
The Interaction sample demonstrates
how to handle user input with ThorVG Lottie Expressions.
2025-03-24 12:11:15 +09:00
Hermet Park
5de098f128 lottie: suppport writable expressions
This function sets the value of a specified expression variable within a particular layer.
It is useful for dynamically changing the properties of a layer at runtime.

Experimental API
- Result LottieAnimation::assign(const char* layer, uint32_t ix, const char* variable, float value)
- Tvg_Result tvg_lottie_animation_assign(Tvg_Animation* animation, const char* layer, uint32_t ix, const char* var, float val)
2025-03-24 12:11:15 +09:00
Hermet Park
4c5ce9862e
Update CODEOWNERS 2025-03-21 11:07:50 +09:00
Sergii Liebodkin
a1ca566c48 gl_engine: luma visual differneces fix
https://github.com/thorvg/thorvg/issues/3045
2025-03-21 11:03:36 +09:00
Hermet Park
eddd8961f3 common: hotfix regression bugs during recent dev
- fixed Duplicate/Text samples broken
- fixed a Lottie TextPath memory leaks
- fixed a broken SVG gaussian blur
2025-03-20 22:33:36 +09:00
Hermet Park
3fc69b36a7 updated CONTRIBUTORS 2025-03-20 16:01:46 +09:00
Benjamin
40c60ea8cc array: use default constructor 2025-03-20 15:57:27 +09:00
Hermet Park
f01a9681ca example: ++bounding box 2025-03-20 13:26:25 +09:00
Hermet Park
333e65ef7a renderer: revise the Bounding Box Behavior
- modify the concept of AABB to apply only to transformed shapes.
- transform points before computing the bounding box min/max
  to obtain a more compact shape region.
- trimmming memory by removing the cached matrix, about 36kb
  of memory has been reduced per paint instance.
2025-03-20 13:26:25 +09:00
Sergii Liebodkin
a7efd0f199 wg_engine: crash for empty clips fix
issue: https://github.com/thorvg/thorvg/issues/3289
2025-03-20 11:58:47 +09:00
Jinny You
b350e45e1e wg_engine: remove unnecessary header
The Emscripten header was previously used because the WebGPU initialization logic was in WgContext::initialize.

Now, initialization occurs at the binding/application level.
2025-03-19 18:46:07 +09:00
Hermet Park
563f8b2f78 renderer: added parent scene query api
added 2 more APIs for user convenience to allow backtracking tree traversal.

API Additions:
- const Paint* Paint::scene() const
- const Tvg_Paint* tvg_paint_get_scene(const Tvg_Paint* paint)
2025-03-19 11:19:26 +09:00
Hermet Park
0f20a4a1a8 Update README.md
added archlinux release.
2025-03-18 22:09:36 +09:00
Hermet Park
b2ba294372 api: revise an api & untag experimental apis
API Modifications:
- Tvg_Result tvg_paint_set_clip(Tvg_Paint* paint, Tvg_Paint* clipper)
 -> Tvg_Result tvg_paint_clip(Tvg_Paint* paint, Tvg_Paint* clipper)
2025-03-18 18:13:35 +09:00
Hermet Park
ad888019e9 svg: clean & neat code++
no logical changes
2025-03-18 13:22:42 +09:00
Mira Grudzinska
468a1db1fa svg_loader: handle embedded fonts
It is possible to embed fonts directly into an SVG file.
Support for parsing and loading embedded fonts has been added.

@Issue: https://github.com/thorvg/thorvg/issues/1897
2025-03-17 17:31:45 +09:00
Hermet Park
f1e9ce0460 common: refactoring the dash pattern
introdced the length to avoid duplicate among engines
2025-03-17 15:28:23 +09:00
Jinny You
02a28bf9c3 lottie/slot: fix image deep copy logic
When the datas are copied with deep copy, memory issue caused (SEGV on unknown address) due to these reasons:

1. `mimeType` is nullptr when it's not embedded(base64) data

2. datas(b64Data, mimeType) should not be clear, it's used for next slot copy in same pair.
2025-03-17 12:42:13 +09:00
Hermet Park
ca3c0949b0 doc: updated README 2025-03-15 13:58:09 +09:00
Hermet Park
44acb11fdc updated CONTRIBUTORS 2025-03-12 15:05:21 +09:00
Mira Grudzinska
be32e97d96 svg: fix incorrect assignment of <stop> elements
If the svg contained an unsupported element with <stop> elements,
they were incorrectly assigned to the last loaded gradient. Now fixed.

@Issue: https://github.com/thorvg/thorvg/issues/3321
2025-03-12 15:02:25 +09:00
Hermet Park
36be459c80 renderer: ++wasm build portability
removed the direct thread inclusion
when those thread features are disabled
2025-03-12 13:14:13 +09:00
Hermet Park
6847d951d8 examples: updated Animation sample 2025-03-12 13:10:25 +09:00
Mira Grudzinska
ac080ffabc lottie: add support for text follow path
Added support for cases without text grouping and range selector.

Co-Authored-By: Hemet Park <hermet@lottiefiles.com>

@Issue: https://github.com/thorvg/thorvg/issues/2888
2025-03-12 13:08:26 +09:00
Hermet Park
24378cc200
gl_engine: ++neat code (#3319) 2025-03-11 19:16:58 +09:00
Hermet Park
6f9fd6ff01 sw_engine: minor refactoring
simpler logic to computes.
2025-03-11 14:31:22 +09:00