Commit Graph

2128 Commits

Author SHA1 Message Date
dskuza
6baeee45ad chore: release v6.11.2 6.11.2 2025-08-13 16:27:21 +00:00
dskuza
a62b9459d2 Updating version files 2025-08-13 16:27:12 +00:00
dskuza
9777163794 project(apple): add tvos and visionos to podspec template (#10359) 5feb73a9e9
Co-authored-by: David Skuza <david@rive.app>
2025-08-13 15:56:14 +00:00
bodymovin
90cecc9811 Nnnnn add datatypes to viewmodel instances (#10357) 3b0e14f50f
* feature: add data types to instance runtime values
* fix: validate type when returned from cache
2025-08-12 21:35:16 +00:00
JoshJRive
8c54c8dd07 Fix race condition in Metal background shader compiler (#10355) 92de3f0a1a
* Fix race condition in Metal background shader compiler

Setting an atomic variable outside of a std::condition_variable's corresponding mutex and then notifying the condition_variable has a subtle race condition, and the ordering of operations looks like this:

Thread A: acquire mutex
Thread A: check m_shouldQuit // it's false
Thread B: m_shouldQuit = true
Thread B: m_workAddedCondition.notify_all() // nothing is currently waiting on it so this does nothing
Thread A: m_workAddedCondition.wait() // now it's waiting, having just missed the above notification

Now thread A will wait forever because no more notifies to the condition_variable are coming and, in the case of this code, the call to m_compilerThread.join() will also wait forever (since the thread will never quit), so shutting down the renderer will never finish.

Instead, m_shouldQuit should only be set to true while in the mutex (because the check of its value and the subsequent .wait call also happen within the mutex, so this prevents them interleaving). This change fixes this.

* Minor formatting adjustment to make the github workflow tests re-run
2025-08-12 21:12:22 +00:00
blakdragan7
5b6c3a71fb feat(RiveRenderer): Gamma Space Conversion (#10361) a61202f1c4
* Added conversion from gamma to linear space for situations where we can't control what our render target format is

* comment update
2025-08-12 20:23:13 +00:00
philter
103552d016 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.
2025-08-12 19:10:49 +00:00
luigi-rosso
5541b92d1e 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
2025-08-11 23:11:40 +00:00
bodymovin
8d3378094c make more constraint values bindable (#10351) 9674376769 2025-08-11 19:02:18 +00:00
bodymovin
9670f0b90c feature: add support for custom enum properties (#10345) 21b8ce84f4
* feature: add enum custom property support
2025-08-10 23:29:21 +00:00
csmartdalton
9d1b4f8d86 fix: Work around a bug in the Mali T720 compiler (#10340) 59aa55b5d0 2025-08-08 18:12:45 +00:00
bodymovin
c9b8e6e786 fix: treat artboard as layout for hit testing inheritance (#10341) 583274d7b9
* fix: treat artboard as layout for hit testing inheritance
2025-08-08 17:58:09 +00:00
bodymovin
729931acd3 feature: add support for firing triggers on state transitions (#10329) cc34f96631
* feature: add support for fiiring triggers on state transitions
2025-08-08 07:26:30 +00:00
bodymovin
0f73a4d41a add support to data bind solos by index and name (#10337) 64f828c9a2 2025-08-08 06:39:09 +00:00
philter
f6b8501b5a 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.
2025-08-08 01:55:34 +00:00
luigi-rosso
e694141d76 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
2025-08-07 22:56:08 +00:00
bodymovin
f78adaa923 fix nested events conflicting with parent events (#10326) 51f1f66e31 2025-08-06 19:33:45 +00:00
bodymovin
00626514ba add support for view model trigger based listeners (#10323) e7ef71b568 2025-08-06 18:35:53 +00:00
bodymovin
046587a80c add advanced phase to render loop (#10318) af18705be2
* add reset phase to render loop
2025-08-05 23:21:56 +00:00
bodymovin
68481e5a17 support setting bindable artboard from data bind (#10317) 559f237078 2025-08-05 20:34:37 +00:00
philter
1094ef36e3 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.
2025-08-05 17:57:03 +00:00
csmartdalton
a05ca4ba72 fix: WebGPU housekeeping (#10313) 210c1fd176
Updating premake introduced a couple issues. Fix them and add a windows
webgpu builder to CI. Also move wagyu extension wrangling down into the
core webgpu renderer so individual clients don't have to think about it.
2025-08-05 16:41:46 +00:00
csmartdalton
32763cf6f6 chore: Update rive_native to use build_rive.sh (#10290) 5d511c6c4c
We just had to update premake5, so now is a good time to finish
consolidating around build_rive.sh.
2025-08-05 03:27:17 +00:00
luigi-rosso
ea21f190f8 feature: ViewModel scripted definitions (#10301) 5678d967c7
* feature: system generated code

* working on input viewmodels/enums

* missed files

* fix: autocomplete with old solver

* fix: report types in autocomplete

* add property path solver

* chore: adding nested artboard databind test

* feature: use property solver for scripted inputs

* chore: cleanup

* chore: fix analysis warnings

* chore: missed file

* chore: fixing warnings

* fix test
2025-08-04 15:29:44 +00:00
csmartdalton
962833d103 chore: Update audio_preview_generator to use build_rive.sh (#10285) fba1987016
chore: Update audio_preview_generator to use build_rive.sh

Let's keep our premake setup & building all in one place.
Also update peon_audio_worker Dockerfile.
2025-08-01 17:57:15 +00:00
dskuza
c65a34cd21 chore: release v6.11.1 6.11.1 2025-07-31 15:50:12 +00:00
dskuza
ffe2485289 Updating version files 2025-07-31 15:50:02 +00:00
csmartdalton
228cbcb04c 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.
2025-07-31 00:33:19 +00:00
dskuza
6d6dbc746a fix(apple): copy symbolic traits when using core text fallback (#10260) f9b4941afd 2025-07-30 20:09:56 +00:00
luigi-rosso
98eaaea340 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
2025-07-30 16:18:06 +00:00
dskuza
f1d17d1c46 feat(apple): allow supplying nil bindable artboard (#10262) a265fa81ca
Co-authored-by: David Skuza <david@rive.app>
2025-07-30 15:05:09 +00:00
csmartdalton
4586fb34c4 build: Clone dependencies with git instead of downloading a zip (#10271) a2e64c0505
It was a cool idea to download the repos as a zip, so that premake
didn't have to rely on any external dependencies, but github was
frequently giving us a successful download of an empty zip file. This
was causing daily flakes on CI.

Instead, just invoke 'git clone --depth=1 --branch ...' from premake.
This should hopefully be more reliable, and it seems safe enough to
depend on git being installed in the environment we're on.

Also:

* Update the dependencies that were using raw branch SHAs to point to
  official tags. 'git clone --branch' requires an official tag, and this
  will be more stable anyway.

* Rename the dependency directories to "owner_project_tag" rather than a
  hash. Sometimes we need to poke around in those directories to debug
  issues, and it's easier to figure out what's what with descriptive
  names.
2025-07-29 22:53:52 +00:00
philter
a146d24743 Fix silver test (#10272) 45e1b18c68
An improperly setup unit test using silvers was causing ASAN to throw an error.
2025-07-29 21:08:06 +00:00
bodymovin
79adb9f571 feat: add support for computed root transform values (#10257) 375455bd73
* feat: add support for computed root transform values
2025-07-28 21:41:22 +00:00
susan101566
860f51aa84 library: support databinding images, list, list index, and artboards (#10252) fc868b380b
Description
We can already publish view model images, lists, list indices, artboards. Now we just need to handle them on the host file client side, which is what this PR does.

Details
The main part of this PR is that it changes the runtime_exporter. I've bit the bullet and sorted the file assets instead of using recursion. I've always wanted to export them iteratively instead of recursively but now I'm forced to add a 'preprocess' stage to exporting, so there's finally a good reason to do it.

About preprocessing. Imagine databinding Artboards. Any library file needs to be able to bind to any host/library Artboard. This means, the library file needs to export a vm instance whose value can be any library's Artboard, without necessarily needing to have that library in an asset. In preprocessing, we first calculate all the Artboards' indices that should exist in runtime (without writing them). Then at write time, the vm instance value can be accurately mapped to any Artboard's ID.

Same idea goes for fileAsset indices in preprocessing. Tho honestly, we probably just need to preprocess the host's file assets, since the UI only allows you to bind to the host's assets.

Same idea for lists in preprocessing. At write time, an instance's list property value need to refer to any view model+instance from any file, regardless on if it depends on that file as a LibraryAsset.

Demo: https://2dimensions.slack.com/archives/C07M7DQL4F2/p1753414266031969
2025-07-28 20:25:56 +00:00
bodymovin
df36804737 add support to clear data bound artboard by setting the value to null (#10254) a5a679a966 2025-07-28 17:15:11 +00:00
bodymovin
4b07150144 feat: add support for artboard style overrides in lists (#10212) ca58369fb6
add support for artboard style overrides in lists
2025-07-23 22:33:28 +00:00
luigi-rosso
685144322f 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
2025-07-21 19:49:24 +00:00
blakdragan7
804ffb4987 feat(CommandQueue): Several small additions (#10215) c508ec1d15
* added decoded callbacks for image,font and audio

* added external reousrce interface

* Added artboard databinding

* typo fix
2025-07-19 03:14:49 +00:00
bodymovin
20fa94dff6 feature: add support for using event objects as targets for listeners (#10204) ac9841b38d
* add support for using event objects as targets for listeners
2025-07-18 22:17:26 +00:00
bodymovin
c4b4ec3032 chore: add extra info when state machine exceeds max iterations (#10201) 34883935ac 2025-07-18 01:53:33 +00:00
dskuza
48171044b3 chore: revert "project(apple): set explicit provisioning profile for golden app (#10193)" (#10197) 787a12e55c
Co-authored-by: David Skuza <david@rive.app>
2025-07-17 20:06:14 +00:00
blakdragan7
2a52727ecc refactor(CommandQueue): Added more enum data (#10191) 1c9db764ea
Added a enum name as a part of data received from property listing
2025-07-16 20:49:59 +00:00
dskuza
170bef0623 project(apple): set explicit provisioning profile for golden app (#10193) 6d70d9eaa9
Co-authored-by: David Skuza <david@rive.app>
2025-07-16 20:35:46 +00:00
bodymovin
983bf5878a fix:add missing break (#10192) 7b42c61c86
fix:add missing break
2025-07-16 20:09:38 +00:00
bodymovin
460b653405 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
2025-07-16 15:18:34 +00:00
blakdragan7
2981d2dc99 fix(wagyu): proper init of Wagyu Render Pass Inputs (#10175) ff8fc66bc4
* proper init of Wagyu Render Pass Inputs

* fixed build issues

* clang-format

* proper black clear color
2025-07-16 00:51:22 +00:00
mjtalbot
3a8249a966 chore: update thumbnailer for new rive building set-up 9fd4961e9b 2025-07-15 21:04:03 +00:00
dskuza
c65529d72f chore: release v6.11.0 6.11.0 2025-07-15 17:37:14 +00:00
dskuza
c8b7cbc649 Updating version files 2025-07-15 17:37:08 +00:00