Skip to content

Commit

Permalink
Merge branch '4.2' into spine-android
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Jul 3, 2024
2 parents 9cc57ee + f3b3cb4 commit 603f181
Show file tree
Hide file tree
Showing 752 changed files with 72,956 additions and 7,590 deletions.
32 changes: 32 additions & 0 deletions .github/actions/setup-godot-deps-3/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Setup python and scons
description: Setup python, install the pip version of scons.
inputs:
python-version:
description: The python version to use.
default: "3.x"
python-arch:
description: The python architecture.
default: "x64"
runs:
using: "composite"
steps:
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: ${{ inputs.python-version }}
# Optional - x64 or x86 architecture, defaults to x64
architecture: ${{ inputs.python-arch }}

- name: Setup scons
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
scons --version
- name: Setup dotnet 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/spine-godot-v4-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
matrix:
version:
[
{"tag": "4.1.3-stable", "version": "4.1.3.stable", "mono": false},
{"tag": "4.1.3-stable", "version": "4.1.3.stable", "mono": true},
{"tag": "4.1.4-stable", "version": "4.1.4.stable", "mono": false},
{"tag": "4.1.4-stable", "version": "4.1.4.stable", "mono": true},
{"tag": "4.2.2-stable", "version": "4.2.2.stable", "mono": false},
{"tag": "4.2.2-stable", "version": "4.2.2.stable", "mono": true},
]
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/spine-godot-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
shell: bash
Expand All @@ -72,7 +72,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
shell: bash
Expand All @@ -96,7 +96,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
shell: bash
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
run: |
Expand All @@ -146,7 +146,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
run: |
Expand All @@ -168,7 +168,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
run: |
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
shell: bash
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
java-version: 17

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
shell: bash
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
emcc -v
- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-4

- name: Build Godot artifact
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/spine-godot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
shell: bash
Expand All @@ -46,7 +46,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
shell: bash
Expand All @@ -70,7 +70,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
shell: bash
Expand All @@ -95,7 +95,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
run: |
Expand All @@ -116,7 +116,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
run: |
Expand All @@ -137,7 +137,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
run: |
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
fetch-depth: 0

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
shell: bash
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
java-version: 11

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
shell: bash
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
emcc -v
- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
uses: ./.github/actions/setup-godot-deps-3

- name: Build Godot artifact
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,4 @@ spine-ue/Plugins/Developer
spine-haxe/export
spine-godot/example-v4-csharp/.godot
spine-flutter/src/spine-cpp-lite
spine-sdl/.vs
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
## C#

- **Additions**

