From 714edf501cb9d2b8b08f9b116dc408a53f1cd63a Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 6 Mar 2023 11:43:14 +0100 Subject: [PATCH 1/9] [flutter] Implement blend modes, see #2200 --- spine-flutter/example/pubspec.lock | 18 +++++++------- spine-flutter/lib/spine_flutter.dart | 35 ++++++++++++++++++---------- spine-flutter/lib/spine_widget.dart | 5 +--- spine-flutter/pubspec.yaml | 4 ++-- 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/spine-flutter/example/pubspec.lock b/spine-flutter/example/pubspec.lock index 88b012f80..394459f77 100644 --- a/spine-flutter/example/pubspec.lock +++ b/spine-flutter/example/pubspec.lock @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" crypto: dependency: transitive description: @@ -98,10 +98,10 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" lints: dependency: transitive description: @@ -122,10 +122,10 @@ packages: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" ordered_set: dependency: transitive description: @@ -169,7 +169,7 @@ packages: path: ".." relative: true source: path - version: "4.2.11" + version: "4.2.12" string_scanner: dependency: transitive description: @@ -211,5 +211,5 @@ packages: source: hosted version: "0.7.4" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.7.3" + dart: ">=2.19.0 <4.0.0" + flutter: ">=3.7.6" diff --git a/spine-flutter/lib/spine_flutter.dart b/spine-flutter/lib/spine_flutter.dart index 6a053a31a..00699148b 100644 --- a/spine-flutter/lib/spine_flutter.dart +++ b/spine-flutter/lib/spine_flutter.dart @@ -102,7 +102,7 @@ class Vec2 { class Atlas { final spine_atlas _atlas; final List atlasPages; - final List atlasPagePaints; + final List> atlasPagePaints; bool _disposed; Atlas._(this._atlas, this.atlasPages, this.atlasPagePaints) : _disposed = false; @@ -122,7 +122,7 @@ class Atlas { final atlasDir = path.dirname(atlasFileName); List atlasPages = []; - List atlasPagePaints = []; + List> atlasPagePaints = []; final numImagePaths = _bindings.spine_atlas_get_num_image_paths(atlas); for (int i = 0; i < numImagePaths; i++) { final Pointer atlasPageFile = _bindings.spine_atlas_get_image_path(atlas, i).cast(); @@ -132,9 +132,16 @@ class Atlas { final FrameInfo frameInfo = await codec.getNextFrame(); final Image image = frameInfo.image; atlasPages.add(image); - atlasPagePaints.add(Paint() - ..shader = ImageShader(image, TileMode.clamp, TileMode.clamp, Matrix4.identity().storage, filterQuality: FilterQuality.high) - ..isAntiAlias = true); + Map paints = {}; + for (final blendMode in BlendMode.values) { + paints[blendMode] = Paint() + ..shader = ImageShader(image, TileMode.clamp, TileMode.clamp, Matrix4 + .identity() + .storage, filterQuality: FilterQuality.high) + ..isAntiAlias = true + ..blendMode = blendMode.canvasBlendMode; + } + atlasPagePaints.add(paints); } return Atlas._(atlas, atlasPages, atlasPagePaints); @@ -540,14 +547,15 @@ class SkeletonData { /// Determines how images are blended with existing pixels when drawn. See [Blending](http://esotericsoftware.com/spine-slots#Blending) in /// the Spine User Guide. enum BlendMode { - normal(0), - additive(1), - multiply(2), - screen(3); + normal(0, rendering.BlendMode.srcOver), + additive(1, rendering.BlendMode.plus), + multiply(2, rendering.BlendMode.modulate), + screen(3, rendering.BlendMode.screen); final int value; + final rendering.BlendMode canvasBlendMode; - const BlendMode(this.value); + const BlendMode(this.value, this.canvasBlendMode); } /// Determines how a bone inherits world transforms from parent bones. See [Transform inheritance](esotericsoftware.com/spine-bones#Transform-inheritance) @@ -3968,11 +3976,12 @@ class SkeletonDrawable { /// Renders the skeleton drawable's current pose to the given [canvas]. Does not perform any /// scaling or fitting. - void renderToCanvas(Canvas canvas) { + List renderToCanvas(Canvas canvas) { var commands = render(); for (final cmd in commands) { - canvas.drawVertices(cmd.vertices, rendering.BlendMode.modulate, atlas.atlasPagePaints[cmd.atlasPageIndex]); + canvas.drawVertices(cmd.vertices, rendering.BlendMode.modulate, atlas.atlasPagePaints[cmd.atlasPageIndex][cmd.blendMode]!); } + return commands; } /// Renders the skeleton drawable's current pose to a [PictureRecorder] with the given [width] and [height]. @@ -4041,6 +4050,7 @@ class RenderCommand { late final Float32List uvs; late final Int32List colors; late final Uint16List indices; + late final BlendMode blendMode; RenderCommand._(spine_render_command nativeCmd, double pageWidth, double pageHeight) { atlasPageIndex = _bindings.spine_render_command_get_atlas_page(nativeCmd); @@ -4054,6 +4064,7 @@ class RenderCommand { } colors = _bindings.spine_render_command_get_colors(nativeCmd).asTypedList(numVertices); indices = _bindings.spine_render_command_get_indices(nativeCmd).asTypedList(numIndices); + blendMode = BlendMode.values[_bindings.spine_render_command_get_blend_mode(nativeCmd)]; if (!kIsWeb) { // We pass the native data as views directly to Vertices.raw. According to the sources, the data diff --git a/spine-flutter/lib/spine_widget.dart b/spine-flutter/lib/spine_widget.dart index b28b10eba..7e67f403a 100644 --- a/spine-flutter/lib/spine_widget.dart +++ b/spine-flutter/lib/spine_widget.dart @@ -670,10 +670,7 @@ class _SpineRenderObject extends RenderBox { _setCanvasTransform(canvas, offset); _controller.onBeforePaint?.call(_controller, canvas); - var commands = _skeletonDrawable.render(); - for (final cmd in commands) { - canvas.drawVertices(cmd.vertices, rendering.BlendMode.modulate, _skeletonDrawable.atlas.atlasPagePaints[cmd.atlasPageIndex]); - } + final commands = _skeletonDrawable.renderToCanvas(canvas); _controller.onAfterPaint?.call(_controller, canvas, commands); canvas.restore(); diff --git a/spine-flutter/pubspec.yaml b/spine-flutter/pubspec.yaml index 38066e1d9..015f9ec4b 100644 --- a/spine-flutter/pubspec.yaml +++ b/spine-flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: spine_flutter description: The official Spine Flutter Runtime to load, display and interact with Spine animations. -version: 4.2.11 +version: 4.2.12 homepage: https://esotericsoftware.com repository: https://github.com/esotericsoftware/spine-runtimes issue_tracker: https://github.com/esotericsoftware/spine-runtimes/issues @@ -8,7 +8,7 @@ documentation: https://esotericsoftware.com/spine-flutter environment: sdk: ">=2.17.6 <3.0.0" - flutter: ">=3.7.3" + flutter: ">=3.7.6" dependencies: flutter: From 7d04a3d767d495b11b9df7f07e2e80c227d6a432 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 10:55:37 +0100 Subject: [PATCH 2/9] [godot] Closes #2262. add Windows export templates for Godot 4.0. --- .github/workflows/spine-godot-v4.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index 818f600fa..81a10ca3a 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -362,7 +362,7 @@ jobs: aws s3 cp godot-editor-macos.zip s3://spine-godot/$BRANCH/$GODOT_TAG/ echo "$GODOT_VERSION" > version.txt ls -lah - zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip windows_64_debug.exe windows_64_release.exe linux_x11_64_debug linux_x11_64_release web_debug.zip web_release.zip android_release.apk android_debug.apk android_source.zip version.txt + zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip windows_debug_x86_64.exe windows_release_x86_64.exe linux_x11_64_debug linux_x11_64_release web_debug.zip web_release.zip android_release.apk android_debug.apk android_source.zip version.txt aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG.tpz From e07fa017d1d93a91b065cbf136a58bfcdf505398 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:00:07 +0100 Subject: [PATCH 3/9] [godot] Update actions to latest versions in GH workflow. --- .github/actions/setup-godot-deps/action.yml | 2 +- .github/workflows/spine-godot-v4.yml | 48 ++++++++++----------- .github/workflows/spine-godot.yml | 48 ++++++++++----------- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/actions/setup-godot-deps/action.yml b/.github/actions/setup-godot-deps/action.yml index 7d10dcdf5..06bbb18ba 100644 --- a/.github/actions/setup-godot-deps/action.yml +++ b/.github/actions/setup-godot-deps/action.yml @@ -12,7 +12,7 @@ runs: steps: # Use python 3.x release (works cross platform) - name: Set up Python 3.x - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: # Semantic version range syntax or exact version of a Python version python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/spine-godot-v4.yml b/.github/workflows/spine-godot-v4.yml index 81a10ca3a..aaf4bc9b1 100644 --- a/.github/workflows/spine-godot-v4.yml +++ b/.github/workflows/spine-godot-v4.yml @@ -21,7 +21,7 @@ jobs: godot-editor-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -35,7 +35,7 @@ jobs: ./spine-godot/build/build-v4.sh - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-editor-windows.zip path: spine-godot/godot/bin/godot.windows.editor.x86_64.exe @@ -43,7 +43,7 @@ jobs: godot-editor-linux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -59,7 +59,7 @@ jobs: ./spine-godot/build/build-v4.sh - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-editor-linux.zip path: spine-godot/godot/bin/godot.linuxbsd.editor.x86_64 @@ -67,7 +67,7 @@ jobs: godot-editor-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -85,7 +85,7 @@ jobs: popd - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-editor-macos.zip path: spine-godot/godot/bin/godot-editor-macos.zip @@ -93,7 +93,7 @@ jobs: godot-template-ios: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -107,7 +107,7 @@ jobs: ./spine-godot/build/build-templates-v4.sh ios - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-ios.zip path: spine-godot/godot/bin/ios.zip @@ -115,7 +115,7 @@ jobs: godot-template-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -129,7 +129,7 @@ jobs: ./spine-godot/build/build-templates-v4.sh macos - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-macos.zip path: spine-godot/godot/bin/macos.zip @@ -137,7 +137,7 @@ jobs: godot-template-linux: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -152,13 +152,13 @@ jobs: ./spine-godot/build/build-templates-v4.sh linux - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-linux-debug.zip path: spine-godot/godot/bin/linux_x11_64_debug - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-linux-release.zip path: spine-godot/godot/bin/linux_x11_64_release @@ -166,7 +166,7 @@ jobs: godot-template-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -180,13 +180,13 @@ jobs: ./spine-godot/build/build-templates-v4.sh windows - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-windows-debug.zip path: spine-godot/godot/bin/windows_debug_x86_64.exe - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-windows-release.zip path: spine-godot/godot/bin/windows_release_x86_64.exe @@ -194,7 +194,7 @@ jobs: godot-template-android: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -220,19 +220,19 @@ jobs: ./spine-godot/build/build-templates-v4.sh android - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-android-debug.zip path: spine-godot/godot/bin/android_debug.apk - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-android-release.zip path: spine-godot/godot/bin/android_release.apk - name: Upload artifacts source - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-android-source.zip path: spine-godot/godot/bin/android_source.zip @@ -240,12 +240,12 @@ jobs: godot-template-web: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Emscripten latest - uses: mymindstorm/setup-emsdk@v10 + uses: mymindstorm/setup-emsdk@v11 with: version: ${{env.EM_VERSION}} @@ -262,13 +262,13 @@ jobs: ./spine-godot/build/build-templates-v4.sh web - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-web-debug.zip path: spine-godot/godot/bin/web_debug.zip - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-web-release.zip path: spine-godot/godot/bin/web_release.zip diff --git a/.github/workflows/spine-godot.yml b/.github/workflows/spine-godot.yml index 2f17c61ef..fa07106ea 100644 --- a/.github/workflows/spine-godot.yml +++ b/.github/workflows/spine-godot.yml @@ -21,7 +21,7 @@ jobs: godot-editor-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -35,7 +35,7 @@ jobs: ./spine-godot/build/build.sh release_debug - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-editor-windows.zip path: spine-godot/godot/bin/godot.windows.opt.tools.64.exe @@ -43,7 +43,7 @@ jobs: godot-editor-linux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -59,7 +59,7 @@ jobs: ./spine-godot/build/build.sh release_debug - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-editor-linux.zip path: spine-godot/godot/bin/godot.x11.opt.tools.64 @@ -67,7 +67,7 @@ jobs: godot-editor-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -84,7 +84,7 @@ jobs: popd - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-editor-macos.zip path: spine-godot/godot/bin/godot-editor-macos.zip @@ -92,7 +92,7 @@ jobs: godot-template-ios: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -105,7 +105,7 @@ jobs: ./spine-godot/build/build-templates.sh ios - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-ios.zip path: spine-godot/godot/bin/iphone.zip @@ -113,7 +113,7 @@ jobs: godot-template-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -126,7 +126,7 @@ jobs: ./spine-godot/build/build-templates.sh macos - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-macos.zip path: spine-godot/godot/bin/osx.zip @@ -134,7 +134,7 @@ jobs: godot-template-linux: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -149,13 +149,13 @@ jobs: ./spine-godot/build/build-templates.sh linux - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-linux-debug.zip path: spine-godot/godot/bin/linux_x11_64_debug - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-linux-release.zip path: spine-godot/godot/bin/linux_x11_64_release @@ -163,7 +163,7 @@ jobs: godot-template-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -177,13 +177,13 @@ jobs: ./spine-godot/build/build-templates.sh windows - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-windows-debug.zip path: spine-godot/godot/bin/windows_64_debug.exe - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-windows-release.zip path: spine-godot/godot/bin/windows_64_release.exe @@ -191,7 +191,7 @@ jobs: godot-template-android: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -217,19 +217,19 @@ jobs: ./spine-godot/build/build-templates.sh android - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-android-debug.zip path: spine-godot/godot/bin/android_debug.apk - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-android-release.zip path: spine-godot/godot/bin/android_release.apk - name: Upload artifacts source - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-android-source.zip path: spine-godot/godot/bin/android_source.zip @@ -237,12 +237,12 @@ jobs: godot-template-web: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Set up Emscripten latest - uses: mymindstorm/setup-emsdk@v10 + uses: mymindstorm/setup-emsdk@v11 with: version: ${{env.EM_VERSION}} @@ -259,13 +259,13 @@ jobs: ./spine-godot/build/build-templates.sh web - name: Upload artifacts debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-web-debug.zip path: spine-godot/godot/bin/webassembly_debug.zip - name: Upload artifacts release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: godot-template-web-release.zip path: spine-godot/godot/bin/webassembly_release.zip From deb2754b90810b5b6e59ecfe8c655b8bd89773e2 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:06:41 +0100 Subject: [PATCH 4/9] Update action versions across workflows. --- .github/workflows/format-check.yml | 10 +++++----- .github/workflows/spine-libgdx.yml | 4 ++-- .github/workflows/spine-ts.yml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index ab79f8dc7..ef5c11208 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -14,11 +14,11 @@ jobs: sudo apt update sudo apt install -y --force-yes curl xz-utils libicu-dev git dos2unix libncurses5 - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Cache Clang id: cache-clang - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: clang key: ${{ runner.os }}-clang-13-0-1 @@ -31,14 +31,14 @@ jobs: mv clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04 clang - name: Install dotnet - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: "6.0.x" include-prerelease: true - run: dotnet tool install -g dotnet-format - name: Install Node and dependenceis - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: "16" - run: npm install -g typescript typescript-formatter @@ -60,7 +60,7 @@ jobs: git diff > format-diff.txt - name: Archive formatting result - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: format-diff path: format-diff.txt diff --git a/.github/workflows/spine-libgdx.yml b/.github/workflows/spine-libgdx.yml index 014a160f1..e7f52d1e4 100644 --- a/.github/workflows/spine-libgdx.yml +++ b/.github/workflows/spine-libgdx.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: @@ -19,7 +19,7 @@ jobs: server-password: MAVEN_PASSWORD - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/spine-ts.yml b/.github/workflows/spine-ts.yml index 24b48c93e..d85cf9bbc 100644 --- a/.github/workflows/spine-ts.yml +++ b/.github/workflows/spine-ts.yml @@ -9,11 +9,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Setup TypeScript - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: '16.6.2' + node-version: '16' - name: Build spine-ts working-directory: spine-ts env: From 8e22e7894be4bdf392e5dd816e897f5f42700521 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:19:11 +0100 Subject: [PATCH 5/9] Update action versions in GH workflows. --- .github/workflows/spine-libgdx.yml | 6 ++++-- .github/workflows/spine-ts.yml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spine-libgdx.yml b/.github/workflows/spine-libgdx.yml index e7f52d1e4..2cfcda5b9 100644 --- a/.github/workflows/spine-libgdx.yml +++ b/.github/workflows/spine-libgdx.yml @@ -4,6 +4,7 @@ on: push: paths: - 'spine-libgdx/**' + workflow_dispatch: jobs: build: @@ -11,9 +12,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: - java-version: 1.8 + distribution: 'zulu' + java-version: "8" server-id: sonatype-nexus-snapshots server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD diff --git a/.github/workflows/spine-ts.yml b/.github/workflows/spine-ts.yml index d85cf9bbc..2bf6d15d2 100644 --- a/.github/workflows/spine-ts.yml +++ b/.github/workflows/spine-ts.yml @@ -4,6 +4,7 @@ on: push: paths: - 'spine-ts/**' + workflow_dispatch: jobs: build: From b7482f87d962a5f64a169dc065d42aaaa2815842 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:21:34 +0100 Subject: [PATCH 6/9] Update action versions in GH workflows. --- .github/workflows/format-check.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index ef5c11208..7dac272f7 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -33,8 +33,7 @@ jobs: - name: Install dotnet uses: actions/setup-dotnet@v3 with: - dotnet-version: "6.0.x" - include-prerelease: true + dotnet-version: "6.0.x" - run: dotnet tool install -g dotnet-format - name: Install Node and dependenceis @@ -44,7 +43,7 @@ jobs: - run: npm install -g typescript typescript-formatter - name: Install JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: distribution: 'zulu' java-version: "16" From 9a168a26a4f15f0e0c23c0ec06e4bea65e9dbd09 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:26:39 +0100 Subject: [PATCH 7/9] [godot] Revert change to python setup GH action. --- .github/actions/setup-godot-deps/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-godot-deps/action.yml b/.github/actions/setup-godot-deps/action.yml index 06bbb18ba..7d10dcdf5 100644 --- a/.github/actions/setup-godot-deps/action.yml +++ b/.github/actions/setup-godot-deps/action.yml @@ -12,7 +12,7 @@ runs: steps: # Use python 3.x release (works cross platform) - name: Set up Python 3.x - uses: actions/setup-python@v3 + uses: actions/setup-python@v2 with: # Semantic version range syntax or exact version of a Python version python-version: ${{ inputs.python-version }} From adbb5d367a493b23d3e287a8bfa1b98afdb41501 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:28:57 +0100 Subject: [PATCH 8/9] [godot] Update setup action to latest Python/Scons versions. --- .github/actions/setup-godot-deps/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-godot-deps/action.yml b/.github/actions/setup-godot-deps/action.yml index 7d10dcdf5..ee33c1f38 100644 --- a/.github/actions/setup-godot-deps/action.yml +++ b/.github/actions/setup-godot-deps/action.yml @@ -12,7 +12,7 @@ runs: steps: # Use python 3.x release (works cross platform) - name: Set up Python 3.x - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: # Semantic version range syntax or exact version of a Python version python-version: ${{ inputs.python-version }} @@ -23,5 +23,5 @@ runs: shell: bash run: | python -c "import sys; print(sys.version)" - python -m pip install scons + python -m pip install scons==4.4.0 scons --version \ No newline at end of file From 5232c1cb774c0ca2510a8f4484e5f6ecd675e2ec Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 7 Mar 2023 11:52:11 +0100 Subject: [PATCH 9/9] [flutter] Add VS Code launch configs. --- spine-flutter/.vscode/launch.json | 45 +++++++++++++++++++++++++++++ spine-flutter/lib/spine_widget.dart | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 spine-flutter/.vscode/launch.json diff --git a/spine-flutter/.vscode/launch.json b/spine-flutter/.vscode/launch.json new file mode 100644 index 000000000..bb5c78e10 --- /dev/null +++ b/spine-flutter/.vscode/launch.json @@ -0,0 +1,45 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "spine-flutter", + "request": "launch", + "type": "dart" + }, + { + "name": "spine-flutter (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "spine-flutter (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "example", + "cwd": "example", + "request": "launch", + "type": "dart" + }, + { + "name": "example (profile mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "example (release mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/spine-flutter/lib/spine_widget.dart b/spine-flutter/lib/spine_widget.dart index 7e67f403a..c533248a8 100644 --- a/spine-flutter/lib/spine_widget.dart +++ b/spine-flutter/lib/spine_widget.dart @@ -65,7 +65,7 @@ class SpineWidgetController { SkeletonDrawable? _drawable; double _offsetX = 0, _offsetY = 0, _scaleX = 1, _scaleY = 1; bool _isPlaying = true; - _SpineRenderObject? _renderObject = null; + _SpineRenderObject? _renderObject; final void Function(SpineWidgetController controller)? onInitialized; final void Function(SpineWidgetController controller)? onBeforeUpdateWorldTransforms; final void Function(SpineWidgetController controller)? onAfterUpdateWorldTransforms;