Commit Graph

2243 Commits

Author SHA1 Message Date
csmartdalton
d64ffb9c30 docs: Remove Skia from the runtime readme (#10043) 092566581a
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-24 21:16:40 +00:00
blakdragan7
5d540c313a featt(CommandQueue): Added internal file asset loader (#10040) d13f8c2bf6
* started file asset implementation

* asset loader implemented

* started adding tests

* updated fonts and audio to validate before returning an object.

* audio source and font tests

* added deleted callback tests for audio source and fonts

* fixed compiler issues for non windows clang

* updated cargo checks to latest rive_hb

* msvc maudio does not support mp3. use wav instead

* Updated based on PR comments

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-06-24 19:40:58 +00:00
bodymovin
099c1ed3a8 chore: update list related classes to use RCP (#10032) 23c446feb4
* finish artboard component list rcp

Co-authored-by: hernan <hernan@rive.app>
2025-06-20 19:31:44 +00:00
bodymovin
4d14da8162 featue: add artboard data bind support (#9996) be0b691d9b
* add artboard data bind support

Co-authored-by: hernan <hernan@rive.app>
2025-06-20 19:18:26 +00:00
blakdragan7
107319bc52 feat(CommandQueue): Added error messages for each type of error that could happen (#10020) 9af17212ca
* started implementing error messages

* send errors to command q as well as print to cerr

* started adding tests for error messages

* started file error tests

* file error tests

* render image error tests

* state machine error tets

* PR suggestion to convert template function to helper class

* prevent mixup for 32 bit platforms

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-06-19 01:08:48 +00:00
blakdragan7
68cfb79591 feature(CommandQueue): View Model Properties finished (#9993) 1d144e0d61
* added renderimagehandle and fileLoaded and enumsListe

* coded out lists

* added tests for list

* property subscriptions complete

* Added abililty to fire triggers

* added tests code cov vaught

* better name

* ASAN for unit tests (#9997)

chore: enable asan

* changes requested by PR comments

* addressed PR comment

* enum renames

* feat: add asan for tests

* chore: missed lua file

* chore: remove windows asan for now

* remove extra ref

* update print text

Co-authored-by: Hernan Torrisi <hernantorrisi@gmail.com>
Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: Luigi Rosso <luigi.rosso@gmail.com>
2025-06-17 23:59:04 +00:00
philter
53cf65931f Use Flutter's PointerEvent timeStamp to compute elapsed time for scrolling (#10013) 94ee0804b8
In Flutter, due to how the pointer events are captured, using DateTime.now or Stopwatch at the time the StateMachine receives the pointer event does not provide accurate timestamps, thus the calculation of the pointer delta and elapsed time were inaccurate in the editor. For example, while dragging, the relative x/y delta between mouse move events may be steady, but the difference between DateTime.now and the previous now could vary widely, leading to inconsistent scroll behavior.

This PR updates to use the PointerEvent's timeStamp instead which is more representative of when the pointer event was dispatched. We capture the timeStamp and pass it through to both the Dart and C++ ScrollConstraints in order to correctly do the computation.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-06-17 19:28:03 +00:00
luigi-rosso
7bfc5175a1 feat: add hash to rcp<T> (#10018) 22e314a8df
feat: add has to rcp<T>

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-06-17 19:09:40 +00:00
bodymovin
4dcda0f0ec Nnnn separate clear and unbind (#9888) f22462bd78
Nnnn separate clear and unbind

Co-authored-by: hernan <hernan@rive.app>
2025-06-17 14:33:05 +00:00
bodymovin
9a59b08b53 second batch of fixes (#10014) 3c09bb1e7f
Co-authored-by: hernan <hernan@rive.app>
2025-06-17 08:19:46 +00:00
bodymovin
05aa6fe2e7 rcp file assets (#10016) ecdf58f54b
* feat: rcp_file_asset

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-06-17 08:07:46 +00:00
bodymovin
68731dce25 feature: add support for comparing with self (#9984) f0da7e9f27
* add support for comparing with self

Co-authored-by: hernan <hernan@rive.app>
2025-06-16 19:57:14 +00:00
blakdragan7
f4beac012c fix: rectangles to contour heap use after free (#10005) 67811c029d
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-06-16 19:44:34 +00:00
bodymovin
c88e2fe6b9 fix memory issues with data binding (#10002) ca0963da48
* fix memory issues with data binding

Co-authored-by: hernan <hernan@rive.app>
2025-06-16 17:53:56 +00:00
bodymovin
1a9350e4ae fix: recursively duplicate instances when creating view models from a… (#9995) 8cf21b7fee
* fix: recursively duplicate instances when creating view models from a number to list converter

Co-authored-by: hernan <hernan@rive.app>
2025-06-14 14:11:27 +00:00
philter
e3a13dd328 Initialize pointer to nullptr (#9989) e35082ebdc
Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-06-14 04:03:40 +00:00
philter
264d2065e7 Fix scroll continued acceleration (#9994) 7e9d2b610f
Fixes a bug (#9985) where clicking after a scroll could result in continual scrolling when the mouse isn't moved.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-06-14 03:37:09 +00:00
csmartdalton
9b956cc578 chore(webgpu): Replace JS bindings with Wagyu (#9986) c05ef4daaa
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-13 19:01:19 +00:00
bodymovin
f68fd2bda4 add color custom property (#9181) de384615b2
* add color custom property

Co-authored-by: hernan <hernan@rive.app>
2025-06-13 15:11:40 +00:00
csmartdalton
8d2ed88cb3 fix: Fix WebGPU sampler bindings (#9976) 6e3a82253a
Samplers broke on WebGPU because we didn't have CI testing. Fix the
samplers and set up a CI job to run through the WebGPU tests on Dawn to
ensure we don't break this again.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-12 17:29:10 +00:00
bodymovin
396287ab21 chore: refactor databind update cycle (#9863) 891f65794c
* advance data binds per artboard

Co-authored-by: hernan <hernan@rive.app>
2025-06-10 19:56:47 +00:00
bodymovin
0b4760e074 update keys (#9949) 88befa489b
* update keys

* update file for test

Co-authored-by: hernan <hernan@rive.app>
2025-06-10 06:49:39 +00:00
csmartdalton
2500274cb5 Fix feathering assertion from padding double cusps (#9940) d5140c06b9
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-10 00:39:59 +00:00
bodymovin
b0682d5fbe add list to length converter (#9930) 3d3767270c
Co-authored-by: hernan <hernan@rive.app>
2025-06-09 23:03:30 +00:00
csmartdalton
1b1e76519a test: Update fuzzer to support real GPU backends (#9931) 6734d748c8
The fuzzer used to only support our null render context. We should also
be fuzzing our graphics backends though. Update the fuzzer to use
TestingWindow and support real GPUs. Also add a null testing window so
the fuzzer can continue using a null render context if chosen.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-09 22:20:01 +00:00
bodymovin
53a99d1fc4 pass unordered map by reference (#9945) c793892950
Co-authored-by: hernan <hernan@rive.app>
2025-06-09 21:58:35 +00:00
bodymovin
61014f9af8 Nnnn data binding images and lists updates (#9932) 8363df8fb6
* add support for addInstanceAt in list

* fix istanceAt with index overflow

* fix: advanced triggers for lists

* enable resetting embedded images by passing null

* fix: correctly delete selected data components

Co-authored-by: hernan <hernan@rive.app>
2025-06-08 13:42:56 +00:00
blakdragan7
a78b8e0baa feat(CommandQueue) Get / Set Basic Properties (#9929) 6d8f034217
* Added initial property set / get for view models

* added nested view models set

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-06-07 02:28:11 +00:00
luigi-rosso
5a7d5131dd fix: crash with active title (#9928) 5a1a0b5637
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-06-07 01:31:58 +00:00
luigi-rosso
5a3977f5e1 Fix: tess renderer & nuke old viewer (#9927) c2ec689eb6
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-06-07 01:12:12 +00:00
blakdragan7
e5551407e6 feat(CommandQueue)Server side Cursor Math (#9916) 8bf9682caa
* added math and pointer event struct to easily translate cursor events

* better comment

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-06-06 03:31:21 +00:00
blakdragan7
98245fed75 feat(CommandQueue) View Models and View Model Instances (#9908) f4960cff48
* added viewmodels and started tests

* creating and destroying viewmodels and isntances

* listViewModels

* view model listeners finished

* added bindViewModelInstance

* added more tests

* addressed PR comments

* updated api to not use ViewModelHandles and have a more consice api

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-06-06 02:46:34 +00:00
luigi-rosso
e6e5e20faa fix: static analysis fixes (#9918) c71be9b1a2
* fix: static analysis fixes

* Update packages/runtime/src/file.cpp

* chore: checking if glyph coverage broke test

* chore: try a different fix

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: hernan <hernan@rive.app>
2025-06-05 21:48:13 +00:00
bodymovin
9fc671c05f Nnnn data bind images updates (#9911) 3aa5b93199
* add missing types to runtime
* add support for setting image to null

Co-authored-by: hernan <hernan@rive.app>
2025-06-05 20:36:18 +00:00
csmartdalton
74ed9d5151 fix(webgpu): Don't allocate unnecessary textures (#9909) dde1897bb7
We were allocating textures for clip, scratch, and coverage even when
PixelLocalStorageType was EXT_shader_pixel_local_storage. This was just
a waste of memory since PLS keeps this data explicit tiled memory.

Don't allocate these textures in EXT_shader_pixel_local_storage mode!

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-05 20:04:12 +00:00
luigi-rosso
528642766a fix: crash when text is in a solo (#9915) 747c3ea77a
* using debug

* fix: initialize m_text to nullptr

* chore: undo previous change

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2025-06-05 17:06:06 +00:00
mjtalbot
52747007ba fix: check for empty id when exporting data binds (#9912) 7293b15461
fix: check for empty id when exporting data binds
fix: check for null for m_text

Co-authored-by: hernan <hernan@rive.app>
2025-06-05 11:38:12 +00:00
bodymovin
2a7841f4e7 fix crash on unset listener change (#9907) 8edd84d2a3
Co-authored-by: hernan <hernan@rive.app>
2025-06-05 03:04:53 +00:00
bodymovin
b915f25f13 fix: isTargetOpaque override (#9901) 7c8352ad63
Co-authored-by: hernan <hernan@rive.app>
2025-06-05 00:14:30 +00:00
susan101566
6e0fce95d3 library: allow passing view model instances of a nested library to a library artboard (#9878) 052a4984ef
fixes: https://github.com/rive-app/rive/issues/9781

Imagine this situation.
1. File1 -> publishes vm1, and a artboard1 that understands vm1
2. File2 -> publishes artboard2 that has a nested artboard of artboard1 (imported from library)
3. File3 -> wants to use artboard2 (from File2), and supply it with vm1's instance.

This should work, which is what this PR does. There are two main sectors of changes
1. I created a library asset manager, and uplifts all caching stuff to the 'file' level instead of on the 'libraryAsset' level. This is because ID's like libraryArtboard.viewModelId need to be able to refer to another libraryAsset. Same goes for viewModel.propertyEnum or propertyViewModel.
2. In runtime_exporter, I'm changing how we add to the fileIndexMapper for library components. Before this PR, I was doing this lazily. E.g. if a nestedArtboard refers to an artboardId that's from the library, I remap that to the actual Artboard's index at the time of write. However, this is getting a bit confusing. I thinnnnk it's safe to just map all LibraryComponents before writing anything.

I also fixed path_fiddle for databinding, which is how I've been inspecting databinding in runtimes.

I added a test for this.

Co-authored-by: Susan Wang <susan@rive.app>
2025-06-04 15:01:16 +00:00
philter
1346c1610b fix: Scroll index not considering gap (#9889) aca08e662c
Scroll index values need to account for gap in when the convert to/from scroll offset.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-06-04 05:12:04 +00:00
bodymovin
a5f66e600f data bind fixes 16 ffe3a20c95
* fix image sampler missing argument

* add support for comparing integers to floats in cpp

Co-authored-by: hernan <hernan@rive.app>
2025-06-03 21:31:08 +00:00
ErikUggeldahl
f248d545d0 feat(Command Queue): Pointer Events (#9881) ab11082212
Adds pointer events to the command queue.

Also fixes an errant callback name.

Co-authored-by: Erik <erik@rive.app>
2025-06-03 21:13:49 +00:00
blakdragan7
2df8634833 refactor(CommandQueue) removed erase in processMessage to avoid double erase (#9887) e296e14c35
removed erase in processMessage to avoid double erase

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-06-03 19:39:42 +00:00
philter
a3963f8fa3 fix(editor): add additional index checks for Lists (#9870) 89ffb92b57
Add additional index checks to prevent out of range errors in List access.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-06-02 16:32:46 +00:00
csmartdalton
483faae4bb refactor(vk): Add a vkutil::Texture2D class (#9862) 5779effa92
vkutil::Texture2D wraps a VkImage AND a VkImageView so we don't have to
manage both of these objects separately when we just want a simple 2D
texture. It also subsumes TextureVulkanImpl, allowing us to simplify
things further and remove that class.

vkutil::Texture & vkutil::TextureView are renamed to vkutil::Image &
vkutil::ImageView, in order to reflect the fact that they are just very
thin wrappers around VkImage & VkImageView.

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
2025-06-02 04:23:54 +00:00
bodymovin
e6ace43001 runtime list updates (#9855) f660dea549
* runtime list updates

Co-authored-by: hernan <hernan@rive.app>
2025-06-01 14:10:25 +00:00
blakdragan7
a7ecf16399 removed generation of reqeust ids (#9859) b8bfaaf5e7
* removed generation of reqeust ids

* removed request id type

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-05-31 01:13:32 +00:00
blakdragan7
523d8b7264 added advance state machine and settle callback (#9857) 58ece530ef
* added advance state machine and settle callback

* better tests

* address pr comments

Co-authored-by: Jonathon Copeland <jcopela4@gmail.com>
2025-05-31 00:19:53 +00:00
philter
9d6a4c9948 Add gate for modifying dirty layouts set (#9856) 465d37f48e
Add a gate to prevent m_dirtyLayout from being modified while it's being iterated. Also adds some additional logging.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-05-30 23:12:44 +00:00