fixes#7728
This fix is not necessary now that we have the renderer in the editor, since nested artboards run in c++.
But since I was looking into it, and just in case, I added the fix on the flutter runtime.
Diffs=
1b6afc1e9 add animation before setting exit time (#7729)
Co-authored-by: hernan <hernan@rive.app>
This is a bit of an odd one related to not updating the flutter runtime since we moved to rive_native.
@drawsgood and I observed that sometimes nested artboards weren't rendering properly to the stage (the nested artboard would appear as an empty node). I narrowed this down to whenever a file contained a layout with either a fill or stroke.
The reason this was happening is because when we add a nested artboard, we use genRuntimeFile, which exports, then imports and validates the objects in the file. During the validation, if the file had a layout with a fill, the fill would attempt to validate, one of the conditions of which is that it's parent is a ShapePaintContainer. LayoutComponent IS a ShapePaintContainer, BUT the validate() happens against the flutter object, and since we haven't pushed updates to flutter, LayoutComponent there is NOT a ShapePaintContainer.
The easiest fix for this is to just add the bits to LayoutComponent in flutter related to extending ShapePaintContainer. I think this should be ok since the added code doesn't have anything to do with rive_native and the new rendering pathway.
One question I have is whether we should be continuing to validate against the flutter objects when it comes to nested artboards, now that we're using rive_native. @luigi-rosso perhaps we can discuss further when you are back in office.
Diffs=
c3137b923 Fix flutter validate() problem with drawable layouts (#7727)
d9f5701ec add listener actions support for databind (#7710)
dcb165130 Fix alignment when flex wrap enabled (#7722)
fbfa3b545 Buildsystem fixes for build_rive.sh and PLS shaders (#7716)
405ca998b add click event support (#7668)
4732c37b5 Improve layout animation (#7712)
a56419984 Simple procedural text rendering API (#7701)
d6d79132b Add a test for nested events triggering listener in parent (#7709)
657f65e1c Fix for nested events in CPP (#7708)
0a11e599f Add a build_rive.sh script to unify the premake5 build process (#7691)
d25b9097d viewmodel transitions runtime (#7680)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Forgot to expose this new API from rive_common to rive_flutter in previous release
Diffs=
e5920f4a0 chore: release flutter 0.13.11 (#7682)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
This PR defines the core objects needed to support adding conditions to transitions based on view model values.
It also adds the editor UI necessary to create them based.
I added some comments on the most relevant parts of this PR.
The c++ part will be added on a separate PR to keep this one focused on the pieces needed to create these conditions.
The rest is boilerplate code from generate_core and generate_core_runtime.
Diffs=
190b920f8 add support for state machine conditions based on view models (#7659)
1a5f273bb Nested artboard types: node, leaf, layout (#7639)
Co-authored-by: hernan <hernan@rive.app>
In certain scenarios, there is no need to perform a hit test, so we precompute the conditions and early out from calculating the hit test.
If a shape has only listeners of type PointerDown and PointerUp, and is not an opaque target, it doesn't need to check for move events or exit events, which can save a lot of computations since it will skip most frames.
Diffs=
50bc398c4 Xxxx improve hittest performance (#7584)
a01b0467e Makeshadersinpremake (#7660)
114da4e39 Layout drawable (#7544)
b5f342002 add bindable properties for state machines (#7640)
f55ebd34f skip custom events when creating hitshapes (#7577)
Co-authored-by: hernan <hernan@rive.app>
Thanks @umberto-sonnino!
Diffs=
33fb6021a Update compileSdkVersion for flutter android example (#7647)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
when calculating the spilled time of an animation, we were not accounting for their speed, so it would calculate the remaining time incorrectly.
It could end up returning a value larger than the elapsed time causing an exponential time loop.
Diffs=
58a9574ce fix spilled time for animations with speed applied to them (#7630)
Co-authored-by: hernan <hernan@rive.app>
Fixes https://github.com/rive-app/rive-flutter/issues/408 and https://github.com/rive-app/rive-flutter/issues/409
I left some notes in the code for future consideration, @luigi-rosso. This is the least intrusive change that will not break golden tests (for us and users).
Diffs=
fd6aa55ed fix: always advance (#7615)
49cabe3cb update data bind mode to flags (#7612)
6c5c79b75 Only set Core Audio session category for iOS targets (#7624)
8e1be1223 Run tests, bench, gms, & goldens on a physical Pixel 8 on CI (#7618)
238bf2fe1 Set audio to mix on for iOS (simulator) and Catalyst (#7555)
ca56d7565 Vulkan! (#7553)
63b6a13d3 Use "python3" in make_viewer_skia.sh (instead of "python") (#7597)
8a67331a4 Fix build on web. (#7613)
44fae6bfe explicit linux arch (#7606)
2a1db3835 handle linux warnings (#7598)
c5eb69645 add pic (#7589)
3bf0df5c0 Fixing windows build with rive_native. (#7575)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Starting to let tests run.
Diffs=
a0a6c0d3b Renderer in editor (#7495)
876a2dca5 Fix crash when skinnable isn’t found. (#7554)
8fbe13788 change how forAll iterates over children (#7546)
93fb6eb83 Fix jpeg and png decode overflows and error handling. (#7535)
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
Co-authored-by: hernan <hernan@rive.app>
Refactors the library loading to reuse the same code across the different FFI modules.
Introduces a workaround for Android library loading, potentially fixing [403](https://github.com/rive-app/rive-flutter/issues/403)
Diffs=
d5ed4ca9b feat: add applyWorkaroundToRiveOnOldAndroidVersions (#7485)
1e7b1c030 add missing validations (#7532)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
objectId, propertykey are definitely written as varuint, not sure if properties total needs to be, but doesn't hurt to have it that way either I think.
I'm not sure if this is everything that needs to be updated. I tried to use `generate_core_runtime` to update the flutter runtime but that made a bunch of changes like unused imports all over the place...
Diffs=
07cbce551 use varuint for writing/reading objectid, total properties and property key in animation reset (#7510)
Co-authored-by: Arthur Vivian <arthur@rive.app>
Co-authored-by: Hernan Torrisi <hernantorrisi@gmail.com>
- Move layout styles previously in bitfields to core properties
- Add KeyFrameUint for keying int values (hold keyframes)
- Add alignment property that can compute the layout properties related to alignment at runtime rather than storing them
- Add ComboBox in the keyed object hierarchy which displays style related enum values
https://github.com/rive-app/rive/assets/186340/ec2ecbde-e539-40cc-b964-2791ad28cc22
Diffs=
e5db5a652 Layout bitfield to props with keying (#7478)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
- Fixes issues with edge constraints UX not updating
- Fixes issue with absolute/relative toggle not updating
- Fixes bug with incorrect point value when moving edge constraints to Left+Right and Top+Bottom
- Fix getting into bad state with inherited interpolator
- Fix layout animation advance bug
- Force layout bounds to be updated when parent changes (fixes a bug where relative layoutcomponents weren't updating because left/top value doesnt change when reparenting)
Diffs=
6f29a9c0c Miscellaneous Layout UX Fixes (#7491)
09ccc9ebb Add yoga to thumbnail generator build (#7494)
aa390d5dc change how viewmodel instances target their viewmodel (#7468)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
some small code improvements
- reorganize code to get things ready for binding text runs
- support to bind color two way
- fix bug: new data binds not updating if they were created in animate mode
Diffs=
9cd8759a0 Xxxx data binding data context (#7454)
Co-authored-by: hernan <hernan@rive.app>
- Popout for setting layout animation
- Supports hold, linear, cubic ease and elastic
- Layouts can have custom interpolation or inherit from up the layout tree
- This PR also implements the change to not store flexGrow or alignSelf when setting scaleType, rather we put the logic into syncStyle and directly pass the values for those into the layout engine
- Tested with Rive Renderer in editor and seems to work well!
- @alxgibsn I moved the animation popout to the Layout inspector. We discussed the Auto Layout inspector, but since animation can be applied to a layoutcomponent that has no children (whereas the Auto Layout inspector must have children to be expanded), it seemed more appropriate there.
Diffs=
31f5ee5c4 Animation for Layouts (#7426)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Updating the flutter tests to build with 3.22.2 results in an error finding MultiDex. Fix is found here: https://github.com/flutter/flutter/issues/148368
Diffs=
59df9ce73 Flutter Android example project fix (#7455)
a4439ee42 Renames for Yoga and libjpeg (#7446)
97578005c Update LayoutComponentStyle bitfields to be compatible with older C++ versions (#7436)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
This PR adds a community contribution and updates the Readme with the latest information.
Diffs=
060a6cf61 docs: update README and CHANGELOG (#7416)
7e1b3027d Optimize image encoding/decoding in debug builds (#7418)
da0b71559 Replace computeIntrinsicSize with measureLayout (#7410)
6c76b425f Yoga layout runtimes (#6787)
Co-authored-by: Emad Rad <codewithemad@gmail.com>
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Fixing errors caused by merging this PR: https://github.com/rive-app/rive/pull/7310
Diffs=
e103006c8 Fix missing API in runtime mounted artboard (#7403)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Previously, only nested state machines could report events so that listeners in parent artboards could listen for them. This PR adds event reporting for nested simple animations. Had to refactor some stuff to genericize in order for both state machines and linear animations to have similar functionality.
I'm not sure if its possible, or desirable, for nested remap animations to have the same functionality, but that is not included in this PR.
Diffs=
097b68f56 Nested linear animations report events up to parent artboards (#7310)
34e186b32 more renames for harfbuzz (#7398)
b88272290 mark shape as dirty after flagged as target (#7396)
a10b1e61e don’t defer updates when a shape/path is used for hit detect (#7392)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
this PR handles marking a shape bounds as dirty after it has updated.
This is needed because pointer events can trigger before a new draw update, which would consume the change flag before the shape has properly updated.
Diffs=
085f5bd2d fix bounds calculation ahead of time (#7380)
Diffs=
538fc70f2 Fix editor only in AbsoluteLayoutComponent and gen core runtimes (#7339)
dde676085 Fix libjpg on Mac Sonoma (#7329)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Adding hooks to have images resizable by layouts. As discussed with @alxgibsn for now we'll just stretch to fit. We may want to add fit options in the future.
https://github.com/rive-app/rive/assets/186340/50905b6a-b21e-4bba-84e0-b8418fb149a0
Diffs=
085c0cce6 Setup Image as Sizable for use with layouts (#7338)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
this PR fixes two sources of neverending renders.
the first commit addresses a scenario where, once the stage is zoomed in or out, it gets into a continuous scheduling of frames that prevent the cache from being rebuilt because the debounce resets the previous one. It is fixed by storing a pending zoom value, and only resetting the debounce if the pending value is different than the new zoom value.
The second commit fixes a scenario where, when time remapped animations are advanced in preview mode, it also triggers the advancement of the nested artboards belonging to the remapped artboards.
Diffs=
7474216b4 Xxxx fix extra frame rendering (#7301)
Co-authored-by: hernan <hernan@rive.app>
Tested out the latest rive-common that now uses `package:web` and `dart:js_interop`
The `RiveFile.initializeText` and everything associated with it are deprecated. Instead, use `RiveFile.initialize`, which will always need to be called when initializing text, audio, and layout.
Calling it `initializeText` is confusing to users as they may not be using text, but still need to call this manually when using RiveFile.import.
There is maybe additional cleanup we could do here, but at least want to make sure the public API is not confusing.
Diffs=
fa7c55934 Flutter release 0.13.5 (#7305)
973ff2276 Fix warnings about invalid toolsets (#7300)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
fixes#7226
This PR fixes reports of events when animations are playing backward.
It considers both the timeline speed and the state machine state speed to determine direction.
It also handles not reporting an event twice if it comes from a "ping pong" loop.
It also adds a small performance improvement, skipping the binary search if possible.
Diffs=
265c00985 fix for unexpected triggered events (#7227)
8a538c243 validating core objects property keys on load (#7298)
cd6210f42 Make ContourMeasure more robust (#7294)
405b8ef90 use world bounds for coarse grained collision test (#7287)
3734d9bac initialize seed with chrono (#7285)
45b998e68 Simple libjpeg (#7277)
Co-authored-by: hernan <hernan@rive.app>
Fix a couple of small issues with Wrap in Layout functionality
Diffs=
67ed7133f Improvements to wrap in layout (#7279)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Layout UX stuff @alxgibsn and I have been working on.
- Layout Padding Inspector (padding)
- Layout Children Inspector (flex direction, gap)
- New points/percent toggle
- Right click component > Wrap in Layout
- Fix text incorrect sizing issue when using intrinsic sizing
- Groups as layout children don't resize to parent layout
- Layout cells in hierarchy
- Add compensate logic when dropping components into layouts
- Bug fixes related to selecting and transforming components and their parent layouts together
<img width="1138" alt="Screenshot 2024-05-13 at 1 31 04 PM" src="https://github.com/rive-app/rive/assets/186340/5df89f3d-44dc-4155-b9e0-09f31b2ea7af">
Diffs=
e89250c39 Layout Editor UX Updates (#7260)
5ccc21fa3 fix advancing nested animations (#7246)
8700c7365 remove harfbuzz flag (#7233)
e0c4d9a20 Don't defer path update if Shape has a dependent skin (#7231)
806ae1fae Fix an assert in contour_measure.cpp (#7232)
7d03c3faf Add strokes, gradients, and blend modes to path_fuzz (#7230)
4342a3f04 Wasm fallback and min safari version (#7214)
Co-authored-by: Alex Gibson <agibson.uk@gmail.com>
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Addresses https://github.com/rive-app/rive-flutter/issues/382 in rive-flutter. Doing a quick audit, it looks like these APIs are used solely by 3rd party libs we consume (MiniAudio, Harfbuzz, skia font converter).
Also adds the privacy manifest to our ios/mac runtimes for our Cocoapod and Swift Package.
Validated the coverage using [this tool](https://github.com/crasowas/app_store_required_privacy_manifest_analyser).
Diffs=
4c23759b6 Add privacy manifest for Apple platforms (#7194)
1d0d2b6ac Add a "path_fuzz" mode to the PLS fuzzer (#7211)
0d03a416b Fix ios analyzer (#7198)
335a30588 Add static/dynamic runtime config based on actual target config. (#7184)
8db7cac50 fix state machine advanceAndApply (#7183)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
Have NestedArtboards implement Sizable so they can be sized by layout components.
Diffs=
51556c678 Make NestedArtboard Sizable (#7179)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
A lot of files changed, but they're mostly boilerplate code and changes to the API of the actions.
This PR adds support for using Align Target without moving the aligned target to the pointer position.
Instead, it moves the element from its starting point following the mouse position.
It adds a new boolean property to enable the feature.
In order to achieve this, it's necessary to provide to all actions the current position and the previous position so the action can calculate the delta.
Diffs=
a55f1ffb6 Xxxx support target align from position (#7154)
7d0125c92 Handle NaN in PLS paths and transforms (#7176)
3f7a8f75c fix: text init race condition (#7174)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Co-authored-by: hernan <hernan@rive.app>
This PR brings in a community fix: https://github.com/rive-app/rive-flutter/pull/380
This was working previously. I don't know what changed to cause this to break. Either way, having these conditional checks is sensible. This PR adds golden test with various ticker mode states to ensure this does not regress again.
Diffs=
78c081bce Flutter fix ticker mode (#7182)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Co-authored-by: Paweł Polański <jaggernod@gmail.com>
Adds fit and alignment properties for nested artboards. This will make nested artboards work better with layouts, in particular with the resizeArtboard fit type which allows resizing a nested artboard's runtime artboard rather than scaling it. I've hidden this feature behind the layouts flag.
https://github.com/rive-app/rive/assets/186340/fcdecc67-83ee-446a-814d-607ba1137958
Diffs=
ee45b994f Fit and alignment for nested artboards (#7147)
e96739328 GameKit on Windows (#7150)
1c7e61b8a fix follow path not working with path as target and shape with 0 opacity (#7156)
328d307df initialize audio manager only if an instance needs it (#7132)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
updated the flutter runtime
@alxgibsn @philter This update included some changes from other branches.
Can you verify that all looks good?
Diffs=
cd9520371 update flutter runtime (#7141)
2b2e92ca7 Fix audio instances (#7113)
Co-authored-by: hernan <hernan@rive.app>
Pubspec is already updated updated to the correct version, but we've not pushed to Pub yet (probably a mistake).
- Changelog is updated with latest changes
- This PR just fixes some analyzer warnings and is a bit of a formality to make it clear we are releasing to pub
Diffs=
fdd52090d chore: release flutter v0.13.2 (#7100)
89053041a add out of band audio support ios - abstracted audio! (#7079)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Our current API is quite verbose and requires casting to the relevant class types when using the current find API. These methods simplify the process.
Diffs=
1460f5366 Expose methods to easily get Rive state machine inputs (#7085)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
We'll need to decide on the Enum case for getting the `Type`. Long term it might be better to just not have this to avoid breaking changes.
If we decide to remove that, or how it is currently in the PR with the extended conditions, it's a breaking change.
The changes to `LocalAssetLoader` aren't breaking though, I realise now.
I also removed deprecated things.
Diffs=
1a8b3c7cc feat!: add audio out-of-band (#7037)
99d28e1ac Xxxx randomization updates part 2 (#7097)
a0004fa72 Xxxx support random transitions (#7094)
edac19b06 support randomizing transitions (#7082)
Co-authored-by: Gordon <pggordonhayes@gmail.com>