Skip to content

Commit c911f41

Browse files
committed
Squashed commit of the following:
commit 9ff2b94 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Nov 20 16:38:28 2019 -0800 Fixing gradient transformations for shapes with transformAffectsStroke set to true. commit 1e88ddf Merge: c7758eb 17f73ec Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Mon Nov 18 16:32:28 2019 -0800 Merge branch 'master' of https://github.com/2d-inc/Flare-Flutter commit c7758eb Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Mon Nov 18 16:32:23 2019 -0800 Fixing FlareControls. commit 17f73ec Author: Umberto Sonnino <rimher@gmail.com> Date: Fri Nov 15 11:09:51 2019 +0000 Update README with latest version commit c9f4341 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Thu Nov 7 15:05:04 2019 -0800 Backing out changeImageFromNetwork. Issue #183 commit e9712a4 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Thu Nov 7 12:32:17 2019 -0800 Bumping versions. commit 366cdc0 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Thu Nov 7 12:27:53 2019 -0800 Adding support for runtime image swapping, requires marking image nodes as isDynamic in Flare. Issue #183. commit 53a7c65 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Nov 6 17:30:42 2019 -0800 Updating flare_flutter version. commit b391dd4 Merge: 1e9b22e 9ec074b Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Nov 6 17:28:34 2019 -0800 Merge branch 'warmth_fix' commit 9ec074b Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Nov 6 15:43:31 2019 -0800 Call setState if mounted. commit c66ac64 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Nov 6 15:38:06 2019 -0800 Addressing an issue found in #177 with FlareCacheBuilder setting state when widget is no longer mounted. commit 1e9b22e Author: Umberto Sonnino <rimher@gmail.com> Date: Wed Nov 6 19:02:25 2019 +0100 Init mat before inverting commit bc07b87 Author: Umberto Sonnino <rimher@gmail.com> Date: Wed Nov 6 19:00:13 2019 +0100 Remove local flare_dart from examples pubspec #184 commit e1cca7c Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 29 12:50:30 2019 -0700 Bumping versions, merging optimal_load branch, and persisting settings in checkbox example. commit 55cae39 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 29 12:41:43 2019 -0700 Copy transform affects stroke properly when instancing shapes. commit 43716dd Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Mon Oct 28 12:52:09 2019 -0700 Prevent coldLoad (async) from happening when widget isn’t ready to load. commit 506837e Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Fri Oct 25 13:00:56 2019 -0700 Improving loading. commit 9ee95b9 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Fri Oct 25 10:42:42 2019 -0700 Make sure overrideColor is set even when drawableNodes is null. commit 7d59de1 Author: Umberto Sonnino <rimher@gmail.com> Date: Fri Oct 25 13:15:34 2019 +0100 Move null check commit 528af53 Author: Umberto Sonnino <rimher@gmail.com> Date: Fri Oct 25 13:10:17 2019 +0100 Insert null checks for artboards with no drawables #178 commit 33f23a7 Author: Umberto Sonnino <rimher@gmail.com> Date: Fri Oct 25 12:16:16 2019 +0100 Remove GradientColor override of ActorPaint opacity getter #179 commit 59ba2f0 Author: Umberto Sonnino <rimher@gmail.com> Date: Thu Oct 24 09:31:41 2019 +0100 Document the `actor_animatino.apply()` function commit d77438f Author: Umberto Sonnino <rimher@gmail.com> Date: Thu Oct 24 09:31:10 2019 +0100 Fix division by 0 on transform constraint commit f0cf988 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Fri Oct 11 12:59:13 2019 -0700 Fix reading of JSON clip values. Issue #172 commit a7796e0 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Fri Oct 11 12:39:48 2019 -0700 Mitigating issue #172. commit 373c14a Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Oct 9 14:21:47 2019 -0700 Fixing issue with image clipping. commit ae1c901 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Oct 9 11:19:16 2019 -0700 Fix merge bugs. commit d8cb780 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Wed Oct 9 11:09:42 2019 -0700 Adding support for difference clipping. commit bf99a76 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 8 19:07:26 2019 -0700 Matching stable version commit 9becc74 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 8 13:58:11 2019 -0700 Bumping flare_dart to 2.0 due to breaking changes. commit 0a292cc Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 8 13:39:57 2019 -0700 Bumping versions and changelogs. commit 431a98e Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 8 13:35:26 2019 -0700 Fixing up analysis issues for #169 commit 72fb6fc Merge: 4d00202 dc68dea Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 8 13:02:17 2019 -0700 Merge branch 'master' of https://github.com/2d-inc/Flare-Flutter commit 4d00202 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Tue Oct 8 13:02:11 2019 -0700 Cleaning up analysis issues. commit dc68dea Merge: 5ca8d49 f1d9749 Author: Luigi Rosso <luigi-rosso@users.noreply.github.com> Date: Tue Oct 8 11:06:53 2019 -0700 Merge pull request #168 from mehmetf/master Escalate the severity of unused imports in analyzer commit f1d9749 Author: Mehmet Fidanboylu <mehmetf@google.com> Date: Tue Oct 8 10:20:58 2019 -0700 Do the same changes to flare_dart commit 64f395e Author: Mehmet Fidanboylu <mehmetf@google.com> Date: Tue Oct 8 10:17:51 2019 -0700 Escalate the severity of unused imports in analyzer commit 5ca8d49 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Mon Oct 7 11:22:38 2019 -0700 Bumping versions and changelog. commit 874ce8e Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Mon Oct 7 11:20:28 2019 -0700 Adding support for nodes inside of shapes. commit 4d06431 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Fri Oct 4 18:06:09 2019 -0700 Introducing FlareTesting.setup(); commit 2c5f420 Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Fri Oct 4 13:44:25 2019 -0700 Clamping trim start/end. commit daba34d Author: Luigi Rosso <luigi.rosso@gmail.com> Date: Mon Sep 30 21:21:55 2019 +0200 Cherry picking critical lints from #1 63 and updating for pub.
1 parent 8fcd773 commit c911f41

