455 Commits

Author SHA1 Message Date
dskuza
5728903929 Updating version files 2026-01-13 14:09:38 +00:00
bodymovin
3557439325 Updating version files 2025-12-03 17:55:25 +00:00
philter
c1337f1abf chore: ScriptedDataConverter in runtime (#11053) 05e1b4ab9f
ScriptedDataConverters in C++ runtime. Adds a new DataType.any which allows a datavalue to be applied as long as the propertyKey type matches the datavalue's type.

Co-authored-by: Philip Chung <philterdesign@gmail.com>
2025-11-17 18:38:34 +00:00
dskuza
619f4bce6f Updating version files 2025-11-10 14:26:39 +00:00
dskuza
32d80c0f25 Updating version files 2025-11-04 04:30:39 +00:00
dskuza
614c654b0d Updating version files 2025-10-09 15:48:57 +00:00
bodymovin
91d0e8d3bc fix(apple): log pointer events as id 0 (#10736) 642b7727b1
Co-authored-by: David Skuza <david@rive.app>
2025-10-08 17:15:52 +00:00
dskuza
2ae370d540 feat(apple): add multitouch support (#10714) 95ce5b46ae
* feat(apple): add multitouch support

* refactor(apple): always send pointer exit after up

Co-authored-by: David Skuza <david@rive.app>
2025-10-08 00:08:31 +00:00
bodymovin
32c3dd1516 data bind artboards rcp file (#10214) c542b9b7ac
* make file ref counted

* migrate File to refcnt

* add bindable artboard class to keep file reference

* feat(unity): support rcp file and BindableArtboard class (#10228)

* refactor(apple): use updated file bindable artboard apis (#10229)

* update command queue to support bindable artboards

* use bindable artboards on command queue

* self manage view model instances in js runtime

* change remaining viewModelInstanceRuntimes to rcp

* refactor(apple): update view model instances to use rcp (#10298)

* refactor(unity): support rcp ViewModelInstanceRuntime (#10309)

* rebase fix

* deprecate getArtboard in favor of getBindableArtboard

* fix merge

* remove unused lambda capture

* fix rive binding

* feat(Android): RCP File, VMI, and add bindable artboards (#10456)

* refactor: C++ refactors

- Import from long (incorrect) -> jlong
- Header clang-tidy fix
- Use reinterpret_cast instead of C-style cast
- Break out some variables instead of long one liners
- Use auto
- Remove unused env and thisObj

# Conflicts:
#	packages/runtime_android/kotlin/src/main/cpp/src/helpers/general.cpp

* docs: Improve documentation on the File class

* feat: Support bindable artboard type and RCP VMIs

# Conflicts:
#	packages/runtime_android/kotlin/src/androidTest/java/app/rive/runtime/kotlin/core/RiveDataBindingTest.kt

* feat: Support RCP files

* refactor: Change from +1/-1 ref to just release

* fix: Moved to the more appropriate null pointer for GetStringUTFChars

* replace unref with release

Co-authored-by: Adam <67035612+damzobridge@users.noreply.github.com>
Co-authored-by: David Skuza <david@rive.app>
Co-authored-by: Erik <erik@rive.app>
Co-authored-by: hernan <hernan@rive.app>
2025-09-30 00:08:45 +00:00
bodymovin
7d6e39affc feature: add support for color interpolation in converter (#10545) b0f6516eec
* feature: add support for color interpolation in converter

Co-authored-by: hernan <hernan@rive.app>
2025-09-12 19:42:41 +00:00
dskuza
49914377c7 Updating version files 2025-09-12 03:26:08 +00:00
dskuza
f77e3421f4 fix(apple): better release and null checking on fallback fonts (#10562) e0baf4e1fa
* fix(apple): do not use symbolic trait font copy on failure

* fix(apple): release ctfont copy

* refactor(apple): do not manually ref rcp'd font, remove cache

Co-authored-by: David Skuza <david@rive.app>
2025-09-11 23:00:14 +00:00
dskuza
099f8bcf3d fix(apple): update listeners on list instance changes (#10469) 8ce5e60a6d
Co-authored-by: David Skuza <david@rive.app>
2025-09-10 14:30:21 +00:00
dskuza
1314251b3c fix(apple): fix crash when valid web url address fails to import (#10515) 924860c1bb
Co-authored-by: David Skuza <david@rive.app>
2025-09-05 15:53:52 +00:00
dskuza
e9e467a789 Updating version files 2025-08-28 17:06:17 +00:00
dskuza
a9dab80ed4 fix(apple): fix macOS and Catalyst compilation errors (#10462) e20c603403
Co-authored-by: David Skuza <david@rive.app>
2025-08-28 16:22:10 +00:00
dskuza
085fb846f7 refactor(apple): advance artboard with layout fit on layoutSubview (#10427) 759f2fc742
Co-authored-by: David Skuza <david@rive.app>
2025-08-27 15:07:14 +00:00
dskuza
e896ee7a1e refactor(apple): mark more (view)model members as @objc (#10433) 3bd0ee9ad9
Co-authored-by: David Skuza <david@rive.app>
2025-08-27 14:55:10 +00:00
luigi-rosso
7385db0e0c 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 16:04:45 +00:00
dskuza
a62b9459d2 Updating version files 2025-08-13 16:27:12 +00:00
dskuza
ffe2485289 Updating version files 2025-07-31 15:50:02 +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
dskuza
c8b7cbc649 Updating version files 2025-07-15 17:37:08 +00:00
dskuza
cd07875eb7 feat(apple): add support for data binding artboards (#10131) b4ce2d25fd
Co-authored-by: David Skuza <david@rive.app>
2025-07-15 16:02:52 +00:00
dskuza
401fd21555 Updating version files 2025-07-09 17:25:52 +00:00
dskuza
08b2950cba refactor(apple): replace #ifdef checks in public interfaces with conditional no-op (#10136) 3560f39170
* fix(apple): remove #ifdef checks in public headers

Fixes an issue where framework consumers would also have to set
WITH_RIVE_TEXT or WITH_RIVE_AUDIO

* refactor(apple): remove #if(def) from public interfaces and no-op instead

* fix(apple): fix incorrect api usage

Co-authored-by: David Skuza <david@rive.app>
2025-07-09 16:39:13 +00:00
dskuza
8b8844e9a8 feat(apple): add support for building lite frameworks (#10130) 1fb3654049
Co-authored-by: David Skuza <david@rive.app>
2025-07-09 14:26:23 +00:00
dskuza
f69d7d6f8d refactor(apple): use nativeScale over displayScale for layouts (#10127) 5535399fc4
Co-authored-by: David Skuza <david@rive.app>
2025-07-08 21:03:13 +00:00
dskuza
aadb3d3d52 feat(apple): add support for data binding list properties (#9936) d2997eeef4
Co-authored-by: David Skuza <david@rive.app>
2025-07-08 20:13:34 +00:00
dskuza
30239d8161 Updating version files 2025-07-01 22:53:39 +00:00
dskuza
c890b43d31 feat(apple): skip drawing if view is offscreen (#10077) 0dee98781d
Co-authored-by: David Skuza <david@rive.app>
2025-07-01 18:00:14 +00:00
bodymovin
b9903fbee1 featue: add artboard data bind support (#9996) be0b691d9b
* add artboard data bind support

Co-authored-by: hernan <hernan@rive.app>
2025-06-20 19:24:12 +00:00
dskuza
5e4c679ce9 Updating version files 2025-06-05 17:50:03 +00:00
dskuza
61a4f7ef98 Updating version files 2025-06-04 17:47:46 +00:00
dskuza
7e4ec7f697 fix(apple): add extension to NSImage and conditionally compile extensions 3751ad9b6c
Co-authored-by: David Skuza <david@rive.app>
2025-06-04 17:11:58 +00:00
dskuza
f0000132fe feat(ios): add support for data binding images (#9664) 8f30ede7be
Co-authored-by: David Skuza <david@rive.app>
2025-06-04 15:23:01 +00:00
dskuza
d85f1ea298 Updating version files 2025-05-30 14:08:09 +00:00
dskuza
54304d2b36 Updating version files 2025-05-29 16:56:26 +00:00
dskuza
7aa9afaf79 refactor(apple): use new render context per file and view (#9838) 9c7927622b
Co-authored-by: David Skuza <david@rive.app>
2025-05-29 16:14:01 +00:00
dskuza
a946d5d480 Updating version files 2025-05-28 16:43:05 +00:00
bodymovin
3f9c9a5940 Nnnn data bind assets bkp 2 (#9705) e6782a6bfb
data bind images

Co-authored-by: hernan <hernan@rive.app>
2025-05-16 16:08:29 +00:00
dskuza
8ea6709a0b Updating version files 2025-05-12 20:21:22 +00:00
dskuza
be79da2b1d refactor(ios): wrap draw in autorelease (#9541) 7b2a1baca6
Co-authored-by: David Skuza <david@rive.app>
2025-05-12 19:29:38 +00:00
bodymovin
fcdf32e329 feature: add list index symbol for view model lists (#9643) 2b1a85fa6f
* add list index symbol for view model lists

Co-authored-by: hernan <hernan@rive.app>
2025-05-10 13:18:43 +00:00
dskuza
725ccc4766 refactor(ios): use active screen display link when available (#9624) bfae2e978e
* refactor(ios): use active screen display link when available

* project(ios): run pr ios tests on xcode 15.4

* fix: conditionally build screen display link for non-visionos

Co-authored-by: David Skuza <david@rive.app>
2025-05-08 20:17:59 +00:00
dskuza
f4a344869a Updating version files 2025-04-23 13:30:06 +00:00
dskuza
5dd670b893 feat(ios): add data binding replace view model instance support
## Changes
- Adds support for replacing view model instance properties with other view model instances

## Fixes
- Fixes an issue where nested view model instances and properties were getting incorrectly created and cached

Diffs=
909ae012c1 feat(ios): add data binding replace view model instance support (#9500)

Co-authored-by: David Skuza <david@rive.app>
2025-04-22 20:45:12 +00:00
dskuza
94b931d3b5 Updating version files 2025-04-16 02:15:43 +00:00
dskuza
4110f9f3f6 feat(ios): add support for data binding
Adds support for data binding to the iOS runtime.

## Changes

### RiveFile

Updated to match c++ runtime support for getting view models by index, name, and default for an artboard.

### RiveArtboard

Updated to match c++ runtime support for binding a view model instance.

### RiveStateMachine

Updated to match c++ runtime support for binding a view model instance. Additionally, this holds a strong reference to the view model instance that is currently bound (which aids in knowing which state machine should have its property listeners called after advance).

### RiveModel

Adds support for enabling / disabling autoBind functionality. This has to be done _after_ initialization, since Swift default arguments don't bridge to ObjC, and I didn't want to add n number of new initializers. When enabled, a callback will be called with the bound instance.

## New Types

Currently, type names are similar to those found within the c++ runtime. They're kind of ugly when it comes to ObjC, but the Swift names are cleaned up (e.g `RiveViewModelRuntime.Instance` instead of `RiveViewModelInstanceRuntime`).

### RiveDataBindingViewModel

The bridging type between the c++ runtime equivalent (`rive::ViewModelRuntime`) and ObjC.

### RiveDataBindingViewModelInstance

Swift: `RiveDataBindingViewModel.Instance`

The bridging type between the c++ runtime equivalent (`rive::ViewModelInstanceRuntime`) and ObjC.

### RiveDataBindingViewModelInstanceProperty

Swift: `RiveDataBindingViewModel.Instance.Property`

The superclass bridging type between the c++ runtime equivalent (`rive::ViewModelInstanceValueRuntime`) and ObjC.

### Subclasses

- Strings: `RiveDataBindingViewModelInstanceStringProperty`
  - Swift: `RiveDataBindingViewModel.Instance.StringProperty`
- Numbers: `RiveDataBindingViewModelInstanceNumberProperty`
  -  Swift: `RiveDataBindingViewModel.Instance.NumberProperty`
- Boolean: `RiveDataBindingViewModelInstanceBooleanProperty`
  - Swift: `RiveDataBindingViewModel.Instance.BooleanProperty`
- Color: `RiveDataBindingViewModelInstanceColorProperty`
  - Swift: `RiveDataBindingViewModel.Instance.ColorProperty`
- Enum: `RiveDataBindingViewModelInstanceEnumProperty`
  -  Swift: `RiveDataBindingViewModel.Instance.EnumProperty`
- Trigger: `RiveDataBindingViewModelInstanceTriggerProperty`
  - Swift: `RiveDataBindingViewModel.Instance.TriggerProperty`

### Observability

KVO has (temporarily) been disabled, "forcing" observability to be done through the explicit `addListener` and `removeListener` functions of each property type. `removeListener` exists on the superclass, however the matching `addListener` functions exist on each property type, primarily due to the fact that there is no "pretty" way of handing these functions as generics (where only the value type of the property differs for each callback) other than utilizing `id`. Listeners exist within the context of a property; however, an instance will use its (cached) properties to request that it calls its listeners.

## Details

### Caching properties

When a property getter is called on a view model instance, a cache is first checked for the property, otherwise a new one is returned and cached. This helps with ensuring we are using the same pointer under-the-hood. This isn't strictly necessary (per testing) but does allow for some niceties, such as not having to explicitly maintain a strong reference to a property if you want to just observe: `instance.triggerProperty(from: "...").addListener { ... }`.

Properties are cached for the first component when parsing the path for the property. In the instance that a path with > 1 component  is provided to a property (e.g `instance.triggerProperty(from: 'nested/trigger")`, then the appropriate nested view models are created, and the property is associated with the correct view model (e.g above, the view model `nested will be cached, and the trigger property will be cached within that view model).

### Caching nested view models

Similar to caching properties, when a (nested) view model getter is called on a view model instance, a cache is first checked for the view model, otherwise a new one is returned and cached. This helps ensure that when (re)binding an instance to a (new) state machine or artboard, that all properties within that view model still have its listeners attached, regardless of how nested a path goes. This will likely help with implementing replacing instance functionality in v2.

## Testing

Unit tests have been added for data binding, attempting to capture high-level expectations rather than totally verifying the c++ runtime expectations. This includes things like: all getters returning object-or-nil, listeners being called with the correct values, autoBinding, property and view model caching, etc. The `.riv` file for unit tests is the same one that is used within the Example app.

## Example

A new `.riv` file has been added that shows basic usage of each property type (including observability). The same `.riv` file is used in the unit tests.

Diffs=
b2f1db73d7 feat(ios): add support for data binding (#9227)

Co-authored-by: David Skuza <david@rive.app>
2025-04-15 21:45:39 +00:00
dskuza
c2b8b45da7 Updating version files 2025-04-11 17:13:11 +00:00