6 Commits

Author SHA1 Message Date
bodymovin
d920ee0efd fix(scripting): search first parent transform component to build scri… (#11443) 99ca3a30cc
fix(scripting): search first parent transform component to build script node

feature: modulate opacity (#11427) 128d9d61e0
* feature: modulate opacity

* fix: clang-format

* fix: rust renderer has a no-op modulateOpacity

* fix: no-op modulateOpacity for canvas android

* feature: modulate opacity on android canvas

* fix: rcp ref

* fix: missing override

* fix: gms

* fix: make flutter_renderer match cg one

* fix: josh pr feedback

* fix: remove CG transparency layer

* fix: save modulated gradient up-front

* fix: store only one gradient ref

* fix: remove specific constructor

* fix: use GradDataArray!

* fix: expose currentModulatedOpacity

* fix: cg_factory modulated opacity value

* fix: modulate negative opacity test

* fix: verify double modulate negative also clamps

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: hernan <hernan@rive.app>
2026-01-13 01:13:05 +00:00
luigi-rosso
c3ff521ac8 fix: lua error on in-flight path mutation (#11350) 56f08da6b1
* fix: lua error on in-flight path mutation

* fix: remove DrawOption

* fix: failing tests

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-12-23 23:43:07 +00:00
luigi-rosso
f8d2ad5041 feature: scripting in editor (#10086) 7be3a0fe02
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-07-06 19:12:21 +00:00
blakdragan7
237f2c8d30 feat(Image sampler filters) Adds Image filter options for rendering images (#9309) 930facea3f
* added filter type to draw batch

* c++ implementation of ImageSamplerOptions

* image sampler options now pushes correct for RiveRenderPaint

* wip

* OpenGL uses correct sample options

* now only one filter option that accounts for mip map

* d3d now uses sampler states options

* better way to get the filter option

* added mirror and inverse mirror options

* started using helper functions for retreiving sampler optiojnhs

* workaround for vulkn semaphore issue

* wip

* added filter type to draw batch

* c++ implementation of ImageSamplerOptions

* image sampler options now pushes correct for RiveRenderPaint

* wip

* OpenGL uses correct sample options

* now only one filter option that accounts for mip map

* d3d now uses sampler states options

* better way to get the filter option

* added mirror and inverse mirror options

* started using helper functions for retreiving sampler optiojnhs

* workaround for vulkn semaphore issue

* wip

* undo deleting empty descriptor

* properly packed image options

* removed uneeded checks

* more unit tests

* unreal image_filter_options integration, gm for image filters

* properly implement new draw functions for cgrender

* finish mege conflicts

* merge vulkan sampler options

* cherry-picked vulkan imp into branch

* initial metal

* clang-format

* d3d12 image filter options

* fixed d3d

* clang-format

* fixed mip filter for metal

* made every filter option act as similiar as possible

* addressed pr changes

* fixed tests

* empty commit to fix github

* fix: webgl renderers

* started addressing PR comments

* metal change for pr

* more pr stuff

* final PR address

* shader update per PR request

* rhi updat e

* added gm requested in pr

* made d3d12 work with more then 2000 sampler changes per flush

* pr comments

Co-authored-by: Chris Dalton <chris@rive.app>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
2025-05-29 05:36:59 +00:00
bodymovin
6009196eae chore: add data binding set of tests (#9821) 6a3aa2cbfd
* add data binding set of tests

library: export used artboards from library files only (#9816) 127097dac4
# Description
Before this PR, we export all artboards from library files in runtime_exporter. This PR makes sure we only include what's directly or indirectly used by the host file.

# Details
While working on the runtime exporter, I'm realizing that we have a lot of arguments on the exportOneFile function that can be simplified, so I changed the api a little there too. I tried to separate out this in the first two commits.

For DataEnums, before this PR, there are 2 sources of 'filter' on what to export. One comes from 'usage', and the other comes from `requiredDataEnums` in the mappingContext. With this PR, I'm consolidating this into just using `requiredDataEnums`, so the usage of the current file is folded into this too.

For ViewModels, it's very similar. Before this PR, there's the argument `viewModels`, and the context view models coming from `requiredViewModels` in the mapping context. I've found this to be a little redundant, so I again folded the former into the latter.

For Artboards, there's already `exportArtboards` in the mapping context, but this represents what's exported by each file. The nested artboards rendering logic uses this directly. We don't have a way to communicate, for every file, what's required by other files. As such, I created a `requiredArtboards` concept, that's similar to the `requiredDataEnums` and the `requiredViewModels` above. This tracks the Artboards that every library file needs to export.

Fixes: https://github.com/rive-app/rive/issues/9434

Co-authored-by: Susan Wang <susan@rive.app>
Co-authored-by: hernan <hernan@rive.app>
2025-05-29 01:15:44 +00:00
luigi-rosso
633e37f7d0 Silvers
# Description
This adds the ability to serialize draw commands to .sriv file via a SerializingFactory which can be used by the unit tests in place of the NoOpFactory.

# Details
You can use the SerializingFactory to initialize your .riv and annotate the serialization with things like frame size and new frame/frame begin. This makes it possible to drop the generated .sriv into the Flutter viewer which will perform the serialized rendering commands to show exactly what the runtime is doing, high level rendering-wise. It can also diff two .sriv files if they are dropped in one drag/drop op.

When adding new "Silver" tests make sure to rebaseline the silvers by doing:
```
cd rive/packages/runtime/tests/unit_tests
./test.sh rebaseline
```

You can now modify the runtime and re-run the tests to make sure the silvers still match:
```
./test.sh
```

The important function to call at the end of your test is ::matches on the SerializingFactory. This will either save or check for equality of the existing silver.
```
TEST_CASE("juice silver", "[file]")
{
    SerializingFactory silver;

    // .. actually use the factory

    CHECK(silver.matches("juice"));
}
```

Diffs=
b329a96f26 Silvers (#9281)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-03-31 22:41:54 +00:00