429 Commits

Author SHA1 Message Date
bodymovin
9777da8fe9 fix: revert skipping collapsed data bound properties (#10507) fba405c288
* fix: revert skipping collapsed data bound properties

Co-authored-by: hernan <hernan@rive.app>
2025-09-04 18:37:02 +00:00
JoshJRive
1e4015f41a fix(ios): Don't call abort when the unexpected happens. (#10472) 1adc508ecd
* removed aborts and properly handle the error case instead. Don't use printf because nslog allows for proper output to log files in ios

* more converts to nslog

* made checks more specific

* Wiring up multiple synthesized failure types

* Wiring through the new synthesized failure modes to D3D11, 12, and GL

* Move the Metal ubershaderLoad failure synthesis to a better spot

* clang format

* Missed wrapping a variable in #ifdef WITH_RIVE_TOOLS

* Correction: missed *multiple* #ifdef WITH_RIVE_TOOLSes

* Still more

* Testing to see if the D3D12/GL errors are related to the ubershaderLoad synthesis or not

* Removing additional pieces of the testing to see what's causing the issues

* It's important to write your preprocessor directives correctly 🙃

* Trying to figure out what the fence value is that is coming out wrong on the D3D12 tests and why GL is failing

* trying something dumb to see if this re-breaks the oneplus7

* Split the render test up into three tests to see if it is any better on the oneplus7

* Trying to see where the d3d12 device is getting removed (and why), and also what happens if I run 2 of the same synth test on oneplus7

* Sorry everyone it's effectively printf debugging time 🫤

* Changed the CreateEvent call to see if that works for D3D12 and also more printing for GL

* More

* Okay testing some other dumb stuff - this might resolve oneplus 7, still no idea on D3D12 yet

* Testing an alternate fix for the oneplus7 issue plus a different initial frame value for the copy fence

* Adding a comment before push

* Clean up the testing code (the D3D and oneplus7 issues are fixed but now there's a GL issue on windows. sigh.

* clang format again

I'm good at this lol

* Okay I think this will fix the windows GLFW issue at the cost of it might break all the android tests or something (but I hope not!)

* Now debugging why glfw window creation is failing for windows unit tests

* Okay this should "fix" the GL issues on github by just not creating a GL window if GL is not supported.

* Some minor cleanup

* Clarifying a comment, mostly to get the tests to re-kick

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Co-authored-by: Josh Jersild <joshua@rive.app>
2025-09-04 17:16:54 +00:00
luigi-rosso
e049c47e1b feature: console entry can be clicked to open script file (#10484) b555c57747
* feature: console entry can be clicked to open script file

* chore: missed files

* fix: mixed file

* fix: failing tests

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-09-03 19:48:11 +00:00
csmartdalton
9035ce4a88 feat: Add fallback AtlasTypes that don't need float color buffers (#10475) 5e6f683b9e
Floating point color buffers are only supported via extensions in GL.
Previously, the feather atlas would just break when this functionality
wasn't present.

This PR adds support for multiple different AtlasTypes that make use of
various GL extensions to render the atlas. As a final resort, if none of
the other extensions are available, it can split coverage up into rgba8
compoments. This mode works on unextended GL at the cost of quality.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-09-03 15:38:44 +00:00
bodymovin
c33b5526af skip collapsed objects from running data bound values (#10476) 7868b2bb71
chore: do not run data bound properties from collapsed objects

Co-authored-by: hernan <hernan@rive.app>
2025-09-02 13:50:43 +00:00
bodymovin
86565ed6d6 chore: add collapse and solo test (#10471) c903296458
* chore: add collapse and solo test

Co-authored-by: hernan <hernan@rive.app>
2025-08-29 21:39:52 +00:00
bodymovin
bcba3d089a fix: create a copy of the events list to avoid clearing immediately a… (#10461) 70108fd1a6
fix: create a copy of the events list to avoid clearing immediately added events

Co-authored-by: hernan <hernan@rive.app>
2025-08-28 20:22:41 +00:00
luigi-rosso
204769ef8d feature: adding scripted list property (#10457) 5c83e3cd4a
* feature: adding scripted list property

* fix: missed file

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-28 15:58:05 +00:00
csmartdalton
6efab9c56f feat: Update goldens and player to deploy in the browser (#10453) 827077b899
Set up http and websocket servers in deploy_tests.py that allow us to
communicate with the remote wasm app similarly to how we communicate
with android & ios devices. Add a "-w" target to check_golds.sh that
kicks tests off in the default browser.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-08-27 02:58:49 +00:00
luigi-rosso
f72822306d Scripted artboard inputs (#10449) 4a7bec6316
* feature: working on artboard inputs

* feature: artboard inputs

* feature: artboard input

* feature: artboards controlled by scripts

* chore: bump to latest luau

* feature: show only valid artboards

* chore: adding a test for scripted artboards

* fix: dart test

* chore: fix tests

* chore: adding missed coin.riv

* chore: fix copy ellision warnings

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-26 20:18:49 +00:00
bodymovin
34d87f1366 add support for property multiplier on vertices (#10436) 500cb42240
add support for property multiplier

Co-authored-by: hernan <hernan@rive.app>
2025-08-25 17:48:15 +00:00
bodymovin
d3e25cb537 feat: add support to format numbers with commas (#10445) cf47b03e54
* feat: add support to format numbers with commas

Co-authored-by: hernan <hernan@rive.app>
2025-08-23 01:01:40 +00:00
philter
9548baa5fd Don't perform shape AABB hit tests when walking up parent tree (#10444) d8beb0c4ea
This PR skips parent shape AABB tests when hittesting components. There was an issue following recent updates to walk up parent tree when performing hit tests which would prevent objects nested inside shapes from being hit due to trying to AABB test the parent shapes in cases where the shape had no path or the path did not overlap with the listening component.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-23 00:36:15 +00:00
luigi-rosso
08f276b192 feature: making rive::File rcp (#10439) 213f07ec13
* feature: making rive::File rcp

* fixes

* fix: recorder

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-22 15:58:24 +00:00
JoshJRive
4e0836dbf9 Add background draw shader loading to GL, D3D11, and D3D12 (#10388) c681049169
This adds AsyncPipelineStateManager to the render code, which handles the background processing of draw shader creation (not, at the moment, other shader types...there's no reason those couldn't be added as well, but this seemed the biggest target).

    If a given shader has not been compiled yet, we will fall back on an ubershader version with all features enabled
        the ubershader version will be compiled synchronously if it does not exist yet
    For the D3Ds, this is done with a background thread that compiles the shaders.
    GL, however, does not seem to play nice with background threading shader creation. But what it does have is the KHR_parallel_shader_compile extension, which basically lets the driver create threads in the background and thread the shader compilation.
        The shader manager, in this case, needs to poll the completion state every time the shader is requested and potentially push the compilation along to the next stage (i.e. once linkProgram has completed, then we can do the rest of our setup)
        If KHR_parallel_shader_compile is not supported (for instance, with WebGL on Firefox) then shader compilation will just happen synchronously (I could not find a clear way to thread the GL shader creation, but I would happily add it as a fallback if there is a way)

This change also updates our GLAD loader to version 2.0.8 (from 0.1.36!), which had some API changes.

Co-authored-by: JoshJRive <joshua@rive.app>
2025-08-22 04:00:47 +00:00
philter
8c59e4e030 Artboard List items follow path (#10417) 68a608cfad
Adds support for list items to be rendered on a path when a Follow Path constraint is applied to the Artboard list. Currently, the items will be evenly spaced on the path between 0 and Distance (which is set on the Follow path constraint). For example, with Distance set to 100%, items will be spaced between the start and end of the path. With Distance set to 50%, items will be spaced between the start and half the distance (length) of the path.

feat: Bump clang-format to v19 (#10429) 270034cbcd

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-21 18:32:55 +00:00
bodymovin
039568f4d1 feature: add support for list based paths (#10409) fb374dcad4
* feature: add support for list based paths

Co-authored-by: hernan <hernan@rive.app>
2025-08-21 17:47:20 +00:00
blakdragan7
9c1e897f67 feat(unreal android): Get build settings and goldens to build for unreal (#10413) 625123dbae
* updated build script to look for android sdk unreal expects

* proper platform settings for unreal android

* made check golds work with unreal android

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-08-20 21:46:55 +00:00
luigi-rosso
758112ca4c feature: add support for trigger properties from scripted viewmodels (#10399) ec342c1e4d
* feature: add support for trigger properties from scripted viewmodels

* fix: memory usage test

* feature: adding trigger as an input

* chore: fix warnings

* feature: allow calling trigger fire() from scripts

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-20 04:06:53 +00:00
philter
cbe400e5e0 Respect hug with all nested artboard and artboard list types (#10403) 7f3ed82d57
A customer requested feature, previously when using node or leaf type nested artboards, we would always render using the fixed artboard size (even if the artboard was set to hug). This modifies the behavior so that if the Artboard is set to hug, we respect that. This also applies to the newly implemented artboard lists when not in layout mode.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-19 21:35:10 +00:00
luigi-rosso
393955d1f6 feature: ability to unload/unregister a module (#10395) 9e2f6211d7
* feature: ability to unload/unregister a module

* feature: complete implementation into rive_native

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-16 21:16:47 +00:00
philter
ae67ee1b86 Add support for non-layout constrained Artboard Lists (#10384) 520e01a0f2
This PR adds support for Artboard List items that can be positioned directly using DataBinding by binding to the x & y property values of the Artboard itself. Currently, the behavior is that if the artboard list is a child of a layout, it will apply layout rules, but if its a child of a group or solo, it will allow control of its position through binding.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-15 22:58:24 +00:00
bodymovin
5579fa3c36 feat: add to number converter (#10390) 4d835a3637
add to number converter

Co-authored-by: hernan <hernan@rive.app>
2025-08-15 22:37:01 +00:00
luigi-rosso
9ed26c3f47 Feature: print statements + console (#10375) 81ddf4d6ee
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-15 04:27:27 +00:00
bodymovin
954eaa6e23 fix: trigger adds dirt to listeners only when it is not reset (#10377) 760472b069
Co-authored-by: hernan <hernan@rive.app>
2025-08-14 18:09:23 +00:00
bodymovin
0d20fd51bc feature: add support for vertical alignment on text with ellipsis (#10365) 33ec7249cd
add support for vertical alignment on text with ellipsis

Co-authored-by: hernan <hernan@rive.app>
2025-08-13 21:21:09 +00:00
bodymovin
4d4daaf937 Nnnnn add datatypes to viewmodel instances (#10357) 3b0e14f50f
* feature: add data types to instance runtime values
* fix: validate type when returned from cache

Co-authored-by: hernan <hernan@rive.app>
2025-08-12 21:23:41 +00:00
philter
91aca39a4c Guard against percent margins on top level artboards (#10356) aef45767df
We need to prevent percent margin from being set on Artboards because percent margin relies on the layout parent's dimensions. Since an Artboard has no parent, it results in an error within Yoga and a crash.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-12 19:04:31 +00:00
luigi-rosso
d8cd657016 Feature: scripted data inputs (#10339) 8693175cee
* chore: reworking inputs and properties

* chore: syncing rive_native fixes

* feature: adding script input parameters

* feature: adding listeners

* chore: missed files

* feature: add/remove listeners

* chore: updating to latest luau

* chore: fix tests & colliding names

* fix: missing import

* chore: fix warnings

* feature: guard against change during iteration

* chore: fix boolean warning

* fix: handle error reports from builtin types

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-08-11 23:05:37 +00:00
bodymovin
ac79ddcf6d feature: add support for custom enum properties (#10345) 21b8ce84f4
* feature: add enum custom property support

Co-authored-by: hernan <hernan@rive.app>
2025-08-10 23:23:03 +00:00
bodymovin
f8d5b02548 fix: treat artboard as layout for hit testing inheritance (#10341) 583274d7b9
* fix: treat artboard as layout for hit testing inheritance

Co-authored-by: hernan <hernan@rive.app>
2025-08-08 17:51:59 +00:00
bodymovin
f99b9b363c feature: add support for firing triggers on state transitions (#10329) cc34f96631
* feature: add support for fiiring triggers on state transitions

Co-authored-by: hernan <hernan@rive.app>
2025-08-08 07:20:20 +00:00
bodymovin
3db0a8dff7 add support to data bind solos by index and name (#10337) 64f828c9a2
Co-authored-by: hernan <hernan@rive.app>
2025-08-08 06:33:01 +00:00
philter
27e81b2a43 Support for Triggers in Custom property groups (#10322) 9af6af0361
Adds support for Triggers in Custom Property Groups. This will allow triggers to be keyframed, which can also be bound to ViewModel triggers. Currently an event has to be fired on the timeline in order to fire a ViewModel trigger via a listener.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-08 01:49:24 +00:00
luigi-rosso
c4420c2afc Update unit test build/run scripts to use build_rive.sh (#10320) 4bd8c63b93
* Update unit test scripts to use build_rive.sh

The unit test test.bat and test.sh were doing their own ad-hoc building instead of using build_rive.  This updates test.sh to call build_rive.sh for the build. This script could probably be pared down further but I did not want to break any of the existing command line arguments that people are probably using.

Additionally, test.bat did not have up-to-date build flags in it, so now it does a similar Windows development environment setup to build_rive.bat and then calls directly into test.sh, so it won't get out of sync with the main script anymore.

* Additional test.sh changes

- There was a block of code that I could have removed but didn't (made redundant by the call to build_rive)
- Add build_rive's parent directory to the path before calling it (will fix the test failing on Linux)
- Removed the `sh` before build_rive.sh as it does not need to be shell invoked.

* The pr_unit_tests.yaml execution for Mac needed to do a clean furing the asan build

because it had already done a build without asan before, the change to build_rive means that we now catch the premake parameter change (adding asan), and so clean needs to happen for that build to be correct.

* For now, move the build_rive.sh call into the two branches that previously had the build calls (linux, for instance, does not build, which seems incorrect given the github workflow is trying to run it.

* Adding a note to test.sh to describe why the build_rive script is called in the way it is (vs. the obvious way)

* Additional unit test script fixes (unifying windows build further, and some warnings)

- Add the ability to specify a toolset on the command line (i.e. "--toolset=msc") that will get passed along to build_rive (thus making the 'clang' toolset in the windows build only a default)
- Update the unit_test_windows and unit_test_windows_msvc entries in the github unit test workflows to call test.bat now (which required combining the build/run steps, but this matches all the other configurations)
- Also added some additional parameter validation, mainly warnings on ignored/unsupported parameters

Co-authored-by: JoshJRive <joshua@rive.app>
2025-08-07 22:50:11 +00:00
bodymovin
633f7bcb85 fix nested events conflicting with parent events (#10326) 51f1f66e31
Co-authored-by: hernan <hernan@rive.app>
2025-08-06 19:27:37 +00:00
bodymovin
27a0028f17 add support for view model trigger based listeners (#10323) e7ef71b568
Co-authored-by: hernan <hernan@rive.app>
2025-08-06 18:29:54 +00:00
bodymovin
ab86fa1075 add advanced phase to render loop (#10318) af18705be2
* add reset phase to render loop

Co-authored-by: hernan <hernan@rive.app>
2025-08-05 23:15:39 +00:00
philter
ac160033db Prevent pointer events when interacting with scroll view (#10251) 40592c7963
Currently, when items are inside a scroll view, when the scroll view is dragged and released, the item's click event will still trigger its listener if the same item is hovered. This adds a way to disable pointer events. In this implementation, when a scroll drag begins, we set the GestureClickPhase to disabled which prevents clicks from being captured.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-08-05 17:50:48 +00:00
csmartdalton
7f3d8d96bf build: Fix premake5 build on macOS Sequoia (#10263) b4298b861b
It looks like the premake5 "v5.0.0-beta3" tag isn't compatible with
Sequoia 15.4.1. Bump our tag to v5.0.0-beta7 and update the deprecated
features we had been using.

Also fix the script to rebuild if the premake5 binary doesn't exist.
Before it only checked if the parent "premake-core" directory existed,
so if a build had failed previously, build_rive.sh would fail forever
without ever attempting to build premake5 again.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-07-31 00:27:07 +00:00
luigi-rosso
702faecc7c feature: script inputs (#10267) 3d15aeda55
* feature: detection of implemented type arguments

* fixing highlight of type union

* feature: custom properties

* feature: working on scripted properties refactor

* feature: working on inputs and outputs

* chore: working on crash

* fix: fixes crash issue with luau

* feat: working on inputs

* chore: allow using old solver

* chore: missed json file

* chore: missing files & cleanup

* chore: missed sriv file

* chore: fixing unused var

* chore: fix read not supported with old solver, and core collision

* fix: use different script update flag

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-07-30 16:11:55 +00:00
philter
6eccf329cd Fix silver test (#10272) 45e1b18c68
An improperly setup unit test using silvers was causing ASAN to throw an error.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-07-29 21:02:07 +00:00
bodymovin
6d73b0aac0 feat: add support for computed root transform values (#10257) 375455bd73
* feat: add support for computed root transform values

Co-authored-by: hernan <hernan@rive.app>
2025-07-28 21:35:18 +00:00
bodymovin
45770e98b1 add support to clear data bound artboard by setting the value to null (#10254) a5a679a966
Co-authored-by: hernan <hernan@rive.app>
2025-07-28 17:09:15 +00:00
bodymovin
81fb99fd14 feat: add support for artboard style overrides in lists (#10212) ca58369fb6
add support for artboard style overrides in lists

Co-authored-by: hernan <hernan@rive.app>
2025-07-23 22:27:34 +00:00
luigi-rosso
9592b3bc37 chore: refactor scripting api (#10218) 85aa06d5db
* chore: explicit vec2D.xy and origin

* chore: reworking color api

* chore: refactor mat2d

* chore: add paint.with and paint.new

* feature: working on exposing builtin definitions

* chore: cleanup

* fix: removing unused var

* fix: bad api call

* chore: missed file

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-07-21 19:43:34 +00:00
blakdragan7
dc19a4d22a feat(CommandQueue): Several small additions (#10215) c508ec1d15
* added decoded callbacks for image,font and audio

* added external reousrce interface

* Added artboard databinding

* typo fix

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-07-19 03:08:48 +00:00
bodymovin
78cf8e06a6 feature: add support for using event objects as targets for listeners (#10204) ac9841b38d
* add support for using event objects as targets for listeners

Co-authored-by: hernan <hernan@rive.app>
2025-07-18 22:11:21 +00:00
blakdragan7
5b4cfdc295 refactor(CommandQueue): Added more enum data (#10191) 1c9db764ea
Added a enum name as a part of data received from property listing

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-07-16 20:44:04 +00:00
bodymovin
67c99bb638 fix: recursively check whether an artboard is its ancestor before usi… (#10184) 53fb2577bc
* fix: recursively check whether an artboard is its ancestor before using it as the source of a nested artboard

Co-authored-by: hernan <hernan@rive.app>
2025-07-16 15:12:41 +00:00