mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
Merge branch '4.1' into 4.2-beta
This commit is contained in:
commit
05f094d9dc
4
.github/actions/setup-godot-deps/action.yml
vendored
4
.github/actions/setup-godot-deps/action.yml
vendored
@ -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
|
||||
15
.github/workflows/format-check.yml
vendored
15
.github/workflows/format-check.yml
vendored
@ -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,20 +31,19 @@ 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
|
||||
dotnet-version: "6.0.x"
|
||||
- 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
|
||||
|
||||
- name: Install JDK
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: "16"
|
||||
@ -60,7 +59,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
|
||||
|
||||
50
.github/workflows/spine-godot-v4.yml
vendored
50
.github/workflows/spine-godot-v4.yml
vendored
@ -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
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
48
.github/workflows/spine-godot.yml
vendored
48
.github/workflows/spine-godot.yml
vendored
@ -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
|
||||
|
||||
10
.github/workflows/spine-libgdx.yml
vendored
10
.github/workflows/spine-libgdx.yml
vendored
@ -4,22 +4,24 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- 'spine-libgdx/**'
|
||||
workflow_dispatch:
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
- name: Cache Maven packages
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
|
||||
7
.github/workflows/spine-ts.yml
vendored
7
.github/workflows/spine-ts.yml
vendored
@ -4,16 +4,17 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- 'spine-ts/**'
|
||||
workflow_dispatch:
|
||||
|
||||
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:
|
||||
|
||||
45
spine-flutter/.vscode/launch.json
vendored
Normal file
45
spine-flutter/.vscode/launch.json
vendored
Normal file
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -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"
|
||||
|
||||
@ -102,7 +102,7 @@ class Vec2 {
|
||||
class Atlas {
|
||||
final spine_atlas _atlas;
|
||||
final List<Image> atlasPages;
|
||||
final List<Paint> atlasPagePaints;
|
||||
final List<Map<BlendMode, Paint>> atlasPagePaints;
|
||||
bool _disposed;
|
||||
|
||||
Atlas._(this._atlas, this.atlasPages, this.atlasPagePaints) : _disposed = false;
|
||||
@ -122,7 +122,7 @@ class Atlas {
|
||||
|
||||
final atlasDir = path.dirname(atlasFileName);
|
||||
List<Image> atlasPages = [];
|
||||
List<Paint> atlasPagePaints = [];
|
||||
List<Map<BlendMode, Paint>> atlasPagePaints = [];
|
||||
final numImagePaths = _bindings.spine_atlas_get_num_image_paths(atlas);
|
||||
for (int i = 0; i < numImagePaths; i++) {
|
||||
final Pointer<Utf8> 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<BlendMode, Paint> 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<RenderCommand> 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
|
||||
|
||||
@ -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;
|
||||
@ -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();
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user