368 Commits

Author SHA1 Message Date
9e7a831df6 Make TextValueRun visible to clients and NestedArtboards too.
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>
2023-07-24 21:27:49 +00:00
db112aa589 Fix runtime image sizes and run core generator.
Follow this thread: https://2dimensions.slack.com/archives/CLLCU09T6/p1690220943525829

Note that re-running the generator picked up some more changes.

Diffs=
aeb9210ad Fix runtime image sizes and run core generator. (#5655)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2023-07-24 19:55:58 +00:00
f999112d92 improve Rive widget clipping and sizing
- Exposes `useArtboardSize` in RiveAnimation
- Checks to see if clipping is disabled - Artboard.clip
- Provides means to supply a custom Rect for clipping

Diffs=
fa6ed717b improve Rive widget clipping and sizing (#5154)
13863bf8f Rive Text for iOS and Android! (#5634)
9e0c43b70 Fix small bugs caught by JC (and Alex). (#5647)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2023-07-24 17:11:14 +00:00
f1a666d9a2 ran generate core runtimes
just ran "generate_core_runtimes.sh" because it looks like we've started to fall behind a bunch here.

Any reason not to get this merged (after sorting any issues)

looks like it has some text updates & follow constraints?
i guess it'd be good to double check this for things we do not want in the public runtimes

Diffs=
d0c65132d ran generate core runtimes (#5628)
420d27a5b FollowPathConstraint to extend TransformSpaceConstraint (#5635)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-21 16:49:33 +00:00
df9191d6fa refactor asset export helpers, moving them into rive-api & moving som…
…e asset extensions into api as well

bit of a refactor...
tldr move stage mutation & export mutation stuff into rive api (we couldjust move export i guess...)
move the export helper into rive-api as well

this allows peon to share the same code as our backend here!

Diffs=
17a07fe2e refactor asset export helpers, moving them into rive-api & moving som… (#5620)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-20 14:42:33 +00:00
b4ec7a7ab4 use the dimensions of the image at runtime, rather than of the ImageA…
…sset

ok just "fixing" how we export .riv files, and no-longer rely on width and height form image assets, but take them from the image instead.

its not "huge" difference, but basically it means that if we replace an existing image with an image of different dimensions we end up drawing the image from the centre of where the original image was, rather than the top left, which is a bit mroe forgiving

example:

got a few images in here, (they're all like 5k x 3k pixels, so all quite large)

<img width="1086" alt="CleanShot 2023-07-03 at 16 28 34@2x" src="https://github.com/rive-app/rive/assets/1216025/625e0d34-ac0c-4eb6-ad75-cb839aca92ac">

before this change this would look like:

<img width="1135" alt="CleanShot 2023-07-03 at 16 28 46@2x" src="https://github.com/rive-app/rive/assets/1216025/8ba848da-5938-4897-a664-eaae39c86806">

with this change we get

<img width="1113" alt="CleanShot 2023-07-03 at 16 29 17@2x" src="https://github.com/rive-app/rive/assets/1216025/c5f30eb6-21bd-419e-802d-9c98c00399e7">

(the mesh is kinda interesting here)

*note* i'm not touching the cpp runtime just yet, so this & other changes still need to make it down there

Diffs=
235908221 use the dimensions of the image at runtime, rather than of the ImageA… (#5519)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-20 13:59:39 +00:00
591b275519 Update http v1.1.0
Resolves https://github.com/rive-app/rive-flutter/issues/321

This requires Sentry to be updated as well.

Diffs=
05c8632e8 Update http v1.1.0 (#5540)
db5688c4a Don't use the '-g' buildoption in premake (#5621)
b17671130 Fixing modifier ranges not updating on the right frame. (#5623)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2023-07-20 09:51:48 +00:00
d872f57d09 fix: joystick handleSource not enabled for flutter runtime
Fixes https://github.com/rive-app/rive-flutter/issues/331

An inconsistency between the editor and Flutter runtime. External control on a Joystick was not applied.

I used this file to reproduce and test: [joystickdemo2.rev.zip](https://github.com/rive-app/rive/files/12051102/joystickdemo2.rev.zip)

Expected behaviour (the handle is controlled by the position of the top rectangle):

https://github.com/rive-app/rive/assets/13705472/1eae3a71-5f2d-4375-a531-d36b61e5cc61

Diffs=
44f6c4b9c fix: joystick handleSource not enabled for flutter runtime (#5589)
d1f8710f5 Fix dependency order issues for Follow Path (#5595)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2023-07-19 10:20:47 +00:00
0f08139463 Force embed assets when getting the preview for the sharelinks
- enables overriding the exporttype on export
- forces the "preview" riv file that gets exported to be exported "embedded"
- allows us to handle exceptions when decoding images (more to be done here, but this at least lets us avoid crashing without being able to catch exceptions https://api.flutter.dev/flutter/dart-ui/decodeImageFromList.html)

Diffs=
185b76201 Force embed assets when getting the preview for the sharelinks (#5608)
8e82475b8 Baseline Origin (#5577)
8b49fcbc5 Add option to quantize time to whole frames of framerate. (#5578)
b8e5473b9 Follow path should respect constrained component rotation if orient is off (#5601)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-18 12:35:01 +00:00
a86d5e5f02 Code generator fixes alternative
three commits

1 - updated the generator
2 - ran generator against core
3 - ran generator against core runtime

i tried to remove all the changes that are not the comment change

Diffs=
1292ebe56 Code generator fixes alternative (#5584)
094afae0b Adding target origin to transform constraint. (#5559)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-14 11:06:02 +00:00
ca712600bc refactor: asset resolving
Adds some cleanup to this previous PR: https://github.com/rive-app/rive/pull/5411/files

- Brings back some classes and parameters and mark them as deprecated.
- Changed the naming for parameters
- Removed asset resolving from the high level `RiveAnimation` widget, prefer to manage this by loading in your own `RiveFile`. This is to avoid introducing too many changes that we may revert down the line
- Removed code comments that were intended as questions, marked some as TODOs
- Improved documentation and cleaned up example

The cached asset example now has a button to hot swap out assets at runtime by keeping a reference to the asset. This works for images, but not for Fonts.
- We can either remove this example for the time being
- Or investigate why it does not swap out (I would expect it to)

Diffs=
94e3490ae refactor: asset resolving (#5563)
bae069339 Stop automatically pruning empty segments in RawPath (#5557)
2d2d8c413 Line Height & Paragraph Spacing (#5552)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2023-07-13 14:06:41 +00:00
d58c3c762b Runtime modifiers
Finally ready! Some highlights:
- Text objects own TextModifierGroups
- A TextModifierGroup defines a set of operations (Modifiers) to perform on ranges of the whole Text object.
- The ranges are defined by TextModifierRanges which are owned by TextModiferGroups. Each TextModifierGroup can have multiple TextModifierRanges, meaning that the set of Modifiers will perform on the final selection defined by TextModifierRanges.
- TextModifierRanges select portions of the text in a Text object based on rules that define the strength of the selection. The strength of multiple TextModifierRanges can be blended together meaning selection strength can be above 1 and below 0 (optionally clamped).
- There are three fundamental modifications:
  1. Transform where glyphs are individually transformed by a matrix
  2. Paint where glyphs are drawn with different paint (currently only opacity is supported, but later Fill and Stroke will be too).
  3. Shape where a selection can have shaping properties (currently variable axes later also font size) changed. This is the most complex one as it requires [two pass shaping](ef2d0d3ca3/packages/runtime/src/text/text.cpp (L578-L598)).

Diffs=
8086bdbf9 Runtime modifiers (#5512)
1a271c437 Get more compiling on MSVC (#5547)
5a18c89bd Swap propertyKeys between follow path and text core defs (#5543)
942bb8c94 Fix conflicting core key ids and set follow path offset to default false (#5541)
dcf320c64 Follow Path Constraint (Editor & CPP Runtime) (#5510)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2023-07-12 18:19:56 +00:00
8e9077dbf7 Adding origin to text.
Adds origin to text object that works just like the origin of a parametric path. It can be moved in freeze mode too. Adds support in the editor, Flutter runtime, and C++ runtime.

Diffs=
9b8dacbac Adding origin to text. (#5533)
797fb4cbd Add CMake support for building Android and Catch2 Tests (#5468)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2023-07-07 22:11:27 +00:00
e42bfd2599 Add cdn overwrite
allowing the cdn to be set per asset, defaults to our public production cdn.

its a "little" wasteful, but should only find usage when we are exporting .riv's from uat (which will be a little bit bigger as a result of this)

We could put the cdn base url onto the rivefile as a whole, i don't think it buys us much & this is simpler.
also considered putting the default string into the runtime (where it was priori to this) but i think its better of in the defs (as the defs would default to an empty string otherwise, which makes the code ever so slightly messier to read). I think this comes out just a crappy if we ever change the default cdn url.

Diffs=
5c76c52e1 Add cdn overwrite (#5522)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-07-06 13:13:09 +00:00
0e3fdf8de5 Caching example
(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>
2023-07-06 10:50:13 +00:00
5def5d7b1c Font dart runtime
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>
2023-07-06 08:49:14 +00:00
ba5f9afbac add skip to core string type, to avoid trying to parse bytearrays as …
…strings

an approach we could do to sort this out

Diffs=
9007b7f92 add skip to core string type, to avoid trying to parse bytearrays as … (#5503)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-06-29 13:41:29 +00:00
fe30e35068 Run generate
just trying to flush through some of the bits coming out of running generate core runtime & generate core runtime without making a mess in other pr's .
this is split into four commits which might be helpful when looking at the changes here.

Diffs=
ad72cfce5 Run generate (#5490)
7ee5f7d5a Increases the margin for the approx call to some of the wangs formula… (#5506)
2f224da7f Runtime ellipsis (#5482)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-06-29 08:29:17 +00:00
13adb8da86 Bump Flutter runtime version and changelog, small analyze fix
Following our runtimes upgrade docs here: https://www.notion.so/rive-app/Updating-Runtimes-e03da3c30a0448e59e72e82e3e8f9f6f

Unsure if this needs to be committed and pushed down first before doing the flutter publish, or after. @luigi-rosso ?

Diffs=
ca5884788 Bump Flutter runtime version and changelog, small analyze fix (#5495)
500d878a2 fix viewer build (#5493)

Co-authored-by: Zachary Plata <plata.zach@gmail.com>
2023-06-27 17:20:07 +00:00
93c1ca86e2 Feature options on Fonts
Adds runtime and editor support for setting feature flags on a Font.

The biggest change to the font engine is that the feature options are now stored on the Font object itself instead of hard-coded during shaping. This is nice as it requires no extra data to be piped through for individual run styling. It also means that we generalized the concept of creating a variable font as configuring a version of the font (see withOptions replacing makeVariation) so that variable axis and feature settings are treated as options to a Font configuration.

This also allows us to track existing variations and options on the configured Font such that any further call to "withOptions" on that already configured Font will propagate previous changes if not overridden. This fortuitously also fixes an issue the modifiers were exhibiting where a variation set on the TextStyle that wasn't part of the modifier set would be lost.

Diffs=
31d9a5424 Feature options on Fonts (#5479)
8b7587241 Runtime/interpolate states cpp (#5437)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
2023-06-26 17:36:43 +00:00
4893a3e79e Add transition interpolation to the runtime
Just ran `generate_core_runtime.sh` which added quite a lot of stuff. The change is quite minimal, I'll highlight it with a few comments in the PR.
I'll also adding a test for these new cubic exports just in case!

Fixes the Flutter bit for #5404

Diffs=
59858e333 Add transition interpolation to the runtime (#5429)

Co-authored-by: Umberto Sonnino <umberto@rive.app>
2023-06-19 18:53:56 +00:00
d7d22b9aee chore: bump rive_common to v0.0.10
Diffs=
d520a7ea4 chore: bump rive_common to v0.0.10 (#5406)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
2023-06-13 09:58:15 +00:00
7f218d15bd revert overriding rive_common in flutter example
this breaks tests in rive-flutter, and presumably a leftover from testing a rive_common bump locally

37eb623b96

Diffs=
ad0d13cd6 revert overriding rive_common in flutter example (#5334)

Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-05-31 13:41:01 +00:00
76b43e1cc2 Add setting custom headers
adding pr from the community https://github.com/rive-app/rive-flutter/pull/314, including an update to how we make sure credits for contributions are kept when our mono scripts merge changes upstream.

Some companies don't let the rive file URLs without authentication, that's why they need to send headers in the network request.

Example of how to use:

```
RiveAnimation.network(
          'https://cdn.rive.app/animations/vehicles.riv',
          headers: {'Authorization': '{token}'},
        )
```

The same idea is in the [flutter_svg package](https://pub.dev/documentation/flutter_svg/latest/svg/SvgPicture/SvgPicture.network.html)

Diffs=
c163c1a7f Add setting custom headers (#5327)

Co-authored-by: Ahmed Wahba <a.tarek360@gmail.com>
Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com>
2023-05-31 11:56:54 +00:00
58c998986a Fix web editor
Need to make sure setUrlStrategy is only called once. Due to a bug in Flutter it seems like that static final instance is being called like a getter in Flutter Web (bizarre) but we can mitigate it by using the correct Platform (not the one from rive_common).

Also re-published the wasm for the latest rive_common.

Diffs=
cae6fa5cc Fix web editor (#5299)
2023-05-25 21:04:39 +00:00
37eb623b96 Text modifiers!
Adds support for text modifiers, which are a set a of operations that can run on a per character basis to transform, reshape, and fade resulting glyphs.

Adds:
- Modifier groups which encompass a set of modifications done to a range of the text.
- Range selectors which help define the range the modifier applies to (multiple range selectors can be included to build up the final selection of a modifier group).
- Variation modifiers which allow animating variable fonts per character.
- Origin, Translation, Rotation, and Scale modification.
- Opacity modifiers.

Diffs=
9695de6e3 Text modifiers! (#5288)
a9f8a1c5d Macos take2 (#5258)
2023-05-25 17:53:23 +00:00
32672e1326 replace performResize with computeDryLayout
fix up an edge case where we require computeDryLayout over performResize

https://docs.flutter.dev/release/breaking-changes/renderbox-dry-layout

the default implementation of performResize uses dryLayout so we can get rid of our override there. I was not able to make a unit test that fails without computeDryLayout, but an app with the below will throw this error

```
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY
╞═════════════════════════════════════════════════════════
The following assertion was thrown during performLayout():
The RiveRenderObject class does not implement "computeDryLayout".
If you are not writing your own RenderBox subclass, then this is not
your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md
```

```
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: LayoutBuilder(builder: (context, constraints) {
        return SingleChildScrollView(
          child: ConstrainedBox(
            constraints: BoxConstraints(
              minHeight: constraints.maxHeight,
            ),
            child: const IntrinsicHeight(
              child: Column(
                children: <Widget>[
                  Wrap(
                    children: [
                      SizedBox(
                        height: 100,
                        child: IntrinsicHeight(
                          child: RiveAnimation.network(
                            'https://cdn.rive.app/animations/vehicles.riv',
                          ),
                        ),
                      ),
                    ],
                  ),
                ],
              ),
            ),
          ),
        );
      }),
    );
  }
}
```

Diffs=
4f7d11d85 replace performResize with computeDryLayout (#5278)
2023-05-24 10:59:05 +00:00
6395bceaf7 Joystick ordering
Fixes issue with dependencies discussed here:
https://github.com/rive-app/rive/pull/5275

Joysticks now build their own DAG and export in the correct order for runtime.

Diffs=
f2ecb824b Joystick ordering (#5277)
2023-05-23 05:23:17 +00:00
a0e536a331 Joystick updates
- Adds invert x/y to joystick (Thanks @alxgibsn)
- Adds the invert to Flutter and C++ runtimes.
- Updates Cpp core generator to latest Flutter+NNBD.
- Fixes warnings and errors from latest Flutter (Dart SDK really).

Diffs=
a4fb3dc7d Joystick updates (#5261)
8f8e06b9e Attempt fixing the builds with new Docker images (#5253)
7768798a7 Update to Flutter 3.10.0 (#5247)
2023-05-20 18:07:35 +00:00
0d010f0191 Joysticks & Slider!
Diffs=
7acff50d4 Joysticks & Slider! (#5249)
e65175b88 Fix flickering caught in high level runtimes. (#5243)
2023-05-16 04:44:51 +00:00
6dd6778410 Aabb3
pr containing the changes here https://github.com/rive-app/rive/pull/3581

I've made a new branch/pr, just so its easier for you to check that i've not rebased something important tout...
I've also tried to remove most uses of [], bounds_resize does math using it.. it probably can get reworked, we just need to update a few things, like what edges are represented like etc...

Diffs=
d0bca2e72 Aabb3 (#5226)
2023-05-08 09:06:16 +00:00
a989837116 Fix diacritics
The big churn is from bumping us to Harfbuzz 6.0.0 (we were on a master from June 2022, 6.0.0 was released December 2022) as it fixes some diacritic positioning with Arabic text.

The main fix, however, comes from marshaling the glyph offsets to Dart (and storing them in C++ which we weren't doing). This is a translation offset within the local space (baseline and advance) of the glyph. It was causing our Arabic diacritics (the "accents" if you will) to be positioned incorrectly.

Prior to the fix:
![image](https://user-images.githubusercontent.com/454182/235834041-a683851a-96b0-4c72-adb9-f68c97682c14.png)

Post fix:
![image](https://user-images.githubusercontent.com/454182/235834074-23db8fab-08be-4529-98b3-f8a04ebe623a.png)

Same word displayed in Google Fonts (confirming correctness, also confirmed by an Arabic reader  on our Discord):
![CleanShot 2023-05-02 at 21 43 33@2x](https://user-images.githubusercontent.com/454182/235834273-9e423c7f-9dc2-48c3-afec-c7f7a9986416.png)

Diffs=
a8c1e3e75 Fix diacritics (#5200)
c7ecbe025 Run clang-format on .glsl files (#5180)
9945a7d2d Merge sbs_render_and_advance into master (#5181)
542e320d2 Discard empty verbs from RawPath (#5166)
2023-05-03 21:39:19 +00:00
4c81d5b0f4 Create add_to_project.yml
Adds all new issues to project board
2023-04-19 14:36:10 -07:00
86846ca956 Minor changes for publishing rive_flutter to pub.dev
Diffs=
8115f9a07 Minor changes for publishing rive_flutter to pub.dev (#5117)
abc600932 Propagate collapse to path composer. (#5116)
9266e0d30 Fix for runtime crash with skins nested in solo nodes. (#5109)
2023-04-14 00:17:17 +00:00
8379e840da Blend animation direct change
- silence a few linter issues
- update default blend animation mix value to be 100. its either 0 or 100, 1 made no sense. i think 100 is right.
- made a clamped input converter to set values between 0 & 100 nicely & it rounds values when you drag

adds option for selecting setting the mix input or the mix value on uat @alxgibsn, what do we want this to say? "Set Blend Value? "Set Mix Value?

<img width="320" alt="image" src="https://user-images.githubusercontent.com/1216025/229121083-d8233155-4bce-475e-bdb3-697ebd951360.png">

can have both by input and by value, they look very subtlely different
<img width="272" alt="image" src="https://user-images.githubusercontent.com/1216025/229121329-f8bd8596-0247-42f9-bd82-1979778b8ad3.png">

Diffs=
d9fc7d927 Blend animation direct change (#5080)
2023-04-03 12:14:44 +00:00
a7ba0546b9 add directBlendState by mix value, bypassing setting inputs
fixes https://github.com/rive-app/rive/issues/5039

lets you set integer values as input

https://user-images.githubusercontent.com/1216025/228241518-2d08812d-c283-4a15-a94d-9bb72544ecc3.mp4

todo (leaving because i want feedback first):
- [x] add tests
- [x] update cpp runtime
- [x] run `generate_core_runtime.sh`
- [x] run `generate_core.sh` for cpp

Diffs=
6df791fe4 add directBlendState by mix value, bypassing setting inputs (#5053)
2023-03-30 14:25:22 +00:00
6fa4cca892 Adds solo support to flutter runtime.
Diffs=
011f9ab58 Adds solo support to flutter runtime. (#5068)
d9952ae77 Fix clipping issue caused by wrong fillRule (#5067)
2023-03-29 22:36:54 +00:00
de05d9b449 Fixing solo nesting.
Fixes some visibility conditions JC caught while attempting to nest multiple solos into other solos a few times. Added tests for these conditions to both the editor and the C++ runtime.

Diffs=
2bc4acfba Fixing solo nesting. (#5066)
2023-03-29 20:12:22 +00:00
428b1a6dad Solos
So far:
- [x] Editor
- [x] Dart Tests
- [x] Flutter Runtime
- [x] C++ Runtime
- [x] C++ Tests

Hierarchy interaction:
<img width="280" alt="CleanShot 2023-03-24 at 21 44 53@2x" src="https://user-images.githubusercontent.com/454182/227696646-09f9cbe5-c482-4bab-aae9-b0b36c16047e.png">

Nesting:
<img width="394" alt="CleanShot 2023-03-24 at 21 45 23@2x" src="https://user-images.githubusercontent.com/454182/227696653-b1132ba1-5471-4c6d-9b59-20387389ae12.png">

Inspector active solo selection:
<img width="253" alt="CleanShot 2023-03-24 at 21 45 33@2x" src="https://user-images.githubusercontent.com/454182/227696660-6676acfa-15ab-4ae2-a866-4b7898bc1f52.png">

Animatable with timeline hierarchy value too:
<img width="510" alt="CleanShot 2023-03-24 at 21 46 07@2x" src="https://user-images.githubusercontent.com/454182/227696686-255064c9-43fd-4213-9e3f-9cd46cca9de3.png">

Diffs=
daaf140ba Solos (#5047)
44ef23f7e Text fix variable and opacity (#5017)
3c396d3b8 Text style variation at runtime. (#5014)
2023-03-28 23:39:09 +00:00
94344e123a remove a bunch of generated files
havent really done much to test things work, kinda hoping tests will fail/ windows will stop being able to be built. everything else is an example

Diffs=
41b699beb remove a bunch of generated files (#5002)
c0c8a45ae Reduce github log pollution (#5011)
ccab8df36 Pre-count array sizes in ContourMeasureIter::tryNext (#5010)
f4046e60b Rename reset to rewind. (#5004)
c6caafc24 Import Wang's formula for contour measuring (#5005)
72c5d2084 Port PLS to wasm (#5003)
2023-03-17 18:45:51 +00:00
ae4f4e71dd prepping flutter runtime release
just prepping for a rive-flutter runtime release

Diffs=
ea255ef1b prepping flutter runtime release (#4994)
6e95e7e1f fix up the viewer to progress time even when we miss a frame or two (#4912)
b90ac530a Decompose accounts for 0 scale, adds test. (#4975)
2023-03-13 19:19:49 +00:00
fbe1850620 force blend states to keepGoing
makes blend states keepGoing!

fixes a regression introduced when looking at keep going of states when deciding if to advance them. for blend states specifically mixing is done as well as animating animation instances, and if the mix value changes we need to apply this change.

@luigi-rosso struggled to build state machines into an automated test on the cpp side before. going to add one loading a `.riv` for this I think, at least to cover some basics here.

btw, I assume we also want this behaviour for direct blend states

https://2dimensions.slack.com/archives/CHMAP278R/p1677820699177779

Diffs=
2504d2ab2 force blend states to keepGoing (#4922)
2023-03-03 18:08:36 +00:00
fe57e817f3 Fix negative speeds in state machines
look commit by commit potentially, last couple of commits are running core generator

& its quite a small change code wise, so it'd be good to get feedback on the actual change sooner rather than later

there are at least a couple of changes in there that should make you question if this is a good idea so i expect some feedback.

add to cpp: (i just got it working in the viewer, probably broke some things)
- [x] negative time fix
- [x] combine state speed to determine time for state
- [x] no longer carry spilled time into new advances

add test
- [x] negative time fix to state machines
- [x] negative combined time state fix to state machines
- [ ] no longer carry spilled time into new advances @luigi-rosso i tried adding tests for this, but i was not really able to construct a state machine instance (with an animations, an animation state and the right transition) in tests I had to add a bunch of public methods all over the place, can you show me the way? probably not a blocker for merging this)

apply changes to rive_flutter
- [x] run script (ran both core generator and core generator runtime, the runtime one wanted to remove a load of comments so i didnt let those bits be committed. but still.. annoying)

Diffs=
bc6c6f467 Fix negative speeds in state machines (#4887)
040a27c1c Generate Android builds directly from premake (#4871)
12285f625 Put SIMD perf warnings behind a flag (#4861)
157a399d2 update id in code (#4855)
2023-02-28 11:53:47 +00:00
236ae26640 Speed 4793
adds speed on states!

currently just to animation states 👇
<img width="1121" alt="image" src="https://user-images.githubusercontent.com/1216025/217915050-0bea976f-88b1-4aef-aeb0-bed6f36cc577.png">

I've called this 'AdvanceableState', which we could make blendstates/etc inherit from to give em the powers... not sure if there's a better name people can come up with here... also not sure if that empty lookin' class is the right way to do it, so i'd love feedback on that (and if there's a different example somewhere that would be super helpful to see as well)

also fixed up the generator scripts for dart 3, at least the dart ones, the cpp ones were beyond my patience, gotta dart 2.12 for those...

also fixed an issue where we were checking speed against playing backwards, not speed and direction!

@alxgibsn going to bug you for some styling input

works in both editor and viewer!

going to look about adding a test.. or two....

https://user-images.githubusercontent.com/1216025/217915843-6126d3cf-bf19-4a9d-9a95-adb3a498e75d.mov

https://user-images.githubusercontent.com/1216025/217915852-252d4f78-280e-4a63-838c-39d6b27e3e31.mov

Diffs=
ffeb9afaf Speed 4793 (#4806)
2023-02-16 10:29:00 +00:00
27be816a46 Update flutter runtime
- ran ```dev/generate_core_runtime.sh build```
- cleaned up a lot of accumulated changes from the last few months that needed to be stripped/modified for the rutnime
- removed no longer supported lining options from analysis files
- fixed up defs for some editor only features so they don't transpile
- added some more details to changelog
- bumped pubspec version

Diffs=
aa8c750bd Update flutter runtime (#4835)
2023-02-15 23:47:35 +00:00
3941b7e932 Update ObjC formatting to look more similar to the C++
Also update the auto formatter to run on *.m and *.mm files, and effectively ban breaking on return types entirely, as I think this is ugly.

Diffs=
c7d125c7d Update ObjC formatting to look more similar to the C++
2023-02-15 17:24:54 +00:00
00798ca173 Perf/flutter runtime opacity check
- Adds checks to see if a drawable has a 0% opacity before performing draw commands
- Add skinning example

Diffs=
a61f4c6b5 apply changes to rive_core
8152b8a02 docs: update CHANGELOG
b8f61022c perf: check if opacity is 0 before drawing
4c4826e67 chore: add typedef argument names
ff94982f9 docs: add skinning sample
f1ddd88d4 Fix artboard pieces slowly popping in. (#4818)
3039909c2 Update to using deployment workflow similar to ios
53a8f9517 Fix direction when looping. (#4786)
4c5a576ad Fix ping pong hang (#4776)
ae1e02afc Fix tess test linking (#4773)
4ecbf9321 Fix remap based on issue JC caught. (#4771)
89e38b700 allow negative speed (#4770)
4d115b4c6 Adding GLSL100 for tess renderer. (#4767)
31a3972aa ios shaders for tess (#4765)
686e5125b Add dependency to correct grand parent for linear gradients. (#4753)
e737ee427 Revert "Update to using deployment workflow similar to ios"
de0e57d55 Update to using deployment workflow similar to ios
051769242 Runtime Text! (#4741)
331ad0d55 Build cleanups
2538229d6 Use Rive's libpng premake dependency in golden testing
42a0377bc Fix condition with trim paths where all contours are 0 length. (#4722)
ea1c83d02 Use os.copyfile() instead of the '{COPY}' command
5c03e1640 Remove forcing arch to arm64 for libpng (#4715)
404a04d35 Cleaning up libpng premake to be isolated/stand-alone. (#4713)
2023-02-13 18:13:08 +00:00
61df92e56f Publishing rive-app/flutter-wasm
Allows the editor to load it from unpkg.

Diffs=
a82894157 Publishing rive-app/flutter-wasm (#4693)
599748ccb Variable Fonts! (#4686)
2023-01-19 00:42:07 +00:00
9d2fe267da Published rive_flutter 0.10.1
Some minor updates that I made when publishing 0.10.1

Diffs=
f39fc2bb8 Published rive_flutter 0.10.1 (#4657)
2023-01-11 21:54:05 +00:00
0767844a56 style: updated example and readme
Diffs=
a259b57b2 style: clean up example app
483978f10 docs: update readme
2023-01-11 21:04:30 +00:00