File tree

7 files changed

+26
-33
lines changed

7 files changed

+26
-33
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repository has three primary branches:
1212
- This is the branch we publish to pub from.
1313
- This branch and the associated pub packages are guaranteed to work on the flutter stable channel.
1414
```
15-
flare_flutter: ^1.5.4
15+
flare_flutter: ^1.7.1
1616
```
1717
- dev
1818
- This branch has the latest changes should work with the flutter dev channel.

flare_dart/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [2.2.5] - 2019-11-20 16:36:24
2+
3+
- Fixed gradient transformations for shapes with transformAffectsStroke set to true.
4+
15
## [2.2.4] - 2019-11-07 12:14:49
26

37
- Adding support for ActorImage.isDynamic which allows Flare to pacakge source UV coordinates for the image such that it can be swapped at runtime. This requires re-exporting files from Flare after marking the image as dynamic in the Flare UI.

flare_dart/lib/actor_color.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ abstract class ActorColor extends ActorPaint {
105105

106106
@override
107107
void onDirty(int dirt) {}
108-
108+
109109
@override
110110
void update(int dirt) {}
111111
}
@@ -304,8 +304,13 @@ abstract class GradientColor extends ActorPaint {
304304
void update(int dirt) {
305305
ActorShape shape = parent as ActorShape;
306306
Mat2D world = shape.worldTransform;
307-
Vec2D.transformMat2D(_renderStart, _start, world);
308-
Vec2D.transformMat2D(_renderEnd, _end, world);
307+
if (shape.transformAffectsStroke) {
308+
Vec2D.copy(_renderStart, _start);
309+
Vec2D.copy(_renderEnd, _end);
310+
} else {
311+
Vec2D.transformMat2D(_renderStart, _start, world);
312+
Vec2D.transformMat2D(_renderEnd, _end, world);
313+
}
309314
}
310315
}
311316

