104 Commits

Author SHA1 Message Date
af6e7d4c07 rive_common package
I started adding Text features to rive_core and realized that the dependency structure is going to be very difficult to manage here. Here's why:

## rive_core
 - has most of the runtime logic for things like IK, mesh, shapes, etc

## rive_flutter
 - depends on rive_core (not directly but we transpile rive_core to rive_flutter)
 - also includes the FFI/WASM text runtime

The problem is that rive_core needs the FFI/WASM text runtime. So we have a cyclic dependency. We've dealt with something similar (not quite as extreme) by abstracting things like nested artboards, but it gets very complex for a verbose API like the text one.

## rive_common
What this PR does is reworks a lot of shared logic like Math (Vec2D, Mat2D, etc), low-level text runtime (FFI/WASM), etc into a "rive_common" package. We've had shared packages before but none that have been shared by rive_flutter and rive_editor. I think it's finally time to bite the bullet here.

This will make it much easier to work through some of the obtuse abstraction patterns we've had to do to disambiguate if you're using a Vec2D from the runtime or the editor, for example.

Yes, this means we'll only have one set of math classes, one set of binary writer/readers, etc. I only did the bare minimum necessary to move text into rive_common in this first pass but we can do more as we go forward.

## TODO:
- [x] move Text WASM & FFI to rive_common
- [x] move Math used by text (Mat2D, Vec2D, TransformComponents, PathInterface, etc) to rive_common
- [x] move utilities used by text (binary reader/writer) to rive_common
- [x] fix core_generator and core_generator_runtime
- [x] fix github actions to use new paths
- [x] publish rive_common to pub.dev and unlist it

Diffs=
12c6ee130 rive_common package (#4434)
5a24e63d0 Initialize isClosed on TessRenderPath (#4431)
2022-11-19 20:19:05 +00:00
e618def5cd Text
Uses it in the artboard title but also updates the flutter runtime massively to support FFI & WASM C++ Rive Text. PRing to let the tests run.

Diffs=
3be5ff0d8 Text (#4372)
90245a5e1 Fix the Android debug build
0a0f3c267 Fix for missing animation in a blend state. (#4415)
440512dca Add simd::if_then_else (#4403)
ec9fb5bfc Revert "Update SIMD booleans to use bitwise logic operators"
701d8dee2 Update SIMD booleans to use bitwise logic operators
e98b93a61 Add SIMD fallbacks for missing builtins
466f68e3a Add some more core math and SIMD functions
2022-11-15 23:07:11 +00:00
6d229dcdd9 add simple test & an example showing selection of different rive files 2022-08-26 18:16:13 +01:00
ef8e8d63f5 cleanup for publish 2022-06-14 09:08:05 -07:00
b04b4a6469 Add missing lightswitch asset 2022-05-23 10:52:36 -04:00
fef6090e78 Cleanup based on previous PR 2022-05-18 11:15:37 -07:00
338d739bf7 Add a Listener to the RiveAnimation widget when a StateMachineController has events. 2022-05-18 11:15:37 -07:00
cfc5a5d10e Upgrade Android Flutter app to work with newer version 2022-05-16 15:30:16 +01:00
a2af8190e7 Prepping for assets release. 2021-12-22 10:37:32 -08:00
efdd943f39 Ran generator for constraints. 2021-07-13 17:41:43 -07:00
84d99621c9 Adds onStateChange callback 2021-06-21 14:34:56 -07:00
794bb90147 Adds artboard parameter to onInit callback 2021-06-18 11:02:53 -07:00
a8e27e3ef8 Simplifies simple controller 2021-06-14 17:18:29 -07:00
e22b403ee2 Adds custom controller for speed example 2021-06-14 16:18:39 -07:00
bf863bfa8d Fixes typo 2021-06-14 16:07:22 -07:00
941a2aa922 Updates docs 2021-06-14 15:49:01 -07:00
dddb78b62f Adds one-shot animation controller 2021-06-14 14:41:10 -07:00
93557a8557 Updates RiveAnimation with custom controllers 2021-06-14 12:25:07 -07:00
7d82d06c79 WIP on simplifying controller use 2021-06-11 18:45:57 -07:00
2102322937 Tweak example, bump version 2021-06-11 17:19:10 -07:00
ec8002ea05 Exposes antialiasing option in Rive and RiveAnimation 2021-06-11 13:49:03 -07:00
8d80ad2de8 Bump version and update docs 2021-06-10 13:18:49 -07:00
e8d9f59947 Getting instancing working. 2021-05-31 12:17:02 -07:00
1d54191031 Adds high level RiveAnimation widget 2021-05-27 17:37:54 -07:00
37adf790ee Blend states! 2021-05-07 19:41:50 -07:00
2851203e67 Improving state machine api and including more examples. 2021-04-12 16:57:40 -07:00
55d7996026 Fixing example. 2021-04-11 09:28:46 -07:00
1c7bccc36c Adding exit time to state machine. 2021-03-31 16:16:15 -07:00
88541f1596 More nnbd work 2021-03-22 21:29:26 -07:00
33ad1c9ac8 Working on nnbd. 2021-03-22 14:49:42 -07:00
462faf20ff Adding ability to control state machine. 2021-03-11 20:21:35 -08:00
8244e70151 Fixing resolve for format_7 2021-03-05 16:54:23 -08:00
a152b940bf Prepping for publish 0.6.6. 2021-01-18 17:01:00 -08:00
8e73700909 Fixes missing asset in example 2020-12-07 12:42:45 -08:00
39eddb4fd6 Preparing for pub 2020-11-17 16:04:42 -08:00
0089f7d55c Merging master 2020-11-10 18:55:46 -08:00
a13be5f2e2 Adds artboardByName to RiveFile and tests 2020-11-10 18:52:16 -08:00
d0df759001 Updated example and readme 2020-11-10 14:46:53 -08:00
2e4a8ace85 Fixes #15 and preps for publish. 2020-10-02 15:56:43 -07:00
97286a4442 Bumping to 0.6.1 to match WASM. 2020-09-30 12:22:50 -07:00
5bd55da4fc Bumping runtime version and murdering fractional. 2020-09-28 16:56:53 -07:00
317f9ca68d Adding new clipping. 2020-09-22 15:54:53 -07:00
c15236d7fc Adding trim path support. 2020-08-28 18:27:54 -07:00
a02607dd89 Adding support for bones! 2020-08-26 18:11:23 -07:00
44e4a344b7 Bumping to version 0.0.6. 2020-08-12 18:11:40 -07:00
37f0ac9ada Bumping to version 4 with first cut of bones. 2020-08-12 18:07:02 -07:00
ad784625e3 Updating to latest version of Rive runtime format and prepping for pub.dev release. 2020-07-28 18:48:25 -07:00
c71fa9ecde Invalidate shape less aggressively. 2020-07-21 19:48:48 -07:00
a9ea5f06c5 Updating for pub.dev release. 2020-07-20 10:59:21 -07:00
4cb915605f Revving format to 2 with smaller string encoding. 2020-07-19 18:18:34 -07:00