Skip to content

Commit

Permalink
chore: release rive_flutter 0.13.15 and rive_common 0.4.12
Browse files Browse the repository at this point in the history
An attempt to release a new rive-common for the recent audio fixes. All the other recent text changes are kinda blocking an easy update here. I temporarily removed some functionality with the intension to add it back tomorrow in a bigger effort to support the new text properties for the Flutter runtime.

@luigi-rosso I did not include these files generated from the publishing script:
- packages/editor/web/rive_text.wasm
- packages/editor/web/rive_text.js

As I understand they are now created by rive_native?

----------

**Edit:** I also added the needed Text changes to support the new alignment, wrap, and fit.

Video comparing the Editor and Flutter for various text scenarios.

https://github.com/user-attachments/assets/807fb698-25d5-4fda-b33e-df93e555015c

Diffs=
80da365913 chore: release rive_flutter 0.13.15 and rive_common 0.4.12 (#8357)
d1372c444f use worldBounds for hittesting (#8361)
2be44a0f45 Deterministic lite rtti (#8349)
054e3c5b73 audio engine: fix order of uninit of context and engine (#8350)
a1484308fa reset effects when path changes (#8347)
f01d62e126 Add a clockwise fill experiment (#8345)
7ee1c7777f Batch interior triangulation draws (#8328)
9d5076b883 Fix layout animation runtime (#8340)
638ee6434e Make layout position type and scale type keyable (#8316)
0f805654cf Improve batching for interior triangulation draws (#8327)
4e8c555722 Unreal Runtime into Mono  (#8318)
50dfc9ee9a Fix runtime joystick with layout position (#8323)
e582b41aaa add bones and joystick bindable properties (#8322)
272db8c3af fix missing data bind path crash (#8321)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
  • Loading branch information
HayesGordon and HayesGordon committed Oct 18, 2024
1 parent b4bfa2d commit 9abe92b
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e52e9fff2973ce63a689e9d11ea283214109ca18
80da365913302db2a303def22846d02b35a4eab8
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.13.15

- Fix audio crashing iOS
- Add new text resizing and layout features. Resolves [422](https://github.com/rive-app/rive-flutter/issues/422).

## 0.13.14

- Reduce audio polling and unneeded runtime calculations around audio. Resolves issue [411](https://github.com/rive-app/rive-flutter/issues/411)
Expand Down
26 changes: 26 additions & 0 deletions lib/src/generated/rive_core_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2308,6 +2308,16 @@ class RiveCoreContext {
object.originValue = value;
}
break;
case TextBase.wrapValuePropertyKey:
if (object is TextBase && value is int) {
object.wrapValue = value;
}
break;
case TextBase.verticalAlignValuePropertyKey:
if (object is TextBase && value is int) {
object.verticalAlignValue = value;
}
break;
case TextValueRunBase.styleIdPropertyKey:
if (object is TextValueRunBase && value is int) {
object.styleId = value;
Expand Down Expand Up @@ -2563,6 +2573,8 @@ class RiveCoreContext {
case TextBase.sizingValuePropertyKey:
case TextBase.overflowValuePropertyKey:
case TextBase.originValuePropertyKey:
case TextBase.wrapValuePropertyKey:
case TextBase.verticalAlignValuePropertyKey:
case TextValueRunBase.styleIdPropertyKey:
case FileAssetBase.assetIdPropertyKey:
case AudioEventBase.assetIdPropertyKey:
Expand Down Expand Up @@ -3151,6 +3163,10 @@ class RiveCoreContext {
return (object as TextBase).overflowValue;
case TextBase.originValuePropertyKey:
return (object as TextBase).originValue;
case TextBase.wrapValuePropertyKey:
return (object as TextBase).wrapValue;
case TextBase.verticalAlignValuePropertyKey:
return (object as TextBase).verticalAlignValue;
case TextValueRunBase.styleIdPropertyKey:
return (object as TextValueRunBase).styleId;
case FileAssetBase.assetIdPropertyKey:
Expand Down Expand Up @@ -4482,6 +4498,16 @@ class RiveCoreContext {
object.originValue = value;
}
break;
case TextBase.wrapValuePropertyKey:
if (object is TextBase) {
object.wrapValue = value;
}
break;
case TextBase.verticalAlignValuePropertyKey:
if (object is TextBase) {
object.verticalAlignValue = value;
}
break;
case TextValueRunBase.styleIdPropertyKey:
if (object is TextValueRunBase) {
object.styleId = value;
Expand Down
51 changes: 50 additions & 1 deletion lib/src/generated/text/text_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ abstract class TextBase extends Drawable {
static const int overflowValueInitialValue = 0;
int _overflowValue = overflowValueInitialValue;

/// One of visible, hidden, clipped, ellipsis.
/// One of visible, hidden, clipped, ellipsis, fit.
int get overflowValue => _overflowValue;

/// Change the [_overflowValue] field value.
Expand Down Expand Up @@ -238,6 +238,53 @@ abstract class TextBase extends Drawable {

void originValueChanged(int from, int to);

/// --------------------------------------------------------------------------
/// WrapValue field with key 683.
static const int wrapValuePropertyKey = 683;
static const int wrapValueInitialValue = 0;
int _wrapValue = wrapValueInitialValue;

/// One of wrap, no-wrap
int get wrapValue => _wrapValue;

/// Change the [_wrapValue] field value.
/// [wrapValueChanged] will be invoked only if the field's value has changed.
set wrapValue(int value) {
if (_wrapValue == value) {
return;
}
int from = _wrapValue;
_wrapValue = value;
if (hasValidated) {
wrapValueChanged(from, value);
}
}

void wrapValueChanged(int from, int to);

/// --------------------------------------------------------------------------
/// VerticalAlignValue field with key 685.
static const int verticalAlignValuePropertyKey = 685;
static const int verticalAlignValueInitialValue = 0;
int _verticalAlignValue = verticalAlignValueInitialValue;
int get verticalAlignValue => _verticalAlignValue;

/// Change the [_verticalAlignValue] field value.
/// [verticalAlignValueChanged] will be invoked only if the field's value has
/// changed.
set verticalAlignValue(int value) {
if (_verticalAlignValue == value) {
return;
}
int from = _verticalAlignValue;
_verticalAlignValue = value;
if (hasValidated) {
verticalAlignValueChanged(from, value);
}
}

void verticalAlignValueChanged(int from, int to);

@override
void copy(Core source) {
super.copy(source);
Expand All @@ -251,6 +298,8 @@ abstract class TextBase extends Drawable {
_originY = source._originY;
_paragraphSpacing = source._paragraphSpacing;
_originValue = source._originValue;
_wrapValue = source._wrapValue;
_verticalAlignValue = source._verticalAlignValue;
}
}
}
Loading

0 comments on commit 9abe92b

Please sign in to comment.