- Added [`TrackEntry.AlphaAttachmentThreshold`](http://esotericsoftware.com/spine-api-reference#TrackEntry-alphaAttachmentThreshold).

- **Breaking changes**
Expand Down Expand Up @@ -155,6 +156,10 @@
`SkeletonGraphic-PMATexture` containing materials for premultiplied-alpha texture workflow (`Straight Alpha Texture` disabled) and `SkeletonGraphic-StaightAlphaTexture` containing materials for straight alpha texture workflow (`Straight Alpha Texture` enabled). These directories contain a set of materials with `CanvasGroup Compatible` disabled for usage with `Advanced - PMA Vertex Color` enabled at the component. Each directory also provides a subdirectory `CanvasGroupCompatible` with materials with `CanvasGroup Compatible` enabled for usage with `CanvasGroup` alpha (requiring `Advanced - PMA Vertex Color` disabled at the component).
- SkeletonGraphic: Added auto-detect functionality for parameters `Advanced` - `Tint Black`, `CanvasGroup Compatible` and `PMA Vertex Color`. If unsure which settings are correct, hit the `Detect` button next to each parameter, in top to bottom order, or the `Detect Settings` to detect all three. Also added automatic material assignment via a `Detect Material` button in the `Advanced` section and a `Detect` button next to the `Material` property at the top of the component Inspector, as well as next to the `Blend Mode Materials` section when using multiple canvas renderers with blend modes. The suitable material is selected based on these three settings, combined with texture settings (PMA or straight alpha texture settings). If you receive incorrect results, likely your texture settings are incorrectly setup for your PMA or Straight alpha texture export settings.
- `SkeletonRenderTexture` example components now provide a `shaderPasses` parameter to customize which passes are rendered to the `RenderTexture`. It defaults to `-1` for all passes to keep the existing behaviour. You might want to set it to `0` to only render the first pass e.g. to avoid issues when using a URP shader at the original skeleton.
- `SkeletonGraphicRenderTexture` example component now also received a `quadMaterial` property, defaulting to the newly added Material asset `RenderQuadGraphicMaterial` which applies proper premultiplied-alpha blending of the render texture. The `quadMaterial` member variable was moved from `SkeletonRenderTexture` to the common base class `SkeletonRenderTextureBase`.
- All Spine Outline shaders, including the URP outline shader, now provide an additional parameter `Width in Screen Space`. Enable it to keep the outline width constant in screen space instead of texture space. Requires more expensive computations, so enable only where necessary. Defaults to `disabled` to maintain existing behaviour.
- Added support for BlendModeMaterials at runtime instantiation from files via an additional method `SkeletonDataAsset.SetupRuntimeBlendModeMaterials`. See example scene `Spine Examples/Other Examples/Instantiate from Script` for a usage example.
- SkeletonGraphic: You can now offset the skeleton mesh relative to the pivot via a newly added green circle handle. This allows you to e.g. frame only the face of a skeleton inside a masked frame. Previously offsetting the pivot downwards fails when `Layout Scale Mode` scales the mesh smaller and towards the pivot (e.g. the feet) and thus out of the frame. Now you can keep the pivot in the center of the `RectTransform` while offsetting only the mesh downwards, keeping the desired skeleton area (e.g. the face) centered while resizing. Moving the new larger green circle handle moves the mesh offset, while moving the blue pivot circle handle moves the pivot as usual.

- **Breaking changes**

Expand All @@ -166,6 +171,8 @@
- SkeletonGraphic: The parameter `SkeletonGraphic.MeshGenerator.settings.canvasGroupTintBlack` was changed to `canvasGroupCompatible` to help with auto-detecting correct Vertex Data and Material settings. Set the parameter to true if the SkeletonGraphic component is located below a `CanvasGroup` component. The parameter value is automatically migrated from `canvasGroupTintBlack`.
- Inspector: String attribute `SpineSkin()` now allows to include `<None>` in the list of parameters. Previously the `includeNone=true` parameter of the `SpineSkin()` attribute defaulted to `true` but was ignored. Now it defaults to `false` and has an effect on the list. Only the Inspector GUI is affected by this behaviour change.
- `SkeletonGraphicRenderTexture` example component: `protected RawImage quadRawImage` was changed to `protected SkeletonSubmeshGraphic quadMaskableGraphic` for a bugfix. This is only relevant for subclasses of `SkeletonGraphicRenderTexture` or when querying the `RawImage` component via e.g. `skeletonGraphicRenderTexture.quad.GetComponent<RawImage>()`.
- Fixed a bug where when Linear color space is used and `PMA vertex colors` enabled, additive slots add a too dark (too transparent) color value. If you want the old incorrect behaviour (darker additive slots) or are not using Linear but Gamma color space, you can comment-out the define `LINEAR_COLOR_SPACE_FIX_ADDITIVE_ALPHA` in `MeshGenerator.cs` to deactivate the fix or just to skip unnecessary instructions.


- **Changes of default values**

Expand All @@ -174,6 +181,7 @@
- **Restructuring (Non-Breaking)**

### XNA/MonoGame

- **Additions**
- Apply external movement to physics: If you are not directly modifying `Skeleton.X` or `Skeleton.Y`, you can apply external game object movement to skeleton physics as follows:
Add a `Vector2 lastPosition;` member variable to your class interacting with the skeleton. Then call e.g. the following code each frame:
Expand Down Expand Up @@ -261,6 +269,8 @@
- Added physics support
- Added `scale` field to configuration which defines the scale to load the skeleton at
- Added `updateWorldTransform` field to configuration which expects a function that updates the skeleton. Defaults to player.skeleton.updateWorldTransform(spine.Physics.update)
- Added `skeleton` to `SpinePlayerConfig` to specify the URL of the skeleton .json or .skel file. Deprecated `jsonURL` and `binaryURL`. The old fields can still be used, but will be removed in Spine 4.3
- Added `atlas` to `SpinePlayerConfig` to specify the URL of the .atlas file. Deprecated `atlasURL`. The old field can still be used, but will be removed in Spine 4.3.

### Pixi

Expand Down
54 changes: 0 additions & 54 deletions CMakeLists.txt

This file was deleted.

39 changes: 39 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "spine-ios",
platforms: [
.iOS(.v13)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "Spine",
targets: ["Spine"]
)
],
targets: [
.target(
name: "Spine",
dependencies: [
"SpineCppLite", "SpineShadersStructs"
],
path: "spine-ios/Sources/Spine",
swiftSettings: [
.interoperabilityMode(.Cxx)
]
),
.target(
name: "SpineCppLite",
path: "spine-ios/Sources/SpineCppLite"
),
.systemLibrary(
name: "SpineShadersStructs",
path: "spine-ios/Sources/SpineShadersStructs"
)
],
cxxLanguageStandard: .cxx11
)
27 changes: 27 additions & 0 deletions Spine.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint spine_flutter.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'Spine'
s.version = '4.2.0'
s.summary = 'Spine runtimes for iOS.'
s.description = <<-DESC
Spine runtimes for iOS.
DESC
s.homepage = 'https://esotericsoftware.com'
s.author = { "Esoteric Software LLC " => "https://esotericsoftware.com" }
s.license = { :file => 'LICENSE' }

s.source = { :git => 'https://github.com/esotericsoftware/spine-runtimes.git', :branch => '4.2' }
s.source_files = 'spine-ios/Sources/Spine/**/*.{swift,metal}'
s.platform = :ios, '13.0'

s.xcconfig = {
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp/include" "$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp-lite"'
}

s.swift_version = '5.0'
s.dependency 'SpineCppLite'
s.dependency 'SpineShadersStructs'
end
Loading

0 comments on commit 603f181

Please sign in to comment.