When the system fails to interpret the expression code,
it forcibly disables the feature per property.
This improvement enhances stability and performance
by avoiding reckless attempts to interpret JavaScript code.
When we confirm the full stability with expressions,
we can revert this code.
* restrict the scissor box of composite task
* do not tessellate stroke or fill geometry if there is no Fill or
Stroke color
* use actually transformed curve to calculate polyline count when doing
curve flatten
the WIN32_LEAN_AND_MEAN definition will remove the unused
features in windows.h that helps to improve the build-speed
as well as fixing the issue.
Issue: https://github.com/thorvg/thorvg/issues/2225
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
The current development of the expression engine is experimental.
It does not support multi-threading.
Therefore, when tvg::Initializer::init() is configured
with more than one thread, expressions will be automatically disabled.
issue: https://github.com/thorvg/thorvg/issues/1640
These internal methods have been introduced to search for content within
an object (parent) using a given parameter (name or index).
- LottieLayer* LottieGroup::asset(const char* name)
- LottieLayer* LottieComposition::asset(const char* name)
- LottieLayer* LottieComposition::layer(uint16_t id)
- LottieLayer* LottieComposition::layer(const char* name)
This converts the frame number to the corresponding time.
- float LottieComposition::timeAtFrame(float frameNo)
introduced the JerryScript engine to interpret Lottie
expressions, enhancing the capability to support runtime
programmable animation logic within Lottie expressions
spec. This feature, based on js scripting, represents
the most complicated addition to the Lottie spec so far.
ThorVG probably could includes an option to toggle
this feature at build time, allowing for customizable user
configurations according to specific requirements.
removed unused features for the optimal size:
- DEBUGGER
- MEM_STATS
- SNAPSHOT
- BUILTIN_JSON
- BUILTIN_PROXY
- BUILTIN_REFLECT
- BUILTIN_ATOMICS
- PROMISE_CALLBACK
- MODULE_SYSTEM
- SYSTEM_PORT
This is an experimental version.
Please manually enable the 'lottie-expressions' in meson.build
when you wish to use it.
See: https://jerryscript.net/
Fix some error:
* glViewport not controlled by framebuffer, and need to set manually when
target framebuffer is changed.
* change even-odd stencil operation, so no need to do third draw call to
clear stencil buffer
* fix the missing `GlCanvas::update` calls in Lottoe and LottieExtension
[issues 1479: Masking, InvMasking, LumaMasking, InvLumaMasking](#1479)
Computes composition and blending using simgle pass istead of two full screen passes
Using a mask (any type) with alpha set to less
than 255 through the fill(r, g, b, a) API resulted
in incorrect compositions of fill and stroke.
Incorrect results were also observed for luma masks,
as their alpha is calculated based on the other color
channels.
@issue: https://github.com/thorvg/thorvg/issues/1653
* Fix error when handle GradientTransform calculation. And move the inv
calculation into gradient vertex shader.
* Fix cubic tessellation not close the last point
Call the explicit memory deletion—binded in function `delete()`, which is highly recommended by the Memory management in Emscripten guideline.
The function will guarantee that the WASM module is cleaned up from the memory.
see: https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#memory-management
Additionally, WASM module's initialization part has been refactored to correspond to the change.
The display property was not copied along with other
node properties. This caused incorrect rendering
of an object with display=none if accessed through
a use tag.
This reverts commit 75e587a9a9.
If incorrect data for the points in a polygon is provided,
the element should still be rendered, but only up to the point
where the error occurs—using an even number of the points that
have been successfully loaded.
Selecting a tool without choosing the required tools
resulted in a usage error. Now, the activation
of the appropriate saver/loader for a given tool
is enforced.
[issues 1479: lottie](#1479)
- optimaze stroking algorithm by prevent vector normalizations
- using render meshes heaps to reduce webgpu instances re-creations
- using single instance of pilylines for standard operations such as trim and split
- "on-the-fly" strokes generations with dash pattern
- "on-the-fly" mesh objects generation in a process of path decoding
- merge strokes into single mesh by each shape
The error was visible when multiple shapes were
simultaneously trimmed. The length of a single
shape was zeroed out only in selected cases,
which caused accumulation that could lead to
incorrect extension of the variable determining
the maximum length.
@issue: https://github.com/thorvg/thorvg/issues/2173
The string passed to the svg parser is not guaranteed to always be a valid string.
Certain strings may have numbers that cannot be converted.
Therefore, make sure to check whether the converted value is in the appropriate range before returning.
related issue: https://github.com/thorvg/thorvg/issues/2078#issuecomment-2037495121