Browse Source

Merge branch '4.1' into 4.2-beta

# Conflicts:
#	spine-flutter/CHANGELOG.md
#	spine-flutter/pubspec.yaml
Mario Zechner 1 year ago
parent
commit
a6f52313c7
2 changed files with 7 additions and 2 deletions
  1. 4 0
      spine-flutter/CHANGELOG.md
  2. 3 2
      spine-flutter/lib/spine_flutter.dart

+ 4 - 0
spine-flutter/CHANGELOG.md

@@ -7,6 +7,10 @@
 # 4.2.18
 * Fixes compilation errors due to API change in Flutter 3.16.0, see [this issue](https://github.com/EsotericSoftware/spine-runtimes/issues/2420). **Note**: Depending on this version requires your project to depend on Flutter >= 3.16.0 as well.
 
+# 4.1.12
+# FilterQuality for texture atlas pages is now set to medium. It is configurable via `Atlas.filterQuality`. See https://github.com/EsotericSoftware/spine-runtimes/issues/2362
+# Track Entry listeners are now invoked properly, see https://github.com/EsotericSoftware/spine-runtimes/issues/2349
+
 # 4.1.11
 # Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431
 

+ 3 - 2
spine-flutter/lib/spine_flutter.dart

@@ -101,6 +101,7 @@ class Vec2 {
 /// Use the static methods [fromAsset], [fromFile], and [fromHttp] to load an atlas. Call [dispose]
 /// when the atlas is no longer in use to release its resources.
 class Atlas {
+  static FilterQuality filterQuality = FilterQuality.medium;
   final spine_atlas _atlas;
   final List<Image> atlasPages;
   final List<Map<BlendMode, Paint>> atlasPagePaints;
@@ -138,7 +139,7 @@ class Atlas {
         paints[blendMode] = Paint()
           ..shader = ImageShader(image, TileMode.clamp, TileMode.clamp, Matrix4
               .identity()
-              .storage, filterQuality: FilterQuality.high)
+              .storage, filterQuality: Atlas.filterQuality)
           ..isAntiAlias = true
           ..blendMode = blendMode.canvasBlendMode;
       }
@@ -3706,7 +3707,7 @@ class AnimationState {
         final nativeEvent = _bindings.spine_animation_state_events_get_event(_events, i);
         final event = nativeEvent.address == nullptr.address ? null : Event._(nativeEvent);
         if (_trackEntryListeners.containsKey(nativeEntry)) {
-          _trackEntryListeners[entry]?.call(type, entry, event);
+          _trackEntryListeners[nativeEntry]?.call(type, entry, event);
         }
         if (_stateListener != null) {
           _stateListener?.call(type, entry, event);