- Propagate events up to parent Artboard state machines
- Add Event to Listener types and display in combobox
- Add support for StateMachineListeners to listen for events
Still needs implementation on CPP runtime.
In this example, the rectangles are in a nested artboard. Clicking them fires an event from the nested artboard up to the parent artboard which has a listener which updates an input triggering the animation.
https://github.com/rive-app/rive/assets/186340/22bfb00e-8d1e-46f0-8faa-d2d5e5a1bbfb
Diffs=
1a9dd7e97 Add support to Listeners for events from nested artboards (#5923)
52a1a6f88 Added a Rust runtime. (#6027)
22077beda feat: add count and query APIs for events and text runs at the Artboard level, and expose in WASM (#6043)
f95f54140 Add out of band loading to rive-wasm (#6017)
54d736fec 6041 follow path with 0 opacity (#6060)
bb7d5ac4c Add a math::round_up_to_multiple_of<N>() utility (#6061)
6ee7cea9e Clamping color stops. (#6052)
bb00ec119 Add a WebGPU mode that uses EXT_shader_pixel_local_storage (#6048)
af873d55a update runtime with file asset cdn information (#6040)
Co-authored-by: Philip Chung <philterdesign@gmail.com>
The goal of this PR is to improve the usability of events for the Flutter runtime and to hide unnecessary editor implementation detail. This also ensures that an event is not modifiable after it has been reported (from the runtime's perspective)
This is achieved by exposing runtime specific classes `RiveEvent`, `RiveOpenURLEvent` and `RiveGeneralEvent` (similar to the other runtimes), and mapping the current `Event` to these classes as an immutable object. It also maps the list of events to a Map called `properties`.
This PR also:
- Adds more event examples and fixes the audio example (`.stop` resulted in issues, and calling dispose, etc.)
- Adds tests for events
TODO:
- Will need to potentially change things (and expose the `delay`) when this lands: https://github.com/rive-app/rive/pull/5951
Diffs=
eae01824d feat: expose wrapper event class to runtime (#5956)
Co-authored-by: Gordon <pggordonhayes@gmail.com>
Makes this easier:
```
class MyController extends RiveAnimationController<Artboard> {
@override
bool init(Artboard core) {
var run = core.component<TextValueRun>("blah");
run?.text = "HEEEEEY";
return super.init(core);
}
@override
void apply(Artboard? core, double elapsedSeconds) {}
}
```
Also exposes NestedArtboard which lots of users have requested.
Diffs=
fa36ec055 Make TextValueRun visible to clients and NestedArtboards too. (#5657)
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
(basing this pr onto our dart runtime change for now, to limit scope)
made some small tweaks to function names, mostly to get fonts and images to "feel" more similar.
broke out "decode' into parsing the asset first.
makes it possible to cache images/fonts with our dart runtime, example included
Diffs=
40302069e Caching example (#5517)
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
There are a number of questions I'd like to resolve before considering to merge this. also a few thigns to clean up no doubt
# Questions before merging
To customize loading out of band assets, we expect our users to implement
```
abstract class FileAssetLoader {
Future<bool> load(FileAsset asset);
bool isCompatible(FileAsset asset) => true;
}
```
1. is this a good interface (i've changed `loadContents`, to `load`)? (if we like this we should change this in cpp too)
2. `FileAssetLoader` is a mouth-full, would `AssetLoader` be better?
3. We are passing `FileAssets` (our core objects) to users with some slight api extensions, is that good? should we just wrap this in an Asset class (I had this before, its not a lot of work to get it back)
things sorted
- [x] cdn "loading" vs url loading
- just sticking with cdn, users can customize for url
- [x] asset class for consumers of our runtime.
- i've avoided this one for now, just extending our FileAsset
- [x] Importer/Resolver/Loader. I flipped some names around, mostly because I want our end users to provide an `AssetLoader`, not a resolver.
things to sort out down the line, i'm declaring them out of scope for this pr, fft disagree:
- Fallback font, I see we have a fallback font file hardcoded in the runtime. should investigate if we can include an asset for people like this, or if we need to have users set this if they want to use fallback fonts.
- Image Placement, we should strip width/height from runtimes on ImageAssets
- What do we want to do about asset loading / decoding errors
- TextStyle has both assetId & fontAssetId it gets assetId from the file asset referencer, its nbd,
Diffs=
06e959ad2 Font dart runtime (#5411)
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
- Renamed CubicInterpolator to CubicEaseInterpolator so that CubicInterpolator can now be the base class for both CubicEaseInterpolator and CubicValueInterpolator.
- Added CubicValueInterpolator to cpp and Flutter runtimes.
- Test in cpp runtime for the new cubic value interpolation.
Diffs=
1e80ad08f Value Graph Export + Runtime Support!! (#4524)
c532f8658 Shorten harfbuzz/SheenBidi directory paths
312a6c778 Drop the runtime to C++11
de4fe4d71 export MAKE_SKIA_FILE from all top-level scripts that build Skia
75a6b74b8 Beef up testing in tools/*
79f98695a Don't show interactive download progress when premaking on bots
b7fd1d825 Move golden testing into tools/