Merge branch '4.1' into 4.2-beta

# Conflicts:
#	spine-flutter/CHANGELOG.md
#	spine-flutter/example/pubspec.lock
#	spine-flutter/pubspec.yaml
#	spine-unity/Assets/Spine/package.json
This commit is contained in:
Mario Zechner 2024-03-19 16:28:30 +01:00
commit f1052e2906
5 changed files with 87 additions and 58 deletions

View File

@ -1,110 +1,149 @@
# 4.2.22 # 4.2.22
* Fix multiply blend mode, see https://esotericsoftware.com/forum/d/25369-spine-flutter-slot%E6%B7%B7%E5%90%88%E6%A8%A1%E5%BC%8F%E5%90%8Ealpha%E4%B8%A2%E5%A4%B1/2
- Fix multiply blend mode, see https://esotericsoftware.com/forum/d/25369-spine-flutter-slot%E6%B7%B7%E5%90%88%E6%A8%A1%E5%BC%8F%E5%90%8Ealpha%E4%B8%A2%E5%A4%B1/2
# 4.2.21 # 4.2.21
* 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 - 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.2.20 # 4.2.20
* Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431
- Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431
# 4.2.19 # 4.2.19
* Fixes #2412, single bone, translation only IK constraints did not take skeleton scale into account.
- Fixes #2412, single bone, translation only IK constraints did not take skeleton scale into account.
# 4.2.18 # 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.
- 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.14
- Temporary "fix" for https://github.com/EsotericSoftware/spine-runtimes/issues/2479. It appears the canvaskit backend of Flutter has a bug. We currently do not set a `FilterQuality` anymore. The Flutter rendering backend is supposed to pick a good one depending the platform. Users can still set `FilterQuality` globally via `Atlas.filterQuality` as before.
# 4.1.13 # 4.1.13
* Fix multiply blend mode, see https://esotericsoftware.com/forum/d/25369-spine-flutter-slot%E6%B7%B7%E5%90%88%E6%A8%A1%E5%BC%8F%E5%90%8Ealpha%E4%B8%A2%E5%A4%B1/2
- Fix multiply blend mode, see https://esotericsoftware.com/forum/d/25369-spine-flutter-slot%E6%B7%B7%E5%90%88%E6%A8%A1%E5%BC%8F%E5%90%8Ealpha%E4%B8%A2%E5%A4%B1/2
# 4.1.12 # 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 - 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 # 4.1.11
* Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431
- Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431
# 4.1.10 # 4.1.10
* Update WASM binaries
- Update WASM binaries
# 4.1.9 # 4.1.9
*Fixes #2412, single bone, translation only IK constraints did not take skeleton scale into account.
\*Fixes #2412, single bone, translation only IK constraints did not take skeleton scale into account.
# 4.1.8 # 4.1.8
* 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.
- 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.2.17 # 4.2.17
* Fix allocation patter for temporary structs on Windows, which resulted in a hard crash without a stack trace on the native side.
- Fix allocation patter for temporary structs on Windows, which resulted in a hard crash without a stack trace on the native side.
# 4.1.7 # 4.1.7
* Fix allocation patter for temporary structs on Windows, which resulted in a hard crash without a stack trace on the native side.
- Fix allocation patter for temporary structs on Windows, which resulted in a hard crash without a stack trace on the native side.
# 4.2.16 # 4.2.16
* Fixed bug in path handling on Windows.
- Fixed bug in path handling on Windows.
# 4.1.6 # 4.1.6
* Fixed bug in path handling on Windows.
- Fixed bug in path handling on Windows.
# 4.2.15 # 4.2.15
* Updated http dependency to 1.1.0
- Updated http dependency to 1.1.0
# 4.1.5 # 4.1.5
* Updated http dependency to 1.1.0
- Updated http dependency to 1.1.0
# 4.2.14 # 4.2.14
* Merge changes from 4.1.4.
- Merge changes from 4.1.4.
# 4.1.4 # 4.1.4
* Fixes for WASM/web builds.
- Fixes for WASM/web builds.
# 4.2.13 # 4.2.13
* Fixes for Impeller.
- Fixes for Impeller.
# 4.1.3 # 4.1.3
* Fixes for Impeller.
- Fixes for Impeller.
# 4.2.12 # 4.2.12
* Merge changes from 4.1.1 and 4.1.2.
- Merge changes from 4.1.1 and 4.1.2.
# 4.1.2 # 4.1.2
* API documentation and minor cosmetics.
- API documentation and minor cosmetics.
# 4.1.1 # 4.1.1
* Backport to 4.1 spine-runtimes branch.
* Blend mode support. - Backport to 4.1 spine-runtimes branch.
* Hot-reload support. The underlying `SkeletonDrawable` will be retained if the asset file names and type provided to the `SpineWidget` constructor has not changed. - Blend mode support.
- Hot-reload support. The underlying `SkeletonDrawable` will be retained if the asset file names and type provided to the `SpineWidget` constructor has not changed.
# 4.2.11 # 4.2.11
* Update README.md with setup and development instructions.
- Update README.md with setup and development instructions.
# 4.2.10 # 4.2.10
* Update README.md to point to Junji's Dart-only Spine runtime.
- Update README.md to point to Junji's Dart-only Spine runtime.
# 4.2.9 # 4.2.9
* Fix atlas parsing.
- Fix atlas parsing.
# 4.2.8 # 4.2.8
* Change reversed positional argument order in `SpineWidget` constructors.
- Change reversed positional argument order in `SpineWidget` constructors.
# 4.2.7 # 4.2.7
* Change package name from `esotericsoftware_spine_flutter` to `spine_flutter`.
- Change package name from `esotericsoftware_spine_flutter` to `spine_flutter`.
# 4.2.6 # 4.2.6
* Fix analyzer errors, fix code style to adhere to Dart standards.
- Fix analyzer errors, fix code style to adhere to Dart standards.
# 4.2.5 # 4.2.5
* Implemented batching of render commands, reducing the number of draw calls. 60/120fps for 100 Spineboys on all platforms.
- Implemented batching of render commands, reducing the number of draw calls. 60/120fps for 100 Spineboys on all platforms.
# 0.0.4 # 0.0.4
* Clean-up `fromAsset()` factory methods so the atlas comes before skeleton data file name.
* Rename `Vector2` to `Vec2`. - Clean-up `fromAsset()` factory methods so the atlas comes before skeleton data file name.
* Make the bundle configurable in `SpineWidget.asset()`. - Rename `Vector2` to `Vec2`.
- Make the bundle configurable in `SpineWidget.asset()`.
# 0.0.3 # 0.0.3
* Lower macOS deployment target to 10.11.
- Lower macOS deployment target to 10.11.
# 0.0.2 # 0.0.2
* Fix package name in build system `spine_flutter` > `esotericsoftware_spine_flutter`.
- Fix package name in build system `spine_flutter` > `esotericsoftware_spine_flutter`.
# 0.0.1 # 0.0.1
Initial test release. Initial test release.