flare_dart/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flare_dart
22
description: Vector design and runtime animation.
3-
version: 2.2.4
3+
version: 2.2.5
44
author: "2Dimensions Team <info@2dimensions.com>"
55
homepage: https://github.com/2d-inc/Flare-Flutter
66
environment:

flare_flutter/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [1.7.3] - 2019-11-20 16:37:18
2+
3+
- Fixed gradient transformations for shapes with transformAffectsStroke set to true.
4+
5+
## [1.7.2] - 2019-11-18 16:30:39
6+
7+
- Fixing FlareControls to allow for completing layered animations. FlareControls would previously remove an animation once another one played after it had fully mixed in. This would cause popping when animations didn't touch the exact same keyframes.
8+
19
## [1.7.1] - 2019-11-07 15:03:39
210

311
- Backing out changeImageFromNetwork until new PaintingBinding.instance.instantiateImageCodec signature lands in stable.

flare_flutter/lib/flare_controls.dart

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,18 @@ class FlareControls extends FlareController {
5757
/// the [onCompleted()] callback will be triggered.
5858
@override
5959
bool advance(FlutterActorArtboard artboard, double elapsed) {
60-
int lastFullyMixed = -1;
61-
double lastMix = 0.0;
62-
6360
/// List of completed animations during this frame.
6461
List<FlareAnimationLayer> completed = [];
6562

6663
/// This loop will mix all the currently active animation layers so that,
6764
/// if an animation is played on top of the current one, it'll smoothly mix
68-
/// between the two instead of immediately switching to the new one.
65+
/// between the two instead of immediately switching to the new one.
6966
for (int i = 0; i < _animationLayers.length; i++) {
7067
FlareAnimationLayer layer = _animationLayers[i];
7168
layer.mix += elapsed;
7269
layer.time += elapsed;
7370

74-
lastMix = (_mixSeconds == null || _mixSeconds == 0.0)
71+
double mix = (_mixSeconds == null || _mixSeconds == 0.0)
7572
? 1.0
7673
: min(1.0, layer.mix / _mixSeconds);
7774

@@ -81,35 +78,14 @@ class FlareControls extends FlareController {
8178
}
8279

8380
/// Apply the animation with the current mix.
84-
layer.animation.apply(layer.time, _artboard, lastMix);
85-
86-
/// Update [lastFullyMixed] with the range of fully
87-
/// mixed animation layers.
88-
if (lastMix == 1.0) {
89-
lastFullyMixed = i;
90-
}
81+
layer.animation.apply(layer.time, _artboard, mix);
9182

9283
/// Add (non-looping) finished animations to the list.
9384
if (layer.time > layer.animation.duration) {
9485
completed.add(layer);
9586
}
9687
}
9788

98-
/// Removes the last fully mixed animation, if more than one animation is
99-
/// present. If only one animation is playing (e.g. idle), nothing happens.
100-
/// Since animations are added to the end of [_animationLayers],
101-
/// everything before the last fully mixed animation can be
102-
/// assumed to be also fully mixed too.
103-
if (lastFullyMixed != -1) {
104-
_animationLayers.removeRange(0, lastFullyMixed);
105-
}
106-
if (_animationName == null &&
107-
_animationLayers.length == 1 &&
108-
lastMix == 1.0) {
109-
/// Remove remaining animations.
110-
_animationLayers.removeAt(0);
111-
}
112-
11389
/// Notify of the completed animations.
11490
for (final FlareAnimationLayer animation in completed) {
11591
_animationLayers.remove(animation);

flare_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flare_flutter
22
description: Vector design and runtime animation for Flutter.
3-
version: 1.7.1
3+
version: 1.7.3
44
author: "2Dimensions Team <info@2dimensions.com>"
55
homepage: https://github.com/2d-inc/Flare-Flutter
66
environment:

0 commit comments

Comments
 (0)