925 Commits

Author SHA1 Message Date
aliasbinman
decf2d683d Add microprofile support (#11403) c83919a247
* Initial commit

* Update macros

* Add GPU Markers

* Fix builds without microprofile

* minor updates

* clang format

* Update profiler.cpp

* clang format

* Name Main Thread

* Update profiler_macros.h

* Fix end flip

* Update fiddle_context_gl.cpp

* clang format

* Update rive_build_config.lua

* Update rive_build_config.lua

* forked microprofile so I can use a tag

* Update render_context_d3d_impl.cpp

* clang

Co-authored-by: John White <aliasbinman@gmail.com>
2026-01-16 18:31:42 +00:00
philter
155a726a9b chore: Pass Lua VM from editor when decoding runtime File (#11458) f57124001d
The C++ runtime requires a ScriptingVM and lua_State to run scripts. Previously when a runtime File was built, we would always instance a ScriptingVM and lua_State. At runtime, this is required, however, when building the runtime in the editor, this resulted in additional objects being created that weren't needed. This PR passes the lua_State into File::import so that the file will only create the ScriptingVM once and either use the passed in lua_State or instance a new one if none is passed.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2026-01-15 20:22:41 +00:00
bodymovin
6eaf71f485 feature: scripted listener actions (#11468) f3a89390cb
Co-authored-by: hernan <hernan@rive.app>
2026-01-15 19:53:42 +00:00
luigi-rosso
768aacd78d No double deref luau (#11448) 62fcec60de
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2026-01-13 07:13:04 +00:00
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
bodymovin
c511795426 feature(scripting): add support for accessing view models and enum pr… (#11437) 620000211e
feature(scripting): add support for accessing view models and enum properties

Co-authored-by: hernan <hernan@rive.app>
2026-01-13 00:48:26 +00:00
bodymovin
b974d1f75a Nnnnn provide path node data (#11428) 67006966a5
chore: replace path effect signature to pass full node to scripting

Co-authored-by: hernan <hernan@rive.app>
2026-01-12 19:28:43 +00:00
philter
c5fdfdb3d7 Scripting namespaces (#11429) f810efd11a
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2026-01-12 17:55:36 +00:00
bodymovin
a45d0a411d feature: add support for data binding scripted artboard inputs (#11423) 48d14f1521
chore: do not track nested artboard count

Co-authored-by: hernan <hernan@rive.app>
2026-01-12 00:57:39 +00:00
luigi-rosso
d91d0b38a2 feature: configure scripting timeout & improve Data warnings (#11425) 8328e97639
* feature: configure timeout

* fix: check duplicate names of viewmodels/enums too

* feature: ui_strings for warning messages

* fix: check isNumber instead of isNil

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2026-01-10 17:37:08 +00:00
bodymovin
34a547a299 feature(scripting): instance linear animations (#11386) 722a1ae998
Co-authored-by: hernan <hernan@rive.app>
2026-01-10 14:39:38 +00:00
philter
f213badda4 fix: Scroll with snapping max scroll target (#11419) ce274af56c
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2026-01-09 20:28:38 +00:00
bodymovin
f26de28d16 Nnnnn different fixes (#11415) 4b0ea7e631
* fix: invalidate effects when sorted

* improve scripted converters code

Co-authored-by: hernan <hernan@rive.app>
2026-01-09 19:38:21 +00:00
philter
c851859aa3 feat(scripting): forward declare luastate (#11418) a08d538dbf
Fixes an issue when building runtimes with scripting enabled where
certain headers may not be included

Co-authored-by: David Skuza <david@rive.app>
2026-01-09 18:55:55 +00:00
bodymovin
35eb312314 feature: pass view model instance to bindable artboard (#10815) 3734dc3ab9
Co-authored-by: hernan <hernan@rive.app>
2026-01-09 17:32:02 +00:00
bodymovin
60ddaf6d36 fix: trigger change on solid color change (#11399) b5a73917b1
Co-authored-by: hernan <hernan@rive.app>
2026-01-08 01:18:55 +00:00
bodymovin
b24fc49c93 chore: advance scripting only if it is still active (#11394) 0488666fb0
* chore: advance scripting only if it is still active

Co-authored-by: hernan <hernan@rive.app>
2026-01-07 23:27:57 +00:00
bodymovin
3f999b7edc fix(scripting): some crashed related to paths (#11378) c05b97d6d5
* fix(scripting): some crashed related to paths

Co-authored-by: hernan <hernan@rive.app>
2026-01-06 20:31:25 +00:00
bodymovin
66c35233ff chore: complete groups path effects work (#11373) 8f9dae9f36
* fix effects sorting

* fix Feature values

* invalidate effects on update instead than when dirt is added to avoid multiple invalidations per frame

* fix key conflict

Co-authored-by: hernan <hernan@rive.app>
2026-01-03 00:49:09 +00:00
bodymovin
075782ff46 feature: add group effects support (#11359) df0db41a9c
Co-authored-by: hernan <hernan@rive.app>
2026-01-02 22:55:01 +00:00
bodymovin
15a922714f Nnnnn relative data bind all paths (#11346) 41d316c675
* StateMachineListener relative view model property path
* StateMachineFireTrigger relative view model property path
* ScriptInputViewModelProperty relative view model property path

Co-authored-by: hernan <hernan@rive.app>
2026-01-02 21:11:44 +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
bodymovin
5a94a09dfb feature: add support for relative view model data bind paths for nested artboards (#11344) 923b32059d
feature: add support for relative view model data bind paths

Co-authored-by: hernan <hernan@rive.app>
2025-12-23 23:14:54 +00:00
bodymovin
fd78cac7a6 fix: initialize did change as true (#11323) 9f2de92c4c
Co-authored-by: hernan <hernan@rive.app>
2025-12-19 20:17:08 +00:00
bodymovin
dad43127a8 feature: support name based binding paths (#11007) a55da7f31f
* feature: support name based binding paths

Co-authored-by: hernan <hernan@rive.app>
2025-12-18 00:31:45 +00:00
luigi-rosso
3805482c3c feature: bytecode header format (#11293) 68f1096d75
* feature: bytecode header format

* Reexport scripting test rivs

* Reexport one more riv

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: Phil Chung <philterdesign@gmail.com>
2025-12-17 20:42:24 +00:00
philter
c52a714032 Refactor Script registration (#11280) bc6f965d1f
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-12-16 19:52:05 +00:00
bodymovin
5f503f6f8c fix(UAT): only trigger callback when instance is created from scripting (#11283) 7564ef1fcb
Co-authored-by: hernan <hernan@rive.app>
2025-12-15 23:28:19 +00:00
bodymovin
81984a8c89 feat(runtime): skip drawing unchanged frames (#11127) f32a23806c
* skip drawing unchanged frames

Co-authored-by: hernan <hernan@rive.app>
2025-12-15 19:56:26 +00:00
bodymovin
f0b7370df7 Nnnnn add data metatable and viewmodels (#11269) f23eb70aec
* feature(scripting): add support for accessing view models from context and creating view model from global data

Co-authored-by: hernan <hernan@rive.app>
2025-12-14 14:47:49 +00:00
philter
8d869457e9 fix(editor): Input to VM toggle fix (#11272) 1dd286c979
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-12-13 02:40:42 +00:00
luigi-rosso
2981f6ad37 feat: Text input from editor + start of Focusable (#9905) e5c8a7ae8f
* feat: working on focusable

* feat: text events to rive native

* feat: runtime text from editor

* feat: text input in the editor

* chore: cleanup

* chore: fix non text builds

* chore: fix warning

* fix: key import in rive_native_web

* feat: text input for web rive_native

* chore: fixes

* chore: cleanup

* fix: remove unused imports

* chore: more tests for missed lines

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-12-12 01:10:25 +00:00
bodymovin
dbba23234b feature(scripting): add support to create view model instances from s… (#11232) 6fc23e1608
* feature(scripting): add support to create view model instances from scripts

Co-authored-by: hernan <hernan@rive.app>
2025-12-12 00:31:28 +00:00
philter
76eae106ad Scripting in Core Runtime (#11235) 0a5325e474
rev to luau 0.702 (#11259) b50983c49d

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-12-11 23:09:23 +00:00
bodymovin
acfefa5895 chore: skip save operations on clipped single shapes (#11244) d352fe277e
Co-authored-by: hernan <hernan@rive.app>
2025-12-09 23:00:15 +00:00
bodymovin
14927d5051 fix: virtualized lists with data bound artboards map to the correct s… (#11242) 44c9c0b2ec
fix: virtualized lists with data bound artboards map to the correct source

Co-authored-by: hernan <hernan@rive.app>
2025-12-09 22:24:00 +00:00
bodymovin
1d02cbcef3 feature: add support for animated clipping layouts and shapes (#11222) e2a5390cb1
Co-authored-by: hernan <hernan@rive.app>
2025-12-05 19:52:45 +00:00
blakdragan7
0072d25f12 fix(Unreal): Layout fit type fix (#11217) 294afdc22a
* Added set / reset size for artboarsd to command queue. Use this for render targets in unrel. Set size directly for widgets.

* removed original bounds

* made state machine advance when setting size

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-12-04 20:59:34 +00:00
bodymovin
2a425a491e fix: ignore non visible clips when removing redundant operations (#11207) 673820da1a
Co-authored-by: hernan <hernan@rive.app>
2025-12-03 00:23:40 +00:00
bodymovin
cbd6691f87 update scripted drawable clipping to new strategy and remove unused function (#11195) 8002b223a3
* update clipping to new strategy

Co-authored-by: hernan <hernan@rive.app>
2025-12-02 22:54:40 +00:00
bodymovin
3d9ba122b4 fix(scripting): store data on all cases (#11197) 7fae9fb6c8
Co-authored-by: hernan <hernan@rive.app>
2025-12-02 19:22:01 +00:00
bodymovin
09bed0f410 fix(EA): list index can be compared to numbers (#11194) e2f7d6cde1
Co-authored-by: hernan <hernan@rive.app>
2025-12-02 17:51:22 +00:00
bodymovin
8a06f22185 feature: apply clippings as separate drawables (#11183) c3237c0283
* feature: apply clippings as separate drawables

Co-authored-by: hernan <hernan@rive.app>
2025-12-01 20:13:40 +00:00
philter
e9a0828bb0 fix(editor): Display runtime errors when Script input VM properties not set (#11177) cd70e30236
Fixes a crash when trying to use pointer events when a ViewModel property input is not setup properly on a scripted drawable instance.

The code was checking for ScriptAsset.vm which will always be non-null when bytecode is compiled in the editor. We should be checking instead for ScriptedObject.state because that will only be non-null if the ScriptedObject has validated (and we early out if that is null so we don't crash).

Also added some errors when VM properties are not setup correctly as Script inputs so users will be aware that there is an issue with their VM setup or bindings

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-27 21:48:09 +00:00
philter
cf3dad5e77 chore: Refactor invalidateEffect for StrokeEffects (#11173) 05630acdb1
Refactors how invalidateEffect in StrokeEffects work. Now there are 2 code paths:

invalidateEffectsFromLocal() - this is called from the StrokeEffect itself. It calls out to ShapePaint::invalidateEffects to let it invalidate any other StrokeEffects that may need to do so. It also calls invalidateEffect on itself.
invalidateEffects() - this can be called from the StrokeEffect (via invalidateEffectsFromLocal) on itself OR by ShapePaint while in the process of determining if any other StrokeEffects should be invalidated via the call above. This adds paint dirt to the StrokeEffect along with any additional work needed when invalidating.
This prevents invalidateEffect from calling ShapePaint::invalidateEffects multiple times.

This also resolves an issue with ScriptedPathEffects in Components

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-26 22:58:11 +00:00
bodymovin
67033e3455 chore: complete scripted converters implementation (#11166) 55853117b2
chore: finish scripted converters implementation

Co-authored-by: hernan <hernan@rive.app>
2025-11-26 00:15:28 +00:00
bodymovin
6b31f1020a chore: Preprocess transitions conditions on initialization (#11150) bb52cbd4a3
Preprocess transitions conditions on initialization

Co-authored-by: hernan <hernan@rive.app>
2025-11-25 21:41:25 +00:00
bodymovin
3099ce30d3 fix: reset interpolator and initialize it on convert (#11157) 0791ee519d
* fix: reset interpolator and initialize it on convert

Co-authored-by: hernan <hernan@rive.app>
2025-11-25 20:56:47 +00:00
bodymovin
47ed1e2950 feature: add path effects for fills (#11136) 376052977b
feature: add support for path effects for fills

Co-authored-by: hernan <hernan@rive.app>
2025-11-21 18:03:05 +00:00
bodymovin
0215cb56c0 Nnnnn add support for path effect part 3 (#11107) c27b081319
* WIP

* ui

* fix errors

* remove duplicate code

* remove empty switch case

* make pathData return required

* add web ffi path methods

Co-authored-by: Alex Gibson <agibson.uk@gmail.com>
Co-authored-by: hernan <hernan@rive.app>
2025-11-20 14:00:03 +00:00