View File

@ -53,10 +53,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flame name: flame
sha256: b6bb76224fc29fd5eea25d66cda6e322e3678bdedc1f65956c6151326a6a798b sha256: "2a2352741500ce47823dcf212f06b23e9bdb622454eab90244ee6da58e23b488"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.1" version: "1.15.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter

View File

@ -101,7 +101,7 @@ class Vec2 {
/// Use the static methods [fromAsset], [fromFile], and [fromHttp] to load an atlas. Call [dispose] /// 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. /// when the atlas is no longer in use to release its resources.
class Atlas { class Atlas {
static FilterQuality filterQuality = FilterQuality.medium; static FilterQuality filterQuality = FilterQuality.none;
final spine_atlas _atlas; final spine_atlas _atlas;
final List<Image> atlasPages; final List<Image> atlasPages;
final List<Map<BlendMode, Paint>> atlasPagePaints; final List<Map<BlendMode, Paint>> atlasPagePaints;
@ -183,11 +183,7 @@ class Atlas {
for (final image in atlasPages) { for (final image in atlasPages) {
image.dispose(); image.dispose();
} }
for (final map in atlasPagePaints) { atlasPagePaints.clear();
map.values.forEach((element) {
element.shader?.dispose();
});
}
} }
} }

View File

@ -1,6 +1,6 @@
name: spine_flutter name: spine_flutter
description: The official Spine Flutter Runtime to load, display and interact with Spine animations. description: The official Spine Flutter Runtime to load, display and interact with Spine animations.
version: 4.2.22 version: 4.1.14
homepage: https://esotericsoftware.com homepage: https://esotericsoftware.com
repository: https://github.com/esotericsoftware/spine-runtimes repository: https://github.com/esotericsoftware/spine-runtimes
issue_tracker: https://github.com/esotericsoftware/spine-runtimes/issues issue_tracker: https://github.com/esotericsoftware/spine-runtimes/issues

View File

@ -121,7 +121,6 @@ namespace Spine.Unity {
public bool updateSeparatorPartScale = false; public bool updateSeparatorPartScale = false;
private bool wasUpdatedAfterInit = true; private bool wasUpdatedAfterInit = true;
private bool requiresInstructionUpate = true;
private Texture baseTexture = null; private Texture baseTexture = null;
#if UNITY_EDITOR #if UNITY_EDITOR
@ -315,7 +314,7 @@ namespace Spine.Unity {
if (!this.IsValid) return; if (!this.IsValid) return;
if (canvasRenderer.cull) return; if (canvasRenderer.cull) return;
if (update == CanvasUpdate.PreRender) { if (update == CanvasUpdate.PreRender) {
if (requiresInstructionUpate) PrepareInstructionsAndRenderers(isInRebuild: true); PrepareInstructionsAndRenderers(isInRebuild: true);
UpdateMeshToInstructions(); UpdateMeshToInstructions();
} }
if (allowMultipleCanvasRenderers) canvasRenderer.Clear(); if (allowMultipleCanvasRenderers) canvasRenderer.Clear();
@ -478,9 +477,7 @@ namespace Spine.Unity {
if (updateTiming == UpdateTiming.InLateUpdate) if (updateTiming == UpdateTiming.InLateUpdate)
Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime); Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
PrepareInstructionsAndRenderers(); UpdateMesh();
SetVerticesDirty(); // triggers Rebuild and avoids potential double-update in a single frame
} }
protected void OnCullStateChanged (bool culled) { protected void OnCullStateChanged (bool culled) {
@ -527,11 +524,9 @@ namespace Spine.Unity {
public Skeleton Skeleton { public Skeleton Skeleton {
get { get {
Initialize(false); Initialize(false);
requiresInstructionUpate = true;
return skeleton; return skeleton;
} }
set { set {
requiresInstructionUpate = true;
skeleton = value; skeleton = value;
} }
} }
@ -850,7 +845,6 @@ namespace Spine.Unity {
} }
public void PrepareInstructionsAndRenderers (bool isInRebuild = false) { public void PrepareInstructionsAndRenderers (bool isInRebuild = false) {
requiresInstructionUpate = false;
if (!this.allowMultipleCanvasRenderers) { if (!this.allowMultipleCanvasRenderers) {
MeshGenerator.GenerateSingleSubmeshInstruction(currentInstructions, skeleton, null); MeshGenerator.GenerateSingleSubmeshInstruction(currentInstructions, skeleton, null);
if (canvasRenderers.Count > 0) if (canvasRenderers.Count > 0)