Merge branch '4.2' into spine-android

This commit is contained in:
Denis Andrasec 2024-07-03 10:09:47 +02:00
commit 603f181c79
752 changed files with 72956 additions and 7590 deletions

View File

@ -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'

View File

@ -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},
]

View File

@ -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
@ -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
@ -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
@ -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: |
@ -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: |
@ -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: |
@ -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
@ -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
@ -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: |

View File

@ -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
@ -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
@ -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
@ -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: |
@ -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: |
@ -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: |
@ -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
@ -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
@ -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: |

1
.gitignore vendored
View File

@ -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

View File

@ -113,6 +113,7 @@
## C#
- **Additions**
- Added [`TrackEntry.AlphaAttachmentThreshold`](http://esotericsoftware.com/spine-api-reference#TrackEntry-alphaAttachmentThreshold).
- **Breaking changes**
@ -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**
@ -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**
@ -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:
@ -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

View File

@ -1,54 +0,0 @@
cmake_minimum_required(VERSION 3.17)
project(spine)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH "Install location" FORCE)
endif()
set(CMAKE_VERBOSE_MAKEFILE ON)
option(SPINE_SFML "Build spine SFML API" OFF)
option(SPINE_SANITIZE "Build with sanitization" OFF)
option(BUILD_TESTING "Build with testing" ON)
if(MSVC)
message("MSCV detected")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-value -Wno-variadic-macros -Wextra -pedantic -Wshadow -std=c99")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-value -Wno-variadic-macros -Wextra -Wnon-virtual-dtor -pedantic -Wshadow -std=c++11 -fno-exceptions -fno-rtti")
if (${SPINE_SANITIZE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined")
endif()
endif()
if((${SPINE_SFML}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sfml"))
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_OSX_ARCHITECTURES x86_64)
set(ONLY_ACTIVE_ARCH NO)
endif()
add_subdirectory(spine-c)
add_subdirectory(spine-cpp)
add_subdirectory(spine-sfml/c)
add_subdirectory(spine-sfml/cpp)
elseif((${SPINE_SDL}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sdl"))
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)
set(ONLY_ACTIVE_ARCH NO)
endif()
add_subdirectory(spine-c)
add_subdirectory(spine-cpp)
add_subdirectory(spine-sdl)
else()
add_subdirectory(spine-c)
add_subdirectory(spine-cpp)
if (${BUILD_TESTING})
add_subdirectory(spine-cpp/spine-cpp-unit-tests)
endif()
endif()
# Create config file that include the exported targets
configure_file(SpineConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/SpineConfig.cmake"
@ONLY)

39
Package.swift Normal file
View File

@ -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
Spine.podspec Normal file
View File

@ -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

25
SpineCppLite.podspec Normal file
View File

@ -0,0 +1,25 @@
#
# 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 = 'SpineCppLite'
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.platform = :ios, '13.0'
s.source = { :git => 'https://github.com/esotericsoftware/spine-runtimes.git', :branch => '4.2' }
s.source_files = 'spine-cpp/spine-cpp/**/*.{h,cpp}', 'spine-cpp/spine-cpp-lite/*.{h,cpp}'
s.module_map = 'spine-cpp/spine-cpp-lite/module.modulemap'
s.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp/include" "$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp-lite"',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
'CLANG_CXX_LIBRARY' => 'libc++'
}
end

View File

@ -0,0 +1,24 @@
#
# 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 = 'SpineShadersStructs'
s.version = '4.2.0'
s.summary = 'Metal shaders structs for spine'
s.description = <<-DESC
Metal shaders structs for spine.
DESC
s.homepage = 'https://esotericsoftware.com'
s.author = { "Esoteric Software LLC " => "https://esotericsoftware.com" }
s.license = { :file => 'LICENSE' }
s.platform = :ios, '13.0'
s.source = { :git => 'https://github.com/esotericsoftware/spine-runtimes.git', :branch => '4.2' }
s.source_files = 'spine-ios/Sources/SpineShadersStructs/*.{h,cpp}'
s.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11',
'CLANG_CXX_LIBRARY' => 'libc++'
}
end

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "oNAXvMMJkLk",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -191.3,
"y": -4.51,
"width": 365.79,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "tTPHKN0ryvs",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -191.3,
"y": -4.51,
"width": 368.26,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "FsTlpSGjt5g",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -755,
"y": -556.02,
"width": 1332,
@ -921,7 +921,7 @@
"height": 620
}
},
"fringe-middle-back": {
"face/fringe-front/fringe-middle-back": {
"fringe-middle-back": {
"type": "mesh",
"uvs": [ 0.32752, 0, 0.86964, 0.29818, 1, 0.59486, 1, 1, 0.28701, 1, 0.30763, 0.65487, 0, 0.25321, 0, 0 ],
@ -933,7 +933,7 @@
"height": 130
}
},
"fringe-middle-front": {
"face/fringe-front/fringe-middle-front": {
"fringe-middle-front": {
"type": "mesh",
"uvs": [ 1, 1, 0.75, 1, 0.5, 1, 0.25, 1, 0, 1, 0, 0.66667, 0, 0.33333, 0, 0, 0.5, 0, 1, 0, 1, 0.33333, 1, 0.66667, 0.58576, 0.6538, 0.52144, 0.32047 ],
@ -945,7 +945,7 @@
"height": 125
}
},
"fringe-side-front": {
"face/fringe-front/fringe-side-front": {
"fringe-side-front": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.8, 0, 0.6, 0, 0.4, 0, 0.2, 0, 0, 1, 0, 1, 0.2, 1, 0.4, 1, 0.6, 1, 0.8 ],
@ -957,7 +957,7 @@
"height": 232
}
},
"ear": {
"face/ear": {
"ear": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -969,7 +969,7 @@
"height": 70
}
},
"eye-back-shadow": {
"face/eye-back-shadow": {
"eye-back-shadow": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -981,7 +981,7 @@
"height": 24
}
},
"eye-front-shadow": {
"face/eye-front-shadow": {
"eye-front-shadow": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -993,13 +993,13 @@
"height": 36
}
},
"eye-reflex-back": {
"face/eye-reflex-back": {
"eye-reflex-back": { "x": -1, "y": 6.42, "rotation": -90, "width": 19, "height": 17 }
},
"eye-reflex-front": {
"face/eye-reflex-front": {
"eye-reflex-front": { "x": -2.07, "y": 7.22, "rotation": -90, "width": 25, "height": 18 }
},
"eye-white-back": {
"face/eye-white-back": {
"eye-white-back": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1011,7 +1011,7 @@
"height": 40
}
},
"eye-white-front": {
"face/eye-white-front": {
"eye-white-front": {
"type": "mesh",
"uvs": [ 0.98492, 0.7288, 0.74399, 0.97841, 0.09394, 0.97675, 0, 0.61321, 0.44029, 0.01082, 0.98133, 0.03613 ],
@ -1023,13 +1023,13 @@
"height": 43
}
},
"eyelashes-down-back": {
"face/eyelashes-down-back": {
"eyelashes-down-back": { "x": -0.77, "y": -0.73, "rotation": -90, "width": 28, "height": 14 }
},
"eyelashes-down-front": {
"face/eyelashes-down-front": {
"eyelashes-down-front": { "x": -2.35, "y": 0.72, "rotation": -90, "width": 37, "height": 15 }
},
"eyelashes-top-back": {
"face/eyelashes-top-back": {
"eyelashes-top-back": {
"type": "mesh",
"uvs": [ 0.53449, 0.0112, 0.80224, 0.23436, 1, 0.50028, 0.89272, 0.90854, 0.67501, 0.92236, 0.35422, 0.73425, 0.24884, 0.95236, 0.02061, 0.96391, 0.02196, 0.59454, 0.24865, 0.01679 ],
@ -1041,7 +1041,7 @@
"height": 24
}
},
"eyelashes-top-front": {
"face/eyelashes-top-front": {
"eyelashes-top-front": {
"type": "mesh",
"uvs": [ 0, 0.74724, 0.51172, 0, 0.61319, 0, 0.99001, 0.18532, 0.99016, 0.28688, 0.83893, 0.5606, 0.6312, 0.2977, 0.48808, 0.44992, 0.18971, 1, 0.09689, 1, 0, 0.86051 ],
@ -1053,7 +1053,7 @@
"height": 41
}
},
"face": {
"face/face": {
"face": {
"type": "mesh",
"uvs": [ 0.84841, 0, 0.99605, 0.18591, 0.99597, 0.82505, 0.75638, 1, 0.56116, 1, 0.28151, 0.91236, 0.02486, 0.65319, 0.25928, 0.18329, 0.83782, 0, 0.31251, 0.58794, 0.2902, 0.34407, 0.75589, 0.2771, 0.94411, 0.34407, 0.92878, 0.62458, 0.66107, 0.87982, 0.7811, 0.68326 ],
@ -1065,7 +1065,7 @@
"height": 256
}
},
"fringe-side-back": {
"face/fringe-side-back": {
"fringe-side-back": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.8, 0, 0.6, 0, 0.4, 0, 0.2, 0, 0, 1, 0, 1, 0.2, 1, 0.4, 1, 0.6, 1, 0.8 ],
@ -1077,13 +1077,13 @@
"height": 234
}
},
"hair-hat-shadow": {
"face/hair-hat-shadow": {
"hair-hat-shadow": { "x": 198.48, "y": 40.22, "rotation": -90, "width": 224, "height": 102 }
},
"mouth": {
"face/mouth": {
"mouth": { "x": 4.02, "y": -0.92, "rotation": -90, "width": 56, "height": 16 }
},
"nose": {
"face/nose": {
"nose": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1095,7 +1095,7 @@
"height": 17
}
},
"nose-highlight": {
"face/nose-highlight": {
"nose-highlight": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1107,7 +1107,7 @@
"height": 11
}
},
"nose-shadow": {
"face/nose-shadow": {
"nose-shadow": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1119,13 +1119,13 @@
"height": 20
}
},
"pupil-back": {
"face/pupil-back": {
"pupil-back": { "x": -2.5, "y": 1.42, "rotation": -90, "width": 25, "height": 36 }
},
"pupil-front": {
"face/pupil-front": {
"pupil-front": { "x": -0.07, "y": 1.72, "rotation": -90, "width": 30, "height": 44 }
},
"hair-back-1": {
"hair-back/hair-back-1": {
"hair-back-1": {
"type": "mesh",
"uvs": [ 1, 0.05206, 0.78167, 0.17387, 0.70445, 0.29745, 0.65078, 0.39485, 0.49669, 0.47826, 0.30981, 0.57942, 0.46147, 0.61966, 0.65876, 0.71313, 0.30967, 0.78419, 0.48938, 0.84645, 0.47689, 0.91323, 0.30103, 1, 0.21344, 1, 0.10045, 0.96739, 0.0798, 0.89237, 0.04833, 0.77797, 0, 0.60231, 0, 0.55114, 0.36021, 0.41385, 0.44814, 0.36733, 0.56438, 0.25145, 0.68422, 0.13617, 0.82577, 0, 1, 1.0E-5 ],
@ -1137,7 +1137,7 @@
"height": 766
}
},
"hair-back-2": {
"hair-back/hair-back-2": {
"hair-back-2": {
"type": "mesh",
"uvs": [ 0.89086, 0, 0.99848, 0, 0.96651, 0.15477, 0.94381, 0.26466, 0.92222, 0.36914, 0.89845, 0.48424, 0.57735, 0.62302, 0.73413, 0.63077, 0.9883, 0.70379, 0.86085, 0.84916, 0.74336, 0.98316, 0.59619, 1, 0.37348, 1, 0.10983, 0.83684, 1.0E-5, 0.76887, 0, 0.66185, 0.06689, 0.57957, 0.28324, 0.47594, 0.49583, 0.37411, 0.59097, 0.27636, 0.69109, 0.15073, 0.80033, 0.01367, 0.54528, 0.76481 ],
@ -1149,7 +1149,7 @@
"height": 712
}
},
"hair-back-3": {
"hair-back/hair-back-3": {
"hair-back-3": {
"type": "mesh",
"uvs": [ 0.84591, 0.08889, 0.82372, 0.26566, 0.80438, 0.41975, 0.94221, 0.62567, 1, 0.81672, 0.70929, 0.99918, 0.46458, 0.99803, 0.23662, 0.83671, 0, 0.66926, 0, 0.51704, 0.21223, 0.38901, 0.3832, 0.26202, 0.39154, 0.00106, 0.78531, 0.00114 ],
@ -1161,7 +1161,7 @@
"height": 670
}
},
"hair-back-4": {
"hair-back/hair-back-4": {
"hair-back-4": {
"type": "mesh",
"uvs": [ 0.84401, 0.30705, 0.95315, 0.49123, 0.9783, 0.6272, 1, 0.74452, 0.91116, 0.87667, 0.91728, 1, 0.62869, 1, 0.56926, 1, 0.32887, 0.88007, 0.04472, 0.7649, 0, 0.61844, 0.14237, 0.48206, 0.16865, 0.34839, 0.03769, 0.00116, 0.67304, 0.01853 ],
@ -1173,7 +1173,7 @@
"height": 656
}
},
"hair-back-5": {
"hair-back/hair-back-5": {
"hair-back-5": {
"type": "mesh",
"uvs": [ 0.52681, 0.0022, 0.53701, 0.13188, 0.57788, 0.19975, 0.74688, 0.40516, 0.89266, 0.58235, 1, 0.80234, 0.94757, 0.86532, 0.87274, 0.99806, 0.65652, 1, 0.49768, 0.91169, 0.26202, 0.78067, 0.35593, 0.58238, 0.25008, 0.42396, 0, 0.16031, 0, 0.12266, 0.22195, 0.00216 ],
@ -1185,7 +1185,7 @@
"height": 697
}
},
"hair-back-6": {
"hair-back/hair-back-6": {
"hair-back-6": {
"type": "mesh",
"uvs": [ 0, 0.00316, 0.19789, 0.00238, 0.24097, 0.10462, 0.42784, 0.26537, 0.57522, 0.34678, 0.68888, 0.40956, 0.80549, 0.47398, 0.94785, 0.55261, 0.89923, 0.64182, 0.84246, 0.74598, 1, 0.78199, 1, 0.82207, 0.92109, 0.94159, 0.77855, 1, 0.5892, 1, 0.4989, 0.90847, 0.38858, 0.79465, 0.39143, 0.71034, 0.43093, 0.64588, 0.41659, 0.56993, 0.34767, 0.47025, 0.25898, 0.39956, 0.12664, 0.29408, 0.0176, 0.20717, 0, 0.0579, 0.6061, 0.79944 ],
@ -1197,7 +1197,7 @@
"height": 715
}
},
"feathers-back": {
"hat/feathers-back": {
"feathers-back": {
"type": "mesh",
"uvs": [ 0.99999, 0, 1, 0.33648, 0.94897, 0.50948, 0.82521, 0.929, 0.47931, 1, 0.33408, 0.78083, 0.14308, 0.49259, 0, 0.27667, 0, 0.08318, 0.4705, 0.03304, 0.78052, 0, 0.66524, 0.5216, 0.59356, 0.18309, 0.6294, 0.3623 ],
@ -1209,7 +1209,7 @@
"height": 114
}
},
"feathers-front": {
"hat/feathers-front": {
"feathers-front": {
"type": "mesh",
"uvs": [ 0.3388, 0, 0.54158, 0.14344, 0.74297, 0.2859, 0.85306, 0.36378, 1, 0.46773, 1, 0.60515, 0.95944, 0.81123, 0.66438, 1, 0.58726, 1, 0.56097, 0.78724, 0.54426, 0.65203, 0.40317, 0.57511, 0.19125, 0.45957, 0, 0.3553, 0, 1.0E-5, 0.75902, 0.42138, 0.75203, 0.58249, 0.74507, 0.72959, 0.79778, 0.42193, 0.78067, 0.58361 ],
@ -1221,7 +1221,7 @@
"height": 215
}
},
"hat-back": {
"hat/hat-back": {
"hat-back": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1233,7 +1233,7 @@
"height": 112
}
},
"hat-front": {
"hat/hat-front": {
"hat-front": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1245,32 +1245,32 @@
"height": 140
}
},
"star1": {
"stars/star1": {
"star-big": { "width": 44, "height": 60 },
"star-medium": { "width": 14, "height": 20 },
"star-small": { "width": 8, "height": 11 }
},
"star2": {
"stars/star2": {
"star-big": { "width": 44, "height": 60 },
"star-medium": { "width": 14, "height": 20 },
"star-small": { "width": 8, "height": 11 }
},
"star3": {
"stars/star3": {
"star-big": { "width": 44, "height": 60 },
"star-medium": { "width": 14, "height": 20 },
"star-small": { "width": 8, "height": 11 }
},
"star4": {
"stars/star4": {
"star-big": { "width": 44, "height": 60 },
"star-medium": { "width": 14, "height": 20 },
"star-small": { "width": 8, "height": 11 }
},
"star5": {
"stars/star5": {
"star-big": { "width": 44, "height": 60 },
"star-medium": { "width": 14, "height": 20 },
"star-small": { "width": 8, "height": 11 }
},
"star6": {
"stars/star6": {
"star-big": { "width": 44, "height": 60 },
"star-medium": { "width": 14, "height": 20 },
"star-small": { "width": 8, "height": 11 }
@ -1490,7 +1490,7 @@
},
"stars": {
"slots": {
"star1": {
"stars/star1": {
"attachment": [
{ "time": 0.0667, "name": "star-small" },
{ "time": 0.1333, "name": "star-medium" },
@ -1500,7 +1500,7 @@
{ "time": 0.4 }
]
},
"star2": {
"stars/star2": {
"attachment": [
{ "time": 0.0667, "name": "star-small" },
{ "time": 0.1333, "name": "star-medium" },
@ -1510,7 +1510,7 @@
{ "time": 0.4 }
]
},
"star3": {
"stars/star3": {
"attachment": [
{ "time": 0.0667, "name": "star-small" },
{ "time": 0.1333, "name": "star-medium" },
@ -1520,7 +1520,7 @@
{ "time": 0.4 }
]
},
"star4": {
"stars/star4": {
"attachment": [
{ "time": 0.4, "name": "star-small" },
{ "time": 0.4667, "name": "star-medium" },
@ -1530,7 +1530,7 @@
{ "time": 0.7333 }
]
},
"star5": {
"stars/star5": {
"attachment": [
{ "time": 0.1667, "name": "star-small" },
{ "time": 0.2333, "name": "star-medium" },
@ -1540,7 +1540,7 @@
{ "time": 0.5 }
]
},
"star6": {
"stars/star6": {
"attachment": [
{ "time": 0.4, "name": "star-small" },
{ "time": 0.4667, "name": "star-medium" },
@ -1554,7 +1554,7 @@
},
"swing": {
"slots": {
"star1": {
"stars/star1": {
"attachment": [
{ "time": 0.0667, "name": "star-small" },
{ "time": 0.1333, "name": "star-medium" },
@ -1576,7 +1576,7 @@
{ "time": 1.8667 }
]
},
"star2": {
"stars/star2": {
"attachment": [
{ "time": 0.0667, "name": "star-small" },
{ "time": 0.1333, "name": "star-medium" },
@ -1598,7 +1598,7 @@
{ "time": 1.8667 }
]
},
"star3": {
"stars/star3": {
"attachment": [
{ "time": 0.0667, "name": "star-small" },
{ "time": 0.1333, "name": "star-medium" },
@ -1620,7 +1620,7 @@
{ "time": 1.8667 }
]
},
"star4": {
"stars/star4": {
"attachment": [
{ "time": 0.4, "name": "star-small" },
{ "time": 0.4667, "name": "star-medium" },
@ -1642,7 +1642,7 @@
{ "time": 2.2 }
]
},
"star5": {
"stars/star5": {
"attachment": [
{ "time": 0.1667, "name": "star-small" },
{ "time": 0.2333, "name": "star-medium" },
@ -1664,7 +1664,7 @@
{ "time": 1.9667 }
]
},
"star6": {
"stars/star6": {
"attachment": [
{ "time": 0.4, "name": "star-small" },
{ "time": 0.4667, "name": "star-medium" },
@ -1962,7 +1962,7 @@
},
"wind-idle": {
"slots": {
"star1": {
"stars/star1": {
"attachment": [
{ "time": 0.1333, "name": "star-small" },
{ "time": 0.2667, "name": "star-medium" },
@ -2020,7 +2020,7 @@
{ "time": 9.2667 }
]
},
"star2": {
"stars/star2": {
"attachment": [
{ "time": 0.1333, "name": "star-small" },
{ "time": 0.2667, "name": "star-medium" },
@ -2078,7 +2078,7 @@
{ "time": 9.2667 }
]
},
"star3": {
"stars/star3": {
"attachment": [
{ "time": 0.1333, "name": "star-small" },
{ "time": 0.2667, "name": "star-medium" },
@ -2136,7 +2136,7 @@
{ "time": 9.2667 }
]
},
"star4": {
"stars/star4": {
"attachment": [
{ "time": 0.7667, "name": "star-small" },
{ "time": 0.9, "name": "star-medium" },
@ -2194,7 +2194,7 @@
{ "time": 9.6 }
]
},
"star5": {
"stars/star5": {
"attachment": [
{ "time": 0.3333, "name": "star-small" },
{ "time": 0.4667, "name": "star-medium" },
@ -2252,7 +2252,7 @@
{ "time": 9.3667 }
]
},
"star6": {
"stars/star6": {
"attachment": [
{ "time": 0.7667, "name": "star-small" },
{ "time": 0.9, "name": "star-medium" },

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "5SlwDA/FRms",
"spine": "4.2.64-beta",
"hash": "B+1abJH59zk",
"spine": "4.2.22",
"x": -180,
"y": -37.5,
"width": 360,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "CKnF82un6n8",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -345,
"y": -272846.84,
"width": 756,
@ -405,51 +405,51 @@
{
"name": "default",
"attachments": {
"cloud-base-1": {
"cloud/cloud-base/cloud-base-1": {
"cloud-base-1": { "width": 465, "height": 420 }
},
"cloud-base-2": {
"cloud/cloud-base/cloud-base-2": {
"cloud-base-2": { "width": 420, "height": 415 }
},
"cloud-base-3": {
"cloud/cloud-base/cloud-base-3": {
"cloud-base-3": { "width": 349, "height": 327 }
},
"cloud-base-4": {
"cloud/cloud-base/cloud-base-4": {
"cloud-base-4": { "width": 352, "height": 326 }
},
"cloud-base-5": {
"cloud/cloud-base/cloud-base-5": {
"cloud-base-5": { "width": 289, "height": 250 }
},
"cloud-base-6": {
"cloud/cloud-base/cloud-base-6": {
"cloud-base-6": { "width": 322, "height": 272 }
},
"cloud-base-7": {
"cloud/cloud-base/cloud-base-7": {
"cloud-base-7": { "width": 300, "height": 297 }
},
"cloud-base-8": {
"cloud/cloud-base/cloud-base-8": {
"cloud-base-8": { "width": 307, "height": 256 }
},
"cloud-base-9": {
"cloud/cloud-base/cloud-base-9": {
"cloud-base-9": { "width": 214, "height": 216 }
},
"cloud-base-10": {
"cloud/cloud-base/cloud-base-10": {
"cloud-base-10": { "width": 193, "height": 201 }
},
"cloud-cheeks": {
"cloud/cloud-cheeks": {
"cloud-cheeks": { "x": -19, "y": -53.93, "width": 435, "height": 158 }
},
"cloud-eyes": {
"cloud/cloud-eyes": {
"cloud-eyes-closed": { "x": -10, "y": -5.43, "width": 263, "height": 43 },
"cloud-eyes-open": { "x": -8, "y": -4.43, "width": 265, "height": 51 }
},
"cloud-eyes-reflex": {
"cloud/cloud-eyes-reflex": {
"cloud-eyes-reflex": { "x": -10, "y": 2.07, "width": 239, "height": 34 }
},
"cloud-mouth": {
"cloud/cloud-mouth": {
"cloud-mouth-closed": { "y": -14.93, "width": 97, "height": 32 },
"cloud-mouth-open": { "x": -0.5, "y": -27.93, "width": 118, "height": 70 }
},
"leaf-big": {
"flower/leaf-big": {
"leaf-big": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.75, 0, 0.5, 0, 0.25, 0, 0, 1, 0, 1, 0.25, 1, 0.5, 1, 0.75 ],
@ -461,19 +461,19 @@
"height": 98
}
},
"leaf-small": {
"flower/leaf-small": {
"leaf-small": { "x": 25.02, "y": 0.4, "rotation": -91.36, "width": 34, "height": 59 }
},
"petal-1": {
"flower/petal-1": {
"petal-1": { "x": 18.88, "y": -4.54, "rotation": -160.18, "width": 52, "height": 36 }
},
"petal-2": {
"flower/petal-2": {
"petal-2": { "x": 21.96, "y": 2.06, "rotation": -9.66, "width": 56, "height": 34 }
},
"petal-3": {
"flower/petal-3": {
"petal-3": { "x": 16.97, "y": -5.71, "rotation": -91.03, "width": 58, "height": 42 }
},
"stem": {
"flower/stem": {
"stem": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.90909, 0, 0.81818, 0, 0.72727, 0, 0.63636, 0, 0.54545, 0, 0.45455, 0, 0.36364, 0, 0.27273, 0, 0.18182, 0, 0.09091, 0, 0, 1, 0, 1, 0.09091, 1, 0.18182, 1, 0.27273, 1, 0.36364, 1, 0.45455, 1, 0.54545, 1, 0.63636, 1, 0.72727, 1, 0.81818, 1, 0.90909 ],
@ -485,35 +485,35 @@
"height": 210
}
},
"stem-end": {
"flower/stem-end": {
"stem-end": { "x": 25.8, "y": -0.26, "rotation": -90, "width": 25, "height": 26 }
},
"pot-base": {
"pot/pot-base": {
"pot-base": { "x": 5, "y": 42, "width": 152, "height": 118 }
},
"pot-eyes": {
"pot/pot-eyes": {
"pot-eyes-closed": { "x": -0.94, "y": 2.34, "width": 92, "height": 17 },
"pot-eyes-open": { "x": 0.06, "y": 3.84, "width": 80, "height": 22 }
},
"pot-mouth": {
"pot/pot-mouth": {
"pot-mouth-open": { "x": -1.44, "y": -13.66, "width": 27, "height": 31 },
"pot-mouth-pouty": { "x": 0.56, "y": -12.66, "width": 35, "height": 19 },
"pot-mouth-smile": { "x": 0.56, "y": -12.16, "width": 27, "height": 20 },
"pot-mouth-smile-big": { "x": 1.56, "y": -9.16, "width": 39, "height": 18 }
},
"rain-blue": {
"rain/rain-blue": {
"rain-blue": { "width": 23, "height": 36 }
},
"rain-color": {
"rain/rain-color": {
"rain-color": { "width": 18, "height": 34 }
},
"rain-green": {
"rain/rain-green": {
"rain-green": { "width": 23, "height": 36 }
},
"rain-white": {
"rain/rain-white": {
"rain-white": { "width": 23, "height": 44 }
},
"rain-white-reflex": {
"rain/rain-white-reflex": {
"rain-white-reflex": { "x": -0.5, "y": 3.5, "width": 10, "height": 19 }
}
}
@ -522,7 +522,7 @@
"animations": {
"playing-in-the-rain": {
"slots": {
"cloud-eyes": {
"cloud/cloud-eyes": {
"attachment": [
{ "time": 0.2, "name": "cloud-eyes-closed" },
{ "time": 0.9, "name": "cloud-eyes-open" },
@ -534,13 +534,13 @@
{ "time": 4.1, "name": "cloud-eyes-open" }
]
},
"cloud-mouth": {
"cloud/cloud-mouth": {
"attachment": [
{ "time": 0.2, "name": "cloud-mouth-open" },
{ "time": 0.9, "name": "cloud-mouth-closed" }
]
},
"pot-eyes": {
"pot/pot-eyes": {
"attachment": [
{ "time": 0.1333, "name": "pot-eyes-closed" },
{ "time": 0.3, "name": "pot-eyes-open" },
@ -552,7 +552,7 @@
{ "time": 3.6667, "name": "pot-eyes-open" }
]
},
"pot-mouth": {
"pot/pot-mouth": {
"attachment": [
{ "time": 0.1333, "name": "pot-mouth-open" },
{ "time": 0.3, "name": "pot-mouth-smile-big" },

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "fKr+fe4rKEk",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -152.5,
"y": -151,
"width": 305,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "fE1TdXi9fk4",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -366.31,
"y": -327.81,
"width": 660.39,

View File

@ -54,29 +54,6 @@ rm -f "$ROOT/spine-libgdx/spine-libgdx-tests/assets/cloud-pot/"*
mkdir -p "$ROOT/spine-libgdx/spine-libgdx-tests/assets/cloud-pot/"
cp -f ../cloud-pot/export/* "$ROOT/spine-libgdx/spine-libgdx-tests/assets/cloud-pot/"
echo "spine-cocos2d-objc"
rm "$ROOT/spine-cocos2d-objc/Resources/"*
cp -f ../coin/export/coin-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../coin/export/coin.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../coin/export/coin.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../goblins/export/goblins-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../goblins/export/goblins.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../goblins/export/goblins.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../raptor/export/raptor.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../raptor/export/raptor.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../tank/export/tank-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../tank/export/tank.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../tank/export/tank.png "$ROOT/spine-cocos2d-objc/Resources/"
echo "spine-cocos2dx"
rm -rf "$ROOT/spine-cocos2dx/example/Resources/common/"*
@ -132,6 +109,30 @@ cp -f ../celestial-circus/export/celestial-circus-pro.skel "$ROOT/spine-flutter/
cp -f ../celestial-circus/export/celestial-circus.atlas "$ROOT/spine-flutter/example/assets/"
cp -f ../celestial-circus/export/celestial-circus.png "$ROOT/spine-flutter/example/assets/"
echo "spine-ios"
cp -f ../celestial-circus/export/celestial-circus-pro.skel "$ROOT/spine-ios/Example/Spine iOS Example/Assets/celestial/"
cp -f ../celestial-circus/export/celestial-circus-pma.atlas "$ROOT/spine-ios/Example/Spine iOS Example/Assets/celestial/"
cp -f ../celestial-circus/export/celestial-circus-pma.png "$ROOT/spine-ios/Example/Spine iOS Example/Assets/celestial/"
cp -f ../dragon/export/dragon-ess.skel "$ROOT/spine-ios/Example/Spine iOS Example/Assets/dragon/"
cp -f ../dragon/export/dragon.atlas "$ROOT/spine-ios/Example/Spine iOS Example/Assets/dragon/"
cp -f ../dragon/export/dragon.png "$ROOT/spine-ios/Example/Spine iOS Example/Assets/dragon/"
cp -f ../dragon/export/dragon_*.png "$ROOT/spine-ios/Example/Spine iOS Example/Assets/dragon/"
cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-ios/Example/Spine iOS Example/Assets/mixandmatch/"
cp -f ../mix-and-match/export/mix-and-match-pma.atlas "$ROOT/spine-ios/Example/Spine iOS Example/Assets/mixandmatch/"
cp -f ../mix-and-match/export/mix-and-match-pma.png "$ROOT/spine-ios/Example/Spine iOS Example/Assets/mixandmatch/"
cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-ios/Example/Spine iOS Example/Assets/spineboy/"
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ios/Example/Spine iOS Example/Assets/spineboy/"
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ios/Example/Spine iOS Example/Assets/spineboy/"
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ios/Example/Spine iOS Example/Assets/spineboy/"
cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-ios/Example - Cocoapods/Spine iOS Example/spineboy/"
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ios/Example - Cocoapods/Spine iOS Example/spineboy/"
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ios/Example - Cocoapods/Spine iOS Example/spineboy/"
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ios/Example - Cocoapods/Spine iOS Example/spineboy/"
echo "spine-godot"
rm -f "$ROOT"/spine-godot/example/assets/spineboy/*.atlas
rm -f "$ROOT"/spine-godot/example/assets/spineboy/*.png
@ -248,8 +249,8 @@ cp -f ../celestial-circus/export/celestial-circus.png "$ROOT/spine-godot/example
echo "spine-sdl"
rm -f "$ROOT/spine-sdl/data/"*
cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-sdl/data/"
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-sdl/data/"
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-sdl/data/"
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-sdl/data/"
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-sdl/data/"
echo "spine-sfml-c"
rm "$ROOT/spine-sfml/c/data/"*
@ -455,6 +456,7 @@ rm "$ROOT/spine-ts/spine-threejs/example/assets/"*
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-threejs/example/assets/"
cp -f ../raptor/export/raptor.atlas "$ROOT/spine-ts/spine-threejs/example/assets/"
cp -f ../raptor/export/raptor.png "$ROOT/spine-ts/spine-threejs/example/assets/"
cp -f ../celestial-circus/export/* "$ROOT/spine-ts/spine-threejs/example/assets/"
rm "$ROOT/spine-ts/spine-player/example/assets/"*
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-player/example/assets/"
@ -512,6 +514,7 @@ rm "$ROOT/spine-ts/spine-pixi/example/assets/"*
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../raptor/export/raptor.atlas "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../raptor/export/raptor.png "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../raptor/images/raptor-jaw-tooth.png "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-pixi/example/assets/"
@ -520,6 +523,10 @@ cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-pixi/example/ass
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-pixi/example/typescript/assets/"
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-pixi/example/typescript/assets/"
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-pixi/example/typescript/assets/"
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../coin/export/coin-pma.atlas "$ROOT/spine-ts/spine-pixi/example/assets/"
cp -f ../coin/export/coin-pma.png "$ROOT/spine-ts/spine-pixi/example/assets/"

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "GVlVB8/J+xE",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -92.53,
"y": -5.3,
"width": 234.03,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "r8iwnU9Tvmc",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -134.12,
"y": -3.28,
"width": 266.94,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "AksZhY5c66s",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -87.83,
"y": 0.01,
"width": 319.3,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "1GKrwevyJb4",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -85.7,
"y": -0.02,
"width": 321.77,

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

After

Width:  |  Height:  |  Size: 369 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

After

Width:  |  Height:  |  Size: 341 KiB

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "XOfL7Ab60mk",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -644,
"y": -274,
"width": 1350.84,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "SMKZWKRLgw8",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -207.3,
"y": 119.41,
"width": 413.19,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "KfBT6bmTX6g",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -208.76,
"y": 119.41,
"width": 414.65,

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "210ocy+FNY8",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -265.35,
"y": -64.53,
"width": 519,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "7c5zrxkBXpw",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -938.98,
"y": -1030.95,
"width": 1839,
@ -872,7 +872,7 @@
"globe-texture-strong": {
"globe-texture-strong": { "x": 0.5, "y": 599.62, "width": 1759, "height": 1761 }
},
"blue-present-base": {
"blue-present/blue-present-base": {
"blue-present-base": {
"type": "mesh",
"uvs": [ 0.50853, 0, 1, 0.18835, 0.96801, 0.73665, 0.51693, 1, 0.48629, 1, 0.03326, 0.73855, 0, 0.18837, 0.49146, 0, 0.49911, 0.39604 ],
@ -884,7 +884,7 @@
"height": 277
}
},
"blue-present-decoration": {
"blue-present/blue-present-decoration": {
"blue-present-decoration": {
"type": "mesh",
"uvs": [ 0.66739, 1, 0.45154, 1, 0.13592, 0.89585, 0, 0.64975, 0, 0.4514, 0.08513, 0.13368, 0.39168, 0, 0.57851, 0, 0.81795, 0.10796, 1, 0.38712, 1, 0.57078, 0.89957, 0.83892, 0.49689, 0.47528 ],
@ -896,7 +896,7 @@
"height": 80
}
},
"green-present-base": {
"green-present/green-present-base": {
"green-present-base": {
"type": "mesh",
"uvs": [ 0.51279, 0, 0.99938, 0.1886, 0.96979, 0.73536, 0.51655, 1, 0.48608, 1, 0.0268, 0.73758, 1.0E-5, 0.18489, 0.49056, 0, 0.49869, 0.40079 ],
@ -908,7 +908,7 @@
"height": 277
}
},
"green-present-decoration": {
"green-present/green-present-decoration": {
"green-present-decoration": {
"type": "mesh",
"uvs": [ 0.6665, 0.99999, 0.42715, 0.99999, 0.13617, 0.8864, 0, 0.65593, 0, 0.42309, 0.09393, 0.10947, 0.40369, 0, 0.58437, 0, 0.81903, 0.12134, 1, 0.39933, 1, 0.60604, 0.88709, 0.83175, 0.49286, 0.48011 ],
@ -920,7 +920,7 @@
"height": 80
}
},
"red-present-base": {
"red-present/red-present-base": {
"red-present-base": {
"type": "mesh",
"uvs": [ 0.51918, 0, 0.99886, 0.18782, 0.96906, 0.73897, 0.51437, 1, 0.48538, 1, 0.03065, 0.73666, 0.00102, 0.18575, 0.49272, 0, 0.4956, 0.39969 ],
@ -932,7 +932,7 @@
"height": 277
}
},
"red-present-decoration": {
"red-present/red-present-decoration": {
"red-present-decoration": {
"type": "mesh",
"uvs": [ 0.46117, 1, 0.15983, 0.92289, 0, 0.67469, 0, 0.43201, 0.09257, 0.13969, 0.39121, 0, 0.57955, 0, 0.82707, 0.13418, 1, 0.38513, 1, 0.61127, 0.9024, 0.85946, 0.63067, 1, 0.49614, 0.47062 ],
@ -944,25 +944,25 @@
"height": 80
}
},
"snow": {
"snow/snow": {
"snow": { "x": -492, "y": 1041.62, "width": 54, "height": 55 }
},
"snow2": {
"snow/snow2": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow3": {
"snow/snow3": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow4": {
"snow/snow4": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow5": {
"snow/snow5": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow6": {
"snow/snow6": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow7": {
"snow/snow7": {
"snow": {
"x": 58.21,
"y": 106.44,
@ -973,7 +973,7 @@
"height": 55
}
},
"snow8": {
"snow/snow8": {
"snow": {
"x": 123.14,
"y": -91.47,
@ -984,7 +984,7 @@
"height": 55
}
},
"snow9": {
"snow/snow9": {
"snow": {
"x": -58.21,
"y": -176.29,
@ -995,7 +995,7 @@
"height": 55
}
},
"snow10": {
"snow/snow10": {
"snow": {
"x": -219.53,
"y": 59.87,
@ -1006,10 +1006,10 @@
"height": 55
}
},
"snow11": {
"snow/snow11": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow12": {
"snow/snow12": {
"snow": {
"x": 123.14,
"y": -91.47,
@ -1020,10 +1020,10 @@
"height": 55
}
},
"snow13": {
"snow/snow13": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow14": {
"snow/snow14": {
"snow": {
"x": -219.53,
"y": 59.87,
@ -1034,10 +1034,10 @@
"height": 55
}
},
"snow15": {
"snow/snow15": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow16": {
"snow/snow16": {
"snow": {
"x": -58.21,
"y": -176.29,
@ -1048,10 +1048,10 @@
"height": 55
}
},
"snow17": {
"snow/snow17": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow18": {
"snow/snow18": {
"snow": {
"x": 58.21,
"y": 106.44,
@ -1062,13 +1062,13 @@
"height": 55
}
},
"snow19": {
"snow/snow19": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow20": {
"snow/snow20": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow21": {
"snow/snow21": {
"snow": {
"x": 62.06,
"y": -107.37,
@ -1079,10 +1079,10 @@
"height": 55
}
},
"snow22": {
"snow/snow22": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow23": {
"snow/snow23": {
"snow": {
"x": 58.21,
"y": 106.44,
@ -1093,10 +1093,10 @@
"height": 55
}
},
"snow24": {
"snow/snow24": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow25": {
"snow/snow25": {
"snow": {
"x": -219.53,
"y": 59.87,
@ -1107,10 +1107,10 @@
"height": 55
}
},
"snow26": {
"snow/snow26": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow27": {
"snow/snow27": {
"snow": {
"x": -219.53,
"y": 59.87,
@ -1121,10 +1121,10 @@
"height": 55
}
},
"snow28": {
"snow/snow28": {
"snow": { "scaleX": 0.5337, "scaleY": 0.5337, "rotation": -27.83, "width": 54, "height": 55 }
},
"snow29": {
"snow/snow29": {
"snow": {
"x": -219.53,
"y": 59.87,
@ -1135,7 +1135,7 @@
"height": 55
}
},
"hair-front": {
"spineboy/hair/hair-front": {
"hair-front": {
"type": "mesh",
"uvs": [ 0.71107, 0.16147, 0.81377, 0.42273, 0.88628, 0.78595, 0.99999, 0.85225, 1, 0.99999, 0.79392, 0.99999, 0.68706, 0.86986, 0.54078, 0.88496, 0.34143, 0.80748, 0, 0.52075, 0, 0.23603, 0.21536, 0, 0.4925, 0.00704, 0.1679, 0.33789, 0.3548, 0.41858, 0.63776, 0.42627, 0.39245, 0.59918, 0.54041, 0.60302, 0.66113, 0.61455, 0.22111, 0.58765 ],
@ -1147,7 +1147,7 @@
"height": 202
}
},
"hair-side": {
"spineboy/hair/hair-side": {
"hair-side": {
"type": "mesh",
"uvs": [ 1, 0.34837, 0.47104, 0.99999, 0, 1, 0.18033, 1.0E-5, 1, 0 ],
@ -1159,7 +1159,7 @@
"height": 106
}
},
"hair-side2": {
"spineboy/hair/hair-side2": {
"hair-side": {
"type": "mesh",
"uvs": [ 1, 0.34837, 0.47104, 0.99999, 0, 1, 0.18033, 1.0E-5, 1, 0 ],
@ -1171,7 +1171,7 @@
"height": 106
}
},
"hair-strand-1": {
"spineboy/hair/hair-strand-1": {
"hair-strand-1": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1183,7 +1183,7 @@
"height": 130
}
},
"hair-strand-2": {
"spineboy/hair/hair-strand-2": {
"hair-strand-2": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1195,7 +1195,7 @@
"height": 131
}
},
"hair-strand-3": {
"spineboy/hair/hair-strand-3": {
"hair-strand-3": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1207,7 +1207,7 @@
"height": 105
}
},
"hair-strand-4": {
"spineboy/hair/hair-strand-4": {
"hair-strand-4": {
"type": "mesh",
"uvs": [ 0.22258, 0, 0.54021, 0.34357, 0.8482, 0.67671, 1, 0.8409, 1, 0.99999, 0.89105, 0.99169, 0.59668, 0.72304, 0.28439, 0.43803, 0.02942, 0.20532, 0, 1.0E-5 ],
@ -1219,7 +1219,7 @@
"height": 138
}
},
"hair-strand-5": {
"spineboy/hair/hair-strand-5": {
"hair-strand-5": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1231,7 +1231,7 @@
"height": 94
}
},
"hair-strand-6": {
"spineboy/hair/hair-strand-6": {
"hair-strand-6": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1243,7 +1243,7 @@
"height": 69
}
},
"scarf-end-l": {
"spineboy/scarf/scarf-end-l": {
"scarf-end-l": {
"type": "mesh",
"uvs": [ 0.4734, 0.20703, 1, 0.62461, 1, 1, 0.53345, 0.99994, 0.25171, 0.67741, 1.0E-5, 0.38928, 0, 0, 0.23817, 0.02989, 0.80823, 0.57127, 0.64116, 0.48909, 0.45462, 0.34715, 0.73524, 0.88317, 0.5633, 0.79912, 0.35405, 0.61983 ],
@ -1255,7 +1255,7 @@
"height": 218
}
},
"scarf-end-r": {
"spineboy/scarf/scarf-end-r": {
"scarf-end-r": {
"type": "mesh",
"uvs": [ 0.99999, 0.28626, 0.76567, 0.6287, 0.47657, 0.99999, 0, 1, 0, 0.37436, 0.44822, 0.34612, 0.76738, 0, 1, 0, 0.34323, 0.78347, 0.15263, 0.79785, 0.1891, 0.48977, 0.3597, 0.51236, 0.52677, 0.67872, 0.90209, 0.23509, 0.475, 0.48361, 0.81149, 0.09954 ],
@ -1267,13 +1267,13 @@
"height": 173
}
},
"scarf-pompom-l": {
"spineboy/scarf/scarf-pompom-l": {
"scarf-pompom-l": { "x": -4.02, "y": -1.27, "width": 99, "height": 91 }
},
"scarf-pompom-r": {
"spineboy/scarf/scarf-pompom-r": {
"scarf-pompom-r": { "x": 8.48, "y": -6.33, "width": 97, "height": 94 }
},
"scarf-ribbon-bottom-l": {
"spineboy/scarf/scarf-ribbon-bottom-l": {
"scarf-ribbon-bottom-l": {
"type": "mesh",
"uvs": [ 0.91085, 0.2271, 1, 0.18972, 1, 1, 0.55658, 1, 0, 0.40781, 0, 0, 0.43499, 0, 0.64238, 0.33966, 0.71966, 0.78323, 0.58978, 0.64736, 0.38873, 0.31128 ],
@ -1285,7 +1285,7 @@
"height": 105
}
},
"scarf-ribbon-bottom-r": {
"spineboy/scarf/scarf-ribbon-bottom-r": {
"scarf-ribbon-bottom-r": {
"type": "mesh",
"uvs": [ 1, 0.32594, 0.99999, 0.64132, 0.38718, 1, 0, 1, 0, 0, 0.8313, 0, 1, 0, 0.3046, 0.70624, 0.11244, 0.56197, 0.12619, 0.21274 ],
@ -1297,7 +1297,7 @@
"height": 114
}
},
"scarf-ribbon-middle-l": {
"spineboy/scarf/scarf-ribbon-middle-l": {
"scarf-ribbon-middle-l": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.70215, 0.39649, 0.67578, 0.61507, 0.49163, 0.73933 ],
@ -1309,7 +1309,7 @@
"height": 180
}
},
"scarf-ribbon-middle-r": {
"spineboy/scarf/scarf-ribbon-middle-r": {
"scarf-ribbon-middle-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.35576, 0.65533, 0.29901, 0.25743, 0.45967, 0.85661 ],
@ -1321,7 +1321,7 @@
"height": 177
}
},
"scarf-ribbon-top-l": {
"spineboy/scarf/scarf-ribbon-top-l": {
"scarf-ribbon-top-l": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.83108, 0.33574, 0.51831, 0.33138, 0.85066, 0.73438, 0.96801, 0.74159 ],
@ -1333,7 +1333,7 @@
"height": 115
}
},
"scarf-ribbon-top-r": {
"spineboy/scarf/scarf-ribbon-top-r": {
"scarf-ribbon-top-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.07535, 0.38381, 0.37604, 0.36481 ],
@ -1345,13 +1345,13 @@
"height": 105
}
},
"arm-down-l": {
"spineboy/arm-down-l": {
"arm-down-l": { "x": -19.99, "y": 17.79, "rotation": 94.56, "width": 112, "height": 108 }
},
"arm-down-l-fuzzy": {
"spineboy/arm-down-l-fuzzy": {
"arm-down-l-fuzzy": { "x": 4.64, "y": -8.49, "rotation": 94.56, "width": 113, "height": 118 }
},
"arm-down-r": {
"spineboy/arm-down-r": {
"arm-down-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.22928, 0.20267, 0.7513, 0.4204, 0.16814, 0.57114, 0.69251, 0.74532 ],
@ -1363,10 +1363,10 @@
"height": 106
}
},
"arm-down-r-fuzzy": {
"spineboy/arm-down-r-fuzzy": {
"arm-down-r-fuzzy": { "x": 7.4, "y": 6.44, "rotation": 111.25, "width": 122, "height": 132 }
},
"arm-up-l": {
"spineboy/arm-up-l": {
"arm-up-l": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.3591, 0.14081, 0.2538, 0.81668, 0.71162, 0.14276, 0.57427, 0.82837 ],
@ -1378,7 +1378,7 @@
"height": 228
}
},
"arm-up-r": {
"spineboy/arm-up-r": {
"arm-up-r": {
"type": "mesh",
"uvs": [ 1, 0.31848, 0.5165, 1, 0, 1, 0, 0.68696, 0.42176, 0, 1, 0, 0.12481, 0.80136, 0.61573, 0.10829, 0.39034, 0.86452, 0.84729, 0.17657 ],
@ -1390,7 +1390,7 @@
"height": 208
}
},
"body": {
"spineboy/body": {
"body": {
"type": "mesh",
"uvs": [ 0.99999, 0.40382, 0.96426, 0.52521, 0.91782, 0.68301, 0.88764, 0.78553, 0.82452, 0.99999, 0, 1, 1.0E-5, 0.60681, 0.05298, 0.48377, 0.10509, 0.36272, 0.16052, 0.23394, 0.26122, 1.0E-5, 1, 0, 0.36992, 0.38991, 0.77511, 0.46373, 0.20672, 0.77067, 0.6513, 0.86262, 0.26441, 0.64504, 0.33194, 0.50776, 0.73009, 0.60101, 0.68225, 0.73829 ],
@ -1402,7 +1402,7 @@
"height": 302
}
},
"ear-l": {
"spineboy/ear-l": {
"ear-l": {
"type": "mesh",
"uvs": [ 1, 0.25439, 0.59936, 1, 0, 1, 0, 0.40911, 0.83452, 0, 1, 0, 0.3097, 0.69014, 0.9263, 0.1344 ],
@ -1414,7 +1414,7 @@
"height": 99
}
},
"ear-r": {
"spineboy/ear-r": {
"ear-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0, 0.43294, 0.44023, 0.6716, 0.76972 ],
@ -1426,13 +1426,13 @@
"height": 132
}
},
"eye-reflex-l": {
"spineboy/eye-reflex-l": {
"eye-reflex-l": { "x": 70.7, "y": 9.01, "width": 24, "height": 26 }
},
"eye-reflex-r": {
"spineboy/eye-reflex-r": {
"eye-reflex-r": { "x": -85.3, "y": 22.01, "width": 20, "height": 24 }
},
"eye-white-l": {
"spineboy/eye-white-l": {
"eye-white-l": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1444,7 +1444,7 @@
"height": 85
}
},
"eye-white-l2": {
"spineboy/eye-white-l2": {
"eye-white-l": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1456,7 +1456,7 @@
"height": 85
}
},
"eye-white-r": {
"spineboy/eye-white-r": {
"eye-white-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1468,7 +1468,7 @@
"height": 96
}
},
"eye-white-r2": {
"spineboy/eye-white-r2": {
"eye-white-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1480,7 +1480,7 @@
"height": 96
}
},
"eyelashes-l": {
"spineboy/eyelashes-l": {
"eyelashes-l": {
"type": "mesh",
"uvs": [ 0.2372, 0.38742, 0.37158, 0.22968, 0.53232, 0.11449, 0.69207, 0, 0.85866, 0, 0.99999, 0.1265, 0.9752, 0.25688, 0.82976, 0.10239, 0.6813, 0.14216, 0.60109, 0.21003, 0.47393, 0.31763, 0.35663, 0.49265, 0.21713, 0.70079, 0.1628, 0.8083, 0.06594, 1, 1.0E-5, 1, 0, 0.81483, 0.04492, 0.69556, 0.10057, 0.54782 ],
@ -1492,7 +1492,7 @@
"height": 79
}
},
"eyelashes-r": {
"spineboy/eyelashes-r": {
"eyelashes-r": {
"type": "mesh",
"uvs": [ 0.31674, 0, 0.47408, 0, 0.58539, 0.11318, 0.682, 0.21141, 0.79148, 0.32272, 0.89887, 0.43191, 0.9521, 0.60429, 0.98849, 0.72215, 0.98304, 1, 0.91058, 1, 0.85091, 0.76776, 0.7934, 0.63242, 0.73491, 0.49475, 0.64614, 0.39742, 0.53997, 0.28099, 0.43829, 0.19769, 0.34, 0.11716, 0.17764, 0.2005, 0, 0.37269, 0, 0.31373, 0.11001, 0.10017 ],
@ -1504,7 +1504,7 @@
"height": 94
}
},
"gift-base": {
"spineboy/gift-base": {
"gift-base": {
"type": "mesh",
"uvs": [ 0.35756, 0.94449, 1.0E-5, 0.70989, 0.1241, 0, 0.58753, 0, 1, 0.2512, 0.99999, 0.31643, 0.77744, 1 ],
@ -1516,7 +1516,7 @@
"height": 209
}
},
"gift-decoration": {
"spineboy/gift-decoration": {
"gift-decoration": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1528,25 +1528,25 @@
"height": 80
}
},
"glove-fingers-l": {
"spineboy/glove-fingers-l": {
"glove-fingers-l": { "x": 5.92, "y": 13.18, "rotation": 94.56, "width": 78, "height": 102 }
},
"glove-fingers-r": {
"spineboy/glove-fingers-r": {
"glove-fingers-r": { "x": 2.48, "y": 6.67, "rotation": 111.25, "width": 82, "height": 111 }
},
"glove-l": {
"spineboy/glove-l": {
"glove-l": { "x": -1.42, "y": 17.11, "rotation": 94.56, "width": 79, "height": 122 }
},
"glove-r": {
"spineboy/glove-r": {
"glove-r": { "x": -4.54, "y": 1.26, "rotation": 111.25, "width": 87, "height": 130 }
},
"glove-shadow-l": {
"spineboy/glove-shadow-l": {
"glove-shadow-l": { "x": 18.1, "y": -7.41, "rotation": 94.56, "width": 55, "height": 113 }
},
"glove-shadow-r": {
"spineboy/glove-shadow-r": {
"glove-shadow-r": { "x": 11.23, "y": 18.65, "rotation": 111.25, "width": 76, "height": 124 }
},
"hat": {
"spineboy/hat": {
"hat": {
"type": "mesh",
"uvs": [ 0.52004, 0.10532, 0.68467, 0.21125, 0.8019, 0.34533, 0.90194, 0.45977, 0.97481, 0.54312, 1, 0.71252, 0.96244, 0.85248, 0.65088, 1, 0.34533, 1, 0, 0.84576, 0, 0.65074, 0.13207, 0.51285, 0.20789, 0.39358, 0.27592, 0.28656, 0.31485, 0.17297, 0.27247, 0.08157, 0.10739, 0.1163, 0.1406, 0.12061, 0.19897, 0.10447, 0.27138, 0.1265, 0.274, 0.20855, 0.17878, 0.24469, 0.11055, 0.20605, 0.05218, 0.16499, 0.03611, 0.09819, 0.08273, 0.04778, 0.19875, 0, 0.35926, 0.00187, 0.30969, 0.53587, 0.33624, 0.43235, 0.74459, 0.52183, 0.71172, 0.42098, 0.42359, 0.23708, 0.40072, 0.1148, 0.57233, 0.20584, 0.63765, 0.32983, 0.37113, 0.35903 ],
@ -1558,7 +1558,7 @@
"height": 441
}
},
"head-base": {
"spineboy/head-base": {
"head-base": {
"type": "mesh",
"uvs": [ 0.75, 1, 0.25, 1, 0, 0.75, 0, 0.25, 0.25, 0, 0.75, 0, 1, 0.25, 1, 0.75, 0.5, 0.75, 0.29386, 0.76762, 0.79086, 0.48938, 0.5, 0.5, 0.26002, 0.45978, 0.88435, 0.4671, 0.49577, 0.28896, 0.63253, 0.75027, 0.32554, 0.72619, 0.68973, 0.74485, 0.15329, 0.39932, 0.33266, 0.58577, 0.69936, 0.59439, 0.72031, 0.77865, 0.19834, 0.77583, 0.12476, 0.72297, 0.07524, 0.61019, 0.08585, 0.49671, 0.83854, 0.78996, 0.90787, 0.73427, 0.94608, 0.63489, 0.93617, 0.55326, 0.91592, 0.73936, 0.85236, 0.81173, 0.96215, 0.63656, 0.97948, 0.54591, 0.72216, 0.83025, 0.63679, 0.54313, 0.75434, 0.42552, 0.39998, 0.54631, 0.31788, 0.41129, 0.16924, 0.34789, 0.0415, 0.6223, 0.09251, 0.73845, 0.18034, 0.81825, 0.05455, 0.45327, 0.69368, 0.90872, 0.33312, 0.91056, 0.51479, 0.95304, 0.37761, 0.83115, 0.66865, 0.83115, 0.52684, 0.87824, 0.33138, 0.65955, 0.29093, 0.51192, 0.20151, 0.40841, 0.67579, 0.69193, 0.68388, 0.63721, 0.74009, 0.54812, 0.7733, 0.50994, 0.84739, 0.46031, 0.78218, 0.79196 ],
@ -1570,7 +1570,7 @@
"height": 269
}
},
"iris-l": {
"spineboy/iris-l": {
"iris-l": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1582,7 +1582,7 @@
"height": 81
}
},
"iris-r": {
"spineboy/iris-r": {
"iris-r": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1594,7 +1594,7 @@
"height": 81
}
},
"leg-down-l": {
"spineboy/leg-down-l": {
"leg-down-l": {
"type": "mesh",
"uvs": [ 0.96841, 0.70287, 0.53786, 1, 0.31884, 1, 0, 1, 0, 0.40396, 0.60137, 1.0E-5, 1, 0, 0.10357, 0.59475, 0.75174, 0.2153, 0.15271, 0.80038, 0.85119, 0.53964 ],
@ -1606,7 +1606,7 @@
"height": 101
}
},
"leg-down-r": {
"spineboy/leg-down-r": {
"leg-down-r": {
"type": "mesh",
"uvs": [ 0.26439, 0, 0.99347, 0.55042, 1, 1, 0.48857, 1, 0, 0.23406, 1.4E-4, 2.0E-5, 0.131, 0.12257, 0.63326, 0.8625, 0.29584, 0.09035, 0.90243, 0.6964 ],
@ -1618,7 +1618,7 @@
"height": 205
}
},
"leg-up-l": {
"spineboy/leg-up-l": {
"leg-up-l": {
"type": "mesh",
"uvs": [ 0.94975, 0.99999, 0.01117, 0.99999, 0, 0, 1, 0, 0.22104, 0.87502, 0.31036, 0.14253, 0.61184, 0.88117, 0.757, 0.14622 ],
@ -1630,10 +1630,10 @@
"height": 293
}
},
"leg-up-l-fuzzy": {
"spineboy/leg-up-l-fuzzy": {
"leg-up-l-fuzzy": { "x": 4.7, "y": -27.19, "rotation": 93.08, "width": 146, "height": 130 }
},
"leg-up-r": {
"spineboy/leg-up-r": {
"leg-up-r": {
"type": "mesh",
"uvs": [ 0.99999, 0.30846, 0.4712, 0.83821, 0, 0.82645, 0, 0.62125, 0.37002, 0.00452, 1, 0, 0.12939, 0.67007, 0.37247, 0.7463, 0.52713, 0.10047, 0.85492, 0.19848 ],
@ -1645,10 +1645,10 @@
"height": 279
}
},
"leg-up-r-fuzzy": {
"spineboy/leg-up-r-fuzzy": {
"leg-up-r-fuzzy": { "x": -21.42, "y": -16.05, "rotation": 112.6, "width": 129, "height": 142 }
},
"mouth": {
"spineboy/mouth": {
"mouth": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1660,10 +1660,10 @@
"height": 26
}
},
"neck-scarf": {
"spineboy/neck-scarf": {
"neck-scarf": { "x": 4.62, "y": 28.43, "width": 284, "height": 227 }
},
"nose": {
"spineboy/nose": {
"nose": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1675,7 +1675,7 @@
"height": 28
}
},
"nose-shadow": {
"spineboy/nose-shadow": {
"nose-shadow": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1687,16 +1687,16 @@
"height": 29
}
},
"pupil-l": {
"spineboy/pupil-l": {
"pupil-l": { "x": -0.71, "y": -0.68, "width": 63, "height": 63 }
},
"pupil-r": {
"spineboy/pupil-r": {
"pupil-r": { "x": -2.86, "y": -0.89, "width": 63, "height": 63 }
},
"scarf-shadow": {
"spineboy/scarf-shadow": {
"scarf-shadow": { "x": -10.38, "y": -22.07, "width": 298, "height": 148 }
},
"shoe-l": {
"spineboy/shoe-l": {
"shoe-l": {
"type": "mesh",
"uvs": [ 1, 0.20875, 0.84568, 0.68848, 0.7435, 0.99999, 0.03754, 1, 1.0E-5, 0.62071, 0.11887, 0.17003, 0.34409, 1.0E-5, 0.97497, 1.0E-5, 0.32113, 0.17541, 0.25857, 0.70246, 0.74238, 0.18294, 0.6965, 0.70676, 0.42331, 0.84982 ],
@ -1708,7 +1708,7 @@
"height": 190
}
},
"shoe-r": {
"spineboy/shoe-r": {
"shoe-r": {
"type": "mesh",
"uvs": [ 1, 0.38031, 0.91953, 0.76989, 0.76433, 0.99999, 0, 1, 0, 0.672, 0.12133, 0.29588, 0.25839, 0, 0.87936, 1.0E-5, 0.2538, 0.73871, 0.75215, 0.7689, 0.38391, 0.30664, 0.84543, 0.3229 ],
@ -1720,7 +1720,7 @@
"height": 186
}
},
"shoelace": {
"spineboy/shoelace": {
"shoelace": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1732,7 +1732,7 @@
"height": 36
}
},
"shoelace2": {
"spineboy/shoelace2": {
"shoelace": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
@ -1744,7 +1744,7 @@
"height": 36
}
},
"string": {
"spineboy/string": {
"string": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.8, 0, 0.6, 0, 0.4, 0, 0.2, 0, 0, 1, 0, 1, 0.2, 1, 0.4, 1, 0.6, 1, 0.8 ],
@ -1756,7 +1756,7 @@
"height": 106
}
},
"string2": {
"spineboy/string2": {
"string": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.8, 0, 0.6, 0, 0.4, 0, 0.2, 0, 0, 1, 0, 1, 0.2, 1, 0.4, 1, 0.6, 1, 0.8 ],
@ -1768,7 +1768,7 @@
"height": 106
}
},
"string3": {
"spineboy/string3": {
"string": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.8, 0, 0.6, 0, 0.4, 0, 0.2, 0, 0, 1, 0, 1, 0.2, 1, 0.4, 1, 0.6, 1, 0.8 ],
@ -1780,7 +1780,7 @@
"height": 106
}
},
"string4": {
"spineboy/string4": {
"string": {
"type": "mesh",
"uvs": [ 1, 1, 0, 1, 0, 0.8, 0, 0.6, 0, 0.4, 0, 0.2, 0, 0, 1, 0, 1, 0.2, 1, 0.4, 1, 0.6, 1, 0.8 ],
@ -2345,25 +2345,25 @@
"drawOrder": [
{
"offsets": [
{ "slot": "red-present-base", "offset": -98 },
{ "slot": "red-present-decoration", "offset": -98 },
{ "slot": "blue-present-base", "offset": -98 },
{ "slot": "blue-present-decoration", "offset": -98 }
{ "slot": "red-present/red-present-base", "offset": -98 },
{ "slot": "red-present/red-present-decoration", "offset": -98 },
{ "slot": "blue-present/blue-present-base", "offset": -98 },
{ "slot": "blue-present/blue-present-decoration", "offset": -98 }
]
},
{ "time": 0.5667 },
{
"time": 1.0333,
"offsets": [
{ "slot": "green-present-base", "offset": -71 },
{ "slot": "green-present-decoration", "offset": -71 }
{ "slot": "green-present/green-present-base", "offset": -71 },
{ "slot": "green-present/green-present-decoration", "offset": -71 }
]
},
{
"time": 1.8,
"offsets": [
{ "slot": "red-present-base", "offset": -98 },
{ "slot": "red-present-decoration", "offset": -98 }
{ "slot": "red-present/red-present-base", "offset": -98 },
{ "slot": "red-present/red-present-decoration", "offset": -98 }
]
}
]
@ -2884,25 +2884,25 @@
"drawOrder": [
{
"offsets": [
{ "slot": "red-present-base", "offset": -98 },
{ "slot": "red-present-decoration", "offset": -98 },
{ "slot": "blue-present-base", "offset": -98 },
{ "slot": "blue-present-decoration", "offset": -98 }
{ "slot": "red-present/red-present-base", "offset": -98 },
{ "slot": "red-present/red-present-decoration", "offset": -98 },
{ "slot": "blue-present/blue-present-base", "offset": -98 },
{ "slot": "blue-present/blue-present-decoration", "offset": -98 }
]
},
{ "time": 0.5667 },
{
"time": 1.0333,
"offsets": [
{ "slot": "green-present-base", "offset": -71 },
{ "slot": "green-present-decoration", "offset": -71 }
{ "slot": "green-present/green-present-base", "offset": -71 },
{ "slot": "green-present/green-present-decoration", "offset": -71 }
]
},
{
"time": 1.8,
"offsets": [
{ "slot": "red-present-base", "offset": -98 },
{ "slot": "red-present-decoration", "offset": -98 }
{ "slot": "red-present/red-present-base", "offset": -98 },
{ "slot": "red-present/red-present-decoration", "offset": -98 }
]
}
]

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "MxRmZm5xinM",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -95.43,
"y": -18.79,
"width": 196.03,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "TC0RU1zEc1o",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -221.27,
"y": -8.57,
"width": 470.72,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "pvgSVWzpY9U",
"spine": "4.2.64-beta",
"hash": "dr3Kr/vMgPA",
"spine": "4.2.22",
"x": -188.63,
"y": -7.94,
"width": 418.45,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

After

Width:  |  Height:  |  Size: 335 KiB

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "OAkm/nOzDmw",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -840,
"y": -766.03,
"width": 1680,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "CNp43FaCQIg",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -100.47,
"y": -9.21,
"width": 260.65,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "nW5DL2uoEfA",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -5852.65,
"y": -348.5,
"width": 7202.61,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "ej2SKFlZb7Q",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -87.7,
"y": -1.71,
"width": 227.65,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "cFTl59GZWk8",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -564.6,
"y": -335.4,
"width": 1124.2,

14
flags.cmake Normal file
View File

@ -0,0 +1,14 @@
option(SPINE_SANITIZE "Build with sanitization" OFF)
if(MSVC)
message("MSCV detected")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter -std=c99")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -Wno-unused-parameter -std=c++11 -fno-exceptions -fno-rtti")
if (${SPINE_SANITIZE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined")
endif()
endif()

View File

@ -21,12 +21,20 @@ spotless {
'spine-cocos2dx/src/**/*.h',
'spine-cocos2dx/example/Classes/**/*.cpp',
'spine-cocos2dx/example/Classes/**/*.h',
'spine-sdl/**/*.c',
'spine-sdl/**/*.cpp',
'spine-sdl/**/*.h',
'spine-sfml/**/*.c',
'spine-sfml/**/*.cpp',
'spine-sfml/**/*.h',
'spine-glfw/src/**/*.cpp',
'spine-glfw/src/**/*.h',
'spine-glfw/example/**/*.cpp',
'spine-glfw/example/**/*.h',
'spine-sdl/src/**/*.c',
'spine-sdl/src/**/*.cpp',
'spine-sdl/src/**/*.h',
'spine-sdl/example/**/*.c',
'spine-sdl/example/**/*.cpp',
'spine-sdl/example/**/*.h',
'spine-sfml/c/src/**/*.c',
'spine-sfml/c/src/**/*.h',
'spine-sfml/cpp/src/**/*.cpp',
'spine-sfml/cpp/src/**/*.h',
'spine-ue/**/*.cpp',
'spine-ue/**/*.h',
'spine-godot/spine_godot/*.cpp',

View File

@ -1,8 +1,14 @@
cmake_minimum_required(VERSION 3.10)
project(spine-c)
include(${CMAKE_CURRENT_LIST_DIR}/../flags.cmake)
include_directories(include)
file(GLOB INCLUDES "spine-c/include/**/*.h")
file(GLOB SOURCES "spine-c/src/**/*.c" "spine-c/src/**/*.cpp")
file(GLOB SOURCES "spine-c/src/**/*.c")
add_library(spine-c STATIC ${SOURCES} ${INCLUDES})
target_include_directories(spine-c PUBLIC spine-c/include)
install(TARGETS spine-c DESTINATION dist/lib)
install(FILES ${INCLUDES} DESTINATION dist/include)

View File

@ -150,6 +150,8 @@ SP_API void spTrackEntry_setMixDuration(spTrackEntry *entry, float mixDuration,
SP_API int/*bool*/ spTrackEntry_wasApplied(spTrackEntry *entry);
SP_API int/*bool*/ spTrackEntry_isNextReady(spTrackEntry *entry);
SP_API void spAnimationState_clearNext(spAnimationState *self, spTrackEntry *entry);
/** Use this to dispose static memory before your app exits to appease your memory leak detector*/

View File

@ -51,7 +51,6 @@ typedef struct spSlotData {
spColor *darkColor;
spBlendMode blendMode;
int/*bool*/ visible;
char *path;
} spSlotData;
SP_API spSlotData *spSlotData_create(const int index, const char *name, spBoneData *boneData);

View File

@ -1069,6 +1069,10 @@ int spTrackEntry_wasApplied(spTrackEntry *entry) {
return entry->nextTrackLast != -1;
}
int spTrackEntry_isNextReady(spTrackEntry *entry) {
return entry->next != NULL && entry->nextTrackLast - entry->next->delay >= 0;
}
void _spTrackEntry_computeHold(spTrackEntry *entry, spAnimationState *state) {
spTrackEntry *to;
spTimeline **timelines;

View File

@ -57,35 +57,6 @@ typedef struct {
_spLinkedMesh *linkedMeshes;
} _spSkeletonBinary;
static int string_lastIndexOf(const char *str, char needle) {
if (!str) return -1;
int lastIndex = -1;
for (int i = 0; str[i] != '\0'; i++) {
if (str[i] == needle) {
lastIndex = i;
}
}
return lastIndex;
}
static char *string_substring(const char *str, int start, int end) {
if (str == NULL || start > end || start < 0) {
return NULL;
}
int len = end - start;
char *substr = MALLOC(char, len + 1);
if (substr == NULL) {
return NULL;
}
strncpy(substr, str + start, len);
substr[len] = '\0';
return substr;
}
static int string_starts_with(const char *str, const char *needle) {
int lenStr, lenNeedle, i;
if (!str) return 0;
@ -1437,14 +1408,6 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const
skeletonData->slots = MALLOC(spSlotData *, skeletonData->slotsCount);
for (i = 0; i < skeletonData->slotsCount; ++i) {
char *slotName = readString(input);
char *pathName = NULL;
if (nonessential) {
int slash = string_lastIndexOf(slotName, '/');
if (slash != -1) {
pathName = string_substring(slotName, 0, slash);
slotName = string_substring(slotName, slash + 1, strlen(slotName));
}
}
spBoneData *boneData = skeletonData->bones[readVarint(input, 1)];
spSlotData *slotData = spSlotData_create(i, slotName, boneData);
FREE(slotName);
@ -1464,7 +1427,6 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const
slotData->blendMode = (spBlendMode) readVarint(input, 1);
if (nonessential) {
slotData->visible = readBoolean(input);
slotData->path = pathName;
}
skeletonData->slots[i] = slotData;
}

View File

@ -125,7 +125,6 @@ int /*boolean*/ spSkeletonClipping_isClipping(spSkeletonClipping *self) {
int /*boolean*/
_clip(spSkeletonClipping *self, float x1, float y1, float x2, float y2, float x3, float y3, spFloatArray *clippingArea,
spFloatArray *output) {
int i;
spFloatArray *originalOutput = output;
int clipped = 0;
float *clippingVertices;
@ -149,54 +148,50 @@ _clip(spSkeletonClipping *self, float x1, float y1, float x2, float y2, float x3
spFloatArray_add(input, y1);
spFloatArray_clear(output);
clippingVertices = clippingArea->items;
clippingVerticesLast = clippingArea->size - 4;
for (i = 0;; i += 2) {
int ii;
clippingVertices = clippingArea->items;
for (int i = 0;; i += 2) {
spFloatArray *temp;
float edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];
float edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];
float deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;
float ex = edgeX - clippingVertices[i + 2], ey = edgeY - clippingVertices[i + 3];
int outputStart = output->size;
float *inputVertices = input->items;
int inputVerticesLength = input->size - 2, outputStart = output->size;
for (ii = 0; ii < inputVerticesLength; ii += 2) {
for (int ii = 0, nn = input->size - 2; ii < nn;) {
float inputX = inputVertices[ii], inputY = inputVertices[ii + 1];
float inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];
int side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;
if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {
float c0, c2;
float s, ua;
if (side2) {
ii += 2;
float inputX2 = inputVertices[ii], inputY2 = inputVertices[ii + 1];
float s2 = ey * (edgeX - inputX2) > ex * (edgeY - inputY2);
float s1 = ey * (edgeX - inputX) - ex * (edgeY - inputY);
if (s1 > 0) {
if (s2) {// v1 inside, v2 inside
spFloatArray_add(output, inputX2);
spFloatArray_add(output, inputY2);
continue;
}
c0 = inputY2 - inputY, c2 = inputX2 - inputX;
s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);
if (ABS(s) > 0.000001f) {
ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;
spFloatArray_add(output, edgeX + (edgeX2 - edgeX) * ua);
spFloatArray_add(output, edgeY + (edgeY2 - edgeY) * ua);
// v1 inside, v2 outside
float ix = inputX2 - inputX, iy = inputY2 - inputY, t = s1 / (ix * ey - iy * ex);
if (t >= 0 && t <= 1) {
spFloatArray_add(output, inputX + ix * t);
spFloatArray_add(output, inputY + iy * t);
} else {
spFloatArray_add(output, edgeX);
spFloatArray_add(output, edgeY);
}
} else if (side2) {
float c0 = inputY2 - inputY, c2 = inputX2 - inputX;
float s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);
if (ABS(s) > 0.000001f) {
float ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;
spFloatArray_add(output, edgeX + (edgeX2 - edgeX) * ua);
spFloatArray_add(output, edgeY + (edgeY2 - edgeY) * ua);
} else {
spFloatArray_add(output, edgeX);
spFloatArray_add(output, edgeY);
}
spFloatArray_add(output, inputX2);
spFloatArray_add(output, inputY2);
}
clipped = 1;
} else if (s2) {// v1 outside, v2 inside
float ix = inputX2 - inputX, iy = inputY2 - inputY, t = s1 / (ix * ey - iy * ex);
if (t >= 0 && t <= 1) {
spFloatArray_add(output, inputX + ix * t);
spFloatArray_add(output, inputY + iy * t);
spFloatArray_add(output, inputX2);
spFloatArray_add(output, inputY2);
} else {
spFloatArray_add(output, inputX2);
spFloatArray_add(output, inputY2);
continue;
}
}
clipped = -1;
}
if (outputStart == output->size) {

View File

@ -535,7 +535,7 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro
keyMap = timelineMap->child;
for (frame = 0;; frame++) {
float time = Json_getFloat(keyMap, "time", 0);
const char *value = Json_getString(keyMap, "value", "normal");
const char *value = Json_getString(keyMap, "inherit", "normal");
spInherit inherit = SP_INHERIT_NORMAL;
if (strcmp(value, "normal") == 0) inherit = SP_INHERIT_NORMAL;
else if (strcmp(value, "onlyTranslation") == 0)
@ -1041,34 +1041,6 @@ static int string_starts_with(const char *str, const char *needle) {
return -1;
}
static int string_lastIndexOf(const char *str, char needle) {
if (!str) return -1;
int lastIndex = -1;
for (int i = 0; str[i] != '\0'; i++) {
if (str[i] == needle) {
lastIndex = i;
}
}
return lastIndex;
}
static char *string_substring(const char *str, int start, int end) {
if (str == NULL || start > end || start < 0) {
return NULL;
}
int len = end - start;
char *substr = MALLOC(char, len + 1);
if (substr == NULL) {
return NULL;
}
strncpy(substr, str + start, len);
substr[len] = '\0';
return substr;
}
spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char *json) {
int i, ii;
spSkeletonData *skeletonData;
@ -1192,13 +1164,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
return NULL;
}
char *pathName = NULL;
char *slotName = (char *) Json_getString(slotMap, "name", NULL);
int slash = string_lastIndexOf(slotName, '/');
if (slash != -1) {
pathName = string_substring(slotName, 0, slash);
slotName = string_substring(slotName, slash + 1, strlen(slotName));
}
data = spSlotData_create(i, slotName, boneData);
color = Json_getString(slotMap, "color", 0);
@ -1234,7 +1200,6 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
}
data->visible = Json_getInt(slotMap, "visible", -1);
data->path = pathName;
skeletonData->slots[i] = data;
skeletonData->slotsCount++;
}

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "r8iwnU9Tvmc",
"spine": "4.2.64-beta",
"spine": "4.2.22",
"x": -134.12,
"y": -3.28,
"width": 266.94,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

After

Width:  |  Height:  |  Size: 341 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "pvgSVWzpY9U",
"spine": "4.2.64-beta",
"hash": "dr3Kr/vMgPA",
"spine": "4.2.22",
"x": -188.63,
"y": -7.94,
"width": 418.45,

View File

@ -1,11 +1,7 @@
if(MSVC)
message("MSCV detected")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c89")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -std=c++11 -fno-exceptions -fno-rtti")
endif()
cmake_minimum_required(VERSION 3.10)
project(spine-cpp)
include(${CMAKE_CURRENT_LIST_DIR}/../flags.cmake)
include_directories(include)
file(GLOB INCLUDES "spine-cpp/include/**/*.h")
@ -15,7 +11,7 @@ add_library(spine-cpp STATIC ${SOURCES} ${INCLUDES})
target_include_directories(spine-cpp PUBLIC spine-cpp/include)
add_library(spine-cpp-lite STATIC ${SOURCES} ${INCLUDES} spine-cpp-lite/spine-cpp-lite.cpp)
target_include_directories(spine-cpp-lite PUBLIC spine-cpp/include)
target_include_directories(spine-cpp-lite PUBLIC spine-cpp/include spine-cpp-lite)
# Install target
install(TARGETS spine-cpp EXPORT spine-cpp_TARGETS DESTINATION dist/lib)

View File

@ -0,0 +1,4 @@
module SpineCppLite {
header "spine-cpp-lite.h"
export *
}

View File

@ -0,0 +1,556 @@
import re
import os
script_directory = os.path.dirname(os.path.abspath(__file__))
input_path = os.path.join(script_directory, 'spine-cpp-lite.h')
with open(input_path, 'r') as file:
file_contents = file.read()
supported_types_to_swift_types = {
'void *': 'UnsafeMutableRawPointer',
'const utf8 *': 'String?',
'uint64_t': 'UInt64',
'float *': 'Float?',
'float': 'Float',
'int32_t': 'Int32',
'utf8 *': 'String?',
'int32_t *': 'Int32?',
'uint16_t *': 'UInt16',
'spine_bool': 'Bool'
}
def read_spine_types(data):
types_start = data.find('// @start: opaque_types') + len('// @start: opaque_types')
types_end = data.find('// @end: paque_types')
types_section = data[types_start:types_end]
return re.findall(r'SPINE_OPAQUE_TYPE\(([^)]+)\)', types_section)
def read_spine_function_declarations(data):
declarations_start = data.find('// @start: function_declarations') + len('// @start: function_declarations')
declarations_end = data.find('// @end: function_declarations')
declarations_section = data[declarations_start:declarations_end]
lines = declarations_section.split('\n')
filtered_lines = []
ignore_next = False
next_returns_optional = False
for line in lines:
if ignore_next:
ignore_next = False
continue
line = line.strip()
if next_returns_optional:
next_returns_optional = False
line = line + "?"
if not line.strip().startswith('//') and line.strip() != '':
filtered_lines.append(line)
if line.startswith('//') and '@ignore' in line:
ignore_next = True
elif line.startswith('//') and '@optional' in line:
next_returns_optional = True
function_declaration = [
line.replace('SPINE_CPP_LITE_EXPORT', '').strip()
for line in filtered_lines
]
return function_declaration
def read_spine_enums(data):
enums_start = data.find('// @start: enums') + len('// @start: enums')
enums_end = data.find('// @end: enums')
enums_section = data[enums_start:enums_end]
return re.findall(r"typedef enum (\w+) \{", enums_section)
class SpineObject:
def __init__(self, name, functions):
self.name = name
self.functions = functions
self.function_names = {function.name for function in functions}
self.var_name = "wrappee"
def __str__(self):
return f"SpineObject: name: {self.name}, functions: {self.functions}"
class SpineFunction:
def __init__(self, return_type, name, parameters, returns_optional):
self.return_type = return_type
self.name = name
self.parameters = parameters
self.returns_optional = returns_optional
def isReturningSpineClass(self):
return self.return_type.startswith("spine_") and self.return_type != "spine_bool" and self.return_type not in enums
def __str__(self):
return f"SpineFunction(return_type: {self.return_type}, name: {self.name}, parameters: {self.parameters}, returns_optional: {self.returns_optional})"
def __repr__(self):
return self.__str__()
class SpineParam:
def __init__(self, type, name):
self.type = type
self.name = name
def isSpineClass(self):
return self.type.startswith("spine_") and self.type != "spine_bool" and self.type not in enums
def __str__(self):
return f"SpineParam(type: {self.type}, name: {self.name})"
def __repr__(self):
return self.__str__()
def parse_function_declaration(declaration):
returns_optional = declaration.endswith("?")
# Strip semicolon and extra whitespace
declaration = declaration.strip('?').strip(';').strip()
# Use regex to split the declaration into parts
# Regex explanation:
# ^([\w\s\*]+?)\s+ - Capture the return type, possibly including spaces and asterisks (non-greedy)
# ([\w]+) - Capture the function name (alphanumeric and underscores)
# \((.*)\) - Capture the argument list in entirety
match = re.match(r'^(\S.+?\s*\*?\s*)([\w]+)\s*\((.*)\)$', declaration)
if not match:
return "Invalid function declaration"
return_type, function_name, params = match.groups()
params = params.strip()
parameters = []
if params:
# Splitting each argument on comma
param_list = params.split(',')
for param in param_list:
param_parts = []
if '*' in param: # Split at the pointer and add it as a suffix to the type
param_parts = param.rsplit('*', 1)
param_parts[0] = param_parts[0] + '*'
else: # Assuming type and name are separated by space and taking the last space as the separator
param_parts = param.rsplit(' ', 1)
param_type, param_name = param_parts
spine_param = SpineParam(type = param_type.strip(), name = param_name.strip())
parameters.append(spine_param)
return SpineFunction(
return_type = return_type.strip(),
name = function_name.strip(),
parameters = parameters,
returns_optional = returns_optional
)
types = read_spine_types(file_contents)
function_declarations = read_spine_function_declarations(file_contents)
enums = read_spine_enums(file_contents)
sorted_types = sorted(types, key=len, reverse=True) # Sorted by legth descending so we can match longest prefix.
spine_functions = [
parse_function_declaration(function_declaration)
for function_declaration in function_declarations
]
objects = []
for type in sorted_types:
object_functions = []
hits = set() ## Keep track of hits and remove them for next object
for function_declaration in function_declarations:
spine_function = parse_function_declaration(function_declaration)
if spine_function.name.startswith(type):
hits.add(function_declaration);
object_functions.append(spine_function);
object = SpineObject(name = type, functions = object_functions);
objects.append(object)
function_declarations = [item for item in function_declarations if item not in hits]
def snake_to_camel(snake_str):
# Split the string by underscore
parts = snake_str.split('_')
# Return the first part lowercased and concatenate capitalized subsequent parts
return parts[0] + ''.join(word.capitalize() for word in parts[1:])
def snake_to_title(snake_str):
# Split the string at underscores
words = snake_str.split('_')
# Capitalize the first letter of each word
words = [word.capitalize() for word in words]
# Join the words into a single string without any separator
title_str = ''.join(words)
return title_str
inset = " "
class SwiftTypeWriter:
def __init__(self, type):
self.type = type
def write(self):
parameter_type = supported_types_to_swift_types.get(self.type)
if parameter_type is None:
parameter_type = snake_to_title(self.type.replace("spine_", ""))
if parameter_type.endswith(" *"):
parameter_type = f"{parameter_type[:-2]}"
return parameter_type
class SwiftParamWriter:
def __init__(self, param):
self.param = param
def write(self):
type = SwiftTypeWriter(type = self.param.type).write()
return f"{snake_to_camel(self.param.name)}: {type}"
class SwiftFunctionBodyWriter:
def __init__(self, spine_object, spine_function, is_setter, is_getter_optional):
self.spine_object = spine_object
self.spine_function = spine_function
self.is_setter = is_setter
self.is_getter_optional = is_getter_optional
def write(self):
body = ""
num_function_name = self.spine_function.name.replace("get_", "get_num_")
swift_return_type_is_array = "get_" in self.spine_function.name and num_function_name in self.spine_object.function_names
spine_params = self.spine_function.parameters;
body = ""
if "dispose" in self.spine_function.name:
body += self.write_dispose_call()
function_call = self.write_c_function_call(spine_params)
if swift_return_type_is_array:
body += self.write_array_call(num_function_name, function_call)
body += inset + inset
body += "}"
else:
if not self.spine_function.return_type == "void":
body += "return "
if self.spine_function.isReturningSpineClass():
function_prefix = f"{self.spine_object.name}_"
function_name = self.spine_function.name.replace(function_prefix, "", 1)
if "find_" in function_name or self.spine_function.returns_optional:
body += function_call
body += ".flatMap { .init($0"
if self.spine_function.return_type in enums:
body += ".rawValue"
body += ") }"
else:
body += ".init("
body += function_call
if self.spine_function.return_type in enums:
body += ".rawValue"
body += ")"
else:
body += function_call
if self.spine_function.return_type == "const utf8 *" or self.spine_function.return_type == "utf8 *":
body += ".flatMap { String(cString: $0) }"
if self.spine_function.return_type == "int32_t *" or self.spine_function.return_type == "float *":
body += ".flatMap { $0.pointee }"
return body
def write_c_function_call(self, spine_params):
function_call = ""
function_call += f"{self.spine_function.name}"
function_call += "("
# Replace name with ivar name
spine_params_with_ivar_name = spine_params
if spine_params_with_ivar_name and spine_params_with_ivar_name[0].type == self.spine_object.name:
spine_params_with_ivar_name[0].name = self.spine_object.var_name
if self.is_setter and len(spine_params_with_ivar_name) == 2:
spine_params_with_ivar_name[1].name = "newValue"
if self.is_getter_optional:
spine_params_with_ivar_name[1].name += "?"
swift_param_names = []
for idx, spine_param in enumerate(spine_params_with_ivar_name):
if spine_param.isSpineClass() and idx > 0:
swift_param_names.append(f"{spine_param.name}.wrappee")
elif spine_param.type == "spine_bool":
swift_param_names.append(f"{spine_param.name} ? -1 : 0")
else:
swift_param_names.append(spine_param.name)
function_call += ", ".join(swift_param_names)
function_call += ")"
if self.spine_function.return_type == "spine_bool":
function_call += " != 0"
return function_call
def write_array_call(self, num_function_name, function_call):
array_call = f"let num = Int({num_function_name}({self.spine_object.var_name}))"
array_call += "\n"
array_call += inset + inset
array_call += f"let ptr = {function_call}"
array_call += "\n"
array_call += inset + inset
array_call += "return (0..<num).compactMap {"
array_call += "\n"
array_call += inset + inset + inset
if self.spine_function.isReturningSpineClass():
array_call += "ptr?[$0].flatMap { .init($0) }"
else:
array_call += "ptr?[$0]"
array_call += "\n"
return array_call
def write_dispose_call(self):
dispose_body = "if disposed { return }"
dispose_body += "\n"
dispose_body += inset + inset
dispose_body += "disposed = true"
dispose_body += "\n"
dispose_body += inset + inset
return dispose_body
class SwiftFunctionWriter:
def __init__(self, spine_object, spine_function, spine_setter_function):
self.spine_object = spine_object
self.spine_function = spine_function
self.spine_setter_function = spine_setter_function
def write(self):
function_prefix = f"{self.spine_object.name}_"
function_name = self.spine_function.name.replace(function_prefix, "", 1)
is_getter = (function_name.startswith("get_") or function_name.startswith("is_")) and len(self.spine_function.parameters) < 2
num_function_name = self.spine_function.name.replace("get_", "get_num_")
swift_return_type_is_array = "get_" in self.spine_function.name and num_function_name in self.spine_object.function_names
swift_return_type_writer = SwiftTypeWriter(type = self.spine_function.return_type)
swift_return_type = swift_return_type_writer.write()
if swift_return_type_is_array:
swift_return_type = f"[{swift_return_type}]"
function_string = inset
if is_getter:
function_string += self.write_computed_property_signature(function_name, swift_return_type)
if self.spine_setter_function:
function_string += " {\n"
function_string += inset + inset
function_string += "get"
else:
function_string += self.write_method_signature(function_name, swift_return_type)
function_string += " {"
function_string += "\n"
function_string += inset + inset
if self.spine_setter_function:
function_string += inset
function_string += SwiftFunctionBodyWriter(spine_object = self.spine_object, spine_function = self.spine_function, is_setter=False, is_getter_optional=False).write()
if self.spine_setter_function:
function_string += "\n"
function_string += inset + inset + "}"
function_string += "\n"
function_string += inset + inset + "set {"
function_string += "\n"
function_string += inset + inset + inset
function_string += SwiftFunctionBodyWriter(spine_object = self.spine_object, spine_function = self.spine_setter_function, is_setter=True, is_getter_optional=self.spine_function.returns_optional).write()
function_string += "\n"
function_string += inset + inset + "}"
function_string += "\n"
function_string += inset + "}"
function_string += "\n"
return function_string
def write_computed_property_signature(self, function_name, swift_return_type):
property_name = snake_to_camel(function_name.replace("get_", ""))
property_string = f"public var {property_name}: {swift_return_type}"
if self.spine_function.returns_optional:
property_string += "?"
return property_string
def write_method_signature(self, function_name, swift_return_type):
function_string = ""
if not self.spine_function.return_type == "void":
function_string += "@discardableResult"
function_string += "\n"
function_string += inset
function_string += f"public func {snake_to_camel(function_name)}"
function_string += "("
spine_params = self.spine_function.parameters;
# Filter out ivar
if spine_params and spine_params[0].type == self.spine_object.name:
spine_params_without_ivar = spine_params[1:]
else:
spine_params_without_ivar = spine_params
swift_params = [
SwiftParamWriter(param = spine_param).write()
for spine_param in spine_params_without_ivar
]
function_string += ", ".join(swift_params)
function_string += ")"
if not self.spine_function.return_type == "void":
function_string += f" -> {swift_return_type}"
if "find_" in function_name or self.spine_function.returns_optional:
function_string += "?"
return function_string
class SwiftObjectWriter:
def __init__(self, spine_object):
self.spine_object = spine_object
def write(self):
ivar_type = self.spine_object.name
ivar_name = self.spine_object.var_name
class_name = snake_to_title(self.spine_object.name.replace("spine_", ""))
object_string = f"@objc(Spine{class_name})"
object_string += "\n"
object_string += "@objcMembers"
object_string += "\n"
object_string += f"public final class {class_name}: NSObject"
object_string += " {"
object_string += "\n"
object_string += "\n"
object_string += inset
object_string += f"internal let {ivar_name}: {ivar_type}"
object_string += "\n"
if any("dispose" in function_name for function_name in self.spine_object.function_names):
object_string += inset
object_string += f"internal var disposed = false"
object_string += "\n"
object_string += "\n"
object_string += inset
object_string += f"internal init(_ {ivar_name}: {ivar_type})"
object_string += " {"
object_string += "\n"
object_string += inset + inset
object_string += f"self.{ivar_name} = {ivar_name}"
object_string += "\n"
object_string += inset + inset
object_string += "super.init()"
object_string += "\n"
object_string += inset
object_string += "}"
object_string += "\n"
object_string += "\n"
filtered_spine_functions = [spine_function for spine_function in self.spine_object.functions if not "_get_num_" in spine_function.name]
spine_functions_by_name = {}
getter_names = []
setter_names = []
method_names = []
for spine_function in filtered_spine_functions:
spine_functions_by_name[spine_function.name] = spine_function
if ("_get_" in spine_function.name or "_is_" in spine_function.name) and len(spine_function.parameters) == 1:
getter_names.append(spine_function.name)
elif "_set_" in spine_function.name and len(spine_function.parameters) == 2:
setter_names.append(spine_function.name)
else:
method_names.append(spine_function.name)
get_set_pairs = []
for setter_name in setter_names:
getter_name_get = setter_name.replace("_set_", "_get_")
getter_name_is = setter_name.replace("_set_", "_is_")
if getter_name_get in getter_names:
getter_names.remove(getter_name_get)
get_set_pairs.append((getter_name_get, setter_name))
elif getter_name_is in getter_names:
getter_names.remove(getter_name_is)
get_set_pairs.append((getter_name_is, setter_name))
else:
method_names.append(setter_name) # Coul not find getter by name. Move to methods
# print(get_set_pairs)
for getter_name in getter_names:
spine_function = spine_functions_by_name[getter_name]
object_string += SwiftFunctionWriter(spine_object = self.spine_object, spine_function = spine_function, spine_setter_function=None).write()
object_string += "\n"
for get_set_pair in get_set_pairs:
getter_function = spine_functions_by_name[get_set_pair[0]]
setter_function = spine_functions_by_name[get_set_pair[1]]
object_string += SwiftFunctionWriter(spine_object = self.spine_object, spine_function = getter_function, spine_setter_function=setter_function).write()
object_string += "\n"
for method_name in method_names:
spine_function = spine_functions_by_name[method_name]
object_string += SwiftFunctionWriter(spine_object = self.spine_object, spine_function = spine_function, spine_setter_function=None).write()
object_string += "\n"
object_string += "}"
return object_string
class SwiftEnumWriter:
def __init__(self, spine_enum):
self.spine_enum = spine_enum
def write(self):
# TODO: Consider leaving spine prefix (objc) or map whole c enum to swift/objc compatible enum
return f"public typealias {snake_to_title(self.spine_enum.replace("spine_", ""))} = {self.spine_enum}"
print("import Foundation")
print("import SpineCppLite")
print("")
for enum in enums:
print(SwiftEnumWriter(spine_enum=enum).write())
print("")
for object in objects:
print(SwiftObjectWriter(spine_object = object).write())
print("")

View File

@ -34,75 +34,6 @@
using namespace spine;
struct Block {
int size;
int allocated;
uint8_t *memory;
int free() {
return size - allocated;
}
bool canFit(int numBytes) {
return free() >= numBytes;
}
uint8_t *allocate(int numBytes) {
uint8_t *ptr = memory + allocated;
allocated += numBytes;
return ptr;
}
};
class BlockAllocator : public SpineObject {
int initialBlockSize;
Vector<Block> blocks;
public:
BlockAllocator(int initialBlockSize) : initialBlockSize(initialBlockSize) {
blocks.add(newBlock(initialBlockSize));
}
~BlockAllocator() {
for (int i = 0, n = (int) blocks.size(); i < n; i++) {
SpineExtension::free(blocks[i].memory, __FILE__, __LINE__);
}
}
Block newBlock(int numBytes) {
Block block = {MathUtil::max(initialBlockSize, numBytes), 0, nullptr};
block.memory = SpineExtension::alloc<uint8_t>(block.size, __FILE__, __LINE__);
return block;
}
template<typename T>
T *allocate(size_t num) {
return (T *) _allocate((int) (sizeof(T) * num));
}
void compress() {
int totalSize = 0;
for (int i = 0, n = blocks.size(); i < n; i++) {
totalSize += blocks[i].size;
SpineExtension::free(blocks[i].memory, __FILE__, __LINE__);
}
blocks.clear();
blocks.add(newBlock(totalSize));
}
private:
void *_allocate(int numBytes) {
// 16-byte align allocations
int alignedNumBytes = numBytes + (numBytes % 16 != 0 ? 16 - (numBytes % 16) : 0);
Block *block = &blocks[blocks.size() - 1];
if (!block->canFit(alignedNumBytes)) {
blocks.add(newBlock(MathUtil::max(initialBlockSize, alignedNumBytes)));
block = &blocks[blocks.size() - 1];
}
return block->allocate(alignedNumBytes);
}
};
struct AnimationStateEvent {
EventType type;
TrackEntry *entry;
@ -131,18 +62,6 @@ typedef struct _spine_skeleton_data_result {
utf8 *error;
} _spine_skeleton_data_result;
typedef struct _spine_render_command {
float *positions;
float *uvs;
int32_t *colors;
int32_t numVertices;
uint16_t *indices;
int32_t numIndices;
int32_t atlasPage;
spine_blend_mode blendMode;
struct _spine_render_command *next;
} _spine_render_command;
typedef struct _spine_bounds {
float x, y, width, height;
} _spine_bounds;
@ -156,20 +75,7 @@ typedef struct _spine_skeleton_drawable : public SpineObject {
spine_animation_state animationState;
spine_animation_state_data animationStateData;
spine_animation_state_events animationStateEvents;
void *clipping;
BlockAllocator *allocator;
Vector<float> worldVertices;
Vector<unsigned short> quadIndices;
Vector<_spine_render_command *> renderCommands;
_spine_skeleton_drawable() {
quadIndices.add(0);
quadIndices.add(1);
quadIndices.add(2);
quadIndices.add(2);
quadIndices.add(3);
quadIndices.add(0);
}
SkeletonRenderer *renderer;
} _spine_skeleton_drawable;
typedef struct _spine_skin_entry {
@ -276,10 +182,20 @@ float spine_vector_get_y(spine_vector vector) {
// Atlas
class LiteTextureLoad : public TextureLoader {
void load(AtlasPage &page, const String &path) {
page.texture = (void *) (intptr_t) page.index;
}
void unload(void *texture) {
}
};
LiteTextureLoad liteLoader;
spine_atlas spine_atlas_load(const utf8 *atlasData) {
if (!atlasData) return nullptr;
int32_t length = (int32_t) strlen(atlasData);
auto atlas = new (__FILE__, __LINE__) Atlas(atlasData, length, "", (TextureLoader *) nullptr, false);
auto atlas = new (__FILE__, __LINE__) Atlas(atlasData, length, "", &liteLoader, true);
_spine_atlas *result = SpineExtension::calloc<_spine_atlas>(1, __FILE__, __LINE__);
result->atlas = atlas;
result->numImagePaths = (int32_t) atlas->getPages().size();
@ -295,6 +211,16 @@ int32_t spine_atlas_get_num_image_paths(spine_atlas atlas) {
return ((_spine_atlas *) atlas)->numImagePaths;
}
spine_bool spine_atlas_is_pma(spine_atlas atlas) {
if (!atlas) return 0;
Atlas *_atlas = static_cast<Atlas *>(((_spine_atlas *) atlas)->atlas);
if (_atlas->getPages().size() > 0) {
return _atlas->getPages()[0]->pma;
} else {
return 0;
}
}
utf8 *spine_atlas_get_image_path(spine_atlas atlas, int32_t index) {
if (!atlas) return nullptr;
return ((_spine_atlas *) atlas)->imagePaths[index];
@ -637,21 +563,6 @@ void spine_skeleton_data_dispose(spine_skeleton_data data) {
delete (SkeletonData *) data;
}
// RenderCommand
static _spine_render_command *spine_render_command_create(BlockAllocator &allocator, int numVertices, int32_t numIndices, spine_blend_mode blendMode, int32_t pageIndex) {
_spine_render_command *cmd = allocator.allocate<_spine_render_command>(1);
cmd->positions = allocator.allocate<float>(numVertices << 1);
cmd->uvs = allocator.allocate<float>(numVertices << 1);
cmd->colors = allocator.allocate<int32_t>(numVertices);
cmd->numVertices = numVertices;
cmd->indices = allocator.allocate<uint16_t>(numIndices);
cmd->numIndices = numIndices;
cmd->blendMode = blendMode;
cmd->atlasPage = pageIndex;
cmd->next = nullptr;
return cmd;
}
// SkeletonDrawable
spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData) {
@ -665,8 +576,7 @@ spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skele
EventListener *listener = new EventListener();
drawable->animationStateEvents = (spine_animation_state_events) listener;
state->setListener(listener);
drawable->clipping = new (__FILE__, __LINE__) SkeletonClipping();
drawable->allocator = new (__FILE__, __LINE__) BlockAllocator(2048);
drawable->renderer = new (__FILE__, __LINE__) SkeletonRenderer();
return (spine_skeleton_drawable) drawable;
}
@ -677,176 +587,16 @@ void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable) {
if (_drawable->animationState) delete (AnimationState *) _drawable->animationState;
if (_drawable->animationStateData) delete (AnimationStateData *) _drawable->animationStateData;
if (_drawable->animationStateEvents) delete (Vector<AnimationStateEvent> *) (_drawable->animationStateEvents);
if (_drawable->clipping) delete (SkeletonClipping *) _drawable->clipping;
if (_drawable->allocator) delete (BlockAllocator *) _drawable->allocator;
if (_drawable->renderer) delete (SkeletonRenderer *) _drawable->renderer;
SpineExtension::free(drawable, __FILE__, __LINE__);
}
static _spine_render_command *batch_sub_commands(BlockAllocator &allocator, Vector<_spine_render_command *> &commands, int first, int last, int numVertices, int numIndices) {
_spine_render_command *batched = spine_render_command_create(allocator, numVertices, numIndices, commands[first]->blendMode, commands[first]->atlasPage);
float *positions = batched->positions;
float *uvs = batched->uvs;
int32_t *colors = batched->colors;
uint16_t *indices = batched->indices;
int indicesOffset = 0;
for (int i = first; i <= last; i++) {
_spine_render_command *cmd = commands[i];
memcpy(positions, cmd->positions, sizeof(float) * 2 * cmd->numVertices);
memcpy(uvs, cmd->uvs, sizeof(float) * 2 * cmd->numVertices);
memcpy(colors, cmd->colors, sizeof(int32_t) * cmd->numVertices);
for (int ii = 0; ii < cmd->numIndices; ii++)
indices[ii] = cmd->indices[ii] + indicesOffset;
indicesOffset += cmd->numVertices;
positions += 2 * cmd->numVertices;
uvs += 2 * cmd->numVertices;
colors += cmd->numVertices;
indices += cmd->numIndices;
}
return batched;
}
static _spine_render_command *batch_commands(BlockAllocator &allocator, Vector<_spine_render_command *> &commands) {
if (commands.size() == 0) return nullptr;
_spine_render_command *root = nullptr;
_spine_render_command *last = nullptr;
_spine_render_command *first = commands[0];
int startIndex = 0;
int i = 1;
int numVertices = first->numVertices;
int numIndices = first->numIndices;
while (i <= (int) commands.size()) {
_spine_render_command *cmd = i < (int) commands.size() ? commands[i] : nullptr;
if (cmd != nullptr && cmd->atlasPage == first->atlasPage &&
cmd->blendMode == first->blendMode &&
cmd->colors[0] == first->colors[0] &&
numIndices + cmd->numIndices < 0xffff) {
numVertices += cmd->numVertices;
numIndices += cmd->numIndices;
} else {
_spine_render_command *batched = batch_sub_commands(allocator, commands, startIndex, i - 1, numVertices, numIndices);
if (!last) {
root = last = batched;
} else {
last->next = batched;
last = batched;
}
if (i == (int) commands.size()) break;
first = commands[i];
startIndex = i;
numVertices = first->numVertices;
numIndices = first->numIndices;
}
i++;
}
return root;
}
spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable) {
_spine_skeleton_drawable *_drawable = (_spine_skeleton_drawable *) drawable;
if (!_drawable) return nullptr;
if (!_drawable->skeleton) return nullptr;
_drawable->allocator->compress();
_drawable->renderCommands.clear();
SkeletonClipping &clipper = *(SkeletonClipping *) _drawable->clipping;
Skeleton *skeleton = (Skeleton *) _drawable->skeleton;
for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) {
Slot &slot = *skeleton->getDrawOrder()[i];
Attachment *attachment = slot.getAttachment();
if (!attachment) {
clipper.clipEnd(slot);
continue;
}
// Early out if the slot color is 0 or the bone is not active
if (slot.getColor().a == 0 || !slot.getBone().isActive()) {
clipper.clipEnd(slot);
continue;
}
Vector<float> *worldVertices = &_drawable->worldVertices;
Vector<unsigned short> *quadIndices = &_drawable->quadIndices;
Vector<float> *vertices = worldVertices;
int32_t verticesCount;
Vector<float> *uvs;
Vector<unsigned short> *indices;
int32_t indicesCount;
Color *attachmentColor;
int32_t pageIndex;
if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
RegionAttachment *regionAttachment = (RegionAttachment *) attachment;
attachmentColor = &regionAttachment->getColor();
// Early out if the slot color is 0
if (attachmentColor->a == 0) {
clipper.clipEnd(slot);
continue;
}
worldVertices->setSize(8, 0);
regionAttachment->computeWorldVertices(slot, *worldVertices, 0, 2);
verticesCount = 4;
uvs = &regionAttachment->getUVs();
indices = quadIndices;
indicesCount = 6;
pageIndex = ((AtlasRegion *) regionAttachment->getRegion())->page->index;
} else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) {
MeshAttachment *mesh = (MeshAttachment *) attachment;
attachmentColor = &mesh->getColor();
// Early out if the slot color is 0
if (attachmentColor->a == 0) {
clipper.clipEnd(slot);
continue;
}
worldVertices->setSize(mesh->getWorldVerticesLength(), 0);
mesh->computeWorldVertices(slot, 0, mesh->getWorldVerticesLength(), worldVertices->buffer(), 0, 2);
verticesCount = (int32_t) (mesh->getWorldVerticesLength() >> 1);
uvs = &mesh->getUVs();
indices = &mesh->getTriangles();
indicesCount = (int32_t) indices->size();
pageIndex = ((AtlasRegion *) mesh->getRegion())->page->index;
} else if (attachment->getRTTI().isExactly(ClippingAttachment::rtti)) {
ClippingAttachment *clip = (ClippingAttachment *) slot.getAttachment();
clipper.clipStart(slot, clip);
continue;
} else
continue;
uint8_t r = static_cast<uint8_t>(skeleton->getColor().r * slot.getColor().r * attachmentColor->r * 255);
uint8_t g = static_cast<uint8_t>(skeleton->getColor().g * slot.getColor().g * attachmentColor->g * 255);
uint8_t b = static_cast<uint8_t>(skeleton->getColor().b * slot.getColor().b * attachmentColor->b * 255);
uint8_t a = static_cast<uint8_t>(skeleton->getColor().a * slot.getColor().a * attachmentColor->a * 255);
uint32_t color = (a << 24) | (r << 16) | (g << 8) | b;
if (clipper.isClipping()) {
clipper.clipTriangles(*worldVertices, *indices, *uvs, 2);
vertices = &clipper.getClippedVertices();
verticesCount = (int32_t) (clipper.getClippedVertices().size() >> 1);
uvs = &clipper.getClippedUVs();
indices = &clipper.getClippedTriangles();
indicesCount = (int32_t) (clipper.getClippedTriangles().size());
}
_spine_render_command *cmd = spine_render_command_create(*_drawable->allocator, verticesCount, indicesCount, (spine_blend_mode) slot.getData().getBlendMode(), pageIndex);
_drawable->renderCommands.add(cmd);
memcpy(cmd->positions, vertices->buffer(), (verticesCount << 1) * sizeof(float));
memcpy(cmd->uvs, uvs->buffer(), (verticesCount << 1) * sizeof(float));
for (int ii = 0; ii < verticesCount; ii++) cmd->colors[ii] = color;
memcpy(cmd->indices, indices->buffer(), indices->size() * sizeof(uint16_t));
clipper.clipEnd(slot);
}
clipper.clipEnd();
return (spine_render_command) batch_commands(*_drawable->allocator, _drawable->renderCommands);
if (!_drawable->renderer) return nullptr;
return (spine_render_command) _drawable->renderer->render(*(Skeleton *) _drawable->skeleton);
}
spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable) {
@ -872,47 +622,52 @@ spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(
// Render command
float *spine_render_command_get_positions(spine_render_command command) {
if (!command) return nullptr;
return ((_spine_render_command *) command)->positions;
return ((RenderCommand *) command)->positions;
}
float *spine_render_command_get_uvs(spine_render_command command) {
if (!command) return nullptr;
return ((_spine_render_command *) command)->uvs;
return ((RenderCommand *) command)->uvs;
}
int32_t *spine_render_command_get_colors(spine_render_command command) {
if (!command) return nullptr;
return ((_spine_render_command *) command)->colors;
return (int32_t *) ((RenderCommand *) command)->colors;
}
int32_t *spine_render_command_get_dark_colors(spine_render_command command) {
if (!command) return nullptr;
return (int32_t *) ((RenderCommand *) command)->darkColors;
}
int32_t spine_render_command_get_num_vertices(spine_render_command command) {
if (!command) return 0;
return ((_spine_render_command *) command)->numVertices;
return ((RenderCommand *) command)->numVertices;
}
uint16_t *spine_render_command_get_indices(spine_render_command command) {
if (!command) return nullptr;
return ((_spine_render_command *) command)->indices;
return ((RenderCommand *) command)->indices;
}
int32_t spine_render_command_get_num_indices(spine_render_command command) {
if (!command) return 0;
return ((_spine_render_command *) command)->numIndices;
return ((RenderCommand *) command)->numIndices;
}
int32_t spine_render_command_get_atlas_page(spine_render_command command) {
if (!command) return 0;
return ((_spine_render_command *) command)->atlasPage;
return (int32_t) (intptr_t) ((RenderCommand *) command)->texture;
}
spine_blend_mode spine_render_command_get_blend_mode(spine_render_command command) {
if (!command) return SPINE_BLEND_MODE_NORMAL;
return ((_spine_render_command *) command)->blendMode;
return (spine_blend_mode) ((RenderCommand *) command)->blendMode;
}
spine_render_command spine_render_command_get_next(spine_render_command command) {
if (!command) return nullptr;
return (spine_render_command) ((_spine_render_command *) command)->next;
return (spine_render_command) ((RenderCommand *) command)->next;
}
// Animation
@ -1412,6 +1167,18 @@ float spine_track_entry_get_track_complete(spine_track_entry entry) {
return _entry->getTrackComplete();
}
spine_bool spine_track_entry_was_applied(spine_track_entry entry) {
if (entry == nullptr) return false;
TrackEntry *_entry = (TrackEntry *) entry;
return _entry->wasApplied();
}
spine_bool spine_track_entry_is_next_ready(spine_track_entry entry) {
if (entry == nullptr) return false;
TrackEntry *_entry = (TrackEntry *) entry;
return _entry->isNextReady();
}
// Skeleton
void spine_skeleton_update_cache(spine_skeleton skeleton) {
@ -1525,7 +1292,9 @@ spine_bounds spine_skeleton_get_bounds(spine_skeleton skeleton) {
if (skeleton == nullptr) return (spine_bounds) bounds;
Skeleton *_skeleton = (Skeleton *) skeleton;
Vector<float> vertices;
_skeleton->getBounds(bounds->x, bounds->y, bounds->width, bounds->height, vertices);
SkeletonClipping clipper;
_skeleton->getBounds(bounds->x, bounds->y, bounds->width, bounds->height, vertices, &clipper);
return (spine_bounds) bounds;
}
@ -1673,6 +1442,13 @@ void spine_skeleton_set_y(spine_skeleton skeleton, float y) {
_skeleton->setY(y);
}
void spine_skeleton_set_scale(spine_skeleton skeleton, float scaleX, float scaleY) {
if (skeleton == nullptr) return;
Skeleton *_skeleton = (Skeleton *) skeleton;
_skeleton->setScaleX(scaleX);
_skeleton->setScaleY(scaleY);
}
float spine_skeleton_get_scale_x(spine_skeleton skeleton) {
if (skeleton == nullptr) return 0;
Skeleton *_skeleton = (Skeleton *) skeleton;
@ -1905,7 +1681,7 @@ void spine_slot_data_set_dark_color(spine_slot_data slot, float r, float g, floa
_slot->getDarkColor().set(r, g, b, a);
}
spine_bool spine_slot_data_has_dark_color(spine_slot_data slot) {
spine_bool spine_slot_data_get_has_dark_color(spine_slot_data slot) {
if (slot == nullptr) return 0;
SlotData *_slot = (SlotData *) slot;
return _slot->hasDarkColor() ? -1 : 0;
@ -2159,7 +1935,7 @@ void spine_bone_data_set_inherit(spine_bone_data data, spine_inherit inherit) {
_data->setInherit((Inherit) inherit);
}
spine_bool spine_bone_data_is_skin_required(spine_bone_data data) {
spine_bool spine_bone_data_get_is_skin_required(spine_bone_data data) {
if (data == nullptr) return 0;
BoneData *_data = (BoneData *) data;
return _data->isSkinRequired() ? -1 : 0;
@ -2489,7 +2265,7 @@ float spine_bone_get_a_shear_y(spine_bone bone) {
return _bone->getAShearY();
}
void spine_bone_set_shear_a_y(spine_bone bone, float shearY) {
void spine_bone_set_a_shear_y(spine_bone bone, float shearY) {
if (bone == nullptr) return;
Bone *_bone = (Bone *) bone;
_bone->setAShearY(shearY);
@ -3375,6 +3151,12 @@ spine_bool spine_ik_constraint_data_get_uniform(spine_ik_constraint_data data) {
return _data->getUniform() ? -1 : 0;
}
void spine_ik_constraint_data_set_uniform(spine_ik_constraint_data data, spine_bool uniform) {
if (data == nullptr) return;
IkConstraintData *_data = (IkConstraintData *) data;
_data->setUniform(uniform);
}
float spine_ik_constraint_data_get_mix(spine_ik_constraint_data data) {
if (data == nullptr) return 0;
IkConstraintData *_data = (IkConstraintData *) data;
@ -4660,7 +4442,7 @@ float spine_physics_constraint_get_last_time(spine_physics_constraint constraint
return _constraint->getLastTime();
}
void spine_physics_constraint_reset(spine_physics_constraint constraint) {
void spine_physics_constraint_reset_fully(spine_physics_constraint constraint) {
if (constraint == nullptr) return;
PhysicsConstraint *_constraint = (PhysicsConstraint *) constraint;
_constraint->reset();

View File

@ -59,6 +59,8 @@
} name##_wrapper; \
typedef name##_wrapper *name;
// @start: opaque_types
SPINE_OPAQUE_TYPE(spine_skeleton)
SPINE_OPAQUE_TYPE(spine_skeleton_data)
SPINE_OPAQUE_TYPE(spine_bone)
@ -103,8 +105,12 @@ SPINE_OPAQUE_TYPE(spine_skeleton_drawable)
SPINE_OPAQUE_TYPE(spine_skin_entry)
SPINE_OPAQUE_TYPE(spine_skin_entries)
// @end: opaque_types
typedef char utf8;
// @start: enums
typedef enum spine_blend_mode {
SPINE_BLEND_MODE_NORMAL = 0,
SPINE_BLEND_MODE_ADDITIVE,
@ -177,8 +183,12 @@ typedef enum spine_physics {
} spine_physics;
// @end: enums
typedef int32_t spine_bool;
// @start: function_declarations
SPINE_CPP_LITE_EXPORT int32_t spine_major_version();
SPINE_CPP_LITE_EXPORT int32_t spine_minor_version();
SPINE_CPP_LITE_EXPORT void spine_enable_debug_extension(spine_bool enable);
@ -200,10 +210,13 @@ SPINE_CPP_LITE_EXPORT float spine_vector_get_y(spine_vector vector);
SPINE_CPP_LITE_EXPORT spine_atlas spine_atlas_load(const utf8 *atlasData);
SPINE_CPP_LITE_EXPORT int32_t spine_atlas_get_num_image_paths(spine_atlas atlas);
SPINE_CPP_LITE_EXPORT utf8 *spine_atlas_get_image_path(spine_atlas atlas, int32_t index);
SPINE_CPP_LITE_EXPORT spine_bool spine_atlas_is_pma(spine_atlas atlas);
SPINE_CPP_LITE_EXPORT utf8 *spine_atlas_get_error(spine_atlas atlas);
SPINE_CPP_LITE_EXPORT void spine_atlas_dispose(spine_atlas atlas);
// @ignore
SPINE_CPP_LITE_EXPORT spine_skeleton_data_result spine_skeleton_data_load_json(spine_atlas atlas, const utf8 *skeletonData);
// @ignore
SPINE_CPP_LITE_EXPORT spine_skeleton_data_result spine_skeleton_data_load_binary(spine_atlas atlas, const uint8_t *skeletonData, int32_t length);
SPINE_CPP_LITE_EXPORT utf8 *spine_skeleton_data_result_get_error(spine_skeleton_data_result result);
SPINE_CPP_LITE_EXPORT spine_skeleton_data spine_skeleton_data_result_get_data(spine_skeleton_data_result result);
@ -217,6 +230,7 @@ SPINE_CPP_LITE_EXPORT spine_ik_constraint_data spine_skeleton_data_find_ik_const
SPINE_CPP_LITE_EXPORT spine_transform_constraint_data spine_skeleton_data_find_transform_constraint(spine_skeleton_data data, const utf8 *name);
SPINE_CPP_LITE_EXPORT spine_path_constraint_data spine_skeleton_data_find_path_constraint(spine_skeleton_data data, const utf8 *name);
SPINE_CPP_LITE_EXPORT spine_physics_constraint_data spine_skeleton_data_find_physics_constraint(spine_skeleton_data data, const utf8 *name);
// @optiona;
SPINE_CPP_LITE_EXPORT const utf8 *spine_skeleton_data_get_name(spine_skeleton_data data);
// OMITTED setName()
SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_data_get_num_bones(spine_skeleton_data data);
@ -225,6 +239,7 @@ SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_data_get_num_slots(spine_skeleton_d
SPINE_CPP_LITE_EXPORT spine_slot_data *spine_skeleton_data_get_slots(spine_skeleton_data data);
SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_data_get_num_skins(spine_skeleton_data data);
SPINE_CPP_LITE_EXPORT spine_skin *spine_skeleton_data_get_skins(spine_skeleton_data data);
// @optional
SPINE_CPP_LITE_EXPORT spine_skin spine_skeleton_data_get_default_skin(spine_skeleton_data data);
SPINE_CPP_LITE_EXPORT void spine_skeleton_data_set_default_skin(spine_skeleton_data data, spine_skin skin);
SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_data_get_num_events(spine_skeleton_data data);
@ -249,6 +264,7 @@ SPINE_CPP_LITE_EXPORT float spine_skeleton_data_get_height(spine_skeleton_data d
SPINE_CPP_LITE_EXPORT void spine_skeleton_data_set_height(spine_skeleton_data data, float height);
SPINE_CPP_LITE_EXPORT const utf8 *spine_skeleton_data_get_version(spine_skeleton_data data);
// OMITTED setVersion()
// @ignore
SPINE_CPP_LITE_EXPORT const utf8 *spine_skeleton_data_get_hash(spine_skeleton_data data);
// OMITTED setHash()
SPINE_CPP_LITE_EXPORT const utf8 *spine_skeleton_data_get_images_path(spine_skeleton_data data);
@ -260,7 +276,9 @@ SPINE_CPP_LITE_EXPORT float spine_skeleton_data_get_fps(spine_skeleton_data data
SPINE_CPP_LITE_EXPORT float spine_skeleton_data_get_reference_scale(spine_skeleton_data data);
SPINE_CPP_LITE_EXPORT void spine_skeleton_data_dispose(spine_skeleton_data data);
// @ignore
SPINE_CPP_LITE_EXPORT spine_skeleton_drawable spine_skeleton_drawable_create(spine_skeleton_data skeletonData);
// @ignore
SPINE_CPP_LITE_EXPORT spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable drawable);
SPINE_CPP_LITE_EXPORT void spine_skeleton_drawable_dispose(spine_skeleton_drawable drawable);
SPINE_CPP_LITE_EXPORT spine_skeleton spine_skeleton_drawable_get_skeleton(spine_skeleton_drawable drawable);
@ -268,9 +286,14 @@ SPINE_CPP_LITE_EXPORT spine_animation_state spine_skeleton_drawable_get_animatio
SPINE_CPP_LITE_EXPORT spine_animation_state_data spine_skeleton_drawable_get_animation_state_data(spine_skeleton_drawable drawable);
SPINE_CPP_LITE_EXPORT spine_animation_state_events spine_skeleton_drawable_get_animation_state_events(spine_skeleton_drawable drawable);
// @ignore
SPINE_CPP_LITE_EXPORT float *spine_render_command_get_positions(spine_render_command command);
// @ignore
SPINE_CPP_LITE_EXPORT float *spine_render_command_get_uvs(spine_render_command command);
// @ignore
SPINE_CPP_LITE_EXPORT int32_t *spine_render_command_get_colors(spine_render_command command);
// @ignore
SPINE_CPP_LITE_EXPORT int32_t *spine_render_command_get_dark_colors(spine_render_command command);
SPINE_CPP_LITE_EXPORT int32_t spine_render_command_get_num_vertices(spine_render_command command);
SPINE_CPP_LITE_EXPORT uint16_t *spine_render_command_get_indices(spine_render_command command);
SPINE_CPP_LITE_EXPORT int32_t spine_render_command_get_num_indices(spine_render_command command);
@ -305,6 +328,7 @@ SPINE_CPP_LITE_EXPORT spine_track_entry spine_animation_state_add_animation(spin
SPINE_CPP_LITE_EXPORT spine_track_entry spine_animation_state_set_empty_animation(spine_animation_state state, int32_t trackIndex, float mixDuration);
SPINE_CPP_LITE_EXPORT spine_track_entry spine_animation_state_add_empty_animation(spine_animation_state state, int32_t trackIndex, float mixDuration, float delay);
SPINE_CPP_LITE_EXPORT void spine_animation_state_set_empty_animations(spine_animation_state state, float mixDuration);
// @optional
SPINE_CPP_LITE_EXPORT spine_track_entry spine_animation_state_get_current(spine_animation_state state, int32_t trackIndex);
SPINE_CPP_LITE_EXPORT spine_animation_state_data spine_animation_state_get_data(spine_animation_state state);
SPINE_CPP_LITE_EXPORT float spine_animation_state_get_time_scale(spine_animation_state state);
@ -315,11 +339,13 @@ SPINE_CPP_LITE_EXPORT void spine_animation_state_set_time_scale(spine_animation_
// OMITTED enableQueue()
// OMITTED setManualTrackEntryDisposal()
// OMITTED getManualTrackEntryDisposal()
// @ignore
SPINE_CPP_LITE_EXPORT void spine_animation_state_dispose_track_entry(spine_animation_state state, spine_track_entry entry);
SPINE_CPP_LITE_EXPORT int32_t spine_animation_state_events_get_num_events(spine_animation_state_events events);
SPINE_CPP_LITE_EXPORT spine_event_type spine_animation_state_events_get_event_type(spine_animation_state_events events, int32_t index);
SPINE_CPP_LITE_EXPORT spine_track_entry spine_animation_state_events_get_track_entry(spine_animation_state_events events, int32_t index);
// @optional
SPINE_CPP_LITE_EXPORT spine_event spine_animation_state_events_get_event(spine_animation_state_events events, int32_t index);
SPINE_CPP_LITE_EXPORT void spine_animation_state_events_reset(spine_animation_state_events events);
@ -359,6 +385,7 @@ SPINE_CPP_LITE_EXPORT float spine_track_entry_get_mix_attachment_threshold(spine
SPINE_CPP_LITE_EXPORT void spine_track_entry_set_mix_attachment_threshold(spine_track_entry entry, float attachmentThreshold);
SPINE_CPP_LITE_EXPORT float spine_track_entry_get_mix_draw_order_threshold(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT void spine_track_entry_set_mix_draw_order_threshold(spine_track_entry entry, float drawOrderThreshold);
// @optional
SPINE_CPP_LITE_EXPORT spine_track_entry spine_track_entry_get_next(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT spine_bool spine_track_entry_is_complete(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT float spine_track_entry_get_mix_time(spine_track_entry entry);
@ -367,10 +394,14 @@ SPINE_CPP_LITE_EXPORT float spine_track_entry_get_mix_duration(spine_track_entry
SPINE_CPP_LITE_EXPORT void spine_track_entry_set_mix_duration(spine_track_entry entry, float mixDuration);
SPINE_CPP_LITE_EXPORT spine_mix_blend spine_track_entry_get_mix_blend(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT void spine_track_entry_set_mix_blend(spine_track_entry entry, spine_mix_blend mixBlend);
// @optional
SPINE_CPP_LITE_EXPORT spine_track_entry spine_track_entry_get_mixing_from(spine_track_entry entry);
// @optional
SPINE_CPP_LITE_EXPORT spine_track_entry spine_track_entry_get_mixing_to(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT void spine_track_entry_reset_rotation_directions(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT float spine_track_entry_get_track_complete(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT spine_bool spine_track_entry_was_applied(spine_track_entry entry);
SPINE_CPP_LITE_EXPORT spine_bool spine_track_entry_is_next_ready(spine_track_entry entry);
// OMITTED setListener()
// OMITTED setListener()
@ -385,7 +416,9 @@ SPINE_CPP_LITE_EXPORT spine_bone spine_skeleton_find_bone(spine_skeleton skeleto
SPINE_CPP_LITE_EXPORT spine_slot spine_skeleton_find_slot(spine_skeleton skeleton, const utf8 *slotName);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_skin_by_name(spine_skeleton skeleton, const utf8 *skinName);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_skin(spine_skeleton skeleton, spine_skin skin);
// @optional
SPINE_CPP_LITE_EXPORT spine_attachment spine_skeleton_get_attachment_by_name(spine_skeleton skeleton, const utf8 *slotName, const utf8 *attachmentName);
// @optional
SPINE_CPP_LITE_EXPORT spine_attachment spine_skeleton_get_attachment(spine_skeleton skeleton, int32_t slotIndex, const utf8 *attachmentName);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_attachment(spine_skeleton skeleton, const utf8 *slotName, const utf8 *attachmentName);
SPINE_CPP_LITE_EXPORT spine_ik_constraint spine_skeleton_find_ik_constraint(spine_skeleton skeleton, const utf8 *constraintName);
@ -393,7 +426,9 @@ SPINE_CPP_LITE_EXPORT spine_transform_constraint spine_skeleton_find_transform_c
SPINE_CPP_LITE_EXPORT spine_path_constraint spine_skeleton_find_path_constraint(spine_skeleton skeleton, const utf8 *constraintName);
SPINE_CPP_LITE_EXPORT spine_physics_constraint spine_skeleton_find_physics_constraint(spine_skeleton skeleton, const utf8 *constraintName);
SPINE_CPP_LITE_EXPORT spine_bounds spine_skeleton_get_bounds(spine_skeleton skeleton);
// @optional
SPINE_CPP_LITE_EXPORT spine_bone spine_skeleton_get_root_bone(spine_skeleton skeleton);
// @optional
SPINE_CPP_LITE_EXPORT spine_skeleton_data spine_skeleton_get_data(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_get_num_bones(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT spine_bone *spine_skeleton_get_bones(spine_skeleton skeleton);
@ -410,6 +445,7 @@ SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_get_num_path_constraints(spine_skel
SPINE_CPP_LITE_EXPORT spine_path_constraint *spine_skeleton_get_path_constraints(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT int32_t spine_skeleton_get_num_physics_constraints(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT spine_physics_constraint *spine_skeleton_get_physics_constraints(spine_skeleton skeleton);
// @optional
SPINE_CPP_LITE_EXPORT spine_skin spine_skeleton_get_skin(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT spine_color spine_skeleton_get_color(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_color(spine_skeleton skeleton, float r, float g, float b, float a);
@ -418,6 +454,7 @@ SPINE_CPP_LITE_EXPORT float spine_skeleton_get_x(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_x(spine_skeleton skeleton, float x);
SPINE_CPP_LITE_EXPORT float spine_skeleton_get_y(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_y(spine_skeleton skeleton, float y);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_scale(spine_skeleton skeleton, float scaleX, float scaleY);
SPINE_CPP_LITE_EXPORT float spine_skeleton_get_scale_x(spine_skeleton skeleton);
SPINE_CPP_LITE_EXPORT void spine_skeleton_set_scale_x(spine_skeleton skeleton, float scaleX);
SPINE_CPP_LITE_EXPORT float spine_skeleton_get_scale_y(spine_skeleton skeleton);
@ -460,7 +497,7 @@ SPINE_CPP_LITE_EXPORT spine_color spine_slot_data_get_color(spine_slot_data slot
SPINE_CPP_LITE_EXPORT void spine_slot_data_set_color(spine_slot_data slot, float r, float g, float b, float a);
SPINE_CPP_LITE_EXPORT spine_color spine_slot_data_get_dark_color(spine_slot_data slot);
SPINE_CPP_LITE_EXPORT void spine_slot_data_set_dark_color(spine_slot_data slot, float r, float g, float b, float a);
SPINE_CPP_LITE_EXPORT spine_bool spine_slot_data_has_dark_color(spine_slot_data slot);
SPINE_CPP_LITE_EXPORT spine_bool spine_slot_data_get_has_dark_color(spine_slot_data slot);
SPINE_CPP_LITE_EXPORT void spine_slot_data_set_has_dark_color(spine_slot_data slot, spine_bool hasDarkColor);
SPINE_CPP_LITE_EXPORT const utf8 *spine_slot_data_get_attachment_name(spine_slot_data slot);
SPINE_CPP_LITE_EXPORT void spine_slot_data_set_attachment_name(spine_slot_data slot, const utf8 *attachmentName);
@ -479,6 +516,7 @@ SPINE_CPP_LITE_EXPORT void spine_slot_set_color(spine_slot slot, float r, float
SPINE_CPP_LITE_EXPORT spine_color spine_slot_get_dark_color(spine_slot slot);
SPINE_CPP_LITE_EXPORT void spine_slot_set_dark_color(spine_slot slot, float r, float g, float b, float a);
SPINE_CPP_LITE_EXPORT spine_bool spine_slot_has_dark_color(spine_slot slot);
// @optional
SPINE_CPP_LITE_EXPORT spine_attachment spine_slot_get_attachment(spine_slot slot);
SPINE_CPP_LITE_EXPORT void spine_slot_set_attachment(spine_slot slot, spine_attachment attachment);
// OMITTED getDeform()
@ -487,6 +525,7 @@ SPINE_CPP_LITE_EXPORT void spine_slot_set_sequence_index(spine_slot slot, int32_
SPINE_CPP_LITE_EXPORT int32_t spine_bone_data_get_index(spine_bone_data data);
SPINE_CPP_LITE_EXPORT const utf8 *spine_bone_data_get_name(spine_bone_data data);
// @optional
SPINE_CPP_LITE_EXPORT spine_bone_data spine_bone_data_get_parent(spine_bone_data data);
SPINE_CPP_LITE_EXPORT float spine_bone_data_get_length(spine_bone_data data);
SPINE_CPP_LITE_EXPORT void spine_bone_data_set_length(spine_bone_data data, float length);
@ -506,7 +545,7 @@ SPINE_CPP_LITE_EXPORT float spine_bone_data_get_shear_y(spine_bone_data data);
SPINE_CPP_LITE_EXPORT void spine_bone_data_set_shear_y(spine_bone_data data, float shearY);
SPINE_CPP_LITE_EXPORT spine_inherit spine_bone_data_get_inherit(spine_bone_data data);
SPINE_CPP_LITE_EXPORT void spine_bone_data_set_inherit(spine_bone_data data, spine_inherit inherit);
SPINE_CPP_LITE_EXPORT spine_bool spine_bone_data_is_skin_required(spine_bone_data data);
SPINE_CPP_LITE_EXPORT spine_bool spine_bone_data_get_is_skin_required(spine_bone_data data);
SPINE_CPP_LITE_EXPORT void spine_bone_data_set_is_skin_required(spine_bone_data data, spine_bool isSkinRequired);
SPINE_CPP_LITE_EXPORT spine_color spine_bone_data_get_color(spine_bone_data data);
SPINE_CPP_LITE_EXPORT void spine_bone_data_set_color(spine_bone_data data, float r, float g, float b, float a);
@ -532,6 +571,7 @@ SPINE_CPP_LITE_EXPORT float spine_bone_get_world_to_local_rotation_x(spine_bone
SPINE_CPP_LITE_EXPORT float spine_bone_get_world_to_local_rotation_y(spine_bone bone);
SPINE_CPP_LITE_EXPORT spine_bone_data spine_bone_get_data(spine_bone bone);
SPINE_CPP_LITE_EXPORT spine_skeleton spine_bone_get_skeleton(spine_bone bone);
// @optional
SPINE_CPP_LITE_EXPORT spine_bone spine_bone_get_parent(spine_bone bone);
SPINE_CPP_LITE_EXPORT int32_t spine_bone_get_num_children(spine_bone bone);
SPINE_CPP_LITE_EXPORT spine_bone *spine_bone_get_children(spine_bone bone);
@ -586,6 +626,7 @@ SPINE_CPP_LITE_EXPORT void spine_bone_set_inherit(spine_bone data, spine_inherit
SPINE_CPP_LITE_EXPORT const utf8 *spine_attachment_get_name(spine_attachment attachment);
SPINE_CPP_LITE_EXPORT spine_attachment_type spine_attachment_get_type(spine_attachment attachment);
// @ignore
SPINE_CPP_LITE_EXPORT spine_attachment spine_attachment_copy(spine_attachment attachment);
SPINE_CPP_LITE_EXPORT void spine_attachment_dispose(spine_attachment attachment);
@ -601,6 +642,7 @@ SPINE_CPP_LITE_EXPORT spine_color spine_point_attachment_get_color(spine_point_a
SPINE_CPP_LITE_EXPORT void spine_point_attachment_set_color(spine_point_attachment attachment, float r, float g, float b, float a);
SPINE_CPP_LITE_EXPORT void spine_region_attachment_update_region(spine_region_attachment attachment);
// @ignore
SPINE_CPP_LITE_EXPORT void spine_region_attachment_compute_world_vertices(spine_region_attachment attachment, spine_slot slot, float *worldVertices);
SPINE_CPP_LITE_EXPORT float spine_region_attachment_get_x(spine_region_attachment attachment);
SPINE_CPP_LITE_EXPORT void spine_region_attachment_set_x(spine_region_attachment attachment, float x);
@ -620,8 +662,10 @@ SPINE_CPP_LITE_EXPORT spine_color spine_region_attachment_get_color(spine_region
SPINE_CPP_LITE_EXPORT void spine_region_attachment_set_color(spine_region_attachment attachment, float r, float g, float b, float a);
SPINE_CPP_LITE_EXPORT const utf8 *spine_region_attachment_get_path(spine_region_attachment attachment);
// OMITTED setPath()
// @optional
SPINE_CPP_LITE_EXPORT spine_texture_region spine_region_attachment_get_region(spine_region_attachment attachment);
// OMITTED setRegion()
// @optional
SPINE_CPP_LITE_EXPORT spine_sequence spine_region_attachment_get_sequence(spine_region_attachment attachment);
// OMITTED setSequence()
SPINE_CPP_LITE_EXPORT int32_t spine_region_attachment_get_num_offset(spine_region_attachment attachment);
@ -630,12 +674,14 @@ SPINE_CPP_LITE_EXPORT int32_t spine_region_attachment_get_num_uvs(spine_region_a
SPINE_CPP_LITE_EXPORT float *spine_region_attachment_get_uvs(spine_region_attachment attachment);
SPINE_CPP_LITE_EXPORT int32_t spine_vertex_attachment_get_world_vertices_length(spine_vertex_attachment attachment);
// @ignore
SPINE_CPP_LITE_EXPORT void spine_vertex_attachment_compute_world_vertices(spine_vertex_attachment attachment, spine_slot slot, float *worldVertices);
// OMITTED getId()
SPINE_CPP_LITE_EXPORT int32_t spine_vertex_attachment_get_num_bones(spine_vertex_attachment attachment);
SPINE_CPP_LITE_EXPORT int32_t *spine_vertex_attachment_get_bones(spine_vertex_attachment attachment);
SPINE_CPP_LITE_EXPORT int32_t spine_vertex_attachment_get_num_vertices(spine_vertex_attachment attachment);
SPINE_CPP_LITE_EXPORT float *spine_vertex_attachment_get_vertices(spine_vertex_attachment attachment);
// @optional
SPINE_CPP_LITE_EXPORT spine_attachment spine_vertex_attachment_get_timeline_attachment(spine_vertex_attachment timelineAttachment);
SPINE_CPP_LITE_EXPORT void spine_vertex_attachment_set_timeline_attachment(spine_vertex_attachment attachment, spine_attachment timelineAttachment);
// OMITTED copyTo()
@ -655,8 +701,10 @@ SPINE_CPP_LITE_EXPORT const utf8 *spine_mesh_attachment_get_path(spine_mesh_atta
// OMITTED setPath()
SPINE_CPP_LITE_EXPORT spine_texture_region spine_mesh_attachment_get_region(spine_mesh_attachment attachment);
// OMITTED setRegion()
// @optional
SPINE_CPP_LITE_EXPORT spine_sequence spine_mesh_attachment_get_sequence(spine_mesh_attachment attachment);
// OMITTED setSequence()
// @optional
SPINE_CPP_LITE_EXPORT spine_mesh_attachment spine_mesh_attachment_get_parent_mesh(spine_mesh_attachment attachment);
SPINE_CPP_LITE_EXPORT void spine_mesh_attachment_set_parent_mesh(spine_mesh_attachment attachment, spine_mesh_attachment parentMesh);
SPINE_CPP_LITE_EXPORT int32_t spine_mesh_attachment_get_num_edges(spine_mesh_attachment attachment);
@ -667,6 +715,7 @@ SPINE_CPP_LITE_EXPORT float spine_mesh_attachment_get_height(spine_mesh_attachme
SPINE_CPP_LITE_EXPORT void spine_mesh_attachment_set_height(spine_mesh_attachment attachment, float height);
// OMITTED newLinkedMesh()
// @optional
SPINE_CPP_LITE_EXPORT spine_slot_data spine_clipping_attachment_get_end_slot(spine_clipping_attachment attachment);
SPINE_CPP_LITE_EXPORT void spine_clipping_attachment_set_end_slot(spine_clipping_attachment attachment, spine_slot_data endSlot);
SPINE_CPP_LITE_EXPORT spine_color spine_clipping_attachment_get_color(spine_clipping_attachment attachment);
@ -685,6 +734,7 @@ SPINE_CPP_LITE_EXPORT spine_color spine_path_attachment_get_color(spine_path_att
SPINE_CPP_LITE_EXPORT void spine_path_attachment_set_color(spine_path_attachment attachment, float r, float g, float b, float a);
SPINE_CPP_LITE_EXPORT void spine_skin_set_attachment(spine_skin skin, int32_t slotIndex, const utf8 *name, spine_attachment attachment);
// @optional
SPINE_CPP_LITE_EXPORT spine_attachment spine_skin_get_attachment(spine_skin skin, int32_t slotIndex, const utf8 *name);
SPINE_CPP_LITE_EXPORT void spine_skin_remove_attachment(spine_skin skin, int32_t slotIndex, const utf8 *name);
// OMITTED findNamesForSlot()
@ -704,6 +754,7 @@ SPINE_CPP_LITE_EXPORT int32_t spine_skin_get_num_bones(spine_skin skin);
SPINE_CPP_LITE_EXPORT spine_bone_data *spine_skin_get_bones(spine_skin skin);
SPINE_CPP_LITE_EXPORT int32_t spine_skin_get_num_constraints(spine_skin skin);
SPINE_CPP_LITE_EXPORT spine_constraint_data *spine_skin_get_constraints(spine_skin skin);
// @ignore
SPINE_CPP_LITE_EXPORT spine_skin spine_skin_create(const utf8 *name);
SPINE_CPP_LITE_EXPORT void spine_skin_dispose(spine_skin skin);
@ -806,6 +857,7 @@ SPINE_CPP_LITE_EXPORT float spine_transform_constraint_get_mix_shear_y(spine_tra
SPINE_CPP_LITE_EXPORT void spine_transform_constraint_set_mix_shear_y(spine_transform_constraint constraint, float mixShearY);
SPINE_CPP_LITE_EXPORT spine_bool spine_transform_constraint_get_is_active(spine_transform_constraint constraint);
SPINE_CPP_LITE_EXPORT void spine_transform_constraint_set_is_active(spine_transform_constraint constraint, spine_bool isActive);
// OMITTED setToSetupPose()
SPINE_CPP_LITE_EXPORT int32_t spine_path_constraint_data_get_num_bones(spine_path_constraint_data data);
@ -949,7 +1001,7 @@ SPINE_CPP_LITE_EXPORT void spine_physics_constraint_set_remaining(spine_physics_
SPINE_CPP_LITE_EXPORT float spine_physics_constraint_get_remaining(spine_physics_constraint constraint);
SPINE_CPP_LITE_EXPORT void spine_physics_constraint_set_last_time(spine_physics_constraint constraint, float value);
SPINE_CPP_LITE_EXPORT float spine_physics_constraint_get_last_time(spine_physics_constraint constraint);
SPINE_CPP_LITE_EXPORT void spine_physics_constraint_reset(spine_physics_constraint constraint);
SPINE_CPP_LITE_EXPORT void spine_physics_constraint_reset_fully(spine_physics_constraint constraint);
// Omitted setToSetupPose()
SPINE_CPP_LITE_EXPORT void spine_physics_constraint_update(spine_physics_constraint data, spine_physics physics);
SPINE_CPP_LITE_EXPORT void spine_physics_constraint_translate(spine_physics_constraint data, float x, float y);
@ -995,4 +1047,6 @@ SPINE_CPP_LITE_EXPORT void spine_texture_region_set_original_width(spine_texture
SPINE_CPP_LITE_EXPORT int32_t spine_texture_region_get_original_height(spine_texture_region textureRegion);
SPINE_CPP_LITE_EXPORT void spine_texture_region_set_original_height(spine_texture_region textureRegion, int32_t originalHeight);
// @end: function_declarations
#endif

View File

@ -1,32 +0,0 @@
project(spine_cpp_unit_test)
set(SRC src/main.cpp)
add_executable(spine_cpp_unit_test ${SRC})
target_link_libraries(spine_cpp_unit_test spine-cpp)
#########################################################
# copy resources to build output directory
#########################################################
add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/../../examples/spineboy/export $<TARGET_FILE_DIR:spine_cpp_unit_test>/testdata/spineboy)
add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/../../examples/raptor/export $<TARGET_FILE_DIR:spine_cpp_unit_test>/testdata/raptor)
add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/../../examples/goblins/export $<TARGET_FILE_DIR:spine_cpp_unit_test>/testdata/goblins)
add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/../../examples/coin/export $<TARGET_FILE_DIR:spine_cpp_unit_test>/testdata/coin)
add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/../../examples/tank/export $<TARGET_FILE_DIR:spine_cpp_unit_test>/testdata/tank)
add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/../../examples/stretchyman/export $<TARGET_FILE_DIR:spine_cpp_unit_test>/testdata/stretchyman)

View File

@ -1,67 +0,0 @@
# spine-cpp-unit-tests
The spine-cpp-unit-tests project is to test the [spine](http://esotericsoftware.com) skeletal animation system. It does not perform rendering. It is primarily used for regression testing and leak detection. It is designed to be run from a Continuous Integration server and to passively verify changes automatically on check-in.
## Mini CPP Unit Testing
[MiniCppUnit](https://sourceforge.net/p/minicppunit/wiki/Home/) is a minimal unit testing framework similar to JUnit. It is used here to avoid large dependancies.
Tests are sorted into Suites, Fixtures and Cases. There is one suite, it contains many fixtures and each fixture contains test cases. To turn off a fixture, edit "TestOptions.h". To turn off specific test cases, comment out the TEST_CASE() line in the fixture's header.
## Memory Leak Detection
This project includes a very minimal memory leak detector. It is based roughly on the leak detector in the [Popcap Framework](https://sourceforge.net/projects/popcapframework/?source=directory), but has been modified over the years.
## Continuous Integration
The test runner includes the ability to format output messages to signal a CI server. An example interface for [Teamcity](https://www.jetbrains.com/teamcity/) is included. To implement for another server, determine the wireformat for the messages and duplicate/edit the teamcity_messages class. [Teamcity Wire Format](https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity)
### Trigger
Your CI server should trigger on VCS check-in.
### CMake Build Step
The first build step for the CI server should be to run CMake on the 'spine-cpp-unit-tests' folder. Follow the usage directions below.
### Compile Build Step
This build step should not execute if the previous step did not successfully complete.
Depending on the test agent build environment, you should build the output solution or project from the cmake step. Debug is fine.
### Test Runner Build Step
This build step should not execute if the previous step did not successfully complete.
Again, depending on the test agent build environment, you should have produced an executable. Run this executable.
## Usage
Make sure [CMake](https://cmake.org/download/) is installed.
Create a 'build' directory in the 'spine-cpp-unit-tests' folder. Then switch to that folder and execute cmake:
mkdir build
cd build
cmake ..
### Win32 build
msbuild spine_unit_test.sln /t:spine_unit_test /p:Configuration="Debug" /p:Platform="Win32"
## Licensing
This spine Runtime may only be used for personal or internal use, typically to evaluate spine before purchasing. If you would like to incorporate a spine Runtime into your applications, distribute software containing a spine Runtime, or modify a spine Runtime, then you will need a valid [spine license](https://esotericsoftware.com/spine-purchase). Please see the [spine Runtimes Software License](https://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE) for detailed information.
The spine Runtimes are developed with the intent to be used with data exported from spine. By purchasing spine, `Section 2` of the [spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the spine Runtimes.
original "walk"": 330
second "walk": 0d0
queue interrupt for original walk
queue start for second walk
drain interrupt and start
0d0 is interrupted
0d0 is ended
"run": 0c0
0d0 is interrupted
second walk becomes mixingFrom of run
0c0 is started
queue is drained
first walk: 6f0
second walk: 9c0

View File

@ -1,116 +0,0 @@
#include <spine/Debug.h>
#include <spine/spine.h>
#include <stdio.h>
#ifdef MSVC
#pragma warning(disable : 4710)
#endif
using namespace spine;
void loadBinary(const String &binaryFile, const String &atlasFile, Atlas *&atlas, SkeletonData *&skeletonData,
AnimationStateData *&stateData, Skeleton *&skeleton, AnimationState *&state) {
atlas = new (__FILE__, __LINE__) Atlas(atlasFile, NULL);
assert(atlas != NULL);
SkeletonBinary binary(atlas);
skeletonData = binary.readSkeletonDataFile(binaryFile);
assert(skeletonData);
skeleton = new (__FILE__, __LINE__) Skeleton(skeletonData);
assert(skeleton != NULL);
stateData = new (__FILE__, __LINE__) AnimationStateData(skeletonData);
assert(stateData != NULL);
stateData->setDefaultMix(0.4f);
state = new (__FILE__, __LINE__) AnimationState(stateData);
}
void loadJson(const String &jsonFile, const String &atlasFile, Atlas *&atlas, SkeletonData *&skeletonData,
AnimationStateData *&stateData, Skeleton *&skeleton, AnimationState *&state) {
atlas = new (__FILE__, __LINE__) Atlas(atlasFile, NULL);
assert(atlas != NULL);
SkeletonJson json(atlas);
skeletonData = json.readSkeletonDataFile(jsonFile);
assert(skeletonData);
skeleton = new (__FILE__, __LINE__) Skeleton(skeletonData);
assert(skeleton != NULL);
stateData = new (__FILE__, __LINE__) AnimationStateData(skeletonData);
assert(stateData != NULL);
stateData->setDefaultMix(0.4f);
state = new (__FILE__, __LINE__) AnimationState(stateData);
}
void dispose(Atlas *atlas, SkeletonData *skeletonData, AnimationStateData *stateData, Skeleton *skeleton,
AnimationState *state) {
delete skeleton;
delete state;
delete stateData;
delete skeletonData;
delete atlas;
}
struct TestData {
TestData(const String &jsonSkeleton, const String &binarySkeleton, const String &atlas) : _jsonSkeleton(
jsonSkeleton),
_binarySkeleton(
binarySkeleton),
_atlas(atlas) {}
String _jsonSkeleton;
String _binarySkeleton;
String _atlas;
};
void testLoading() {
Vector<TestData> testData;
testData.add(TestData("testdata/coin/coin-pro.json", "testdata/coin/coin-pro.skel", "testdata/coin/coin.atlas"));
/*testData.add(TestData("testdata/goblins/goblins-pro.json", "testdata/goblins/goblins-pro.skel",
"testdata/goblins/goblins.atlas"));
testData.add(TestData("testdata/raptor/raptor-pro.json", "testdata/raptor/raptor-pro.skel",
"testdata/raptor/raptor.atlas"));
testData.add(TestData("testdata/spineboy/spineboy-pro.json", "testdata/spineboy/spineboy-pro.skel",
"testdata/spineboy/spineboy.atlas"));
testData.add(TestData("testdata/stretchyman/stretchyman-pro.json", "testdata/stretchyman/stretchyman-pro.skel",
"testdata/stretchyman/stretchyman.atlas"));
testData.add(TestData("testdata/tank/tank-pro.json", "testdata/tank/tank-pro.skel", "testdata/tank/tank.atlas"));*/
for (size_t i = 0; i < testData.size(); i++) {
TestData &data = testData[i];
Atlas *atlas = NULL;
SkeletonData *skeletonData = NULL;
AnimationStateData *stateData = NULL;
Skeleton *skeleton = NULL;
AnimationState *state = NULL;
printf("Loading %s\n", data._jsonSkeleton.buffer());
loadJson(data._jsonSkeleton, data._atlas, atlas, skeletonData, stateData, skeleton, state);
dispose(atlas, skeletonData, stateData, skeleton, state);
printf("Loading %s\n", data._binarySkeleton.buffer());
loadBinary(data._binarySkeleton, data._atlas, atlas, skeletonData, stateData, skeleton, state);
dispose(atlas, skeletonData, stateData, skeleton, state);
}
}
namespace spine {
SpineExtension *getDefaultExtension() {
return new DefaultSpineExtension();
}
}// namespace spine
int main(int argc, char **argv) {
SP_UNUSED(argc);
SP_UNUSED(argv);
DebugExtension debug(SpineExtension::getInstance());
SpineExtension::setInstance(&debug);
testLoading();
debug.reportLeaks();
}

View File

@ -284,6 +284,12 @@ namespace spine {
/// See AnimationState::apply(Skeleton).
bool wasApplied();
/// Returns true if there is a getNext() track entry that is ready to become the current track entry during the
/// next AnimationState::update(float)}
bool isNextReady () {
return _next != NULL && _nextTrackLast - _next->_delay >= 0;
}
private:
Animation *_animation;
TrackEntry *_previous;

View File

@ -0,0 +1,110 @@
/******************************************************************************
* Spine Runtimes License Agreement
* Last updated July 28, 2023. Replaces all prior versions.
*
* Copyright (c) 2013-2023, Esoteric Software LLC
*
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
* otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#ifndef Spine_BlockAllocator_h
#define Spine_BlockAllocator_h
#include <cstdint>
#include <spine/SpineObject.h>
#include <spine/Extension.h>
#include <spine/MathUtil.h>
#include <spine/Vector.h>
namespace spine {
struct Block {
int size;
int allocated;
uint8_t *memory;
int free() {
return size - allocated;
}
bool canFit(int numBytes) {
return free() >= numBytes;
}
uint8_t *allocate(int numBytes) {
uint8_t *ptr = memory + allocated;
allocated += numBytes;
return ptr;
}
};
class BlockAllocator : public SpineObject {
int initialBlockSize;
Vector <Block> blocks;
public:
BlockAllocator(int initialBlockSize) : initialBlockSize(initialBlockSize) {
blocks.add(newBlock(initialBlockSize));
}
~BlockAllocator() {
for (int i = 0, n = (int) blocks.size(); i < n; i++) {
SpineExtension::free(blocks[i].memory, __FILE__, __LINE__);
}
}
template<typename T>
T *allocate(size_t num) {
return (T *) _allocate((int) (sizeof(T) * num));
}
void compress() {
if (blocks.size() == 1) return;
int totalSize = 0;
for (int i = 0, n = (int)blocks.size(); i < n; i++) {
totalSize += blocks[i].size;
SpineExtension::free(blocks[i].memory, __FILE__, __LINE__);
}
blocks.clear();
blocks.add(newBlock(totalSize));
}
private:
void *_allocate(int numBytes) {
// 16-byte align allocations
int alignedNumBytes = numBytes + (numBytes % 16 != 0 ? 16 - (numBytes % 16) : 0);
Block *block = &blocks[blocks.size() - 1];
if (!block->canFit(alignedNumBytes)) {
blocks.add(newBlock(MathUtil::max(initialBlockSize, alignedNumBytes)));
block = &blocks[blocks.size() - 1];
}
return block->allocate(alignedNumBytes);
}
Block newBlock(int numBytes) {
Block block = {MathUtil::max(initialBlockSize, numBytes), 0, nullptr};
block.memory = SpineExtension::alloc<uint8_t>(block.size, __FILE__, __LINE__);
return block;
}
};
}
#endif

View File

@ -58,6 +58,8 @@ namespace spine {
class Attachment;
class SkeletonClipping;
class SP_API Skeleton : public SpineObject {
friend class AnimationState;
@ -187,7 +189,9 @@ namespace spine {
/// @param outWidth The width of the AABB
/// @param outHeight The height of the AABB.
/// @param outVertexBuffer Reference to hold a Vector of floats. This method will assign it with new floats as needed.
// @param clipping Pointer to a SkeletonClipping instance or NULL. If a clipper is given, clipping attachments will be taken into account.
void getBounds(float &outX, float &outY, float &outWidth, float &outHeight, Vector<float> &outVertexBuffer);
void getBounds(float &outX, float &outY, float &outWidth, float &outHeight, Vector<float> &outVertexBuffer, SkeletonClipping *clipper);
Bone *getRootBone();

Some files were not shown because too many files have changed in this diff Show More