mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Merge branch '4.3-beta-sliders' into 4.3-beta
This commit is contained in:
commit
c4148b454f
6
.github/workflows/format-check.yml
vendored
6
.github/workflows/format-check.yml
vendored
@ -6,13 +6,15 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Install OS dependencies (needed for act on ubuntu-latest)
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y --force-yes curl xz-utils libicu-dev git dos2unix libncurses5
|
||||
sudo apt install -y --force-yes curl xz-utils libicu-dev git dos2unix
|
||||
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
||||
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@ jobs:
|
||||
matrix:
|
||||
version:
|
||||
[
|
||||
{"tag": "4.4.1-stable", "version": "4.4.1.stable", "dev": false},
|
||||
{"tag": "4.3-stable", "version": "4.3.stable", "dev": false},
|
||||
{"tag": "4.2.2-stable", "version": "4.2.2.stable", "dev": false},
|
||||
]
|
||||
uses: ./.github/workflows/spine-godot-extension-v4.yml
|
||||
with:
|
||||
|
||||
@ -49,7 +49,7 @@ jobs:
|
||||
path: spine-godot/example-v4-extension/bin/windows/*.dll
|
||||
|
||||
build-linux-x86_64:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -120,7 +120,7 @@ jobs:
|
||||
path: spine-godot/example-v4-extension/bin/ios/*.xcframework/**/*
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -163,7 +163,7 @@ jobs:
|
||||
path: spine-godot/example-v4-extension/bin/android/*.so
|
||||
|
||||
build-web:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
4
.github/workflows/spine-godot-v4-all.yml
vendored
4
.github/workflows/spine-godot-v4-all.yml
vendored
@ -14,10 +14,10 @@ jobs:
|
||||
matrix:
|
||||
version:
|
||||
[
|
||||
{"tag": "4.4.1-stable", "version": "4.4.1.stable", "mono": false},
|
||||
{"tag": "4.4.1-stable", "version": "4.4.1.stable", "mono": true},
|
||||
{"tag": "4.3-stable", "version": "4.3.stable", "mono": false},
|
||||
{"tag": "4.3-stable", "version": "4.3.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},
|
||||
]
|
||||
uses: ./.github/workflows/spine-godot-v4.yml
|
||||
with:
|
||||
|
||||
10
.github/workflows/spine-godot-v4.yml
vendored
10
.github/workflows/spine-godot-v4.yml
vendored
@ -34,7 +34,7 @@ env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_EC2_METADATA_DISABLED: true
|
||||
EM_VERSION: 3.1.26
|
||||
EM_VERSION: 3.1.64
|
||||
GODOT_TAG: ${{ inputs.godot_tag }}
|
||||
GODOT_VERSION: ${{ inputs.godot_version }}
|
||||
GODOT_MONO: ${{ inputs.godot_mono }}
|
||||
@ -65,7 +65,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/**/*
|
||||
|
||||
godot-editor-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -161,7 +161,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/macos.zip
|
||||
|
||||
godot-template-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -218,7 +218,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/windows_release_x86_64.exe
|
||||
|
||||
godot-template-android:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.godot_mono == false }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -266,7 +266,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/android_source.zip
|
||||
|
||||
godot-template-web:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ inputs.godot_mono == false }}
|
||||
|
||||
steps:
|
||||
|
||||
6
.github/workflows/spine-godot.yml
vendored
6
.github/workflows/spine-godot.yml
vendored
@ -130,7 +130,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/osx.zip
|
||||
|
||||
godot-template-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -187,7 +187,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/windows_64_release.exe
|
||||
|
||||
godot-template-android:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@ -233,7 +233,7 @@ jobs:
|
||||
path: spine-godot/godot/bin/android_source.zip
|
||||
|
||||
godot-template-web:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -145,6 +145,8 @@ spine-ts/spine-canvas/dist
|
||||
spine-ts/spine-webgl/dist
|
||||
spine-ts/spine-player/dist
|
||||
spine-ts/spine-threejs/dist
|
||||
spine-ts/spine-phaser-v3/dist
|
||||
spine-ts/spine-phaser-v4/dist
|
||||
spine-ts/spine-pixi-v7/dist
|
||||
spine-ts/spine-pixi-v8/dist
|
||||
spine-libgdx/gradle
|
||||
@ -189,7 +191,6 @@ spine-flutter/src/spine-cpp
|
||||
|
||||
spine-godot/.clang-format
|
||||
|
||||
spine-ts/spine-phaser/dist
|
||||
spine-godot/.cache
|
||||
spine-godot/build/compile_commands.json
|
||||
|
||||
|
||||
@ -6,29 +6,48 @@ import PackageDescription
|
||||
let package = Package(
|
||||
name: "spine-ios",
|
||||
platforms: [
|
||||
.iOS(.v13)
|
||||
.iOS(.v13),
|
||||
.tvOS(.v13),
|
||||
.macCatalyst(.v13),
|
||||
.visionOS(.v1),
|
||||
.macOS(.v10_15),
|
||||
.watchOS(.v6),
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, making them visible to other packages.
|
||||
.library(
|
||||
name: "Spine",
|
||||
targets: ["Spine"]
|
||||
targets: ["SpineModule"]
|
||||
)
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SpineModule",
|
||||
dependencies: [
|
||||
.byName(
|
||||
name: "Spine",
|
||||
condition: .when(platforms: [
|
||||
.iOS,
|
||||
])
|
||||
),
|
||||
"SpineCppLite",
|
||||
"SpineShadersStructs",
|
||||
],
|
||||
path: "spine-ios/Sources/SpineModule"
|
||||
),
|
||||
.target(
|
||||
name: "Spine",
|
||||
dependencies: [
|
||||
"SpineCppLite", "SpineShadersStructs"
|
||||
],
|
||||
path: "spine-ios/Sources/Spine",
|
||||
swiftSettings: [
|
||||
.interoperabilityMode(.Cxx)
|
||||
]
|
||||
path: "spine-ios/Sources/Spine"
|
||||
),
|
||||
.target(
|
||||
name: "SpineCppLite",
|
||||
path: "spine-ios/Sources/SpineCppLite"
|
||||
path: "spine-ios/Sources/SpineCppLite",
|
||||
linkerSettings: [
|
||||
.linkedLibrary("c++"),
|
||||
]
|
||||
),
|
||||
.systemLibrary(
|
||||
name: "SpineShadersStructs",
|
||||
|
||||
@ -18,7 +18,8 @@ Spine runtimes for iOS.
|
||||
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"'
|
||||
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp/include" "$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp-lite"',
|
||||
'MTL_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/SpineShadersStructs"'
|
||||
}
|
||||
|
||||
s.resource_bundles = {
|
||||
|
||||
@ -518,46 +518,87 @@ cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-player/example/a
|
||||
|
||||
cp -f ../celestial-circus/export/* "$ROOT/spine-ts/spine-player/example/assets/"
|
||||
|
||||
rm "$ROOT/spine-ts/spine-phaser/example/assets/"*
|
||||
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../raptor/export/raptor-pma.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../raptor/export/raptor-pma.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
rm "$ROOT/spine-ts/spine-phaser-v3/example/assets/"*
|
||||
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../raptor/export/raptor-pma.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../raptor/export/raptor-pma.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-phaser/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-phaser/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-phaser/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-phaser-v3/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-phaser-v3/example/typescript/assets/"
|
||||
|
||||
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../coin/export/coin-pma.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../coin/export/coin-pma.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../coin/export/coin-pma.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../coin/export/coin-pma.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../stretchyman/export/stretchyman-pro.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pma.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pma.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pma.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pma.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pma.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pma.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pma.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pma.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../celestial-circus/export/* "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../celestial-circus/export/* "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../cloud-pot/export/cloud-pot.json "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.json "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../sack/export/sack-pro.json "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../sack/export/sack-pro.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../sack/export/sack.atlas "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../sack/export/sack.png "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../sack/export/sack-pro.json "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../sack/export/sack-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../sack/export/sack.atlas "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../sack/export/sack.png "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
cp -f ../snowglobe/export/snowglobe-pro.json "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe-pro.skel "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe* "$ROOT/spine-ts/spine-phaser/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe-pro.json "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe-pro.skel "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe* "$ROOT/spine-ts/spine-phaser-v3/example/assets/"
|
||||
|
||||
rm "$ROOT/spine-ts/spine-phaser-v4/example/assets/"*
|
||||
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../raptor/export/raptor-pma.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../raptor/export/raptor-pma.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../spineboy/export/spineboy-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.atlas "$ROOT/spine-ts/spine-phaser-v4/example/typescript/assets/"
|
||||
cp -f ../spineboy/export/spineboy-pma.png "$ROOT/spine-ts/spine-phaser-v4/example/typescript/assets/"
|
||||
|
||||
cp -f ../coin/export/coin-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../coin/export/coin-pma.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../coin/export/coin-pma.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../stretchyman/export/stretchyman-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pma.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../stretchyman/export/stretchyman-pma.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pma.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../mix-and-match/export/mix-and-match-pma.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../celestial-circus/export/* "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../cloud-pot/export/cloud-pot.json "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../cloud-pot/export/cloud-pot.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../sack/export/sack-pro.json "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../sack/export/sack-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../sack/export/sack.atlas "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../sack/export/sack.png "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
cp -f ../snowglobe/export/snowglobe-pro.json "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe-pro.skel "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
cp -f ../snowglobe/export/snowglobe* "$ROOT/spine-ts/spine-phaser-v4/example/assets/"
|
||||
|
||||
rm "$ROOT/spine-ts/spine-pixi-v7/example/assets/"*
|
||||
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-ts/spine-pixi-v7/example/assets/"
|
||||
|
||||
@ -208,11 +208,11 @@ void spDebug_printTimeline(spTimeline *timeline) {
|
||||
case SP_TIMELINE_SEQUENCE: {
|
||||
spSequenceTimeline *t = (spSequenceTimeline *) timeline;
|
||||
_spDebug_printTimelineBase(&t->super);
|
||||
}
|
||||
}// fallthrough
|
||||
case SP_TIMELINE_INHERIT: {
|
||||
spInheritTimeline *t = (spInheritTimeline *) timeline;
|
||||
_spDebug_printTimelineBase(&t->super);
|
||||
}
|
||||
}// fallthrough
|
||||
default: {
|
||||
_spDebug_printTimelineBase(timeline);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ void spIkConstraint_apply1(spBone *bone, float targetX, float targetY, int /*boo
|
||||
pb = -sc * s * bone->skeleton->scaleX;
|
||||
pd = sa * s * bone->skeleton->scaleY;
|
||||
rotationIK += ATAN2(sc, sa) * RAD_DEG;
|
||||
}
|
||||
}// fallthrough
|
||||
default: {
|
||||
float x = targetX - p->worldX, y = targetY - p->worldY;
|
||||
float d = pa * pd - pb * pc;
|
||||
|
||||
@ -1178,11 +1178,6 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
|
||||
return NULL;
|
||||
mesh = SUB_CAST(spMeshAttachment, attachment);
|
||||
mesh->path = (char *) path;
|
||||
if (mesh->path) {
|
||||
char *tmp = NULL;
|
||||
MALLOC_STR(tmp, mesh->path);
|
||||
mesh->path = tmp;
|
||||
}
|
||||
spColor_setFromColor(&mesh->color, &color);
|
||||
mesh->sequence = sequence;
|
||||
mesh->width = width;
|
||||
|
||||
@ -391,7 +391,7 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro
|
||||
|
||||
for (frame = 0, bezier = 0;; ++frame) {
|
||||
float time2;
|
||||
spRGBA2Timeline_setFrame(timeline, frame, time, color.r, color.g, color.b, color.a, color2.g,
|
||||
spRGBA2Timeline_setFrame(timeline, frame, time, color.r, color.g, color.b, color.a, color2.r,
|
||||
color2.g, color2.b);
|
||||
nextMap = keyMap->next;
|
||||
if (!nextMap) {
|
||||
|
||||
@ -439,6 +439,7 @@ class SwiftFunctionWriter:
|
||||
if spine_params and spine_params[0].type == self.spine_object.name:
|
||||
spine_params_without_ivar = spine_params[1:]
|
||||
else:
|
||||
function_string = function_string.replace("public func ", "public static func ")
|
||||
spine_params_without_ivar = spine_params
|
||||
|
||||
swift_params = [
|
||||
@ -501,6 +502,39 @@ class SwiftObjectWriter:
|
||||
object_string += "\n"
|
||||
object_string += "\n"
|
||||
|
||||
object_string += inset
|
||||
object_string += "public override func isEqual(_ object: Any?) -> Bool"
|
||||
object_string += " {"
|
||||
object_string += "\n"
|
||||
object_string += inset + inset
|
||||
object_string += f"guard let other = object as? {class_name} else {{ return false }}"
|
||||
object_string += "\n"
|
||||
object_string += inset + inset
|
||||
object_string += f"return self.{ivar_name} == other.{ivar_name}"
|
||||
object_string += "\n"
|
||||
object_string += inset
|
||||
object_string += "}"
|
||||
object_string += "\n"
|
||||
object_string += "\n"
|
||||
|
||||
object_string += inset
|
||||
object_string += "public override var hash: Int"
|
||||
object_string += " {"
|
||||
object_string += "\n"
|
||||
object_string += inset + inset
|
||||
object_string += "var hasher = Hasher()"
|
||||
object_string += "\n"
|
||||
object_string += inset + inset
|
||||
object_string += f"hasher.combine(self.{ivar_name})"
|
||||
object_string += "\n"
|
||||
object_string += inset + inset
|
||||
object_string += "return hasher.finalize()"
|
||||
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 = {}
|
||||
|
||||
@ -3007,7 +3007,10 @@ spine_skin_entries spine_skin_get_entries(spine_skin skin) {
|
||||
_spine_skin_entries *entries = SpineExtension::getInstance()->calloc<_spine_skin_entries>(1, __FILE__, __LINE__);
|
||||
{
|
||||
Skin::AttachmentMap::Entries mapEntries = _skin->getAttachments();
|
||||
while (mapEntries.hasNext()) entries->numEntries++;
|
||||
while (mapEntries.hasNext()) {
|
||||
entries->numEntries++;
|
||||
mapEntries.next();
|
||||
}
|
||||
}
|
||||
{
|
||||
entries->entries = SpineExtension::getInstance()->calloc<_spine_skin_entry>(entries->numEntries, __FILE__, __LINE__);
|
||||
|
||||
@ -78,7 +78,10 @@ namespace spine {
|
||||
}
|
||||
|
||||
void compress() {
|
||||
if (blocks.size() == 1) return;
|
||||
if (blocks.size() == 1) {
|
||||
blocks[0].allocated = 0;
|
||||
return;
|
||||
}
|
||||
int totalSize = 0;
|
||||
for (int i = 0, n = (int)blocks.size(); i < n; i++) {
|
||||
totalSize += blocks[i].size;
|
||||
|
||||
@ -85,6 +85,10 @@ namespace spine {
|
||||
for (size_t i = oldSize; i < _size; i++) {
|
||||
construct(_buffer + i, defaultValue);
|
||||
}
|
||||
} else {
|
||||
for (size_t i = _size; i < oldSize; i++) {
|
||||
destroy(_buffer + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -507,6 +507,7 @@ void Skeleton::getBounds(float &outX, float &outY, float &outWidth,
|
||||
} else if (attachment != NULL &&
|
||||
attachment->getRTTI().instanceOf(ClippingAttachment::rtti) && clipper != NULL) {
|
||||
clipper->clipStart(*slot, static_cast<ClippingAttachment *>(attachment));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (verticesLength > 0) {
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
# 4.2.35
|
||||
- Port of commit f1e0f0f: Fixed animation not being mixed out in some cases.
|
||||
|
||||
# 4.2.34
|
||||
- Support latest emscripten SDK (4.0.6+) via update of web_ffi
|
||||
|
||||
# 4.2.33
|
||||
- Merge fixes in spine-cpp(-lite)
|
||||
- Prepare for upcoming Dart/Flutter releases, see https://github.com/EsotericSoftware/spine-runtimes/pull/2690
|
||||
|
||||
@ -12,7 +12,8 @@ em++ \
|
||||
-Isrc/spine-cpp/include \
|
||||
-O2 --closure 1 -fno-rtti -fno-exceptions \
|
||||
-s STRICT=1 \
|
||||
-s LLD_REPORT_UNDEFINED \
|
||||
-s EXPORTED_RUNTIME_METHODS=wasmExports \
|
||||
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
|
||||
-s MODULARIZE=1 \
|
||||
-s ALLOW_MEMORY_GROWTH=1 \
|
||||
-s ALLOW_TABLE_GROWTH \
|
||||
|
||||
@ -169,7 +169,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "4.2.29"
|
||||
version: "4.2.34"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -206,10 +206,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_ffi_fork
|
||||
sha256: "7466228b7fc6a29ee1b5f6ab7ee2473847367a70fb523eb1a7c1d7a6a9841589"
|
||||
sha256: "557b3008bb3c8547ee63eac6e53c0ebebb443da9d7558b3f1b98e1ed59989a11"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.4"
|
||||
version: "0.7.5"
|
||||
sdks:
|
||||
dart: ">=3.3.0-0 <4.0.0"
|
||||
flutter: ">=3.16.0"
|
||||
|
||||
@ -1,318 +1,146 @@
|
||||
const module = {};
|
||||
|
||||
var libspine_flutter = (() => {
|
||||
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
||||
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
|
||||
var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined;
|
||||
if (typeof __filename != 'undefined') _scriptName = _scriptName || __filename;
|
||||
return (
|
||||
function(libspine_flutter) {
|
||||
libspine_flutter = libspine_flutter || {};
|
||||
async function(moduleArg = {}) {
|
||||
var moduleRtn;
|
||||
|
||||
var a=moduleArg,b,h,k=new Promise((c,d)=>{b=c;h=d}),aa="object"==typeof window,l="undefined"!=typeof WorkerGlobalScope,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type,p={...a},q="",r,t;
|
||||
if(m){var fs=require("fs");require("path");q=__dirname+"/";t=c=>{c=u(c)?new URL(c):c;return fs.readFileSync(c)};r=async c=>{c=u(c)?new URL(c):c;return fs.readFileSync(c,void 0)};process.argv.slice(2)}else if(aa||l)l?q=self.location.href:"undefined"!=typeof document&&document.currentScript&&(q=document.currentScript.src),_scriptName&&(q=_scriptName),q.startsWith("blob:")?q="":q=q.slice(0,q.replace(/[?#].*/,"").lastIndexOf("/")+1),l&&(t=c=>{var d=new XMLHttpRequest;d.open("GET",c,!1);d.responseType=
|
||||
"arraybuffer";d.send(null);return new Uint8Array(d.response)}),r=async c=>{if(u(c))return new Promise((e,g)=>{var f=new XMLHttpRequest;f.open("GET",c,!0);f.responseType="arraybuffer";f.onload=()=>{200==f.status||0==f.status&&f.response?e(f.response):g(f.status)};f.onerror=g;f.send(null)});var d=await fetch(c,{credentials:"same-origin"});if(d.ok)return d.arrayBuffer();throw Error(d.status+" : "+d.url);};var ba=console.log.bind(console),v=console.error.bind(console);Object.assign(a,p);p=null;
|
||||
var w,x=!1,z,A,B,C,D,E,F,G,u=c=>c.startsWith("file://");function H(){var c=w.buffer;a.HEAP8=z=new Int8Array(c);a.HEAP16=B=new Int16Array(c);a.HEAPU8=A=new Uint8Array(c);a.HEAPU16=new Uint16Array(c);a.HEAP32=C=new Int32Array(c);a.HEAPU32=D=new Uint32Array(c);a.HEAPF32=E=new Float32Array(c);a.HEAPF64=G=new Float64Array(c);a.HEAP64=F=new BigInt64Array(c);a.HEAPU64=new BigUint64Array(c)}var I=0,J=null;
|
||||
function L(c){c="Aborted("+c+")";v(c);x=!0;c=new WebAssembly.RuntimeError(c+". Build with -sASSERTIONS for more info.");h(c);throw c;}var M;async function ca(c){try{var d=await r(c);return new Uint8Array(d)}catch{}if(t)c=t(c);else throw"both async and sync fetching of the wasm failed";return c}async function da(c,d){try{var e=await ca(c);return await WebAssembly.instantiate(e,d)}catch(g){v(`failed to asynchronously prepare wasm: ${g}`),L(g)}}
|
||||
async function ea(c){var d=M;if("function"==typeof WebAssembly.instantiateStreaming&&!u(d)&&!m)try{var e=fetch(d,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(e,c)}catch(g){v(`wasm streaming compile failed: ${g}`),v("falling back to ArrayBuffer instantiation")}return da(d,c)}class fa{name="ExitStatus";constructor(c){this.message=`Program terminated with exit(${c})`;this.status=c}}a.ExitStatus=fa;a.callRuntimeCallbacks=c=>{for(;0<c.length;)c.shift()(a)};
|
||||
a.getValue=function(c,d="i8"){d.endsWith("*")&&(d="*");switch(d){case "i1":return z[c];case "i8":return z[c];case "i16":return B[c>>1];case "i32":return C[c>>2];case "i64":return F[c>>3];case "float":return E[c>>2];case "double":return G[c>>3];case "*":return D[c>>2];default:L(`invalid type for getValue: ${d}`)}};
|
||||
a.setValue=function(c,d,e="i8"){e.endsWith("*")&&(e="*");switch(e){case "i1":z[c]=d;break;case "i8":z[c]=d;break;case "i16":B[c>>1]=d;break;case "i32":C[c>>2]=d;break;case "i64":F[c>>3]=BigInt(d);break;case "float":E[c>>2]=d;break;case "double":G[c>>3]=d;break;case "*":D[c>>2]=d;break;default:L(`invalid type for setValue: ${e}`)}};a.stackRestore=c=>ha(c);a.stackSave=()=>ia();var N="undefined"!=typeof TextDecoder?new TextDecoder:void 0;a.UTF8Decoder=N;
|
||||
var O=(c,d=0,e=NaN)=>{var g=d+e;for(e=d;c[e]&&!(e>=g);)++e;if(16<e-d&&c.buffer&&N)return N.decode(c.subarray(d,e));for(g="";d<e;){var f=c[d++];if(f&128){var n=c[d++]&63;if(192==(f&224))g+=String.fromCharCode((f&31)<<6|n);else{var y=c[d++]&63;f=224==(f&240)?(f&15)<<12|n<<6|y:(f&7)<<18|n<<12|y<<6|c[d++]&63;65536>f?g+=String.fromCharCode(f):(f-=65536,g+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else g+=String.fromCharCode(f)}return g};a.UTF8ArrayToString=O;a.UTF8ToString=(c,d)=>c?O(A,c,d):"";
|
||||
var P=(c,d,e,g)=>L(`Assertion failed: ${c?O(A,c,void 0):""}, at: `+[d?d?O(A,d,void 0):"":"unknown filename",e,g?g?O(A,g,void 0):"":"unknown function"]);a.___assert_fail=P;var Q=()=>L("");a.__abort_js=Q;a.getHeapMax=()=>2147483648;a.alignMemory=(c,d)=>Math.ceil(c/d)*d;var R=c=>{c=(c-w.buffer.byteLength+65535)/65536|0;try{return w.grow(c),H(),1}catch(d){}};a.growMemory=R;
|
||||
var S=c=>{var d=A.length;c>>>=0;if(2147483648<c)return!1;for(var e=1;4>=e;e*=2){var g=d*(1+.2/e);g=Math.min(g,c+100663296);if(R(Math.min(2147483648,65536*Math.ceil(Math.max(c,g)/65536))))return!0}return!1};a._emscripten_resize_heap=S;var T=[null,[],[]];a.printCharBuffers=T;var U=(c,d)=>{var e=T[c];0===d||10===d?((1===c?ba:v)(O(e)),e.length=0):e.push(d)};a.printChar=U;a.flush_NO_FILESYSTEM=()=>{T[1].length&&U(1,10);T[2].length&&U(2,10)};a.SYSCALLS={h:void 0,g(c){return c?O(A,c,void 0):""}};
|
||||
var V=(c,d,e,g)=>{for(var f=0,n=0;n<e;n++){var y=D[d>>2],W=D[d+4>>2];d+=8;for(var K=0;K<W;K++)U(c,A[y+K]);f+=W}D[g>>2]=f;return 0};a._fd_write=V;a.ptrToString=c=>"0x"+(c>>>0).toString(16).padStart(8,"0");
|
||||
var X={__assert_fail:P,_abort_js:Q,emscripten_resize_heap:S,fd_write:V},Y=await (async function(){I++;var c={env:X,wasi_snapshot_preview1:X};M??=q+"libspine_flutter.wasm";try{return Y=(await ea(c)).instance.exports,a.wasmExports=Y,w=Y.memory,H(),I--,0==I&&J&&(c=J,J=null,c()),Y}catch(d){return h(d),Promise.reject(d)}}());a._spine_enable_debug_extension=Y.spine_enable_debug_extension;a._spine_major_version=Y.spine_major_version;a._spine_minor_version=Y.spine_minor_version;
|
||||
a._spine_report_leaks=Y.spine_report_leaks;a._spine_color_get_r=Y.spine_color_get_r;a._spine_color_get_g=Y.spine_color_get_g;a._spine_color_get_b=Y.spine_color_get_b;a._spine_color_get_a=Y.spine_color_get_a;a._spine_bounds_get_x=Y.spine_bounds_get_x;a._spine_bounds_get_y=Y.spine_bounds_get_y;a._spine_bounds_get_width=Y.spine_bounds_get_width;a._spine_bounds_get_height=Y.spine_bounds_get_height;a._spine_vector_get_x=Y.spine_vector_get_x;a._spine_vector_get_y=Y.spine_vector_get_y;
|
||||
a._spine_atlas_load=Y.spine_atlas_load;a._spine_atlas_load_callback=Y.spine_atlas_load_callback;a._spine_atlas_get_num_image_paths=Y.spine_atlas_get_num_image_paths;a._spine_atlas_is_pma=Y.spine_atlas_is_pma;a._spine_atlas_get_image_path=Y.spine_atlas_get_image_path;a._spine_atlas_get_error=Y.spine_atlas_get_error;a._spine_atlas_dispose=Y.spine_atlas_dispose;a._free=Y.free;a._spine_skeleton_data_load_json=Y.spine_skeleton_data_load_json;a._spine_skeleton_data_load_binary=Y.spine_skeleton_data_load_binary;
|
||||
a._spine_skeleton_data_result_get_error=Y.spine_skeleton_data_result_get_error;a._spine_skeleton_data_result_get_data=Y.spine_skeleton_data_result_get_data;a._spine_skeleton_data_result_dispose=Y.spine_skeleton_data_result_dispose;a._spine_skeleton_data_find_bone=Y.spine_skeleton_data_find_bone;a._spine_skeleton_data_find_slot=Y.spine_skeleton_data_find_slot;a._spine_skeleton_data_find_skin=Y.spine_skeleton_data_find_skin;a._spine_skeleton_data_find_event=Y.spine_skeleton_data_find_event;
|
||||
a._spine_skeleton_data_find_animation=Y.spine_skeleton_data_find_animation;a._spine_skeleton_data_find_ik_constraint=Y.spine_skeleton_data_find_ik_constraint;a._spine_skeleton_data_find_transform_constraint=Y.spine_skeleton_data_find_transform_constraint;a._spine_skeleton_data_find_path_constraint=Y.spine_skeleton_data_find_path_constraint;a._spine_skeleton_data_find_physics_constraint=Y.spine_skeleton_data_find_physics_constraint;a._spine_skeleton_data_get_name=Y.spine_skeleton_data_get_name;
|
||||
a._spine_skeleton_data_get_num_bones=Y.spine_skeleton_data_get_num_bones;a._spine_skeleton_data_get_bones=Y.spine_skeleton_data_get_bones;a._spine_skeleton_data_get_num_slots=Y.spine_skeleton_data_get_num_slots;a._spine_skeleton_data_get_slots=Y.spine_skeleton_data_get_slots;a._spine_skeleton_data_get_num_skins=Y.spine_skeleton_data_get_num_skins;a._spine_skeleton_data_get_skins=Y.spine_skeleton_data_get_skins;a._spine_skeleton_data_get_default_skin=Y.spine_skeleton_data_get_default_skin;
|
||||
a._spine_skeleton_data_set_default_skin=Y.spine_skeleton_data_set_default_skin;a._spine_skeleton_data_get_num_events=Y.spine_skeleton_data_get_num_events;a._spine_skeleton_data_get_events=Y.spine_skeleton_data_get_events;a._spine_skeleton_data_get_num_animations=Y.spine_skeleton_data_get_num_animations;a._spine_skeleton_data_get_animations=Y.spine_skeleton_data_get_animations;a._spine_skeleton_data_get_num_ik_constraints=Y.spine_skeleton_data_get_num_ik_constraints;
|
||||
a._spine_skeleton_data_get_ik_constraints=Y.spine_skeleton_data_get_ik_constraints;a._spine_skeleton_data_get_num_transform_constraints=Y.spine_skeleton_data_get_num_transform_constraints;a._spine_skeleton_data_get_transform_constraints=Y.spine_skeleton_data_get_transform_constraints;a._spine_skeleton_data_get_num_path_constraints=Y.spine_skeleton_data_get_num_path_constraints;a._spine_skeleton_data_get_path_constraints=Y.spine_skeleton_data_get_path_constraints;
|
||||
a._spine_skeleton_data_get_num_physics_constraints=Y.spine_skeleton_data_get_num_physics_constraints;a._spine_skeleton_data_get_physics_constraints=Y.spine_skeleton_data_get_physics_constraints;a._spine_skeleton_data_get_x=Y.spine_skeleton_data_get_x;a._spine_skeleton_data_set_x=Y.spine_skeleton_data_set_x;a._spine_skeleton_data_get_y=Y.spine_skeleton_data_get_y;a._spine_skeleton_data_set_y=Y.spine_skeleton_data_set_y;a._spine_skeleton_data_get_width=Y.spine_skeleton_data_get_width;
|
||||
a._spine_skeleton_data_set_width=Y.spine_skeleton_data_set_width;a._spine_skeleton_data_get_height=Y.spine_skeleton_data_get_height;a._spine_skeleton_data_set_height=Y.spine_skeleton_data_set_height;a._spine_skeleton_data_get_version=Y.spine_skeleton_data_get_version;a._spine_skeleton_data_get_hash=Y.spine_skeleton_data_get_hash;a._spine_skeleton_data_get_images_path=Y.spine_skeleton_data_get_images_path;a._spine_skeleton_data_get_audio_path=Y.spine_skeleton_data_get_audio_path;
|
||||
a._spine_skeleton_data_get_fps=Y.spine_skeleton_data_get_fps;a._spine_skeleton_data_get_reference_scale=Y.spine_skeleton_data_get_reference_scale;a._spine_skeleton_data_dispose=Y.spine_skeleton_data_dispose;a._spine_skeleton_drawable_create=Y.spine_skeleton_drawable_create;a._spine_skeleton_drawable_dispose=Y.spine_skeleton_drawable_dispose;a._spine_skeleton_drawable_render=Y.spine_skeleton_drawable_render;a._spine_skeleton_drawable_get_skeleton=Y.spine_skeleton_drawable_get_skeleton;
|
||||
a._spine_skeleton_drawable_get_animation_state=Y.spine_skeleton_drawable_get_animation_state;a._spine_skeleton_drawable_get_animation_state_data=Y.spine_skeleton_drawable_get_animation_state_data;a._spine_skeleton_drawable_get_animation_state_events=Y.spine_skeleton_drawable_get_animation_state_events;a._spine_render_command_get_positions=Y.spine_render_command_get_positions;a._spine_render_command_get_uvs=Y.spine_render_command_get_uvs;a._spine_render_command_get_colors=Y.spine_render_command_get_colors;
|
||||
a._spine_render_command_get_dark_colors=Y.spine_render_command_get_dark_colors;a._spine_render_command_get_num_vertices=Y.spine_render_command_get_num_vertices;a._spine_render_command_get_indices=Y.spine_render_command_get_indices;a._spine_render_command_get_num_indices=Y.spine_render_command_get_num_indices;a._spine_render_command_get_atlas_page=Y.spine_render_command_get_atlas_page;a._spine_render_command_get_blend_mode=Y.spine_render_command_get_blend_mode;a._spine_render_command_get_next=Y.spine_render_command_get_next;
|
||||
a._spine_animation_get_name=Y.spine_animation_get_name;a._spine_animation_get_duration=Y.spine_animation_get_duration;a._spine_animation_state_data_get_skeleton_data=Y.spine_animation_state_data_get_skeleton_data;a._spine_animation_state_data_get_default_mix=Y.spine_animation_state_data_get_default_mix;a._spine_animation_state_data_set_default_mix=Y.spine_animation_state_data_set_default_mix;a._spine_animation_state_data_set_mix=Y.spine_animation_state_data_set_mix;
|
||||
a._spine_animation_state_data_get_mix=Y.spine_animation_state_data_get_mix;a._spine_animation_state_data_set_mix_by_name=Y.spine_animation_state_data_set_mix_by_name;a._spine_animation_state_data_get_mix_by_name=Y.spine_animation_state_data_get_mix_by_name;a._spine_animation_state_data_clear=Y.spine_animation_state_data_clear;a._spine_animation_state_update=Y.spine_animation_state_update;a._spine_animation_state_dispose_track_entry=Y.spine_animation_state_dispose_track_entry;
|
||||
a._spine_animation_state_apply=Y.spine_animation_state_apply;a._spine_animation_state_clear_tracks=Y.spine_animation_state_clear_tracks;a._spine_animation_state_get_num_tracks=Y.spine_animation_state_get_num_tracks;a._spine_animation_state_clear_track=Y.spine_animation_state_clear_track;a._spine_animation_state_set_animation_by_name=Y.spine_animation_state_set_animation_by_name;a._spine_animation_state_set_animation=Y.spine_animation_state_set_animation;
|
||||
a._spine_animation_state_add_animation_by_name=Y.spine_animation_state_add_animation_by_name;a._spine_animation_state_add_animation=Y.spine_animation_state_add_animation;a._spine_animation_state_set_empty_animation=Y.spine_animation_state_set_empty_animation;a._spine_animation_state_add_empty_animation=Y.spine_animation_state_add_empty_animation;a._spine_animation_state_set_empty_animations=Y.spine_animation_state_set_empty_animations;a._spine_animation_state_get_current=Y.spine_animation_state_get_current;
|
||||
a._spine_animation_state_get_data=Y.spine_animation_state_get_data;a._spine_animation_state_get_time_scale=Y.spine_animation_state_get_time_scale;a._spine_animation_state_set_time_scale=Y.spine_animation_state_set_time_scale;a._spine_animation_state_events_get_num_events=Y.spine_animation_state_events_get_num_events;a._spine_animation_state_events_get_event_type=Y.spine_animation_state_events_get_event_type;a._spine_animation_state_events_get_track_entry=Y.spine_animation_state_events_get_track_entry;
|
||||
a._spine_animation_state_events_get_event=Y.spine_animation_state_events_get_event;a._spine_animation_state_events_reset=Y.spine_animation_state_events_reset;a._spine_track_entry_get_track_index=Y.spine_track_entry_get_track_index;a._spine_track_entry_get_animation=Y.spine_track_entry_get_animation;a._spine_track_entry_get_previous=Y.spine_track_entry_get_previous;a._spine_track_entry_get_loop=Y.spine_track_entry_get_loop;a._spine_track_entry_set_loop=Y.spine_track_entry_set_loop;
|
||||
a._spine_track_entry_get_hold_previous=Y.spine_track_entry_get_hold_previous;a._spine_track_entry_set_hold_previous=Y.spine_track_entry_set_hold_previous;a._spine_track_entry_get_reverse=Y.spine_track_entry_get_reverse;a._spine_track_entry_set_reverse=Y.spine_track_entry_set_reverse;a._spine_track_entry_get_shortest_rotation=Y.spine_track_entry_get_shortest_rotation;a._spine_track_entry_set_shortest_rotation=Y.spine_track_entry_set_shortest_rotation;a._spine_track_entry_get_delay=Y.spine_track_entry_get_delay;
|
||||
a._spine_track_entry_set_delay=Y.spine_track_entry_set_delay;a._spine_track_entry_get_track_time=Y.spine_track_entry_get_track_time;a._spine_track_entry_set_track_time=Y.spine_track_entry_set_track_time;a._spine_track_entry_get_track_end=Y.spine_track_entry_get_track_end;a._spine_track_entry_set_track_end=Y.spine_track_entry_set_track_end;a._spine_track_entry_get_animation_start=Y.spine_track_entry_get_animation_start;a._spine_track_entry_set_animation_start=Y.spine_track_entry_set_animation_start;
|
||||
a._spine_track_entry_get_animation_end=Y.spine_track_entry_get_animation_end;a._spine_track_entry_set_animation_end=Y.spine_track_entry_set_animation_end;a._spine_track_entry_get_animation_last=Y.spine_track_entry_get_animation_last;a._spine_track_entry_set_animation_last=Y.spine_track_entry_set_animation_last;a._spine_track_entry_get_animation_time=Y.spine_track_entry_get_animation_time;a._spine_track_entry_get_time_scale=Y.spine_track_entry_get_time_scale;a._spine_track_entry_set_time_scale=Y.spine_track_entry_set_time_scale;
|
||||
a._spine_track_entry_get_alpha=Y.spine_track_entry_get_alpha;a._spine_track_entry_set_alpha=Y.spine_track_entry_set_alpha;a._spine_track_entry_get_event_threshold=Y.spine_track_entry_get_event_threshold;a._spine_track_entry_set_event_threshold=Y.spine_track_entry_set_event_threshold;a._spine_track_entry_get_alpha_attachment_threshold=Y.spine_track_entry_get_alpha_attachment_threshold;a._spine_track_entry_set_alpha_attachment_threshold=Y.spine_track_entry_set_alpha_attachment_threshold;
|
||||
a._spine_track_entry_get_mix_attachment_threshold=Y.spine_track_entry_get_mix_attachment_threshold;a._spine_track_entry_set_mix_attachment_threshold=Y.spine_track_entry_set_mix_attachment_threshold;a._spine_track_entry_get_mix_draw_order_threshold=Y.spine_track_entry_get_mix_draw_order_threshold;a._spine_track_entry_set_mix_draw_order_threshold=Y.spine_track_entry_set_mix_draw_order_threshold;a._spine_track_entry_get_next=Y.spine_track_entry_get_next;a._spine_track_entry_is_complete=Y.spine_track_entry_is_complete;
|
||||
a._spine_track_entry_get_mix_time=Y.spine_track_entry_get_mix_time;a._spine_track_entry_set_mix_time=Y.spine_track_entry_set_mix_time;a._spine_track_entry_get_mix_duration=Y.spine_track_entry_get_mix_duration;a._spine_track_entry_set_mix_duration=Y.spine_track_entry_set_mix_duration;a._spine_track_entry_get_mix_blend=Y.spine_track_entry_get_mix_blend;a._spine_track_entry_set_mix_blend=Y.spine_track_entry_set_mix_blend;a._spine_track_entry_get_mixing_from=Y.spine_track_entry_get_mixing_from;
|
||||
a._spine_track_entry_get_mixing_to=Y.spine_track_entry_get_mixing_to;a._spine_track_entry_reset_rotation_directions=Y.spine_track_entry_reset_rotation_directions;a._spine_track_entry_get_track_complete=Y.spine_track_entry_get_track_complete;a._spine_track_entry_was_applied=Y.spine_track_entry_was_applied;a._spine_track_entry_is_next_ready=Y.spine_track_entry_is_next_ready;a._spine_skeleton_update_cache=Y.spine_skeleton_update_cache;a._spine_skeleton_update_world_transform=Y.spine_skeleton_update_world_transform;
|
||||
a._spine_skeleton_update_world_transform_bone=Y.spine_skeleton_update_world_transform_bone;a._spine_skeleton_set_to_setup_pose=Y.spine_skeleton_set_to_setup_pose;a._spine_skeleton_set_bones_to_setup_pose=Y.spine_skeleton_set_bones_to_setup_pose;a._spine_skeleton_set_slots_to_setup_pose=Y.spine_skeleton_set_slots_to_setup_pose;a._spine_skeleton_find_bone=Y.spine_skeleton_find_bone;a._spine_skeleton_find_slot=Y.spine_skeleton_find_slot;a._spine_skeleton_set_skin_by_name=Y.spine_skeleton_set_skin_by_name;
|
||||
a._spine_skeleton_set_skin=Y.spine_skeleton_set_skin;a._spine_skeleton_get_attachment_by_name=Y.spine_skeleton_get_attachment_by_name;a._spine_skeleton_get_attachment=Y.spine_skeleton_get_attachment;a._spine_skeleton_set_attachment=Y.spine_skeleton_set_attachment;a._spine_skeleton_find_ik_constraint=Y.spine_skeleton_find_ik_constraint;a._spine_skeleton_find_transform_constraint=Y.spine_skeleton_find_transform_constraint;a._spine_skeleton_find_path_constraint=Y.spine_skeleton_find_path_constraint;
|
||||
a._spine_skeleton_find_physics_constraint=Y.spine_skeleton_find_physics_constraint;a._spine_skeleton_get_bounds=Y.spine_skeleton_get_bounds;a._spine_skeleton_get_root_bone=Y.spine_skeleton_get_root_bone;a._spine_skeleton_get_data=Y.spine_skeleton_get_data;a._spine_skeleton_get_num_bones=Y.spine_skeleton_get_num_bones;a._spine_skeleton_get_bones=Y.spine_skeleton_get_bones;a._spine_skeleton_get_num_slots=Y.spine_skeleton_get_num_slots;a._spine_skeleton_get_slots=Y.spine_skeleton_get_slots;
|
||||
a._spine_skeleton_get_num_draw_order=Y.spine_skeleton_get_num_draw_order;a._spine_skeleton_get_draw_order=Y.spine_skeleton_get_draw_order;a._spine_skeleton_get_num_ik_constraints=Y.spine_skeleton_get_num_ik_constraints;a._spine_skeleton_get_ik_constraints=Y.spine_skeleton_get_ik_constraints;a._spine_skeleton_get_num_transform_constraints=Y.spine_skeleton_get_num_transform_constraints;a._spine_skeleton_get_transform_constraints=Y.spine_skeleton_get_transform_constraints;
|
||||
a._spine_skeleton_get_num_path_constraints=Y.spine_skeleton_get_num_path_constraints;a._spine_skeleton_get_path_constraints=Y.spine_skeleton_get_path_constraints;a._spine_skeleton_get_num_physics_constraints=Y.spine_skeleton_get_num_physics_constraints;a._spine_skeleton_get_physics_constraints=Y.spine_skeleton_get_physics_constraints;a._spine_skeleton_get_skin=Y.spine_skeleton_get_skin;a._spine_skeleton_get_color=Y.spine_skeleton_get_color;a._spine_skeleton_set_color=Y.spine_skeleton_set_color;
|
||||
a._spine_skeleton_set_position=Y.spine_skeleton_set_position;a._spine_skeleton_get_x=Y.spine_skeleton_get_x;a._spine_skeleton_set_x=Y.spine_skeleton_set_x;a._spine_skeleton_get_y=Y.spine_skeleton_get_y;a._spine_skeleton_set_y=Y.spine_skeleton_set_y;a._spine_skeleton_set_scale=Y.spine_skeleton_set_scale;a._spine_skeleton_get_scale_x=Y.spine_skeleton_get_scale_x;a._spine_skeleton_set_scale_x=Y.spine_skeleton_set_scale_x;a._spine_skeleton_get_scale_y=Y.spine_skeleton_get_scale_y;
|
||||
a._spine_skeleton_set_scale_y=Y.spine_skeleton_set_scale_y;a._spine_skeleton_get_time=Y.spine_skeleton_get_time;a._spine_skeleton_set_time=Y.spine_skeleton_set_time;a._spine_skeleton_update=Y.spine_skeleton_update;a._spine_event_data_get_name=Y.spine_event_data_get_name;a._spine_event_data_get_int_value=Y.spine_event_data_get_int_value;a._spine_event_data_set_int_value=Y.spine_event_data_set_int_value;a._spine_event_data_get_float_value=Y.spine_event_data_get_float_value;
|
||||
a._spine_event_data_set_float_value=Y.spine_event_data_set_float_value;a._spine_event_data_get_string_value=Y.spine_event_data_get_string_value;a._spine_event_data_set_string_value=Y.spine_event_data_set_string_value;a._spine_event_data_get_audio_path=Y.spine_event_data_get_audio_path;a._spine_event_data_get_volume=Y.spine_event_data_get_volume;a._spine_event_data_set_volume=Y.spine_event_data_set_volume;a._spine_event_data_get_balance=Y.spine_event_data_get_balance;
|
||||
a._spine_event_data_set_balance=Y.spine_event_data_set_balance;a._spine_event_get_data=Y.spine_event_get_data;a._spine_event_get_time=Y.spine_event_get_time;a._spine_event_get_int_value=Y.spine_event_get_int_value;a._spine_event_set_int_value=Y.spine_event_set_int_value;a._spine_event_get_float_value=Y.spine_event_get_float_value;a._spine_event_set_float_value=Y.spine_event_set_float_value;a._spine_event_get_string_value=Y.spine_event_get_string_value;a._spine_event_set_string_value=Y.spine_event_set_string_value;
|
||||
a._spine_event_get_volume=Y.spine_event_get_volume;a._spine_event_set_volume=Y.spine_event_set_volume;a._spine_event_get_balance=Y.spine_event_get_balance;a._spine_event_set_balance=Y.spine_event_set_balance;a._spine_slot_data_get_index=Y.spine_slot_data_get_index;a._spine_slot_data_get_name=Y.spine_slot_data_get_name;a._spine_slot_data_get_bone_data=Y.spine_slot_data_get_bone_data;a._spine_slot_data_get_color=Y.spine_slot_data_get_color;a._spine_slot_data_set_color=Y.spine_slot_data_set_color;
|
||||
a._spine_slot_data_get_dark_color=Y.spine_slot_data_get_dark_color;a._spine_slot_data_set_dark_color=Y.spine_slot_data_set_dark_color;a._spine_slot_data_get_has_dark_color=Y.spine_slot_data_get_has_dark_color;a._spine_slot_data_set_has_dark_color=Y.spine_slot_data_set_has_dark_color;a._spine_slot_data_get_attachment_name=Y.spine_slot_data_get_attachment_name;a._spine_slot_data_set_attachment_name=Y.spine_slot_data_set_attachment_name;a._spine_slot_data_get_blend_mode=Y.spine_slot_data_get_blend_mode;
|
||||
a._spine_slot_data_set_blend_mode=Y.spine_slot_data_set_blend_mode;a._spine_slot_data_is_visible=Y.spine_slot_data_is_visible;a._spine_slot_data_set_visible=Y.spine_slot_data_set_visible;a._spine_slot_set_to_setup_pose=Y.spine_slot_set_to_setup_pose;a._spine_slot_get_data=Y.spine_slot_get_data;a._spine_slot_get_bone=Y.spine_slot_get_bone;a._spine_slot_get_skeleton=Y.spine_slot_get_skeleton;a._spine_slot_get_color=Y.spine_slot_get_color;a._spine_slot_set_color=Y.spine_slot_set_color;
|
||||
a._spine_slot_get_dark_color=Y.spine_slot_get_dark_color;a._spine_slot_set_dark_color=Y.spine_slot_set_dark_color;a._spine_slot_has_dark_color=Y.spine_slot_has_dark_color;a._spine_slot_get_attachment=Y.spine_slot_get_attachment;a._spine_slot_set_attachment=Y.spine_slot_set_attachment;a._spine_slot_get_sequence_index=Y.spine_slot_get_sequence_index;a._spine_slot_set_sequence_index=Y.spine_slot_set_sequence_index;a._spine_bone_data_get_index=Y.spine_bone_data_get_index;a._spine_bone_data_get_name=Y.spine_bone_data_get_name;
|
||||
a._spine_bone_data_get_parent=Y.spine_bone_data_get_parent;a._spine_bone_data_get_length=Y.spine_bone_data_get_length;a._spine_bone_data_set_length=Y.spine_bone_data_set_length;a._spine_bone_data_get_x=Y.spine_bone_data_get_x;a._spine_bone_data_set_x=Y.spine_bone_data_set_x;a._spine_bone_data_get_y=Y.spine_bone_data_get_y;a._spine_bone_data_set_y=Y.spine_bone_data_set_y;a._spine_bone_data_get_rotation=Y.spine_bone_data_get_rotation;a._spine_bone_data_set_rotation=Y.spine_bone_data_set_rotation;
|
||||
a._spine_bone_data_get_scale_x=Y.spine_bone_data_get_scale_x;a._spine_bone_data_set_scale_x=Y.spine_bone_data_set_scale_x;a._spine_bone_data_get_scale_y=Y.spine_bone_data_get_scale_y;a._spine_bone_data_set_scale_y=Y.spine_bone_data_set_scale_y;a._spine_bone_data_get_shear_x=Y.spine_bone_data_get_shear_x;a._spine_bone_data_set_shear_x=Y.spine_bone_data_set_shear_x;a._spine_bone_data_get_shear_y=Y.spine_bone_data_get_shear_y;a._spine_bone_data_set_shear_y=Y.spine_bone_data_set_shear_y;
|
||||
a._spine_bone_data_get_inherit=Y.spine_bone_data_get_inherit;a._spine_bone_data_set_inherit=Y.spine_bone_data_set_inherit;a._spine_bone_data_get_is_skin_required=Y.spine_bone_data_get_is_skin_required;a._spine_bone_data_set_is_skin_required=Y.spine_bone_data_set_is_skin_required;a._spine_bone_data_get_color=Y.spine_bone_data_get_color;a._spine_bone_data_set_color=Y.spine_bone_data_set_color;a._spine_bone_data_is_visible=Y.spine_bone_data_is_visible;a._spine_bone_data_set_visible=Y.spine_bone_data_set_visible;
|
||||
a._spine_bone_set_is_y_down=Y.spine_bone_set_is_y_down;a._spine_bone_get_is_y_down=Y.spine_bone_get_is_y_down;a._spine_bone_update=Y.spine_bone_update;a._spine_bone_update_world_transform=Y.spine_bone_update_world_transform;a._spine_bone_update_world_transform_with=Y.spine_bone_update_world_transform_with;a._spine_bone_update_applied_transform=Y.spine_bone_update_applied_transform;a._spine_bone_set_to_setup_pose=Y.spine_bone_set_to_setup_pose;a._spine_bone_world_to_local=Y.spine_bone_world_to_local;
|
||||
a._spine_bone_world_to_parent=Y.spine_bone_world_to_parent;a._spine_bone_local_to_world=Y.spine_bone_local_to_world;a._spine_bone_parent_to_world=Y.spine_bone_parent_to_world;a._spine_bone_world_to_local_rotation=Y.spine_bone_world_to_local_rotation;a._spine_bone_local_to_world_rotation=Y.spine_bone_local_to_world_rotation;a._spine_bone_rotate_world=Y.spine_bone_rotate_world;a._spine_bone_get_world_to_local_rotation_x=Y.spine_bone_get_world_to_local_rotation_x;
|
||||
a._spine_bone_get_world_to_local_rotation_y=Y.spine_bone_get_world_to_local_rotation_y;a._spine_bone_get_data=Y.spine_bone_get_data;a._spine_bone_get_skeleton=Y.spine_bone_get_skeleton;a._spine_bone_get_parent=Y.spine_bone_get_parent;a._spine_bone_get_num_children=Y.spine_bone_get_num_children;a._spine_bone_get_children=Y.spine_bone_get_children;a._spine_bone_get_x=Y.spine_bone_get_x;a._spine_bone_set_x=Y.spine_bone_set_x;a._spine_bone_get_y=Y.spine_bone_get_y;a._spine_bone_set_y=Y.spine_bone_set_y;
|
||||
a._spine_bone_get_rotation=Y.spine_bone_get_rotation;a._spine_bone_set_rotation=Y.spine_bone_set_rotation;a._spine_bone_get_scale_x=Y.spine_bone_get_scale_x;a._spine_bone_set_scale_x=Y.spine_bone_set_scale_x;a._spine_bone_get_scale_y=Y.spine_bone_get_scale_y;a._spine_bone_set_scale_y=Y.spine_bone_set_scale_y;a._spine_bone_get_shear_x=Y.spine_bone_get_shear_x;a._spine_bone_set_shear_x=Y.spine_bone_set_shear_x;a._spine_bone_get_shear_y=Y.spine_bone_get_shear_y;a._spine_bone_set_shear_y=Y.spine_bone_set_shear_y;
|
||||
a._spine_bone_get_applied_rotation=Y.spine_bone_get_applied_rotation;a._spine_bone_set_applied_rotation=Y.spine_bone_set_applied_rotation;a._spine_bone_get_a_x=Y.spine_bone_get_a_x;a._spine_bone_set_a_x=Y.spine_bone_set_a_x;a._spine_bone_get_a_y=Y.spine_bone_get_a_y;a._spine_bone_set_a_y=Y.spine_bone_set_a_y;a._spine_bone_get_a_scale_x=Y.spine_bone_get_a_scale_x;a._spine_bone_set_a_scale_x=Y.spine_bone_set_a_scale_x;a._spine_bone_get_a_scale_y=Y.spine_bone_get_a_scale_y;
|
||||
a._spine_bone_set_a_scale_y=Y.spine_bone_set_a_scale_y;a._spine_bone_get_a_shear_x=Y.spine_bone_get_a_shear_x;a._spine_bone_set_a_shear_x=Y.spine_bone_set_a_shear_x;a._spine_bone_get_a_shear_y=Y.spine_bone_get_a_shear_y;a._spine_bone_set_a_shear_y=Y.spine_bone_set_a_shear_y;a._spine_bone_get_a=Y.spine_bone_get_a;a._spine_bone_set_a=Y.spine_bone_set_a;a._spine_bone_get_b=Y.spine_bone_get_b;a._spine_bone_set_b=Y.spine_bone_set_b;a._spine_bone_get_c=Y.spine_bone_get_c;a._spine_bone_set_c=Y.spine_bone_set_c;
|
||||
a._spine_bone_get_d=Y.spine_bone_get_d;a._spine_bone_set_d=Y.spine_bone_set_d;a._spine_bone_get_world_x=Y.spine_bone_get_world_x;a._spine_bone_set_world_x=Y.spine_bone_set_world_x;a._spine_bone_get_world_y=Y.spine_bone_get_world_y;a._spine_bone_set_world_y=Y.spine_bone_set_world_y;a._spine_bone_get_world_rotation_x=Y.spine_bone_get_world_rotation_x;a._spine_bone_get_world_rotation_y=Y.spine_bone_get_world_rotation_y;a._spine_bone_get_world_scale_x=Y.spine_bone_get_world_scale_x;
|
||||
a._spine_bone_get_world_scale_y=Y.spine_bone_get_world_scale_y;a._spine_bone_get_is_active=Y.spine_bone_get_is_active;a._spine_bone_set_is_active=Y.spine_bone_set_is_active;a._spine_bone_get_inherit=Y.spine_bone_get_inherit;a._spine_bone_set_inherit=Y.spine_bone_set_inherit;a._spine_attachment_get_name=Y.spine_attachment_get_name;a._spine_attachment_get_type=Y.spine_attachment_get_type;a._spine_attachment_copy=Y.spine_attachment_copy;a._spine_attachment_cast_to_bounding_box_attachment=Y.spine_attachment_cast_to_bounding_box_attachment;
|
||||
a._spine_attachment_dispose=Y.spine_attachment_dispose;a._spine_point_attachment_compute_world_position=Y.spine_point_attachment_compute_world_position;a._spine_point_attachment_compute_world_rotation=Y.spine_point_attachment_compute_world_rotation;a._spine_point_attachment_get_x=Y.spine_point_attachment_get_x;a._spine_point_attachment_set_x=Y.spine_point_attachment_set_x;a._spine_point_attachment_get_y=Y.spine_point_attachment_get_y;a._spine_point_attachment_set_y=Y.spine_point_attachment_set_y;
|
||||
a._spine_point_attachment_get_rotation=Y.spine_point_attachment_get_rotation;a._spine_point_attachment_set_rotation=Y.spine_point_attachment_set_rotation;a._spine_point_attachment_get_color=Y.spine_point_attachment_get_color;a._spine_point_attachment_set_color=Y.spine_point_attachment_set_color;a._spine_region_attachment_update_region=Y.spine_region_attachment_update_region;a._spine_region_attachment_compute_world_vertices=Y.spine_region_attachment_compute_world_vertices;
|
||||
a._spine_region_attachment_get_x=Y.spine_region_attachment_get_x;a._spine_region_attachment_set_x=Y.spine_region_attachment_set_x;a._spine_region_attachment_get_y=Y.spine_region_attachment_get_y;a._spine_region_attachment_set_y=Y.spine_region_attachment_set_y;a._spine_region_attachment_get_rotation=Y.spine_region_attachment_get_rotation;a._spine_region_attachment_set_rotation=Y.spine_region_attachment_set_rotation;a._spine_region_attachment_get_scale_x=Y.spine_region_attachment_get_scale_x;
|
||||
a._spine_region_attachment_set_scale_x=Y.spine_region_attachment_set_scale_x;a._spine_region_attachment_get_scale_y=Y.spine_region_attachment_get_scale_y;a._spine_region_attachment_set_scale_y=Y.spine_region_attachment_set_scale_y;a._spine_region_attachment_get_width=Y.spine_region_attachment_get_width;a._spine_region_attachment_set_width=Y.spine_region_attachment_set_width;a._spine_region_attachment_get_height=Y.spine_region_attachment_get_height;a._spine_region_attachment_set_height=Y.spine_region_attachment_set_height;
|
||||
a._spine_region_attachment_get_color=Y.spine_region_attachment_get_color;a._spine_region_attachment_set_color=Y.spine_region_attachment_set_color;a._spine_region_attachment_get_path=Y.spine_region_attachment_get_path;a._spine_region_attachment_get_region=Y.spine_region_attachment_get_region;a._spine_region_attachment_get_sequence=Y.spine_region_attachment_get_sequence;a._spine_region_attachment_get_num_offset=Y.spine_region_attachment_get_num_offset;a._spine_region_attachment_get_offset=Y.spine_region_attachment_get_offset;
|
||||
a._spine_region_attachment_get_num_uvs=Y.spine_region_attachment_get_num_uvs;a._spine_region_attachment_get_uvs=Y.spine_region_attachment_get_uvs;a._spine_vertex_attachment_get_world_vertices_length=Y.spine_vertex_attachment_get_world_vertices_length;a._spine_vertex_attachment_compute_world_vertices=Y.spine_vertex_attachment_compute_world_vertices;a._spine_vertex_attachment_get_num_bones=Y.spine_vertex_attachment_get_num_bones;a._spine_vertex_attachment_get_bones=Y.spine_vertex_attachment_get_bones;
|
||||
a._spine_vertex_attachment_get_num_vertices=Y.spine_vertex_attachment_get_num_vertices;a._spine_vertex_attachment_get_vertices=Y.spine_vertex_attachment_get_vertices;a._spine_vertex_attachment_get_timeline_attachment=Y.spine_vertex_attachment_get_timeline_attachment;a._spine_vertex_attachment_set_timeline_attachment=Y.spine_vertex_attachment_set_timeline_attachment;a._spine_mesh_attachment_update_region=Y.spine_mesh_attachment_update_region;a._spine_mesh_attachment_get_hull_length=Y.spine_mesh_attachment_get_hull_length;
|
||||
a._spine_mesh_attachment_set_hull_length=Y.spine_mesh_attachment_set_hull_length;a._spine_mesh_attachment_get_num_region_uvs=Y.spine_mesh_attachment_get_num_region_uvs;a._spine_mesh_attachment_get_region_uvs=Y.spine_mesh_attachment_get_region_uvs;a._spine_mesh_attachment_get_num_uvs=Y.spine_mesh_attachment_get_num_uvs;a._spine_mesh_attachment_get_uvs=Y.spine_mesh_attachment_get_uvs;a._spine_mesh_attachment_get_num_triangles=Y.spine_mesh_attachment_get_num_triangles;
|
||||
a._spine_mesh_attachment_get_triangles=Y.spine_mesh_attachment_get_triangles;a._spine_mesh_attachment_get_color=Y.spine_mesh_attachment_get_color;a._spine_mesh_attachment_set_color=Y.spine_mesh_attachment_set_color;a._spine_mesh_attachment_get_path=Y.spine_mesh_attachment_get_path;a._spine_mesh_attachment_get_region=Y.spine_mesh_attachment_get_region;a._spine_mesh_attachment_get_sequence=Y.spine_mesh_attachment_get_sequence;a._spine_mesh_attachment_get_parent_mesh=Y.spine_mesh_attachment_get_parent_mesh;
|
||||
a._spine_mesh_attachment_set_parent_mesh=Y.spine_mesh_attachment_set_parent_mesh;a._spine_mesh_attachment_get_num_edges=Y.spine_mesh_attachment_get_num_edges;a._spine_mesh_attachment_get_edges=Y.spine_mesh_attachment_get_edges;a._spine_mesh_attachment_get_width=Y.spine_mesh_attachment_get_width;a._spine_mesh_attachment_set_width=Y.spine_mesh_attachment_set_width;a._spine_mesh_attachment_get_height=Y.spine_mesh_attachment_get_height;a._spine_mesh_attachment_set_height=Y.spine_mesh_attachment_set_height;
|
||||
a._spine_clipping_attachment_get_end_slot=Y.spine_clipping_attachment_get_end_slot;a._spine_clipping_attachment_set_end_slot=Y.spine_clipping_attachment_set_end_slot;a._spine_clipping_attachment_get_color=Y.spine_clipping_attachment_get_color;a._spine_clipping_attachment_set_color=Y.spine_clipping_attachment_set_color;a._spine_bounding_box_attachment_get_color=Y.spine_bounding_box_attachment_get_color;a._spine_bounding_box_attachment_set_color=Y.spine_bounding_box_attachment_set_color;
|
||||
a._spine_path_attachment_get_num_lengths=Y.spine_path_attachment_get_num_lengths;a._spine_path_attachment_get_lengths=Y.spine_path_attachment_get_lengths;a._spine_path_attachment_get_is_closed=Y.spine_path_attachment_get_is_closed;a._spine_path_attachment_set_is_closed=Y.spine_path_attachment_set_is_closed;a._spine_path_attachment_get_is_constant_speed=Y.spine_path_attachment_get_is_constant_speed;a._spine_path_attachment_set_is_constant_speed=Y.spine_path_attachment_set_is_constant_speed;
|
||||
a._spine_path_attachment_get_color=Y.spine_path_attachment_get_color;a._spine_path_attachment_set_color=Y.spine_path_attachment_set_color;a._spine_skin_set_attachment=Y.spine_skin_set_attachment;a._spine_skin_get_attachment=Y.spine_skin_get_attachment;a._spine_skin_remove_attachment=Y.spine_skin_remove_attachment;a._spine_skin_get_name=Y.spine_skin_get_name;a._spine_skin_add_skin=Y.spine_skin_add_skin;a._spine_skin_copy_skin=Y.spine_skin_copy_skin;a._spine_skin_get_entries=Y.spine_skin_get_entries;
|
||||
a._spine_skin_entries_get_num_entries=Y.spine_skin_entries_get_num_entries;a._spine_skin_entries_get_entry=Y.spine_skin_entries_get_entry;a._spine_skin_entries_dispose=Y.spine_skin_entries_dispose;a._spine_skin_entry_get_slot_index=Y.spine_skin_entry_get_slot_index;a._spine_skin_entry_get_name=Y.spine_skin_entry_get_name;a._spine_skin_entry_get_attachment=Y.spine_skin_entry_get_attachment;a._spine_skin_get_num_bones=Y.spine_skin_get_num_bones;a._spine_skin_get_bones=Y.spine_skin_get_bones;
|
||||
a._spine_skin_get_num_constraints=Y.spine_skin_get_num_constraints;a._spine_skin_get_constraints=Y.spine_skin_get_constraints;a._spine_skin_create=Y.spine_skin_create;a._spine_skin_dispose=Y.spine_skin_dispose;a._spine_constraint_data_get_type=Y.spine_constraint_data_get_type;a._spine_constraint_data_get_name=Y.spine_constraint_data_get_name;a._spine_constraint_data_get_order=Y.spine_constraint_data_get_order;a._spine_constraint_data_set_order=Y.spine_constraint_data_set_order;
|
||||
a._spine_constraint_data_get_is_skin_required=Y.spine_constraint_data_get_is_skin_required;a._spine_constraint_data_set_is_skin_required=Y.spine_constraint_data_set_is_skin_required;a._spine_ik_constraint_data_get_num_bones=Y.spine_ik_constraint_data_get_num_bones;a._spine_ik_constraint_data_get_bones=Y.spine_ik_constraint_data_get_bones;a._spine_ik_constraint_data_get_target=Y.spine_ik_constraint_data_get_target;a._spine_ik_constraint_data_set_target=Y.spine_ik_constraint_data_set_target;
|
||||
a._spine_ik_constraint_data_get_bend_direction=Y.spine_ik_constraint_data_get_bend_direction;a._spine_ik_constraint_data_set_bend_direction=Y.spine_ik_constraint_data_set_bend_direction;a._spine_ik_constraint_data_get_compress=Y.spine_ik_constraint_data_get_compress;a._spine_ik_constraint_data_set_compress=Y.spine_ik_constraint_data_set_compress;a._spine_ik_constraint_data_get_stretch=Y.spine_ik_constraint_data_get_stretch;a._spine_ik_constraint_data_set_stretch=Y.spine_ik_constraint_data_set_stretch;
|
||||
a._spine_ik_constraint_data_get_uniform=Y.spine_ik_constraint_data_get_uniform;a._spine_ik_constraint_data_set_uniform=Y.spine_ik_constraint_data_set_uniform;a._spine_ik_constraint_data_get_mix=Y.spine_ik_constraint_data_get_mix;a._spine_ik_constraint_data_set_mix=Y.spine_ik_constraint_data_set_mix;a._spine_ik_constraint_data_get_softness=Y.spine_ik_constraint_data_get_softness;a._spine_ik_constraint_data_set_softness=Y.spine_ik_constraint_data_set_softness;a._spine_ik_constraint_update=Y.spine_ik_constraint_update;
|
||||
a._spine_ik_constraint_get_order=Y.spine_ik_constraint_get_order;a._spine_ik_constraint_get_data=Y.spine_ik_constraint_get_data;a._spine_ik_constraint_get_num_bones=Y.spine_ik_constraint_get_num_bones;a._spine_ik_constraint_get_bones=Y.spine_ik_constraint_get_bones;a._spine_ik_constraint_get_target=Y.spine_ik_constraint_get_target;a._spine_ik_constraint_set_target=Y.spine_ik_constraint_set_target;a._spine_ik_constraint_get_bend_direction=Y.spine_ik_constraint_get_bend_direction;
|
||||
a._spine_ik_constraint_set_bend_direction=Y.spine_ik_constraint_set_bend_direction;a._spine_ik_constraint_get_compress=Y.spine_ik_constraint_get_compress;a._spine_ik_constraint_set_compress=Y.spine_ik_constraint_set_compress;a._spine_ik_constraint_get_stretch=Y.spine_ik_constraint_get_stretch;a._spine_ik_constraint_set_stretch=Y.spine_ik_constraint_set_stretch;a._spine_ik_constraint_get_mix=Y.spine_ik_constraint_get_mix;a._spine_ik_constraint_set_mix=Y.spine_ik_constraint_set_mix;
|
||||
a._spine_ik_constraint_get_softness=Y.spine_ik_constraint_get_softness;a._spine_ik_constraint_set_softness=Y.spine_ik_constraint_set_softness;a._spine_ik_constraint_get_is_active=Y.spine_ik_constraint_get_is_active;a._spine_ik_constraint_set_is_active=Y.spine_ik_constraint_set_is_active;a._spine_transform_constraint_data_get_num_bones=Y.spine_transform_constraint_data_get_num_bones;a._spine_transform_constraint_data_get_bones=Y.spine_transform_constraint_data_get_bones;
|
||||
a._spine_transform_constraint_data_get_target=Y.spine_transform_constraint_data_get_target;a._spine_transform_constraint_data_set_target=Y.spine_transform_constraint_data_set_target;a._spine_transform_constraint_data_get_mix_rotate=Y.spine_transform_constraint_data_get_mix_rotate;a._spine_transform_constraint_data_set_mix_rotate=Y.spine_transform_constraint_data_set_mix_rotate;a._spine_transform_constraint_data_get_mix_x=Y.spine_transform_constraint_data_get_mix_x;
|
||||
a._spine_transform_constraint_data_set_mix_x=Y.spine_transform_constraint_data_set_mix_x;a._spine_transform_constraint_data_get_mix_y=Y.spine_transform_constraint_data_get_mix_y;a._spine_transform_constraint_data_set_mix_y=Y.spine_transform_constraint_data_set_mix_y;a._spine_transform_constraint_data_get_mix_scale_x=Y.spine_transform_constraint_data_get_mix_scale_x;a._spine_transform_constraint_data_set_mix_scale_x=Y.spine_transform_constraint_data_set_mix_scale_x;
|
||||
a._spine_transform_constraint_data_get_mix_scale_y=Y.spine_transform_constraint_data_get_mix_scale_y;a._spine_transform_constraint_data_set_mix_scale_y=Y.spine_transform_constraint_data_set_mix_scale_y;a._spine_transform_constraint_data_get_mix_shear_y=Y.spine_transform_constraint_data_get_mix_shear_y;a._spine_transform_constraint_data_set_mix_shear_y=Y.spine_transform_constraint_data_set_mix_shear_y;a._spine_transform_constraint_data_get_offset_rotation=Y.spine_transform_constraint_data_get_offset_rotation;
|
||||
a._spine_transform_constraint_data_set_offset_rotation=Y.spine_transform_constraint_data_set_offset_rotation;a._spine_transform_constraint_data_get_offset_x=Y.spine_transform_constraint_data_get_offset_x;a._spine_transform_constraint_data_set_offset_x=Y.spine_transform_constraint_data_set_offset_x;a._spine_transform_constraint_data_get_offset_y=Y.spine_transform_constraint_data_get_offset_y;a._spine_transform_constraint_data_set_offset_y=Y.spine_transform_constraint_data_set_offset_y;
|
||||
a._spine_transform_constraint_data_get_offset_scale_x=Y.spine_transform_constraint_data_get_offset_scale_x;a._spine_transform_constraint_data_set_offset_scale_x=Y.spine_transform_constraint_data_set_offset_scale_x;a._spine_transform_constraint_data_get_offset_scale_y=Y.spine_transform_constraint_data_get_offset_scale_y;a._spine_transform_constraint_data_set_offset_scale_y=Y.spine_transform_constraint_data_set_offset_scale_y;a._spine_transform_constraint_data_get_offset_shear_y=Y.spine_transform_constraint_data_get_offset_shear_y;
|
||||
a._spine_transform_constraint_data_set_offset_shear_y=Y.spine_transform_constraint_data_set_offset_shear_y;a._spine_transform_constraint_data_get_is_relative=Y.spine_transform_constraint_data_get_is_relative;a._spine_transform_constraint_data_set_is_relative=Y.spine_transform_constraint_data_set_is_relative;a._spine_transform_constraint_data_get_is_local=Y.spine_transform_constraint_data_get_is_local;a._spine_transform_constraint_data_set_is_local=Y.spine_transform_constraint_data_set_is_local;
|
||||
a._spine_transform_constraint_update=Y.spine_transform_constraint_update;a._spine_transform_constraint_get_order=Y.spine_transform_constraint_get_order;a._spine_transform_constraint_get_data=Y.spine_transform_constraint_get_data;a._spine_transform_constraint_get_num_bones=Y.spine_transform_constraint_get_num_bones;a._spine_transform_constraint_get_bones=Y.spine_transform_constraint_get_bones;a._spine_transform_constraint_get_target=Y.spine_transform_constraint_get_target;
|
||||
a._spine_transform_constraint_set_target=Y.spine_transform_constraint_set_target;a._spine_transform_constraint_get_mix_rotate=Y.spine_transform_constraint_get_mix_rotate;a._spine_transform_constraint_set_mix_rotate=Y.spine_transform_constraint_set_mix_rotate;a._spine_transform_constraint_get_mix_x=Y.spine_transform_constraint_get_mix_x;a._spine_transform_constraint_set_mix_x=Y.spine_transform_constraint_set_mix_x;a._spine_transform_constraint_get_mix_y=Y.spine_transform_constraint_get_mix_y;
|
||||
a._spine_transform_constraint_set_mix_y=Y.spine_transform_constraint_set_mix_y;a._spine_transform_constraint_get_mix_scale_x=Y.spine_transform_constraint_get_mix_scale_x;a._spine_transform_constraint_set_mix_scale_x=Y.spine_transform_constraint_set_mix_scale_x;a._spine_transform_constraint_get_mix_scale_y=Y.spine_transform_constraint_get_mix_scale_y;a._spine_transform_constraint_set_mix_scale_y=Y.spine_transform_constraint_set_mix_scale_y;a._spine_transform_constraint_get_mix_shear_y=Y.spine_transform_constraint_get_mix_shear_y;
|
||||
a._spine_transform_constraint_set_mix_shear_y=Y.spine_transform_constraint_set_mix_shear_y;a._spine_transform_constraint_get_is_active=Y.spine_transform_constraint_get_is_active;a._spine_transform_constraint_set_is_active=Y.spine_transform_constraint_set_is_active;a._spine_path_constraint_data_get_num_bones=Y.spine_path_constraint_data_get_num_bones;a._spine_path_constraint_data_get_bones=Y.spine_path_constraint_data_get_bones;a._spine_path_constraint_data_get_target=Y.spine_path_constraint_data_get_target;
|
||||
a._spine_path_constraint_data_set_target=Y.spine_path_constraint_data_set_target;a._spine_path_constraint_data_get_position_mode=Y.spine_path_constraint_data_get_position_mode;a._spine_path_constraint_data_set_position_mode=Y.spine_path_constraint_data_set_position_mode;a._spine_path_constraint_data_get_spacing_mode=Y.spine_path_constraint_data_get_spacing_mode;a._spine_path_constraint_data_set_spacing_mode=Y.spine_path_constraint_data_set_spacing_mode;
|
||||
a._spine_path_constraint_data_get_rotate_mode=Y.spine_path_constraint_data_get_rotate_mode;a._spine_path_constraint_data_set_rotate_mode=Y.spine_path_constraint_data_set_rotate_mode;a._spine_path_constraint_data_get_offset_rotation=Y.spine_path_constraint_data_get_offset_rotation;a._spine_path_constraint_data_set_offset_rotation=Y.spine_path_constraint_data_set_offset_rotation;a._spine_path_constraint_data_get_position=Y.spine_path_constraint_data_get_position;
|
||||
a._spine_path_constraint_data_set_position=Y.spine_path_constraint_data_set_position;a._spine_path_constraint_data_get_spacing=Y.spine_path_constraint_data_get_spacing;a._spine_path_constraint_data_set_spacing=Y.spine_path_constraint_data_set_spacing;a._spine_path_constraint_data_get_mix_rotate=Y.spine_path_constraint_data_get_mix_rotate;a._spine_path_constraint_data_set_mix_rotate=Y.spine_path_constraint_data_set_mix_rotate;a._spine_path_constraint_data_get_mix_x=Y.spine_path_constraint_data_get_mix_x;
|
||||
a._spine_path_constraint_data_set_mix_x=Y.spine_path_constraint_data_set_mix_x;a._spine_path_constraint_data_get_mix_y=Y.spine_path_constraint_data_get_mix_y;a._spine_path_constraint_data_set_mix_y=Y.spine_path_constraint_data_set_mix_y;a._spine_path_constraint_update=Y.spine_path_constraint_update;a._spine_path_constraint_get_order=Y.spine_path_constraint_get_order;a._spine_path_constraint_get_data=Y.spine_path_constraint_get_data;a._spine_path_constraint_get_num_bones=Y.spine_path_constraint_get_num_bones;
|
||||
a._spine_path_constraint_get_bones=Y.spine_path_constraint_get_bones;a._spine_path_constraint_get_target=Y.spine_path_constraint_get_target;a._spine_path_constraint_set_target=Y.spine_path_constraint_set_target;a._spine_path_constraint_get_position=Y.spine_path_constraint_get_position;a._spine_path_constraint_set_position=Y.spine_path_constraint_set_position;a._spine_path_constraint_get_spacing=Y.spine_path_constraint_get_spacing;a._spine_path_constraint_set_spacing=Y.spine_path_constraint_set_spacing;
|
||||
a._spine_path_constraint_get_mix_rotate=Y.spine_path_constraint_get_mix_rotate;a._spine_path_constraint_set_mix_rotate=Y.spine_path_constraint_set_mix_rotate;a._spine_path_constraint_get_mix_x=Y.spine_path_constraint_get_mix_x;a._spine_path_constraint_set_mix_x=Y.spine_path_constraint_set_mix_x;a._spine_path_constraint_get_mix_y=Y.spine_path_constraint_get_mix_y;a._spine_path_constraint_set_mix_y=Y.spine_path_constraint_set_mix_y;a._spine_path_constraint_get_is_active=Y.spine_path_constraint_get_is_active;
|
||||
a._spine_path_constraint_set_is_active=Y.spine_path_constraint_set_is_active;a._spine_physics_constraint_data_set_bone=Y.spine_physics_constraint_data_set_bone;a._spine_physics_constraint_data_get_bone=Y.spine_physics_constraint_data_get_bone;a._spine_physics_constraint_data_set_x=Y.spine_physics_constraint_data_set_x;a._spine_physics_constraint_data_get_x=Y.spine_physics_constraint_data_get_x;a._spine_physics_constraint_data_set_y=Y.spine_physics_constraint_data_set_y;
|
||||
a._spine_physics_constraint_data_get_y=Y.spine_physics_constraint_data_get_y;a._spine_physics_constraint_data_set_rotate=Y.spine_physics_constraint_data_set_rotate;a._spine_physics_constraint_data_get_rotate=Y.spine_physics_constraint_data_get_rotate;a._spine_physics_constraint_data_set_scale_x=Y.spine_physics_constraint_data_set_scale_x;a._spine_physics_constraint_data_get_scale_x=Y.spine_physics_constraint_data_get_scale_x;a._spine_physics_constraint_data_set_shear_x=Y.spine_physics_constraint_data_set_shear_x;
|
||||
a._spine_physics_constraint_data_get_shear_x=Y.spine_physics_constraint_data_get_shear_x;a._spine_physics_constraint_data_set_limit=Y.spine_physics_constraint_data_set_limit;a._spine_physics_constraint_data_get_limit=Y.spine_physics_constraint_data_get_limit;a._spine_physics_constraint_data_set_step=Y.spine_physics_constraint_data_set_step;a._spine_physics_constraint_data_get_step=Y.spine_physics_constraint_data_get_step;a._spine_physics_constraint_data_set_inertia=Y.spine_physics_constraint_data_set_inertia;
|
||||
a._spine_physics_constraint_data_get_inertia=Y.spine_physics_constraint_data_get_inertia;a._spine_physics_constraint_data_set_strength=Y.spine_physics_constraint_data_set_strength;a._spine_physics_constraint_data_get_strength=Y.spine_physics_constraint_data_get_strength;a._spine_physics_constraint_data_set_damping=Y.spine_physics_constraint_data_set_damping;a._spine_physics_constraint_data_get_damping=Y.spine_physics_constraint_data_get_damping;a._spine_physics_constraint_data_set_mass_inverse=Y.spine_physics_constraint_data_set_mass_inverse;
|
||||
a._spine_physics_constraint_data_get_mass_inverse=Y.spine_physics_constraint_data_get_mass_inverse;a._spine_physics_constraint_data_set_wind=Y.spine_physics_constraint_data_set_wind;a._spine_physics_constraint_data_get_wind=Y.spine_physics_constraint_data_get_wind;a._spine_physics_constraint_data_set_gravity=Y.spine_physics_constraint_data_set_gravity;a._spine_physics_constraint_data_get_gravity=Y.spine_physics_constraint_data_get_gravity;a._spine_physics_constraint_data_set_mix=Y.spine_physics_constraint_data_set_mix;
|
||||
a._spine_physics_constraint_data_get_mix=Y.spine_physics_constraint_data_get_mix;a._spine_physics_constraint_data_set_inertia_global=Y.spine_physics_constraint_data_set_inertia_global;a._spine_physics_constraint_data_is_inertia_global=Y.spine_physics_constraint_data_is_inertia_global;a._spine_physics_constraint_data_set_strength_global=Y.spine_physics_constraint_data_set_strength_global;a._spine_physics_constraint_data_is_strength_global=Y.spine_physics_constraint_data_is_strength_global;
|
||||
a._spine_physics_constraint_data_set_damping_global=Y.spine_physics_constraint_data_set_damping_global;a._spine_physics_constraint_data_is_damping_global=Y.spine_physics_constraint_data_is_damping_global;a._spine_physics_constraint_data_set_mass_global=Y.spine_physics_constraint_data_set_mass_global;a._spine_physics_constraint_data_is_mass_global=Y.spine_physics_constraint_data_is_mass_global;a._spine_physics_constraint_data_set_wind_global=Y.spine_physics_constraint_data_set_wind_global;
|
||||
a._spine_physics_constraint_data_is_wind_global=Y.spine_physics_constraint_data_is_wind_global;a._spine_physics_constraint_data_set_gravity_global=Y.spine_physics_constraint_data_set_gravity_global;a._spine_physics_constraint_data_is_gravity_global=Y.spine_physics_constraint_data_is_gravity_global;a._spine_physics_constraint_data_set_mix_global=Y.spine_physics_constraint_data_set_mix_global;a._spine_physics_constraint_data_is_mix_global=Y.spine_physics_constraint_data_is_mix_global;
|
||||
a._spine_physics_constraint_set_bone=Y.spine_physics_constraint_set_bone;a._spine_physics_constraint_get_bone=Y.spine_physics_constraint_get_bone;a._spine_physics_constraint_set_inertia=Y.spine_physics_constraint_set_inertia;a._spine_physics_constraint_get_inertia=Y.spine_physics_constraint_get_inertia;a._spine_physics_constraint_set_strength=Y.spine_physics_constraint_set_strength;a._spine_physics_constraint_get_strength=Y.spine_physics_constraint_get_strength;
|
||||
a._spine_physics_constraint_set_damping=Y.spine_physics_constraint_set_damping;a._spine_physics_constraint_get_damping=Y.spine_physics_constraint_get_damping;a._spine_physics_constraint_set_mass_inverse=Y.spine_physics_constraint_set_mass_inverse;a._spine_physics_constraint_get_mass_inverse=Y.spine_physics_constraint_get_mass_inverse;a._spine_physics_constraint_set_wind=Y.spine_physics_constraint_set_wind;a._spine_physics_constraint_get_wind=Y.spine_physics_constraint_get_wind;
|
||||
a._spine_physics_constraint_set_gravity=Y.spine_physics_constraint_set_gravity;a._spine_physics_constraint_get_gravity=Y.spine_physics_constraint_get_gravity;a._spine_physics_constraint_set_mix=Y.spine_physics_constraint_set_mix;a._spine_physics_constraint_get_mix=Y.spine_physics_constraint_get_mix;a._spine_physics_constraint_set_reset=Y.spine_physics_constraint_set_reset;a._spine_physics_constraint_get_reset=Y.spine_physics_constraint_get_reset;a._spine_physics_constraint_set_ux=Y.spine_physics_constraint_set_ux;
|
||||
a._spine_physics_constraint_get_ux=Y.spine_physics_constraint_get_ux;a._spine_physics_constraint_set_uy=Y.spine_physics_constraint_set_uy;a._spine_physics_constraint_get_uy=Y.spine_physics_constraint_get_uy;a._spine_physics_constraint_set_cx=Y.spine_physics_constraint_set_cx;a._spine_physics_constraint_get_cx=Y.spine_physics_constraint_get_cx;a._spine_physics_constraint_set_cy=Y.spine_physics_constraint_set_cy;a._spine_physics_constraint_get_cy=Y.spine_physics_constraint_get_cy;
|
||||
a._spine_physics_constraint_set_tx=Y.spine_physics_constraint_set_tx;a._spine_physics_constraint_get_tx=Y.spine_physics_constraint_get_tx;a._spine_physics_constraint_set_ty=Y.spine_physics_constraint_set_ty;a._spine_physics_constraint_get_ty=Y.spine_physics_constraint_get_ty;a._spine_physics_constraint_set_x_offset=Y.spine_physics_constraint_set_x_offset;a._spine_physics_constraint_get_x_offset=Y.spine_physics_constraint_get_x_offset;a._spine_physics_constraint_set_x_velocity=Y.spine_physics_constraint_set_x_velocity;
|
||||
a._spine_physics_constraint_get_x_velocity=Y.spine_physics_constraint_get_x_velocity;a._spine_physics_constraint_set_y_offset=Y.spine_physics_constraint_set_y_offset;a._spine_physics_constraint_get_y_offset=Y.spine_physics_constraint_get_y_offset;a._spine_physics_constraint_set_y_velocity=Y.spine_physics_constraint_set_y_velocity;a._spine_physics_constraint_get_y_velocity=Y.spine_physics_constraint_get_y_velocity;a._spine_physics_constraint_set_rotate_offset=Y.spine_physics_constraint_set_rotate_offset;
|
||||
a._spine_physics_constraint_get_rotate_offset=Y.spine_physics_constraint_get_rotate_offset;a._spine_physics_constraint_set_rotate_velocity=Y.spine_physics_constraint_set_rotate_velocity;a._spine_physics_constraint_get_rotate_velocity=Y.spine_physics_constraint_get_rotate_velocity;a._spine_physics_constraint_set_scale_offset=Y.spine_physics_constraint_set_scale_offset;a._spine_physics_constraint_get_scale_offset=Y.spine_physics_constraint_get_scale_offset;
|
||||
a._spine_physics_constraint_set_scale_velocity=Y.spine_physics_constraint_set_scale_velocity;a._spine_physics_constraint_get_scale_velocity=Y.spine_physics_constraint_get_scale_velocity;a._spine_physics_constraint_set_active=Y.spine_physics_constraint_set_active;a._spine_physics_constraint_is_active=Y.spine_physics_constraint_is_active;a._spine_physics_constraint_set_remaining=Y.spine_physics_constraint_set_remaining;a._spine_physics_constraint_get_remaining=Y.spine_physics_constraint_get_remaining;
|
||||
a._spine_physics_constraint_set_last_time=Y.spine_physics_constraint_set_last_time;a._spine_physics_constraint_get_last_time=Y.spine_physics_constraint_get_last_time;a._spine_physics_constraint_reset_fully=Y.spine_physics_constraint_reset_fully;a._spine_physics_constraint_update=Y.spine_physics_constraint_update;a._spine_physics_constraint_translate=Y.spine_physics_constraint_translate;a._spine_physics_constraint_rotate=Y.spine_physics_constraint_rotate;a._spine_sequence_apply=Y.spine_sequence_apply;
|
||||
a._spine_sequence_get_path=Y.spine_sequence_get_path;a._spine_sequence_get_id=Y.spine_sequence_get_id;a._spine_sequence_set_id=Y.spine_sequence_set_id;a._spine_sequence_get_start=Y.spine_sequence_get_start;a._spine_sequence_set_start=Y.spine_sequence_set_start;a._spine_sequence_get_digits=Y.spine_sequence_get_digits;a._spine_sequence_set_digits=Y.spine_sequence_set_digits;a._spine_sequence_get_setup_index=Y.spine_sequence_get_setup_index;a._spine_sequence_set_setup_index=Y.spine_sequence_set_setup_index;
|
||||
a._spine_sequence_get_num_regions=Y.spine_sequence_get_num_regions;a._spine_sequence_get_regions=Y.spine_sequence_get_regions;a._spine_texture_region_get_texture=Y.spine_texture_region_get_texture;a._spine_texture_region_set_texture=Y.spine_texture_region_set_texture;a._spine_texture_region_get_u=Y.spine_texture_region_get_u;a._spine_texture_region_set_u=Y.spine_texture_region_set_u;a._spine_texture_region_get_v=Y.spine_texture_region_get_v;a._spine_texture_region_set_v=Y.spine_texture_region_set_v;
|
||||
a._spine_texture_region_get_u2=Y.spine_texture_region_get_u2;a._spine_texture_region_set_u2=Y.spine_texture_region_set_u2;a._spine_texture_region_get_v2=Y.spine_texture_region_get_v2;a._spine_texture_region_set_v2=Y.spine_texture_region_set_v2;a._spine_texture_region_get_degrees=Y.spine_texture_region_get_degrees;a._spine_texture_region_set_degrees=Y.spine_texture_region_set_degrees;a._spine_texture_region_get_offset_x=Y.spine_texture_region_get_offset_x;a._spine_texture_region_set_offset_x=Y.spine_texture_region_set_offset_x;
|
||||
a._spine_texture_region_get_offset_y=Y.spine_texture_region_get_offset_y;a._spine_texture_region_set_offset_y=Y.spine_texture_region_set_offset_y;a._spine_texture_region_get_width=Y.spine_texture_region_get_width;a._spine_texture_region_set_width=Y.spine_texture_region_set_width;a._spine_texture_region_get_height=Y.spine_texture_region_get_height;a._spine_texture_region_set_height=Y.spine_texture_region_set_height;a._spine_texture_region_get_original_width=Y.spine_texture_region_get_original_width;
|
||||
a._spine_texture_region_set_original_width=Y.spine_texture_region_set_original_width;a._spine_texture_region_get_original_height=Y.spine_texture_region_get_original_height;a._spine_texture_region_set_original_height=Y.spine_texture_region_set_original_height;a._spine_skeleton_bounds_create=Y.spine_skeleton_bounds_create;a._spine_skeleton_bounds_dispose=Y.spine_skeleton_bounds_dispose;a._spine_skeleton_bounds_update=Y.spine_skeleton_bounds_update;a._spine_skeleton_bounds_aabb_contains_point=Y.spine_skeleton_bounds_aabb_contains_point;
|
||||
a._spine_skeleton_bounds_aabb_intersects_segment=Y.spine_skeleton_bounds_aabb_intersects_segment;a._spine_skeleton_bounds_aabb_intersects_skeleton=Y.spine_skeleton_bounds_aabb_intersects_skeleton;a._spine_skeleton_bounds_contains_point=Y.spine_skeleton_bounds_contains_point;a._spine_skeleton_bounds_contains_point_attachment=Y.spine_skeleton_bounds_contains_point_attachment;a._spine_skeleton_bounds_intersects_segment_attachment=Y.spine_skeleton_bounds_intersects_segment_attachment;
|
||||
a._spine_skeleton_bounds_intersects_segment=Y.spine_skeleton_bounds_intersects_segment;a._spine_skeleton_bounds_get_polygon=Y.spine_skeleton_bounds_get_polygon;a._spine_skeleton_bounds_get_bounding_box=Y.spine_skeleton_bounds_get_bounding_box;a._spine_skeleton_bounds_get_num_polygons=Y.spine_skeleton_bounds_get_num_polygons;a._spine_skeleton_bounds_get_polygons=Y.spine_skeleton_bounds_get_polygons;a._spine_skeleton_bounds_get_num_bounding_boxes=Y.spine_skeleton_bounds_get_num_bounding_boxes;
|
||||
a._spine_skeleton_bounds_get_bounding_boxes=Y.spine_skeleton_bounds_get_bounding_boxes;a._spine_skeleton_bounds_get_width=Y.spine_skeleton_bounds_get_width;a._spine_skeleton_bounds_get_height=Y.spine_skeleton_bounds_get_height;a._spine_polygon_get_num_vertices=Y.spine_polygon_get_num_vertices;a._spine_polygon_get_vertices=Y.spine_polygon_get_vertices;a._malloc=Y.malloc;var ha=Y._emscripten_stack_restore,ia=Y.emscripten_stack_get_current;a.wasmExports=Y;
|
||||
function Z(){0<I?J=Z:0<I?J=Z:(a.calledRun=!0,x||(Y.__wasm_call_ctors(),b(a)))}Z();moduleRtn=k;
|
||||
|
||||
|
||||
var a;a||(a=typeof libspine_flutter !== 'undefined' ? libspine_flutter : {});var h,k;a.ready=new Promise(function(b,c){h=b;k=c});var l=Object.assign({},a),m="object"==typeof window,n="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,q="",r,t,u;
|
||||
if(p){q=n?require("path").dirname(q)+"/":__dirname+"/";var fs,v;"function"===typeof require&&(fs=require("fs"),v=require("path"));r=(b,c)=>{b=v.normalize(b);return fs.readFileSync(b,c?void 0:"utf8")};u=b=>{b=r(b,!0);b.buffer||(b=new Uint8Array(b));return b};t=(b,c,d)=>{b=v.normalize(b);fs.readFile(b,function(e,f){e?d(e):c(f.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);process.on("uncaughtException",function(b){if(!(b instanceof w))throw b;});process.on("unhandledRejection",
|
||||
function(b){throw b;});a.inspect=function(){return"[Emscripten Module object]"}}else if(m||n)n?q=self.location.href:"undefined"!=typeof document&&document.currentScript&&(q=document.currentScript.src),_scriptDir&&(q=_scriptDir),0!==q.indexOf("blob:")?q=q.substr(0,q.replace(/[?#].*/,"").lastIndexOf("/")+1):q="",r=b=>{var c=new XMLHttpRequest;c.open("GET",b,!1);c.send(null);return c.responseText},n&&(u=b=>{var c=new XMLHttpRequest;c.open("GET",b,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)}),
|
||||
t=(b,c,d)=>{var e=new XMLHttpRequest;e.open("GET",b,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?c(e.response):d()};e.onerror=d;e.send(null)};var aa=a.print||console.log.bind(console),x=a.printErr||console.warn.bind(console);Object.assign(a,l);l=null;var y;a.wasmBinary&&(y=a.wasmBinary);var noExitRuntime=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&z("no native wasm support detected");
|
||||
var A,B=!1,D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
||||
function E(b,c){for(var d=c+NaN,e=c;b[e]&&!(e>=d);)++e;if(16<e-c&&b.buffer&&D)return D.decode(b.subarray(c,e));for(d="";c<e;){var f=b[c++];if(f&128){var g=b[c++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var C=b[c++]&63;f=224==(f&240)?(f&15)<<12|g<<6|C:(f&7)<<18|g<<12|C<<6|b[c++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}var F,G,H,I,J,K,L,M;
|
||||
function N(){var b=A.buffer;F=b;a.HEAP8=G=new Int8Array(b);a.HEAP16=I=new Int16Array(b);a.HEAP32=J=new Int32Array(b);a.HEAPU8=H=new Uint8Array(b);a.HEAPU16=new Uint16Array(b);a.HEAPU32=K=new Uint32Array(b);a.HEAPF32=L=new Float32Array(b);a.HEAPF64=M=new Float64Array(b)}var ba=[],ca=[],da=[];function ea(){var b=a.preRun.shift();ba.unshift(b)}var O=0,P=null,R=null;
|
||||
function z(b){if(a.onAbort)a.onAbort(b);b="Aborted("+b+")";x(b);B=!0;b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info.");k(b);throw b;}function fa(){return S.startsWith("data:application/octet-stream;base64,")}var S;S="libspine_flutter.wasm";if(!fa()){var ha=S;S=a.locateFile?a.locateFile(ha,q):q+ha}function ia(){var b=S;try{if(b==S&&y)return new Uint8Array(y);if(u)return u(b);throw"both async and sync fetching of the wasm failed";}catch(c){z(c)}}
|
||||
function ja(){if(!y&&(m||n)){if("function"==typeof fetch&&!S.startsWith("file://"))return fetch(S,{credentials:"same-origin"}).then(function(b){if(!b.ok)throw"failed to load wasm binary file at '"+S+"'";return b.arrayBuffer()}).catch(function(){return ia()});if(t)return new Promise(function(b,c){t(S,function(d){b(new Uint8Array(d))},c)})}return Promise.resolve().then(function(){return ia()})}var T,U;
|
||||
function w(b){this.name="ExitStatus";this.message="Program terminated with exit("+b+")";this.status=b}a.ExitStatus=w;function V(b){for(;0<b.length;)b.shift()(a)}a.callRuntimeCallbacks=V;a.getValue=function(b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":return G[b>>0];case "i8":return G[b>>0];case "i16":return I[b>>1];case "i32":return J[b>>2];case "i64":return J[b>>2];case "float":return L[b>>2];case "double":return M[b>>3];case "*":return K[b>>2];default:z("invalid type for getValue: "+c)}return null};
|
||||
a.setValue=function(b,c,d="i8"){d.endsWith("*")&&(d="*");switch(d){case "i1":G[b>>0]=c;break;case "i8":G[b>>0]=c;break;case "i16":I[b>>1]=c;break;case "i32":J[b>>2]=c;break;case "i64":U=[c>>>0,(T=c,1<=+Math.abs(T)?0<T?(Math.min(+Math.floor(T/4294967296),4294967295)|0)>>>0:~~+Math.ceil((T-+(~~T>>>0))/4294967296)>>>0:0)];J[b>>2]=U[0];J[b+4>>2]=U[1];break;case "float":L[b>>2]=c;break;case "double":M[b>>3]=c;break;case "*":K[b>>2]=c;break;default:z("invalid type for setValue: "+d)}};
|
||||
function ka(b,c,d,e){z("Assertion failed: "+(b?E(H,b):"")+", at: "+[c?c?E(H,c):"":"unknown filename",d,e?e?E(H,e):"":"unknown function"])}a.___assert_fail=ka;function la(){z("")}a._abort=la;function ma(b,c,d){H.copyWithin(b,c,c+d)}a._emscripten_memcpy_big=ma;a.getHeapMax=function(){return 2147483648};function oa(b){try{return A.grow(b-F.byteLength+65535>>>16),N(),1}catch(c){}}a.emscripten_realloc_buffer=oa;
|
||||
function pa(b){var c=H.length;b>>>=0;if(2147483648<b)return!1;for(var d=1;4>=d;d*=2){var e=c*(1+.2/d);e=Math.min(e,b+100663296);var f=Math;e=Math.max(b,e);if(oa(f.min.call(f,2147483648,e+(65536-e%65536)%65536)))return!0}return!1}a._emscripten_resize_heap=pa;var W=[null,[],[]];a.printCharBuffers=W;function X(b,c){var d=W[b];0===c||10===c?((1===b?aa:x)(E(d,0)),d.length=0):d.push(c)}a.printChar=X;a.flush_NO_FILESYSTEM=function(){W[1].length&&X(1,10);W[2].length&&X(2,10)};
|
||||
var Y={g:void 0,get:function(){Y.g+=4;return J[Y.g-4>>2]},h:function(b){return b?E(H,b):""}};a.SYSCALLS=Y;function qa(b,c,d,e){for(var f=0,g=0;g<d;g++){var C=K[c>>2],na=K[c+4>>2];c+=8;for(var Q=0;Q<na;Q++)X(b,H[C+Q]);f+=na}K[e>>2]=f;return 0}a._fd_write=qa;var ra={__assert_fail:ka,abort:la,emscripten_memcpy_big:ma,emscripten_resize_heap:pa,fd_write:qa};
|
||||
(function(){function b(f){a.asm=f.exports;A=a.asm.memory;N();ca.unshift(a.asm.__wasm_call_ctors);O--;a.monitorRunDependencies&&a.monitorRunDependencies(O);0==O&&(null!==P&&(clearInterval(P),P=null),R&&(f=R,R=null,f()))}function c(f){b(f.instance)}function d(f){return ja().then(function(g){return WebAssembly.instantiate(g,e)}).then(function(g){return g}).then(f,function(g){x("failed to asynchronously prepare wasm: "+g);z(g)})}var e={env:ra,wasi_snapshot_preview1:ra};O++;a.monitorRunDependencies&&a.monitorRunDependencies(O);
|
||||
if(a.instantiateWasm)try{return a.instantiateWasm(e,b)}catch(f){x("Module.instantiateWasm callback failed with error: "+f),k(f)}(function(){return y||"function"!=typeof WebAssembly.instantiateStreaming||fa()||S.startsWith("file://")||p||"function"!=typeof fetch?d(c):fetch(S,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,e).then(c,function(g){x("wasm streaming compile failed: "+g);x("falling back to ArrayBuffer instantiation");return d(c)})})})().catch(k);return{}})();
|
||||
a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.__wasm_call_ctors).apply(null,arguments)};a._spine_enable_debug_extension=function(){return(a._spine_enable_debug_extension=a.asm.spine_enable_debug_extension).apply(null,arguments)};a._spine_major_version=function(){return(a._spine_major_version=a.asm.spine_major_version).apply(null,arguments)};a._spine_minor_version=function(){return(a._spine_minor_version=a.asm.spine_minor_version).apply(null,arguments)};
|
||||
a._spine_report_leaks=function(){return(a._spine_report_leaks=a.asm.spine_report_leaks).apply(null,arguments)};a._spine_color_get_r=function(){return(a._spine_color_get_r=a.asm.spine_color_get_r).apply(null,arguments)};a._spine_color_get_g=function(){return(a._spine_color_get_g=a.asm.spine_color_get_g).apply(null,arguments)};a._spine_color_get_b=function(){return(a._spine_color_get_b=a.asm.spine_color_get_b).apply(null,arguments)};
|
||||
a._spine_color_get_a=function(){return(a._spine_color_get_a=a.asm.spine_color_get_a).apply(null,arguments)};a._spine_bounds_get_x=function(){return(a._spine_bounds_get_x=a.asm.spine_bounds_get_x).apply(null,arguments)};a._spine_bounds_get_y=function(){return(a._spine_bounds_get_y=a.asm.spine_bounds_get_y).apply(null,arguments)};a._spine_bounds_get_width=function(){return(a._spine_bounds_get_width=a.asm.spine_bounds_get_width).apply(null,arguments)};
|
||||
a._spine_bounds_get_height=function(){return(a._spine_bounds_get_height=a.asm.spine_bounds_get_height).apply(null,arguments)};a._spine_vector_get_x=function(){return(a._spine_vector_get_x=a.asm.spine_vector_get_x).apply(null,arguments)};a._spine_vector_get_y=function(){return(a._spine_vector_get_y=a.asm.spine_vector_get_y).apply(null,arguments)};a._spine_atlas_load=function(){return(a._spine_atlas_load=a.asm.spine_atlas_load).apply(null,arguments)};
|
||||
a._spine_atlas_get_num_image_paths=function(){return(a._spine_atlas_get_num_image_paths=a.asm.spine_atlas_get_num_image_paths).apply(null,arguments)};a._spine_atlas_is_pma=function(){return(a._spine_atlas_is_pma=a.asm.spine_atlas_is_pma).apply(null,arguments)};a._spine_atlas_get_image_path=function(){return(a._spine_atlas_get_image_path=a.asm.spine_atlas_get_image_path).apply(null,arguments)};
|
||||
a._spine_atlas_get_error=function(){return(a._spine_atlas_get_error=a.asm.spine_atlas_get_error).apply(null,arguments)};a._spine_atlas_dispose=function(){return(a._spine_atlas_dispose=a.asm.spine_atlas_dispose).apply(null,arguments)};a._free=function(){return(a._free=a.asm.free).apply(null,arguments)};a._spine_skeleton_data_load_json=function(){return(a._spine_skeleton_data_load_json=a.asm.spine_skeleton_data_load_json).apply(null,arguments)};
|
||||
a._spine_skeleton_data_load_binary=function(){return(a._spine_skeleton_data_load_binary=a.asm.spine_skeleton_data_load_binary).apply(null,arguments)};a._spine_skeleton_data_result_get_error=function(){return(a._spine_skeleton_data_result_get_error=a.asm.spine_skeleton_data_result_get_error).apply(null,arguments)};a._spine_skeleton_data_result_get_data=function(){return(a._spine_skeleton_data_result_get_data=a.asm.spine_skeleton_data_result_get_data).apply(null,arguments)};
|
||||
a._spine_skeleton_data_result_dispose=function(){return(a._spine_skeleton_data_result_dispose=a.asm.spine_skeleton_data_result_dispose).apply(null,arguments)};a._spine_skeleton_data_find_bone=function(){return(a._spine_skeleton_data_find_bone=a.asm.spine_skeleton_data_find_bone).apply(null,arguments)};a._spine_skeleton_data_find_slot=function(){return(a._spine_skeleton_data_find_slot=a.asm.spine_skeleton_data_find_slot).apply(null,arguments)};
|
||||
a._spine_skeleton_data_find_skin=function(){return(a._spine_skeleton_data_find_skin=a.asm.spine_skeleton_data_find_skin).apply(null,arguments)};a._spine_skeleton_data_find_event=function(){return(a._spine_skeleton_data_find_event=a.asm.spine_skeleton_data_find_event).apply(null,arguments)};a._spine_skeleton_data_find_animation=function(){return(a._spine_skeleton_data_find_animation=a.asm.spine_skeleton_data_find_animation).apply(null,arguments)};
|
||||
a._spine_skeleton_data_find_ik_constraint=function(){return(a._spine_skeleton_data_find_ik_constraint=a.asm.spine_skeleton_data_find_ik_constraint).apply(null,arguments)};a._spine_skeleton_data_find_transform_constraint=function(){return(a._spine_skeleton_data_find_transform_constraint=a.asm.spine_skeleton_data_find_transform_constraint).apply(null,arguments)};
|
||||
a._spine_skeleton_data_find_path_constraint=function(){return(a._spine_skeleton_data_find_path_constraint=a.asm.spine_skeleton_data_find_path_constraint).apply(null,arguments)};a._spine_skeleton_data_find_physics_constraint=function(){return(a._spine_skeleton_data_find_physics_constraint=a.asm.spine_skeleton_data_find_physics_constraint).apply(null,arguments)};a._spine_skeleton_data_get_name=function(){return(a._spine_skeleton_data_get_name=a.asm.spine_skeleton_data_get_name).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_num_bones=function(){return(a._spine_skeleton_data_get_num_bones=a.asm.spine_skeleton_data_get_num_bones).apply(null,arguments)};a._spine_skeleton_data_get_bones=function(){return(a._spine_skeleton_data_get_bones=a.asm.spine_skeleton_data_get_bones).apply(null,arguments)};a._spine_skeleton_data_get_num_slots=function(){return(a._spine_skeleton_data_get_num_slots=a.asm.spine_skeleton_data_get_num_slots).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_slots=function(){return(a._spine_skeleton_data_get_slots=a.asm.spine_skeleton_data_get_slots).apply(null,arguments)};a._spine_skeleton_data_get_num_skins=function(){return(a._spine_skeleton_data_get_num_skins=a.asm.spine_skeleton_data_get_num_skins).apply(null,arguments)};a._spine_skeleton_data_get_skins=function(){return(a._spine_skeleton_data_get_skins=a.asm.spine_skeleton_data_get_skins).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_default_skin=function(){return(a._spine_skeleton_data_get_default_skin=a.asm.spine_skeleton_data_get_default_skin).apply(null,arguments)};a._spine_skeleton_data_set_default_skin=function(){return(a._spine_skeleton_data_set_default_skin=a.asm.spine_skeleton_data_set_default_skin).apply(null,arguments)};a._spine_skeleton_data_get_num_events=function(){return(a._spine_skeleton_data_get_num_events=a.asm.spine_skeleton_data_get_num_events).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_events=function(){return(a._spine_skeleton_data_get_events=a.asm.spine_skeleton_data_get_events).apply(null,arguments)};a._spine_skeleton_data_get_num_animations=function(){return(a._spine_skeleton_data_get_num_animations=a.asm.spine_skeleton_data_get_num_animations).apply(null,arguments)};a._spine_skeleton_data_get_animations=function(){return(a._spine_skeleton_data_get_animations=a.asm.spine_skeleton_data_get_animations).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_num_ik_constraints=function(){return(a._spine_skeleton_data_get_num_ik_constraints=a.asm.spine_skeleton_data_get_num_ik_constraints).apply(null,arguments)};a._spine_skeleton_data_get_ik_constraints=function(){return(a._spine_skeleton_data_get_ik_constraints=a.asm.spine_skeleton_data_get_ik_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_num_transform_constraints=function(){return(a._spine_skeleton_data_get_num_transform_constraints=a.asm.spine_skeleton_data_get_num_transform_constraints).apply(null,arguments)};a._spine_skeleton_data_get_transform_constraints=function(){return(a._spine_skeleton_data_get_transform_constraints=a.asm.spine_skeleton_data_get_transform_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_num_path_constraints=function(){return(a._spine_skeleton_data_get_num_path_constraints=a.asm.spine_skeleton_data_get_num_path_constraints).apply(null,arguments)};a._spine_skeleton_data_get_path_constraints=function(){return(a._spine_skeleton_data_get_path_constraints=a.asm.spine_skeleton_data_get_path_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_num_physics_constraints=function(){return(a._spine_skeleton_data_get_num_physics_constraints=a.asm.spine_skeleton_data_get_num_physics_constraints).apply(null,arguments)};a._spine_skeleton_data_get_physics_constraints=function(){return(a._spine_skeleton_data_get_physics_constraints=a.asm.spine_skeleton_data_get_physics_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_x=function(){return(a._spine_skeleton_data_get_x=a.asm.spine_skeleton_data_get_x).apply(null,arguments)};a._spine_skeleton_data_set_x=function(){return(a._spine_skeleton_data_set_x=a.asm.spine_skeleton_data_set_x).apply(null,arguments)};a._spine_skeleton_data_get_y=function(){return(a._spine_skeleton_data_get_y=a.asm.spine_skeleton_data_get_y).apply(null,arguments)};
|
||||
a._spine_skeleton_data_set_y=function(){return(a._spine_skeleton_data_set_y=a.asm.spine_skeleton_data_set_y).apply(null,arguments)};a._spine_skeleton_data_get_width=function(){return(a._spine_skeleton_data_get_width=a.asm.spine_skeleton_data_get_width).apply(null,arguments)};a._spine_skeleton_data_set_width=function(){return(a._spine_skeleton_data_set_width=a.asm.spine_skeleton_data_set_width).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_height=function(){return(a._spine_skeleton_data_get_height=a.asm.spine_skeleton_data_get_height).apply(null,arguments)};a._spine_skeleton_data_set_height=function(){return(a._spine_skeleton_data_set_height=a.asm.spine_skeleton_data_set_height).apply(null,arguments)};a._spine_skeleton_data_get_version=function(){return(a._spine_skeleton_data_get_version=a.asm.spine_skeleton_data_get_version).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_hash=function(){return(a._spine_skeleton_data_get_hash=a.asm.spine_skeleton_data_get_hash).apply(null,arguments)};a._spine_skeleton_data_get_images_path=function(){return(a._spine_skeleton_data_get_images_path=a.asm.spine_skeleton_data_get_images_path).apply(null,arguments)};a._spine_skeleton_data_get_audio_path=function(){return(a._spine_skeleton_data_get_audio_path=a.asm.spine_skeleton_data_get_audio_path).apply(null,arguments)};
|
||||
a._spine_skeleton_data_get_fps=function(){return(a._spine_skeleton_data_get_fps=a.asm.spine_skeleton_data_get_fps).apply(null,arguments)};a._spine_skeleton_data_get_reference_scale=function(){return(a._spine_skeleton_data_get_reference_scale=a.asm.spine_skeleton_data_get_reference_scale).apply(null,arguments)};a._spine_skeleton_data_dispose=function(){return(a._spine_skeleton_data_dispose=a.asm.spine_skeleton_data_dispose).apply(null,arguments)};
|
||||
a._spine_skeleton_drawable_create=function(){return(a._spine_skeleton_drawable_create=a.asm.spine_skeleton_drawable_create).apply(null,arguments)};a._spine_skeleton_drawable_dispose=function(){return(a._spine_skeleton_drawable_dispose=a.asm.spine_skeleton_drawable_dispose).apply(null,arguments)};a._spine_skeleton_drawable_render=function(){return(a._spine_skeleton_drawable_render=a.asm.spine_skeleton_drawable_render).apply(null,arguments)};
|
||||
a._spine_skeleton_drawable_get_skeleton=function(){return(a._spine_skeleton_drawable_get_skeleton=a.asm.spine_skeleton_drawable_get_skeleton).apply(null,arguments)};a._spine_skeleton_drawable_get_animation_state=function(){return(a._spine_skeleton_drawable_get_animation_state=a.asm.spine_skeleton_drawable_get_animation_state).apply(null,arguments)};
|
||||
a._spine_skeleton_drawable_get_animation_state_data=function(){return(a._spine_skeleton_drawable_get_animation_state_data=a.asm.spine_skeleton_drawable_get_animation_state_data).apply(null,arguments)};a._spine_skeleton_drawable_get_animation_state_events=function(){return(a._spine_skeleton_drawable_get_animation_state_events=a.asm.spine_skeleton_drawable_get_animation_state_events).apply(null,arguments)};
|
||||
a._spine_render_command_get_positions=function(){return(a._spine_render_command_get_positions=a.asm.spine_render_command_get_positions).apply(null,arguments)};a._spine_render_command_get_uvs=function(){return(a._spine_render_command_get_uvs=a.asm.spine_render_command_get_uvs).apply(null,arguments)};a._spine_render_command_get_colors=function(){return(a._spine_render_command_get_colors=a.asm.spine_render_command_get_colors).apply(null,arguments)};
|
||||
a._spine_render_command_get_dark_colors=function(){return(a._spine_render_command_get_dark_colors=a.asm.spine_render_command_get_dark_colors).apply(null,arguments)};a._spine_render_command_get_num_vertices=function(){return(a._spine_render_command_get_num_vertices=a.asm.spine_render_command_get_num_vertices).apply(null,arguments)};a._spine_render_command_get_indices=function(){return(a._spine_render_command_get_indices=a.asm.spine_render_command_get_indices).apply(null,arguments)};
|
||||
a._spine_render_command_get_num_indices=function(){return(a._spine_render_command_get_num_indices=a.asm.spine_render_command_get_num_indices).apply(null,arguments)};a._spine_render_command_get_atlas_page=function(){return(a._spine_render_command_get_atlas_page=a.asm.spine_render_command_get_atlas_page).apply(null,arguments)};a._spine_render_command_get_blend_mode=function(){return(a._spine_render_command_get_blend_mode=a.asm.spine_render_command_get_blend_mode).apply(null,arguments)};
|
||||
a._spine_render_command_get_next=function(){return(a._spine_render_command_get_next=a.asm.spine_render_command_get_next).apply(null,arguments)};a._spine_animation_get_name=function(){return(a._spine_animation_get_name=a.asm.spine_animation_get_name).apply(null,arguments)};a._spine_animation_get_duration=function(){return(a._spine_animation_get_duration=a.asm.spine_animation_get_duration).apply(null,arguments)};
|
||||
a._spine_animation_state_data_get_skeleton_data=function(){return(a._spine_animation_state_data_get_skeleton_data=a.asm.spine_animation_state_data_get_skeleton_data).apply(null,arguments)};a._spine_animation_state_data_get_default_mix=function(){return(a._spine_animation_state_data_get_default_mix=a.asm.spine_animation_state_data_get_default_mix).apply(null,arguments)};
|
||||
a._spine_animation_state_data_set_default_mix=function(){return(a._spine_animation_state_data_set_default_mix=a.asm.spine_animation_state_data_set_default_mix).apply(null,arguments)};a._spine_animation_state_data_set_mix=function(){return(a._spine_animation_state_data_set_mix=a.asm.spine_animation_state_data_set_mix).apply(null,arguments)};a._spine_animation_state_data_get_mix=function(){return(a._spine_animation_state_data_get_mix=a.asm.spine_animation_state_data_get_mix).apply(null,arguments)};
|
||||
a._spine_animation_state_data_set_mix_by_name=function(){return(a._spine_animation_state_data_set_mix_by_name=a.asm.spine_animation_state_data_set_mix_by_name).apply(null,arguments)};a._spine_animation_state_data_get_mix_by_name=function(){return(a._spine_animation_state_data_get_mix_by_name=a.asm.spine_animation_state_data_get_mix_by_name).apply(null,arguments)};
|
||||
a._spine_animation_state_data_clear=function(){return(a._spine_animation_state_data_clear=a.asm.spine_animation_state_data_clear).apply(null,arguments)};a._spine_animation_state_update=function(){return(a._spine_animation_state_update=a.asm.spine_animation_state_update).apply(null,arguments)};a._spine_animation_state_dispose_track_entry=function(){return(a._spine_animation_state_dispose_track_entry=a.asm.spine_animation_state_dispose_track_entry).apply(null,arguments)};
|
||||
a._spine_animation_state_apply=function(){return(a._spine_animation_state_apply=a.asm.spine_animation_state_apply).apply(null,arguments)};a._spine_animation_state_clear_tracks=function(){return(a._spine_animation_state_clear_tracks=a.asm.spine_animation_state_clear_tracks).apply(null,arguments)};a._spine_animation_state_get_num_tracks=function(){return(a._spine_animation_state_get_num_tracks=a.asm.spine_animation_state_get_num_tracks).apply(null,arguments)};
|
||||
a._spine_animation_state_clear_track=function(){return(a._spine_animation_state_clear_track=a.asm.spine_animation_state_clear_track).apply(null,arguments)};a._spine_animation_state_set_animation_by_name=function(){return(a._spine_animation_state_set_animation_by_name=a.asm.spine_animation_state_set_animation_by_name).apply(null,arguments)};a._spine_animation_state_set_animation=function(){return(a._spine_animation_state_set_animation=a.asm.spine_animation_state_set_animation).apply(null,arguments)};
|
||||
a._spine_animation_state_add_animation_by_name=function(){return(a._spine_animation_state_add_animation_by_name=a.asm.spine_animation_state_add_animation_by_name).apply(null,arguments)};a._spine_animation_state_add_animation=function(){return(a._spine_animation_state_add_animation=a.asm.spine_animation_state_add_animation).apply(null,arguments)};
|
||||
a._spine_animation_state_set_empty_animation=function(){return(a._spine_animation_state_set_empty_animation=a.asm.spine_animation_state_set_empty_animation).apply(null,arguments)};a._spine_animation_state_add_empty_animation=function(){return(a._spine_animation_state_add_empty_animation=a.asm.spine_animation_state_add_empty_animation).apply(null,arguments)};
|
||||
a._spine_animation_state_set_empty_animations=function(){return(a._spine_animation_state_set_empty_animations=a.asm.spine_animation_state_set_empty_animations).apply(null,arguments)};a._spine_animation_state_get_current=function(){return(a._spine_animation_state_get_current=a.asm.spine_animation_state_get_current).apply(null,arguments)};a._spine_animation_state_get_data=function(){return(a._spine_animation_state_get_data=a.asm.spine_animation_state_get_data).apply(null,arguments)};
|
||||
a._spine_animation_state_get_time_scale=function(){return(a._spine_animation_state_get_time_scale=a.asm.spine_animation_state_get_time_scale).apply(null,arguments)};a._spine_animation_state_set_time_scale=function(){return(a._spine_animation_state_set_time_scale=a.asm.spine_animation_state_set_time_scale).apply(null,arguments)};
|
||||
a._spine_animation_state_events_get_num_events=function(){return(a._spine_animation_state_events_get_num_events=a.asm.spine_animation_state_events_get_num_events).apply(null,arguments)};a._spine_animation_state_events_get_event_type=function(){return(a._spine_animation_state_events_get_event_type=a.asm.spine_animation_state_events_get_event_type).apply(null,arguments)};
|
||||
a._spine_animation_state_events_get_track_entry=function(){return(a._spine_animation_state_events_get_track_entry=a.asm.spine_animation_state_events_get_track_entry).apply(null,arguments)};a._spine_animation_state_events_get_event=function(){return(a._spine_animation_state_events_get_event=a.asm.spine_animation_state_events_get_event).apply(null,arguments)};
|
||||
a._spine_animation_state_events_reset=function(){return(a._spine_animation_state_events_reset=a.asm.spine_animation_state_events_reset).apply(null,arguments)};a._spine_track_entry_get_track_index=function(){return(a._spine_track_entry_get_track_index=a.asm.spine_track_entry_get_track_index).apply(null,arguments)};a._spine_track_entry_get_animation=function(){return(a._spine_track_entry_get_animation=a.asm.spine_track_entry_get_animation).apply(null,arguments)};
|
||||
a._spine_track_entry_get_previous=function(){return(a._spine_track_entry_get_previous=a.asm.spine_track_entry_get_previous).apply(null,arguments)};a._spine_track_entry_get_loop=function(){return(a._spine_track_entry_get_loop=a.asm.spine_track_entry_get_loop).apply(null,arguments)};a._spine_track_entry_set_loop=function(){return(a._spine_track_entry_set_loop=a.asm.spine_track_entry_set_loop).apply(null,arguments)};
|
||||
a._spine_track_entry_get_hold_previous=function(){return(a._spine_track_entry_get_hold_previous=a.asm.spine_track_entry_get_hold_previous).apply(null,arguments)};a._spine_track_entry_set_hold_previous=function(){return(a._spine_track_entry_set_hold_previous=a.asm.spine_track_entry_set_hold_previous).apply(null,arguments)};a._spine_track_entry_get_reverse=function(){return(a._spine_track_entry_get_reverse=a.asm.spine_track_entry_get_reverse).apply(null,arguments)};
|
||||
a._spine_track_entry_set_reverse=function(){return(a._spine_track_entry_set_reverse=a.asm.spine_track_entry_set_reverse).apply(null,arguments)};a._spine_track_entry_get_shortest_rotation=function(){return(a._spine_track_entry_get_shortest_rotation=a.asm.spine_track_entry_get_shortest_rotation).apply(null,arguments)};a._spine_track_entry_set_shortest_rotation=function(){return(a._spine_track_entry_set_shortest_rotation=a.asm.spine_track_entry_set_shortest_rotation).apply(null,arguments)};
|
||||
a._spine_track_entry_get_delay=function(){return(a._spine_track_entry_get_delay=a.asm.spine_track_entry_get_delay).apply(null,arguments)};a._spine_track_entry_set_delay=function(){return(a._spine_track_entry_set_delay=a.asm.spine_track_entry_set_delay).apply(null,arguments)};a._spine_track_entry_get_track_time=function(){return(a._spine_track_entry_get_track_time=a.asm.spine_track_entry_get_track_time).apply(null,arguments)};
|
||||
a._spine_track_entry_set_track_time=function(){return(a._spine_track_entry_set_track_time=a.asm.spine_track_entry_set_track_time).apply(null,arguments)};a._spine_track_entry_get_track_end=function(){return(a._spine_track_entry_get_track_end=a.asm.spine_track_entry_get_track_end).apply(null,arguments)};a._spine_track_entry_set_track_end=function(){return(a._spine_track_entry_set_track_end=a.asm.spine_track_entry_set_track_end).apply(null,arguments)};
|
||||
a._spine_track_entry_get_animation_start=function(){return(a._spine_track_entry_get_animation_start=a.asm.spine_track_entry_get_animation_start).apply(null,arguments)};a._spine_track_entry_set_animation_start=function(){return(a._spine_track_entry_set_animation_start=a.asm.spine_track_entry_set_animation_start).apply(null,arguments)};a._spine_track_entry_get_animation_end=function(){return(a._spine_track_entry_get_animation_end=a.asm.spine_track_entry_get_animation_end).apply(null,arguments)};
|
||||
a._spine_track_entry_set_animation_end=function(){return(a._spine_track_entry_set_animation_end=a.asm.spine_track_entry_set_animation_end).apply(null,arguments)};a._spine_track_entry_get_animation_last=function(){return(a._spine_track_entry_get_animation_last=a.asm.spine_track_entry_get_animation_last).apply(null,arguments)};a._spine_track_entry_set_animation_last=function(){return(a._spine_track_entry_set_animation_last=a.asm.spine_track_entry_set_animation_last).apply(null,arguments)};
|
||||
a._spine_track_entry_get_animation_time=function(){return(a._spine_track_entry_get_animation_time=a.asm.spine_track_entry_get_animation_time).apply(null,arguments)};a._spine_track_entry_get_time_scale=function(){return(a._spine_track_entry_get_time_scale=a.asm.spine_track_entry_get_time_scale).apply(null,arguments)};a._spine_track_entry_set_time_scale=function(){return(a._spine_track_entry_set_time_scale=a.asm.spine_track_entry_set_time_scale).apply(null,arguments)};
|
||||
a._spine_track_entry_get_alpha=function(){return(a._spine_track_entry_get_alpha=a.asm.spine_track_entry_get_alpha).apply(null,arguments)};a._spine_track_entry_set_alpha=function(){return(a._spine_track_entry_set_alpha=a.asm.spine_track_entry_set_alpha).apply(null,arguments)};a._spine_track_entry_get_event_threshold=function(){return(a._spine_track_entry_get_event_threshold=a.asm.spine_track_entry_get_event_threshold).apply(null,arguments)};
|
||||
a._spine_track_entry_set_event_threshold=function(){return(a._spine_track_entry_set_event_threshold=a.asm.spine_track_entry_set_event_threshold).apply(null,arguments)};a._spine_track_entry_get_alpha_attachment_threshold=function(){return(a._spine_track_entry_get_alpha_attachment_threshold=a.asm.spine_track_entry_get_alpha_attachment_threshold).apply(null,arguments)};
|
||||
a._spine_track_entry_set_alpha_attachment_threshold=function(){return(a._spine_track_entry_set_alpha_attachment_threshold=a.asm.spine_track_entry_set_alpha_attachment_threshold).apply(null,arguments)};a._spine_track_entry_get_mix_attachment_threshold=function(){return(a._spine_track_entry_get_mix_attachment_threshold=a.asm.spine_track_entry_get_mix_attachment_threshold).apply(null,arguments)};
|
||||
a._spine_track_entry_set_mix_attachment_threshold=function(){return(a._spine_track_entry_set_mix_attachment_threshold=a.asm.spine_track_entry_set_mix_attachment_threshold).apply(null,arguments)};a._spine_track_entry_get_mix_draw_order_threshold=function(){return(a._spine_track_entry_get_mix_draw_order_threshold=a.asm.spine_track_entry_get_mix_draw_order_threshold).apply(null,arguments)};
|
||||
a._spine_track_entry_set_mix_draw_order_threshold=function(){return(a._spine_track_entry_set_mix_draw_order_threshold=a.asm.spine_track_entry_set_mix_draw_order_threshold).apply(null,arguments)};a._spine_track_entry_get_next=function(){return(a._spine_track_entry_get_next=a.asm.spine_track_entry_get_next).apply(null,arguments)};a._spine_track_entry_is_complete=function(){return(a._spine_track_entry_is_complete=a.asm.spine_track_entry_is_complete).apply(null,arguments)};
|
||||
a._spine_track_entry_get_mix_time=function(){return(a._spine_track_entry_get_mix_time=a.asm.spine_track_entry_get_mix_time).apply(null,arguments)};a._spine_track_entry_set_mix_time=function(){return(a._spine_track_entry_set_mix_time=a.asm.spine_track_entry_set_mix_time).apply(null,arguments)};a._spine_track_entry_get_mix_duration=function(){return(a._spine_track_entry_get_mix_duration=a.asm.spine_track_entry_get_mix_duration).apply(null,arguments)};
|
||||
a._spine_track_entry_set_mix_duration=function(){return(a._spine_track_entry_set_mix_duration=a.asm.spine_track_entry_set_mix_duration).apply(null,arguments)};a._spine_track_entry_get_mix_blend=function(){return(a._spine_track_entry_get_mix_blend=a.asm.spine_track_entry_get_mix_blend).apply(null,arguments)};a._spine_track_entry_set_mix_blend=function(){return(a._spine_track_entry_set_mix_blend=a.asm.spine_track_entry_set_mix_blend).apply(null,arguments)};
|
||||
a._spine_track_entry_get_mixing_from=function(){return(a._spine_track_entry_get_mixing_from=a.asm.spine_track_entry_get_mixing_from).apply(null,arguments)};a._spine_track_entry_get_mixing_to=function(){return(a._spine_track_entry_get_mixing_to=a.asm.spine_track_entry_get_mixing_to).apply(null,arguments)};a._spine_track_entry_reset_rotation_directions=function(){return(a._spine_track_entry_reset_rotation_directions=a.asm.spine_track_entry_reset_rotation_directions).apply(null,arguments)};
|
||||
a._spine_track_entry_get_track_complete=function(){return(a._spine_track_entry_get_track_complete=a.asm.spine_track_entry_get_track_complete).apply(null,arguments)};a._spine_track_entry_was_applied=function(){return(a._spine_track_entry_was_applied=a.asm.spine_track_entry_was_applied).apply(null,arguments)};a._spine_track_entry_is_next_ready=function(){return(a._spine_track_entry_is_next_ready=a.asm.spine_track_entry_is_next_ready).apply(null,arguments)};
|
||||
a._spine_skeleton_update_cache=function(){return(a._spine_skeleton_update_cache=a.asm.spine_skeleton_update_cache).apply(null,arguments)};a._spine_skeleton_update_world_transform=function(){return(a._spine_skeleton_update_world_transform=a.asm.spine_skeleton_update_world_transform).apply(null,arguments)};a._spine_skeleton_update_world_transform_bone=function(){return(a._spine_skeleton_update_world_transform_bone=a.asm.spine_skeleton_update_world_transform_bone).apply(null,arguments)};
|
||||
a._spine_skeleton_set_to_setup_pose=function(){return(a._spine_skeleton_set_to_setup_pose=a.asm.spine_skeleton_set_to_setup_pose).apply(null,arguments)};a._spine_skeleton_set_bones_to_setup_pose=function(){return(a._spine_skeleton_set_bones_to_setup_pose=a.asm.spine_skeleton_set_bones_to_setup_pose).apply(null,arguments)};a._spine_skeleton_set_slots_to_setup_pose=function(){return(a._spine_skeleton_set_slots_to_setup_pose=a.asm.spine_skeleton_set_slots_to_setup_pose).apply(null,arguments)};
|
||||
a._spine_skeleton_find_bone=function(){return(a._spine_skeleton_find_bone=a.asm.spine_skeleton_find_bone).apply(null,arguments)};a._spine_skeleton_find_slot=function(){return(a._spine_skeleton_find_slot=a.asm.spine_skeleton_find_slot).apply(null,arguments)};a._spine_skeleton_set_skin_by_name=function(){return(a._spine_skeleton_set_skin_by_name=a.asm.spine_skeleton_set_skin_by_name).apply(null,arguments)};
|
||||
a._spine_skeleton_set_skin=function(){return(a._spine_skeleton_set_skin=a.asm.spine_skeleton_set_skin).apply(null,arguments)};a._spine_skeleton_get_attachment_by_name=function(){return(a._spine_skeleton_get_attachment_by_name=a.asm.spine_skeleton_get_attachment_by_name).apply(null,arguments)};a._spine_skeleton_get_attachment=function(){return(a._spine_skeleton_get_attachment=a.asm.spine_skeleton_get_attachment).apply(null,arguments)};
|
||||
a._spine_skeleton_set_attachment=function(){return(a._spine_skeleton_set_attachment=a.asm.spine_skeleton_set_attachment).apply(null,arguments)};a._spine_skeleton_find_ik_constraint=function(){return(a._spine_skeleton_find_ik_constraint=a.asm.spine_skeleton_find_ik_constraint).apply(null,arguments)};a._spine_skeleton_find_transform_constraint=function(){return(a._spine_skeleton_find_transform_constraint=a.asm.spine_skeleton_find_transform_constraint).apply(null,arguments)};
|
||||
a._spine_skeleton_find_path_constraint=function(){return(a._spine_skeleton_find_path_constraint=a.asm.spine_skeleton_find_path_constraint).apply(null,arguments)};a._spine_skeleton_find_physics_constraint=function(){return(a._spine_skeleton_find_physics_constraint=a.asm.spine_skeleton_find_physics_constraint).apply(null,arguments)};a._spine_skeleton_get_bounds=function(){return(a._spine_skeleton_get_bounds=a.asm.spine_skeleton_get_bounds).apply(null,arguments)};
|
||||
a._spine_skeleton_get_root_bone=function(){return(a._spine_skeleton_get_root_bone=a.asm.spine_skeleton_get_root_bone).apply(null,arguments)};a._spine_skeleton_get_data=function(){return(a._spine_skeleton_get_data=a.asm.spine_skeleton_get_data).apply(null,arguments)};a._spine_skeleton_get_num_bones=function(){return(a._spine_skeleton_get_num_bones=a.asm.spine_skeleton_get_num_bones).apply(null,arguments)};
|
||||
a._spine_skeleton_get_bones=function(){return(a._spine_skeleton_get_bones=a.asm.spine_skeleton_get_bones).apply(null,arguments)};a._spine_skeleton_get_num_slots=function(){return(a._spine_skeleton_get_num_slots=a.asm.spine_skeleton_get_num_slots).apply(null,arguments)};a._spine_skeleton_get_slots=function(){return(a._spine_skeleton_get_slots=a.asm.spine_skeleton_get_slots).apply(null,arguments)};
|
||||
a._spine_skeleton_get_num_draw_order=function(){return(a._spine_skeleton_get_num_draw_order=a.asm.spine_skeleton_get_num_draw_order).apply(null,arguments)};a._spine_skeleton_get_draw_order=function(){return(a._spine_skeleton_get_draw_order=a.asm.spine_skeleton_get_draw_order).apply(null,arguments)};a._spine_skeleton_get_num_ik_constraints=function(){return(a._spine_skeleton_get_num_ik_constraints=a.asm.spine_skeleton_get_num_ik_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_get_ik_constraints=function(){return(a._spine_skeleton_get_ik_constraints=a.asm.spine_skeleton_get_ik_constraints).apply(null,arguments)};a._spine_skeleton_get_num_transform_constraints=function(){return(a._spine_skeleton_get_num_transform_constraints=a.asm.spine_skeleton_get_num_transform_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_get_transform_constraints=function(){return(a._spine_skeleton_get_transform_constraints=a.asm.spine_skeleton_get_transform_constraints).apply(null,arguments)};a._spine_skeleton_get_num_path_constraints=function(){return(a._spine_skeleton_get_num_path_constraints=a.asm.spine_skeleton_get_num_path_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_get_path_constraints=function(){return(a._spine_skeleton_get_path_constraints=a.asm.spine_skeleton_get_path_constraints).apply(null,arguments)};a._spine_skeleton_get_num_physics_constraints=function(){return(a._spine_skeleton_get_num_physics_constraints=a.asm.spine_skeleton_get_num_physics_constraints).apply(null,arguments)};
|
||||
a._spine_skeleton_get_physics_constraints=function(){return(a._spine_skeleton_get_physics_constraints=a.asm.spine_skeleton_get_physics_constraints).apply(null,arguments)};a._spine_skeleton_get_skin=function(){return(a._spine_skeleton_get_skin=a.asm.spine_skeleton_get_skin).apply(null,arguments)};a._spine_skeleton_get_color=function(){return(a._spine_skeleton_get_color=a.asm.spine_skeleton_get_color).apply(null,arguments)};
|
||||
a._spine_skeleton_set_color=function(){return(a._spine_skeleton_set_color=a.asm.spine_skeleton_set_color).apply(null,arguments)};a._spine_skeleton_set_position=function(){return(a._spine_skeleton_set_position=a.asm.spine_skeleton_set_position).apply(null,arguments)};a._spine_skeleton_get_x=function(){return(a._spine_skeleton_get_x=a.asm.spine_skeleton_get_x).apply(null,arguments)};a._spine_skeleton_set_x=function(){return(a._spine_skeleton_set_x=a.asm.spine_skeleton_set_x).apply(null,arguments)};
|
||||
a._spine_skeleton_get_y=function(){return(a._spine_skeleton_get_y=a.asm.spine_skeleton_get_y).apply(null,arguments)};a._spine_skeleton_set_y=function(){return(a._spine_skeleton_set_y=a.asm.spine_skeleton_set_y).apply(null,arguments)};a._spine_skeleton_set_scale=function(){return(a._spine_skeleton_set_scale=a.asm.spine_skeleton_set_scale).apply(null,arguments)};a._spine_skeleton_get_scale_x=function(){return(a._spine_skeleton_get_scale_x=a.asm.spine_skeleton_get_scale_x).apply(null,arguments)};
|
||||
a._spine_skeleton_set_scale_x=function(){return(a._spine_skeleton_set_scale_x=a.asm.spine_skeleton_set_scale_x).apply(null,arguments)};a._spine_skeleton_get_scale_y=function(){return(a._spine_skeleton_get_scale_y=a.asm.spine_skeleton_get_scale_y).apply(null,arguments)};a._spine_skeleton_set_scale_y=function(){return(a._spine_skeleton_set_scale_y=a.asm.spine_skeleton_set_scale_y).apply(null,arguments)};
|
||||
a._spine_skeleton_get_time=function(){return(a._spine_skeleton_get_time=a.asm.spine_skeleton_get_time).apply(null,arguments)};a._spine_skeleton_set_time=function(){return(a._spine_skeleton_set_time=a.asm.spine_skeleton_set_time).apply(null,arguments)};a._spine_skeleton_update=function(){return(a._spine_skeleton_update=a.asm.spine_skeleton_update).apply(null,arguments)};a._spine_event_data_get_name=function(){return(a._spine_event_data_get_name=a.asm.spine_event_data_get_name).apply(null,arguments)};
|
||||
a._spine_event_data_get_int_value=function(){return(a._spine_event_data_get_int_value=a.asm.spine_event_data_get_int_value).apply(null,arguments)};a._spine_event_data_set_int_value=function(){return(a._spine_event_data_set_int_value=a.asm.spine_event_data_set_int_value).apply(null,arguments)};a._spine_event_data_get_float_value=function(){return(a._spine_event_data_get_float_value=a.asm.spine_event_data_get_float_value).apply(null,arguments)};
|
||||
a._spine_event_data_set_float_value=function(){return(a._spine_event_data_set_float_value=a.asm.spine_event_data_set_float_value).apply(null,arguments)};a._spine_event_data_get_string_value=function(){return(a._spine_event_data_get_string_value=a.asm.spine_event_data_get_string_value).apply(null,arguments)};a._spine_event_data_set_string_value=function(){return(a._spine_event_data_set_string_value=a.asm.spine_event_data_set_string_value).apply(null,arguments)};
|
||||
a._spine_event_data_get_audio_path=function(){return(a._spine_event_data_get_audio_path=a.asm.spine_event_data_get_audio_path).apply(null,arguments)};a._spine_event_data_get_volume=function(){return(a._spine_event_data_get_volume=a.asm.spine_event_data_get_volume).apply(null,arguments)};a._spine_event_data_set_volume=function(){return(a._spine_event_data_set_volume=a.asm.spine_event_data_set_volume).apply(null,arguments)};
|
||||
a._spine_event_data_get_balance=function(){return(a._spine_event_data_get_balance=a.asm.spine_event_data_get_balance).apply(null,arguments)};a._spine_event_data_set_balance=function(){return(a._spine_event_data_set_balance=a.asm.spine_event_data_set_balance).apply(null,arguments)};a._spine_event_get_data=function(){return(a._spine_event_get_data=a.asm.spine_event_get_data).apply(null,arguments)};
|
||||
a._spine_event_get_time=function(){return(a._spine_event_get_time=a.asm.spine_event_get_time).apply(null,arguments)};a._spine_event_get_int_value=function(){return(a._spine_event_get_int_value=a.asm.spine_event_get_int_value).apply(null,arguments)};a._spine_event_set_int_value=function(){return(a._spine_event_set_int_value=a.asm.spine_event_set_int_value).apply(null,arguments)};
|
||||
a._spine_event_get_float_value=function(){return(a._spine_event_get_float_value=a.asm.spine_event_get_float_value).apply(null,arguments)};a._spine_event_set_float_value=function(){return(a._spine_event_set_float_value=a.asm.spine_event_set_float_value).apply(null,arguments)};a._spine_event_get_string_value=function(){return(a._spine_event_get_string_value=a.asm.spine_event_get_string_value).apply(null,arguments)};
|
||||
a._spine_event_set_string_value=function(){return(a._spine_event_set_string_value=a.asm.spine_event_set_string_value).apply(null,arguments)};a._spine_event_get_volume=function(){return(a._spine_event_get_volume=a.asm.spine_event_get_volume).apply(null,arguments)};a._spine_event_set_volume=function(){return(a._spine_event_set_volume=a.asm.spine_event_set_volume).apply(null,arguments)};
|
||||
a._spine_event_get_balance=function(){return(a._spine_event_get_balance=a.asm.spine_event_get_balance).apply(null,arguments)};a._spine_event_set_balance=function(){return(a._spine_event_set_balance=a.asm.spine_event_set_balance).apply(null,arguments)};a._spine_slot_data_get_index=function(){return(a._spine_slot_data_get_index=a.asm.spine_slot_data_get_index).apply(null,arguments)};
|
||||
a._spine_slot_data_get_name=function(){return(a._spine_slot_data_get_name=a.asm.spine_slot_data_get_name).apply(null,arguments)};a._spine_slot_data_get_bone_data=function(){return(a._spine_slot_data_get_bone_data=a.asm.spine_slot_data_get_bone_data).apply(null,arguments)};a._spine_slot_data_get_color=function(){return(a._spine_slot_data_get_color=a.asm.spine_slot_data_get_color).apply(null,arguments)};
|
||||
a._spine_slot_data_set_color=function(){return(a._spine_slot_data_set_color=a.asm.spine_slot_data_set_color).apply(null,arguments)};a._spine_slot_data_get_dark_color=function(){return(a._spine_slot_data_get_dark_color=a.asm.spine_slot_data_get_dark_color).apply(null,arguments)};a._spine_slot_data_set_dark_color=function(){return(a._spine_slot_data_set_dark_color=a.asm.spine_slot_data_set_dark_color).apply(null,arguments)};
|
||||
a._spine_slot_data_get_has_dark_color=function(){return(a._spine_slot_data_get_has_dark_color=a.asm.spine_slot_data_get_has_dark_color).apply(null,arguments)};a._spine_slot_data_set_has_dark_color=function(){return(a._spine_slot_data_set_has_dark_color=a.asm.spine_slot_data_set_has_dark_color).apply(null,arguments)};a._spine_slot_data_get_attachment_name=function(){return(a._spine_slot_data_get_attachment_name=a.asm.spine_slot_data_get_attachment_name).apply(null,arguments)};
|
||||
a._spine_slot_data_set_attachment_name=function(){return(a._spine_slot_data_set_attachment_name=a.asm.spine_slot_data_set_attachment_name).apply(null,arguments)};a._spine_slot_data_get_blend_mode=function(){return(a._spine_slot_data_get_blend_mode=a.asm.spine_slot_data_get_blend_mode).apply(null,arguments)};a._spine_slot_data_set_blend_mode=function(){return(a._spine_slot_data_set_blend_mode=a.asm.spine_slot_data_set_blend_mode).apply(null,arguments)};
|
||||
a._spine_slot_data_is_visible=function(){return(a._spine_slot_data_is_visible=a.asm.spine_slot_data_is_visible).apply(null,arguments)};a._spine_slot_data_set_visible=function(){return(a._spine_slot_data_set_visible=a.asm.spine_slot_data_set_visible).apply(null,arguments)};a._spine_slot_set_to_setup_pose=function(){return(a._spine_slot_set_to_setup_pose=a.asm.spine_slot_set_to_setup_pose).apply(null,arguments)};
|
||||
a._spine_slot_get_data=function(){return(a._spine_slot_get_data=a.asm.spine_slot_get_data).apply(null,arguments)};a._spine_slot_get_bone=function(){return(a._spine_slot_get_bone=a.asm.spine_slot_get_bone).apply(null,arguments)};a._spine_slot_get_skeleton=function(){return(a._spine_slot_get_skeleton=a.asm.spine_slot_get_skeleton).apply(null,arguments)};a._spine_slot_get_color=function(){return(a._spine_slot_get_color=a.asm.spine_slot_get_color).apply(null,arguments)};
|
||||
a._spine_slot_set_color=function(){return(a._spine_slot_set_color=a.asm.spine_slot_set_color).apply(null,arguments)};a._spine_slot_get_dark_color=function(){return(a._spine_slot_get_dark_color=a.asm.spine_slot_get_dark_color).apply(null,arguments)};a._spine_slot_set_dark_color=function(){return(a._spine_slot_set_dark_color=a.asm.spine_slot_set_dark_color).apply(null,arguments)};
|
||||
a._spine_slot_has_dark_color=function(){return(a._spine_slot_has_dark_color=a.asm.spine_slot_has_dark_color).apply(null,arguments)};a._spine_slot_get_attachment=function(){return(a._spine_slot_get_attachment=a.asm.spine_slot_get_attachment).apply(null,arguments)};a._spine_slot_set_attachment=function(){return(a._spine_slot_set_attachment=a.asm.spine_slot_set_attachment).apply(null,arguments)};
|
||||
a._spine_slot_get_sequence_index=function(){return(a._spine_slot_get_sequence_index=a.asm.spine_slot_get_sequence_index).apply(null,arguments)};a._spine_slot_set_sequence_index=function(){return(a._spine_slot_set_sequence_index=a.asm.spine_slot_set_sequence_index).apply(null,arguments)};a._spine_bone_data_get_index=function(){return(a._spine_bone_data_get_index=a.asm.spine_bone_data_get_index).apply(null,arguments)};
|
||||
a._spine_bone_data_get_name=function(){return(a._spine_bone_data_get_name=a.asm.spine_bone_data_get_name).apply(null,arguments)};a._spine_bone_data_get_parent=function(){return(a._spine_bone_data_get_parent=a.asm.spine_bone_data_get_parent).apply(null,arguments)};a._spine_bone_data_get_length=function(){return(a._spine_bone_data_get_length=a.asm.spine_bone_data_get_length).apply(null,arguments)};
|
||||
a._spine_bone_data_set_length=function(){return(a._spine_bone_data_set_length=a.asm.spine_bone_data_set_length).apply(null,arguments)};a._spine_bone_data_get_x=function(){return(a._spine_bone_data_get_x=a.asm.spine_bone_data_get_x).apply(null,arguments)};a._spine_bone_data_set_x=function(){return(a._spine_bone_data_set_x=a.asm.spine_bone_data_set_x).apply(null,arguments)};a._spine_bone_data_get_y=function(){return(a._spine_bone_data_get_y=a.asm.spine_bone_data_get_y).apply(null,arguments)};
|
||||
a._spine_bone_data_set_y=function(){return(a._spine_bone_data_set_y=a.asm.spine_bone_data_set_y).apply(null,arguments)};a._spine_bone_data_get_rotation=function(){return(a._spine_bone_data_get_rotation=a.asm.spine_bone_data_get_rotation).apply(null,arguments)};a._spine_bone_data_set_rotation=function(){return(a._spine_bone_data_set_rotation=a.asm.spine_bone_data_set_rotation).apply(null,arguments)};
|
||||
a._spine_bone_data_get_scale_x=function(){return(a._spine_bone_data_get_scale_x=a.asm.spine_bone_data_get_scale_x).apply(null,arguments)};a._spine_bone_data_set_scale_x=function(){return(a._spine_bone_data_set_scale_x=a.asm.spine_bone_data_set_scale_x).apply(null,arguments)};a._spine_bone_data_get_scale_y=function(){return(a._spine_bone_data_get_scale_y=a.asm.spine_bone_data_get_scale_y).apply(null,arguments)};
|
||||
a._spine_bone_data_set_scale_y=function(){return(a._spine_bone_data_set_scale_y=a.asm.spine_bone_data_set_scale_y).apply(null,arguments)};a._spine_bone_data_get_shear_x=function(){return(a._spine_bone_data_get_shear_x=a.asm.spine_bone_data_get_shear_x).apply(null,arguments)};a._spine_bone_data_set_shear_x=function(){return(a._spine_bone_data_set_shear_x=a.asm.spine_bone_data_set_shear_x).apply(null,arguments)};
|
||||
a._spine_bone_data_get_shear_y=function(){return(a._spine_bone_data_get_shear_y=a.asm.spine_bone_data_get_shear_y).apply(null,arguments)};a._spine_bone_data_set_shear_y=function(){return(a._spine_bone_data_set_shear_y=a.asm.spine_bone_data_set_shear_y).apply(null,arguments)};a._spine_bone_data_get_inherit=function(){return(a._spine_bone_data_get_inherit=a.asm.spine_bone_data_get_inherit).apply(null,arguments)};
|
||||
a._spine_bone_data_set_inherit=function(){return(a._spine_bone_data_set_inherit=a.asm.spine_bone_data_set_inherit).apply(null,arguments)};a._spine_bone_data_get_is_skin_required=function(){return(a._spine_bone_data_get_is_skin_required=a.asm.spine_bone_data_get_is_skin_required).apply(null,arguments)};a._spine_bone_data_set_is_skin_required=function(){return(a._spine_bone_data_set_is_skin_required=a.asm.spine_bone_data_set_is_skin_required).apply(null,arguments)};
|
||||
a._spine_bone_data_get_color=function(){return(a._spine_bone_data_get_color=a.asm.spine_bone_data_get_color).apply(null,arguments)};a._spine_bone_data_set_color=function(){return(a._spine_bone_data_set_color=a.asm.spine_bone_data_set_color).apply(null,arguments)};a._spine_bone_data_is_visible=function(){return(a._spine_bone_data_is_visible=a.asm.spine_bone_data_is_visible).apply(null,arguments)};
|
||||
a._spine_bone_data_set_visible=function(){return(a._spine_bone_data_set_visible=a.asm.spine_bone_data_set_visible).apply(null,arguments)};a._spine_bone_set_is_y_down=function(){return(a._spine_bone_set_is_y_down=a.asm.spine_bone_set_is_y_down).apply(null,arguments)};a._spine_bone_get_is_y_down=function(){return(a._spine_bone_get_is_y_down=a.asm.spine_bone_get_is_y_down).apply(null,arguments)};a._spine_bone_update=function(){return(a._spine_bone_update=a.asm.spine_bone_update).apply(null,arguments)};
|
||||
a._spine_bone_update_world_transform=function(){return(a._spine_bone_update_world_transform=a.asm.spine_bone_update_world_transform).apply(null,arguments)};a._spine_bone_update_world_transform_with=function(){return(a._spine_bone_update_world_transform_with=a.asm.spine_bone_update_world_transform_with).apply(null,arguments)};a._spine_bone_update_applied_transform=function(){return(a._spine_bone_update_applied_transform=a.asm.spine_bone_update_applied_transform).apply(null,arguments)};
|
||||
a._spine_bone_set_to_setup_pose=function(){return(a._spine_bone_set_to_setup_pose=a.asm.spine_bone_set_to_setup_pose).apply(null,arguments)};a._spine_bone_world_to_local=function(){return(a._spine_bone_world_to_local=a.asm.spine_bone_world_to_local).apply(null,arguments)};a._spine_bone_world_to_parent=function(){return(a._spine_bone_world_to_parent=a.asm.spine_bone_world_to_parent).apply(null,arguments)};
|
||||
a._spine_bone_local_to_world=function(){return(a._spine_bone_local_to_world=a.asm.spine_bone_local_to_world).apply(null,arguments)};a._spine_bone_parent_to_world=function(){return(a._spine_bone_parent_to_world=a.asm.spine_bone_parent_to_world).apply(null,arguments)};a._spine_bone_world_to_local_rotation=function(){return(a._spine_bone_world_to_local_rotation=a.asm.spine_bone_world_to_local_rotation).apply(null,arguments)};
|
||||
a._spine_bone_local_to_world_rotation=function(){return(a._spine_bone_local_to_world_rotation=a.asm.spine_bone_local_to_world_rotation).apply(null,arguments)};a._spine_bone_rotate_world=function(){return(a._spine_bone_rotate_world=a.asm.spine_bone_rotate_world).apply(null,arguments)};a._spine_bone_get_world_to_local_rotation_x=function(){return(a._spine_bone_get_world_to_local_rotation_x=a.asm.spine_bone_get_world_to_local_rotation_x).apply(null,arguments)};
|
||||
a._spine_bone_get_world_to_local_rotation_y=function(){return(a._spine_bone_get_world_to_local_rotation_y=a.asm.spine_bone_get_world_to_local_rotation_y).apply(null,arguments)};a._spine_bone_get_data=function(){return(a._spine_bone_get_data=a.asm.spine_bone_get_data).apply(null,arguments)};a._spine_bone_get_skeleton=function(){return(a._spine_bone_get_skeleton=a.asm.spine_bone_get_skeleton).apply(null,arguments)};
|
||||
a._spine_bone_get_parent=function(){return(a._spine_bone_get_parent=a.asm.spine_bone_get_parent).apply(null,arguments)};a._spine_bone_get_num_children=function(){return(a._spine_bone_get_num_children=a.asm.spine_bone_get_num_children).apply(null,arguments)};a._spine_bone_get_children=function(){return(a._spine_bone_get_children=a.asm.spine_bone_get_children).apply(null,arguments)};a._spine_bone_get_x=function(){return(a._spine_bone_get_x=a.asm.spine_bone_get_x).apply(null,arguments)};
|
||||
a._spine_bone_set_x=function(){return(a._spine_bone_set_x=a.asm.spine_bone_set_x).apply(null,arguments)};a._spine_bone_get_y=function(){return(a._spine_bone_get_y=a.asm.spine_bone_get_y).apply(null,arguments)};a._spine_bone_set_y=function(){return(a._spine_bone_set_y=a.asm.spine_bone_set_y).apply(null,arguments)};a._spine_bone_get_rotation=function(){return(a._spine_bone_get_rotation=a.asm.spine_bone_get_rotation).apply(null,arguments)};
|
||||
a._spine_bone_set_rotation=function(){return(a._spine_bone_set_rotation=a.asm.spine_bone_set_rotation).apply(null,arguments)};a._spine_bone_get_scale_x=function(){return(a._spine_bone_get_scale_x=a.asm.spine_bone_get_scale_x).apply(null,arguments)};a._spine_bone_set_scale_x=function(){return(a._spine_bone_set_scale_x=a.asm.spine_bone_set_scale_x).apply(null,arguments)};a._spine_bone_get_scale_y=function(){return(a._spine_bone_get_scale_y=a.asm.spine_bone_get_scale_y).apply(null,arguments)};
|
||||
a._spine_bone_set_scale_y=function(){return(a._spine_bone_set_scale_y=a.asm.spine_bone_set_scale_y).apply(null,arguments)};a._spine_bone_get_shear_x=function(){return(a._spine_bone_get_shear_x=a.asm.spine_bone_get_shear_x).apply(null,arguments)};a._spine_bone_set_shear_x=function(){return(a._spine_bone_set_shear_x=a.asm.spine_bone_set_shear_x).apply(null,arguments)};a._spine_bone_get_shear_y=function(){return(a._spine_bone_get_shear_y=a.asm.spine_bone_get_shear_y).apply(null,arguments)};
|
||||
a._spine_bone_set_shear_y=function(){return(a._spine_bone_set_shear_y=a.asm.spine_bone_set_shear_y).apply(null,arguments)};a._spine_bone_get_applied_rotation=function(){return(a._spine_bone_get_applied_rotation=a.asm.spine_bone_get_applied_rotation).apply(null,arguments)};a._spine_bone_set_applied_rotation=function(){return(a._spine_bone_set_applied_rotation=a.asm.spine_bone_set_applied_rotation).apply(null,arguments)};
|
||||
a._spine_bone_get_a_x=function(){return(a._spine_bone_get_a_x=a.asm.spine_bone_get_a_x).apply(null,arguments)};a._spine_bone_set_a_x=function(){return(a._spine_bone_set_a_x=a.asm.spine_bone_set_a_x).apply(null,arguments)};a._spine_bone_get_a_y=function(){return(a._spine_bone_get_a_y=a.asm.spine_bone_get_a_y).apply(null,arguments)};a._spine_bone_set_a_y=function(){return(a._spine_bone_set_a_y=a.asm.spine_bone_set_a_y).apply(null,arguments)};
|
||||
a._spine_bone_get_a_scale_x=function(){return(a._spine_bone_get_a_scale_x=a.asm.spine_bone_get_a_scale_x).apply(null,arguments)};a._spine_bone_set_a_scale_x=function(){return(a._spine_bone_set_a_scale_x=a.asm.spine_bone_set_a_scale_x).apply(null,arguments)};a._spine_bone_get_a_scale_y=function(){return(a._spine_bone_get_a_scale_y=a.asm.spine_bone_get_a_scale_y).apply(null,arguments)};
|
||||
a._spine_bone_set_a_scale_y=function(){return(a._spine_bone_set_a_scale_y=a.asm.spine_bone_set_a_scale_y).apply(null,arguments)};a._spine_bone_get_a_shear_x=function(){return(a._spine_bone_get_a_shear_x=a.asm.spine_bone_get_a_shear_x).apply(null,arguments)};a._spine_bone_set_a_shear_x=function(){return(a._spine_bone_set_a_shear_x=a.asm.spine_bone_set_a_shear_x).apply(null,arguments)};
|
||||
a._spine_bone_get_a_shear_y=function(){return(a._spine_bone_get_a_shear_y=a.asm.spine_bone_get_a_shear_y).apply(null,arguments)};a._spine_bone_set_a_shear_y=function(){return(a._spine_bone_set_a_shear_y=a.asm.spine_bone_set_a_shear_y).apply(null,arguments)};a._spine_bone_get_a=function(){return(a._spine_bone_get_a=a.asm.spine_bone_get_a).apply(null,arguments)};a._spine_bone_set_a=function(){return(a._spine_bone_set_a=a.asm.spine_bone_set_a).apply(null,arguments)};
|
||||
a._spine_bone_get_b=function(){return(a._spine_bone_get_b=a.asm.spine_bone_get_b).apply(null,arguments)};a._spine_bone_set_b=function(){return(a._spine_bone_set_b=a.asm.spine_bone_set_b).apply(null,arguments)};a._spine_bone_get_c=function(){return(a._spine_bone_get_c=a.asm.spine_bone_get_c).apply(null,arguments)};a._spine_bone_set_c=function(){return(a._spine_bone_set_c=a.asm.spine_bone_set_c).apply(null,arguments)};
|
||||
a._spine_bone_get_d=function(){return(a._spine_bone_get_d=a.asm.spine_bone_get_d).apply(null,arguments)};a._spine_bone_set_d=function(){return(a._spine_bone_set_d=a.asm.spine_bone_set_d).apply(null,arguments)};a._spine_bone_get_world_x=function(){return(a._spine_bone_get_world_x=a.asm.spine_bone_get_world_x).apply(null,arguments)};a._spine_bone_set_world_x=function(){return(a._spine_bone_set_world_x=a.asm.spine_bone_set_world_x).apply(null,arguments)};
|
||||
a._spine_bone_get_world_y=function(){return(a._spine_bone_get_world_y=a.asm.spine_bone_get_world_y).apply(null,arguments)};a._spine_bone_set_world_y=function(){return(a._spine_bone_set_world_y=a.asm.spine_bone_set_world_y).apply(null,arguments)};a._spine_bone_get_world_rotation_x=function(){return(a._spine_bone_get_world_rotation_x=a.asm.spine_bone_get_world_rotation_x).apply(null,arguments)};
|
||||
a._spine_bone_get_world_rotation_y=function(){return(a._spine_bone_get_world_rotation_y=a.asm.spine_bone_get_world_rotation_y).apply(null,arguments)};a._spine_bone_get_world_scale_x=function(){return(a._spine_bone_get_world_scale_x=a.asm.spine_bone_get_world_scale_x).apply(null,arguments)};a._spine_bone_get_world_scale_y=function(){return(a._spine_bone_get_world_scale_y=a.asm.spine_bone_get_world_scale_y).apply(null,arguments)};
|
||||
a._spine_bone_get_is_active=function(){return(a._spine_bone_get_is_active=a.asm.spine_bone_get_is_active).apply(null,arguments)};a._spine_bone_set_is_active=function(){return(a._spine_bone_set_is_active=a.asm.spine_bone_set_is_active).apply(null,arguments)};a._spine_bone_get_inherit=function(){return(a._spine_bone_get_inherit=a.asm.spine_bone_get_inherit).apply(null,arguments)};a._spine_bone_set_inherit=function(){return(a._spine_bone_set_inherit=a.asm.spine_bone_set_inherit).apply(null,arguments)};
|
||||
a._spine_attachment_get_name=function(){return(a._spine_attachment_get_name=a.asm.spine_attachment_get_name).apply(null,arguments)};a._spine_attachment_get_type=function(){return(a._spine_attachment_get_type=a.asm.spine_attachment_get_type).apply(null,arguments)};a._spine_attachment_copy=function(){return(a._spine_attachment_copy=a.asm.spine_attachment_copy).apply(null,arguments)};
|
||||
a._spine_attachment_cast_to_bounding_box_attachment=function(){return(a._spine_attachment_cast_to_bounding_box_attachment=a.asm.spine_attachment_cast_to_bounding_box_attachment).apply(null,arguments)};a._spine_attachment_dispose=function(){return(a._spine_attachment_dispose=a.asm.spine_attachment_dispose).apply(null,arguments)};
|
||||
a._spine_point_attachment_compute_world_position=function(){return(a._spine_point_attachment_compute_world_position=a.asm.spine_point_attachment_compute_world_position).apply(null,arguments)};a._spine_point_attachment_compute_world_rotation=function(){return(a._spine_point_attachment_compute_world_rotation=a.asm.spine_point_attachment_compute_world_rotation).apply(null,arguments)};
|
||||
a._spine_point_attachment_get_x=function(){return(a._spine_point_attachment_get_x=a.asm.spine_point_attachment_get_x).apply(null,arguments)};a._spine_point_attachment_set_x=function(){return(a._spine_point_attachment_set_x=a.asm.spine_point_attachment_set_x).apply(null,arguments)};a._spine_point_attachment_get_y=function(){return(a._spine_point_attachment_get_y=a.asm.spine_point_attachment_get_y).apply(null,arguments)};
|
||||
a._spine_point_attachment_set_y=function(){return(a._spine_point_attachment_set_y=a.asm.spine_point_attachment_set_y).apply(null,arguments)};a._spine_point_attachment_get_rotation=function(){return(a._spine_point_attachment_get_rotation=a.asm.spine_point_attachment_get_rotation).apply(null,arguments)};a._spine_point_attachment_set_rotation=function(){return(a._spine_point_attachment_set_rotation=a.asm.spine_point_attachment_set_rotation).apply(null,arguments)};
|
||||
a._spine_point_attachment_get_color=function(){return(a._spine_point_attachment_get_color=a.asm.spine_point_attachment_get_color).apply(null,arguments)};a._spine_point_attachment_set_color=function(){return(a._spine_point_attachment_set_color=a.asm.spine_point_attachment_set_color).apply(null,arguments)};a._spine_region_attachment_update_region=function(){return(a._spine_region_attachment_update_region=a.asm.spine_region_attachment_update_region).apply(null,arguments)};
|
||||
a._spine_region_attachment_compute_world_vertices=function(){return(a._spine_region_attachment_compute_world_vertices=a.asm.spine_region_attachment_compute_world_vertices).apply(null,arguments)};a._spine_region_attachment_get_x=function(){return(a._spine_region_attachment_get_x=a.asm.spine_region_attachment_get_x).apply(null,arguments)};a._spine_region_attachment_set_x=function(){return(a._spine_region_attachment_set_x=a.asm.spine_region_attachment_set_x).apply(null,arguments)};
|
||||
a._spine_region_attachment_get_y=function(){return(a._spine_region_attachment_get_y=a.asm.spine_region_attachment_get_y).apply(null,arguments)};a._spine_region_attachment_set_y=function(){return(a._spine_region_attachment_set_y=a.asm.spine_region_attachment_set_y).apply(null,arguments)};a._spine_region_attachment_get_rotation=function(){return(a._spine_region_attachment_get_rotation=a.asm.spine_region_attachment_get_rotation).apply(null,arguments)};
|
||||
a._spine_region_attachment_set_rotation=function(){return(a._spine_region_attachment_set_rotation=a.asm.spine_region_attachment_set_rotation).apply(null,arguments)};a._spine_region_attachment_get_scale_x=function(){return(a._spine_region_attachment_get_scale_x=a.asm.spine_region_attachment_get_scale_x).apply(null,arguments)};a._spine_region_attachment_set_scale_x=function(){return(a._spine_region_attachment_set_scale_x=a.asm.spine_region_attachment_set_scale_x).apply(null,arguments)};
|
||||
a._spine_region_attachment_get_scale_y=function(){return(a._spine_region_attachment_get_scale_y=a.asm.spine_region_attachment_get_scale_y).apply(null,arguments)};a._spine_region_attachment_set_scale_y=function(){return(a._spine_region_attachment_set_scale_y=a.asm.spine_region_attachment_set_scale_y).apply(null,arguments)};a._spine_region_attachment_get_width=function(){return(a._spine_region_attachment_get_width=a.asm.spine_region_attachment_get_width).apply(null,arguments)};
|
||||
a._spine_region_attachment_set_width=function(){return(a._spine_region_attachment_set_width=a.asm.spine_region_attachment_set_width).apply(null,arguments)};a._spine_region_attachment_get_height=function(){return(a._spine_region_attachment_get_height=a.asm.spine_region_attachment_get_height).apply(null,arguments)};a._spine_region_attachment_set_height=function(){return(a._spine_region_attachment_set_height=a.asm.spine_region_attachment_set_height).apply(null,arguments)};
|
||||
a._spine_region_attachment_get_color=function(){return(a._spine_region_attachment_get_color=a.asm.spine_region_attachment_get_color).apply(null,arguments)};a._spine_region_attachment_set_color=function(){return(a._spine_region_attachment_set_color=a.asm.spine_region_attachment_set_color).apply(null,arguments)};a._spine_region_attachment_get_path=function(){return(a._spine_region_attachment_get_path=a.asm.spine_region_attachment_get_path).apply(null,arguments)};
|
||||
a._spine_region_attachment_get_region=function(){return(a._spine_region_attachment_get_region=a.asm.spine_region_attachment_get_region).apply(null,arguments)};a._spine_region_attachment_get_sequence=function(){return(a._spine_region_attachment_get_sequence=a.asm.spine_region_attachment_get_sequence).apply(null,arguments)};a._spine_region_attachment_get_num_offset=function(){return(a._spine_region_attachment_get_num_offset=a.asm.spine_region_attachment_get_num_offset).apply(null,arguments)};
|
||||
a._spine_region_attachment_get_offset=function(){return(a._spine_region_attachment_get_offset=a.asm.spine_region_attachment_get_offset).apply(null,arguments)};a._spine_region_attachment_get_num_uvs=function(){return(a._spine_region_attachment_get_num_uvs=a.asm.spine_region_attachment_get_num_uvs).apply(null,arguments)};a._spine_region_attachment_get_uvs=function(){return(a._spine_region_attachment_get_uvs=a.asm.spine_region_attachment_get_uvs).apply(null,arguments)};
|
||||
a._spine_vertex_attachment_get_world_vertices_length=function(){return(a._spine_vertex_attachment_get_world_vertices_length=a.asm.spine_vertex_attachment_get_world_vertices_length).apply(null,arguments)};a._spine_vertex_attachment_compute_world_vertices=function(){return(a._spine_vertex_attachment_compute_world_vertices=a.asm.spine_vertex_attachment_compute_world_vertices).apply(null,arguments)};
|
||||
a._spine_vertex_attachment_get_num_bones=function(){return(a._spine_vertex_attachment_get_num_bones=a.asm.spine_vertex_attachment_get_num_bones).apply(null,arguments)};a._spine_vertex_attachment_get_bones=function(){return(a._spine_vertex_attachment_get_bones=a.asm.spine_vertex_attachment_get_bones).apply(null,arguments)};a._spine_vertex_attachment_get_num_vertices=function(){return(a._spine_vertex_attachment_get_num_vertices=a.asm.spine_vertex_attachment_get_num_vertices).apply(null,arguments)};
|
||||
a._spine_vertex_attachment_get_vertices=function(){return(a._spine_vertex_attachment_get_vertices=a.asm.spine_vertex_attachment_get_vertices).apply(null,arguments)};a._spine_vertex_attachment_get_timeline_attachment=function(){return(a._spine_vertex_attachment_get_timeline_attachment=a.asm.spine_vertex_attachment_get_timeline_attachment).apply(null,arguments)};
|
||||
a._spine_vertex_attachment_set_timeline_attachment=function(){return(a._spine_vertex_attachment_set_timeline_attachment=a.asm.spine_vertex_attachment_set_timeline_attachment).apply(null,arguments)};a._spine_mesh_attachment_update_region=function(){return(a._spine_mesh_attachment_update_region=a.asm.spine_mesh_attachment_update_region).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_get_hull_length=function(){return(a._spine_mesh_attachment_get_hull_length=a.asm.spine_mesh_attachment_get_hull_length).apply(null,arguments)};a._spine_mesh_attachment_set_hull_length=function(){return(a._spine_mesh_attachment_set_hull_length=a.asm.spine_mesh_attachment_set_hull_length).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_get_num_region_uvs=function(){return(a._spine_mesh_attachment_get_num_region_uvs=a.asm.spine_mesh_attachment_get_num_region_uvs).apply(null,arguments)};a._spine_mesh_attachment_get_region_uvs=function(){return(a._spine_mesh_attachment_get_region_uvs=a.asm.spine_mesh_attachment_get_region_uvs).apply(null,arguments)};a._spine_mesh_attachment_get_num_uvs=function(){return(a._spine_mesh_attachment_get_num_uvs=a.asm.spine_mesh_attachment_get_num_uvs).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_get_uvs=function(){return(a._spine_mesh_attachment_get_uvs=a.asm.spine_mesh_attachment_get_uvs).apply(null,arguments)};a._spine_mesh_attachment_get_num_triangles=function(){return(a._spine_mesh_attachment_get_num_triangles=a.asm.spine_mesh_attachment_get_num_triangles).apply(null,arguments)};a._spine_mesh_attachment_get_triangles=function(){return(a._spine_mesh_attachment_get_triangles=a.asm.spine_mesh_attachment_get_triangles).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_get_color=function(){return(a._spine_mesh_attachment_get_color=a.asm.spine_mesh_attachment_get_color).apply(null,arguments)};a._spine_mesh_attachment_set_color=function(){return(a._spine_mesh_attachment_set_color=a.asm.spine_mesh_attachment_set_color).apply(null,arguments)};a._spine_mesh_attachment_get_path=function(){return(a._spine_mesh_attachment_get_path=a.asm.spine_mesh_attachment_get_path).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_get_region=function(){return(a._spine_mesh_attachment_get_region=a.asm.spine_mesh_attachment_get_region).apply(null,arguments)};a._spine_mesh_attachment_get_sequence=function(){return(a._spine_mesh_attachment_get_sequence=a.asm.spine_mesh_attachment_get_sequence).apply(null,arguments)};a._spine_mesh_attachment_get_parent_mesh=function(){return(a._spine_mesh_attachment_get_parent_mesh=a.asm.spine_mesh_attachment_get_parent_mesh).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_set_parent_mesh=function(){return(a._spine_mesh_attachment_set_parent_mesh=a.asm.spine_mesh_attachment_set_parent_mesh).apply(null,arguments)};a._spine_mesh_attachment_get_num_edges=function(){return(a._spine_mesh_attachment_get_num_edges=a.asm.spine_mesh_attachment_get_num_edges).apply(null,arguments)};a._spine_mesh_attachment_get_edges=function(){return(a._spine_mesh_attachment_get_edges=a.asm.spine_mesh_attachment_get_edges).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_get_width=function(){return(a._spine_mesh_attachment_get_width=a.asm.spine_mesh_attachment_get_width).apply(null,arguments)};a._spine_mesh_attachment_set_width=function(){return(a._spine_mesh_attachment_set_width=a.asm.spine_mesh_attachment_set_width).apply(null,arguments)};a._spine_mesh_attachment_get_height=function(){return(a._spine_mesh_attachment_get_height=a.asm.spine_mesh_attachment_get_height).apply(null,arguments)};
|
||||
a._spine_mesh_attachment_set_height=function(){return(a._spine_mesh_attachment_set_height=a.asm.spine_mesh_attachment_set_height).apply(null,arguments)};a._spine_clipping_attachment_get_end_slot=function(){return(a._spine_clipping_attachment_get_end_slot=a.asm.spine_clipping_attachment_get_end_slot).apply(null,arguments)};a._spine_clipping_attachment_set_end_slot=function(){return(a._spine_clipping_attachment_set_end_slot=a.asm.spine_clipping_attachment_set_end_slot).apply(null,arguments)};
|
||||
a._spine_clipping_attachment_get_color=function(){return(a._spine_clipping_attachment_get_color=a.asm.spine_clipping_attachment_get_color).apply(null,arguments)};a._spine_clipping_attachment_set_color=function(){return(a._spine_clipping_attachment_set_color=a.asm.spine_clipping_attachment_set_color).apply(null,arguments)};a._spine_bounding_box_attachment_get_color=function(){return(a._spine_bounding_box_attachment_get_color=a.asm.spine_bounding_box_attachment_get_color).apply(null,arguments)};
|
||||
a._spine_bounding_box_attachment_set_color=function(){return(a._spine_bounding_box_attachment_set_color=a.asm.spine_bounding_box_attachment_set_color).apply(null,arguments)};a._spine_path_attachment_get_num_lengths=function(){return(a._spine_path_attachment_get_num_lengths=a.asm.spine_path_attachment_get_num_lengths).apply(null,arguments)};a._spine_path_attachment_get_lengths=function(){return(a._spine_path_attachment_get_lengths=a.asm.spine_path_attachment_get_lengths).apply(null,arguments)};
|
||||
a._spine_path_attachment_get_is_closed=function(){return(a._spine_path_attachment_get_is_closed=a.asm.spine_path_attachment_get_is_closed).apply(null,arguments)};a._spine_path_attachment_set_is_closed=function(){return(a._spine_path_attachment_set_is_closed=a.asm.spine_path_attachment_set_is_closed).apply(null,arguments)};a._spine_path_attachment_get_is_constant_speed=function(){return(a._spine_path_attachment_get_is_constant_speed=a.asm.spine_path_attachment_get_is_constant_speed).apply(null,arguments)};
|
||||
a._spine_path_attachment_set_is_constant_speed=function(){return(a._spine_path_attachment_set_is_constant_speed=a.asm.spine_path_attachment_set_is_constant_speed).apply(null,arguments)};a._spine_path_attachment_get_color=function(){return(a._spine_path_attachment_get_color=a.asm.spine_path_attachment_get_color).apply(null,arguments)};a._spine_path_attachment_set_color=function(){return(a._spine_path_attachment_set_color=a.asm.spine_path_attachment_set_color).apply(null,arguments)};
|
||||
a._spine_skin_set_attachment=function(){return(a._spine_skin_set_attachment=a.asm.spine_skin_set_attachment).apply(null,arguments)};a._spine_skin_get_attachment=function(){return(a._spine_skin_get_attachment=a.asm.spine_skin_get_attachment).apply(null,arguments)};a._spine_skin_remove_attachment=function(){return(a._spine_skin_remove_attachment=a.asm.spine_skin_remove_attachment).apply(null,arguments)};
|
||||
a._spine_skin_get_name=function(){return(a._spine_skin_get_name=a.asm.spine_skin_get_name).apply(null,arguments)};a._spine_skin_add_skin=function(){return(a._spine_skin_add_skin=a.asm.spine_skin_add_skin).apply(null,arguments)};a._spine_skin_copy_skin=function(){return(a._spine_skin_copy_skin=a.asm.spine_skin_copy_skin).apply(null,arguments)};a._spine_skin_get_entries=function(){return(a._spine_skin_get_entries=a.asm.spine_skin_get_entries).apply(null,arguments)};
|
||||
a._spine_skin_entries_get_num_entries=function(){return(a._spine_skin_entries_get_num_entries=a.asm.spine_skin_entries_get_num_entries).apply(null,arguments)};a._spine_skin_entries_get_entry=function(){return(a._spine_skin_entries_get_entry=a.asm.spine_skin_entries_get_entry).apply(null,arguments)};a._spine_skin_entries_dispose=function(){return(a._spine_skin_entries_dispose=a.asm.spine_skin_entries_dispose).apply(null,arguments)};
|
||||
a._spine_skin_entry_get_slot_index=function(){return(a._spine_skin_entry_get_slot_index=a.asm.spine_skin_entry_get_slot_index).apply(null,arguments)};a._spine_skin_entry_get_name=function(){return(a._spine_skin_entry_get_name=a.asm.spine_skin_entry_get_name).apply(null,arguments)};a._spine_skin_entry_get_attachment=function(){return(a._spine_skin_entry_get_attachment=a.asm.spine_skin_entry_get_attachment).apply(null,arguments)};
|
||||
a._spine_skin_get_num_bones=function(){return(a._spine_skin_get_num_bones=a.asm.spine_skin_get_num_bones).apply(null,arguments)};a._spine_skin_get_bones=function(){return(a._spine_skin_get_bones=a.asm.spine_skin_get_bones).apply(null,arguments)};a._spine_skin_get_num_constraints=function(){return(a._spine_skin_get_num_constraints=a.asm.spine_skin_get_num_constraints).apply(null,arguments)};
|
||||
a._spine_skin_get_constraints=function(){return(a._spine_skin_get_constraints=a.asm.spine_skin_get_constraints).apply(null,arguments)};a._spine_skin_create=function(){return(a._spine_skin_create=a.asm.spine_skin_create).apply(null,arguments)};a._spine_skin_dispose=function(){return(a._spine_skin_dispose=a.asm.spine_skin_dispose).apply(null,arguments)};a._spine_constraint_data_get_type=function(){return(a._spine_constraint_data_get_type=a.asm.spine_constraint_data_get_type).apply(null,arguments)};
|
||||
a._spine_constraint_data_get_name=function(){return(a._spine_constraint_data_get_name=a.asm.spine_constraint_data_get_name).apply(null,arguments)};a._spine_constraint_data_get_order=function(){return(a._spine_constraint_data_get_order=a.asm.spine_constraint_data_get_order).apply(null,arguments)};a._spine_constraint_data_set_order=function(){return(a._spine_constraint_data_set_order=a.asm.spine_constraint_data_set_order).apply(null,arguments)};
|
||||
a._spine_constraint_data_get_is_skin_required=function(){return(a._spine_constraint_data_get_is_skin_required=a.asm.spine_constraint_data_get_is_skin_required).apply(null,arguments)};a._spine_constraint_data_set_is_skin_required=function(){return(a._spine_constraint_data_set_is_skin_required=a.asm.spine_constraint_data_set_is_skin_required).apply(null,arguments)};
|
||||
a._spine_ik_constraint_data_get_num_bones=function(){return(a._spine_ik_constraint_data_get_num_bones=a.asm.spine_ik_constraint_data_get_num_bones).apply(null,arguments)};a._spine_ik_constraint_data_get_bones=function(){return(a._spine_ik_constraint_data_get_bones=a.asm.spine_ik_constraint_data_get_bones).apply(null,arguments)};a._spine_ik_constraint_data_get_target=function(){return(a._spine_ik_constraint_data_get_target=a.asm.spine_ik_constraint_data_get_target).apply(null,arguments)};
|
||||
a._spine_ik_constraint_data_set_target=function(){return(a._spine_ik_constraint_data_set_target=a.asm.spine_ik_constraint_data_set_target).apply(null,arguments)};a._spine_ik_constraint_data_get_bend_direction=function(){return(a._spine_ik_constraint_data_get_bend_direction=a.asm.spine_ik_constraint_data_get_bend_direction).apply(null,arguments)};
|
||||
a._spine_ik_constraint_data_set_bend_direction=function(){return(a._spine_ik_constraint_data_set_bend_direction=a.asm.spine_ik_constraint_data_set_bend_direction).apply(null,arguments)};a._spine_ik_constraint_data_get_compress=function(){return(a._spine_ik_constraint_data_get_compress=a.asm.spine_ik_constraint_data_get_compress).apply(null,arguments)};
|
||||
a._spine_ik_constraint_data_set_compress=function(){return(a._spine_ik_constraint_data_set_compress=a.asm.spine_ik_constraint_data_set_compress).apply(null,arguments)};a._spine_ik_constraint_data_get_stretch=function(){return(a._spine_ik_constraint_data_get_stretch=a.asm.spine_ik_constraint_data_get_stretch).apply(null,arguments)};a._spine_ik_constraint_data_set_stretch=function(){return(a._spine_ik_constraint_data_set_stretch=a.asm.spine_ik_constraint_data_set_stretch).apply(null,arguments)};
|
||||
a._spine_ik_constraint_data_get_uniform=function(){return(a._spine_ik_constraint_data_get_uniform=a.asm.spine_ik_constraint_data_get_uniform).apply(null,arguments)};a._spine_ik_constraint_data_set_uniform=function(){return(a._spine_ik_constraint_data_set_uniform=a.asm.spine_ik_constraint_data_set_uniform).apply(null,arguments)};a._spine_ik_constraint_data_get_mix=function(){return(a._spine_ik_constraint_data_get_mix=a.asm.spine_ik_constraint_data_get_mix).apply(null,arguments)};
|
||||
a._spine_ik_constraint_data_set_mix=function(){return(a._spine_ik_constraint_data_set_mix=a.asm.spine_ik_constraint_data_set_mix).apply(null,arguments)};a._spine_ik_constraint_data_get_softness=function(){return(a._spine_ik_constraint_data_get_softness=a.asm.spine_ik_constraint_data_get_softness).apply(null,arguments)};a._spine_ik_constraint_data_set_softness=function(){return(a._spine_ik_constraint_data_set_softness=a.asm.spine_ik_constraint_data_set_softness).apply(null,arguments)};
|
||||
a._spine_ik_constraint_update=function(){return(a._spine_ik_constraint_update=a.asm.spine_ik_constraint_update).apply(null,arguments)};a._spine_ik_constraint_get_order=function(){return(a._spine_ik_constraint_get_order=a.asm.spine_ik_constraint_get_order).apply(null,arguments)};a._spine_ik_constraint_get_data=function(){return(a._spine_ik_constraint_get_data=a.asm.spine_ik_constraint_get_data).apply(null,arguments)};
|
||||
a._spine_ik_constraint_get_num_bones=function(){return(a._spine_ik_constraint_get_num_bones=a.asm.spine_ik_constraint_get_num_bones).apply(null,arguments)};a._spine_ik_constraint_get_bones=function(){return(a._spine_ik_constraint_get_bones=a.asm.spine_ik_constraint_get_bones).apply(null,arguments)};a._spine_ik_constraint_get_target=function(){return(a._spine_ik_constraint_get_target=a.asm.spine_ik_constraint_get_target).apply(null,arguments)};
|
||||
a._spine_ik_constraint_set_target=function(){return(a._spine_ik_constraint_set_target=a.asm.spine_ik_constraint_set_target).apply(null,arguments)};a._spine_ik_constraint_get_bend_direction=function(){return(a._spine_ik_constraint_get_bend_direction=a.asm.spine_ik_constraint_get_bend_direction).apply(null,arguments)};a._spine_ik_constraint_set_bend_direction=function(){return(a._spine_ik_constraint_set_bend_direction=a.asm.spine_ik_constraint_set_bend_direction).apply(null,arguments)};
|
||||
a._spine_ik_constraint_get_compress=function(){return(a._spine_ik_constraint_get_compress=a.asm.spine_ik_constraint_get_compress).apply(null,arguments)};a._spine_ik_constraint_set_compress=function(){return(a._spine_ik_constraint_set_compress=a.asm.spine_ik_constraint_set_compress).apply(null,arguments)};a._spine_ik_constraint_get_stretch=function(){return(a._spine_ik_constraint_get_stretch=a.asm.spine_ik_constraint_get_stretch).apply(null,arguments)};
|
||||
a._spine_ik_constraint_set_stretch=function(){return(a._spine_ik_constraint_set_stretch=a.asm.spine_ik_constraint_set_stretch).apply(null,arguments)};a._spine_ik_constraint_get_mix=function(){return(a._spine_ik_constraint_get_mix=a.asm.spine_ik_constraint_get_mix).apply(null,arguments)};a._spine_ik_constraint_set_mix=function(){return(a._spine_ik_constraint_set_mix=a.asm.spine_ik_constraint_set_mix).apply(null,arguments)};
|
||||
a._spine_ik_constraint_get_softness=function(){return(a._spine_ik_constraint_get_softness=a.asm.spine_ik_constraint_get_softness).apply(null,arguments)};a._spine_ik_constraint_set_softness=function(){return(a._spine_ik_constraint_set_softness=a.asm.spine_ik_constraint_set_softness).apply(null,arguments)};a._spine_ik_constraint_get_is_active=function(){return(a._spine_ik_constraint_get_is_active=a.asm.spine_ik_constraint_get_is_active).apply(null,arguments)};
|
||||
a._spine_ik_constraint_set_is_active=function(){return(a._spine_ik_constraint_set_is_active=a.asm.spine_ik_constraint_set_is_active).apply(null,arguments)};a._spine_transform_constraint_data_get_num_bones=function(){return(a._spine_transform_constraint_data_get_num_bones=a.asm.spine_transform_constraint_data_get_num_bones).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_get_bones=function(){return(a._spine_transform_constraint_data_get_bones=a.asm.spine_transform_constraint_data_get_bones).apply(null,arguments)};a._spine_transform_constraint_data_get_target=function(){return(a._spine_transform_constraint_data_get_target=a.asm.spine_transform_constraint_data_get_target).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_target=function(){return(a._spine_transform_constraint_data_set_target=a.asm.spine_transform_constraint_data_set_target).apply(null,arguments)};a._spine_transform_constraint_data_get_mix_rotate=function(){return(a._spine_transform_constraint_data_get_mix_rotate=a.asm.spine_transform_constraint_data_get_mix_rotate).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_mix_rotate=function(){return(a._spine_transform_constraint_data_set_mix_rotate=a.asm.spine_transform_constraint_data_set_mix_rotate).apply(null,arguments)};a._spine_transform_constraint_data_get_mix_x=function(){return(a._spine_transform_constraint_data_get_mix_x=a.asm.spine_transform_constraint_data_get_mix_x).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_mix_x=function(){return(a._spine_transform_constraint_data_set_mix_x=a.asm.spine_transform_constraint_data_set_mix_x).apply(null,arguments)};a._spine_transform_constraint_data_get_mix_y=function(){return(a._spine_transform_constraint_data_get_mix_y=a.asm.spine_transform_constraint_data_get_mix_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_mix_y=function(){return(a._spine_transform_constraint_data_set_mix_y=a.asm.spine_transform_constraint_data_set_mix_y).apply(null,arguments)};a._spine_transform_constraint_data_get_mix_scale_x=function(){return(a._spine_transform_constraint_data_get_mix_scale_x=a.asm.spine_transform_constraint_data_get_mix_scale_x).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_mix_scale_x=function(){return(a._spine_transform_constraint_data_set_mix_scale_x=a.asm.spine_transform_constraint_data_set_mix_scale_x).apply(null,arguments)};a._spine_transform_constraint_data_get_mix_scale_y=function(){return(a._spine_transform_constraint_data_get_mix_scale_y=a.asm.spine_transform_constraint_data_get_mix_scale_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_mix_scale_y=function(){return(a._spine_transform_constraint_data_set_mix_scale_y=a.asm.spine_transform_constraint_data_set_mix_scale_y).apply(null,arguments)};a._spine_transform_constraint_data_get_mix_shear_y=function(){return(a._spine_transform_constraint_data_get_mix_shear_y=a.asm.spine_transform_constraint_data_get_mix_shear_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_mix_shear_y=function(){return(a._spine_transform_constraint_data_set_mix_shear_y=a.asm.spine_transform_constraint_data_set_mix_shear_y).apply(null,arguments)};a._spine_transform_constraint_data_get_offset_rotation=function(){return(a._spine_transform_constraint_data_get_offset_rotation=a.asm.spine_transform_constraint_data_get_offset_rotation).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_offset_rotation=function(){return(a._spine_transform_constraint_data_set_offset_rotation=a.asm.spine_transform_constraint_data_set_offset_rotation).apply(null,arguments)};a._spine_transform_constraint_data_get_offset_x=function(){return(a._spine_transform_constraint_data_get_offset_x=a.asm.spine_transform_constraint_data_get_offset_x).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_offset_x=function(){return(a._spine_transform_constraint_data_set_offset_x=a.asm.spine_transform_constraint_data_set_offset_x).apply(null,arguments)};a._spine_transform_constraint_data_get_offset_y=function(){return(a._spine_transform_constraint_data_get_offset_y=a.asm.spine_transform_constraint_data_get_offset_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_offset_y=function(){return(a._spine_transform_constraint_data_set_offset_y=a.asm.spine_transform_constraint_data_set_offset_y).apply(null,arguments)};a._spine_transform_constraint_data_get_offset_scale_x=function(){return(a._spine_transform_constraint_data_get_offset_scale_x=a.asm.spine_transform_constraint_data_get_offset_scale_x).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_offset_scale_x=function(){return(a._spine_transform_constraint_data_set_offset_scale_x=a.asm.spine_transform_constraint_data_set_offset_scale_x).apply(null,arguments)};a._spine_transform_constraint_data_get_offset_scale_y=function(){return(a._spine_transform_constraint_data_get_offset_scale_y=a.asm.spine_transform_constraint_data_get_offset_scale_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_offset_scale_y=function(){return(a._spine_transform_constraint_data_set_offset_scale_y=a.asm.spine_transform_constraint_data_set_offset_scale_y).apply(null,arguments)};a._spine_transform_constraint_data_get_offset_shear_y=function(){return(a._spine_transform_constraint_data_get_offset_shear_y=a.asm.spine_transform_constraint_data_get_offset_shear_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_offset_shear_y=function(){return(a._spine_transform_constraint_data_set_offset_shear_y=a.asm.spine_transform_constraint_data_set_offset_shear_y).apply(null,arguments)};a._spine_transform_constraint_data_get_is_relative=function(){return(a._spine_transform_constraint_data_get_is_relative=a.asm.spine_transform_constraint_data_get_is_relative).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_is_relative=function(){return(a._spine_transform_constraint_data_set_is_relative=a.asm.spine_transform_constraint_data_set_is_relative).apply(null,arguments)};a._spine_transform_constraint_data_get_is_local=function(){return(a._spine_transform_constraint_data_get_is_local=a.asm.spine_transform_constraint_data_get_is_local).apply(null,arguments)};
|
||||
a._spine_transform_constraint_data_set_is_local=function(){return(a._spine_transform_constraint_data_set_is_local=a.asm.spine_transform_constraint_data_set_is_local).apply(null,arguments)};a._spine_transform_constraint_update=function(){return(a._spine_transform_constraint_update=a.asm.spine_transform_constraint_update).apply(null,arguments)};a._spine_transform_constraint_get_order=function(){return(a._spine_transform_constraint_get_order=a.asm.spine_transform_constraint_get_order).apply(null,arguments)};
|
||||
a._spine_transform_constraint_get_data=function(){return(a._spine_transform_constraint_get_data=a.asm.spine_transform_constraint_get_data).apply(null,arguments)};a._spine_transform_constraint_get_num_bones=function(){return(a._spine_transform_constraint_get_num_bones=a.asm.spine_transform_constraint_get_num_bones).apply(null,arguments)};a._spine_transform_constraint_get_bones=function(){return(a._spine_transform_constraint_get_bones=a.asm.spine_transform_constraint_get_bones).apply(null,arguments)};
|
||||
a._spine_transform_constraint_get_target=function(){return(a._spine_transform_constraint_get_target=a.asm.spine_transform_constraint_get_target).apply(null,arguments)};a._spine_transform_constraint_set_target=function(){return(a._spine_transform_constraint_set_target=a.asm.spine_transform_constraint_set_target).apply(null,arguments)};
|
||||
a._spine_transform_constraint_get_mix_rotate=function(){return(a._spine_transform_constraint_get_mix_rotate=a.asm.spine_transform_constraint_get_mix_rotate).apply(null,arguments)};a._spine_transform_constraint_set_mix_rotate=function(){return(a._spine_transform_constraint_set_mix_rotate=a.asm.spine_transform_constraint_set_mix_rotate).apply(null,arguments)};
|
||||
a._spine_transform_constraint_get_mix_x=function(){return(a._spine_transform_constraint_get_mix_x=a.asm.spine_transform_constraint_get_mix_x).apply(null,arguments)};a._spine_transform_constraint_set_mix_x=function(){return(a._spine_transform_constraint_set_mix_x=a.asm.spine_transform_constraint_set_mix_x).apply(null,arguments)};a._spine_transform_constraint_get_mix_y=function(){return(a._spine_transform_constraint_get_mix_y=a.asm.spine_transform_constraint_get_mix_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_set_mix_y=function(){return(a._spine_transform_constraint_set_mix_y=a.asm.spine_transform_constraint_set_mix_y).apply(null,arguments)};a._spine_transform_constraint_get_mix_scale_x=function(){return(a._spine_transform_constraint_get_mix_scale_x=a.asm.spine_transform_constraint_get_mix_scale_x).apply(null,arguments)};
|
||||
a._spine_transform_constraint_set_mix_scale_x=function(){return(a._spine_transform_constraint_set_mix_scale_x=a.asm.spine_transform_constraint_set_mix_scale_x).apply(null,arguments)};a._spine_transform_constraint_get_mix_scale_y=function(){return(a._spine_transform_constraint_get_mix_scale_y=a.asm.spine_transform_constraint_get_mix_scale_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_set_mix_scale_y=function(){return(a._spine_transform_constraint_set_mix_scale_y=a.asm.spine_transform_constraint_set_mix_scale_y).apply(null,arguments)};a._spine_transform_constraint_get_mix_shear_y=function(){return(a._spine_transform_constraint_get_mix_shear_y=a.asm.spine_transform_constraint_get_mix_shear_y).apply(null,arguments)};
|
||||
a._spine_transform_constraint_set_mix_shear_y=function(){return(a._spine_transform_constraint_set_mix_shear_y=a.asm.spine_transform_constraint_set_mix_shear_y).apply(null,arguments)};a._spine_transform_constraint_get_is_active=function(){return(a._spine_transform_constraint_get_is_active=a.asm.spine_transform_constraint_get_is_active).apply(null,arguments)};
|
||||
a._spine_transform_constraint_set_is_active=function(){return(a._spine_transform_constraint_set_is_active=a.asm.spine_transform_constraint_set_is_active).apply(null,arguments)};a._spine_path_constraint_data_get_num_bones=function(){return(a._spine_path_constraint_data_get_num_bones=a.asm.spine_path_constraint_data_get_num_bones).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_bones=function(){return(a._spine_path_constraint_data_get_bones=a.asm.spine_path_constraint_data_get_bones).apply(null,arguments)};a._spine_path_constraint_data_get_target=function(){return(a._spine_path_constraint_data_get_target=a.asm.spine_path_constraint_data_get_target).apply(null,arguments)};a._spine_path_constraint_data_set_target=function(){return(a._spine_path_constraint_data_set_target=a.asm.spine_path_constraint_data_set_target).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_position_mode=function(){return(a._spine_path_constraint_data_get_position_mode=a.asm.spine_path_constraint_data_get_position_mode).apply(null,arguments)};a._spine_path_constraint_data_set_position_mode=function(){return(a._spine_path_constraint_data_set_position_mode=a.asm.spine_path_constraint_data_set_position_mode).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_spacing_mode=function(){return(a._spine_path_constraint_data_get_spacing_mode=a.asm.spine_path_constraint_data_get_spacing_mode).apply(null,arguments)};a._spine_path_constraint_data_set_spacing_mode=function(){return(a._spine_path_constraint_data_set_spacing_mode=a.asm.spine_path_constraint_data_set_spacing_mode).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_rotate_mode=function(){return(a._spine_path_constraint_data_get_rotate_mode=a.asm.spine_path_constraint_data_get_rotate_mode).apply(null,arguments)};a._spine_path_constraint_data_set_rotate_mode=function(){return(a._spine_path_constraint_data_set_rotate_mode=a.asm.spine_path_constraint_data_set_rotate_mode).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_offset_rotation=function(){return(a._spine_path_constraint_data_get_offset_rotation=a.asm.spine_path_constraint_data_get_offset_rotation).apply(null,arguments)};a._spine_path_constraint_data_set_offset_rotation=function(){return(a._spine_path_constraint_data_set_offset_rotation=a.asm.spine_path_constraint_data_set_offset_rotation).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_position=function(){return(a._spine_path_constraint_data_get_position=a.asm.spine_path_constraint_data_get_position).apply(null,arguments)};a._spine_path_constraint_data_set_position=function(){return(a._spine_path_constraint_data_set_position=a.asm.spine_path_constraint_data_set_position).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_spacing=function(){return(a._spine_path_constraint_data_get_spacing=a.asm.spine_path_constraint_data_get_spacing).apply(null,arguments)};a._spine_path_constraint_data_set_spacing=function(){return(a._spine_path_constraint_data_set_spacing=a.asm.spine_path_constraint_data_set_spacing).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_mix_rotate=function(){return(a._spine_path_constraint_data_get_mix_rotate=a.asm.spine_path_constraint_data_get_mix_rotate).apply(null,arguments)};a._spine_path_constraint_data_set_mix_rotate=function(){return(a._spine_path_constraint_data_set_mix_rotate=a.asm.spine_path_constraint_data_set_mix_rotate).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_get_mix_x=function(){return(a._spine_path_constraint_data_get_mix_x=a.asm.spine_path_constraint_data_get_mix_x).apply(null,arguments)};a._spine_path_constraint_data_set_mix_x=function(){return(a._spine_path_constraint_data_set_mix_x=a.asm.spine_path_constraint_data_set_mix_x).apply(null,arguments)};a._spine_path_constraint_data_get_mix_y=function(){return(a._spine_path_constraint_data_get_mix_y=a.asm.spine_path_constraint_data_get_mix_y).apply(null,arguments)};
|
||||
a._spine_path_constraint_data_set_mix_y=function(){return(a._spine_path_constraint_data_set_mix_y=a.asm.spine_path_constraint_data_set_mix_y).apply(null,arguments)};a._spine_path_constraint_update=function(){return(a._spine_path_constraint_update=a.asm.spine_path_constraint_update).apply(null,arguments)};a._spine_path_constraint_get_order=function(){return(a._spine_path_constraint_get_order=a.asm.spine_path_constraint_get_order).apply(null,arguments)};
|
||||
a._spine_path_constraint_get_data=function(){return(a._spine_path_constraint_get_data=a.asm.spine_path_constraint_get_data).apply(null,arguments)};a._spine_path_constraint_get_num_bones=function(){return(a._spine_path_constraint_get_num_bones=a.asm.spine_path_constraint_get_num_bones).apply(null,arguments)};a._spine_path_constraint_get_bones=function(){return(a._spine_path_constraint_get_bones=a.asm.spine_path_constraint_get_bones).apply(null,arguments)};
|
||||
a._spine_path_constraint_get_target=function(){return(a._spine_path_constraint_get_target=a.asm.spine_path_constraint_get_target).apply(null,arguments)};a._spine_path_constraint_set_target=function(){return(a._spine_path_constraint_set_target=a.asm.spine_path_constraint_set_target).apply(null,arguments)};a._spine_path_constraint_get_position=function(){return(a._spine_path_constraint_get_position=a.asm.spine_path_constraint_get_position).apply(null,arguments)};
|
||||
a._spine_path_constraint_set_position=function(){return(a._spine_path_constraint_set_position=a.asm.spine_path_constraint_set_position).apply(null,arguments)};a._spine_path_constraint_get_spacing=function(){return(a._spine_path_constraint_get_spacing=a.asm.spine_path_constraint_get_spacing).apply(null,arguments)};a._spine_path_constraint_set_spacing=function(){return(a._spine_path_constraint_set_spacing=a.asm.spine_path_constraint_set_spacing).apply(null,arguments)};
|
||||
a._spine_path_constraint_get_mix_rotate=function(){return(a._spine_path_constraint_get_mix_rotate=a.asm.spine_path_constraint_get_mix_rotate).apply(null,arguments)};a._spine_path_constraint_set_mix_rotate=function(){return(a._spine_path_constraint_set_mix_rotate=a.asm.spine_path_constraint_set_mix_rotate).apply(null,arguments)};a._spine_path_constraint_get_mix_x=function(){return(a._spine_path_constraint_get_mix_x=a.asm.spine_path_constraint_get_mix_x).apply(null,arguments)};
|
||||
a._spine_path_constraint_set_mix_x=function(){return(a._spine_path_constraint_set_mix_x=a.asm.spine_path_constraint_set_mix_x).apply(null,arguments)};a._spine_path_constraint_get_mix_y=function(){return(a._spine_path_constraint_get_mix_y=a.asm.spine_path_constraint_get_mix_y).apply(null,arguments)};a._spine_path_constraint_set_mix_y=function(){return(a._spine_path_constraint_set_mix_y=a.asm.spine_path_constraint_set_mix_y).apply(null,arguments)};
|
||||
a._spine_path_constraint_get_is_active=function(){return(a._spine_path_constraint_get_is_active=a.asm.spine_path_constraint_get_is_active).apply(null,arguments)};a._spine_path_constraint_set_is_active=function(){return(a._spine_path_constraint_set_is_active=a.asm.spine_path_constraint_set_is_active).apply(null,arguments)};a._spine_physics_constraint_data_set_bone=function(){return(a._spine_physics_constraint_data_set_bone=a.asm.spine_physics_constraint_data_set_bone).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_bone=function(){return(a._spine_physics_constraint_data_get_bone=a.asm.spine_physics_constraint_data_get_bone).apply(null,arguments)};a._spine_physics_constraint_data_set_x=function(){return(a._spine_physics_constraint_data_set_x=a.asm.spine_physics_constraint_data_set_x).apply(null,arguments)};a._spine_physics_constraint_data_get_x=function(){return(a._spine_physics_constraint_data_get_x=a.asm.spine_physics_constraint_data_get_x).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_set_y=function(){return(a._spine_physics_constraint_data_set_y=a.asm.spine_physics_constraint_data_set_y).apply(null,arguments)};a._spine_physics_constraint_data_get_y=function(){return(a._spine_physics_constraint_data_get_y=a.asm.spine_physics_constraint_data_get_y).apply(null,arguments)};a._spine_physics_constraint_data_set_rotate=function(){return(a._spine_physics_constraint_data_set_rotate=a.asm.spine_physics_constraint_data_set_rotate).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_rotate=function(){return(a._spine_physics_constraint_data_get_rotate=a.asm.spine_physics_constraint_data_get_rotate).apply(null,arguments)};a._spine_physics_constraint_data_set_scale_x=function(){return(a._spine_physics_constraint_data_set_scale_x=a.asm.spine_physics_constraint_data_set_scale_x).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_scale_x=function(){return(a._spine_physics_constraint_data_get_scale_x=a.asm.spine_physics_constraint_data_get_scale_x).apply(null,arguments)};a._spine_physics_constraint_data_set_shear_x=function(){return(a._spine_physics_constraint_data_set_shear_x=a.asm.spine_physics_constraint_data_set_shear_x).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_shear_x=function(){return(a._spine_physics_constraint_data_get_shear_x=a.asm.spine_physics_constraint_data_get_shear_x).apply(null,arguments)};a._spine_physics_constraint_data_set_limit=function(){return(a._spine_physics_constraint_data_set_limit=a.asm.spine_physics_constraint_data_set_limit).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_limit=function(){return(a._spine_physics_constraint_data_get_limit=a.asm.spine_physics_constraint_data_get_limit).apply(null,arguments)};a._spine_physics_constraint_data_set_step=function(){return(a._spine_physics_constraint_data_set_step=a.asm.spine_physics_constraint_data_set_step).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_step=function(){return(a._spine_physics_constraint_data_get_step=a.asm.spine_physics_constraint_data_get_step).apply(null,arguments)};a._spine_physics_constraint_data_set_inertia=function(){return(a._spine_physics_constraint_data_set_inertia=a.asm.spine_physics_constraint_data_set_inertia).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_inertia=function(){return(a._spine_physics_constraint_data_get_inertia=a.asm.spine_physics_constraint_data_get_inertia).apply(null,arguments)};a._spine_physics_constraint_data_set_strength=function(){return(a._spine_physics_constraint_data_set_strength=a.asm.spine_physics_constraint_data_set_strength).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_strength=function(){return(a._spine_physics_constraint_data_get_strength=a.asm.spine_physics_constraint_data_get_strength).apply(null,arguments)};a._spine_physics_constraint_data_set_damping=function(){return(a._spine_physics_constraint_data_set_damping=a.asm.spine_physics_constraint_data_set_damping).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_damping=function(){return(a._spine_physics_constraint_data_get_damping=a.asm.spine_physics_constraint_data_get_damping).apply(null,arguments)};a._spine_physics_constraint_data_set_mass_inverse=function(){return(a._spine_physics_constraint_data_set_mass_inverse=a.asm.spine_physics_constraint_data_set_mass_inverse).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_mass_inverse=function(){return(a._spine_physics_constraint_data_get_mass_inverse=a.asm.spine_physics_constraint_data_get_mass_inverse).apply(null,arguments)};a._spine_physics_constraint_data_set_wind=function(){return(a._spine_physics_constraint_data_set_wind=a.asm.spine_physics_constraint_data_set_wind).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_wind=function(){return(a._spine_physics_constraint_data_get_wind=a.asm.spine_physics_constraint_data_get_wind).apply(null,arguments)};a._spine_physics_constraint_data_set_gravity=function(){return(a._spine_physics_constraint_data_set_gravity=a.asm.spine_physics_constraint_data_set_gravity).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_gravity=function(){return(a._spine_physics_constraint_data_get_gravity=a.asm.spine_physics_constraint_data_get_gravity).apply(null,arguments)};a._spine_physics_constraint_data_set_mix=function(){return(a._spine_physics_constraint_data_set_mix=a.asm.spine_physics_constraint_data_set_mix).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_get_mix=function(){return(a._spine_physics_constraint_data_get_mix=a.asm.spine_physics_constraint_data_get_mix).apply(null,arguments)};a._spine_physics_constraint_data_set_inertia_global=function(){return(a._spine_physics_constraint_data_set_inertia_global=a.asm.spine_physics_constraint_data_set_inertia_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_inertia_global=function(){return(a._spine_physics_constraint_data_is_inertia_global=a.asm.spine_physics_constraint_data_is_inertia_global).apply(null,arguments)};a._spine_physics_constraint_data_set_strength_global=function(){return(a._spine_physics_constraint_data_set_strength_global=a.asm.spine_physics_constraint_data_set_strength_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_strength_global=function(){return(a._spine_physics_constraint_data_is_strength_global=a.asm.spine_physics_constraint_data_is_strength_global).apply(null,arguments)};a._spine_physics_constraint_data_set_damping_global=function(){return(a._spine_physics_constraint_data_set_damping_global=a.asm.spine_physics_constraint_data_set_damping_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_damping_global=function(){return(a._spine_physics_constraint_data_is_damping_global=a.asm.spine_physics_constraint_data_is_damping_global).apply(null,arguments)};a._spine_physics_constraint_data_set_mass_global=function(){return(a._spine_physics_constraint_data_set_mass_global=a.asm.spine_physics_constraint_data_set_mass_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_mass_global=function(){return(a._spine_physics_constraint_data_is_mass_global=a.asm.spine_physics_constraint_data_is_mass_global).apply(null,arguments)};a._spine_physics_constraint_data_set_wind_global=function(){return(a._spine_physics_constraint_data_set_wind_global=a.asm.spine_physics_constraint_data_set_wind_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_wind_global=function(){return(a._spine_physics_constraint_data_is_wind_global=a.asm.spine_physics_constraint_data_is_wind_global).apply(null,arguments)};a._spine_physics_constraint_data_set_gravity_global=function(){return(a._spine_physics_constraint_data_set_gravity_global=a.asm.spine_physics_constraint_data_set_gravity_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_gravity_global=function(){return(a._spine_physics_constraint_data_is_gravity_global=a.asm.spine_physics_constraint_data_is_gravity_global).apply(null,arguments)};a._spine_physics_constraint_data_set_mix_global=function(){return(a._spine_physics_constraint_data_set_mix_global=a.asm.spine_physics_constraint_data_set_mix_global).apply(null,arguments)};
|
||||
a._spine_physics_constraint_data_is_mix_global=function(){return(a._spine_physics_constraint_data_is_mix_global=a.asm.spine_physics_constraint_data_is_mix_global).apply(null,arguments)};a._spine_physics_constraint_set_bone=function(){return(a._spine_physics_constraint_set_bone=a.asm.spine_physics_constraint_set_bone).apply(null,arguments)};a._spine_physics_constraint_get_bone=function(){return(a._spine_physics_constraint_get_bone=a.asm.spine_physics_constraint_get_bone).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_inertia=function(){return(a._spine_physics_constraint_set_inertia=a.asm.spine_physics_constraint_set_inertia).apply(null,arguments)};a._spine_physics_constraint_get_inertia=function(){return(a._spine_physics_constraint_get_inertia=a.asm.spine_physics_constraint_get_inertia).apply(null,arguments)};a._spine_physics_constraint_set_strength=function(){return(a._spine_physics_constraint_set_strength=a.asm.spine_physics_constraint_set_strength).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_strength=function(){return(a._spine_physics_constraint_get_strength=a.asm.spine_physics_constraint_get_strength).apply(null,arguments)};a._spine_physics_constraint_set_damping=function(){return(a._spine_physics_constraint_set_damping=a.asm.spine_physics_constraint_set_damping).apply(null,arguments)};a._spine_physics_constraint_get_damping=function(){return(a._spine_physics_constraint_get_damping=a.asm.spine_physics_constraint_get_damping).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_mass_inverse=function(){return(a._spine_physics_constraint_set_mass_inverse=a.asm.spine_physics_constraint_set_mass_inverse).apply(null,arguments)};a._spine_physics_constraint_get_mass_inverse=function(){return(a._spine_physics_constraint_get_mass_inverse=a.asm.spine_physics_constraint_get_mass_inverse).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_wind=function(){return(a._spine_physics_constraint_set_wind=a.asm.spine_physics_constraint_set_wind).apply(null,arguments)};a._spine_physics_constraint_get_wind=function(){return(a._spine_physics_constraint_get_wind=a.asm.spine_physics_constraint_get_wind).apply(null,arguments)};a._spine_physics_constraint_set_gravity=function(){return(a._spine_physics_constraint_set_gravity=a.asm.spine_physics_constraint_set_gravity).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_gravity=function(){return(a._spine_physics_constraint_get_gravity=a.asm.spine_physics_constraint_get_gravity).apply(null,arguments)};a._spine_physics_constraint_set_mix=function(){return(a._spine_physics_constraint_set_mix=a.asm.spine_physics_constraint_set_mix).apply(null,arguments)};a._spine_physics_constraint_get_mix=function(){return(a._spine_physics_constraint_get_mix=a.asm.spine_physics_constraint_get_mix).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_reset=function(){return(a._spine_physics_constraint_set_reset=a.asm.spine_physics_constraint_set_reset).apply(null,arguments)};a._spine_physics_constraint_get_reset=function(){return(a._spine_physics_constraint_get_reset=a.asm.spine_physics_constraint_get_reset).apply(null,arguments)};a._spine_physics_constraint_set_ux=function(){return(a._spine_physics_constraint_set_ux=a.asm.spine_physics_constraint_set_ux).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_ux=function(){return(a._spine_physics_constraint_get_ux=a.asm.spine_physics_constraint_get_ux).apply(null,arguments)};a._spine_physics_constraint_set_uy=function(){return(a._spine_physics_constraint_set_uy=a.asm.spine_physics_constraint_set_uy).apply(null,arguments)};a._spine_physics_constraint_get_uy=function(){return(a._spine_physics_constraint_get_uy=a.asm.spine_physics_constraint_get_uy).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_cx=function(){return(a._spine_physics_constraint_set_cx=a.asm.spine_physics_constraint_set_cx).apply(null,arguments)};a._spine_physics_constraint_get_cx=function(){return(a._spine_physics_constraint_get_cx=a.asm.spine_physics_constraint_get_cx).apply(null,arguments)};a._spine_physics_constraint_set_cy=function(){return(a._spine_physics_constraint_set_cy=a.asm.spine_physics_constraint_set_cy).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_cy=function(){return(a._spine_physics_constraint_get_cy=a.asm.spine_physics_constraint_get_cy).apply(null,arguments)};a._spine_physics_constraint_set_tx=function(){return(a._spine_physics_constraint_set_tx=a.asm.spine_physics_constraint_set_tx).apply(null,arguments)};a._spine_physics_constraint_get_tx=function(){return(a._spine_physics_constraint_get_tx=a.asm.spine_physics_constraint_get_tx).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_ty=function(){return(a._spine_physics_constraint_set_ty=a.asm.spine_physics_constraint_set_ty).apply(null,arguments)};a._spine_physics_constraint_get_ty=function(){return(a._spine_physics_constraint_get_ty=a.asm.spine_physics_constraint_get_ty).apply(null,arguments)};a._spine_physics_constraint_set_x_offset=function(){return(a._spine_physics_constraint_set_x_offset=a.asm.spine_physics_constraint_set_x_offset).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_x_offset=function(){return(a._spine_physics_constraint_get_x_offset=a.asm.spine_physics_constraint_get_x_offset).apply(null,arguments)};a._spine_physics_constraint_set_x_velocity=function(){return(a._spine_physics_constraint_set_x_velocity=a.asm.spine_physics_constraint_set_x_velocity).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_x_velocity=function(){return(a._spine_physics_constraint_get_x_velocity=a.asm.spine_physics_constraint_get_x_velocity).apply(null,arguments)};a._spine_physics_constraint_set_y_offset=function(){return(a._spine_physics_constraint_set_y_offset=a.asm.spine_physics_constraint_set_y_offset).apply(null,arguments)};a._spine_physics_constraint_get_y_offset=function(){return(a._spine_physics_constraint_get_y_offset=a.asm.spine_physics_constraint_get_y_offset).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_y_velocity=function(){return(a._spine_physics_constraint_set_y_velocity=a.asm.spine_physics_constraint_set_y_velocity).apply(null,arguments)};a._spine_physics_constraint_get_y_velocity=function(){return(a._spine_physics_constraint_get_y_velocity=a.asm.spine_physics_constraint_get_y_velocity).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_rotate_offset=function(){return(a._spine_physics_constraint_set_rotate_offset=a.asm.spine_physics_constraint_set_rotate_offset).apply(null,arguments)};a._spine_physics_constraint_get_rotate_offset=function(){return(a._spine_physics_constraint_get_rotate_offset=a.asm.spine_physics_constraint_get_rotate_offset).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_rotate_velocity=function(){return(a._spine_physics_constraint_set_rotate_velocity=a.asm.spine_physics_constraint_set_rotate_velocity).apply(null,arguments)};a._spine_physics_constraint_get_rotate_velocity=function(){return(a._spine_physics_constraint_get_rotate_velocity=a.asm.spine_physics_constraint_get_rotate_velocity).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_scale_offset=function(){return(a._spine_physics_constraint_set_scale_offset=a.asm.spine_physics_constraint_set_scale_offset).apply(null,arguments)};a._spine_physics_constraint_get_scale_offset=function(){return(a._spine_physics_constraint_get_scale_offset=a.asm.spine_physics_constraint_get_scale_offset).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_scale_velocity=function(){return(a._spine_physics_constraint_set_scale_velocity=a.asm.spine_physics_constraint_set_scale_velocity).apply(null,arguments)};a._spine_physics_constraint_get_scale_velocity=function(){return(a._spine_physics_constraint_get_scale_velocity=a.asm.spine_physics_constraint_get_scale_velocity).apply(null,arguments)};
|
||||
a._spine_physics_constraint_set_active=function(){return(a._spine_physics_constraint_set_active=a.asm.spine_physics_constraint_set_active).apply(null,arguments)};a._spine_physics_constraint_is_active=function(){return(a._spine_physics_constraint_is_active=a.asm.spine_physics_constraint_is_active).apply(null,arguments)};a._spine_physics_constraint_set_remaining=function(){return(a._spine_physics_constraint_set_remaining=a.asm.spine_physics_constraint_set_remaining).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_remaining=function(){return(a._spine_physics_constraint_get_remaining=a.asm.spine_physics_constraint_get_remaining).apply(null,arguments)};a._spine_physics_constraint_set_last_time=function(){return(a._spine_physics_constraint_set_last_time=a.asm.spine_physics_constraint_set_last_time).apply(null,arguments)};
|
||||
a._spine_physics_constraint_get_last_time=function(){return(a._spine_physics_constraint_get_last_time=a.asm.spine_physics_constraint_get_last_time).apply(null,arguments)};a._spine_physics_constraint_reset_fully=function(){return(a._spine_physics_constraint_reset_fully=a.asm.spine_physics_constraint_reset_fully).apply(null,arguments)};a._spine_physics_constraint_update=function(){return(a._spine_physics_constraint_update=a.asm.spine_physics_constraint_update).apply(null,arguments)};
|
||||
a._spine_physics_constraint_translate=function(){return(a._spine_physics_constraint_translate=a.asm.spine_physics_constraint_translate).apply(null,arguments)};a._spine_physics_constraint_rotate=function(){return(a._spine_physics_constraint_rotate=a.asm.spine_physics_constraint_rotate).apply(null,arguments)};a._spine_sequence_apply=function(){return(a._spine_sequence_apply=a.asm.spine_sequence_apply).apply(null,arguments)};
|
||||
a._spine_sequence_get_path=function(){return(a._spine_sequence_get_path=a.asm.spine_sequence_get_path).apply(null,arguments)};a._spine_sequence_get_id=function(){return(a._spine_sequence_get_id=a.asm.spine_sequence_get_id).apply(null,arguments)};a._spine_sequence_set_id=function(){return(a._spine_sequence_set_id=a.asm.spine_sequence_set_id).apply(null,arguments)};a._spine_sequence_get_start=function(){return(a._spine_sequence_get_start=a.asm.spine_sequence_get_start).apply(null,arguments)};
|
||||
a._spine_sequence_set_start=function(){return(a._spine_sequence_set_start=a.asm.spine_sequence_set_start).apply(null,arguments)};a._spine_sequence_get_digits=function(){return(a._spine_sequence_get_digits=a.asm.spine_sequence_get_digits).apply(null,arguments)};a._spine_sequence_set_digits=function(){return(a._spine_sequence_set_digits=a.asm.spine_sequence_set_digits).apply(null,arguments)};
|
||||
a._spine_sequence_get_setup_index=function(){return(a._spine_sequence_get_setup_index=a.asm.spine_sequence_get_setup_index).apply(null,arguments)};a._spine_sequence_set_setup_index=function(){return(a._spine_sequence_set_setup_index=a.asm.spine_sequence_set_setup_index).apply(null,arguments)};a._spine_sequence_get_num_regions=function(){return(a._spine_sequence_get_num_regions=a.asm.spine_sequence_get_num_regions).apply(null,arguments)};
|
||||
a._spine_sequence_get_regions=function(){return(a._spine_sequence_get_regions=a.asm.spine_sequence_get_regions).apply(null,arguments)};a._spine_texture_region_get_texture=function(){return(a._spine_texture_region_get_texture=a.asm.spine_texture_region_get_texture).apply(null,arguments)};a._spine_texture_region_set_texture=function(){return(a._spine_texture_region_set_texture=a.asm.spine_texture_region_set_texture).apply(null,arguments)};
|
||||
a._spine_texture_region_get_u=function(){return(a._spine_texture_region_get_u=a.asm.spine_texture_region_get_u).apply(null,arguments)};a._spine_texture_region_set_u=function(){return(a._spine_texture_region_set_u=a.asm.spine_texture_region_set_u).apply(null,arguments)};a._spine_texture_region_get_v=function(){return(a._spine_texture_region_get_v=a.asm.spine_texture_region_get_v).apply(null,arguments)};
|
||||
a._spine_texture_region_set_v=function(){return(a._spine_texture_region_set_v=a.asm.spine_texture_region_set_v).apply(null,arguments)};a._spine_texture_region_get_u2=function(){return(a._spine_texture_region_get_u2=a.asm.spine_texture_region_get_u2).apply(null,arguments)};a._spine_texture_region_set_u2=function(){return(a._spine_texture_region_set_u2=a.asm.spine_texture_region_set_u2).apply(null,arguments)};
|
||||
a._spine_texture_region_get_v2=function(){return(a._spine_texture_region_get_v2=a.asm.spine_texture_region_get_v2).apply(null,arguments)};a._spine_texture_region_set_v2=function(){return(a._spine_texture_region_set_v2=a.asm.spine_texture_region_set_v2).apply(null,arguments)};a._spine_texture_region_get_degrees=function(){return(a._spine_texture_region_get_degrees=a.asm.spine_texture_region_get_degrees).apply(null,arguments)};
|
||||
a._spine_texture_region_set_degrees=function(){return(a._spine_texture_region_set_degrees=a.asm.spine_texture_region_set_degrees).apply(null,arguments)};a._spine_texture_region_get_offset_x=function(){return(a._spine_texture_region_get_offset_x=a.asm.spine_texture_region_get_offset_x).apply(null,arguments)};a._spine_texture_region_set_offset_x=function(){return(a._spine_texture_region_set_offset_x=a.asm.spine_texture_region_set_offset_x).apply(null,arguments)};
|
||||
a._spine_texture_region_get_offset_y=function(){return(a._spine_texture_region_get_offset_y=a.asm.spine_texture_region_get_offset_y).apply(null,arguments)};a._spine_texture_region_set_offset_y=function(){return(a._spine_texture_region_set_offset_y=a.asm.spine_texture_region_set_offset_y).apply(null,arguments)};a._spine_texture_region_get_width=function(){return(a._spine_texture_region_get_width=a.asm.spine_texture_region_get_width).apply(null,arguments)};
|
||||
a._spine_texture_region_set_width=function(){return(a._spine_texture_region_set_width=a.asm.spine_texture_region_set_width).apply(null,arguments)};a._spine_texture_region_get_height=function(){return(a._spine_texture_region_get_height=a.asm.spine_texture_region_get_height).apply(null,arguments)};a._spine_texture_region_set_height=function(){return(a._spine_texture_region_set_height=a.asm.spine_texture_region_set_height).apply(null,arguments)};
|
||||
a._spine_texture_region_get_original_width=function(){return(a._spine_texture_region_get_original_width=a.asm.spine_texture_region_get_original_width).apply(null,arguments)};a._spine_texture_region_set_original_width=function(){return(a._spine_texture_region_set_original_width=a.asm.spine_texture_region_set_original_width).apply(null,arguments)};
|
||||
a._spine_texture_region_get_original_height=function(){return(a._spine_texture_region_get_original_height=a.asm.spine_texture_region_get_original_height).apply(null,arguments)};a._spine_texture_region_set_original_height=function(){return(a._spine_texture_region_set_original_height=a.asm.spine_texture_region_set_original_height).apply(null,arguments)};a._spine_skeleton_bounds_create=function(){return(a._spine_skeleton_bounds_create=a.asm.spine_skeleton_bounds_create).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_dispose=function(){return(a._spine_skeleton_bounds_dispose=a.asm.spine_skeleton_bounds_dispose).apply(null,arguments)};a._spine_skeleton_bounds_update=function(){return(a._spine_skeleton_bounds_update=a.asm.spine_skeleton_bounds_update).apply(null,arguments)};a._spine_skeleton_bounds_aabb_contains_point=function(){return(a._spine_skeleton_bounds_aabb_contains_point=a.asm.spine_skeleton_bounds_aabb_contains_point).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_aabb_intersects_segment=function(){return(a._spine_skeleton_bounds_aabb_intersects_segment=a.asm.spine_skeleton_bounds_aabb_intersects_segment).apply(null,arguments)};a._spine_skeleton_bounds_aabb_intersects_skeleton=function(){return(a._spine_skeleton_bounds_aabb_intersects_skeleton=a.asm.spine_skeleton_bounds_aabb_intersects_skeleton).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_contains_point=function(){return(a._spine_skeleton_bounds_contains_point=a.asm.spine_skeleton_bounds_contains_point).apply(null,arguments)};a._spine_skeleton_bounds_contains_point_attachment=function(){return(a._spine_skeleton_bounds_contains_point_attachment=a.asm.spine_skeleton_bounds_contains_point_attachment).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_intersects_segment_attachment=function(){return(a._spine_skeleton_bounds_intersects_segment_attachment=a.asm.spine_skeleton_bounds_intersects_segment_attachment).apply(null,arguments)};a._spine_skeleton_bounds_intersects_segment=function(){return(a._spine_skeleton_bounds_intersects_segment=a.asm.spine_skeleton_bounds_intersects_segment).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_get_polygon=function(){return(a._spine_skeleton_bounds_get_polygon=a.asm.spine_skeleton_bounds_get_polygon).apply(null,arguments)};a._spine_skeleton_bounds_get_bounding_box=function(){return(a._spine_skeleton_bounds_get_bounding_box=a.asm.spine_skeleton_bounds_get_bounding_box).apply(null,arguments)};a._spine_skeleton_bounds_get_num_polygons=function(){return(a._spine_skeleton_bounds_get_num_polygons=a.asm.spine_skeleton_bounds_get_num_polygons).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_get_polygons=function(){return(a._spine_skeleton_bounds_get_polygons=a.asm.spine_skeleton_bounds_get_polygons).apply(null,arguments)};a._spine_skeleton_bounds_get_num_bounding_boxes=function(){return(a._spine_skeleton_bounds_get_num_bounding_boxes=a.asm.spine_skeleton_bounds_get_num_bounding_boxes).apply(null,arguments)};
|
||||
a._spine_skeleton_bounds_get_bounding_boxes=function(){return(a._spine_skeleton_bounds_get_bounding_boxes=a.asm.spine_skeleton_bounds_get_bounding_boxes).apply(null,arguments)};a._spine_skeleton_bounds_get_width=function(){return(a._spine_skeleton_bounds_get_width=a.asm.spine_skeleton_bounds_get_width).apply(null,arguments)};a._spine_skeleton_bounds_get_height=function(){return(a._spine_skeleton_bounds_get_height=a.asm.spine_skeleton_bounds_get_height).apply(null,arguments)};
|
||||
a._spine_polygon_get_num_vertices=function(){return(a._spine_polygon_get_num_vertices=a.asm.spine_polygon_get_num_vertices).apply(null,arguments)};a._spine_polygon_get_vertices=function(){return(a._spine_polygon_get_vertices=a.asm.spine_polygon_get_vertices).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.malloc).apply(null,arguments)};a.___errno_location=function(){return(a.___errno_location=a.asm.__errno_location).apply(null,arguments)};
|
||||
a.stackSave=function(){return(a.stackSave=a.asm.stackSave).apply(null,arguments)};a.stackRestore=function(){return(a.stackRestore=a.asm.stackRestore).apply(null,arguments)};a.stackAlloc=function(){return(a.stackAlloc=a.asm.stackAlloc).apply(null,arguments)};a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.dynCall_jiji).apply(null,arguments)};var Z;R=function sa(){Z||ta();Z||(R=sa)};
|
||||
function ta(){function b(){if(!Z&&(Z=!0,a.calledRun=!0,!B)){V(ca);h(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;){var c=a.postRun.shift();da.unshift(c)}V(da)}}if(!(0<O)){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)ea();V(ba);0<O||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);b()},1)):b())}}
|
||||
if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();ta();
|
||||
|
||||
|
||||
return libspine_flutter.ready
|
||||
return moduleRtn;
|
||||
}
|
||||
);
|
||||
})();
|
||||
if (typeof exports === 'object' && typeof module === 'object')
|
||||
if (typeof exports === 'object' && typeof module === 'object') {
|
||||
module.exports = libspine_flutter;
|
||||
else if (typeof define === 'function' && define['amd'])
|
||||
define([], function() { return libspine_flutter; });
|
||||
else if (typeof exports === 'object')
|
||||
exports["libspine_flutter"] = libspine_flutter;
|
||||
// This default export looks redundant, but it allows TS to import this
|
||||
// commonjs style module.
|
||||
module.exports.default = libspine_flutter;
|
||||
} else if (typeof define === 'function' && define['amd'])
|
||||
define([], () => libspine_flutter);
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
name: spine_flutter
|
||||
description: The official Spine Flutter Runtime to load, display and interact with Spine animations.
|
||||
version: 4.2.33
|
||||
version: 4.2.35
|
||||
homepage: https://esotericsoftware.com
|
||||
repository: https://github.com/esotericsoftware/spine-runtimes
|
||||
issue_tracker: https://github.com/esotericsoftware/spine-runtimes/issues
|
||||
@ -14,7 +14,7 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
ffi: ^2.1.0
|
||||
web_ffi_fork: ^0.7.4
|
||||
web_ffi_fork: ^0.7.5
|
||||
inject_js: ^2.0.0
|
||||
js: ^0.6.5
|
||||
meta: ^1.10.0
|
||||
|
||||
@ -19,7 +19,7 @@ set(GLFW_INSTALL OFF CACHE BOOL " " FORCE)
|
||||
FetchContent_Declare(
|
||||
glbinding
|
||||
GIT_REPOSITORY https://github.com/cginternals/glbinding.git
|
||||
GIT_TAG v3.3.0
|
||||
GIT_TAG v3.4.0
|
||||
GIT_SHALLOW 1
|
||||
)
|
||||
FetchContent_MakeAvailable(glbinding)
|
||||
@ -65,4 +65,4 @@ set_property(TARGET spine-glfw-example-cpp-lite PROPERTY VS_DEBUGGER_WORKING_DIR
|
||||
# copy data to build directory
|
||||
add_custom_command(TARGET spine-glfw-example PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_CURRENT_LIST_DIR}/data $<TARGET_FILE_DIR:spine-glfw-example>/data)
|
||||
${CMAKE_CURRENT_LIST_DIR}/data $<TARGET_FILE_DIR:spine-glfw-example>/data)
|
||||
|
||||
@ -66,11 +66,9 @@ if [ $dev == "true" ]; then
|
||||
pushd godot
|
||||
scons target=editor dev_build=true optimize=debug --jobs=$cpus
|
||||
popd
|
||||
cp spine_godot_extension.dev.gdextension example-v4-extension/bin/spine_godot_extension.gdextension
|
||||
else
|
||||
cp spine_godot_extension.gdextension example-v4-extension/bin
|
||||
fi
|
||||
|
||||
cp spine_godot_extension.gdextension example-v4-extension/bin
|
||||
cp -r ../spine-cpp/spine-cpp spine_godot
|
||||
|
||||
popd
|
||||
|
||||
@ -47,7 +47,9 @@ void SpineAnimation::_bind_methods() {
|
||||
|
||||
String SpineAnimation::get_name() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
float SpineAnimation::get_duration() {
|
||||
|
||||
@ -250,7 +250,9 @@ Ref<Animation> SpineAnimationTrack::create_animation(spine::Animation *animation
|
||||
|
||||
Ref<Animation> animation_ref;
|
||||
INSTANTIATE(animation_ref);
|
||||
animation_ref->set_name(String(animation->getName().buffer()) + (loop ? "" : "_looped"));
|
||||
String name;
|
||||
name.parse_utf8(animation.getName().buffer());
|
||||
animation_ref->set_name(name + (loop ? "" : "_looped"));
|
||||
#if VERSION_MAJOR > 3
|
||||
// animation_ref->set_loop(!loop);
|
||||
#else
|
||||
@ -260,7 +262,7 @@ Ref<Animation> SpineAnimationTrack::create_animation(spine::Animation *animation
|
||||
|
||||
animation_ref->add_track(Animation::TYPE_VALUE);
|
||||
animation_ref->track_set_path(0, NodePath(".:animation_name"));
|
||||
animation_ref->track_insert_key(0, 0, animation->getName().buffer());
|
||||
animation_ref->track_insert_key(0, 0, name);
|
||||
|
||||
animation_ref->add_track(Animation::TYPE_VALUE);
|
||||
animation_ref->track_set_path(1, NodePath(".:loop"));
|
||||
@ -298,7 +300,9 @@ void SpineAnimationTrack::update_animation_state(const Variant &variant_sprite)
|
||||
}
|
||||
auto current_entry = animation_state->getCurrent(track_index);
|
||||
bool should_set_mix = mix_duration >= 0;
|
||||
bool should_set_animation = !current_entry || (animation_name != current_entry->getAnimation()->getName().buffer() || current_entry->getLoop() != loop);
|
||||
String other_name;
|
||||
if (current_entry) other_name.parse_utf8(current_entry->getAnimation()->getName().buffer());
|
||||
bool should_set_animation = !current_entry || (animation_name != other_name || current_entry->getLoop() != loop);
|
||||
|
||||
if (should_set_animation) {
|
||||
if (!EMPTY(animation_name)) {
|
||||
@ -316,7 +320,7 @@ void SpineAnimationTrack::update_animation_state(const Variant &variant_sprite)
|
||||
|
||||
if (debug) print_line(String("Setting animation {0} with mix_duration {1} on track {2} on {3}").format(varray(animation_name, mix_duration, track_index, sprite->get_name())).utf8().ptr());
|
||||
} else {
|
||||
if (!current_entry || (String("<empty>") != current_entry->getAnimation()->getName().buffer())) {
|
||||
if (!current_entry || (String("<empty>") != other_name)) {
|
||||
auto entry = animation_state->setEmptyAnimation(track_index, should_set_mix ? mix_duration : 0);
|
||||
entry->setTrackEnd(FLT_MAX);
|
||||
if (debug) print_line(String("Setting empty animation with mix_duration {0} on track {1} on {2}").format(varray(mix_duration, track_index, sprite->get_name())).utf8().ptr());
|
||||
@ -423,7 +427,9 @@ void SpineAnimationTrack::update_animation_state(const Variant &variant_sprite)
|
||||
if (animation_player->is_playing()) {
|
||||
auto current_entry = animation_state->getCurrent(track_index);
|
||||
bool should_set_mix = mix_duration >= 0;
|
||||
bool should_set_animation = !current_entry || (animation_name != current_entry->getAnimation()->getName().buffer() || current_entry->getLoop() != loop) || animation_changed;
|
||||
String other_name;
|
||||
if (current_entry) other_name.parse_utf8(current_entry->getAnimation()->getName().buffer());
|
||||
bool should_set_animation = !current_entry || (animation_name != other_name || current_entry->getLoop() != loop) || animation_changed;
|
||||
animation_changed = false;
|
||||
|
||||
if (should_set_animation) {
|
||||
@ -442,7 +448,7 @@ void SpineAnimationTrack::update_animation_state(const Variant &variant_sprite)
|
||||
|
||||
if (debug) print_line(String("Setting animation {0} with mix_duration {1} on track {2} on {3}").format(varray(animation_name, mix_duration, track_index, sprite->get_name())).utf8().ptr());
|
||||
} else {
|
||||
if (!current_entry || (String("<empty>") != current_entry->getAnimation()->getName().buffer())) {
|
||||
if (!current_entry || (String("<empty>") != other_name)) {
|
||||
auto entry = animation_state->setEmptyAnimation(track_index, should_set_mix ? mix_duration : 0);
|
||||
entry->setTrackEnd(FLT_MAX);
|
||||
if (debug) print_line(String("Setting empty animation with mix_duration {0} on track {1} on {2}").format(varray(mix_duration, track_index, sprite->get_name())).utf8().ptr());
|
||||
|
||||
@ -142,7 +142,8 @@ public:
|
||||
|
||||
void load(spine::AtlasPage &page, const spine::String &path) override {
|
||||
Error error = OK;
|
||||
String fixed_path = String(path.buffer());
|
||||
String fixed_path;
|
||||
fixed_path.parse_utf8(path.buffer());
|
||||
bool is_resource = fix_path(fixed_path);
|
||||
|
||||
import_image_resource(fixed_path);
|
||||
@ -157,7 +158,7 @@ public:
|
||||
#endif
|
||||
#endif
|
||||
if (error != OK || !texture.is_valid()) {
|
||||
ERR_PRINT(vformat("Can't load texture: \"%s\"", String(path.buffer())));
|
||||
ERR_PRINT(vformat("Can't load texture: \"%s\"", fixed_path));
|
||||
auto renderer_object = memnew(SpineRendererObject);
|
||||
renderer_object->texture = Ref<Texture>(nullptr);
|
||||
renderer_object->normal_map = Ref<Texture>(nullptr);
|
||||
|
||||
@ -41,7 +41,9 @@ SpineAttachment::~SpineAttachment() {
|
||||
|
||||
String SpineAttachment::get_attachment_name() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
Ref<SpineAttachment> SpineAttachment::copy() {
|
||||
|
||||
@ -68,7 +68,9 @@ int SpineBoneData::get_index() {
|
||||
|
||||
String SpineBoneData::get_bone_name() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
Ref<SpineBoneData> SpineBoneData::get_parent() {
|
||||
|
||||
@ -41,7 +41,9 @@ void SpineConstraintData::_bind_methods() {
|
||||
|
||||
String SpineConstraintData::get_constraint_name() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
int SpineConstraintData::get_order() {
|
||||
|
||||
@ -43,8 +43,12 @@
|
||||
#ifdef SPINE_GODOT_EXTENSION
|
||||
Error SpineAtlasResourceImportPlugin::_import(const String &source_file, const String &save_path, const Dictionary &options, const TypedArray<String> &platform_variants, const TypedArray<String> &gen_files) const {
|
||||
#else
|
||||
#if VERSION_MINOR > 3
|
||||
Error SpineAtlasResourceImportPlugin::import(ResourceUID::ID p_source_id, const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
|
||||
#else
|
||||
Error SpineAtlasResourceImportPlugin::import(const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) {
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
Error SpineAtlasResourceImportPlugin::import(const String &source_file, const String &save_path, const Map<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) {
|
||||
#endif
|
||||
@ -99,8 +103,12 @@ void SpineAtlasResourceImportPlugin::get_import_options(List<ImportOption> *opti
|
||||
#ifdef SPINE_GODOT_EXTENSION
|
||||
Error SpineJsonResourceImportPlugin::_import(const String &source_file, const String &save_path, const Dictionary &options, const TypedArray<String> &platform_variants, const TypedArray<String> &gen_files) const {
|
||||
#else
|
||||
#if VERSION_MINOR > 3
|
||||
Error SpineJsonResourceImportPlugin::import(ResourceUID::ID p_source_id, const String &source_file, const String &save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
|
||||
#else
|
||||
Error SpineJsonResourceImportPlugin::import(const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) {
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
Error SpineJsonResourceImportPlugin::import(const String &source_file, const String &save_path, const Map<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) {
|
||||
#endif
|
||||
@ -127,8 +135,12 @@ Error SpineJsonResourceImportPlugin::import(const String &source_file, const Str
|
||||
#ifdef SPINE_GODOT_EXTENSION
|
||||
Error SpineBinaryResourceImportPlugin::_import(const String &source_file, const String &save_path, const Dictionary &options, const TypedArray<String> &platform_variants, const TypedArray<String> &gen_files) const {
|
||||
#else
|
||||
#if VERSION_MINOR > 3
|
||||
Error SpineBinaryResourceImportPlugin::import(ResourceUID::ID p_source_id, const String &source_file, const String &save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
|
||||
#else
|
||||
Error SpineBinaryResourceImportPlugin::import(const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) {
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
Error SpineBinaryResourceImportPlugin::import(const String &source_file, const String &save_path, const Map<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) {
|
||||
#endif
|
||||
|
||||
@ -107,9 +107,12 @@ public:
|
||||
void get_import_options(const String &path, List<ImportOption> *options, int preset) const override;
|
||||
|
||||
virtual bool get_option_visibility(const String &path, const String &option, const HashMap<StringName, Variant> &options) const override { return true; }
|
||||
|
||||
#if VERSION_MINOR > 3
|
||||
Error import(ResourceUID::ID p_source_id, const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override;
|
||||
#else
|
||||
Error import(const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) override;
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
void get_import_options(List<ImportOption> *options, int preset) const override;
|
||||
|
||||
@ -182,8 +185,12 @@ public:
|
||||
|
||||
bool get_option_visibility(const String &path, const String &option, const HashMap<StringName, Variant> &options) const override { return true; }
|
||||
|
||||
#if VERSION_MINOR > 3
|
||||
Error import(ResourceUID::ID p_source_id, const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override;
|
||||
#else
|
||||
Error import(const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) override;
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
void get_import_options(List<ImportOption> *options, int preset) const override {}
|
||||
|
||||
@ -255,9 +262,12 @@ public:
|
||||
void get_import_options(const String &path, List<ImportOption> *options, int preset) const override {}
|
||||
|
||||
bool get_option_visibility(const String &path, const String &option, const HashMap<StringName, Variant> &options) const override { return true; }
|
||||
|
||||
#if VERSION_MINOR > 3
|
||||
Error import(ResourceUID::ID p_source_id, const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata = nullptr) override;
|
||||
#else
|
||||
Error import(const String &source_file, const String &save_path, const HashMap<StringName, Variant> &options, List<String> *platform_variants, List<String> *gen_files, Variant *metadata) override;
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
void get_import_options(List<ImportOption> *options, int preset) const override {}
|
||||
|
||||
@ -280,8 +290,12 @@ public:
|
||||
#else
|
||||
explicit SpineEditorPlugin(EditorNode *node);
|
||||
|
||||
#if VERSION_MAJOR > 3 && VERSION_MINOR > 3
|
||||
String get_plugin_name() const override { return "SpineEditorPlugin"; }
|
||||
#else
|
||||
String get_name() const override { return "SpineEditorPlugin"; }
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
class SpineSkeletonDataResourceInspectorPlugin : public EditorInspectorPlugin {
|
||||
|
||||
@ -48,7 +48,9 @@ void SpineEventData::_bind_methods() {
|
||||
|
||||
String SpineEventData::get_event_name() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
int SpineEventData::get_int_value() {
|
||||
|
||||
@ -381,11 +381,9 @@ SpineSkeletonDataResource::get_skeleton_file_res() {
|
||||
}
|
||||
|
||||
#ifdef SPINE_GODOT_EXTENSION
|
||||
void SpineSkeletonDataResource::get_animation_names(
|
||||
PackedStringArray &animation_names) const {
|
||||
void SpineSkeletonDataResource::get_animation_names(PackedStringArray &animation_names) const {
|
||||
#else
|
||||
void SpineSkeletonDataResource::get_animation_names(
|
||||
Vector<String> &animation_names) const {
|
||||
void SpineSkeletonDataResource::get_animation_names(Vector<String> &animation_names) const {
|
||||
#endif
|
||||
animation_names.clear();
|
||||
if (!is_skeleton_data_loaded())
|
||||
@ -393,16 +391,16 @@ void SpineSkeletonDataResource::get_animation_names(
|
||||
auto animations = skeleton_data->getAnimations();
|
||||
for (size_t i = 0; i < animations.size(); ++i) {
|
||||
auto animation = animations[i];
|
||||
animation_names.push_back(animation->getName().buffer());
|
||||
String name;
|
||||
name.parse_utf8(animation->getName().buffer());
|
||||
animation_names.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SPINE_GODOT_EXTENSION
|
||||
void SpineSkeletonDataResource::get_skin_names(
|
||||
PackedStringArray &skin_names) const {
|
||||
void SpineSkeletonDataResource::get_skin_names(PackedStringArray &skin_names) const {
|
||||
#else
|
||||
void SpineSkeletonDataResource::get_skin_names(
|
||||
Vector<String> &skin_names) const {
|
||||
void SpineSkeletonDataResource::get_skin_names(Vector<String> &skin_names) const {
|
||||
#endif
|
||||
skin_names.clear();
|
||||
if (!is_skeleton_data_loaded())
|
||||
@ -410,7 +408,9 @@ void SpineSkeletonDataResource::get_skin_names(
|
||||
auto skins = skeleton_data->getSkins();
|
||||
for (size_t i = 0; i < skins.size(); ++i) {
|
||||
auto skin = skins[i];
|
||||
skin_names.push_back(skin->getName().buffer());
|
||||
String name;
|
||||
name.parse_utf8(skin->getName().buffer());
|
||||
skin_names.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,7 +425,9 @@ void SpineSkeletonDataResource::get_slot_names(Vector<String> &slot_names) {
|
||||
auto slots = skeleton_data->getSlots();
|
||||
for (size_t i = 0; i < slots.size(); ++i) {
|
||||
auto slot = slots[i];
|
||||
slot_names.push_back(slot->getName().buffer());
|
||||
String name;
|
||||
name.parse_utf8(slot->getName().buffer());
|
||||
slot_names.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -440,7 +442,9 @@ void SpineSkeletonDataResource::get_bone_names(Vector<String> &bone_names) {
|
||||
auto bones = skeleton_data->getBones();
|
||||
for (size_t i = 0; i < bones.size(); ++i) {
|
||||
auto bone = bones[i];
|
||||
bone_names.push_back(bone->getName().buffer());
|
||||
String name;
|
||||
name.parse_utf8(bone->getName().buffer());
|
||||
bone_names.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -623,7 +627,9 @@ SpineSkeletonDataResource::find_physics_constraint(
|
||||
|
||||
String SpineSkeletonDataResource::get_skeleton_name() const {
|
||||
SPINE_CHECK(skeleton_data, "")
|
||||
return skeleton_data->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(skeleton_data->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
Array SpineSkeletonDataResource::get_bones() const {
|
||||
|
||||
@ -123,7 +123,9 @@ Array SpineSkin::find_attachments_for_slot(int slot_index) {
|
||||
|
||||
String SpineSkin::get_name() {
|
||||
SPINE_CHECK(get_spine_object(), "")
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
void SpineSkin::add_skin(Ref<SpineSkin> other) {
|
||||
|
||||
@ -53,7 +53,9 @@ int SpineSlotData::get_index() {
|
||||
|
||||
String SpineSlotData::get_name() {
|
||||
SPINE_CHECK(get_spine_object(), String(""))
|
||||
return get_spine_object()->getName().buffer();
|
||||
String name;
|
||||
name.parse_utf8(get_spine_object()->getName().buffer());
|
||||
return name;
|
||||
}
|
||||
|
||||
Ref<SpineBoneData> SpineSlotData::get_bone_data() {
|
||||
|
||||
@ -59,6 +59,7 @@
|
||||
#include "core/variant/array.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
#include "servers/rendering_server.h"
|
||||
#include "scene/resources/canvas_item_material.h"
|
||||
#if VERSION_MINOR > 0
|
||||
#include "editor/editor_interface.h"
|
||||
#endif
|
||||
@ -1222,7 +1223,9 @@ void SpineSprite::draw() {
|
||||
float inverse_zoom = 1 / get_viewport()->get_global_canvas_transform().get_scale().x * editor_scale;
|
||||
Vector<String> hover_text_lines;
|
||||
if (hovered_slot) {
|
||||
hover_text_lines.push_back(String("Slot: ") + hovered_slot->getData().getName().buffer());
|
||||
String name;
|
||||
name.parse_utf8(hovered_slot->getData().getName().buffer());
|
||||
hover_text_lines.push_back(String("Slot: ") + name);
|
||||
}
|
||||
|
||||
if (hovered_bone) {
|
||||
@ -1230,7 +1233,9 @@ void SpineSprite::draw() {
|
||||
debug_bones_thickness *= 1.1;
|
||||
draw_bone(hovered_bone, Color(debug_bones_color.r, debug_bones_color.g, debug_bones_color.b, 1));
|
||||
debug_bones_thickness = thickness;
|
||||
hover_text_lines.push_back(String("Bone: ") + hovered_bone->getData().getName().buffer());
|
||||
String name;
|
||||
name.parse_utf8(hovered_bone->getData().getName().buffer());
|
||||
hover_text_lines.push_back(String("Bone: ") + name);
|
||||
}
|
||||
|
||||
auto global_scale = get_global_scale();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
The spine-haxe runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [Haxe](https://haxe.org/) in combination with [OpenFL](https://www.openfl.org/) and [Lime](https://lime.openfl.org/).
|
||||
|
||||
For documentation of the core API in `spine-core`, please refer to our [Spine Runtimes Guide](http://esotericsoftware.com/spine-runtimes-guide).
|
||||
For documentation of the core API, please refer to our [Spine Runtimes Guide](http://esotericsoftware.com/spine-runtimes-guide).
|
||||
|
||||
For documentation of `spine-haxe`, please refer to our [spine-haxe Guide](https://esotericsoftware.com/spine-haxe).
|
||||
|
||||
|
||||
@ -462,7 +462,7 @@
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Spine iOS Example/Spine iOS Example-Bridging-Header.h";
|
||||
SWIFT_OBJC_INTEROP_MODE = objcxx;
|
||||
SWIFT_OBJC_INTEROP_MODE = objc;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
@ -506,7 +506,7 @@
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Spine iOS Example/Spine iOS Example-Bridging-Header.h";
|
||||
SWIFT_OBJC_INTEROP_MODE = objcxx;
|
||||
SWIFT_OBJC_INTEROP_MODE = objc;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
|
||||
@ -180,7 +180,7 @@ public enum Alignment: Int {
|
||||
switch self {
|
||||
case .topLeft, .topCenter, .topRight: return -1.0
|
||||
case .centerLeft, .center, .centerRight: return 0.0
|
||||
case .bottomLeft, .bottomCenter, .bottomRight: return -1.0
|
||||
case .bottomLeft, .bottomCenter, .bottomRight: return 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,6 +160,10 @@ internal final class SpineRenderer: NSObject, MTKViewDelegate {
|
||||
let commandBuffer = commandQueue.makeCommandBuffer(),
|
||||
let renderPassDescriptor = view.currentRenderPassDescriptor,
|
||||
let renderEncoder = commandBuffer.makeRenderCommandEncoder(descriptor: renderPassDescriptor) else {
|
||||
// this can happen if,
|
||||
// - CAMetalLayer is configured with drawable timeout, and CAMetalLayer is run out of Drawable
|
||||
// - CAMetalLayer is added to the window with frame size of zero or incorrect layout constraint -> currentRenderPassDescriptor is null
|
||||
bufferingSemaphore.signal()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -2,27 +2,15 @@
|
||||
#include <simd/simd.h>
|
||||
using namespace metal;
|
||||
|
||||
typedef enum SpineVertexInputIndex {
|
||||
SpineVertexInputIndexVertices = 0,
|
||||
SpineVertexInputIndexTransform = 1,
|
||||
SpineVertexInputIndexViewportSize = 2,
|
||||
} SpineVertexInputIndex;
|
||||
|
||||
typedef enum SpineTextureIndex {
|
||||
SpineTextureIndexBaseColor = 0,
|
||||
} SpineTextureIndex;
|
||||
|
||||
typedef struct {
|
||||
simd_float2 position;
|
||||
simd_float4 color;
|
||||
simd_float2 uv;
|
||||
} SpineVertex;
|
||||
|
||||
typedef struct {
|
||||
simd_float2 translation;
|
||||
simd_float2 scale;
|
||||
simd_float2 offset;
|
||||
} SpineTransform;
|
||||
#if __has_include("spine-ios/Sources/SpineShadersStructs/SpineShadersStructs.h")
|
||||
// Cocoapods Target
|
||||
#include "spine-ios/Sources/SpineShadersStructs/SpineShadersStructs.h"
|
||||
#elif __has_include("../../SpineShadersStructs/SpineShadersStructs.h")
|
||||
// Swift Package target
|
||||
#include "../../SpineShadersStructs/SpineShadersStructs.h"
|
||||
#else
|
||||
#error "Header not found. Please correct Header search path"
|
||||
#endif
|
||||
|
||||
struct RasterizerData {
|
||||
simd_float4 position [[position]];
|
||||
|
||||
@ -394,3 +394,11 @@ public extension SkeletonBounds {
|
||||
return SkeletonBounds(spine_skeleton_bounds_create())
|
||||
}
|
||||
}
|
||||
|
||||
@objc public extension Atlas {
|
||||
|
||||
var imagePathCount:Int32 {
|
||||
spine_atlas_get_num_image_paths(wrappee)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -52,6 +52,17 @@ public final class TransformConstraintData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? TransformConstraintData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var bones: [BoneData] {
|
||||
let ptr = spine_transform_constraint_data_get_bones(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -210,6 +221,17 @@ public final class BoundingBoxAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? BoundingBoxAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var color: Color {
|
||||
return .init(spine_bounding_box_attachment_get_color(wrappee))
|
||||
}
|
||||
@ -231,6 +253,17 @@ public final class PhysicsConstraintData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? PhysicsConstraintData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var bone: BoneData {
|
||||
get {
|
||||
return .init(spine_physics_constraint_data_get_bone(wrappee))
|
||||
@ -442,6 +475,17 @@ public final class AnimationStateEvents: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? AnimationStateEvents else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
public func getEventType(index: Int32) -> EventType {
|
||||
return spine_animation_state_events_get_event_type(wrappee, index)
|
||||
@ -474,6 +518,17 @@ public final class TransformConstraint: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? TransformConstraint else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var order: Int32 {
|
||||
return spine_transform_constraint_get_order(wrappee)
|
||||
}
|
||||
@ -581,6 +636,17 @@ public final class PathConstraintData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? PathConstraintData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var bones: [BoneData] {
|
||||
let ptr = spine_path_constraint_data_get_bones(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -694,6 +760,17 @@ public final class AnimationStateData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? AnimationStateData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var skeletonData: SkeletonData {
|
||||
return .init(spine_animation_state_data_get_skeleton_data(wrappee))
|
||||
}
|
||||
@ -743,6 +820,17 @@ public final class SkeletonDataResult: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SkeletonDataResult else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var error: String? {
|
||||
return spine_skeleton_data_result_get_error(wrappee).flatMap { String(cString: $0) }
|
||||
}
|
||||
@ -770,6 +858,17 @@ public final class ClippingAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? ClippingAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var color: Color {
|
||||
return .init(spine_clipping_attachment_get_color(wrappee))
|
||||
}
|
||||
@ -800,6 +899,17 @@ public final class IkConstraintData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? IkConstraintData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var bones: [BoneData] {
|
||||
let ptr = spine_ik_constraint_data_get_bones(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -886,6 +996,17 @@ public final class PhysicsConstraint: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? PhysicsConstraint else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var bone: Bone {
|
||||
get {
|
||||
return .init(spine_physics_constraint_get_bone(wrappee))
|
||||
@ -1149,6 +1270,17 @@ public final class RegionAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? RegionAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var color: Color {
|
||||
return .init(spine_region_attachment_get_color(wrappee))
|
||||
}
|
||||
@ -1265,6 +1397,17 @@ public final class VertexAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? VertexAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var worldVerticesLength: Int32 {
|
||||
return spine_vertex_attachment_get_world_vertices_length(wrappee)
|
||||
}
|
||||
@ -1308,6 +1451,17 @@ public final class SkeletonDrawable: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SkeletonDrawable else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var skeleton: Skeleton {
|
||||
return .init(spine_skeleton_drawable_get_skeleton(wrappee))
|
||||
}
|
||||
@ -1343,6 +1497,17 @@ public final class PointAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? PointAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var color: Color {
|
||||
return .init(spine_point_attachment_get_color(wrappee))
|
||||
}
|
||||
@ -1401,6 +1566,17 @@ public final class MeshAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? MeshAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var regionUvs: [Float?] {
|
||||
let ptr = spine_mesh_attachment_get_region_uvs(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -1506,6 +1682,17 @@ public final class PathAttachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? PathAttachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var lengths: [Float?] {
|
||||
let ptr = spine_path_attachment_get_lengths(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -1553,6 +1740,17 @@ public final class ConstraintData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? ConstraintData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var type: ConstraintType {
|
||||
return spine_constraint_data_get_type(wrappee)
|
||||
}
|
||||
@ -1592,6 +1790,17 @@ public final class PathConstraint: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? PathConstraint else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var order: Int32 {
|
||||
return spine_path_constraint_get_order(wrappee)
|
||||
}
|
||||
@ -1690,6 +1899,17 @@ public final class AnimationState: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? AnimationState else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var data: AnimationStateData {
|
||||
return .init(spine_animation_state_get_data(wrappee))
|
||||
}
|
||||
@ -1772,6 +1992,17 @@ public final class SkeletonBounds: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SkeletonBounds else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var polygons: [Polygon] {
|
||||
let ptr = spine_skeleton_bounds_get_polygons(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -1868,6 +2099,17 @@ public final class TextureRegion: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? TextureRegion else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var texture: UnsafeMutableRawPointer {
|
||||
get {
|
||||
return spine_texture_region_get_texture(wrappee)
|
||||
@ -1989,6 +2231,17 @@ public final class RenderCommand: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? RenderCommand else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var indices: [UInt16] {
|
||||
let ptr = spine_render_command_get_indices(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -2023,6 +2276,17 @@ public final class SkeletonData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SkeletonData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var name: String? {
|
||||
return spine_skeleton_data_get_name(wrappee).flatMap { String(cString: $0) }
|
||||
}
|
||||
@ -2246,6 +2510,17 @@ public final class IkConstraint: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? IkConstraint else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var order: Int32 {
|
||||
return spine_ik_constraint_get_order(wrappee)
|
||||
}
|
||||
@ -2345,6 +2620,17 @@ public final class SkinEntries: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SkinEntries else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
public func getEntry(index: Int32) -> SkinEntry {
|
||||
return .init(spine_skin_entries_get_entry(wrappee, index))
|
||||
@ -2369,6 +2655,17 @@ public final class TrackEntry: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? TrackEntry else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var trackIndex: Int32 {
|
||||
return spine_track_entry_get_track_index(wrappee)
|
||||
}
|
||||
@ -2603,6 +2900,17 @@ public final class Attachment: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Attachment else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var name: String? {
|
||||
return spine_attachment_get_name(wrappee).flatMap { String(cString: $0) }
|
||||
}
|
||||
@ -2635,6 +2943,17 @@ public final class Constraint: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Constraint else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@objc(SpineEventData)
|
||||
@ -2648,6 +2967,17 @@ public final class EventData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? EventData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var name: String? {
|
||||
return spine_event_data_get_name(wrappee).flatMap { String(cString: $0) }
|
||||
}
|
||||
@ -2714,6 +3044,17 @@ public final class SkinEntry: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SkinEntry else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var slotIndex: Int32 {
|
||||
return spine_skin_entry_get_slot_index(wrappee)
|
||||
}
|
||||
@ -2739,6 +3080,17 @@ public final class BoneData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? BoneData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var index: Int32 {
|
||||
return spine_bone_data_get_index(wrappee)
|
||||
}
|
||||
@ -2871,6 +3223,17 @@ public final class SlotData: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? SlotData else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var index: Int32 {
|
||||
return spine_slot_data_get_index(wrappee)
|
||||
}
|
||||
@ -2948,6 +3311,17 @@ public final class Animation: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Animation else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var name: String? {
|
||||
return spine_animation_get_name(wrappee).flatMap { String(cString: $0) }
|
||||
}
|
||||
@ -2969,6 +3343,17 @@ public final class Skeleton: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Skeleton else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var bounds: Bounds {
|
||||
return .init(spine_skeleton_get_bounds(wrappee))
|
||||
}
|
||||
@ -3210,6 +3595,17 @@ public final class Sequence: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Sequence else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var regions: [TextureRegion] {
|
||||
let ptr = spine_sequence_get_regions(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -3278,6 +3674,17 @@ public final class Polygon: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Polygon else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var vertices: [Float?] {
|
||||
let ptr = spine_polygon_get_vertices(wrappee)
|
||||
guard let validPtr = ptr else { return [] }
|
||||
@ -3299,6 +3706,17 @@ public final class Bounds: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Bounds else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var x: Float {
|
||||
return spine_bounds_get_x(wrappee)
|
||||
}
|
||||
@ -3328,6 +3746,17 @@ public final class Vector: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Vector else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var x: Float {
|
||||
return spine_vector_get_x(wrappee)
|
||||
}
|
||||
@ -3349,6 +3778,17 @@ public final class Event: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Event else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var data: EventData {
|
||||
return .init(spine_event_get_data(wrappee))
|
||||
}
|
||||
@ -3416,6 +3856,17 @@ public final class Atlas: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Atlas else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var isPma: Bool {
|
||||
return spine_atlas_is_pma(wrappee) != 0
|
||||
}
|
||||
@ -3425,7 +3876,7 @@ public final class Atlas: NSObject {
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
public func load(atlasData: String?) -> Atlas {
|
||||
public static func load(atlasData: String?) -> Atlas {
|
||||
return .init(spine_atlas_load(atlasData))
|
||||
}
|
||||
|
||||
@ -3453,6 +3904,17 @@ public final class Color: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Color else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var r: Float {
|
||||
return spine_color_get_r(wrappee)
|
||||
}
|
||||
@ -3482,7 +3944,18 @@ public final class Bone: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public func setIsYDown(yDown: Bool) {
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Bone else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public static func setIsYDown(yDown: Bool) {
|
||||
spine_bone_set_is_y_down(yDown ? -1 : 0)
|
||||
}
|
||||
|
||||
@ -3801,6 +4274,17 @@ public final class Slot: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Slot else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var data: SlotData {
|
||||
return .init(spine_slot_get_data(wrappee))
|
||||
}
|
||||
@ -3870,6 +4354,17 @@ public final class Skin: NSObject {
|
||||
super.init()
|
||||
}
|
||||
|
||||
public override func isEqual(_ object: Any?) -> Bool {
|
||||
guard let other = object as? Skin else { return false }
|
||||
return self.wrappee == other.wrappee
|
||||
}
|
||||
|
||||
public override var hash: Int {
|
||||
var hasher = Hasher()
|
||||
hasher.combine(self.wrappee)
|
||||
return hasher.finalize()
|
||||
}
|
||||
|
||||
public var name: String? {
|
||||
return spine_skin_get_name(wrappee).flatMap { String(cString: $0) }
|
||||
}
|
||||
|
||||
14
spine-ios/Sources/SpineModule/SpineModule.swift
Normal file
14
spine-ios/Sources/SpineModule/SpineModule.swift
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// SpineModule.swift
|
||||
// spine-ios
|
||||
//
|
||||
// Created by 박병관 on 3/7/25.
|
||||
//
|
||||
|
||||
|
||||
#if canImport(Spine)
|
||||
@_exported import Spine
|
||||
#endif
|
||||
|
||||
@_exported import SpineCppLite
|
||||
@_exported import SpineShadersStructs
|
||||
@ -1,5 +1,5 @@
|
||||
ext {
|
||||
libgdxVersion = "1.12.2-SNAPSHOT"
|
||||
libgdxVersion = "1.13.2-SNAPSHOT"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
||||
@ -37,7 +37,6 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.SkeletonActor;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
|
||||
@ -73,7 +73,9 @@ public class AttachmentTimelineTests {
|
||||
timeline.setFrame(0, 0, "attachment1");
|
||||
timeline.setFrame(1, 0.5f, "attachment2");
|
||||
|
||||
Animation animation = new Animation("animation", Array.with((Timeline)timeline), 1);
|
||||
Array<Timeline> timelines = new Array(true, 1, Timeline[]::new);
|
||||
timelines.add(timeline);
|
||||
Animation animation = new Animation("animation", timelines, 1);
|
||||
animation.setDuration(1);
|
||||
|
||||
state = new AnimationState(new AnimationStateData(skeletonData));
|
||||
@ -92,8 +94,8 @@ public class AttachmentTimelineTests {
|
||||
private void test (float delta, Attachment attachment) {
|
||||
state.update(delta);
|
||||
state.apply(skeleton);
|
||||
if (slot.getAttachment() != attachment)
|
||||
throw new FailException("Wrong attachment: " + slot.getAttachment() + " != " + attachment);
|
||||
if (slot.getPose().getAttachment() != attachment)
|
||||
throw new FailException("Wrong attachment: " + slot.getPose().getAttachment() + " != " + attachment);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@ import com.badlogic.gdx.utils.Null;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.MixBlend;
|
||||
import com.esotericsoftware.spine.Animation.MixDirection;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.attachments.AttachmentLoader;
|
||||
import com.esotericsoftware.spine.attachments.BoundingBoxAttachment;
|
||||
import com.esotericsoftware.spine.attachments.ClippingAttachment;
|
||||
@ -76,14 +75,14 @@ public class BonePlotting {
|
||||
|
||||
SkeletonData skeletonData = json.readSkeletonData(new FileHandle("assets/spineboy/spineboy-ess.json"));
|
||||
Skeleton skeleton = new Skeleton(skeletonData);
|
||||
Bone bone = skeleton.findBone("gun-tip");
|
||||
BonePose bone = skeleton.findBone("gun-tip").getAppliedPose();
|
||||
|
||||
// Pose the skeleton at regular intervals throughout each animation.
|
||||
float fps = 1 / 15f;
|
||||
for (Animation animation : skeletonData.getAnimations()) {
|
||||
float time = 0;
|
||||
while (time < animation.getDuration()) {
|
||||
animation.apply(skeleton, time, time, false, null, 1, MixBlend.first, MixDirection.in);
|
||||
animation.apply(skeleton, time, time, false, null, 1, MixBlend.first, MixDirection.in, false);
|
||||
skeleton.update(fps);
|
||||
skeleton.updateWorldTransform(Physics.update);
|
||||
|
||||
|
||||
@ -54,7 +54,6 @@ import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.MixBlend;
|
||||
import com.esotericsoftware.spine.Animation.MixDirection;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.attachments.AtlasAttachmentLoader;
|
||||
import com.esotericsoftware.spine.attachments.RegionAttachment;
|
||||
import com.esotericsoftware.spine.attachments.Sequence;
|
||||
@ -116,8 +115,8 @@ public class Box2DExample extends ApplicationAdapter {
|
||||
// Create a body for each attachment. Note it is probably better to create just a few bodies rather than one for each
|
||||
// region attachment, but this is just an example.
|
||||
for (Slot slot : skeleton.getSlots()) {
|
||||
if (!(slot.getAttachment() instanceof Box2dAttachment)) continue;
|
||||
Box2dAttachment attachment = (Box2dAttachment)slot.getAttachment();
|
||||
if (!(slot.getPose().getAttachment() instanceof Box2dAttachment)) continue;
|
||||
Box2dAttachment attachment = (Box2dAttachment)slot.getPose().getAttachment();
|
||||
|
||||
PolygonShape boxPoly = new PolygonShape();
|
||||
boxPoly.setAsBox(attachment.getWidth() / 2 * attachment.getScaleX(), attachment.getHeight() / 2 * attachment.getScaleY(),
|
||||
@ -149,7 +148,7 @@ public class Box2DExample extends ApplicationAdapter {
|
||||
batch.setTransformMatrix(camera.view);
|
||||
batch.begin();
|
||||
|
||||
animation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in);
|
||||
animation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in, false);
|
||||
skeleton.x += 8 * delta;
|
||||
skeleton.update(delta);
|
||||
skeleton.updateWorldTransform(Physics.update);
|
||||
@ -159,12 +158,13 @@ public class Box2DExample extends ApplicationAdapter {
|
||||
|
||||
// Position the physics body for each attachment.
|
||||
for (Slot slot : skeleton.getSlots()) {
|
||||
if (!(slot.getAttachment() instanceof Box2dAttachment)) continue;
|
||||
Box2dAttachment attachment = (Box2dAttachment)slot.getAttachment();
|
||||
if (!(slot.getAppliedPose().getAttachment() instanceof Box2dAttachment)) continue;
|
||||
Box2dAttachment attachment = (Box2dAttachment)slot.getAppliedPose().getAttachment();
|
||||
if (attachment.body == null) continue;
|
||||
float x = slot.getBone().getWorldX();
|
||||
float y = slot.getBone().getWorldY();
|
||||
float rotation = slot.getBone().getWorldRotationX();
|
||||
BonePose bone = slot.getBone().getAppliedPose();
|
||||
float x = bone.getWorldX();
|
||||
float y = bone.getWorldY();
|
||||
float rotation = bone.getWorldRotationX();
|
||||
attachment.body.setTransform(x, y, rotation * MathUtils.degRad);
|
||||
}
|
||||
|
||||
|
||||
@ -177,7 +177,7 @@ public class EventTimelineTests {
|
||||
|
||||
int beforeCount = firedEvents.size;
|
||||
Array<Event> original = new Array(firedEvents);
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, firedEvents, 1, MixBlend.first, MixDirection.in);
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, firedEvents, 1, MixBlend.first, MixDirection.in, false);
|
||||
|
||||
while (beforeCount < firedEvents.size) {
|
||||
char fired = firedEvents.get(beforeCount).getData().getName().charAt(0);
|
||||
@ -186,7 +186,7 @@ public class EventTimelineTests {
|
||||
} else {
|
||||
if (firedEvents.size > eventsCount) {
|
||||
if (print) System.out.println(lastTimeLooped + "->" + timeLooped + ": " + fired + " == ?");
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, original, 1, MixBlend.first, MixDirection.in);
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, original, 1, MixBlend.first, MixDirection.in, false);
|
||||
fail("Too many events fired.");
|
||||
}
|
||||
}
|
||||
@ -194,7 +194,7 @@ public class EventTimelineTests {
|
||||
System.out.println(lastTimeLooped + "->" + timeLooped + ": " + fired + " == " + events[eventIndex]);
|
||||
}
|
||||
if (fired != events[eventIndex]) {
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, original, 1, MixBlend.first, MixDirection.in);
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, original, 1, MixBlend.first, MixDirection.in, false);
|
||||
fail("Wrong event fired.");
|
||||
}
|
||||
eventIndex++;
|
||||
@ -206,7 +206,7 @@ public class EventTimelineTests {
|
||||
i++;
|
||||
}
|
||||
if (firedEvents.size < eventsCount) {
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, firedEvents, 1, MixBlend.first, MixDirection.in);
|
||||
timeline.apply(skeleton, lastTimeLooped, timeLooped, firedEvents, 1, MixBlend.first, MixDirection.in, false);
|
||||
if (print) System.out.println(firedEvents);
|
||||
fail("Event not fired: " + events[eventIndex] + ", " + frames[eventIndex]);
|
||||
}
|
||||
|
||||
@ -42,7 +42,6 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.graphics.glutils.FrameBuffer;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates rendering an animation to a frame buffer (FBO) and then rendering the FBO to the screen. */
|
||||
|
||||
@ -38,7 +38,6 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.math.Vector3;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates how to let the target bone of an IK constraint follow the mouse or touch position, which in turn repositions part
|
||||
@ -107,8 +106,8 @@ public class IKTest extends ApplicationAdapter {
|
||||
|
||||
Bone crosshair = skeleton.findBone("crosshair"); // Should be cached.
|
||||
boneCoords.set(cameraCoords.x, cameraCoords.y);
|
||||
crosshair.getParent().worldToLocal(boneCoords); // camera space to local bone space
|
||||
crosshair.setPosition(boneCoords.x, boneCoords.y); // override the crosshair position
|
||||
crosshair.getParent().getAppliedPose().worldToLocal(boneCoords); // camera space to local bone space
|
||||
crosshair.getPose().setPosition(boneCoords.x, boneCoords.y); // override the crosshair position
|
||||
|
||||
// Calculate final world transform with the crosshair bone set to the mouse cursor position. Update physics this time.
|
||||
skeleton.updateWorldTransform(Physics.update);
|
||||
|
||||
@ -37,8 +37,6 @@ import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Demonstrates creating and configuring a new skin at runtime. */
|
||||
public class MixAndMatchTest extends ApplicationAdapter {
|
||||
OrthographicCamera camera;
|
||||
|
||||
@ -58,7 +58,6 @@ import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.MixBlend;
|
||||
import com.esotericsoftware.spine.Animation.MixDirection;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Demonstrates simplistic usage of lighting with normal maps.
|
||||
* <p>
|
||||
@ -107,7 +106,7 @@ public class NormalMapTest extends ApplicationAdapter {
|
||||
if (animation == null) animation = skeletonData.getAnimations().first();
|
||||
|
||||
skeleton = new Skeleton(skeletonData);
|
||||
skeleton.setToSetupPose();
|
||||
skeleton.setupPose();
|
||||
skeleton = new Skeleton(skeleton);
|
||||
skeleton.setX(ui.prefs.getFloat("x", Gdx.graphics.getWidth() / 2));
|
||||
skeleton.setY(ui.prefs.getFloat("y", Gdx.graphics.getHeight() / 4));
|
||||
@ -137,7 +136,7 @@ public class NormalMapTest extends ApplicationAdapter {
|
||||
float lastTime = time;
|
||||
float delta = Gdx.graphics.getDeltaTime();
|
||||
time += delta;
|
||||
if (animation != null) animation.apply(skeleton, lastTime, time, true, null, 1, MixBlend.first, MixDirection.in);
|
||||
if (animation != null) animation.apply(skeleton, lastTime, time, true, null, 1, MixBlend.first, MixDirection.in, false);
|
||||
skeleton.update(delta);
|
||||
skeleton.updateWorldTransform(Physics.update);
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates loading, animating, and rendering a skeleton.
|
||||
|
||||
@ -37,7 +37,6 @@ import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates loading, animating, and rendering a skeleton.
|
||||
|
||||
@ -35,7 +35,7 @@ import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates loading, animating, and rendering a skeleton.
|
||||
|
||||
@ -35,7 +35,7 @@ import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates loading, animating, and rendering a skeleton.
|
||||
|
||||
@ -48,7 +48,6 @@ import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.MixBlend;
|
||||
import com.esotericsoftware.spine.Animation.MixDirection;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates rendering an animation to a frame buffer (FBO) and then writing each frame as a PNG. */
|
||||
@ -104,7 +103,7 @@ public class PngExportTest extends ApplicationAdapter {
|
||||
float fps = 1 / 15f, time = 0;
|
||||
int frame = 1;
|
||||
while (time < animation.getDuration()) {
|
||||
animation.apply(skeleton, time, time, false, null, 1, MixBlend.first, MixDirection.in);
|
||||
animation.apply(skeleton, time, time, false, null, 1, MixBlend.first, MixDirection.in, false);
|
||||
skeleton.update(fps);
|
||||
skeleton.updateWorldTransform(Physics.update);
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
/** Demonstrates loading, animating, and rendering a skeleton.
|
||||
|
||||
@ -41,7 +41,6 @@ import com.badlogic.gdx.math.Vector3;
|
||||
|
||||
import com.esotericsoftware.spine.AnimationState.AnimationStateListener;
|
||||
import com.esotericsoftware.spine.AnimationState.TrackEntry;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.attachments.BoundingBoxAttachment;
|
||||
import com.esotericsoftware.spine.utils.TwoColorPolygonBatch;
|
||||
|
||||
@ -123,14 +122,14 @@ public class SimpleTest2 extends ApplicationAdapter {
|
||||
BoundingBoxAttachment hit = bounds.containsPoint(point.x, point.y); // Check if inside a bounding box.
|
||||
if (hit != null) {
|
||||
System.out.println("hit: " + hit);
|
||||
skeleton.findSlot("head").getColor().set(Color.RED); // Turn head red until touchUp.
|
||||
skeleton.findSlot("head").getPose().getColor().set(Color.RED); // Turn head red until touchUp.
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean touchUp (int screenX, int screenY, int pointer, int button) {
|
||||
skeleton.findSlot("head").getColor().set(Color.WHITE);
|
||||
skeleton.findSlot("head").getPose().getColor().set(Color.WHITE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -37,8 +37,6 @@ import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Demonstrates applying multiple animations at once using {@link AnimationState} tracks. */
|
||||
public class SimpleTest3 extends ApplicationAdapter {
|
||||
OrthographicCamera camera;
|
||||
|
||||
@ -38,7 +38,6 @@ import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.utils.SkeletonDataLoader;
|
||||
import com.esotericsoftware.spine.utils.SkeletonDataLoader.SkeletonDataParameter;
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.attachments.SkeletonAttachment;
|
||||
|
||||
/** Demonstrates using {@link SkeletonAttachment} to use an entire skeleton as an attachment. */
|
||||
@ -48,7 +47,7 @@ public class SkeletonAttachmentTest extends ApplicationAdapter {
|
||||
|
||||
Skeleton spineboy, goblin;
|
||||
AnimationState spineboyState, goblinState;
|
||||
Bone attachmentBone;
|
||||
BonePose attachmentBone;
|
||||
|
||||
public void create () {
|
||||
camera = new OrthographicCamera();
|
||||
@ -77,7 +76,7 @@ public class SkeletonAttachmentTest extends ApplicationAdapter {
|
||||
SkeletonData skeletonData = json.readSkeletonData(Gdx.files.internal("goblins/goblins-pro.json"));
|
||||
goblin = new Skeleton(skeletonData);
|
||||
goblin.setSkin("goblin");
|
||||
goblin.setSlotsToSetupPose();
|
||||
goblin.setupPoseSlots();
|
||||
|
||||
goblinState = new AnimationState(new AnimationStateData(skeletonData));
|
||||
goblinState.setAnimation(0, "walk", true);
|
||||
@ -86,8 +85,8 @@ public class SkeletonAttachmentTest extends ApplicationAdapter {
|
||||
SkeletonAttachment skeletonAttachment = new SkeletonAttachment("goblin");
|
||||
skeletonAttachment.setSkeleton(goblin);
|
||||
Slot slot = spineboy.findSlot("front-upper-arm");
|
||||
slot.setAttachment(skeletonAttachment);
|
||||
attachmentBone = slot.getBone();
|
||||
slot.getPose().setAttachment(skeletonAttachment);
|
||||
attachmentBone = slot.getBone().getAppliedPose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,8 +39,6 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Boilerplate for basic skeleton rendering, used for various testing. */
|
||||
public class TestHarness extends ApplicationAdapter {
|
||||
static String JSON = "raptor/raptor-pro.json";
|
||||
|
||||
@ -39,7 +39,6 @@ import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.MixBlend;
|
||||
import com.esotericsoftware.spine.Animation.MixDirection;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Demonstrates using the timeline API. See {@link SimpleTest1} for a higher level API using {@link AnimationState}.
|
||||
* <p>
|
||||
@ -109,23 +108,24 @@ public class TimelineApiTest extends ApplicationAdapter {
|
||||
skeleton.setX(-50);
|
||||
} else if (time > beforeJump + jump) {
|
||||
// just walk after jump
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in);
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in, false);
|
||||
} else if (time > blendOutStart) {
|
||||
// blend out jump
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in);
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in, false);
|
||||
jumpAnimation.apply(skeleton, time - beforeJump, time - beforeJump, false, events, 1 - (time - blendOutStart) / blendOut,
|
||||
MixBlend.first, MixDirection.in);
|
||||
MixBlend.first, MixDirection.in, false);
|
||||
} else if (time > beforeJump + blendIn) {
|
||||
// just jump
|
||||
jumpAnimation.apply(skeleton, time - beforeJump, time - beforeJump, false, events, 1, MixBlend.first, MixDirection.in);
|
||||
jumpAnimation.apply(skeleton, time - beforeJump, time - beforeJump, false, events, 1, MixBlend.first, MixDirection.in,
|
||||
false);
|
||||
} else if (time > beforeJump) {
|
||||
// blend in jump
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in);
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in, false);
|
||||
jumpAnimation.apply(skeleton, time - beforeJump, time - beforeJump, false, events, (time - beforeJump) / blendIn,
|
||||
MixBlend.first, MixDirection.in);
|
||||
MixBlend.first, MixDirection.in, false);
|
||||
} else {
|
||||
// just walk before jump
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in);
|
||||
walkAnimation.apply(skeleton, time, time, true, events, 1, MixBlend.first, MixDirection.in, false);
|
||||
}
|
||||
|
||||
skeleton.update(delta);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@ import com.esotericsoftware.spine.Animation.Timeline;
|
||||
* <p>
|
||||
* See <a href='https://esotericsoftware.com/spine-applying-animations/'>Applying Animations</a> in the Spine Runtimes Guide. */
|
||||
public class AnimationState {
|
||||
static final Animation emptyAnimation = new Animation("<empty>", new Array(0), 0);
|
||||
static final Animation emptyAnimation = new Animation("<empty>", new Array(true, 0, Timeline[]::new), 0);
|
||||
|
||||
/** 1) A previously applied timeline has set this property.<br>
|
||||
* Result: Mix from the current pose to the timeline pose. */
|
||||
@ -87,9 +87,9 @@ public class AnimationState {
|
||||
static private final int SETUP = 1, CURRENT = 2;
|
||||
|
||||
private AnimationStateData data;
|
||||
final Array<TrackEntry> tracks = new Array();
|
||||
private final Array<Event> events = new Array();
|
||||
final SnapshotArray<AnimationStateListener> listeners = new SnapshotArray();
|
||||
final Array<TrackEntry> tracks = new Array(true, 4, TrackEntry[]::new);
|
||||
private final Array<Event> events = new Array(true, 4, Event[]::new);
|
||||
final SnapshotArray<AnimationStateListener> listeners = new SnapshotArray(true, 16, AnimationStateListener[]::new);
|
||||
private final EventQueue queue = new EventQueue();
|
||||
private final ObjectSet<String> propertyIds = new ObjectSet();
|
||||
boolean animationsChanged;
|
||||
@ -114,9 +114,9 @@ public class AnimationState {
|
||||
/** Increments each track entry {@link TrackEntry#getTrackTime()}, setting queued animations as current if needed. */
|
||||
public void update (float delta) {
|
||||
delta *= timeScale;
|
||||
Object[] tracks = this.tracks.items;
|
||||
TrackEntry[] tracks = this.tracks.items;
|
||||
for (int i = 0, n = this.tracks.size; i < n; i++) {
|
||||
var current = (TrackEntry)tracks[i];
|
||||
TrackEntry current = tracks[i];
|
||||
if (current == null) continue;
|
||||
|
||||
current.animationLast = current.nextAnimationLast;
|
||||
@ -206,9 +206,9 @@ public class AnimationState {
|
||||
|
||||
Array<Event> events = this.events;
|
||||
boolean applied = false;
|
||||
Object[] tracks = this.tracks.items;
|
||||
TrackEntry[] tracks = this.tracks.items;
|
||||
for (int i = 0, n = this.tracks.size; i < n; i++) {
|
||||
var current = (TrackEntry)tracks[i];
|
||||
TrackEntry current = tracks[i];
|
||||
if (current == null || current.delay > 0) continue;
|
||||
applied = true;
|
||||
|
||||
@ -231,15 +231,15 @@ public class AnimationState {
|
||||
applyEvents = null;
|
||||
}
|
||||
int timelineCount = current.animation.timelines.size;
|
||||
Object[] timelines = current.animation.timelines.items;
|
||||
Timeline[] timelines = current.animation.timelines.items;
|
||||
if ((i == 0 && alpha == 1) || blend == MixBlend.add) {
|
||||
if (i == 0) attachments = true;
|
||||
for (int ii = 0; ii < timelineCount; ii++) {
|
||||
Object timeline = timelines[ii];
|
||||
Timeline timeline = timelines[ii];
|
||||
if (timeline instanceof AttachmentTimeline attachmentTimeline)
|
||||
applyAttachmentTimeline(attachmentTimeline, skeleton, applyTime, blend, attachments);
|
||||
else
|
||||
((Timeline)timeline).apply(skeleton, animationLast, applyTime, applyEvents, alpha, blend, MixDirection.in);
|
||||
timeline.apply(skeleton, animationLast, applyTime, applyEvents, alpha, blend, MixDirection.in, false);
|
||||
}
|
||||
} else {
|
||||
int[] timelineMode = current.timelineMode.items;
|
||||
@ -250,7 +250,7 @@ public class AnimationState {
|
||||
float[] timelinesRotation = current.timelinesRotation.items;
|
||||
|
||||
for (int ii = 0; ii < timelineCount; ii++) {
|
||||
var timeline = (Timeline)timelines[ii];
|
||||
Timeline timeline = timelines[ii];
|
||||
MixBlend timelineBlend = timelineMode[ii] == SUBSEQUENT ? blend : MixBlend.setup;
|
||||
if (!shortestRotation && timeline instanceof RotateTimeline rotateTimeline) {
|
||||
applyRotateTimeline(rotateTimeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, ii << 1,
|
||||
@ -258,7 +258,7 @@ public class AnimationState {
|
||||
} else if (timeline instanceof AttachmentTimeline attachmentTimeline)
|
||||
applyAttachmentTimeline(attachmentTimeline, skeleton, applyTime, blend, attachments);
|
||||
else
|
||||
timeline.apply(skeleton, animationLast, applyTime, applyEvents, alpha, timelineBlend, MixDirection.in);
|
||||
timeline.apply(skeleton, animationLast, applyTime, applyEvents, alpha, timelineBlend, MixDirection.in, false);
|
||||
}
|
||||
}
|
||||
queueEvents(current, animationTime);
|
||||
@ -271,12 +271,12 @@ public class AnimationState {
|
||||
// subsequent timelines see any deform, but the subsequent timelines don't set an attachment (eg they are also mixing out or
|
||||
// the time is before the first key).
|
||||
int setupState = unkeyedState + SETUP;
|
||||
Object[] slots = skeleton.slots.items;
|
||||
Slot[] slots = skeleton.slots.items;
|
||||
for (int i = 0, n = skeleton.slots.size; i < n; i++) {
|
||||
var slot = (Slot)slots[i];
|
||||
var slot = slots[i];
|
||||
if (slot.attachmentState == setupState) {
|
||||
String attachmentName = slot.data.attachmentName;
|
||||
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
|
||||
slot.pose.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
|
||||
}
|
||||
}
|
||||
unkeyedState += 2; // Increasing after each use avoids the need to reset attachmentState for every slot.
|
||||
@ -301,7 +301,7 @@ public class AnimationState {
|
||||
|
||||
boolean attachments = mix < from.mixAttachmentThreshold, drawOrder = mix < from.mixDrawOrderThreshold;
|
||||
int timelineCount = from.animation.timelines.size;
|
||||
Object[] timelines = from.animation.timelines.items;
|
||||
Timeline[] timelines = from.animation.timelines.items;
|
||||
float alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);
|
||||
float animationLast = from.animationLast, animationTime = from.getAnimationTime(), applyTime = animationTime;
|
||||
Array<Event> events = null;
|
||||
@ -313,10 +313,10 @@ public class AnimationState {
|
||||
|
||||
if (blend == MixBlend.add) {
|
||||
for (int i = 0; i < timelineCount; i++)
|
||||
((Timeline)timelines[i]).apply(skeleton, animationLast, applyTime, events, alphaMix, blend, MixDirection.out);
|
||||
timelines[i].apply(skeleton, animationLast, applyTime, events, alphaMix, blend, MixDirection.out, false);
|
||||
} else {
|
||||
int[] timelineMode = from.timelineMode.items;
|
||||
Object[] timelineHoldMix = from.timelineHoldMix.items;
|
||||
TrackEntry[] timelineHoldMix = from.timelineHoldMix.items;
|
||||
|
||||
boolean shortestRotation = from.shortestRotation;
|
||||
boolean firstFrame = !shortestRotation && from.timelinesRotation.size != timelineCount << 1;
|
||||
@ -325,7 +325,7 @@ public class AnimationState {
|
||||
|
||||
from.totalAlpha = 0;
|
||||
for (int i = 0; i < timelineCount; i++) {
|
||||
var timeline = (Timeline)timelines[i];
|
||||
Timeline timeline = timelines[i];
|
||||
MixDirection direction = MixDirection.out;
|
||||
MixBlend timelineBlend;
|
||||
float alpha;
|
||||
@ -349,7 +349,7 @@ public class AnimationState {
|
||||
break;
|
||||
default: // HOLD_MIX
|
||||
timelineBlend = MixBlend.setup;
|
||||
var holdMix = (TrackEntry)timelineHoldMix[i];
|
||||
TrackEntry holdMix = timelineHoldMix[i];
|
||||
alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);
|
||||
break;
|
||||
}
|
||||
@ -363,7 +363,7 @@ public class AnimationState {
|
||||
else {
|
||||
if (drawOrder && timeline instanceof DrawOrderTimeline && timelineBlend == MixBlend.setup)
|
||||
direction = MixDirection.in;
|
||||
timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction);
|
||||
timeline.apply(skeleton, animationLast, applyTime, events, alpha, timelineBlend, direction, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -383,7 +383,7 @@ public class AnimationState {
|
||||
private void applyAttachmentTimeline (AttachmentTimeline timeline, Skeleton skeleton, float time, MixBlend blend,
|
||||
boolean attachments) {
|
||||
|
||||
Slot slot = skeleton.slots.get(timeline.slotIndex);
|
||||
Slot slot = skeleton.slots.items[timeline.slotIndex];
|
||||
if (!slot.bone.active) return;
|
||||
|
||||
if (time < timeline.frames[0]) { // Time is before first frame.
|
||||
@ -397,7 +397,7 @@ public class AnimationState {
|
||||
}
|
||||
|
||||
private void setAttachment (Skeleton skeleton, Slot slot, String attachmentName, boolean attachments) {
|
||||
slot.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
|
||||
slot.pose.setAttachment(attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));
|
||||
if (attachments) slot.attachmentState = unkeyedState + CURRENT;
|
||||
}
|
||||
|
||||
@ -409,28 +409,29 @@ public class AnimationState {
|
||||
if (firstFrame) timelinesRotation[i] = 0;
|
||||
|
||||
if (alpha == 1) {
|
||||
timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.in);
|
||||
timeline.apply(skeleton, 0, time, null, 1, blend, MixDirection.in, false);
|
||||
return;
|
||||
}
|
||||
|
||||
Bone bone = skeleton.bones.get(timeline.boneIndex);
|
||||
Bone bone = skeleton.bones.items[timeline.boneIndex];
|
||||
if (!bone.active) return;
|
||||
BoneLocal pose = bone.pose, setup = bone.data.setup;
|
||||
float[] frames = timeline.frames;
|
||||
float r1, r2;
|
||||
if (time < frames[0]) { // Time is before first frame.
|
||||
switch (blend) {
|
||||
case setup:
|
||||
bone.rotation = bone.data.rotation;
|
||||
pose.rotation = setup.rotation;
|
||||
// Fall through.
|
||||
default:
|
||||
return;
|
||||
case first:
|
||||
r1 = bone.rotation;
|
||||
r2 = bone.data.rotation;
|
||||
r1 = pose.rotation;
|
||||
r2 = setup.rotation;
|
||||
}
|
||||
} else {
|
||||
r1 = blend == MixBlend.setup ? bone.data.rotation : bone.rotation;
|
||||
r2 = bone.data.rotation + timeline.getCurveValue(time);
|
||||
r1 = blend == MixBlend.setup ? setup.rotation : pose.rotation;
|
||||
r2 = setup.rotation + timeline.getCurveValue(time);
|
||||
}
|
||||
|
||||
// Mix between rotations using the direction of the shortest route on the first frame.
|
||||
@ -463,7 +464,7 @@ public class AnimationState {
|
||||
timelinesRotation[i] = total;
|
||||
}
|
||||
timelinesRotation[i + 1] = diff;
|
||||
bone.rotation = r1 + total * alpha;
|
||||
pose.rotation = r1 + total * alpha;
|
||||
}
|
||||
|
||||
private void queueEvents (TrackEntry entry, float animationTime) {
|
||||
@ -472,10 +473,10 @@ public class AnimationState {
|
||||
float trackLastWrapped = entry.trackLast % duration;
|
||||
|
||||
// Queue events before complete.
|
||||
Object[] events = this.events.items;
|
||||
Event[] events = this.events.items;
|
||||
int i = 0, n = this.events.size;
|
||||
for (; i < n; i++) {
|
||||
var event = (Event)events[i];
|
||||
Event event = events[i];
|
||||
if (event.time < trackLastWrapped) break;
|
||||
if (event.time > animationEnd) continue; // Discard events outside animation start/end.
|
||||
queue.event(entry, event);
|
||||
@ -496,7 +497,7 @@ public class AnimationState {
|
||||
|
||||
// Queue events after complete.
|
||||
for (; i < n; i++) {
|
||||
var event = (Event)events[i];
|
||||
Event event = events[i];
|
||||
if (event.time < animationStart) continue; // Discard events outside animation start/end.
|
||||
queue.event(entry, event);
|
||||
}
|
||||
@ -523,7 +524,7 @@ public class AnimationState {
|
||||
public void clearTrack (int trackIndex) {
|
||||
if (trackIndex < 0) throw new IllegalArgumentException("trackIndex must be >= 0.");
|
||||
if (trackIndex >= tracks.size) return;
|
||||
TrackEntry current = tracks.get(trackIndex);
|
||||
TrackEntry current = tracks.items[trackIndex];
|
||||
if (current == null) return;
|
||||
|
||||
queue.end(current);
|
||||
@ -540,14 +541,14 @@ public class AnimationState {
|
||||
entry = from;
|
||||
}
|
||||
|
||||
tracks.set(current.trackIndex, null);
|
||||
tracks.items[current.trackIndex] = null;
|
||||
|
||||
queue.drain();
|
||||
}
|
||||
|
||||
private void setCurrent (int index, TrackEntry current, boolean interrupt) {
|
||||
TrackEntry from = expandToIndex(index);
|
||||
tracks.set(index, current);
|
||||
tracks.items[index] = current;
|
||||
current.previous = null;
|
||||
|
||||
if (from != null) {
|
||||
@ -591,7 +592,7 @@ public class AnimationState {
|
||||
if (current != null) {
|
||||
if (current.nextTrackLast == -1 && current.animation == animation) {
|
||||
// Don't mix from an entry that was never applied.
|
||||
tracks.set(trackIndex, current.mixingFrom);
|
||||
tracks.items[trackIndex] = current.mixingFrom;
|
||||
queue.interrupt(current);
|
||||
queue.end(current);
|
||||
clearNext(current);
|
||||
@ -701,9 +702,9 @@ public class AnimationState {
|
||||
public void setEmptyAnimations (float mixDuration) {
|
||||
boolean oldDrainDisabled = queue.drainDisabled;
|
||||
queue.drainDisabled = true;
|
||||
Object[] tracks = this.tracks.items;
|
||||
TrackEntry[] tracks = this.tracks.items;
|
||||
for (int i = 0, n = this.tracks.size; i < n; i++) {
|
||||
var current = (TrackEntry)tracks[i];
|
||||
TrackEntry current = tracks[i];
|
||||
if (current != null) setEmptyAnimation(current.trackIndex, mixDuration);
|
||||
}
|
||||
queue.drainDisabled = oldDrainDisabled;
|
||||
@ -711,7 +712,7 @@ public class AnimationState {
|
||||
}
|
||||
|
||||
private TrackEntry expandToIndex (int index) {
|
||||
if (index < tracks.size) return tracks.get(index);
|
||||
if (index < tracks.size) return tracks.items[index];
|
||||
tracks.ensureCapacity(index - tracks.size + 1);
|
||||
tracks.size = index + 1;
|
||||
return null;
|
||||
@ -769,9 +770,9 @@ public class AnimationState {
|
||||
// Process in the order that animations are applied.
|
||||
propertyIds.clear(2048);
|
||||
int n = tracks.size;
|
||||
Object[] tracks = this.tracks.items;
|
||||
TrackEntry[] tracks = this.tracks.items;
|
||||
for (int i = 0; i < n; i++) {
|
||||
var entry = (TrackEntry)tracks[i];
|
||||
TrackEntry entry = tracks[i];
|
||||
if (entry == null) continue;
|
||||
while (entry.mixingFrom != null) // Move to last entry, then iterate in reverse.
|
||||
entry = entry.mixingFrom;
|
||||
@ -784,22 +785,22 @@ public class AnimationState {
|
||||
|
||||
private void computeHold (TrackEntry entry) {
|
||||
TrackEntry to = entry.mixingTo;
|
||||
Object[] timelines = entry.animation.timelines.items;
|
||||
Timeline[] timelines = entry.animation.timelines.items;
|
||||
int timelinesCount = entry.animation.timelines.size;
|
||||
int[] timelineMode = entry.timelineMode.setSize(timelinesCount);
|
||||
entry.timelineHoldMix.clear();
|
||||
Object[] timelineHoldMix = entry.timelineHoldMix.setSize(timelinesCount);
|
||||
TrackEntry[] timelineHoldMix = entry.timelineHoldMix.setSize(timelinesCount);
|
||||
ObjectSet<String> propertyIds = this.propertyIds;
|
||||
|
||||
if (to != null && to.holdPrevious) {
|
||||
for (int i = 0; i < timelinesCount; i++)
|
||||
timelineMode[i] = propertyIds.addAll(((Timeline)timelines[i]).getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;
|
||||
timelineMode[i] = propertyIds.addAll(timelines[i].getPropertyIds()) ? HOLD_FIRST : HOLD_SUBSEQUENT;
|
||||
return;
|
||||
}
|
||||
|
||||
outer:
|
||||
for (int i = 0; i < timelinesCount; i++) {
|
||||
var timeline = (Timeline)timelines[i];
|
||||
Timeline timeline = timelines[i];
|
||||
String[] ids = timeline.getPropertyIds();
|
||||
if (!propertyIds.addAll(ids))
|
||||
timelineMode[i] = SUBSEQUENT;
|
||||
@ -825,7 +826,7 @@ public class AnimationState {
|
||||
public @Null TrackEntry getCurrent (int trackIndex) {
|
||||
if (trackIndex < 0) throw new IllegalArgumentException("trackIndex must be >= 0.");
|
||||
if (trackIndex >= tracks.size) return null;
|
||||
return tracks.get(trackIndex);
|
||||
return tracks.items[trackIndex];
|
||||
}
|
||||
|
||||
/** Adds a listener to receive events for all track entries. */
|
||||
@ -880,9 +881,9 @@ public class AnimationState {
|
||||
|
||||
public String toString () {
|
||||
var buffer = new StringBuilder(64);
|
||||
Object[] tracks = this.tracks.items;
|
||||
TrackEntry[] tracks = this.tracks.items;
|
||||
for (int i = 0, n = this.tracks.size; i < n; i++) {
|
||||
var entry = (TrackEntry)tracks[i];
|
||||
TrackEntry entry = tracks[i];
|
||||
if (entry == null) continue;
|
||||
if (buffer.length() > 0) buffer.append(", ");
|
||||
buffer.append(entry.toString());
|
||||
@ -907,7 +908,7 @@ public class AnimationState {
|
||||
MixBlend mixBlend = MixBlend.replace;
|
||||
|
||||
final IntArray timelineMode = new IntArray();
|
||||
final Array<TrackEntry> timelineHoldMix = new Array();
|
||||
final Array<TrackEntry> timelineHoldMix = new Array(true, 8, TrackEntry[]::new);
|
||||
final FloatArray timelinesRotation = new FloatArray();
|
||||
|
||||
public void reset () {
|
||||
@ -1363,43 +1364,44 @@ public class AnimationState {
|
||||
drainDisabled = true;
|
||||
|
||||
SnapshotArray<AnimationStateListener> listenersArray = AnimationState.this.listeners;
|
||||
Object[] objects = this.objects.items;
|
||||
for (int i = 0; i < this.objects.size; i += 2) {
|
||||
var type = (EventType)objects.get(i);
|
||||
var entry = (TrackEntry)objects.get(i + 1);
|
||||
int listenersCount = listenersArray.size;
|
||||
Object[] listeners = listenersArray.begin();
|
||||
var type = (EventType)objects[i];
|
||||
var entry = (TrackEntry)objects[i + 1];
|
||||
int nn = listenersArray.size;
|
||||
AnimationStateListener[] listeners = listenersArray.begin();
|
||||
switch (type) {
|
||||
case start:
|
||||
if (entry.listener != null) entry.listener.start(entry);
|
||||
for (int ii = 0; ii < listenersCount; ii++)
|
||||
((AnimationStateListener)listeners[ii]).start(entry);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
listeners[ii].start(entry);
|
||||
break;
|
||||
case interrupt:
|
||||
if (entry.listener != null) entry.listener.interrupt(entry);
|
||||
for (int ii = 0; ii < listenersCount; ii++)
|
||||
((AnimationStateListener)listeners[ii]).interrupt(entry);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
listeners[ii].interrupt(entry);
|
||||
break;
|
||||
case end:
|
||||
if (entry.listener != null) entry.listener.end(entry);
|
||||
for (int ii = 0; ii < listenersCount; ii++)
|
||||
((AnimationStateListener)listeners[ii]).end(entry);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
listeners[ii].end(entry);
|
||||
// Fall through.
|
||||
case dispose:
|
||||
if (entry.listener != null) entry.listener.dispose(entry);
|
||||
for (int ii = 0; ii < listenersCount; ii++)
|
||||
((AnimationStateListener)listeners[ii]).dispose(entry);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
listeners[ii].dispose(entry);
|
||||
trackEntryPool.free(entry);
|
||||
break;
|
||||
case complete:
|
||||
if (entry.listener != null) entry.listener.complete(entry);
|
||||
for (int ii = 0; ii < listenersCount; ii++)
|
||||
((AnimationStateListener)listeners[ii]).complete(entry);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
listeners[ii].complete(entry);
|
||||
break;
|
||||
case event:
|
||||
var event = (Event)objects.get(i++ + 2);
|
||||
var event = (Event)objects[i++ + 2];
|
||||
if (entry.listener != null) entry.listener.event(entry, event);
|
||||
for (int ii = 0; ii < listenersCount; ii++)
|
||||
((AnimationStateListener)listeners[ii]).event(entry, event);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
listeners[ii].event(entry, event);
|
||||
break;
|
||||
}
|
||||
listenersArray.end();
|
||||
|
||||
@ -29,207 +29,31 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
import static com.badlogic.gdx.math.Matrix3.*;
|
||||
import static com.esotericsoftware.spine.utils.SpineUtils.*;
|
||||
|
||||
import com.badlogic.gdx.math.Matrix3;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Null;
|
||||
|
||||
import com.esotericsoftware.spine.BoneData.Inherit;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Stores a bone's current pose.
|
||||
// BOZO - Update javadocs.
|
||||
/** The current pose for a bone, before constraints are applied.
|
||||
* <p>
|
||||
* A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a
|
||||
* local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a
|
||||
* constraint or application code modifies the world transform after it was computed from the local transform. */
|
||||
public class Bone implements Updatable {
|
||||
final BoneData data;
|
||||
final Skeleton skeleton;
|
||||
public class Bone extends PosedActive<BoneData, BoneLocal, BonePose> {
|
||||
@Null final Bone parent;
|
||||
final Array<Bone> children = new Array();
|
||||
float x, y, rotation, scaleX, scaleY, shearX, shearY;
|
||||
float ax, ay, arotation, ascaleX, ascaleY, ashearX, ashearY;
|
||||
float a, b, worldX;
|
||||
float c, d, worldY;
|
||||
Inherit inherit;
|
||||
final Array<Bone> children = new Array(true, 4, Bone[]::new);
|
||||
boolean sorted;
|
||||
|
||||
boolean sorted, active;
|
||||
|
||||
public Bone (BoneData data, Skeleton skeleton, @Null Bone parent) {
|
||||
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
this.data = data;
|
||||
this.skeleton = skeleton;
|
||||
public Bone (BoneData data, @Null Bone parent) {
|
||||
super(data, new BonePose(), new BonePose());
|
||||
this.parent = parent;
|
||||
setToSetupPose();
|
||||
applied.bone = this;
|
||||
constrained.bone = this;
|
||||
}
|
||||
|
||||
/** Copy constructor. Does not copy the {@link #getChildren()} bones. */
|
||||
public Bone (Bone bone, Skeleton skeleton, @Null Bone parent) {
|
||||
if (bone == null) throw new IllegalArgumentException("bone cannot be null.");
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
this.skeleton = skeleton;
|
||||
this.parent = parent;
|
||||
data = bone.data;
|
||||
x = bone.x;
|
||||
y = bone.y;
|
||||
rotation = bone.rotation;
|
||||
scaleX = bone.scaleX;
|
||||
scaleY = bone.scaleY;
|
||||
shearX = bone.shearX;
|
||||
shearY = bone.shearY;
|
||||
inherit = bone.inherit;
|
||||
}
|
||||
|
||||
/** Computes the world transform using the parent bone and this bone's local applied transform. */
|
||||
public void update (Physics physics) {
|
||||
updateWorldTransform(ax, ay, arotation, ascaleX, ascaleY, ashearX, ashearY);
|
||||
}
|
||||
|
||||
/** Computes the world transform using the parent bone and this bone's local transform.
|
||||
* <p>
|
||||
* See {@link #updateWorldTransform(float, float, float, float, float, float, float)}. */
|
||||
public void updateWorldTransform () {
|
||||
updateWorldTransform(x, y, rotation, scaleX, scaleY, shearX, shearY);
|
||||
}
|
||||
|
||||
/** Computes the world transform using the parent bone and the specified local transform. The applied transform is set to the
|
||||
* specified local transform. Child bones are not updated.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
public void updateWorldTransform (float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY) {
|
||||
ax = x;
|
||||
ay = y;
|
||||
arotation = rotation;
|
||||
ascaleX = scaleX;
|
||||
ascaleY = scaleY;
|
||||
ashearX = shearX;
|
||||
ashearY = shearY;
|
||||
|
||||
Bone parent = this.parent;
|
||||
if (parent == null) { // Root bone.
|
||||
Skeleton skeleton = this.skeleton;
|
||||
float sx = skeleton.scaleX, sy = skeleton.scaleY;
|
||||
float rx = (rotation + shearX) * degRad;
|
||||
float ry = (rotation + 90 + shearY) * degRad;
|
||||
a = cos(rx) * scaleX * sx;
|
||||
b = cos(ry) * scaleY * sx;
|
||||
c = sin(rx) * scaleX * sy;
|
||||
d = sin(ry) * scaleY * sy;
|
||||
worldX = x * sx + skeleton.x;
|
||||
worldY = y * sy + skeleton.y;
|
||||
return;
|
||||
}
|
||||
|
||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
|
||||
worldX = pa * x + pb * y + parent.worldX;
|
||||
worldY = pc * x + pd * y + parent.worldY;
|
||||
|
||||
switch (inherit) {
|
||||
case normal -> {
|
||||
float rx = (rotation + shearX) * degRad;
|
||||
float ry = (rotation + 90 + shearY) * degRad;
|
||||
float la = cos(rx) * scaleX;
|
||||
float lb = cos(ry) * scaleY;
|
||||
float lc = sin(rx) * scaleX;
|
||||
float ld = sin(ry) * scaleY;
|
||||
a = pa * la + pb * lc;
|
||||
b = pa * lb + pb * ld;
|
||||
c = pc * la + pd * lc;
|
||||
d = pc * lb + pd * ld;
|
||||
return;
|
||||
}
|
||||
case onlyTranslation -> {
|
||||
float rx = (rotation + shearX) * degRad;
|
||||
float ry = (rotation + 90 + shearY) * degRad;
|
||||
a = cos(rx) * scaleX;
|
||||
b = cos(ry) * scaleY;
|
||||
c = sin(rx) * scaleX;
|
||||
d = sin(ry) * scaleY;
|
||||
}
|
||||
case noRotationOrReflection -> {
|
||||
float sx = 1 / skeleton.scaleX, sy = 1 / skeleton.scaleY;
|
||||
pa *= sx;
|
||||
pc *= sy;
|
||||
float s = pa * pa + pc * pc, prx;
|
||||
if (s > 0.0001f) {
|
||||
s = Math.abs(pa * pd * sy - pb * sx * pc) / s;
|
||||
pb = pc * s;
|
||||
pd = pa * s;
|
||||
prx = atan2Deg(pc, pa);
|
||||
} else {
|
||||
pa = 0;
|
||||
pc = 0;
|
||||
prx = 90 - atan2Deg(pd, pb);
|
||||
}
|
||||
float rx = (rotation + shearX - prx) * degRad;
|
||||
float ry = (rotation + shearY - prx + 90) * degRad;
|
||||
float la = cos(rx) * scaleX;
|
||||
float lb = cos(ry) * scaleY;
|
||||
float lc = sin(rx) * scaleX;
|
||||
float ld = sin(ry) * scaleY;
|
||||
a = pa * la - pb * lc;
|
||||
b = pa * lb - pb * ld;
|
||||
c = pc * la + pd * lc;
|
||||
d = pc * lb + pd * ld;
|
||||
}
|
||||
case noScale, noScaleOrReflection -> {
|
||||
rotation *= degRad;
|
||||
float cos = cos(rotation), sin = sin(rotation);
|
||||
float za = (pa * cos + pb * sin) / skeleton.scaleX;
|
||||
float zc = (pc * cos + pd * sin) / skeleton.scaleY;
|
||||
float s = (float)Math.sqrt(za * za + zc * zc);
|
||||
if (s > 0.00001f) s = 1 / s;
|
||||
za *= s;
|
||||
zc *= s;
|
||||
s = (float)Math.sqrt(za * za + zc * zc);
|
||||
if (inherit == Inherit.noScale && (pa * pd - pb * pc < 0) != (skeleton.scaleX < 0 != skeleton.scaleY < 0)) s = -s;
|
||||
rotation = PI / 2 + atan2(zc, za);
|
||||
float zb = cos(rotation) * s;
|
||||
float zd = sin(rotation) * s;
|
||||
shearX *= degRad;
|
||||
shearY = (90 + shearY) * degRad;
|
||||
float la = cos(shearX) * scaleX;
|
||||
float lb = cos(shearY) * scaleY;
|
||||
float lc = sin(shearX) * scaleX;
|
||||
float ld = sin(shearY) * scaleY;
|
||||
a = za * la + zb * lc;
|
||||
b = za * lb + zb * ld;
|
||||
c = zc * la + zd * lc;
|
||||
d = zc * lb + zd * ld;
|
||||
}
|
||||
}
|
||||
a *= skeleton.scaleX;
|
||||
b *= skeleton.scaleX;
|
||||
c *= skeleton.scaleY;
|
||||
d *= skeleton.scaleY;
|
||||
}
|
||||
|
||||
/** Sets this bone's local transform to the setup pose. */
|
||||
public void setToSetupPose () {
|
||||
BoneData data = this.data;
|
||||
x = data.x;
|
||||
y = data.y;
|
||||
rotation = data.rotation;
|
||||
scaleX = data.scaleX;
|
||||
scaleY = data.scaleY;
|
||||
shearX = data.shearX;
|
||||
shearY = data.shearY;
|
||||
inherit = data.inherit;
|
||||
}
|
||||
|
||||
/** The bone's setup pose data. */
|
||||
public BoneData getData () {
|
||||
return data;
|
||||
}
|
||||
|
||||
/** The skeleton this bone belongs to. */
|
||||
public Skeleton getSkeleton () {
|
||||
return skeleton;
|
||||
public Bone (Bone bone, @Null Bone parent) {
|
||||
this(bone.data, parent);
|
||||
pose.set(bone.pose);
|
||||
}
|
||||
|
||||
/** The parent bone, or null if this is the root bone. */
|
||||
@ -242,404 +66,11 @@ public class Bone implements Updatable {
|
||||
return children;
|
||||
}
|
||||
|
||||
public boolean isActive () {
|
||||
return active;
|
||||
}
|
||||
|
||||
// -- Local transform
|
||||
|
||||
/** The local x translation. */
|
||||
public float getX () {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX (float x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
/** The local y translation. */
|
||||
public float getY () {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY (float y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public void setPosition (float x, float y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/** The local rotation in degrees, counter clockwise. */
|
||||
public float getRotation () {
|
||||
return rotation;
|
||||
}
|
||||
|
||||
public void setRotation (float rotation) {
|
||||
this.rotation = rotation;
|
||||
}
|
||||
|
||||
/** The local scaleX. */
|
||||
public float getScaleX () {
|
||||
return scaleX;
|
||||
}
|
||||
|
||||
public void setScaleX (float scaleX) {
|
||||
this.scaleX = scaleX;
|
||||
}
|
||||
|
||||
/** The local scaleY. */
|
||||
public float getScaleY () {
|
||||
return scaleY;
|
||||
}
|
||||
|
||||
public void setScaleY (float scaleY) {
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
|
||||
public void setScale (float scaleX, float scaleY) {
|
||||
this.scaleX = scaleX;
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
|
||||
public void setScale (float scale) {
|
||||
scaleX = scale;
|
||||
scaleY = scale;
|
||||
}
|
||||
|
||||
/** The local shearX. */
|
||||
public float getShearX () {
|
||||
return shearX;
|
||||
}
|
||||
|
||||
public void setShearX (float shearX) {
|
||||
this.shearX = shearX;
|
||||
}
|
||||
|
||||
/** The local shearY. */
|
||||
public float getShearY () {
|
||||
return shearY;
|
||||
}
|
||||
|
||||
public void setShearY (float shearY) {
|
||||
this.shearY = shearY;
|
||||
}
|
||||
|
||||
/** Determines how parent world transforms affect this bone. */
|
||||
public Inherit getInherit () {
|
||||
return inherit;
|
||||
}
|
||||
|
||||
public void setInherit (Inherit inherit) {
|
||||
if (inherit == null) throw new IllegalArgumentException("inherit cannot be null.");
|
||||
this.inherit = inherit;
|
||||
}
|
||||
|
||||
// -- Applied transform
|
||||
|
||||
/** The applied local x translation. */
|
||||
public float getAX () {
|
||||
return ax;
|
||||
}
|
||||
|
||||
public void setAX (float ax) {
|
||||
this.ax = ax;
|
||||
}
|
||||
|
||||
/** The applied local y translation. */
|
||||
public float getAY () {
|
||||
return ay;
|
||||
}
|
||||
|
||||
public void setAY (float ay) {
|
||||
this.ay = ay;
|
||||
}
|
||||
|
||||
/** The applied local rotation in degrees, counter clockwise. */
|
||||
public float getARotation () {
|
||||
return arotation;
|
||||
}
|
||||
|
||||
public void setARotation (float arotation) {
|
||||
this.arotation = arotation;
|
||||
}
|
||||
|
||||
/** The applied local scaleX. */
|
||||
public float getAScaleX () {
|
||||
return ascaleX;
|
||||
}
|
||||
|
||||
public void setAScaleX (float ascaleX) {
|
||||
this.ascaleX = ascaleX;
|
||||
}
|
||||
|
||||
/** The applied local scaleY. */
|
||||
public float getAScaleY () {
|
||||
return ascaleY;
|
||||
}
|
||||
|
||||
public void setAScaleY (float ascaleY) {
|
||||
this.ascaleY = ascaleY;
|
||||
}
|
||||
|
||||
/** The applied local shearX. */
|
||||
public float getAShearX () {
|
||||
return ashearX;
|
||||
}
|
||||
|
||||
public void setAShearX (float ashearX) {
|
||||
this.ashearX = ashearX;
|
||||
}
|
||||
|
||||
/** The applied local shearY. */
|
||||
public float getAShearY () {
|
||||
return ashearY;
|
||||
}
|
||||
|
||||
public void setAShearY (float ashearY) {
|
||||
this.ashearY = ashearY;
|
||||
}
|
||||
|
||||
/** Computes the applied transform values from the world transform.
|
||||
* <p>
|
||||
* If the world transform is modified (by a constraint, {@link #rotateWorld(float)}, etc) then this method should be called so
|
||||
* the applied transform matches the world transform. The applied transform may be needed by other code (eg to apply another
|
||||
* constraint).
|
||||
* <p>
|
||||
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. The applied transform after
|
||||
* calling this method is equivalent to the local transform used to compute the world transform, but may not be identical. */
|
||||
public void updateAppliedTransform () {
|
||||
Bone parent = this.parent;
|
||||
if (parent == null) {
|
||||
ax = worldX - skeleton.x;
|
||||
ay = worldY - skeleton.y;
|
||||
float a = this.a, b = this.b, c = this.c, d = this.d;
|
||||
arotation = atan2Deg(c, a);
|
||||
ascaleX = (float)Math.sqrt(a * a + c * c);
|
||||
ascaleY = (float)Math.sqrt(b * b + d * d);
|
||||
ashearX = 0;
|
||||
ashearY = atan2Deg(a * b + c * d, a * d - b * c);
|
||||
return;
|
||||
}
|
||||
|
||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
|
||||
float pid = 1 / (pa * pd - pb * pc);
|
||||
float ia = pd * pid, ib = pb * pid, ic = pc * pid, id = pa * pid;
|
||||
float dx = worldX - parent.worldX, dy = worldY - parent.worldY;
|
||||
ax = (dx * ia - dy * ib);
|
||||
ay = (dy * id - dx * ic);
|
||||
|
||||
float ra, rb, rc, rd;
|
||||
if (inherit == Inherit.onlyTranslation) {
|
||||
ra = a;
|
||||
rb = b;
|
||||
rc = c;
|
||||
rd = d;
|
||||
} else {
|
||||
switch (inherit) {
|
||||
case noRotationOrReflection -> {
|
||||
float s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);
|
||||
pb = -pc * skeleton.scaleX * s / skeleton.scaleY;
|
||||
pd = pa * skeleton.scaleY * s / skeleton.scaleX;
|
||||
pid = 1 / (pa * pd - pb * pc);
|
||||
ia = pd * pid;
|
||||
ib = pb * pid;
|
||||
}
|
||||
case noScale, noScaleOrReflection -> {
|
||||
float r = rotation * degRad, cos = cos(r), sin = sin(r);
|
||||
pa = (pa * cos + pb * sin) / skeleton.scaleX;
|
||||
pc = (pc * cos + pd * sin) / skeleton.scaleY;
|
||||
float s = (float)Math.sqrt(pa * pa + pc * pc);
|
||||
if (s > 0.00001f) s = 1 / s;
|
||||
pa *= s;
|
||||
pc *= s;
|
||||
s = (float)Math.sqrt(pa * pa + pc * pc);
|
||||
if (inherit == Inherit.noScale && pid < 0 != (skeleton.scaleX < 0 != skeleton.scaleY < 0)) s = -s;
|
||||
r = PI / 2 + atan2(pc, pa);
|
||||
pb = cos(r) * s;
|
||||
pd = sin(r) * s;
|
||||
pid = 1 / (pa * pd - pb * pc);
|
||||
ia = pd * pid;
|
||||
ib = pb * pid;
|
||||
ic = pc * pid;
|
||||
id = pa * pid;
|
||||
}
|
||||
}
|
||||
ra = ia * a - ib * c;
|
||||
rb = ia * b - ib * d;
|
||||
rc = id * c - ic * a;
|
||||
rd = id * d - ic * b;
|
||||
}
|
||||
|
||||
ashearX = 0;
|
||||
ascaleX = (float)Math.sqrt(ra * ra + rc * rc);
|
||||
if (ascaleX > 0.0001f) {
|
||||
float det = ra * rd - rb * rc;
|
||||
ascaleY = det / ascaleX;
|
||||
ashearY = -atan2Deg(ra * rb + rc * rd, det);
|
||||
arotation = atan2Deg(rc, ra);
|
||||
} else {
|
||||
ascaleX = 0;
|
||||
ascaleY = (float)Math.sqrt(rb * rb + rd * rd);
|
||||
ashearY = 0;
|
||||
arotation = 90 - atan2Deg(rd, rb);
|
||||
}
|
||||
}
|
||||
|
||||
// -- World transform
|
||||
|
||||
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
public float getA () {
|
||||
return a;
|
||||
}
|
||||
|
||||
public void setA (float a) {
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
public float getB () {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setB (float b) {
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
public float getC () {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setC (float c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
public float getD () {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setD (float d) {
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
public float getWorldX () {
|
||||
return worldX;
|
||||
}
|
||||
|
||||
public void setWorldX (float worldX) {
|
||||
this.worldX = worldX;
|
||||
}
|
||||
|
||||
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
public float getWorldY () {
|
||||
return worldY;
|
||||
}
|
||||
|
||||
public void setWorldY (float worldY) {
|
||||
this.worldY = worldY;
|
||||
}
|
||||
|
||||
/** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. */
|
||||
public float getWorldRotationX () {
|
||||
return atan2Deg(c, a);
|
||||
}
|
||||
|
||||
/** The world rotation for the Y axis, calculated using {@link #b} and {@link #d}. */
|
||||
public float getWorldRotationY () {
|
||||
return atan2Deg(d, b);
|
||||
}
|
||||
|
||||
/** The magnitude (always positive) of the world scale X, calculated using {@link #a} and {@link #c}. */
|
||||
public float getWorldScaleX () {
|
||||
return (float)Math.sqrt(a * a + c * c);
|
||||
}
|
||||
|
||||
/** The magnitude (always positive) of the world scale Y, calculated using {@link #b} and {@link #d}. */
|
||||
public float getWorldScaleY () {
|
||||
return (float)Math.sqrt(b * b + d * d);
|
||||
}
|
||||
|
||||
public Matrix3 getWorldTransform (Matrix3 worldTransform) {
|
||||
if (worldTransform == null) throw new IllegalArgumentException("worldTransform cannot be null.");
|
||||
float[] val = worldTransform.val;
|
||||
val[M00] = a;
|
||||
val[M01] = b;
|
||||
val[M10] = c;
|
||||
val[M11] = d;
|
||||
val[M02] = worldX;
|
||||
val[M12] = worldY;
|
||||
val[M20] = 0;
|
||||
val[M21] = 0;
|
||||
val[M22] = 1;
|
||||
return worldTransform;
|
||||
}
|
||||
|
||||
/** Transforms a point from world coordinates to the bone's local coordinates. */
|
||||
public Vector2 worldToLocal (Vector2 world) {
|
||||
if (world == null) throw new IllegalArgumentException("world cannot be null.");
|
||||
float det = a * d - b * c;
|
||||
float x = world.x - worldX, y = world.y - worldY;
|
||||
world.x = (x * d - y * b) / det;
|
||||
world.y = (y * a - x * c) / det;
|
||||
return world;
|
||||
}
|
||||
|
||||
/** Transforms a point from the bone's local coordinates to world coordinates. */
|
||||
public Vector2 localToWorld (Vector2 local) {
|
||||
if (local == null) throw new IllegalArgumentException("local cannot be null.");
|
||||
float x = local.x, y = local.y;
|
||||
local.x = x * a + y * b + worldX;
|
||||
local.y = x * c + y * d + worldY;
|
||||
return local;
|
||||
}
|
||||
|
||||
/** Transforms a point from world coordinates to the parent bone's local coordinates. */
|
||||
public Vector2 worldToParent (Vector2 world) {
|
||||
if (world == null) throw new IllegalArgumentException("world cannot be null.");
|
||||
return parent == null ? world : parent.worldToLocal(world);
|
||||
}
|
||||
|
||||
/** Transforms a point from the parent bone's coordinates to world coordinates. */
|
||||
public Vector2 parentToWorld (Vector2 world) {
|
||||
if (world == null) throw new IllegalArgumentException("world cannot be null.");
|
||||
return parent == null ? world : parent.localToWorld(world);
|
||||
}
|
||||
|
||||
/** Transforms a world rotation to a local rotation. */
|
||||
public float worldToLocalRotation (float worldRotation) {
|
||||
worldRotation *= degRad;
|
||||
float sin = sin(worldRotation), cos = cos(worldRotation);
|
||||
return atan2Deg(a * sin - c * cos, d * cos - b * sin) + rotation - shearX;
|
||||
}
|
||||
|
||||
/** Transforms a local rotation to a world rotation. */
|
||||
public float localToWorldRotation (float localRotation) {
|
||||
localRotation = (localRotation - rotation - shearX) * degRad;
|
||||
float sin = sin(localRotation), cos = cos(localRotation);
|
||||
return atan2Deg(cos * c + sin * d, cos * a + sin * b);
|
||||
}
|
||||
|
||||
/** Rotates the world transform the specified amount.
|
||||
* <p>
|
||||
* After changes are made to the world transform, {@link #updateAppliedTransform()} should be called and
|
||||
* {@link #update(Physics)} will need to be called on any child bones, recursively. */
|
||||
public void rotateWorld (float degrees) {
|
||||
degrees *= degRad;
|
||||
float sin = sin(degrees), cos = cos(degrees);
|
||||
float ra = a, rb = b;
|
||||
a = cos * ra - sin * c;
|
||||
b = cos * rb - sin * d;
|
||||
c = sin * ra + cos * c;
|
||||
d = sin * rb + cos * d;
|
||||
}
|
||||
|
||||
// ---
|
||||
|
||||
public String toString () {
|
||||
return data.name;
|
||||
void resetUpdate (Skeleton skeleton) {
|
||||
if (applied.world != skeleton.update) return;
|
||||
applied.world = 0;
|
||||
Bone[] children = this.children.items;
|
||||
for (int i = 0, n = this.children.size; i < n; i++)
|
||||
children[i].resetUpdate(skeleton);
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,17 +32,11 @@ package com.esotericsoftware.spine;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.utils.Null;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Stores the setup pose for a {@link Bone}. */
|
||||
public class BoneData {
|
||||
/** The setup pose for a bone. */
|
||||
public class BoneData extends PosedData<BoneLocal> {
|
||||
final int index;
|
||||
final String name;
|
||||
@Null final BoneData parent;
|
||||
float length;
|
||||
float x, y, rotation, scaleX = 1, scaleY = 1, shearX, shearY;
|
||||
Inherit inherit = Inherit.normal;
|
||||
boolean skinRequired;
|
||||
|
||||
// Nonessential.
|
||||
final Color color = new Color(0.61f, 0.61f, 0.61f, 1); // 9b9b9bff
|
||||
@ -50,27 +44,18 @@ public class BoneData {
|
||||
boolean visible;
|
||||
|
||||
public BoneData (int index, String name, @Null BoneData parent) {
|
||||
super(name, new BoneLocal());
|
||||
if (index < 0) throw new IllegalArgumentException("index must be >= 0.");
|
||||
if (name == null) throw new IllegalArgumentException("name cannot be null.");
|
||||
this.index = index;
|
||||
this.name = name;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public BoneData (BoneData bone, @Null BoneData parent) {
|
||||
if (bone == null) throw new IllegalArgumentException("bone cannot be null.");
|
||||
index = bone.index;
|
||||
name = bone.name;
|
||||
this.parent = parent;
|
||||
length = bone.length;
|
||||
x = bone.x;
|
||||
y = bone.y;
|
||||
rotation = bone.rotation;
|
||||
scaleX = bone.scaleX;
|
||||
scaleY = bone.scaleY;
|
||||
shearX = bone.shearX;
|
||||
shearY = bone.shearY;
|
||||
public BoneData (BoneData data, @Null BoneData parent) {
|
||||
this(data.index, data.name, parent);
|
||||
length = data.length;
|
||||
setup.set(data.setup);
|
||||
}
|
||||
|
||||
/** The index of the bone in {@link Skeleton#getBones()}. */
|
||||
@ -78,11 +63,6 @@ public class BoneData {
|
||||
return index;
|
||||
}
|
||||
|
||||
/** The name of the bone, which is unique across all bones in the skeleton. */
|
||||
public String getName () {
|
||||
return name;
|
||||
}
|
||||
|
||||
public @Null BoneData getParent () {
|
||||
return parent;
|
||||
}
|
||||
@ -96,101 +76,6 @@ public class BoneData {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
/** The local x translation. */
|
||||
public float getX () {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX (float x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
/** The local y translation. */
|
||||
public float getY () {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY (float y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public void setPosition (float x, float y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/** The local rotation in degrees, counter clockwise. */
|
||||
public float getRotation () {
|
||||
return rotation;
|
||||
}
|
||||
|
||||
public void setRotation (float rotation) {
|
||||
this.rotation = rotation;
|
||||
}
|
||||
|
||||
/** The local scaleX. */
|
||||
public float getScaleX () {
|
||||
return scaleX;
|
||||
}
|
||||
|
||||
public void setScaleX (float scaleX) {
|
||||
this.scaleX = scaleX;
|
||||
}
|
||||
|
||||
/** The local scaleY. */
|
||||
public float getScaleY () {
|
||||
return scaleY;
|
||||
}
|
||||
|
||||
public void setScaleY (float scaleY) {
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
|
||||
public void setScale (float scaleX, float scaleY) {
|
||||
this.scaleX = scaleX;
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
|
||||
/** The local shearX. */
|
||||
public float getShearX () {
|
||||
return shearX;
|
||||
}
|
||||
|
||||
public void setShearX (float shearX) {
|
||||
this.shearX = shearX;
|
||||
}
|
||||
|
||||
/** The local shearX. */
|
||||
public float getShearY () {
|
||||
return shearY;
|
||||
}
|
||||
|
||||
public void setShearY (float shearY) {
|
||||
this.shearY = shearY;
|
||||
}
|
||||
|
||||
/** Determines how parent world transforms affect this bone. */
|
||||
public Inherit getInherit () {
|
||||
return inherit;
|
||||
}
|
||||
|
||||
public void setInherit (Inherit inherit) {
|
||||
if (inherit == null) throw new IllegalArgumentException("inherit cannot be null.");
|
||||
this.inherit = inherit;
|
||||
}
|
||||
|
||||
/** When true, {@link Skeleton#updateWorldTransform(Physics)} only updates this bone if the {@link Skeleton#getSkin()} contains
|
||||
* this bone.
|
||||
* <p>
|
||||
* See {@link Skin#getBones()}. */
|
||||
public boolean getSkinRequired () {
|
||||
return skinRequired;
|
||||
}
|
||||
|
||||
public void setSkinRequired (boolean skinRequired) {
|
||||
this.skinRequired = skinRequired;
|
||||
}
|
||||
|
||||
/** The color of the bone as it was in Spine, or a default color if nonessential data was not exported. Bones are not usually
|
||||
* rendered at runtime. */
|
||||
public Color getColor () {
|
||||
@ -215,10 +100,6 @@ public class BoneData {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return name;
|
||||
}
|
||||
|
||||
/** Determines how a bone inherits world transforms from parent bones. */
|
||||
static public enum Inherit {
|
||||
normal, onlyTranslation, noRotationOrReflection, noScale, noScaleOrReflection;
|
||||
|
||||
@ -0,0 +1,138 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
import com.esotericsoftware.spine.BoneData.Inherit;
|
||||
|
||||
/** Stores a bone's local pose. */
|
||||
public class BoneLocal implements Pose<BoneLocal> {
|
||||
float x, y, rotation, scaleX, scaleY, shearX, shearY;
|
||||
Inherit inherit;
|
||||
|
||||
public void set (BoneLocal pose) {
|
||||
if (pose == null) throw new IllegalArgumentException("pose cannot be null.");
|
||||
x = pose.x;
|
||||
y = pose.y;
|
||||
rotation = pose.rotation;
|
||||
scaleX = pose.scaleX;
|
||||
scaleY = pose.scaleY;
|
||||
shearX = pose.shearX;
|
||||
shearY = pose.shearY;
|
||||
inherit = pose.inherit;
|
||||
}
|
||||
|
||||
/** The local x translation. */
|
||||
public float getX () {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX (float x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
/** The local y translation. */
|
||||
public float getY () {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setY (float y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public void setPosition (float x, float y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/** The local rotation in degrees, counter clockwise. */
|
||||
public float getRotation () {
|
||||
return rotation;
|
||||
}
|
||||
|
||||
public void setRotation (float rotation) {
|
||||
this.rotation = rotation;
|
||||
}
|
||||
|
||||
/** The local scaleX. */
|
||||
public float getScaleX () {
|
||||
return scaleX;
|
||||
}
|
||||
|
||||
public void setScaleX (float scaleX) {
|
||||
this.scaleX = scaleX;
|
||||
}
|
||||
|
||||
/** The local scaleY. */
|
||||
public float getScaleY () {
|
||||
return scaleY;
|
||||
}
|
||||
|
||||
public void setScaleY (float scaleY) {
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
|
||||
public void setScale (float scaleX, float scaleY) {
|
||||
this.scaleX = scaleX;
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
|
||||
public void setScale (float scale) {
|
||||
scaleX = scale;
|
||||
scaleY = scale;
|
||||
}
|
||||
|
||||
/** The local shearX. */
|
||||
public float getShearX () {
|
||||
return shearX;
|
||||
}
|
||||
|
||||
public void setShearX (float shearX) {
|
||||
this.shearX = shearX;
|
||||
}
|
||||
|
||||
/** The local shearY. */
|
||||
public float getShearY () {
|
||||
return shearY;
|
||||
}
|
||||
|
||||
public void setShearY (float shearY) {
|
||||
this.shearY = shearY;
|
||||
}
|
||||
|
||||
/** Determines how parent world transforms affect this bone. */
|
||||
public Inherit getInherit () {
|
||||
return inherit;
|
||||
}
|
||||
|
||||
public void setInherit (Inherit inherit) {
|
||||
if (inherit == null) throw new IllegalArgumentException("inherit cannot be null.");
|
||||
this.inherit = inherit;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,379 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
import static com.badlogic.gdx.math.Matrix3.*;
|
||||
import static com.esotericsoftware.spine.utils.SpineUtils.*;
|
||||
|
||||
import com.badlogic.gdx.math.Matrix3;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import com.esotericsoftware.spine.BoneData.Inherit;
|
||||
|
||||
/** The applied pose for a bone. This is the {@link Bone} pose with constraints applied and the world transform computed by
|
||||
* {@link Skeleton#updateWorldTransform(Physics)}. */
|
||||
public class BonePose extends BoneLocal implements Update {
|
||||
Bone bone;
|
||||
float a, b, worldX;
|
||||
float c, d, worldY;
|
||||
int world, local;
|
||||
|
||||
/** Called by {@link Skeleton#updateCache()} to compute the world transform, if needed. */
|
||||
public void update (Skeleton skeleton, Physics physics) {
|
||||
if (world != skeleton.update) updateWorldTransform(skeleton);
|
||||
}
|
||||
|
||||
/** Computes the world transform using the parent bone's applied pose and this pose. Child bones are not updated.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
public void updateWorldTransform (Skeleton skeleton) {
|
||||
if (local == skeleton.update)
|
||||
updateLocalTransform(skeleton);
|
||||
else
|
||||
world = skeleton.update;
|
||||
|
||||
if (bone.parent == null) { // Root bone.
|
||||
float sx = skeleton.scaleX, sy = skeleton.scaleY;
|
||||
float rx = (rotation + shearX) * degRad;
|
||||
float ry = (rotation + 90 + shearY) * degRad;
|
||||
a = cos(rx) * scaleX * sx;
|
||||
b = cos(ry) * scaleY * sx;
|
||||
c = sin(rx) * scaleX * sy;
|
||||
d = sin(ry) * scaleY * sy;
|
||||
worldX = x * sx + skeleton.x;
|
||||
worldY = y * sy + skeleton.y;
|
||||
return;
|
||||
}
|
||||
|
||||
BonePose parent = bone.parent.applied;
|
||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
|
||||
worldX = pa * x + pb * y + parent.worldX;
|
||||
worldY = pc * x + pd * y + parent.worldY;
|
||||
|
||||
switch (inherit) {
|
||||
case normal -> {
|
||||
float rx = (rotation + shearX) * degRad;
|
||||
float ry = (rotation + 90 + shearY) * degRad;
|
||||
float la = cos(rx) * scaleX;
|
||||
float lb = cos(ry) * scaleY;
|
||||
float lc = sin(rx) * scaleX;
|
||||
float ld = sin(ry) * scaleY;
|
||||
a = pa * la + pb * lc;
|
||||
b = pa * lb + pb * ld;
|
||||
c = pc * la + pd * lc;
|
||||
d = pc * lb + pd * ld;
|
||||
return;
|
||||
}
|
||||
case onlyTranslation -> {
|
||||
float rx = (rotation + shearX) * degRad;
|
||||
float ry = (rotation + 90 + shearY) * degRad;
|
||||
a = cos(rx) * scaleX;
|
||||
b = cos(ry) * scaleY;
|
||||
c = sin(rx) * scaleX;
|
||||
d = sin(ry) * scaleY;
|
||||
}
|
||||
case noRotationOrReflection -> {
|
||||
float sx = 1 / skeleton.scaleX, sy = 1 / skeleton.scaleY;
|
||||
pa *= sx;
|
||||
pc *= sy;
|
||||
float s = pa * pa + pc * pc, prx;
|
||||
if (s > 0.0001f) {
|
||||
s = Math.abs(pa * pd * sy - pb * sx * pc) / s;
|
||||
pb = pc * s;
|
||||
pd = pa * s;
|
||||
prx = atan2Deg(pc, pa);
|
||||
} else {
|
||||
pa = 0;
|
||||
pc = 0;
|
||||
prx = 90 - atan2Deg(pd, pb);
|
||||
}
|
||||
float rx = (rotation + shearX - prx) * degRad;
|
||||
float ry = (rotation + shearY - prx + 90) * degRad;
|
||||
float la = cos(rx) * scaleX;
|
||||
float lb = cos(ry) * scaleY;
|
||||
float lc = sin(rx) * scaleX;
|
||||
float ld = sin(ry) * scaleY;
|
||||
a = pa * la - pb * lc;
|
||||
b = pa * lb - pb * ld;
|
||||
c = pc * la + pd * lc;
|
||||
d = pc * lb + pd * ld;
|
||||
}
|
||||
case noScale, noScaleOrReflection -> {
|
||||
rotation *= degRad;
|
||||
float cos = cos(rotation), sin = sin(rotation);
|
||||
float za = (pa * cos + pb * sin) / skeleton.scaleX;
|
||||
float zc = (pc * cos + pd * sin) / skeleton.scaleY;
|
||||
float s = (float)Math.sqrt(za * za + zc * zc);
|
||||
if (s > 0.00001f) s = 1 / s;
|
||||
za *= s;
|
||||
zc *= s;
|
||||
s = (float)Math.sqrt(za * za + zc * zc);
|
||||
if (inherit == Inherit.noScale && (pa * pd - pb * pc < 0) != (skeleton.scaleX < 0 != skeleton.scaleY < 0)) s = -s;
|
||||
rotation = PI / 2 + atan2(zc, za);
|
||||
float zb = cos(rotation) * s;
|
||||
float zd = sin(rotation) * s;
|
||||
shearX *= degRad;
|
||||
shearY = (90 + shearY) * degRad;
|
||||
float la = cos(shearX) * scaleX;
|
||||
float lb = cos(shearY) * scaleY;
|
||||
float lc = sin(shearX) * scaleX;
|
||||
float ld = sin(shearY) * scaleY;
|
||||
a = za * la + zb * lc;
|
||||
b = za * lb + zb * ld;
|
||||
c = zc * la + zd * lc;
|
||||
d = zc * lb + zd * ld;
|
||||
}
|
||||
}
|
||||
a *= skeleton.scaleX;
|
||||
b *= skeleton.scaleX;
|
||||
c *= skeleton.scaleY;
|
||||
d *= skeleton.scaleY;
|
||||
}
|
||||
|
||||
/** Computes the local transform values from the world transform.
|
||||
* <p>
|
||||
* If the world transform is modified (by a constraint, {@link #rotateWorld(float)}, etc) then this method should be called so
|
||||
* the local transform matches the world transform. The local transform may be needed by other code (eg to apply another
|
||||
* constraint).
|
||||
* <p>
|
||||
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. The local transform after
|
||||
* calling this method is equivalent to the local transform used to compute the world transform, but may not be identical. */
|
||||
public void updateLocalTransform (Skeleton skeleton) {
|
||||
world = skeleton.update;
|
||||
local = 0;
|
||||
|
||||
if (bone.parent == null) {
|
||||
x = worldX - skeleton.x;
|
||||
y = worldY - skeleton.y;
|
||||
float a = this.a, b = this.b, c = this.c, d = this.d;
|
||||
rotation = atan2Deg(c, a);
|
||||
scaleX = (float)Math.sqrt(a * a + c * c);
|
||||
scaleY = (float)Math.sqrt(b * b + d * d);
|
||||
shearX = 0;
|
||||
shearY = atan2Deg(a * b + c * d, a * d - b * c);
|
||||
return;
|
||||
}
|
||||
|
||||
BonePose parent = bone.parent.applied;
|
||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
|
||||
float pid = 1 / (pa * pd - pb * pc);
|
||||
float ia = pd * pid, ib = pb * pid, ic = pc * pid, id = pa * pid;
|
||||
float dx = worldX - parent.worldX, dy = worldY - parent.worldY;
|
||||
x = (dx * ia - dy * ib);
|
||||
y = (dy * id - dx * ic);
|
||||
|
||||
float ra, rb, rc, rd;
|
||||
if (inherit == Inherit.onlyTranslation) {
|
||||
ra = a;
|
||||
rb = b;
|
||||
rc = c;
|
||||
rd = d;
|
||||
} else {
|
||||
switch (inherit) {
|
||||
case noRotationOrReflection -> {
|
||||
float s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);
|
||||
pb = -pc * skeleton.scaleX * s / skeleton.scaleY;
|
||||
pd = pa * skeleton.scaleY * s / skeleton.scaleX;
|
||||
pid = 1 / (pa * pd - pb * pc);
|
||||
ia = pd * pid;
|
||||
ib = pb * pid;
|
||||
}
|
||||
case noScale, noScaleOrReflection -> {
|
||||
float r = rotation * degRad, cos = cos(r), sin = sin(r);
|
||||
pa = (pa * cos + pb * sin) / skeleton.scaleX;
|
||||
pc = (pc * cos + pd * sin) / skeleton.scaleY;
|
||||
float s = (float)Math.sqrt(pa * pa + pc * pc);
|
||||
if (s > 0.00001f) s = 1 / s;
|
||||
pa *= s;
|
||||
pc *= s;
|
||||
s = (float)Math.sqrt(pa * pa + pc * pc);
|
||||
if (inherit == Inherit.noScale && pid < 0 != (skeleton.scaleX < 0 != skeleton.scaleY < 0)) s = -s;
|
||||
r = PI / 2 + atan2(pc, pa);
|
||||
pb = cos(r) * s;
|
||||
pd = sin(r) * s;
|
||||
pid = 1 / (pa * pd - pb * pc);
|
||||
ia = pd * pid;
|
||||
ib = pb * pid;
|
||||
ic = pc * pid;
|
||||
id = pa * pid;
|
||||
}
|
||||
}
|
||||
ra = ia * a - ib * c;
|
||||
rb = ia * b - ib * d;
|
||||
rc = id * c - ic * a;
|
||||
rd = id * d - ic * b;
|
||||
}
|
||||
|
||||
shearX = 0;
|
||||
scaleX = (float)Math.sqrt(ra * ra + rc * rc);
|
||||
if (scaleX > 0.0001f) {
|
||||
float det = ra * rd - rb * rc;
|
||||
scaleY = det / scaleX;
|
||||
shearY = -atan2Deg(ra * rb + rc * rd, det);
|
||||
rotation = atan2Deg(rc, ra);
|
||||
} else {
|
||||
scaleX = 0;
|
||||
scaleY = (float)Math.sqrt(rb * rb + rd * rd);
|
||||
shearY = 0;
|
||||
rotation = 90 - atan2Deg(rd, rb);
|
||||
}
|
||||
}
|
||||
|
||||
/** When true, the world transform has been modified and the local transform no longer matches. Call
|
||||
* {@link #updateLocalTransform(Skeleton)} before using the local transform. */
|
||||
public boolean isLocalDirty (Skeleton skeleton) {
|
||||
return local == skeleton.update;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the X axis. If changed, {@link #updateLocalTransform(Skeleton)} should be called. */
|
||||
public float getA () {
|
||||
return a;
|
||||
}
|
||||
|
||||
public void setA (float a) {
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateLocalTransform(Skeleton)} should be called. */
|
||||
public float getB () {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setB (float b) {
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the X axis. If changed, {@link #updateLocalTransform(Skeleton)} should be called. */
|
||||
public float getC () {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setC (float c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateLocalTransform(Skeleton)} should be called. */
|
||||
public float getD () {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setD (float d) {
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
/** The world X position. If changed, {@link #updateLocalTransform(Skeleton)} should be called. */
|
||||
public float getWorldX () {
|
||||
return worldX;
|
||||
}
|
||||
|
||||
public void setWorldX (float worldX) {
|
||||
this.worldX = worldX;
|
||||
}
|
||||
|
||||
/** The world Y position. If changed, {@link #updateLocalTransform(Skeleton)} should be called. */
|
||||
public float getWorldY () {
|
||||
return worldY;
|
||||
}
|
||||
|
||||
public void setWorldY (float worldY) {
|
||||
this.worldY = worldY;
|
||||
}
|
||||
|
||||
/** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. */
|
||||
public float getWorldRotationX () {
|
||||
return atan2Deg(c, a);
|
||||
}
|
||||
|
||||
/** The world rotation for the Y axis, calculated using {@link #b} and {@link #d}. */
|
||||
public float getWorldRotationY () {
|
||||
return atan2Deg(d, b);
|
||||
}
|
||||
|
||||
/** The magnitude (always positive) of the world scale X, calculated using {@link #a} and {@link #c}. */
|
||||
public float getWorldScaleX () {
|
||||
return (float)Math.sqrt(a * a + c * c);
|
||||
}
|
||||
|
||||
/** The magnitude (always positive) of the world scale Y, calculated using {@link #b} and {@link #d}. */
|
||||
public float getWorldScaleY () {
|
||||
return (float)Math.sqrt(b * b + d * d);
|
||||
}
|
||||
|
||||
public Matrix3 getWorldTransform (Matrix3 worldTransform) {
|
||||
if (worldTransform == null) throw new IllegalArgumentException("worldTransform cannot be null.");
|
||||
float[] val = worldTransform.val;
|
||||
val[M00] = a;
|
||||
val[M01] = b;
|
||||
val[M10] = c;
|
||||
val[M11] = d;
|
||||
val[M02] = worldX;
|
||||
val[M12] = worldY;
|
||||
val[M20] = 0;
|
||||
val[M21] = 0;
|
||||
val[M22] = 1;
|
||||
return worldTransform;
|
||||
}
|
||||
|
||||
/** Transforms a point from world coordinates to the bone's local coordinates. */
|
||||
public Vector2 worldToLocal (Vector2 world) {
|
||||
if (world == null) throw new IllegalArgumentException("world cannot be null.");
|
||||
float det = a * d - b * c;
|
||||
float x = world.x - worldX, y = world.y - worldY;
|
||||
world.x = (x * d - y * b) / det;
|
||||
world.y = (y * a - x * c) / det;
|
||||
return world;
|
||||
}
|
||||
|
||||
/** Transforms a point from the bone's local coordinates to world coordinates. */
|
||||
public Vector2 localToWorld (Vector2 local) {
|
||||
if (local == null) throw new IllegalArgumentException("local cannot be null.");
|
||||
float x = local.x, y = local.y;
|
||||
local.x = x * a + y * b + worldX;
|
||||
local.y = x * c + y * d + worldY;
|
||||
return local;
|
||||
}
|
||||
|
||||
/** Transforms a point from world coordinates to the parent bone's local coordinates. */
|
||||
public Vector2 worldToParent (Vector2 world) {
|
||||
if (world == null) throw new IllegalArgumentException("world cannot be null.");
|
||||
return bone.parent == null ? world : bone.parent.applied.worldToLocal(world);
|
||||
}
|
||||
|
||||
/** Transforms a point from the parent bone's coordinates to world coordinates. */
|
||||
public Vector2 parentToWorld (Vector2 world) {
|
||||
if (world == null) throw new IllegalArgumentException("world cannot be null.");
|
||||
return bone.parent == null ? world : bone.parent.applied.localToWorld(world);
|
||||
}
|
||||
|
||||
/** Transforms a world rotation to a local rotation. */
|
||||
public float worldToLocalRotation (float worldRotation) {
|
||||
worldRotation *= degRad;
|
||||
float sin = sin(worldRotation), cos = cos(worldRotation);
|
||||
return atan2Deg(a * sin - c * cos, d * cos - b * sin) + rotation - shearX;
|
||||
}
|
||||
|
||||
/** Transforms a local rotation to a world rotation. */
|
||||
public float localToWorldRotation (float localRotation) {
|
||||
localRotation = (localRotation - rotation - shearX) * degRad;
|
||||
float sin = sin(localRotation), cos = cos(localRotation);
|
||||
return atan2Deg(cos * c + sin * d, cos * a + sin * b);
|
||||
}
|
||||
|
||||
/** Rotates the world transform the specified amount.
|
||||
* <p>
|
||||
* After changes are made to the world transform, {@link #updateLocalTransform(Skeleton)} should be called on this bone and any
|
||||
* child bones, recursively. */
|
||||
public void rotateWorld (float degrees) {
|
||||
degrees *= degRad;
|
||||
float sin = sin(degrees), cos = cos(degrees);
|
||||
float ra = a, rb = b;
|
||||
a = cos * ra - sin * c;
|
||||
b = cos * rb - sin * d;
|
||||
c = sin * ra + cos * c;
|
||||
d = sin * rb + cos * d;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return bone.data.name;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
abstract public class Constraint< //
|
||||
T extends Constraint<T, D, P>, //
|
||||
D extends ConstraintData<T, P>, //
|
||||
P extends Pose> //
|
||||
extends PosedActive<D, P, P> implements Update {
|
||||
|
||||
public Constraint (D data, P pose, P constrained) {
|
||||
super(data, pose, constrained);
|
||||
}
|
||||
|
||||
abstract public T copy (Skeleton skeleton);
|
||||
|
||||
abstract void sort (Skeleton skeleton);
|
||||
|
||||
boolean isSourceActive () {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1,75 +1,14 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
abstract public class ConstraintData< //
|
||||
T extends Constraint, //
|
||||
P extends Pose> //
|
||||
extends PosedData<P> {
|
||||
|
||||
/** The base class for all constraint datas. */
|
||||
abstract public class ConstraintData {
|
||||
final String name;
|
||||
int order;
|
||||
boolean skinRequired;
|
||||
|
||||
public ConstraintData (String name) {
|
||||
if (name == null) throw new IllegalArgumentException("name cannot be null.");
|
||||
this.name = name;
|
||||
public ConstraintData (String name, P setup) {
|
||||
super(name, setup);
|
||||
}
|
||||
|
||||
/** The constraint's name, which is unique across all constraints in the skeleton of the same type. */
|
||||
public String getName () {
|
||||
return name;
|
||||
}
|
||||
|
||||
/** The ordinal of this constraint for the order a skeleton's constraints will be applied by
|
||||
* {@link Skeleton#updateWorldTransform(Physics)}. */
|
||||
public int getOrder () {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder (int order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
/** When true, {@link Skeleton#updateWorldTransform(Physics)} only updates this constraint if the {@link Skeleton#getSkin()}
|
||||
* contains this constraint.
|
||||
* <p>
|
||||
* See {@link Skin#getConstraints()}. */
|
||||
public boolean getSkinRequired () {
|
||||
return skinRequired;
|
||||
}
|
||||
|
||||
public void setSkinRequired (boolean skinRequired) {
|
||||
this.skinRequired = skinRequired;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return name;
|
||||
}
|
||||
abstract public T create (Skeleton skeleton);
|
||||
}
|
||||
|
||||
@ -35,11 +35,11 @@ import com.esotericsoftware.spine.AnimationState.AnimationStateListener;
|
||||
/** Stores the current pose values for an {@link Event}.
|
||||
* <p>
|
||||
* See Timeline
|
||||
* {@link Timeline#apply(Skeleton, float, float, com.badlogic.gdx.utils.Array, float, com.esotericsoftware.spine.Animation.MixBlend, com.esotericsoftware.spine.Animation.MixDirection)},
|
||||
* {@link Timeline#apply(Skeleton, float, float, com.badlogic.gdx.utils.Array, float, com.esotericsoftware.spine.Animation.MixBlend, com.esotericsoftware.spine.Animation.MixDirection, boolean)},
|
||||
* AnimationStateListener {@link AnimationStateListener#event(com.esotericsoftware.spine.AnimationState.TrackEntry, Event)}, and
|
||||
* <a href="https://esotericsoftware.com/spine-events">Events</a> in the Spine User Guide. */
|
||||
public class Event {
|
||||
private final EventData data;
|
||||
final EventData data;
|
||||
int intValue;
|
||||
float floatValue;
|
||||
String stringValue;
|
||||
|
||||
@ -34,65 +34,69 @@ import static com.esotericsoftware.spine.utils.SpineUtils.*;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import com.esotericsoftware.spine.BoneData.Inherit;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Stores the current pose for an IK constraint. An IK constraint adjusts the rotation of 1 or 2 constrained bones so the tip of
|
||||
* the last bone is as close to the target bone as possible.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-ik-constraints">IK constraints</a> in the Spine User Guide. */
|
||||
public class IkConstraint implements Updatable {
|
||||
final IkConstraintData data;
|
||||
final Array<Bone> bones;
|
||||
public class IkConstraint extends Constraint<IkConstraint, IkConstraintData, IkConstraintPose> {
|
||||
final Array<BonePose> bones;
|
||||
Bone target;
|
||||
int bendDirection;
|
||||
boolean compress, stretch;
|
||||
float mix = 1, softness;
|
||||
|
||||
boolean active;
|
||||
|
||||
public IkConstraint (IkConstraintData data, Skeleton skeleton) {
|
||||
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
||||
super(data, new IkConstraintPose(), new IkConstraintPose());
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
this.data = data;
|
||||
|
||||
bones = new Array(data.bones.size);
|
||||
bones = new Array(true, data.bones.size, BonePose[]::new);
|
||||
for (BoneData boneData : data.bones)
|
||||
bones.add(skeleton.bones.get(boneData.index));
|
||||
bones.add(skeleton.bones.items[boneData.index].constrained);
|
||||
|
||||
target = skeleton.bones.get(data.target.index);
|
||||
|
||||
setToSetupPose();
|
||||
target = skeleton.bones.items[data.target.index];
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public IkConstraint (IkConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
public void setToSetupPose () {
|
||||
IkConstraintData data = this.data;
|
||||
mix = data.mix;
|
||||
softness = data.softness;
|
||||
bendDirection = data.bendDirection;
|
||||
compress = data.compress;
|
||||
stretch = data.stretch;
|
||||
public IkConstraint copy (Skeleton skeleton) {
|
||||
var copy = new IkConstraint(data, skeleton);
|
||||
copy.pose.set(pose);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/** Applies the constraint to the constrained bones. */
|
||||
public void update (Physics physics) {
|
||||
if (mix == 0) return;
|
||||
Bone target = this.target;
|
||||
Object[] bones = this.bones.items;
|
||||
public void update (Skeleton skeleton, Physics physics) {
|
||||
IkConstraintPose a = applied;
|
||||
if (a.mix == 0) return;
|
||||
BonePose target = this.target.applied;
|
||||
BonePose[] bones = this.bones.items;
|
||||
switch (this.bones.size) {
|
||||
case 1 -> apply((Bone)bones[0], target.worldX, target.worldY, compress, stretch, data.uniform, mix);
|
||||
case 2 -> //
|
||||
apply((Bone)bones[0], (Bone)bones[1], target.worldX, target.worldY, bendDirection, stretch, data.uniform, softness, mix);
|
||||
case 1 -> apply(skeleton, bones[0], target.worldX, target.worldY, a.compress, a.stretch, data.uniform, a.mix);
|
||||
case 2 -> apply(skeleton, bones[0], bones[1], target.worldX, target.worldY, a.bendDirection, a.stretch, data.uniform,
|
||||
a.softness, a.mix);
|
||||
}
|
||||
}
|
||||
|
||||
/** The bones that will be modified by this IK constraint. */
|
||||
public Array<Bone> getBones () {
|
||||
void sort (Skeleton skeleton) {
|
||||
skeleton.sortBone(target);
|
||||
Bone parent = bones.items[0].bone;
|
||||
skeleton.resetCache(parent);
|
||||
skeleton.sortBone(parent);
|
||||
if (bones.size == 1) {
|
||||
skeleton.updateCache.add(this);
|
||||
skeleton.sortReset(parent.children);
|
||||
} else {
|
||||
Bone child = bones.items[1].bone;
|
||||
skeleton.resetCache(child);
|
||||
skeleton.sortBone(child);
|
||||
skeleton.updateCache.add(this);
|
||||
skeleton.sortReset(parent.children);
|
||||
child.sorted = true;
|
||||
}
|
||||
}
|
||||
|
||||
boolean isSourceActive () {
|
||||
return target.active;
|
||||
}
|
||||
|
||||
/** The 1 or 2 bones that will be modified by this IK constraint. */
|
||||
public Array<BonePose> getBones () {
|
||||
return bones;
|
||||
}
|
||||
|
||||
@ -106,88 +110,25 @@ public class IkConstraint implements Updatable {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
|
||||
* <p>
|
||||
* For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0. */
|
||||
public float getMix () {
|
||||
return mix;
|
||||
}
|
||||
|
||||
public void setMix (float mix) {
|
||||
this.mix = mix;
|
||||
}
|
||||
|
||||
/** For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones
|
||||
* will not straighten completely until the target is this far out of range. */
|
||||
public float getSoftness () {
|
||||
return softness;
|
||||
}
|
||||
|
||||
public void setSoftness (float softness) {
|
||||
this.softness = softness;
|
||||
}
|
||||
|
||||
/** For two bone IK, controls the bend direction of the IK bones, either 1 or -1. */
|
||||
public int getBendDirection () {
|
||||
return bendDirection;
|
||||
}
|
||||
|
||||
public void setBendDirection (int bendDirection) {
|
||||
this.bendDirection = bendDirection;
|
||||
}
|
||||
|
||||
/** For one bone IK, when true and the target is too close, the bone is scaled to reach it. */
|
||||
public boolean getCompress () {
|
||||
return compress;
|
||||
}
|
||||
|
||||
public void setCompress (boolean compress) {
|
||||
this.compress = compress;
|
||||
}
|
||||
|
||||
/** When true and the target is out of range, the parent bone is scaled to reach it.
|
||||
* <p>
|
||||
* For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if {@link #getSoftness()} is
|
||||
* > 0, and 3) if the parent bone has local nonuniform scale, stretch is not applied. */
|
||||
public boolean getStretch () {
|
||||
return stretch;
|
||||
}
|
||||
|
||||
public void setStretch (boolean stretch) {
|
||||
this.stretch = stretch;
|
||||
}
|
||||
|
||||
public boolean isActive () {
|
||||
return active;
|
||||
}
|
||||
|
||||
/** The IK constraint's setup pose data. */
|
||||
public IkConstraintData getData () {
|
||||
return data;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return data.name;
|
||||
}
|
||||
|
||||
/** Applies 1 bone IK. The target is specified in the world coordinate system. */
|
||||
static public void apply (Bone bone, float targetX, float targetY, boolean compress, boolean stretch, boolean uniform,
|
||||
float alpha) {
|
||||
static public void apply (Skeleton skeleton, BonePose bone, float targetX, float targetY, boolean compress, boolean stretch,
|
||||
boolean uniform, float alpha) {
|
||||
if (bone == null) throw new IllegalArgumentException("bone cannot be null.");
|
||||
Bone p = bone.parent;
|
||||
if (bone.local == skeleton.update) bone.updateLocalTransform(skeleton);
|
||||
BonePose p = bone.bone.parent.applied;
|
||||
float pa = p.a, pb = p.b, pc = p.c, pd = p.d;
|
||||
float rotationIK = -bone.ashearX - bone.arotation, tx, ty;
|
||||
float rotationIK = -bone.shearX - bone.rotation, tx, ty;
|
||||
switch (bone.inherit) {
|
||||
case onlyTranslation:
|
||||
tx = (targetX - bone.worldX) * Math.signum(bone.skeleton.scaleX);
|
||||
ty = (targetY - bone.worldY) * Math.signum(bone.skeleton.scaleY);
|
||||
tx = (targetX - bone.worldX) * Math.signum(skeleton.scaleX);
|
||||
ty = (targetY - bone.worldY) * Math.signum(skeleton.scaleY);
|
||||
break;
|
||||
case noRotationOrReflection:
|
||||
float s = Math.abs(pa * pd - pb * pc) / Math.max(0.0001f, pa * pa + pc * pc);
|
||||
float sa = pa / bone.skeleton.scaleX;
|
||||
float sc = pc / bone.skeleton.scaleY;
|
||||
pb = -sc * s * bone.skeleton.scaleX;
|
||||
pd = sa * s * bone.skeleton.scaleY;
|
||||
float sa = pa / skeleton.scaleX;
|
||||
float sc = pc / skeleton.scaleY;
|
||||
pb = -sc * s * skeleton.scaleX;
|
||||
pd = sa * s * skeleton.scaleY;
|
||||
rotationIK += atan2Deg(sc, sa);
|
||||
// Fall through.
|
||||
default:
|
||||
@ -197,17 +138,17 @@ public class IkConstraint implements Updatable {
|
||||
tx = 0;
|
||||
ty = 0;
|
||||
} else {
|
||||
tx = (x * pd - y * pb) / d - bone.ax;
|
||||
ty = (y * pa - x * pc) / d - bone.ay;
|
||||
tx = (x * pd - y * pb) / d - bone.x;
|
||||
ty = (y * pa - x * pc) / d - bone.y;
|
||||
}
|
||||
}
|
||||
rotationIK += atan2Deg(ty, tx);
|
||||
if (bone.ascaleX < 0) rotationIK += 180;
|
||||
if (bone.scaleX < 0) rotationIK += 180;
|
||||
if (rotationIK > 180)
|
||||
rotationIK -= 360;
|
||||
else if (rotationIK < -180) //
|
||||
rotationIK += 360;
|
||||
float sx = bone.ascaleX, sy = bone.ascaleY;
|
||||
bone.rotation += rotationIK * alpha;
|
||||
if (compress || stretch) {
|
||||
switch (bone.inherit) {
|
||||
case noScale, noScaleOrReflection -> {
|
||||
@ -215,27 +156,30 @@ public class IkConstraint implements Updatable {
|
||||
ty = targetY - bone.worldY;
|
||||
}
|
||||
}
|
||||
float b = bone.data.length * sx;
|
||||
float b = bone.bone.data.length * bone.scaleX;
|
||||
if (b > 0.0001f) {
|
||||
float dd = tx * tx + ty * ty;
|
||||
if ((compress && dd < b * b) || (stretch && dd > b * b)) {
|
||||
float s = ((float)Math.sqrt(dd) / b - 1) * alpha + 1;
|
||||
sx *= s;
|
||||
if (uniform) sy *= s;
|
||||
bone.scaleX *= s;
|
||||
if (uniform) bone.scaleY *= s;
|
||||
}
|
||||
}
|
||||
}
|
||||
bone.updateWorldTransform(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);
|
||||
bone.updateWorldTransform(skeleton);
|
||||
bone.bone.resetUpdate(skeleton);
|
||||
}
|
||||
|
||||
/** Applies 2 bone IK. The target is specified in the world coordinate system.
|
||||
* @param child A direct descendant of the parent bone. */
|
||||
static public void apply (Bone parent, Bone child, float targetX, float targetY, int bendDir, boolean stretch, boolean uniform,
|
||||
float softness, float alpha) {
|
||||
static public void apply (Skeleton skeleton, BonePose parent, BonePose child, float targetX, float targetY, int bendDir,
|
||||
boolean stretch, boolean uniform, float softness, float alpha) {
|
||||
if (parent == null) throw new IllegalArgumentException("parent cannot be null.");
|
||||
if (child == null) throw new IllegalArgumentException("child cannot be null.");
|
||||
if (parent.inherit != Inherit.normal || child.inherit != Inherit.normal) return;
|
||||
float px = parent.ax, py = parent.ay, psx = parent.ascaleX, psy = parent.ascaleY, sx = psx, sy = psy, csx = child.ascaleX;
|
||||
if (parent.local == skeleton.update) parent.updateLocalTransform(skeleton);
|
||||
if (child.local == skeleton.update) child.updateLocalTransform(skeleton);
|
||||
float px = parent.x, py = parent.y, psx = parent.scaleX, psy = parent.scaleY, csx = child.scaleX;
|
||||
int os1, os2, s2;
|
||||
if (psx < 0) {
|
||||
psx = -psx;
|
||||
@ -254,18 +198,17 @@ public class IkConstraint implements Updatable {
|
||||
os2 = 180;
|
||||
} else
|
||||
os2 = 0;
|
||||
float cx = child.ax, cy, cwx, cwy, a = parent.a, b = parent.b, c = parent.c, d = parent.d;
|
||||
float cwx, cwy, a = parent.a, b = parent.b, c = parent.c, d = parent.d;
|
||||
boolean u = Math.abs(psx - psy) <= 0.0001f;
|
||||
if (!u || stretch) {
|
||||
cy = 0;
|
||||
cwx = a * cx + parent.worldX;
|
||||
cwy = c * cx + parent.worldY;
|
||||
child.y = 0;
|
||||
cwx = a * child.x + parent.worldX;
|
||||
cwy = c * child.x + parent.worldY;
|
||||
} else {
|
||||
cy = child.ay;
|
||||
cwx = a * cx + b * cy + parent.worldX;
|
||||
cwy = c * cx + d * cy + parent.worldY;
|
||||
cwx = a * child.x + b * child.y + parent.worldX;
|
||||
cwy = c * child.x + d * child.y + parent.worldY;
|
||||
}
|
||||
Bone pp = parent.parent;
|
||||
BonePose pp = parent.bone.parent.applied;
|
||||
a = pp.a;
|
||||
b = pp.b;
|
||||
c = pp.c;
|
||||
@ -273,10 +216,12 @@ public class IkConstraint implements Updatable {
|
||||
float id = a * d - b * c, x = cwx - pp.worldX, y = cwy - pp.worldY;
|
||||
id = Math.abs(id) <= 0.0001f ? 0 : 1 / id;
|
||||
float dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;
|
||||
float l1 = (float)Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;
|
||||
float l1 = (float)Math.sqrt(dx * dx + dy * dy), l2 = child.bone.data.length * csx, a1, a2;
|
||||
if (l1 < 0.0001f) {
|
||||
apply(parent, targetX, targetY, false, stretch, false, alpha);
|
||||
child.updateWorldTransform(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);
|
||||
apply(skeleton, parent, targetX, targetY, false, stretch, false, alpha);
|
||||
child.rotation = 0;
|
||||
child.updateWorldTransform(skeleton);
|
||||
child.bone.resetUpdate(skeleton);
|
||||
return;
|
||||
}
|
||||
x = targetX - pp.worldX;
|
||||
@ -306,8 +251,8 @@ public class IkConstraint implements Updatable {
|
||||
a2 = 0;
|
||||
if (stretch) {
|
||||
a = ((float)Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;
|
||||
sx *= a;
|
||||
if (uniform) sy *= a;
|
||||
parent.scaleX *= a;
|
||||
if (uniform) parent.scaleY *= a;
|
||||
}
|
||||
} else
|
||||
a2 = (float)Math.acos(cos) * bendDir;
|
||||
@ -364,20 +309,21 @@ public class IkConstraint implements Updatable {
|
||||
a2 = maxAngle * bendDir;
|
||||
}
|
||||
}
|
||||
float os = atan2(cy, cx) * s2;
|
||||
float rotation = parent.arotation;
|
||||
a1 = (a1 - os) * radDeg + os1 - rotation;
|
||||
float os = atan2(child.y, child.x) * s2;
|
||||
a1 = (a1 - os) * radDeg + os1 - parent.rotation;
|
||||
if (a1 > 180)
|
||||
a1 -= 360;
|
||||
else if (a1 < -180) //
|
||||
a1 += 360;
|
||||
parent.updateWorldTransform(px, py, rotation + a1 * alpha, sx, sy, 0, 0);
|
||||
rotation = child.arotation;
|
||||
a2 = ((a2 + os) * radDeg - child.ashearX) * s2 + os2 - rotation;
|
||||
parent.rotation += a1 * alpha;
|
||||
parent.updateWorldTransform(skeleton);
|
||||
a2 = ((a2 + os) * radDeg - child.shearX) * s2 + os2 - child.rotation;
|
||||
if (a2 > 180)
|
||||
a2 -= 360;
|
||||
else if (a2 < -180) //
|
||||
a2 += 360;
|
||||
child.updateWorldTransform(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);
|
||||
child.rotation += a2 * alpha;
|
||||
child.updateWorldTransform(skeleton);
|
||||
parent.bone.resetUpdate(skeleton);
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,15 +34,17 @@ import com.badlogic.gdx.utils.Array;
|
||||
/** Stores the setup pose for an {@link IkConstraint}.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-ik-constraints">IK constraints</a> in the Spine User Guide. */
|
||||
public class IkConstraintData extends ConstraintData {
|
||||
final Array<BoneData> bones = new Array();
|
||||
public class IkConstraintData extends ConstraintData<IkConstraint, IkConstraintPose> {
|
||||
final Array<BoneData> bones = new Array(true, 2, BoneData[]::new);
|
||||
BoneData target;
|
||||
int bendDirection;
|
||||
boolean compress, stretch, uniform;
|
||||
float mix, softness;
|
||||
boolean uniform;
|
||||
|
||||
public IkConstraintData (String name) {
|
||||
super(name);
|
||||
super(name, new IkConstraintPose());
|
||||
}
|
||||
|
||||
public IkConstraint create (Skeleton skeleton) {
|
||||
return new IkConstraint(this, skeleton);
|
||||
}
|
||||
|
||||
/** The bones that are constrained by this IK constraint. */
|
||||
@ -60,58 +62,8 @@ public class IkConstraintData extends ConstraintData {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
|
||||
* <p>
|
||||
* For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0. */
|
||||
public float getMix () {
|
||||
return mix;
|
||||
}
|
||||
|
||||
public void setMix (float mix) {
|
||||
this.mix = mix;
|
||||
}
|
||||
|
||||
/** For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones
|
||||
* will not straighten completely until the target is this far out of range. */
|
||||
public float getSoftness () {
|
||||
return softness;
|
||||
}
|
||||
|
||||
public void setSoftness (float softness) {
|
||||
this.softness = softness;
|
||||
}
|
||||
|
||||
/** For two bone IK, controls the bend direction of the IK bones, either 1 or -1. */
|
||||
public int getBendDirection () {
|
||||
return bendDirection;
|
||||
}
|
||||
|
||||
public void setBendDirection (int bendDirection) {
|
||||
this.bendDirection = bendDirection;
|
||||
}
|
||||
|
||||
/** For one bone IK, when true and the target is too close, the bone is scaled to reach it. */
|
||||
public boolean getCompress () {
|
||||
return compress;
|
||||
}
|
||||
|
||||
public void setCompress (boolean compress) {
|
||||
this.compress = compress;
|
||||
}
|
||||
|
||||
/** When true and the target is out of range, the parent bone is scaled to reach it.
|
||||
* <p>
|
||||
* For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if {@link #getSoftness()} is
|
||||
* > 0, and 3) if the parent bone has local nonuniform scale, stretch is not applied. */
|
||||
public boolean getStretch () {
|
||||
return stretch;
|
||||
}
|
||||
|
||||
public void setStretch (boolean stretch) {
|
||||
this.stretch = stretch;
|
||||
}
|
||||
|
||||
/** When true and {@link #getCompress()} or {@link #getStretch()} is used, the bone is scaled on both the X and Y axes. */
|
||||
/** When true and {@link IkConstraintPose#getCompress()} or {@link IkConstraintPose#getStretch()} is used, the bone is scaled
|
||||
* on both the X and Y axes. */
|
||||
public boolean getUniform () {
|
||||
return uniform;
|
||||
}
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
/** Stores the current pose for an IK constraint. */
|
||||
public class IkConstraintPose implements Pose<IkConstraintPose> {
|
||||
int bendDirection;
|
||||
boolean compress, stretch;
|
||||
float mix, softness;
|
||||
|
||||
public void set (IkConstraintPose pose) {
|
||||
mix = pose.mix;
|
||||
softness = pose.softness;
|
||||
bendDirection = pose.bendDirection;
|
||||
compress = pose.compress;
|
||||
stretch = pose.stretch;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
|
||||
* <p>
|
||||
* For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0. */
|
||||
public float getMix () {
|
||||
return mix;
|
||||
}
|
||||
|
||||
public void setMix (float mix) {
|
||||
this.mix = mix;
|
||||
}
|
||||
|
||||
/** For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones
|
||||
* will not straighten completely until the target is this far out of range. */
|
||||
public float getSoftness () {
|
||||
return softness;
|
||||
}
|
||||
|
||||
public void setSoftness (float softness) {
|
||||
this.softness = softness;
|
||||
}
|
||||
|
||||
/** For two bone IK, controls the bend direction of the IK bones, either 1 or -1. */
|
||||
public int getBendDirection () {
|
||||
return bendDirection;
|
||||
}
|
||||
|
||||
public void setBendDirection (int bendDirection) {
|
||||
this.bendDirection = bendDirection;
|
||||
}
|
||||
|
||||
/** For one bone IK, when true and the target is too close, the bone is scaled to reach it. */
|
||||
public boolean getCompress () {
|
||||
return compress;
|
||||
}
|
||||
|
||||
public void setCompress (boolean compress) {
|
||||
this.compress = compress;
|
||||
}
|
||||
|
||||
/** When true and the target is out of range, the parent bone is scaled to reach it.
|
||||
* <p>
|
||||
* For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if {@link #getSoftness()} is
|
||||
* > 0, and 3) if the parent bone has local nonuniform scale, stretch is not applied. */
|
||||
public boolean getStretch () {
|
||||
return stretch;
|
||||
}
|
||||
|
||||
public void setStretch (boolean stretch) {
|
||||
this.stretch = stretch;
|
||||
}
|
||||
}
|
||||
@ -39,77 +39,63 @@ import com.badlogic.gdx.utils.FloatArray;
|
||||
import com.esotericsoftware.spine.PathConstraintData.PositionMode;
|
||||
import com.esotericsoftware.spine.PathConstraintData.RotateMode;
|
||||
import com.esotericsoftware.spine.PathConstraintData.SpacingMode;
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
import com.esotericsoftware.spine.Skin.SkinEntry;
|
||||
import com.esotericsoftware.spine.attachments.Attachment;
|
||||
import com.esotericsoftware.spine.attachments.PathAttachment;
|
||||
|
||||
/** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the
|
||||
* constrained bones so they follow a {@link PathAttachment}.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-path-constraints">Path constraints</a> in the Spine User Guide. */
|
||||
public class PathConstraint implements Updatable {
|
||||
public class PathConstraint extends Constraint<PathConstraint, PathConstraintData, PathConstraintPose> {
|
||||
static final int NONE = -1, BEFORE = -2, AFTER = -3;
|
||||
static final float epsilon = 0.00001f;
|
||||
|
||||
final PathConstraintData data;
|
||||
final Array<Bone> bones;
|
||||
final Array<BonePose> bones;
|
||||
Slot slot;
|
||||
float position, spacing, mixRotate, mixX, mixY;
|
||||
|
||||
boolean active;
|
||||
|
||||
private final FloatArray spaces = new FloatArray(), positions = new FloatArray();
|
||||
private final FloatArray world = new FloatArray(), curves = new FloatArray(), lengths = new FloatArray();
|
||||
private final float[] segments = new float[10];
|
||||
|
||||
public PathConstraint (PathConstraintData data, Skeleton skeleton) {
|
||||
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
||||
super(data, new PathConstraintPose(), new PathConstraintPose());
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
this.data = data;
|
||||
|
||||
bones = new Array(data.bones.size);
|
||||
bones = new Array(true, data.bones.size, BonePose[]::new);
|
||||
for (BoneData boneData : data.bones)
|
||||
bones.add(skeleton.bones.get(boneData.index));
|
||||
bones.add(skeleton.bones.items[boneData.index].constrained);
|
||||
|
||||
slot = skeleton.slots.get(data.slot.index);
|
||||
|
||||
setToSetupPose();
|
||||
slot = skeleton.slots.items[data.slot.index];
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public PathConstraint (PathConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
setToSetupPose();
|
||||
}
|
||||
|
||||
public void setToSetupPose () {
|
||||
PathConstraintData data = this.data;
|
||||
position = data.position;
|
||||
spacing = data.spacing;
|
||||
mixRotate = data.mixRotate;
|
||||
mixX = data.mixX;
|
||||
mixY = data.mixY;
|
||||
public PathConstraint copy (Skeleton skeleton) {
|
||||
var copy = new PathConstraint(data, skeleton);
|
||||
copy.pose.set(pose);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/** Applies the constraint to the constrained bones. */
|
||||
public void update (Physics physics) {
|
||||
if (!(slot.attachment instanceof PathAttachment pathAttachment)) return;
|
||||
public void update (Skeleton skeleton, Physics physics) {
|
||||
if (!(slot.applied.attachment instanceof PathAttachment pathAttachment)) return;
|
||||
|
||||
float mixRotate = this.mixRotate, mixX = this.mixX, mixY = this.mixY;
|
||||
PathConstraintPose pose = applied;
|
||||
float mixRotate = pose.mixRotate, mixX = pose.mixX, mixY = pose.mixY;
|
||||
if (mixRotate == 0 && mixX == 0 && mixY == 0) return;
|
||||
|
||||
PathConstraintData data = this.data;
|
||||
boolean tangents = data.rotateMode == RotateMode.tangent, scale = data.rotateMode == RotateMode.chainScale;
|
||||
int boneCount = this.bones.size, spacesCount = tangents ? boneCount : boneCount + 1;
|
||||
Object[] bones = this.bones.items;
|
||||
BonePose[] bones = this.bones.items;
|
||||
float[] spaces = this.spaces.setSize(spacesCount), lengths = scale ? this.lengths.setSize(boneCount) : null;
|
||||
float spacing = this.spacing;
|
||||
float spacing = pose.spacing;
|
||||
|
||||
switch (data.spacingMode) {
|
||||
case percent -> {
|
||||
if (scale) {
|
||||
for (int i = 0, n = spacesCount - 1; i < n; i++) {
|
||||
var bone = (Bone)bones[i];
|
||||
float setupLength = bone.data.length;
|
||||
BonePose bone = bones[i];
|
||||
float setupLength = bone.bone.data.length;
|
||||
float x = setupLength * bone.a, y = setupLength * bone.c;
|
||||
lengths[i] = (float)Math.sqrt(x * x + y * y);
|
||||
}
|
||||
@ -119,8 +105,8 @@ public class PathConstraint implements Updatable {
|
||||
case proportional -> {
|
||||
float sum = 0;
|
||||
for (int i = 0, n = spacesCount - 1; i < n;) {
|
||||
var bone = (Bone)bones[i];
|
||||
float setupLength = bone.data.length;
|
||||
BonePose bone = bones[i];
|
||||
float setupLength = bone.bone.data.length;
|
||||
if (setupLength < epsilon) {
|
||||
if (scale) lengths[i] = 0;
|
||||
spaces[++i] = spacing;
|
||||
@ -141,8 +127,8 @@ public class PathConstraint implements Updatable {
|
||||
default -> {
|
||||
boolean lengthSpacing = data.spacingMode == SpacingMode.length;
|
||||
for (int i = 0, n = spacesCount - 1; i < n;) {
|
||||
var bone = (Bone)bones[i];
|
||||
float setupLength = bone.data.length;
|
||||
BonePose bone = bones[i];
|
||||
float setupLength = bone.bone.data.length;
|
||||
if (setupLength < epsilon) {
|
||||
if (scale) lengths[i] = 0;
|
||||
spaces[++i] = spacing;
|
||||
@ -156,18 +142,18 @@ public class PathConstraint implements Updatable {
|
||||
}
|
||||
}
|
||||
|
||||
float[] positions = computeWorldPositions(pathAttachment, spacesCount, tangents);
|
||||
float[] positions = computeWorldPositions(skeleton, pathAttachment, spacesCount, tangents);
|
||||
float boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;
|
||||
boolean tip;
|
||||
if (offsetRotation == 0)
|
||||
tip = data.rotateMode == RotateMode.chain;
|
||||
else {
|
||||
tip = false;
|
||||
Bone p = slot.bone;
|
||||
BonePose p = slot.bone.applied;
|
||||
offsetRotation *= p.a * p.d - p.b * p.c > 0 ? degRad : -degRad;
|
||||
}
|
||||
for (int i = 0, p = 3; i < boneCount; i++, p += 3) {
|
||||
var bone = (Bone)bones[i];
|
||||
BonePose bone = bones[i];
|
||||
bone.worldX += (boneX - bone.worldX) * mixX;
|
||||
bone.worldY += (boneY - bone.worldY) * mixY;
|
||||
float x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;
|
||||
@ -193,7 +179,7 @@ public class PathConstraint implements Updatable {
|
||||
if (tip) {
|
||||
cos = cos(r);
|
||||
sin = sin(r);
|
||||
float length = bone.data.length;
|
||||
float length = bone.bone.data.length;
|
||||
boneX += (length * (cos * a - sin * c) - dx) * mixRotate;
|
||||
boneY += (length * (sin * a + cos * c) - dy) * mixRotate;
|
||||
} else
|
||||
@ -210,13 +196,14 @@ public class PathConstraint implements Updatable {
|
||||
bone.c = sin * a + cos * c;
|
||||
bone.d = sin * b + cos * d;
|
||||
}
|
||||
bone.updateAppliedTransform();
|
||||
bone.local = skeleton.update;
|
||||
bone.bone.resetUpdate(skeleton);
|
||||
}
|
||||
}
|
||||
|
||||
float[] computeWorldPositions (PathAttachment path, int spacesCount, boolean tangents) {
|
||||
float[] computeWorldPositions (Skeleton skeleton, PathAttachment path, int spacesCount, boolean tangents) {
|
||||
Slot slot = this.slot;
|
||||
float position = this.position;
|
||||
float position = applied.position;
|
||||
float[] spaces = this.spaces.items, out = this.positions.setSize(spacesCount * 3 + 2), world;
|
||||
boolean closed = path.getClosed();
|
||||
int verticesLength = path.getWorldVerticesLength(), curveCount = verticesLength / 6, prevCurve = NONE;
|
||||
@ -247,14 +234,14 @@ public class PathConstraint implements Updatable {
|
||||
} else if (p < 0) {
|
||||
if (prevCurve != BEFORE) {
|
||||
prevCurve = BEFORE;
|
||||
path.computeWorldVertices(slot, 2, 4, world, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, 2, 4, world, 0, 2);
|
||||
}
|
||||
addBeforePosition(p, world, 0, out, o);
|
||||
continue;
|
||||
} else if (p > pathLength) {
|
||||
if (prevCurve != AFTER) {
|
||||
prevCurve = AFTER;
|
||||
path.computeWorldVertices(slot, verticesLength - 6, 4, world, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, verticesLength - 6, 4, world, 0, 2);
|
||||
}
|
||||
addAfterPosition(p - pathLength, world, 0, out, o);
|
||||
continue;
|
||||
@ -275,10 +262,10 @@ public class PathConstraint implements Updatable {
|
||||
if (curve != prevCurve) {
|
||||
prevCurve = curve;
|
||||
if (closed && curve == curveCount) {
|
||||
path.computeWorldVertices(slot, verticesLength - 4, 4, world, 0, 2);
|
||||
path.computeWorldVertices(slot, 0, 4, world, 4, 2);
|
||||
path.computeWorldVertices(skeleton, slot, verticesLength - 4, 4, world, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, 0, 4, world, 4, 2);
|
||||
} else
|
||||
path.computeWorldVertices(slot, curve * 6 + 2, 8, world, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, curve * 6 + 2, 8, world, 0, 2);
|
||||
}
|
||||
addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o,
|
||||
tangents || (i > 0 && space < epsilon));
|
||||
@ -290,15 +277,15 @@ public class PathConstraint implements Updatable {
|
||||
if (closed) {
|
||||
verticesLength += 2;
|
||||
world = this.world.setSize(verticesLength);
|
||||
path.computeWorldVertices(slot, 2, verticesLength - 4, world, 0, 2);
|
||||
path.computeWorldVertices(slot, 0, 2, world, verticesLength - 4, 2);
|
||||
path.computeWorldVertices(skeleton, slot, 2, verticesLength - 4, world, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, 0, 2, world, verticesLength - 4, 2);
|
||||
world[verticesLength - 2] = world[0];
|
||||
world[verticesLength - 1] = world[1];
|
||||
} else {
|
||||
curveCount--;
|
||||
verticesLength -= 4;
|
||||
world = this.world.setSize(verticesLength);
|
||||
path.computeWorldVertices(slot, 2, verticesLength, world, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, 2, verticesLength, world, 0, 2);
|
||||
}
|
||||
|
||||
// Curve lengths.
|
||||
@ -472,53 +459,57 @@ public class PathConstraint implements Updatable {
|
||||
}
|
||||
}
|
||||
|
||||
/** The position along the path. */
|
||||
public float getPosition () {
|
||||
return position;
|
||||
void sort (Skeleton skeleton) {
|
||||
int slotIndex = slot.getData().index;
|
||||
Bone slotBone = slot.bone;
|
||||
if (skeleton.skin != null) sortPathConstraintAttachment(skeleton, skeleton.skin, slotIndex, slotBone);
|
||||
if (skeleton.data.defaultSkin != null && skeleton.data.defaultSkin != skeleton.skin)
|
||||
sortPathConstraintAttachment(skeleton, skeleton.data.defaultSkin, slotIndex, slotBone);
|
||||
sortPathConstraintAttachment(skeleton, slot.pose.attachment, slotBone);
|
||||
BonePose[] bones = this.bones.items;
|
||||
int boneCount = this.bones.size;
|
||||
for (int i = 0; i < boneCount; i++) {
|
||||
Bone bone = bones[i].bone;
|
||||
skeleton.resetCache(bone);
|
||||
skeleton.sortBone(bone);
|
||||
}
|
||||
skeleton.updateCache.add(this);
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
skeleton.sortReset(bones[i].bone.children);
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
bones[i].bone.sorted = true;
|
||||
}
|
||||
|
||||
public void setPosition (float position) {
|
||||
this.position = position;
|
||||
private void sortPathConstraintAttachment (Skeleton skeleton, Skin skin, int slotIndex, Bone slotBone) {
|
||||
Object[] entries = skin.attachments.orderedItems().items;
|
||||
for (int i = 0, n = skin.attachments.size; i < n; i++) {
|
||||
var entry = (SkinEntry)entries[i];
|
||||
if (entry.slotIndex == slotIndex) sortPathConstraintAttachment(skeleton, entry.attachment, slotBone);
|
||||
}
|
||||
}
|
||||
|
||||
/** The spacing between bones. */
|
||||
public float getSpacing () {
|
||||
return spacing;
|
||||
private void sortPathConstraintAttachment (Skeleton skeleton, Attachment attachment, Bone slotBone) {
|
||||
if (!(attachment instanceof PathAttachment pathAttachment)) return;
|
||||
int[] pathBones = pathAttachment.getBones();
|
||||
if (pathBones == null)
|
||||
skeleton.sortBone(slotBone);
|
||||
else {
|
||||
Bone[] bones = skeleton.bones.items;
|
||||
for (int i = 0, n = pathBones.length; i < n;) {
|
||||
int nn = pathBones[i++];
|
||||
nn += i;
|
||||
while (i < nn)
|
||||
skeleton.sortBone(bones[pathBones[i++]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setSpacing (float spacing) {
|
||||
this.spacing = spacing;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation. */
|
||||
public float getMixRotate () {
|
||||
return mixRotate;
|
||||
}
|
||||
|
||||
public void setMixRotate (float mixRotate) {
|
||||
this.mixRotate = mixRotate;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation X. */
|
||||
public float getMixX () {
|
||||
return mixX;
|
||||
}
|
||||
|
||||
public void setMixX (float mixX) {
|
||||
this.mixX = mixX;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y. */
|
||||
public float getMixY () {
|
||||
return mixY;
|
||||
}
|
||||
|
||||
public void setMixY (float mixY) {
|
||||
this.mixY = mixY;
|
||||
boolean isSourceActive () {
|
||||
return slot.bone.active;
|
||||
}
|
||||
|
||||
/** The bones that will be modified by this path constraint. */
|
||||
public Array<Bone> getBones () {
|
||||
public Array<BonePose> getBones () {
|
||||
return bones;
|
||||
}
|
||||
|
||||
@ -531,17 +522,4 @@ public class PathConstraint implements Updatable {
|
||||
if (slot == null) throw new IllegalArgumentException("slot cannot be null.");
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
public boolean isActive () {
|
||||
return active;
|
||||
}
|
||||
|
||||
/** The path constraint's setup pose data. */
|
||||
public PathConstraintData getData () {
|
||||
return data;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return data.name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,17 +34,20 @@ import com.badlogic.gdx.utils.Array;
|
||||
/** Stores the setup pose for a {@link PathConstraint}.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-path-constraints">Path constraints</a> in the Spine User Guide. */
|
||||
public class PathConstraintData extends ConstraintData {
|
||||
final Array<BoneData> bones = new Array();
|
||||
public class PathConstraintData extends ConstraintData<PathConstraint, PathConstraintPose> {
|
||||
final Array<BoneData> bones = new Array(true, 0, BoneData[]::new);
|
||||
SlotData slot;
|
||||
PositionMode positionMode;
|
||||
SpacingMode spacingMode;
|
||||
RotateMode rotateMode;
|
||||
float offsetRotation;
|
||||
float position, spacing, mixRotate, mixX, mixY;
|
||||
|
||||
public PathConstraintData (String name) {
|
||||
super(name);
|
||||
super(name, new PathConstraintPose());
|
||||
}
|
||||
|
||||
public PathConstraint create (Skeleton skeleton) {
|
||||
return new PathConstraint(this, skeleton);
|
||||
}
|
||||
|
||||
/** The bones that will be modified by this path constraint. */
|
||||
@ -101,51 +104,6 @@ public class PathConstraintData extends ConstraintData {
|
||||
this.offsetRotation = offsetRotation;
|
||||
}
|
||||
|
||||
/** The position along the path. */
|
||||
public float getPosition () {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition (float position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
/** The spacing between bones. */
|
||||
public float getSpacing () {
|
||||
return spacing;
|
||||
}
|
||||
|
||||
public void setSpacing (float spacing) {
|
||||
this.spacing = spacing;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation. */
|
||||
public float getMixRotate () {
|
||||
return mixRotate;
|
||||
}
|
||||
|
||||
public void setMixRotate (float mixRotate) {
|
||||
this.mixRotate = mixRotate;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation X. */
|
||||
public float getMixX () {
|
||||
return mixX;
|
||||
}
|
||||
|
||||
public void setMixX (float mixX) {
|
||||
this.mixX = mixX;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y. */
|
||||
public float getMixY () {
|
||||
return mixY;
|
||||
}
|
||||
|
||||
public void setMixY (float mixY) {
|
||||
this.mixY = mixY;
|
||||
}
|
||||
|
||||
/** Controls how the first bone is positioned along the path.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-path-constraints#Position-mode">Position mode</a> in the Spine User
|
||||
|
||||
@ -0,0 +1,88 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
/** Stores a pose for a path constraint. */
|
||||
public class PathConstraintPose implements Pose<PathConstraintPose> {
|
||||
float position, spacing, mixRotate, mixX, mixY;
|
||||
|
||||
public void set (PathConstraintPose pose) {
|
||||
position = pose.position;
|
||||
spacing = pose.spacing;
|
||||
mixRotate = pose.mixRotate;
|
||||
mixX = pose.mixX;
|
||||
mixY = pose.mixY;
|
||||
}
|
||||
|
||||
/** The position along the path. */
|
||||
public float getPosition () {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition (float position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
/** The spacing between bones. */
|
||||
public float getSpacing () {
|
||||
return spacing;
|
||||
}
|
||||
|
||||
public void setSpacing (float spacing) {
|
||||
this.spacing = spacing;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation. */
|
||||
public float getMixRotate () {
|
||||
return mixRotate;
|
||||
}
|
||||
|
||||
public void setMixRotate (float mixRotate) {
|
||||
this.mixRotate = mixRotate;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation X. */
|
||||
public float getMixX () {
|
||||
return mixX;
|
||||
}
|
||||
|
||||
public void setMixX (float mixX) {
|
||||
this.mixX = mixX;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y. */
|
||||
public float getMixY () {
|
||||
return mixY;
|
||||
}
|
||||
|
||||
public void setMixY (float mixY) {
|
||||
this.mixY = mixY;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
/** Determines how physics and other non-deterministic updates are applied. */
|
||||
public enum Physics {
|
||||
/** Physics are not updated or applied. */
|
||||
none,
|
||||
|
||||
/** Physics are reset to the current pose. */
|
||||
reset,
|
||||
|
||||
/** Physics are updated and the pose from physics is applied. */
|
||||
update,
|
||||
|
||||
/** Physics are not updated but the pose from physics is applied. */
|
||||
pose
|
||||
}
|
||||
@ -31,72 +31,53 @@ package com.esotericsoftware.spine;
|
||||
|
||||
import static com.esotericsoftware.spine.utils.SpineUtils.*;
|
||||
|
||||
import com.esotericsoftware.spine.Skeleton.Physics;
|
||||
|
||||
/** Stores the current pose for a physics constraint. A physics constraint applies physics to bones.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
public class PhysicsConstraint implements Updatable {
|
||||
final PhysicsConstraintData data;
|
||||
Bone bone;
|
||||
float inertia, strength, damping, massInverse, wind, gravity, mix;
|
||||
public class PhysicsConstraint extends Constraint<PhysicsConstraint, PhysicsConstraintData, PhysicsConstraintPose> {
|
||||
BonePose bone;
|
||||
|
||||
boolean reset = true;
|
||||
float ux, uy, cx, cy, tx, ty;
|
||||
float xOffset, xVelocity;
|
||||
float yOffset, yVelocity;
|
||||
float rotateOffset, rotateVelocity;
|
||||
float scaleOffset, scaleVelocity;
|
||||
|
||||
boolean active;
|
||||
|
||||
final Skeleton skeleton;
|
||||
float xOffset, xLag, xVelocity;
|
||||
float yOffset, yLag, yVelocity;
|
||||
float rotateOffset, rotateLag, rotateVelocity;
|
||||
float scaleOffset, scaleLag, scaleVelocity;
|
||||
float remaining, lastTime;
|
||||
|
||||
public PhysicsConstraint (PhysicsConstraintData data, Skeleton skeleton) {
|
||||
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
||||
super(data, new PhysicsConstraintPose(), new PhysicsConstraintPose());
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
this.data = data;
|
||||
this.skeleton = skeleton;
|
||||
|
||||
bone = skeleton.bones.get(data.bone.index);
|
||||
|
||||
setToSetupPose();
|
||||
bone = skeleton.bones.items[data.bone.index].constrained;
|
||||
}
|
||||
|
||||
/** Copy constructor. */
|
||||
public PhysicsConstraint (PhysicsConstraint constraint, Skeleton skeleton) {
|
||||
this(constraint.data, skeleton);
|
||||
setToSetupPose();
|
||||
public PhysicsConstraint copy (Skeleton skeleton) {
|
||||
var copy = new PhysicsConstraint(data, skeleton);
|
||||
copy.pose.set(pose);
|
||||
return copy;
|
||||
}
|
||||
|
||||
public void reset () {
|
||||
public void reset (Skeleton skeleton) {
|
||||
remaining = 0;
|
||||
lastTime = skeleton.time;
|
||||
reset = true;
|
||||
xOffset = 0;
|
||||
xLag = 0;
|
||||
xVelocity = 0;
|
||||
yOffset = 0;
|
||||
yLag = 0;
|
||||
yVelocity = 0;
|
||||
rotateOffset = 0;
|
||||
rotateLag = 0;
|
||||
rotateVelocity = 0;
|
||||
scaleOffset = 0;
|
||||
scaleLag = 0;
|
||||
scaleVelocity = 0;
|
||||
}
|
||||
|
||||
public void setToSetupPose () {
|
||||
PhysicsConstraintData data = this.data;
|
||||
inertia = data.inertia;
|
||||
strength = data.strength;
|
||||
damping = data.damping;
|
||||
massInverse = data.massInverse;
|
||||
wind = data.wind;
|
||||
gravity = data.gravity;
|
||||
mix = data.mix;
|
||||
}
|
||||
|
||||
/** Translates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone moved an additional
|
||||
* amount in world space. */
|
||||
/** Translates the physics constraint so next {@link #update(Skeleton, Physics)} forces are applied as if the bone moved an
|
||||
* additional amount in world space. */
|
||||
public void translate (float x, float y) {
|
||||
ux -= x;
|
||||
uy -= y;
|
||||
@ -104,8 +85,8 @@ public class PhysicsConstraint implements Updatable {
|
||||
cy -= y;
|
||||
}
|
||||
|
||||
/** Rotates the physics constraint so next {@link #update(Physics)} forces are applied as if the bone rotated around the
|
||||
* specified point in world space. */
|
||||
/** Rotates the physics constraint so next {@link #update(Skeleton, Physics)} forces are applied as if the bone rotated around
|
||||
* the specified point in world space. */
|
||||
public void rotate (float x, float y, float degrees) {
|
||||
float r = degrees * degRad, cos = cos(r), sin = sin(r);
|
||||
float dx = cx - x, dy = cy - y;
|
||||
@ -113,22 +94,22 @@ public class PhysicsConstraint implements Updatable {
|
||||
}
|
||||
|
||||
/** Applies the constraint to the constrained bones. */
|
||||
public void update (Physics physics) {
|
||||
float mix = this.mix;
|
||||
public void update (Skeleton skeleton, Physics physics) {
|
||||
PhysicsConstraintPose pose = applied;
|
||||
float mix = pose.mix;
|
||||
if (mix == 0) return;
|
||||
|
||||
boolean x = data.x > 0, y = data.y > 0, rotateOrShearX = data.rotate > 0 || data.shearX > 0, scaleX = data.scaleX > 0;
|
||||
Bone bone = this.bone;
|
||||
float l = bone.data.length;
|
||||
BonePose bone = this.bone;
|
||||
float l = bone.bone.data.length, t = data.step, z = 0;
|
||||
|
||||
switch (physics) {
|
||||
case none:
|
||||
return;
|
||||
case reset:
|
||||
reset();
|
||||
reset(skeleton);
|
||||
// Fall through.
|
||||
case update:
|
||||
Skeleton skeleton = this.skeleton;
|
||||
float delta = Math.max(skeleton.time - lastTime, 0);
|
||||
remaining += delta;
|
||||
lastTime = skeleton.time;
|
||||
@ -139,8 +120,8 @@ public class PhysicsConstraint implements Updatable {
|
||||
ux = bx;
|
||||
uy = by;
|
||||
} else {
|
||||
float a = remaining, i = inertia, t = data.step, f = skeleton.data.referenceScale, d = -1;
|
||||
float qx = data.limit * delta, qy = qx * Math.abs(skeleton.scaleY);
|
||||
float a = remaining, i = pose.inertia, f = skeleton.data.referenceScale, d = -1, qx = data.limit * delta,
|
||||
qy = qx * Math.abs(skeleton.scaleY);
|
||||
qx *= Math.abs(skeleton.scaleX);
|
||||
if (x || y) {
|
||||
if (x) {
|
||||
@ -154,8 +135,9 @@ public class PhysicsConstraint implements Updatable {
|
||||
uy = by;
|
||||
}
|
||||
if (a >= t) {
|
||||
d = (float)Math.pow(damping, 60 * t);
|
||||
float m = massInverse * t, e = strength, w = wind * f * skeleton.scaleX, g = gravity * f * skeleton.scaleY;
|
||||
d = (float)Math.pow(pose.damping, 60 * t);
|
||||
float m = pose.massInverse * t, e = pose.strength, w = pose.wind * f * skeleton.scaleX,
|
||||
g = pose.gravity * f * skeleton.scaleY, xs = xOffset, ys = yOffset;
|
||||
do {
|
||||
if (x) {
|
||||
xVelocity += (w - xOffset * e) * m;
|
||||
@ -169,13 +151,15 @@ public class PhysicsConstraint implements Updatable {
|
||||
}
|
||||
a -= t;
|
||||
} while (a >= t);
|
||||
xLag = xOffset - xs;
|
||||
yLag = yOffset - ys;
|
||||
}
|
||||
if (x) bone.worldX += xOffset * mix * data.x;
|
||||
if (y) bone.worldY += yOffset * mix * data.y;
|
||||
z = Math.max(0, 1 - a / t);
|
||||
if (x) bone.worldX += (xOffset - xLag * z) * mix * data.x;
|
||||
if (y) bone.worldY += (yOffset - yLag * z) * mix * data.y;
|
||||
}
|
||||
if (rotateOrShearX || scaleX) {
|
||||
float ca = atan2(bone.c, bone.a), c, s, mr = 0;
|
||||
float dx = cx - bone.worldX, dy = cy - bone.worldY;
|
||||
float ca = atan2(bone.c, bone.a), c, s, mr = 0, dx = cx - bone.worldX, dy = cy - bone.worldY;
|
||||
if (dx > qx)
|
||||
dx = qx;
|
||||
else if (dx < -qx) //
|
||||
@ -184,11 +168,12 @@ public class PhysicsConstraint implements Updatable {
|
||||
dy = qy;
|
||||
else if (dy < -qy) //
|
||||
dy = -qy;
|
||||
a = remaining;
|
||||
if (rotateOrShearX) {
|
||||
mr = (data.rotate + data.shearX) * mix;
|
||||
float r = atan2(dy + ty, dx + tx) - ca - rotateOffset * mr;
|
||||
float rz = rotateLag * Math.max(0, 1 - a / t), r = atan2(dy + ty, dx + tx) - ca - (rotateOffset - rz) * mr;
|
||||
rotateOffset += (r - (float)Math.ceil(r * invPI2 - 0.5f) * PI2) * i;
|
||||
r = rotateOffset * mr + ca;
|
||||
r = (rotateOffset - rz) * mr + ca;
|
||||
c = cos(r);
|
||||
s = sin(r);
|
||||
if (scaleX) {
|
||||
@ -201,10 +186,10 @@ public class PhysicsConstraint implements Updatable {
|
||||
float r = l * bone.getWorldScaleX();
|
||||
if (r > 0) scaleOffset += (dx * c + dy * s) * i / r;
|
||||
}
|
||||
a = remaining;
|
||||
if (a >= t) {
|
||||
if (d == -1) d = (float)Math.pow(damping, 60 * t);
|
||||
float m = massInverse * t, e = strength, w = wind, g = gravity, h = l / f;
|
||||
if (d == -1) d = (float)Math.pow(pose.damping, 60 * t);
|
||||
float m = pose.massInverse * t, e = pose.strength, w = pose.wind, g = pose.gravity, h = l / f,
|
||||
rs = rotateOffset, ss = scaleOffset;
|
||||
while (true) {
|
||||
a -= t;
|
||||
if (scaleX) {
|
||||
@ -223,7 +208,10 @@ public class PhysicsConstraint implements Updatable {
|
||||
} else if (a < t) //
|
||||
break;
|
||||
}
|
||||
rotateLag = rotateOffset - rs;
|
||||
scaleLag = scaleOffset - ss;
|
||||
}
|
||||
z = Math.max(0, 1 - a / t);
|
||||
}
|
||||
remaining = a;
|
||||
}
|
||||
@ -231,12 +219,13 @@ public class PhysicsConstraint implements Updatable {
|
||||
cy = bone.worldY;
|
||||
break;
|
||||
case pose:
|
||||
if (x) bone.worldX += xOffset * mix * data.x;
|
||||
if (y) bone.worldY += yOffset * mix * data.y;
|
||||
z = Math.max(0, 1 - remaining / t);
|
||||
if (x) bone.worldX += (xOffset - xLag * z) * mix * data.x;
|
||||
if (y) bone.worldY += (yOffset - yLag * z) * mix * data.y;
|
||||
}
|
||||
|
||||
if (rotateOrShearX) {
|
||||
float o = rotateOffset * mix, s, c, a;
|
||||
float o = (rotateOffset - rotateLag * z) * mix, s, c, a;
|
||||
if (data.shearX > 0) {
|
||||
float r = 0;
|
||||
if (data.rotate > 0) {
|
||||
@ -266,7 +255,7 @@ public class PhysicsConstraint implements Updatable {
|
||||
}
|
||||
}
|
||||
if (scaleX) {
|
||||
float s = 1 + scaleOffset * mix * data.scaleX;
|
||||
float s = 1 + (scaleOffset - scaleLag * z) * mix * data.scaleX;
|
||||
bone.a *= s;
|
||||
bone.c *= s;
|
||||
}
|
||||
@ -274,85 +263,28 @@ public class PhysicsConstraint implements Updatable {
|
||||
tx = l * bone.a;
|
||||
ty = l * bone.c;
|
||||
}
|
||||
bone.updateAppliedTransform();
|
||||
bone.local = skeleton.update;
|
||||
bone.bone.resetUpdate(skeleton);
|
||||
}
|
||||
|
||||
void sort (Skeleton skeleton) {
|
||||
Bone bone = this.bone.bone;
|
||||
skeleton.sortBone(bone);
|
||||
skeleton.resetCache(bone);
|
||||
skeleton.updateCache.add(this);
|
||||
skeleton.sortReset(bone.children);
|
||||
}
|
||||
|
||||
boolean isSourceActive () {
|
||||
return bone.bone.active;
|
||||
}
|
||||
|
||||
/** The bone constrained by this physics constraint. */
|
||||
public Bone getBone () {
|
||||
public BonePose getBone () {
|
||||
return bone;
|
||||
}
|
||||
|
||||
public void setBone (Bone bone) {
|
||||
public void setBone (BonePose bone) {
|
||||
this.bone = bone;
|
||||
}
|
||||
|
||||
public float getInertia () {
|
||||
return inertia;
|
||||
}
|
||||
|
||||
public void setInertia (float inertia) {
|
||||
this.inertia = inertia;
|
||||
}
|
||||
|
||||
public float getStrength () {
|
||||
return strength;
|
||||
}
|
||||
|
||||
public void setStrength (float strength) {
|
||||
this.strength = strength;
|
||||
}
|
||||
|
||||
public float getDamping () {
|
||||
return damping;
|
||||
}
|
||||
|
||||
public void setDamping (float damping) {
|
||||
this.damping = damping;
|
||||
}
|
||||
|
||||
public float getMassInverse () {
|
||||
return massInverse;
|
||||
}
|
||||
|
||||
public void setMassInverse (float massInverse) {
|
||||
this.massInverse = massInverse;
|
||||
}
|
||||
|
||||
public float getWind () {
|
||||
return wind;
|
||||
}
|
||||
|
||||
public void setWind (float wind) {
|
||||
this.wind = wind;
|
||||
}
|
||||
|
||||
public float getGravity () {
|
||||
return gravity;
|
||||
}
|
||||
|
||||
public void setGravity (float gravity) {
|
||||
this.gravity = gravity;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
|
||||
public float getMix () {
|
||||
return mix;
|
||||
}
|
||||
|
||||
public void setMix (float mix) {
|
||||
this.mix = mix;
|
||||
}
|
||||
|
||||
public boolean isActive () {
|
||||
return active;
|
||||
}
|
||||
|
||||
/** The physics constraint's setup pose data. */
|
||||
public PhysicsConstraintData getData () {
|
||||
return data;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return data.name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,14 +32,17 @@ package com.esotericsoftware.spine;
|
||||
/** Stores the setup pose for a {@link PhysicsConstraint}.
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
public class PhysicsConstraintData extends ConstraintData {
|
||||
public class PhysicsConstraintData extends ConstraintData<PhysicsConstraint, PhysicsConstraintPose> {
|
||||
BoneData bone;
|
||||
float x, y, rotate, scaleX, shearX, limit;
|
||||
float step, inertia, strength, damping, massInverse, wind, gravity, mix;
|
||||
float x, y, rotate, scaleX, shearX, limit, step;
|
||||
boolean inertiaGlobal, strengthGlobal, dampingGlobal, massGlobal, windGlobal, gravityGlobal, mixGlobal;
|
||||
|
||||
public PhysicsConstraintData (String name) {
|
||||
super(name);
|
||||
super(name, new PhysicsConstraintPose());
|
||||
}
|
||||
|
||||
public PhysicsConstraint create (Skeleton skeleton) {
|
||||
return new PhysicsConstraint(this, skeleton);
|
||||
}
|
||||
|
||||
/** The bone constrained by this physics constraint. */
|
||||
@ -107,63 +110,6 @@ public class PhysicsConstraintData extends ConstraintData {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public float getInertia () {
|
||||
return inertia;
|
||||
}
|
||||
|
||||
public void setInertia (float inertia) {
|
||||
this.inertia = inertia;
|
||||
}
|
||||
|
||||
public float getStrength () {
|
||||
return strength;
|
||||
}
|
||||
|
||||
public void setStrength (float strength) {
|
||||
this.strength = strength;
|
||||
}
|
||||
|
||||
public float getDamping () {
|
||||
return damping;
|
||||
}
|
||||
|
||||
public void setDamping (float damping) {
|
||||
this.damping = damping;
|
||||
}
|
||||
|
||||
public float getMassInverse () {
|
||||
return massInverse;
|
||||
}
|
||||
|
||||
public void setMassInverse (float massInverse) {
|
||||
this.massInverse = massInverse;
|
||||
}
|
||||
|
||||
public float getWind () {
|
||||
return wind;
|
||||
}
|
||||
|
||||
public void setWind (float wind) {
|
||||
this.wind = wind;
|
||||
}
|
||||
|
||||
public float getGravity () {
|
||||
return gravity;
|
||||
}
|
||||
|
||||
public void setGravity (float gravity) {
|
||||
this.gravity = gravity;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
|
||||
public float getMix () {
|
||||
return mix;
|
||||
}
|
||||
|
||||
public void setMix (float mix) {
|
||||
this.mix = mix;
|
||||
}
|
||||
|
||||
public boolean getInertiaGlobal () {
|
||||
return inertiaGlobal;
|
||||
}
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
/** Stores a pose for a physics constraint. */
|
||||
public class PhysicsConstraintPose implements Pose<PhysicsConstraintPose> {
|
||||
float inertia, strength, damping, massInverse, wind, gravity, mix;
|
||||
|
||||
public void set (PhysicsConstraintPose pose) {
|
||||
inertia = pose.inertia;
|
||||
strength = pose.strength;
|
||||
damping = pose.damping;
|
||||
massInverse = pose.massInverse;
|
||||
wind = pose.wind;
|
||||
gravity = pose.gravity;
|
||||
mix = pose.mix;
|
||||
}
|
||||
|
||||
public float getInertia () {
|
||||
return inertia;
|
||||
}
|
||||
|
||||
public void setInertia (float inertia) {
|
||||
this.inertia = inertia;
|
||||
}
|
||||
|
||||
public float getStrength () {
|
||||
return strength;
|
||||
}
|
||||
|
||||
public void setStrength (float strength) {
|
||||
this.strength = strength;
|
||||
}
|
||||
|
||||
public float getDamping () {
|
||||
return damping;
|
||||
}
|
||||
|
||||
public void setDamping (float damping) {
|
||||
this.damping = damping;
|
||||
}
|
||||
|
||||
public float getMassInverse () {
|
||||
return massInverse;
|
||||
}
|
||||
|
||||
public void setMassInverse (float massInverse) {
|
||||
this.massInverse = massInverse;
|
||||
}
|
||||
|
||||
public float getWind () {
|
||||
return wind;
|
||||
}
|
||||
|
||||
public void setWind (float wind) {
|
||||
this.wind = wind;
|
||||
}
|
||||
|
||||
public float getGravity () {
|
||||
return gravity;
|
||||
}
|
||||
|
||||
public void setGravity (float gravity) {
|
||||
this.gravity = gravity;
|
||||
}
|
||||
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
|
||||
public float getMix () {
|
||||
return mix;
|
||||
}
|
||||
|
||||
public void setMix (float mix) {
|
||||
this.mix = mix;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
public interface Pose<P> {
|
||||
public void set (P pose);
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
abstract public class Posed< //
|
||||
D extends PosedData<P>, //
|
||||
P extends Pose, //
|
||||
A extends P> {
|
||||
|
||||
final D data;
|
||||
final P pose;
|
||||
final A constrained;
|
||||
A applied;
|
||||
|
||||
public Posed (D data, P pose, A constrained) {
|
||||
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
||||
this.data = data;
|
||||
this.pose = pose;
|
||||
this.constrained = constrained;
|
||||
applied = (A)pose;
|
||||
}
|
||||
|
||||
public void setupPose () {
|
||||
pose.set(data.setup);
|
||||
}
|
||||
|
||||
/** The constraint's setup pose data. */
|
||||
public D getData () {
|
||||
return data;
|
||||
}
|
||||
|
||||
public P getPose () {
|
||||
return pose;
|
||||
}
|
||||
|
||||
public A getAppliedPose () {
|
||||
return applied;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return data.name;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
abstract public class PosedActive< //
|
||||
D extends PosedData<P>, //
|
||||
P extends Pose, //
|
||||
A extends P> //
|
||||
extends Posed<D, P, A> {
|
||||
|
||||
boolean active;
|
||||
|
||||
public PosedActive (D data, P pose, A constrained) {
|
||||
super(data, pose, constrained);
|
||||
setupPose();
|
||||
}
|
||||
|
||||
/** Returns false when this constraint won't be updated by
|
||||
* {@link Skeleton#updateWorldTransform(com.esotericsoftware.spine.Physics)} because a skin is required and the
|
||||
* {@link Skeleton#getSkin() active skin} does not contain this item.
|
||||
* @see Skin#getBones()
|
||||
* @see Skin#getConstraints()
|
||||
* @see PosedData#getSkinRequired()
|
||||
* @see Skeleton#updateCache() */
|
||||
public boolean isActive () {
|
||||
return active;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
package com.esotericsoftware.spine;
|
||||
|
||||
/** The base class for all constrained datas. */
|
||||
abstract public class PosedData<P extends Pose> {
|
||||
final String name;
|
||||
final P setup;
|
||||
boolean skinRequired;
|
||||
|
||||
public PosedData (String name, P setup) {
|
||||
if (name == null) throw new IllegalArgumentException("name cannot be null.");
|
||||
this.name = name;
|
||||
this.setup = setup;
|
||||
}
|
||||
|
||||
/** The constraint's name, which is unique across all constraints in the skeleton of the same type. */
|
||||
public String getName () {
|
||||
return name;
|
||||
}
|
||||
|
||||
public P getSetupPose () {
|
||||
return setup;
|
||||
}
|
||||
|
||||
/** When true, {@link Skeleton#updateWorldTransform(Physics)} only updates this constraint if the {@link Skeleton#getSkin()}
|
||||
* contains this constraint.
|
||||
* <p>
|
||||
* See {@link Skin#getConstraints()}. */
|
||||
public boolean getSkinRequired () {
|
||||
return skinRequired;
|
||||
}
|
||||
|
||||
public void setSkinRequired (boolean skinRequired) {
|
||||
this.skinRequired = skinRequired;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
@ -37,11 +37,9 @@ import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.FloatArray;
|
||||
import com.badlogic.gdx.utils.Null;
|
||||
|
||||
import com.esotericsoftware.spine.Skin.SkinEntry;
|
||||
import com.esotericsoftware.spine.attachments.Attachment;
|
||||
import com.esotericsoftware.spine.attachments.ClippingAttachment;
|
||||
import com.esotericsoftware.spine.attachments.MeshAttachment;
|
||||
import com.esotericsoftware.spine.attachments.PathAttachment;
|
||||
import com.esotericsoftware.spine.attachments.RegionAttachment;
|
||||
import com.esotericsoftware.spine.utils.SkeletonClipping;
|
||||
|
||||
@ -51,61 +49,54 @@ import com.esotericsoftware.spine.utils.SkeletonClipping;
|
||||
* Runtimes Guide. */
|
||||
public class Skeleton {
|
||||
static private final short[] quadTriangles = {0, 1, 2, 2, 3, 0};
|
||||
|
||||
final SkeletonData data;
|
||||
final Array<Bone> bones;
|
||||
final Array<Slot> slots;
|
||||
Array<Slot> drawOrder;
|
||||
final Array<IkConstraint> ikConstraints;
|
||||
final Array<TransformConstraint> transformConstraints;
|
||||
final Array<PathConstraint> pathConstraints;
|
||||
final Array<PhysicsConstraint> physicsConstraints;
|
||||
final Array<Updatable> updateCache = new Array();
|
||||
final Array<Constraint> constraints;
|
||||
final Array<PhysicsConstraint> physics;
|
||||
final Array updateCache = new Array();
|
||||
final Array<Posed> resetCache = new Array(true, 16, Posed[]::new);
|
||||
@Null Skin skin;
|
||||
final Color color;
|
||||
float x, y, scaleX = 1, scaleY = 1, time;
|
||||
int update;
|
||||
|
||||
public Skeleton (SkeletonData data) {
|
||||
if (data == null) throw new IllegalArgumentException("data cannot be null.");
|
||||
this.data = data;
|
||||
|
||||
bones = new Array(data.bones.size);
|
||||
Object[] bones = this.bones.items;
|
||||
bones = new Array(true, data.bones.size, Bone[]::new);
|
||||
Bone[] bones = this.bones.items;
|
||||
for (BoneData boneData : data.bones) {
|
||||
Bone bone;
|
||||
if (boneData.parent == null)
|
||||
bone = new Bone(boneData, this, null);
|
||||
bone = new Bone(boneData, null);
|
||||
else {
|
||||
var parent = (Bone)bones[boneData.parent.index];
|
||||
bone = new Bone(boneData, this, parent);
|
||||
Bone parent = bones[boneData.parent.index];
|
||||
bone = new Bone(boneData, parent);
|
||||
parent.children.add(bone);
|
||||
}
|
||||
this.bones.add(bone);
|
||||
}
|
||||
|
||||
slots = new Array(data.slots.size);
|
||||
drawOrder = new Array(data.slots.size);
|
||||
slots = new Array(true, data.slots.size, Slot[]::new);
|
||||
drawOrder = new Array(true, data.slots.size, Slot[]::new);
|
||||
for (SlotData slotData : data.slots) {
|
||||
var bone = (Bone)bones[slotData.boneData.index];
|
||||
var slot = new Slot(slotData, bone);
|
||||
var slot = new Slot(slotData, this);
|
||||
slots.add(slot);
|
||||
drawOrder.add(slot);
|
||||
}
|
||||
|
||||
ikConstraints = new Array(data.ikConstraints.size);
|
||||
for (IkConstraintData ikConstraintData : data.ikConstraints)
|
||||
ikConstraints.add(new IkConstraint(ikConstraintData, this));
|
||||
|
||||
transformConstraints = new Array(data.transformConstraints.size);
|
||||
for (TransformConstraintData transformConstraintData : data.transformConstraints)
|
||||
transformConstraints.add(new TransformConstraint(transformConstraintData, this));
|
||||
|
||||
pathConstraints = new Array(data.pathConstraints.size);
|
||||
for (PathConstraintData pathConstraintData : data.pathConstraints)
|
||||
pathConstraints.add(new PathConstraint(pathConstraintData, this));
|
||||
|
||||
physicsConstraints = new Array(data.physicsConstraints.size);
|
||||
for (PhysicsConstraintData physicsConstraintData : data.physicsConstraints)
|
||||
physicsConstraints.add(new PhysicsConstraint(physicsConstraintData, this));
|
||||
physics = new Array(true, 8, PhysicsConstraint[]::new);
|
||||
constraints = new Array(true, data.constraints.size, Constraint[]::new);
|
||||
for (ConstraintData constraintData : data.constraints) {
|
||||
Constraint constraint = constraintData.create(this);
|
||||
if (constraint instanceof PhysicsConstraint physicsConstraint) physics.add(physicsConstraint);
|
||||
constraints.add(constraint);
|
||||
}
|
||||
physics.shrink();
|
||||
|
||||
color = new Color(1, 1, 1, 1);
|
||||
|
||||
@ -117,44 +108,34 @@ public class Skeleton {
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
data = skeleton.data;
|
||||
|
||||
bones = new Array(skeleton.bones.size);
|
||||
bones = new Array(true, skeleton.bones.size, Bone[]::new);
|
||||
for (Bone bone : skeleton.bones) {
|
||||
Bone newBone;
|
||||
if (bone.parent == null)
|
||||
newBone = new Bone(bone, this, null);
|
||||
newBone = new Bone(bone, null);
|
||||
else {
|
||||
Bone parent = bones.get(bone.parent.data.index);
|
||||
newBone = new Bone(bone, this, parent);
|
||||
Bone parent = bones.items[bone.parent.data.index];
|
||||
newBone = new Bone(bone, parent);
|
||||
parent.children.add(newBone);
|
||||
}
|
||||
bones.add(newBone);
|
||||
}
|
||||
|
||||
slots = new Array(skeleton.slots.size);
|
||||
for (Slot slot : skeleton.slots) {
|
||||
Bone bone = bones.get(slot.bone.data.index);
|
||||
slots.add(new Slot(slot, bone));
|
||||
}
|
||||
slots = new Array(true, skeleton.slots.size, Slot[]::new);
|
||||
for (Slot slot : skeleton.slots)
|
||||
slots.add(new Slot(slot, bones.items[slot.bone.data.index], this));
|
||||
|
||||
drawOrder = new Array(slots.size);
|
||||
drawOrder = new Array(true, slots.size, Slot[]::new);
|
||||
for (Slot slot : skeleton.drawOrder)
|
||||
drawOrder.add(slots.get(slot.data.index));
|
||||
drawOrder.add(slots.items[slot.data.index]);
|
||||
|
||||
ikConstraints = new Array(skeleton.ikConstraints.size);
|
||||
for (IkConstraint ikConstraint : skeleton.ikConstraints)
|
||||
ikConstraints.add(new IkConstraint(ikConstraint, skeleton));
|
||||
|
||||
transformConstraints = new Array(skeleton.transformConstraints.size);
|
||||
for (TransformConstraint transformConstraint : skeleton.transformConstraints)
|
||||
transformConstraints.add(new TransformConstraint(transformConstraint, skeleton));
|
||||
|
||||
pathConstraints = new Array(skeleton.pathConstraints.size);
|
||||
for (PathConstraint pathConstraint : skeleton.pathConstraints)
|
||||
pathConstraints.add(new PathConstraint(pathConstraint, skeleton));
|
||||
|
||||
physicsConstraints = new Array(skeleton.physicsConstraints.size);
|
||||
for (PhysicsConstraint physicsConstraint : skeleton.physicsConstraints)
|
||||
physicsConstraints.add(new PhysicsConstraint(physicsConstraint, skeleton));
|
||||
physics = new Array(true, skeleton.physics.size, PhysicsConstraint[]::new);
|
||||
constraints = new Array(true, skeleton.constraints.size, Constraint[]::new);
|
||||
for (Constraint other : skeleton.constraints) {
|
||||
Constraint constraint = other.copy(this);
|
||||
if (constraint instanceof PhysicsConstraint physicsConstraint) physics.add(physicsConstraint);
|
||||
constraints.add(constraint);
|
||||
}
|
||||
|
||||
skin = skeleton.skin;
|
||||
color = new Color(skeleton.color);
|
||||
@ -170,20 +151,27 @@ public class Skeleton {
|
||||
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
||||
* constraints, or weighted path attachments are added or removed. */
|
||||
public void updateCache () {
|
||||
Array<Updatable> updateCache = this.updateCache;
|
||||
updateCache.clear();
|
||||
resetCache.clear();
|
||||
|
||||
Slot[] slots = this.slots.items;
|
||||
for (int i = 0, n = this.slots.size; i < n; i++) {
|
||||
Slot slot = slots[i];
|
||||
slot.applied = slot.pose;
|
||||
}
|
||||
|
||||
int boneCount = bones.size;
|
||||
Object[] bones = this.bones.items;
|
||||
Bone[] bones = this.bones.items;
|
||||
for (int i = 0; i < boneCount; i++) {
|
||||
var bone = (Bone)bones[i];
|
||||
Bone bone = bones[i];
|
||||
bone.sorted = bone.data.skinRequired;
|
||||
bone.active = !bone.sorted;
|
||||
bone.applied = (BonePose)bone.pose;
|
||||
}
|
||||
if (skin != null) {
|
||||
Object[] skinBones = skin.bones.items;
|
||||
BoneData[] skinBones = skin.bones.items;
|
||||
for (int i = 0, n = skin.bones.size; i < n; i++) {
|
||||
var bone = (Bone)bones[((BoneData)skinBones[i]).index];
|
||||
var bone = bones[skinBones[i].index];
|
||||
do {
|
||||
bone.sorted = false;
|
||||
bone.active = true;
|
||||
@ -192,179 +180,51 @@ public class Skeleton {
|
||||
}
|
||||
}
|
||||
|
||||
int ikCount = ikConstraints.size, transformCount = transformConstraints.size, pathCount = pathConstraints.size,
|
||||
physicsCount = physicsConstraints.size;
|
||||
Object[] ikConstraints = this.ikConstraints.items, transformConstraints = this.transformConstraints.items,
|
||||
pathConstraints = this.pathConstraints.items, physicsConstraints = this.physicsConstraints.items;
|
||||
int constraintCount = ikCount + transformCount + pathCount + physicsCount;
|
||||
outer:
|
||||
for (int i = 0; i < constraintCount; i++) {
|
||||
for (int ii = 0; ii < ikCount; ii++) {
|
||||
var constraint = (IkConstraint)ikConstraints[ii];
|
||||
if (constraint.data.order == i) {
|
||||
sortIkConstraint(constraint);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
for (int ii = 0; ii < transformCount; ii++) {
|
||||
var constraint = (TransformConstraint)transformConstraints[ii];
|
||||
if (constraint.data.order == i) {
|
||||
sortTransformConstraint(constraint);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
for (int ii = 0; ii < pathCount; ii++) {
|
||||
var constraint = (PathConstraint)pathConstraints[ii];
|
||||
if (constraint.data.order == i) {
|
||||
sortPathConstraint(constraint);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
for (int ii = 0; ii < physicsCount; ii++) {
|
||||
var constraint = (PhysicsConstraint)physicsConstraints[ii];
|
||||
if (constraint.data.order == i) {
|
||||
sortPhysicsConstraint(constraint);
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
Constraint[] constraints = this.constraints.items;
|
||||
int n = this.constraints.size;
|
||||
for (int i = 0; i < n; i++) {
|
||||
Constraint constraint = constraints[i];
|
||||
constraint.applied = constraint.pose;
|
||||
}
|
||||
for (int i = 0; i < n; i++) {
|
||||
Constraint<?, ?, ?> constraint = constraints[i];
|
||||
constraint.active = constraint.isSourceActive()
|
||||
&& (!constraint.data.skinRequired || (skin != null && skin.constraints.contains(constraint.data, true)));
|
||||
if (constraint.active) constraint.sort(this);
|
||||
}
|
||||
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
sortBone((Bone)bones[i]);
|
||||
sortBone(bones[i]);
|
||||
|
||||
Object[] updateCache = this.updateCache.items;
|
||||
n = this.updateCache.size;
|
||||
for (int i = 0; i < n; i++)
|
||||
if (updateCache[i] instanceof Bone bone) updateCache[i] = bone.applied;
|
||||
}
|
||||
|
||||
private void sortIkConstraint (IkConstraint constraint) {
|
||||
constraint.active = constraint.target.active
|
||||
&& (!constraint.data.skinRequired || (skin != null && skin.constraints.contains(constraint.data, true)));
|
||||
if (!constraint.active) return;
|
||||
|
||||
sortBone(constraint.target);
|
||||
|
||||
Array<Bone> constrained = constraint.bones;
|
||||
Bone parent = constrained.first();
|
||||
sortBone(parent);
|
||||
if (constrained.size == 1) {
|
||||
updateCache.add(constraint);
|
||||
sortReset(parent.children);
|
||||
} else {
|
||||
Bone child = constrained.peek();
|
||||
sortBone(child);
|
||||
|
||||
updateCache.add(constraint);
|
||||
|
||||
sortReset(parent.children);
|
||||
child.sorted = true;
|
||||
void resetCache (Posed object) {
|
||||
if (object.pose == object.applied) {
|
||||
object.applied = object.constrained;
|
||||
resetCache.add(object);
|
||||
}
|
||||
}
|
||||
|
||||
private void sortTransformConstraint (TransformConstraint constraint) {
|
||||
constraint.active = constraint.source.active
|
||||
&& (!constraint.data.skinRequired || (skin != null && skin.constraints.contains(constraint.data, true)));
|
||||
if (!constraint.active) return;
|
||||
|
||||
sortBone(constraint.source);
|
||||
|
||||
Object[] constrained = constraint.bones.items;
|
||||
int boneCount = constraint.bones.size;
|
||||
if (constraint.data.localSource) {
|
||||
for (int i = 0; i < boneCount; i++) {
|
||||
var child = (Bone)constrained[i];
|
||||
sortBone(child.parent);
|
||||
sortBone(child);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
sortBone((Bone)constrained[i]);
|
||||
}
|
||||
|
||||
updateCache.add(constraint);
|
||||
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
sortReset(((Bone)constrained[i]).children);
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
((Bone)constrained[i]).sorted = true;
|
||||
}
|
||||
|
||||
private void sortPathConstraint (PathConstraint constraint) {
|
||||
constraint.active = constraint.slot.bone.active
|
||||
&& (!constraint.data.skinRequired || (skin != null && skin.constraints.contains(constraint.data, true)));
|
||||
if (!constraint.active) return;
|
||||
|
||||
Slot slot = constraint.slot;
|
||||
int slotIndex = slot.getData().index;
|
||||
Bone slotBone = slot.bone;
|
||||
if (skin != null) sortPathConstraintAttachment(skin, slotIndex, slotBone);
|
||||
if (data.defaultSkin != null && data.defaultSkin != skin)
|
||||
sortPathConstraintAttachment(data.defaultSkin, slotIndex, slotBone);
|
||||
|
||||
sortPathConstraintAttachment(slot.attachment, slotBone);
|
||||
|
||||
Object[] constrained = constraint.bones.items;
|
||||
int boneCount = constraint.bones.size;
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
sortBone((Bone)constrained[i]);
|
||||
|
||||
updateCache.add(constraint);
|
||||
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
sortReset(((Bone)constrained[i]).children);
|
||||
for (int i = 0; i < boneCount; i++)
|
||||
((Bone)constrained[i]).sorted = true;
|
||||
}
|
||||
|
||||
private void sortPathConstraintAttachment (Skin skin, int slotIndex, Bone slotBone) {
|
||||
Object[] entries = skin.attachments.orderedItems().items;
|
||||
for (int i = 0, n = skin.attachments.size; i < n; i++) {
|
||||
var entry = (SkinEntry)entries[i];
|
||||
if (entry.slotIndex == slotIndex) sortPathConstraintAttachment(entry.attachment, slotBone);
|
||||
}
|
||||
}
|
||||
|
||||
private void sortPathConstraintAttachment (Attachment attachment, Bone slotBone) {
|
||||
if (!(attachment instanceof PathAttachment pathAttachment)) return;
|
||||
int[] pathBones = pathAttachment.getBones();
|
||||
if (pathBones == null)
|
||||
sortBone(slotBone);
|
||||
else {
|
||||
Object[] bones = this.bones.items;
|
||||
for (int i = 0, n = pathBones.length; i < n;) {
|
||||
int nn = pathBones[i++];
|
||||
nn += i;
|
||||
while (i < nn)
|
||||
sortBone((Bone)bones[pathBones[i++]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sortPhysicsConstraint (PhysicsConstraint constraint) {
|
||||
Bone bone = constraint.bone;
|
||||
constraint.active = bone.active
|
||||
&& (!constraint.data.skinRequired || (skin != null && skin.constraints.contains(constraint.data, true)));
|
||||
if (!constraint.active) return;
|
||||
|
||||
sortBone(bone);
|
||||
|
||||
updateCache.add(constraint);
|
||||
|
||||
sortReset(bone.children);
|
||||
bone.sorted = true;
|
||||
}
|
||||
|
||||
private void sortBone (Bone bone) {
|
||||
if (bone.sorted) return;
|
||||
void sortBone (Bone bone) {
|
||||
if (bone.sorted || !bone.active) return;
|
||||
Bone parent = bone.parent;
|
||||
if (parent != null) sortBone(parent);
|
||||
bone.sorted = true;
|
||||
updateCache.add(bone);
|
||||
}
|
||||
|
||||
private void sortReset (Array<Bone> bones) {
|
||||
Object[] items = bones.items;
|
||||
void sortReset (Array<Bone> bones) {
|
||||
Bone[] items = bones.items;
|
||||
for (int i = 0, n = bones.size; i < n; i++) {
|
||||
var bone = (Bone)items[i];
|
||||
if (!bone.active) continue;
|
||||
if (bone.sorted) sortReset(bone.children);
|
||||
bone.sorted = false;
|
||||
Bone bone = items[i];
|
||||
if (bone.active) {
|
||||
if (bone.sorted) sortReset(bone.children);
|
||||
bone.sorted = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,21 +233,17 @@ public class Skeleton {
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
public void updateWorldTransform (Physics physics) {
|
||||
Object[] bones = this.bones.items;
|
||||
for (int i = 0, n = this.bones.size; i < n; i++) {
|
||||
var bone = (Bone)bones[i];
|
||||
bone.ax = bone.x;
|
||||
bone.ay = bone.y;
|
||||
bone.arotation = bone.rotation;
|
||||
bone.ascaleX = bone.scaleX;
|
||||
bone.ascaleY = bone.scaleY;
|
||||
bone.ashearX = bone.shearX;
|
||||
bone.ashearY = bone.shearY;
|
||||
update++;
|
||||
|
||||
Posed[] resetCache = this.resetCache.items;
|
||||
for (int i = 0, n = this.resetCache.size; i < n; i++) {
|
||||
Posed object = resetCache[i];
|
||||
object.applied.set(object.pose);
|
||||
}
|
||||
|
||||
Object[] updateCache = this.updateCache.items;
|
||||
for (int i = 0, n = this.updateCache.size; i < n; i++)
|
||||
((Updatable)updateCache[i]).update(physics);
|
||||
((Update)updateCache[i]).update(this, physics);
|
||||
}
|
||||
|
||||
/** Temporarily sets the root bone as a child of the specified bone, then updates the world transform for each bone and applies
|
||||
@ -395,23 +251,19 @@ public class Skeleton {
|
||||
* <p>
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
public void updateWorldTransform (Physics physics, Bone parent) {
|
||||
public void updateWorldTransform (Physics physics, BonePose parent) { // Do not port.
|
||||
if (parent == null) throw new IllegalArgumentException("parent cannot be null.");
|
||||
|
||||
Object[] bones = this.bones.items;
|
||||
for (int i = 1, n = this.bones.size; i < n; i++) { // Skip root bone.
|
||||
var bone = (Bone)bones[i];
|
||||
bone.ax = bone.x;
|
||||
bone.ay = bone.y;
|
||||
bone.arotation = bone.rotation;
|
||||
bone.ascaleX = bone.scaleX;
|
||||
bone.ascaleY = bone.scaleY;
|
||||
bone.ashearX = bone.shearX;
|
||||
bone.ashearY = bone.shearY;
|
||||
update++;
|
||||
|
||||
Posed[] resetCache = this.resetCache.items;
|
||||
for (int i = 0, n = this.resetCache.size; i < n; i++) {
|
||||
Posed object = resetCache[i];
|
||||
object.applied.set(object.pose);
|
||||
}
|
||||
|
||||
// Apply the parent bone transform to the root bone. The root bone always inherits scale, rotation and reflection.
|
||||
Bone rootBone = getRootBone();
|
||||
BonePose rootBone = getRootBone().applied;
|
||||
float pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;
|
||||
rootBone.worldX = pa * x + pb * y + parent.worldX;
|
||||
rootBone.worldY = pc * x + pd * y + parent.worldY;
|
||||
@ -430,47 +282,35 @@ public class Skeleton {
|
||||
// Update everything except root bone.
|
||||
Object[] updateCache = this.updateCache.items;
|
||||
for (int i = 0, n = this.updateCache.size; i < n; i++) {
|
||||
var updatable = (Updatable)updateCache[i];
|
||||
if (updatable != rootBone) updatable.update(physics);
|
||||
var updatable = (Update)updateCache[i];
|
||||
if (updatable != rootBone) updatable.update(this, physics);
|
||||
}
|
||||
}
|
||||
|
||||
/** Sets the bones, constraints, slots, and draw order to their setup pose values. */
|
||||
public void setToSetupPose () {
|
||||
setBonesToSetupPose();
|
||||
setSlotsToSetupPose();
|
||||
public void setupPose () {
|
||||
setupPoseBones();
|
||||
setupPoseSlots();
|
||||
}
|
||||
|
||||
/** Sets the bones and constraints to their setup pose values. */
|
||||
public void setBonesToSetupPose () {
|
||||
Object[] bones = this.bones.items;
|
||||
public void setupPoseBones () {
|
||||
Bone[] bones = this.bones.items;
|
||||
for (int i = 0, n = this.bones.size; i < n; i++)
|
||||
((Bone)bones[i]).setToSetupPose();
|
||||
bones[i].setupPose();
|
||||
|
||||
Object[] ikConstraints = this.ikConstraints.items;
|
||||
for (int i = 0, n = this.ikConstraints.size; i < n; i++)
|
||||
((IkConstraint)ikConstraints[i]).setToSetupPose();
|
||||
|
||||
Object[] transformConstraints = this.transformConstraints.items;
|
||||
for (int i = 0, n = this.transformConstraints.size; i < n; i++)
|
||||
((TransformConstraint)transformConstraints[i]).setToSetupPose();
|
||||
|
||||
Object[] pathConstraints = this.pathConstraints.items;
|
||||
for (int i = 0, n = this.pathConstraints.size; i < n; i++)
|
||||
((PathConstraint)pathConstraints[i]).setToSetupPose();
|
||||
|
||||
Object[] physicsConstraints = this.physicsConstraints.items;
|
||||
for (int i = 0, n = this.physicsConstraints.size; i < n; i++)
|
||||
((PhysicsConstraint)physicsConstraints[i]).setToSetupPose();
|
||||
Constraint[] constraints = this.constraints.items;
|
||||
for (int i = 0, n = this.constraints.size; i < n; i++)
|
||||
constraints[i].setupPose();
|
||||
}
|
||||
|
||||
/** Sets the slots and draw order to their setup pose values. */
|
||||
public void setSlotsToSetupPose () {
|
||||
Object[] slots = this.slots.items;
|
||||
public void setupPoseSlots () {
|
||||
Slot[] slots = this.slots.items;
|
||||
int n = this.slots.size;
|
||||
arraycopy(slots, 0, drawOrder.items, 0, n);
|
||||
for (int i = 0; i < n; i++)
|
||||
((Slot)slots[i]).setToSetupPose();
|
||||
slots[i].setupPose();
|
||||
}
|
||||
|
||||
/** The skeleton's setup pose data. */
|
||||
@ -484,7 +324,7 @@ public class Skeleton {
|
||||
}
|
||||
|
||||
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
||||
public Array<Updatable> getUpdateCache () {
|
||||
public Array<Update> getUpdateCache () {
|
||||
return updateCache;
|
||||
}
|
||||
|
||||
@ -497,11 +337,9 @@ public class Skeleton {
|
||||
* repeatedly. */
|
||||
public @Null Bone findBone (String boneName) {
|
||||
if (boneName == null) throw new IllegalArgumentException("boneName cannot be null.");
|
||||
Object[] bones = this.bones.items;
|
||||
for (int i = 0, n = this.bones.size; i < n; i++) {
|
||||
var bone = (Bone)bones[i];
|
||||
if (bone.data.name.equals(boneName)) return bone;
|
||||
}
|
||||
Bone[] bones = this.bones.items;
|
||||
for (int i = 0, n = this.bones.size; i < n; i++)
|
||||
if (bones[i].data.name.equals(boneName)) return bones[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -514,11 +352,9 @@ public class Skeleton {
|
||||
* repeatedly. */
|
||||
public @Null Slot findSlot (String slotName) {
|
||||
if (slotName == null) throw new IllegalArgumentException("slotName cannot be null.");
|
||||
Object[] slots = this.slots.items;
|
||||
for (int i = 0, n = this.slots.size; i < n; i++) {
|
||||
var slot = (Slot)slots[i];
|
||||
if (slot.data.name.equals(slotName)) return slot;
|
||||
}
|
||||
Slot[] slots = this.slots.items;
|
||||
for (int i = 0, n = this.slots.size; i < n; i++)
|
||||
if (slots[i].data.name.equals(slotName)) return slots[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -553,22 +389,21 @@ public class Skeleton {
|
||||
* old skin, each slot's setup mode attachment is attached from the new skin.
|
||||
* <p>
|
||||
* After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling
|
||||
* {@link #setSlotsToSetupPose()}. Also, often {@link AnimationState#apply(Skeleton)} is called before the next time the
|
||||
* skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new
|
||||
* skin. */
|
||||
* {@link #setupPoseSlots()}. Also, often {@link AnimationState#apply(Skeleton)} is called before the next time the skeleton is
|
||||
* rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin. */
|
||||
public void setSkin (@Null Skin newSkin) {
|
||||
if (newSkin == skin) return;
|
||||
if (newSkin != null) {
|
||||
if (skin != null)
|
||||
newSkin.attachAll(this, skin);
|
||||
else {
|
||||
Object[] slots = this.slots.items;
|
||||
Slot[] slots = this.slots.items;
|
||||
for (int i = 0, n = this.slots.size; i < n; i++) {
|
||||
var slot = (Slot)slots[i];
|
||||
Slot slot = slots[i];
|
||||
String name = slot.data.attachmentName;
|
||||
if (name != null) {
|
||||
Attachment attachment = newSkin.getAttachment(i, name);
|
||||
if (attachment != null) slot.setAttachment(attachment);
|
||||
if (attachment != null) slot.pose.setAttachment(attachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -602,7 +437,7 @@ public class Skeleton {
|
||||
}
|
||||
|
||||
/** A convenience method to set an attachment by finding the slot with {@link #findSlot(String)}, finding the attachment with
|
||||
* {@link #getAttachment(int, String)}, then setting the slot's {@link Slot#attachment}.
|
||||
* {@link #getAttachment(int, String)}, then setting the slot's {@link SlotPose#attachment}.
|
||||
* @param attachmentName May be null to clear the slot's attachment. */
|
||||
public void setAttachment (String slotName, @Null String attachmentName) {
|
||||
if (slotName == null) throw new IllegalArgumentException("slotName cannot be null.");
|
||||
@ -614,73 +449,25 @@ public class Skeleton {
|
||||
if (attachment == null)
|
||||
throw new IllegalArgumentException("Attachment not found: " + attachmentName + ", for slot: " + slotName);
|
||||
}
|
||||
slot.setAttachment(attachment);
|
||||
slot.pose.setAttachment(attachment);
|
||||
}
|
||||
|
||||
/** The skeleton's IK constraints. */
|
||||
public Array<IkConstraint> getIkConstraints () {
|
||||
return ikConstraints;
|
||||
/** The skeleton's constraints. */
|
||||
public Array<Constraint> getConstraints () {
|
||||
return constraints;
|
||||
}
|
||||
|
||||
/** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it repeatedly. */
|
||||
public @Null IkConstraint findIkConstraint (String constraintName) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] ikConstraints = this.ikConstraints.items;
|
||||
for (int i = 0, n = this.ikConstraints.size; i < n; i++) {
|
||||
var ikConstraint = (IkConstraint)ikConstraints[i];
|
||||
if (ikConstraint.data.name.equals(constraintName)) return ikConstraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** The skeleton's transform constraints. */
|
||||
public Array<TransformConstraint> getTransformConstraints () {
|
||||
return transformConstraints;
|
||||
}
|
||||
|
||||
/** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
|
||||
* this method than to call it repeatedly. */
|
||||
public @Null TransformConstraint findTransformConstraint (String constraintName) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] transformConstraints = this.transformConstraints.items;
|
||||
for (int i = 0, n = this.transformConstraints.size; i < n; i++) {
|
||||
var constraint = (TransformConstraint)transformConstraints[i];
|
||||
if (constraint.data.name.equals(constraintName)) return constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** The skeleton's path constraints. */
|
||||
public Array<PathConstraint> getPathConstraints () {
|
||||
return pathConstraints;
|
||||
}
|
||||
|
||||
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it repeatedly. */
|
||||
public @Null PathConstraint findPathConstraint (String constraintName) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] pathConstraints = this.pathConstraints.items;
|
||||
for (int i = 0, n = this.pathConstraints.size; i < n; i++) {
|
||||
var constraint = (PathConstraint)pathConstraints[i];
|
||||
if (constraint.data.name.equals(constraintName)) return constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** The skeleton's physics constraints. */
|
||||
public Array<PhysicsConstraint> getPhysicsConstraints () {
|
||||
return physicsConstraints;
|
||||
return physics;
|
||||
}
|
||||
|
||||
/** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
|
||||
* method than to call it repeatedly. */
|
||||
public @Null PhysicsConstraint findPhysicsConstraint (String constraintName) {
|
||||
public @Null <T extends Constraint> T findConstraint (String constraintName, Class<T> type) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] physicsConstraints = this.physicsConstraints.items;
|
||||
for (int i = 0, n = this.physicsConstraints.size; i < n; i++) {
|
||||
var constraint = (PhysicsConstraint)physicsConstraints[i];
|
||||
if (constraint.data.name.equals(constraintName)) return constraint;
|
||||
if (type == null) throw new IllegalArgumentException("type cannot be null.");
|
||||
Constraint[] constraints = this.constraints.items;
|
||||
for (int i = 0, n = this.constraints.size; i < n; i++) {
|
||||
Constraint constraint = constraints[i];
|
||||
if (type.isInstance(constraint) && constraint.data.name.equals(constraintName)) return (T)constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -703,40 +490,43 @@ public class Skeleton {
|
||||
if (offset == null) throw new IllegalArgumentException("offset cannot be null.");
|
||||
if (size == null) throw new IllegalArgumentException("size cannot be null.");
|
||||
if (temp == null) throw new IllegalArgumentException("temp cannot be null.");
|
||||
Object[] drawOrder = this.drawOrder.items;
|
||||
Slot[] drawOrder = this.drawOrder.items;
|
||||
float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE;
|
||||
for (int i = 0, n = this.drawOrder.size; i < n; i++) {
|
||||
var slot = (Slot)drawOrder[i];
|
||||
Slot slot = drawOrder[i];
|
||||
if (!slot.bone.active) continue;
|
||||
int verticesLength = 0;
|
||||
float[] vertices = null;
|
||||
short[] triangles = null;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
verticesLength = 8;
|
||||
vertices = temp.setSize(8);
|
||||
region.computeWorldVertices(slot, vertices, 0, 2);
|
||||
triangles = quadTriangles;
|
||||
} else if (attachment instanceof MeshAttachment mesh) {
|
||||
verticesLength = mesh.getWorldVerticesLength();
|
||||
vertices = temp.setSize(verticesLength);
|
||||
mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);
|
||||
triangles = mesh.getTriangles();
|
||||
} else if (attachment instanceof ClippingAttachment clip && clipper != null) {
|
||||
clipper.clipStart(slot, clip);
|
||||
continue;
|
||||
}
|
||||
if (vertices != null) {
|
||||
if (clipper != null && clipper.isClipping() && clipper.clipTriangles(vertices, triangles, triangles.length)) {
|
||||
vertices = clipper.getClippedVertices().items;
|
||||
verticesLength = clipper.getClippedVertices().size;
|
||||
Attachment attachment = slot.pose.attachment;
|
||||
if (attachment != null) {
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
verticesLength = 8;
|
||||
vertices = temp.setSize(8);
|
||||
region.computeWorldVertices(slot, vertices, 0, 2);
|
||||
triangles = quadTriangles;
|
||||
} else if (attachment instanceof MeshAttachment mesh) {
|
||||
verticesLength = mesh.getWorldVerticesLength();
|
||||
vertices = temp.setSize(verticesLength);
|
||||
mesh.computeWorldVertices(this, slot, 0, verticesLength, vertices, 0, 2);
|
||||
triangles = mesh.getTriangles();
|
||||
} else if (attachment instanceof ClippingAttachment clip && clipper != null) {
|
||||
clipper.clipEnd(slot);
|
||||
clipper.clipStart(this, slot, clip);
|
||||
continue;
|
||||
}
|
||||
for (int ii = 0; ii < verticesLength; ii += 2) {
|
||||
float x = vertices[ii], y = vertices[ii + 1];
|
||||
minX = Math.min(minX, x);
|
||||
minY = Math.min(minY, y);
|
||||
maxX = Math.max(maxX, x);
|
||||
maxY = Math.max(maxY, y);
|
||||
if (vertices != null) {
|
||||
if (clipper != null && clipper.isClipping() && clipper.clipTriangles(vertices, triangles, triangles.length)) {
|
||||
vertices = clipper.getClippedVertices().items;
|
||||
verticesLength = clipper.getClippedVertices().size;
|
||||
}
|
||||
for (int ii = 0; ii < verticesLength; ii += 2) {
|
||||
float x = vertices[ii], y = vertices[ii + 1];
|
||||
minX = Math.min(minX, x);
|
||||
minY = Math.min(minY, y);
|
||||
maxX = Math.max(maxX, x);
|
||||
maxY = Math.max(maxY, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (clipper != null) clipper.clipEnd(slot);
|
||||
@ -824,16 +614,16 @@ public class Skeleton {
|
||||
|
||||
/** Calls {@link PhysicsConstraint#translate(float, float)} for each physics constraint. */
|
||||
public void physicsTranslate (float x, float y) {
|
||||
Object[] physicsConstraints = this.physicsConstraints.items;
|
||||
for (int i = 0, n = this.physicsConstraints.size; i < n; i++)
|
||||
((PhysicsConstraint)physicsConstraints[i]).translate(x, y);
|
||||
PhysicsConstraint[] constraints = this.physics.items;
|
||||
for (int i = 0, n = this.physics.size; i < n; i++)
|
||||
constraints[i].translate(x, y);
|
||||
}
|
||||
|
||||
/** Calls {@link PhysicsConstraint#rotate(float, float, float)} for each physics constraint. */
|
||||
public void physicsRotate (float x, float y, float degrees) {
|
||||
Object[] physicsConstraints = this.physicsConstraints.items;
|
||||
for (int i = 0, n = this.physicsConstraints.size; i < n; i++)
|
||||
((PhysicsConstraint)physicsConstraints[i]).rotate(x, y, degrees);
|
||||
PhysicsConstraint[] constraints = this.physics.items;
|
||||
for (int i = 0, n = this.physics.size; i < n; i++)
|
||||
constraints[i].rotate(x, y, degrees);
|
||||
}
|
||||
|
||||
/** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
|
||||
@ -855,19 +645,4 @@ public class Skeleton {
|
||||
public String toString () {
|
||||
return data.name != null ? data.name : super.toString();
|
||||
}
|
||||
|
||||
/** Determines how physics and other non-deterministic updates are applied. */
|
||||
static public enum Physics {
|
||||
/** Physics are not updated or applied. */
|
||||
none,
|
||||
|
||||
/** Physics are reset to the current pose. */
|
||||
reset,
|
||||
|
||||
/** Physics are updated and the pose from physics is applied. */
|
||||
update,
|
||||
|
||||
/** Physics are not updated but the pose from physics is applied. */
|
||||
pose
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,9 +45,9 @@ import com.badlogic.gdx.utils.SerializationException;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.AlphaTimeline;
|
||||
import com.esotericsoftware.spine.Animation.AttachmentTimeline;
|
||||
import com.esotericsoftware.spine.Animation.BoneTimeline2;
|
||||
import com.esotericsoftware.spine.Animation.CurveTimeline;
|
||||
import com.esotericsoftware.spine.Animation.CurveTimeline1;
|
||||
import com.esotericsoftware.spine.Animation.CurveTimeline2;
|
||||
import com.esotericsoftware.spine.Animation.DeformTimeline;
|
||||
import com.esotericsoftware.spine.Animation.DrawOrderTimeline;
|
||||
import com.esotericsoftware.spine.Animation.EventTimeline;
|
||||
@ -76,6 +76,8 @@ import com.esotericsoftware.spine.Animation.SequenceTimeline;
|
||||
import com.esotericsoftware.spine.Animation.ShearTimeline;
|
||||
import com.esotericsoftware.spine.Animation.ShearXTimeline;
|
||||
import com.esotericsoftware.spine.Animation.ShearYTimeline;
|
||||
import com.esotericsoftware.spine.Animation.SliderMixTimeline;
|
||||
import com.esotericsoftware.spine.Animation.SliderTimeline;
|
||||
import com.esotericsoftware.spine.Animation.Timeline;
|
||||
import com.esotericsoftware.spine.Animation.TransformConstraintTimeline;
|
||||
import com.esotericsoftware.spine.Animation.TranslateTimeline;
|
||||
@ -137,6 +139,12 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
static public final int SLOT_RGB2 = 4;
|
||||
static public final int SLOT_ALPHA = 5;
|
||||
|
||||
static public final int CONSTRAINT_IK = 0;
|
||||
static public final int CONSTRAINT_PATH = 1;
|
||||
static public final int CONSTRAINT_TRANSFORM = 2;
|
||||
static public final int CONSTRAINT_PHYSICS = 3;
|
||||
static public final int CONSTRAINT_SLIDER = 4;
|
||||
|
||||
static public final int ATTACHMENT_DEFORM = 0;
|
||||
static public final int ATTACHMENT_SEQUENCE = 1;
|
||||
|
||||
@ -153,11 +161,14 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
static public final int PHYSICS_MIX = 7;
|
||||
static public final int PHYSICS_RESET = 8;
|
||||
|
||||
static public final int SLIDER_TIME = 0;
|
||||
static public final int SLIDER_MIX = 1;
|
||||
|
||||
static public final int CURVE_LINEAR = 0;
|
||||
static public final int CURVE_STEPPED = 1;
|
||||
static public final int CURVE_BEZIER = 2;
|
||||
|
||||
private final Array<LinkedMesh> linkedMeshes = new Array();
|
||||
private final Array<LinkedMesh> linkedMeshes = new Array(true, 8, LinkedMesh[]::new);
|
||||
|
||||
public SkeletonBinary (AttachmentLoader attachmentLoader) {
|
||||
super(attachmentLoader);
|
||||
@ -212,20 +223,21 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
o[i] = input.readString();
|
||||
|
||||
// Bones.
|
||||
Object[] bones = skeletonData.bones.setSize(n = input.readInt(true));
|
||||
BoneData[] bones = skeletonData.bones.setSize(n = input.readInt(true));
|
||||
for (int i = 0; i < n; i++) {
|
||||
String name = input.readString();
|
||||
BoneData parent = i == 0 ? null : (BoneData)bones[input.readInt(true)];
|
||||
BoneData parent = i == 0 ? null : bones[input.readInt(true)];
|
||||
var data = new BoneData(i, name, parent);
|
||||
data.rotation = input.readFloat();
|
||||
data.x = input.readFloat() * scale;
|
||||
data.y = input.readFloat() * scale;
|
||||
data.scaleX = input.readFloat();
|
||||
data.scaleY = input.readFloat();
|
||||
data.shearX = input.readFloat();
|
||||
data.shearY = input.readFloat();
|
||||
BoneLocal setup = data.setup;
|
||||
setup.rotation = input.readFloat();
|
||||
setup.x = input.readFloat() * scale;
|
||||
setup.y = input.readFloat() * scale;
|
||||
setup.scaleX = input.readFloat();
|
||||
setup.scaleY = input.readFloat();
|
||||
setup.shearX = input.readFloat();
|
||||
setup.shearY = input.readFloat();
|
||||
setup.inherit = Inherit.values[input.readByte()];
|
||||
data.length = input.readFloat() * scale;
|
||||
data.inherit = Inherit.values[input.readByte()];
|
||||
data.skinRequired = input.readBoolean();
|
||||
if (nonessential) {
|
||||
Color.rgba8888ToColor(data.color, input.readInt());
|
||||
@ -236,15 +248,15 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
}
|
||||
|
||||
// Slots.
|
||||
Object[] slots = skeletonData.slots.setSize(n = input.readInt(true));
|
||||
SlotData[] slots = skeletonData.slots.setSize(n = input.readInt(true));
|
||||
for (int i = 0; i < n; i++) {
|
||||
String slotName = input.readString();
|
||||
var boneData = (BoneData)bones[input.readInt(true)];
|
||||
var boneData = bones[input.readInt(true)];
|
||||
var data = new SlotData(i, slotName, boneData);
|
||||
Color.rgba8888ToColor(data.color, input.readInt());
|
||||
Color.rgba8888ToColor(data.setup.color, input.readInt());
|
||||
|
||||
int darkColor = input.readInt();
|
||||
if (darkColor != -1) Color.rgb888ToColor(data.darkColor = new Color(), darkColor);
|
||||
if (darkColor != -1) Color.rgb888ToColor(data.setup.darkColor = new Color(), darkColor);
|
||||
|
||||
data.attachmentName = input.readStringRef();
|
||||
data.blendMode = BlendMode.values[input.readInt(true)];
|
||||
@ -252,160 +264,167 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
slots[i] = data;
|
||||
}
|
||||
|
||||
// IK constraints.
|
||||
o = skeletonData.ikConstraints.setSize(n = input.readInt(true));
|
||||
for (int i = 0, nn; i < n; i++) {
|
||||
var data = new IkConstraintData(input.readString());
|
||||
data.order = input.readInt(true);
|
||||
Object[] constraintBones = data.bones.setSize(nn = input.readInt(true));
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
constraintBones[ii] = bones[input.readInt(true)];
|
||||
data.target = (BoneData)bones[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
data.bendDirection = (flags & 2) != 0 ? 1 : -1;
|
||||
data.compress = (flags & 4) != 0;
|
||||
data.stretch = (flags & 8) != 0;
|
||||
data.uniform = (flags & 16) != 0;
|
||||
if ((flags & 32) != 0) data.mix = (flags & 64) != 0 ? input.readFloat() : 1;
|
||||
if ((flags & 128) != 0) data.softness = input.readFloat() * scale;
|
||||
o[i] = data;
|
||||
}
|
||||
|
||||
// Transform constraints.
|
||||
o = skeletonData.transformConstraints.setSize(n = input.readInt(true));
|
||||
for (int i = 0, nn; i < n; i++) {
|
||||
var data = new TransformConstraintData(input.readString());
|
||||
data.order = input.readInt(true);
|
||||
Object[] constraintBones = data.bones.setSize(nn = input.readInt(true));
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
constraintBones[ii] = bones[input.readInt(true)];
|
||||
data.source = (BoneData)bones[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
data.localSource = (flags & 2) != 0;
|
||||
data.localTarget = (flags & 4) != 0;
|
||||
data.additive = (flags & 8) != 0;
|
||||
data.clamp = (flags & 16) != 0;
|
||||
Object[] froms = data.properties.setSize(nn = flags >> 5);
|
||||
for (int ii = 0, tn; ii < nn; ii++) {
|
||||
float fromScale = 1;
|
||||
FromProperty from;
|
||||
switch (input.readByte()) {
|
||||
case 0 -> from = new FromRotate();
|
||||
case 1 -> {
|
||||
from = new FromX();
|
||||
fromScale = scale;
|
||||
}
|
||||
case 2 -> {
|
||||
from = new FromY();
|
||||
fromScale = scale;
|
||||
}
|
||||
case 3 -> from = new FromScaleX();
|
||||
case 4 -> from = new FromScaleY();
|
||||
case 5 -> from = new FromShearY();
|
||||
default -> from = null;
|
||||
}
|
||||
from.offset = input.readFloat() * fromScale;
|
||||
Object[] tos = from.to.setSize(tn = input.readByte());
|
||||
for (int t = 0; t < tn; t++) {
|
||||
float toScale = 1;
|
||||
ToProperty to;
|
||||
// Constraints.
|
||||
int constraintCount = input.readInt(true);
|
||||
ConstraintData[] constraints = skeletonData.constraints.setSize(constraintCount);
|
||||
for (int i = 0; i < constraintCount; i++) {
|
||||
String name = input.readString();
|
||||
int nn = input.readInt(true);
|
||||
switch (input.readByte()) {
|
||||
case CONSTRAINT_IK -> {
|
||||
var data = new IkConstraintData(name);
|
||||
BoneData[] constraintBones = data.bones.setSize(nn);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
constraintBones[ii] = bones[input.readInt(true)];
|
||||
data.target = bones[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
data.uniform = (flags & 2) != 0;
|
||||
IkConstraintPose setup = data.setup;
|
||||
setup.bendDirection = (flags & 4) != 0 ? 1 : -1;
|
||||
setup.compress = (flags & 8) != 0;
|
||||
setup.stretch = (flags & 16) != 0;
|
||||
if ((flags & 32) != 0) setup.mix = (flags & 64) != 0 ? input.readFloat() : 1;
|
||||
if ((flags & 128) != 0) setup.softness = input.readFloat() * scale;
|
||||
constraints[i] = data;
|
||||
}
|
||||
case CONSTRAINT_TRANSFORM -> {
|
||||
var data = new TransformConstraintData(name);
|
||||
BoneData[] constraintBones = data.bones.setSize(nn);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
constraintBones[ii] = bones[input.readInt(true)];
|
||||
data.source = bones[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
data.localSource = (flags & 2) != 0;
|
||||
data.localTarget = (flags & 4) != 0;
|
||||
data.additive = (flags & 8) != 0;
|
||||
data.clamp = (flags & 16) != 0;
|
||||
FromProperty[] froms = data.properties.setSize(nn = flags >> 5);
|
||||
for (int ii = 0, tn; ii < nn; ii++) {
|
||||
float fromScale = 1;
|
||||
FromProperty from;
|
||||
switch (input.readByte()) {
|
||||
case 0 -> to = new ToRotate();
|
||||
case 0 -> from = new FromRotate();
|
||||
case 1 -> {
|
||||
to = new ToX();
|
||||
toScale = scale;
|
||||
from = new FromX();
|
||||
fromScale = scale;
|
||||
}
|
||||
case 2 -> {
|
||||
to = new ToY();
|
||||
toScale = scale;
|
||||
from = new FromY();
|
||||
fromScale = scale;
|
||||
}
|
||||
case 3 -> to = new ToScaleX();
|
||||
case 4 -> to = new ToScaleY();
|
||||
case 5 -> to = new ToShearY();
|
||||
default -> to = null;
|
||||
case 3 -> from = new FromScaleX();
|
||||
case 4 -> from = new FromScaleY();
|
||||
case 5 -> from = new FromShearY();
|
||||
default -> from = null;
|
||||
}
|
||||
to.offset = input.readFloat() * toScale;
|
||||
to.max = input.readFloat() * toScale;
|
||||
to.scale = input.readFloat() * toScale / fromScale;
|
||||
tos[t] = to;
|
||||
from.offset = input.readFloat() * fromScale;
|
||||
ToProperty[] tos = from.to.setSize(tn = input.readByte());
|
||||
for (int t = 0; t < tn; t++) {
|
||||
float toScale = 1;
|
||||
ToProperty to;
|
||||
switch (input.readByte()) {
|
||||
case 0 -> to = new ToRotate();
|
||||
case 1 -> {
|
||||
to = new ToX();
|
||||
toScale = scale;
|
||||
}
|
||||
case 2 -> {
|
||||
to = new ToY();
|
||||
toScale = scale;
|
||||
}
|
||||
case 3 -> to = new ToScaleX();
|
||||
case 4 -> to = new ToScaleY();
|
||||
case 5 -> to = new ToShearY();
|
||||
default -> to = null;
|
||||
}
|
||||
to.offset = input.readFloat() * toScale;
|
||||
to.max = input.readFloat() * toScale;
|
||||
to.scale = input.readFloat() * toScale / fromScale;
|
||||
tos[t] = to;
|
||||
}
|
||||
froms[ii] = from;
|
||||
}
|
||||
froms[ii] = from;
|
||||
flags = input.read();
|
||||
if ((flags & 1) != 0) data.offsetRotation = input.readFloat();
|
||||
if ((flags & 2) != 0) data.offsetX = input.readFloat() * scale;
|
||||
if ((flags & 4) != 0) data.offsetY = input.readFloat() * scale;
|
||||
if ((flags & 8) != 0) data.offsetScaleX = input.readFloat();
|
||||
if ((flags & 16) != 0) data.offsetScaleY = input.readFloat();
|
||||
if ((flags & 32) != 0) data.offsetShearY = input.readFloat();
|
||||
flags = input.read();
|
||||
TransformConstraintPose setup = data.setup;
|
||||
if ((flags & 1) != 0) setup.mixRotate = input.readFloat();
|
||||
if ((flags & 2) != 0) setup.mixX = input.readFloat();
|
||||
if ((flags & 4) != 0) setup.mixY = input.readFloat();
|
||||
if ((flags & 8) != 0) setup.mixScaleX = input.readFloat();
|
||||
if ((flags & 16) != 0) setup.mixScaleY = input.readFloat();
|
||||
if ((flags & 32) != 0) setup.mixShearY = input.readFloat();
|
||||
constraints[i] = data;
|
||||
}
|
||||
case CONSTRAINT_PATH -> {
|
||||
var data = new PathConstraintData(name);
|
||||
BoneData[] constraintBones = data.bones.setSize(nn);
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
constraintBones[ii] = bones[input.readInt(true)];
|
||||
data.slot = slots[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
data.positionMode = PositionMode.values[flags & 2];
|
||||
data.spacingMode = SpacingMode.values[(flags >> 2) & 3];
|
||||
data.rotateMode = RotateMode.values[(flags >> 4) & 3];
|
||||
if ((flags & 128) != 0) data.offsetRotation = input.readFloat();
|
||||
PathConstraintPose setup = data.setup;
|
||||
setup.position = input.readFloat();
|
||||
if (data.positionMode == PositionMode.fixed) setup.position *= scale;
|
||||
setup.spacing = input.readFloat();
|
||||
if (data.spacingMode == SpacingMode.length || data.spacingMode == SpacingMode.fixed) setup.spacing *= scale;
|
||||
setup.mixRotate = input.readFloat();
|
||||
setup.mixX = input.readFloat();
|
||||
setup.mixY = input.readFloat();
|
||||
constraints[i] = data;
|
||||
}
|
||||
case CONSTRAINT_PHYSICS -> {
|
||||
var data = new PhysicsConstraintData(name);
|
||||
data.bone = bones[nn];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
if ((flags & 2) != 0) data.x = input.readFloat();
|
||||
if ((flags & 4) != 0) data.y = input.readFloat();
|
||||
if ((flags & 8) != 0) data.rotate = input.readFloat();
|
||||
if ((flags & 16) != 0) data.scaleX = input.readFloat();
|
||||
if ((flags & 32) != 0) data.shearX = input.readFloat();
|
||||
data.limit = ((flags & 64) != 0 ? input.readFloat() : 5000) * scale;
|
||||
data.step = 1f / input.readUnsignedByte();
|
||||
PhysicsConstraintPose setup = data.setup;
|
||||
setup.inertia = input.readFloat();
|
||||
setup.strength = input.readFloat();
|
||||
setup.damping = input.readFloat();
|
||||
setup.massInverse = (flags & 128) != 0 ? input.readFloat() : 1;
|
||||
setup.wind = input.readFloat();
|
||||
setup.gravity = input.readFloat();
|
||||
flags = input.read();
|
||||
if ((flags & 1) != 0) data.inertiaGlobal = true;
|
||||
if ((flags & 2) != 0) data.strengthGlobal = true;
|
||||
if ((flags & 4) != 0) data.dampingGlobal = true;
|
||||
if ((flags & 8) != 0) data.massGlobal = true;
|
||||
if ((flags & 16) != 0) data.windGlobal = true;
|
||||
if ((flags & 32) != 0) data.gravityGlobal = true;
|
||||
if ((flags & 64) != 0) data.mixGlobal = true;
|
||||
setup.mix = (flags & 128) != 0 ? input.readFloat() : 1;
|
||||
constraints[i] = data;
|
||||
}
|
||||
case CONSTRAINT_SLIDER -> {
|
||||
var data = new SliderData(name);
|
||||
data.skinRequired = (nn & 1) != 0;
|
||||
data.loop = (nn & 2) != 0;
|
||||
data.additive = (nn & 4) != 0;
|
||||
if ((nn & 8) != 0) data.setup.mix = (nn & 16) != 0 ? input.readFloat() : 1;
|
||||
if ((nn & 32) != 0) data.setup.time = input.readFloat();
|
||||
constraints[i] = data;
|
||||
}
|
||||
}
|
||||
flags = input.read();
|
||||
if ((flags & 1) != 0) data.offsetRotation = input.readFloat();
|
||||
if ((flags & 2) != 0) data.offsetX = input.readFloat() * scale;
|
||||
if ((flags & 4) != 0) data.offsetY = input.readFloat() * scale;
|
||||
if ((flags & 8) != 0) data.offsetScaleX = input.readFloat();
|
||||
if ((flags & 16) != 0) data.offsetScaleY = input.readFloat();
|
||||
if ((flags & 32) != 0) data.offsetShearY = input.readFloat();
|
||||
flags = input.read();
|
||||
if ((flags & 1) != 0) data.mixRotate = input.readFloat();
|
||||
if ((flags & 2) != 0) data.mixX = input.readFloat();
|
||||
if ((flags & 4) != 0) data.mixY = input.readFloat();
|
||||
if ((flags & 8) != 0) data.mixScaleX = input.readFloat();
|
||||
if ((flags & 16) != 0) data.mixScaleY = input.readFloat();
|
||||
if ((flags & 32) != 0) data.mixShearY = input.readFloat();
|
||||
o[i] = data;
|
||||
}
|
||||
|
||||
// Path constraints.
|
||||
o = skeletonData.pathConstraints.setSize(n = input.readInt(true));
|
||||
for (int i = 0, nn; i < n; i++) {
|
||||
var data = new PathConstraintData(input.readString());
|
||||
data.order = input.readInt(true);
|
||||
data.skinRequired = input.readBoolean();
|
||||
Object[] constraintBones = data.bones.setSize(nn = input.readInt(true));
|
||||
for (int ii = 0; ii < nn; ii++)
|
||||
constraintBones[ii] = bones[input.readInt(true)];
|
||||
data.slot = (SlotData)slots[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.positionMode = PositionMode.values[flags & 1];
|
||||
data.spacingMode = SpacingMode.values[(flags >> 1) & 3];
|
||||
data.rotateMode = RotateMode.values[(flags >> 3) & 3];
|
||||
if ((flags & 128) != 0) data.offsetRotation = input.readFloat();
|
||||
data.position = input.readFloat();
|
||||
if (data.positionMode == PositionMode.fixed) data.position *= scale;
|
||||
data.spacing = input.readFloat();
|
||||
if (data.spacingMode == SpacingMode.length || data.spacingMode == SpacingMode.fixed) data.spacing *= scale;
|
||||
data.mixRotate = input.readFloat();
|
||||
data.mixX = input.readFloat();
|
||||
data.mixY = input.readFloat();
|
||||
o[i] = data;
|
||||
}
|
||||
|
||||
// Physics constraints.
|
||||
o = skeletonData.physicsConstraints.setSize(n = input.readInt(true));
|
||||
for (int i = 0; i < n; i++) {
|
||||
var data = new PhysicsConstraintData(input.readString());
|
||||
data.order = input.readInt(true);
|
||||
data.bone = (BoneData)bones[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
if ((flags & 2) != 0) data.x = input.readFloat();
|
||||
if ((flags & 4) != 0) data.y = input.readFloat();
|
||||
if ((flags & 8) != 0) data.rotate = input.readFloat();
|
||||
if ((flags & 16) != 0) data.scaleX = input.readFloat();
|
||||
if ((flags & 32) != 0) data.shearX = input.readFloat();
|
||||
data.limit = ((flags & 64) != 0 ? input.readFloat() : 5000) * scale;
|
||||
data.step = 1f / input.readUnsignedByte();
|
||||
data.inertia = input.readFloat();
|
||||
data.strength = input.readFloat();
|
||||
data.damping = input.readFloat();
|
||||
data.massInverse = (flags & 128) != 0 ? input.readFloat() : 1;
|
||||
data.wind = input.readFloat();
|
||||
data.gravity = input.readFloat();
|
||||
flags = input.read();
|
||||
if ((flags & 1) != 0) data.inertiaGlobal = true;
|
||||
if ((flags & 2) != 0) data.strengthGlobal = true;
|
||||
if ((flags & 4) != 0) data.dampingGlobal = true;
|
||||
if ((flags & 8) != 0) data.massGlobal = true;
|
||||
if ((flags & 16) != 0) data.windGlobal = true;
|
||||
if ((flags & 32) != 0) data.gravityGlobal = true;
|
||||
if ((flags & 64) != 0) data.mixGlobal = true;
|
||||
data.mix = (flags & 128) != 0 ? input.readFloat() : 1;
|
||||
o[i] = data;
|
||||
}
|
||||
|
||||
// Default skin.
|
||||
@ -425,10 +444,10 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
|
||||
// Linked meshes.
|
||||
n = linkedMeshes.size;
|
||||
Object[] items = linkedMeshes.items;
|
||||
LinkedMesh[] items = linkedMeshes.items;
|
||||
for (int i = 0; i < n; i++) {
|
||||
var linkedMesh = (LinkedMesh)items[i];
|
||||
Skin skin = skeletonData.skins.get(linkedMesh.skinIndex);
|
||||
LinkedMesh linkedMesh = items[i];
|
||||
Skin skin = skeletonData.skins.items[linkedMesh.skinIndex];
|
||||
Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
||||
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
|
||||
linkedMesh.mesh.setTimelineAttachment(linkedMesh.inheritTimelines ? (VertexAttachment)parent : linkedMesh.mesh);
|
||||
@ -453,10 +472,12 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
}
|
||||
|
||||
// Animations.
|
||||
o = skeletonData.animations.setSize(n = input.readInt(true));
|
||||
Animation[] animations = skeletonData.animations.setSize(n = input.readInt(true));
|
||||
for (int i = 0; i < n; i++)
|
||||
o[i] = readAnimation(input, input.readString(), skeletonData);
|
||||
animations[i] = readAnimation(input, input.readString(), skeletonData);
|
||||
|
||||
for (int i = 0; i < constraintCount; i++)
|
||||
if (constraints[i] instanceof SliderData data) data.animation = animations[input.readInt(true)];
|
||||
} catch (IOException ex) {
|
||||
throw new SerializationException("Error reading skeleton file.", ex);
|
||||
} finally {
|
||||
@ -482,23 +503,15 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
|
||||
if (nonessential) Color.rgba8888ToColor(skin.color, input.readInt());
|
||||
|
||||
Object[] bones = skin.bones.setSize(input.readInt(true)), items = skeletonData.bones.items;
|
||||
for (int i = 0, n = skin.bones.size; i < n; i++)
|
||||
bones[i] = items[input.readInt(true)];
|
||||
int n;
|
||||
Object[] from = skeletonData.bones.items, to = skin.bones.setSize(n = input.readInt(true));
|
||||
for (int i = 0; i < n; i++)
|
||||
to[i] = from[input.readInt(true)];
|
||||
|
||||
items = skeletonData.ikConstraints.items;
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++)
|
||||
skin.constraints.add((ConstraintData)items[input.readInt(true)]);
|
||||
items = skeletonData.transformConstraints.items;
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++)
|
||||
skin.constraints.add((ConstraintData)items[input.readInt(true)]);
|
||||
items = skeletonData.pathConstraints.items;
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++)
|
||||
skin.constraints.add((ConstraintData)items[input.readInt(true)]);
|
||||
items = skeletonData.physicsConstraints.items;
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++)
|
||||
skin.constraints.add((ConstraintData)items[input.readInt(true)]);
|
||||
skin.constraints.shrink();
|
||||
from = skeletonData.constraints.items;
|
||||
to = skin.constraints.setSize(n = input.readInt(true));
|
||||
for (int i = 0; i < n; i++)
|
||||
to[i] = from[input.readInt(true)];
|
||||
|
||||
slotCount = input.readInt(true);
|
||||
}
|
||||
@ -663,7 +676,7 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
|
||||
ClippingAttachment clip = attachmentLoader.newClippingAttachment(skin, name);
|
||||
if (clip == null) return null;
|
||||
clip.setEndSlot(skeletonData.slots.get(endSlotIndex));
|
||||
clip.setEndSlot(skeletonData.slots.items[endSlotIndex]);
|
||||
clip.setWorldVerticesLength(vertices.length);
|
||||
clip.setVertices(vertices.vertices);
|
||||
clip.setBones(vertices.bones);
|
||||
@ -727,7 +740,7 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
}
|
||||
|
||||
private Animation readAnimation (SkeletonInput input, String name, SkeletonData skeletonData) throws IOException {
|
||||
var timelines = new Array<Timeline>(input.readInt(true));
|
||||
var timelines = new Array<Timeline>(true, input.readInt(true), Timeline[]::new);
|
||||
float scale = this.scale;
|
||||
|
||||
// Slot timelines.
|
||||
@ -976,7 +989,7 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
// Path constraint timelines.
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++) {
|
||||
int index = input.readInt(true);
|
||||
PathConstraintData data = skeletonData.pathConstraints.get(index);
|
||||
var data = (PathConstraintData)skeletonData.constraints.items[index];
|
||||
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
|
||||
int type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);
|
||||
switch (type) {
|
||||
@ -1041,9 +1054,22 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
}
|
||||
}
|
||||
|
||||
// Slider timelines.
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++) {
|
||||
int index = input.readInt(true);
|
||||
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
|
||||
int type = input.readByte(), frameCount = input.readInt(true), bezierCount = input.readInt(true);
|
||||
readTimeline(input, timelines, switch (type) {
|
||||
case SLIDER_TIME -> new SliderTimeline(frameCount, bezierCount, index);
|
||||
case SLIDER_MIX -> new SliderMixTimeline(frameCount, bezierCount, index);
|
||||
default -> throw new SerializationException();
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Attachment timelines.
|
||||
for (int i = 0, n = input.readInt(true); i < n; i++) {
|
||||
Skin skin = skeletonData.skins.get(input.readInt(true));
|
||||
Skin skin = skeletonData.skins.items[input.readInt(true)];
|
||||
for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) {
|
||||
int slotIndex = input.readInt(true);
|
||||
for (int iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {
|
||||
@ -1147,13 +1173,13 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
var timeline = new EventTimeline(eventCount);
|
||||
for (int i = 0; i < eventCount; i++) {
|
||||
float time = input.readFloat();
|
||||
EventData eventData = skeletonData.events.get(input.readInt(true));
|
||||
EventData eventData = skeletonData.events.items[input.readInt(true)];
|
||||
var event = new Event(time, eventData);
|
||||
event.intValue = input.readInt(false);
|
||||
event.floatValue = input.readFloat();
|
||||
event.stringValue = input.readString();
|
||||
if (event.stringValue == null) event.stringValue = eventData.stringValue;
|
||||
if (event.getData().audioPath != null) {
|
||||
if (event.data.audioPath != null) {
|
||||
event.volume = input.readFloat();
|
||||
event.balance = input.readFloat();
|
||||
}
|
||||
@ -1163,9 +1189,9 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
}
|
||||
|
||||
float duration = 0;
|
||||
Object[] items = timelines.items;
|
||||
Timeline[] items = timelines.items;
|
||||
for (int i = 0, n = timelines.size; i < n; i++)
|
||||
duration = Math.max(duration, ((Timeline)items[i]).getDuration());
|
||||
duration = Math.max(duration, items[i].getDuration());
|
||||
return new Animation(name, timelines, duration);
|
||||
}
|
||||
|
||||
@ -1186,7 +1212,7 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
timelines.add(timeline);
|
||||
}
|
||||
|
||||
private void readTimeline (SkeletonInput input, Array<Timeline> timelines, CurveTimeline2 timeline, float scale)
|
||||
private void readTimeline (SkeletonInput input, Array<Timeline> timelines, BoneTimeline2 timeline, float scale)
|
||||
throws IOException {
|
||||
float time = input.readFloat(), value1 = input.readFloat() * scale, value2 = input.readFloat() * scale;
|
||||
for (int frame = 0, bezier = 0, frameLast = timeline.getFrameCount() - 1;; frame++) {
|
||||
|
||||
@ -41,8 +41,8 @@ import com.esotericsoftware.spine.attachments.BoundingBoxAttachment;
|
||||
* provided along with convenience methods for doing hit detection. */
|
||||
public class SkeletonBounds {
|
||||
private float minX, minY, maxX, maxY;
|
||||
private Array<BoundingBoxAttachment> boundingBoxes = new Array();
|
||||
private Array<FloatArray> polygons = new Array();
|
||||
private Array<BoundingBoxAttachment> boundingBoxes = new Array(true, 8, BoundingBoxAttachment[]::new);
|
||||
private Array<FloatArray> polygons = new Array(true, 8, FloatArray[]::new);
|
||||
private Pool<FloatArray> polygonPool = new Pool() {
|
||||
protected Object newObject () {
|
||||
return new FloatArray();
|
||||
@ -55,25 +55,25 @@ public class SkeletonBounds {
|
||||
* SkeletonBounds AABB methods will always return true. */
|
||||
public void update (Skeleton skeleton, boolean updateAabb) {
|
||||
if (skeleton == null) throw new IllegalArgumentException("skeleton cannot be null.");
|
||||
|
||||
Array<BoundingBoxAttachment> boundingBoxes = this.boundingBoxes;
|
||||
Array<FloatArray> polygons = this.polygons;
|
||||
Object[] slots = skeleton.slots.items;
|
||||
int slotCount = skeleton.slots.size;
|
||||
|
||||
boundingBoxes.clear();
|
||||
polygonPool.freeAll(polygons);
|
||||
polygons.clear();
|
||||
|
||||
Slot[] slots = skeleton.slots.items;
|
||||
int slotCount = skeleton.slots.size;
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
var slot = (Slot)slots[i];
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
Attachment attachment = slot.applied.attachment;
|
||||
if (attachment instanceof BoundingBoxAttachment boundingBox) {
|
||||
boundingBoxes.add(boundingBox);
|
||||
|
||||
FloatArray polygon = polygonPool.obtain();
|
||||
polygons.add(polygon);
|
||||
boundingBox.computeWorldVertices(slot, 0, boundingBox.getWorldVerticesLength(),
|
||||
boundingBox.computeWorldVertices(skeleton, slot, 0, boundingBox.getWorldVerticesLength(),
|
||||
polygon.setSize(boundingBox.getWorldVerticesLength()), 0, 2);
|
||||
}
|
||||
}
|
||||
@ -90,9 +90,9 @@ public class SkeletonBounds {
|
||||
|
||||
private void aabbCompute () {
|
||||
float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE;
|
||||
Object[] polygons = this.polygons.items;
|
||||
FloatArray[] polygons = this.polygons.items;
|
||||
for (int i = 0, n = this.polygons.size; i < n; i++) {
|
||||
var polygon = (FloatArray)polygons[i];
|
||||
FloatArray polygon = polygons[i];
|
||||
float[] vertices = polygon.items;
|
||||
for (int ii = 0, nn = polygon.size; ii < nn; ii += 2) {
|
||||
float x = vertices[ii];
|
||||
@ -143,9 +143,9 @@ public class SkeletonBounds {
|
||||
/** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more
|
||||
* efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */
|
||||
public @Null BoundingBoxAttachment containsPoint (float x, float y) {
|
||||
Object[] polygons = this.polygons.items;
|
||||
FloatArray[] polygons = this.polygons.items;
|
||||
for (int i = 0, n = this.polygons.size; i < n; i++)
|
||||
if (containsPoint((FloatArray)polygons[i], x, y)) return boundingBoxes.get(i);
|
||||
if (containsPoint(polygons[i], x, y)) return boundingBoxes.items[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -173,9 +173,9 @@ public class SkeletonBounds {
|
||||
* is usually more efficient to only call this method if {@link #aabbIntersectsSegment(float, float, float, float)} returns
|
||||
* true. */
|
||||
public @Null BoundingBoxAttachment intersectsSegment (float x1, float y1, float x2, float y2) {
|
||||
Object[] polygons = this.polygons.items;
|
||||
FloatArray[] polygons = this.polygons.items;
|
||||
for (int i = 0, n = this.polygons.size; i < n; i++)
|
||||
if (intersectsSegment((FloatArray)polygons[i], x1, y1, x2, y2)) return boundingBoxes.get(i);
|
||||
if (intersectsSegment(polygons[i], x1, y1, x2, y2)) return boundingBoxes.items[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -248,6 +248,6 @@ public class SkeletonBounds {
|
||||
public @Null FloatArray getPolygon (BoundingBoxAttachment boundingBox) {
|
||||
if (boundingBox == null) throw new IllegalArgumentException("boundingBox cannot be null.");
|
||||
int index = boundingBoxes.indexOf(boundingBox, true);
|
||||
return index == -1 ? null : polygons.get(index);
|
||||
return index == -1 ? null : polygons.items[index];
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,16 +38,13 @@ import com.badlogic.gdx.utils.Null;
|
||||
* Guide. */
|
||||
public class SkeletonData {
|
||||
@Null String name;
|
||||
final Array<BoneData> bones = new Array(); // Ordered parents first.
|
||||
final Array<SlotData> slots = new Array(); // Setup pose draw order.
|
||||
final Array<Skin> skins = new Array();
|
||||
final Array<BoneData> bones = new Array(true, 0, BoneData[]::new); // Ordered parents first.
|
||||
final Array<SlotData> slots = new Array(true, 0, SlotData[]::new); // Setup pose draw order.
|
||||
final Array<Skin> skins = new Array(true, 0, Skin[]::new);
|
||||
@Null Skin defaultSkin;
|
||||
final Array<EventData> events = new Array();
|
||||
final Array<Animation> animations = new Array();
|
||||
final Array<IkConstraintData> ikConstraints = new Array();
|
||||
final Array<TransformConstraintData> transformConstraints = new Array();
|
||||
final Array<PathConstraintData> pathConstraints = new Array();
|
||||
final Array<PhysicsConstraintData> physicsConstraints = new Array();
|
||||
final Array<EventData> events = new Array(true, 0, EventData[]::new);
|
||||
final Array<Animation> animations = new Array(true, 0, Animation[]::new);
|
||||
final Array<ConstraintData> constraints = new Array(true, 0, ConstraintData[]::new);
|
||||
float x, y, width, height, referenceScale = 100;
|
||||
@Null String version, hash;
|
||||
|
||||
@ -70,11 +67,9 @@ public class SkeletonData {
|
||||
* multiple times. */
|
||||
public @Null BoneData findBone (String boneName) {
|
||||
if (boneName == null) throw new IllegalArgumentException("boneName cannot be null.");
|
||||
Object[] bones = this.bones.items;
|
||||
for (int i = 0, n = this.bones.size; i < n; i++) {
|
||||
var bone = (BoneData)bones[i];
|
||||
if (bone.name.equals(boneName)) return bone;
|
||||
}
|
||||
BoneData[] bones = this.bones.items;
|
||||
for (int i = 0, n = this.bones.size; i < n; i++)
|
||||
if (bones[i].name.equals(boneName)) return bones[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -89,11 +84,9 @@ public class SkeletonData {
|
||||
* multiple times. */
|
||||
public @Null SlotData findSlot (String slotName) {
|
||||
if (slotName == null) throw new IllegalArgumentException("slotName cannot be null.");
|
||||
Object[] slots = this.slots.items;
|
||||
for (int i = 0, n = this.slots.size; i < n; i++) {
|
||||
var slot = (SlotData)slots[i];
|
||||
if (slot.name.equals(slotName)) return slot;
|
||||
}
|
||||
SlotData[] slots = this.slots.items;
|
||||
for (int i = 0, n = this.slots.size; i < n; i++)
|
||||
if (slots[i].name.equals(slotName)) return slots[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -151,86 +144,26 @@ public class SkeletonData {
|
||||
* call it multiple times. */
|
||||
public @Null Animation findAnimation (String animationName) {
|
||||
if (animationName == null) throw new IllegalArgumentException("animationName cannot be null.");
|
||||
Object[] animations = this.animations.items;
|
||||
for (int i = 0, n = this.animations.size; i < n; i++) {
|
||||
var animation = (Animation)animations[i];
|
||||
if (animation.name.equals(animationName)) return animation;
|
||||
}
|
||||
Animation[] animations = this.animations.items;
|
||||
for (int i = 0, n = this.animations.size; i < n; i++)
|
||||
if (animations[i].name.equals(animationName)) return animations[i];
|
||||
return null;
|
||||
}
|
||||
|
||||
// --- IK constraints
|
||||
// --- Constraints.
|
||||
|
||||
/** The skeleton's IK constraints. */
|
||||
public Array<IkConstraintData> getIkConstraints () {
|
||||
return ikConstraints;
|
||||
/** The skeleton's constraints. */
|
||||
public Array<ConstraintData> getConstraints () {
|
||||
return constraints;
|
||||
}
|
||||
|
||||
/** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it multiple times. */
|
||||
public @Null IkConstraintData findIkConstraint (String constraintName) {
|
||||
public @Null <T extends ConstraintData> T findConstraint (String constraintName, Class<T> type) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] ikConstraints = this.ikConstraints.items;
|
||||
for (int i = 0, n = this.ikConstraints.size; i < n; i++) {
|
||||
var constraint = (IkConstraintData)ikConstraints[i];
|
||||
if (constraint.name.equals(constraintName)) return constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// --- Transform constraints
|
||||
|
||||
/** The skeleton's transform constraints. */
|
||||
public Array<TransformConstraintData> getTransformConstraints () {
|
||||
return transformConstraints;
|
||||
}
|
||||
|
||||
/** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
|
||||
* this method than to call it multiple times. */
|
||||
public @Null TransformConstraintData findTransformConstraint (String constraintName) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] transformConstraints = this.transformConstraints.items;
|
||||
for (int i = 0, n = this.transformConstraints.size; i < n; i++) {
|
||||
var constraint = (TransformConstraintData)transformConstraints[i];
|
||||
if (constraint.name.equals(constraintName)) return constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// --- Path constraints
|
||||
|
||||
/** The skeleton's path constraints. */
|
||||
public Array<PathConstraintData> getPathConstraints () {
|
||||
return pathConstraints;
|
||||
}
|
||||
|
||||
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it multiple times. */
|
||||
public @Null PathConstraintData findPathConstraint (String constraintName) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] pathConstraints = this.pathConstraints.items;
|
||||
for (int i = 0, n = this.pathConstraints.size; i < n; i++) {
|
||||
var constraint = (PathConstraintData)pathConstraints[i];
|
||||
if (constraint.name.equals(constraintName)) return constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// --- Physics constraints
|
||||
|
||||
/** The skeleton's physics constraints. */
|
||||
public Array<PhysicsConstraintData> getPhysicsConstraints () {
|
||||
return physicsConstraints;
|
||||
}
|
||||
|
||||
/** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
|
||||
* method than to call it multiple times. */
|
||||
public @Null PhysicsConstraintData findPhysicsConstraint (String constraintName) {
|
||||
if (constraintName == null) throw new IllegalArgumentException("constraintName cannot be null.");
|
||||
Object[] physicsConstraints = this.physicsConstraints.items;
|
||||
for (int i = 0, n = this.physicsConstraints.size; i < n; i++) {
|
||||
var constraint = (PhysicsConstraintData)physicsConstraints[i];
|
||||
if (constraint.name.equals(constraintName)) return constraint;
|
||||
if (type == null) throw new IllegalArgumentException("type cannot be null.");
|
||||
ConstraintData[] constraints = this.constraints.items;
|
||||
for (int i = 0, n = this.constraints.size; i < n; i++) {
|
||||
ConstraintData constraint = constraints[i];
|
||||
if (type.isInstance(constraint) && constraint.name.equals(constraintName)) return (T)constraint;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -46,9 +46,9 @@ import com.badlogic.gdx.utils.SerializationException;
|
||||
|
||||
import com.esotericsoftware.spine.Animation.AlphaTimeline;
|
||||
import com.esotericsoftware.spine.Animation.AttachmentTimeline;
|
||||
import com.esotericsoftware.spine.Animation.BoneTimeline2;
|
||||
import com.esotericsoftware.spine.Animation.CurveTimeline;
|
||||
import com.esotericsoftware.spine.Animation.CurveTimeline1;
|
||||
import com.esotericsoftware.spine.Animation.CurveTimeline2;
|
||||
import com.esotericsoftware.spine.Animation.DeformTimeline;
|
||||
import com.esotericsoftware.spine.Animation.DrawOrderTimeline;
|
||||
import com.esotericsoftware.spine.Animation.EventTimeline;
|
||||
@ -77,6 +77,8 @@ import com.esotericsoftware.spine.Animation.SequenceTimeline;
|
||||
import com.esotericsoftware.spine.Animation.ShearTimeline;
|
||||
import com.esotericsoftware.spine.Animation.ShearXTimeline;
|
||||
import com.esotericsoftware.spine.Animation.ShearYTimeline;
|
||||
import com.esotericsoftware.spine.Animation.SliderMixTimeline;
|
||||
import com.esotericsoftware.spine.Animation.SliderTimeline;
|
||||
import com.esotericsoftware.spine.Animation.Timeline;
|
||||
import com.esotericsoftware.spine.Animation.TransformConstraintTimeline;
|
||||
import com.esotericsoftware.spine.Animation.TranslateTimeline;
|
||||
@ -121,7 +123,7 @@ import com.esotericsoftware.spine.attachments.VertexAttachment;
|
||||
* <a href="https://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data">JSON and binary data</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
public class SkeletonJson extends SkeletonLoader {
|
||||
private final Array<LinkedMesh> linkedMeshes = new Array();
|
||||
private final Array<LinkedMesh> linkedMeshes = new Array(true, 8, LinkedMesh[]::new);
|
||||
|
||||
public SkeletonJson (AttachmentLoader attachmentLoader) {
|
||||
super(attachmentLoader);
|
||||
@ -174,14 +176,15 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
}
|
||||
var data = new BoneData(skeletonData.bones.size, boneMap.getString("name"), parent);
|
||||
data.length = boneMap.getFloat("length", 0) * scale;
|
||||
data.x = boneMap.getFloat("x", 0) * scale;
|
||||
data.y = boneMap.getFloat("y", 0) * scale;
|
||||
data.rotation = boneMap.getFloat("rotation", 0);
|
||||
data.scaleX = boneMap.getFloat("scaleX", 1);
|
||||
data.scaleY = boneMap.getFloat("scaleY", 1);
|
||||
data.shearX = boneMap.getFloat("shearX", 0);
|
||||
data.shearY = boneMap.getFloat("shearY", 0);
|
||||
data.inherit = Inherit.valueOf(boneMap.getString("inherit", Inherit.normal.name()));
|
||||
BoneLocal setup = data.setup;
|
||||
setup.x = boneMap.getFloat("x", 0) * scale;
|
||||
setup.y = boneMap.getFloat("y", 0) * scale;
|
||||
setup.rotation = boneMap.getFloat("rotation", 0);
|
||||
setup.scaleX = boneMap.getFloat("scaleX", 1);
|
||||
setup.scaleY = boneMap.getFloat("scaleY", 1);
|
||||
setup.shearX = boneMap.getFloat("shearX", 0);
|
||||
setup.shearY = boneMap.getFloat("shearY", 0);
|
||||
setup.inherit = Inherit.valueOf(boneMap.getString("inherit", Inherit.normal.name()));
|
||||
data.skinRequired = boneMap.getBoolean("skin", false);
|
||||
|
||||
String color = boneMap.getString("color", null);
|
||||
@ -203,10 +206,10 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
var data = new SlotData(skeletonData.slots.size, slotName, boneData);
|
||||
|
||||
String color = slotMap.getString("color", null);
|
||||
if (color != null) Color.valueOf(color, data.getColor());
|
||||
if (color != null) Color.valueOf(color, data.setup.getColor());
|
||||
|
||||
String dark = slotMap.getString("dark", null);
|
||||
if (dark != null) data.setDarkColor(Color.valueOf(dark));
|
||||
if (dark != null) Color.valueOf(dark, data.setup.getDarkColor());
|
||||
|
||||
data.attachmentName = slotMap.getString("attachment", null);
|
||||
data.blendMode = BlendMode.valueOf(slotMap.getString("blend", BlendMode.normal.name()));
|
||||
@ -214,194 +217,204 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
skeletonData.slots.add(data);
|
||||
}
|
||||
|
||||
// IK constraints.
|
||||
for (JsonValue constraintMap = root.getChild("ik"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
var data = new IkConstraintData(constraintMap.getString("name"));
|
||||
data.order = constraintMap.getInt("order", 0);
|
||||
data.skinRequired = constraintMap.getBoolean("skin", false);
|
||||
// Constraints.
|
||||
for (JsonValue constraintMap = root.getChild("constraints"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
String name = constraintMap.getString("name");
|
||||
boolean skinRequired = constraintMap.getBoolean("skin", false);
|
||||
switch (constraintMap.getString("type")) {
|
||||
case "ik" -> {
|
||||
var data = new IkConstraintData(name);
|
||||
data.skinRequired = skinRequired;
|
||||
|
||||
for (JsonValue entry = constraintMap.getChild("bones"); entry != null; entry = entry.next) {
|
||||
BoneData bone = skeletonData.findBone(entry.asString());
|
||||
if (bone == null) throw new SerializationException("IK bone not found: " + entry);
|
||||
data.bones.add(bone);
|
||||
for (JsonValue entry = constraintMap.getChild("bones"); entry != null; entry = entry.next) {
|
||||
BoneData bone = skeletonData.findBone(entry.asString());
|
||||
if (bone == null) throw new SerializationException("IK bone not found: " + entry);
|
||||
data.bones.add(bone);
|
||||
}
|
||||
|
||||
String targetName = constraintMap.getString("target");
|
||||
data.target = skeletonData.findBone(targetName);
|
||||
if (data.target == null) throw new SerializationException("IK target bone not found: " + targetName);
|
||||
|
||||
data.uniform = constraintMap.getBoolean("uniform", false);
|
||||
IkConstraintPose setup = data.setup;
|
||||
setup.mix = constraintMap.getFloat("mix", 1);
|
||||
setup.softness = constraintMap.getFloat("softness", 0) * scale;
|
||||
setup.bendDirection = constraintMap.getBoolean("bendPositive", true) ? 1 : -1;
|
||||
setup.compress = constraintMap.getBoolean("compress", false);
|
||||
setup.stretch = constraintMap.getBoolean("stretch", false);
|
||||
|
||||
skeletonData.constraints.add(data);
|
||||
}
|
||||
case "transform" -> {
|
||||
var data = new TransformConstraintData(name);
|
||||
data.skinRequired = skinRequired;
|
||||
|
||||
String targetName = constraintMap.getString("target");
|
||||
data.target = skeletonData.findBone(targetName);
|
||||
if (data.target == null) throw new SerializationException("IK target bone not found: " + targetName);
|
||||
|
||||
data.mix = constraintMap.getFloat("mix", 1);
|
||||
data.softness = constraintMap.getFloat("softness", 0) * scale;
|
||||
data.bendDirection = constraintMap.getBoolean("bendPositive", true) ? 1 : -1;
|
||||
data.compress = constraintMap.getBoolean("compress", false);
|
||||
data.stretch = constraintMap.getBoolean("stretch", false);
|
||||
data.uniform = constraintMap.getBoolean("uniform", false);
|
||||
|
||||
skeletonData.ikConstraints.add(data);
|
||||
}
|
||||
|
||||
// Transform constraints.
|
||||
for (JsonValue constraintMap = root.getChild("transform"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
var data = new TransformConstraintData(constraintMap.getString("name"));
|
||||
data.order = constraintMap.getInt("order", 0);
|
||||
data.skinRequired = constraintMap.getBoolean("skin", false);
|
||||
|
||||
for (JsonValue entry = constraintMap.getChild("bones"); entry != null; entry = entry.next) {
|
||||
BoneData bone = skeletonData.findBone(entry.asString());
|
||||
if (bone == null) throw new SerializationException("Transform constraint bone not found: " + entry);
|
||||
data.bones.add(bone);
|
||||
}
|
||||
|
||||
String sourceName = constraintMap.getString("source");
|
||||
data.source = skeletonData.findBone(sourceName);
|
||||
if (data.source == null) throw new SerializationException("Transform constraint source bone not found: " + sourceName);
|
||||
|
||||
data.localSource = constraintMap.getBoolean("localSource", false);
|
||||
data.localTarget = constraintMap.getBoolean("localTarget", false);
|
||||
data.additive = constraintMap.getBoolean("additive", false);
|
||||
data.clamp = constraintMap.getBoolean("clamp", false);
|
||||
|
||||
boolean rotate = false, x = false, y = false, scaleX = false, scaleY = false, shearY = false;
|
||||
for (JsonValue fromEntry = constraintMap.getChild("properties"); fromEntry != null; fromEntry = fromEntry.next) {
|
||||
float fromScale = 1;
|
||||
FromProperty from;
|
||||
switch (fromEntry.name) {
|
||||
case "rotate" -> from = new FromRotate();
|
||||
case "x" -> {
|
||||
from = new FromX();
|
||||
fromScale = scale;
|
||||
for (JsonValue entry = constraintMap.getChild("bones"); entry != null; entry = entry.next) {
|
||||
BoneData bone = skeletonData.findBone(entry.asString());
|
||||
if (bone == null) throw new SerializationException("Transform constraint bone not found: " + entry);
|
||||
data.bones.add(bone);
|
||||
}
|
||||
case "y" -> {
|
||||
from = new FromY();
|
||||
fromScale = scale;
|
||||
}
|
||||
case "scaleX" -> from = new FromScaleX();
|
||||
case "scaleY" -> from = new FromScaleY();
|
||||
case "shearY" -> from = new FromShearY();
|
||||
default -> throw new SerializationException("Invalid transform constraint from property: " + fromEntry.name);
|
||||
}
|
||||
from.offset = fromEntry.getFloat("offset", 0) * fromScale;
|
||||
for (JsonValue toEntry = fromEntry.getChild("to"); toEntry != null; toEntry = toEntry.next) {
|
||||
float toScale = 1;
|
||||
ToProperty to;
|
||||
switch (toEntry.name) {
|
||||
case "rotate" -> {
|
||||
rotate = true;
|
||||
to = new ToRotate();
|
||||
}
|
||||
|
||||
String sourceName = constraintMap.getString("source");
|
||||
data.source = skeletonData.findBone(sourceName);
|
||||
if (data.source == null)
|
||||
throw new SerializationException("Transform constraint source bone not found: " + sourceName);
|
||||
|
||||
data.localSource = constraintMap.getBoolean("localSource", false);
|
||||
data.localTarget = constraintMap.getBoolean("localTarget", false);
|
||||
data.additive = constraintMap.getBoolean("additive", false);
|
||||
data.clamp = constraintMap.getBoolean("clamp", false);
|
||||
|
||||
boolean rotate = false, x = false, y = false, scaleX = false, scaleY = false, shearY = false;
|
||||
for (JsonValue fromEntry = constraintMap.getChild("properties"); fromEntry != null; fromEntry = fromEntry.next) {
|
||||
float fromScale = 1;
|
||||
FromProperty from;
|
||||
switch (fromEntry.name) {
|
||||
case "rotate" -> from = new FromRotate();
|
||||
case "x" -> {
|
||||
x = true;
|
||||
to = new ToX();
|
||||
toScale = scale;
|
||||
from = new FromX();
|
||||
fromScale = scale;
|
||||
}
|
||||
case "y" -> {
|
||||
y = true;
|
||||
to = new ToY();
|
||||
toScale = scale;
|
||||
from = new FromY();
|
||||
fromScale = scale;
|
||||
}
|
||||
case "scaleX" -> {
|
||||
scaleX = true;
|
||||
to = new ToScaleX();
|
||||
case "scaleX" -> from = new FromScaleX();
|
||||
case "scaleY" -> from = new FromScaleY();
|
||||
case "shearY" -> from = new FromShearY();
|
||||
default -> throw new SerializationException("Invalid transform constraint from property: " + fromEntry.name);
|
||||
}
|
||||
case "scaleY" -> {
|
||||
scaleY = true;
|
||||
to = new ToScaleY();
|
||||
from.offset = fromEntry.getFloat("offset", 0) * fromScale;
|
||||
for (JsonValue toEntry = fromEntry.getChild("to"); toEntry != null; toEntry = toEntry.next) {
|
||||
float toScale = 1;
|
||||
ToProperty to;
|
||||
switch (toEntry.name) {
|
||||
case "rotate" -> {
|
||||
rotate = true;
|
||||
to = new ToRotate();
|
||||
}
|
||||
case "x" -> {
|
||||
x = true;
|
||||
to = new ToX();
|
||||
toScale = scale;
|
||||
}
|
||||
case "y" -> {
|
||||
y = true;
|
||||
to = new ToY();
|
||||
toScale = scale;
|
||||
}
|
||||
case "scaleX" -> {
|
||||
scaleX = true;
|
||||
to = new ToScaleX();
|
||||
}
|
||||
case "scaleY" -> {
|
||||
scaleY = true;
|
||||
to = new ToScaleY();
|
||||
}
|
||||
case "shearY" -> {
|
||||
shearY = true;
|
||||
to = new ToShearY();
|
||||
}
|
||||
default -> throw new SerializationException("Invalid transform constraint to property: " + toEntry.name);
|
||||
}
|
||||
to.offset = toEntry.getFloat("offset", 0) * toScale;
|
||||
to.max = toEntry.getFloat("max", 1) * toScale;
|
||||
to.scale = toEntry.getFloat("scale") * toScale / fromScale;
|
||||
from.to.add(to);
|
||||
}
|
||||
case "shearY" -> {
|
||||
shearY = true;
|
||||
to = new ToShearY();
|
||||
}
|
||||
default -> throw new SerializationException("Invalid transform constraint to property: " + toEntry.name);
|
||||
}
|
||||
to.offset = toEntry.getFloat("offset", 0) * toScale;
|
||||
to.max = toEntry.getFloat("max", 1) * toScale;
|
||||
to.scale = toEntry.getFloat("scale") * toScale / fromScale;
|
||||
from.to.add(to);
|
||||
if (from.to.notEmpty()) data.properties.add(from);
|
||||
}
|
||||
if (from.to.notEmpty()) data.properties.add(from);
|
||||
|
||||
data.offsetRotation = constraintMap.getFloat("rotation", 0);
|
||||
data.offsetX = constraintMap.getFloat("x", 0) * scale;
|
||||
data.offsetY = constraintMap.getFloat("y", 0) * scale;
|
||||
data.offsetScaleX = constraintMap.getFloat("scaleX", 0);
|
||||
data.offsetScaleY = constraintMap.getFloat("scaleY", 0);
|
||||
data.offsetShearY = constraintMap.getFloat("shearY", 0);
|
||||
|
||||
TransformConstraintPose setup = data.setup;
|
||||
if (rotate) setup.mixRotate = constraintMap.getFloat("mixRotate", 1);
|
||||
if (x) setup.mixX = constraintMap.getFloat("mixX", 1);
|
||||
if (y) setup.mixY = constraintMap.getFloat("mixY", setup.mixX);
|
||||
if (scaleX) setup.mixScaleX = constraintMap.getFloat("mixScaleX", 1);
|
||||
if (scaleY) setup.mixScaleY = constraintMap.getFloat("mixScaleY", setup.mixScaleX);
|
||||
if (shearY) setup.mixShearY = constraintMap.getFloat("mixShearY", 1);
|
||||
|
||||
skeletonData.constraints.add(data);
|
||||
}
|
||||
case "path" -> {
|
||||
var data = new PathConstraintData(name);
|
||||
data.skinRequired = skinRequired;
|
||||
|
||||
data.offsetRotation = constraintMap.getFloat("rotation", 0);
|
||||
data.offsetX = constraintMap.getFloat("x", 0) * scale;
|
||||
data.offsetY = constraintMap.getFloat("y", 0) * scale;
|
||||
data.offsetScaleX = constraintMap.getFloat("scaleX", 0);
|
||||
data.offsetScaleY = constraintMap.getFloat("scaleY", 0);
|
||||
data.offsetShearY = constraintMap.getFloat("shearY", 0);
|
||||
for (JsonValue entry = constraintMap.getChild("bones"); entry != null; entry = entry.next) {
|
||||
BoneData bone = skeletonData.findBone(entry.asString());
|
||||
if (bone == null) throw new SerializationException("Path bone not found: " + entry);
|
||||
data.bones.add(bone);
|
||||
}
|
||||
|
||||
if (rotate) data.mixRotate = constraintMap.getFloat("mixRotate", 1);
|
||||
if (x) data.mixX = constraintMap.getFloat("mixX", 1);
|
||||
if (y) data.mixY = constraintMap.getFloat("mixY", data.mixX);
|
||||
if (scaleX) data.mixScaleX = constraintMap.getFloat("mixScaleX", 1);
|
||||
if (scaleY) data.mixScaleY = constraintMap.getFloat("mixScaleY", data.mixScaleX);
|
||||
if (shearY) data.mixShearY = constraintMap.getFloat("mixShearY", 1);
|
||||
String slotName = constraintMap.getString("slot");
|
||||
data.slot = skeletonData.findSlot(slotName);
|
||||
if (data.slot == null) throw new SerializationException("Path slot not found: " + slotName);
|
||||
|
||||
skeletonData.transformConstraints.add(data);
|
||||
}
|
||||
data.positionMode = PositionMode.valueOf(constraintMap.getString("positionMode", "percent"));
|
||||
data.spacingMode = SpacingMode.valueOf(constraintMap.getString("spacingMode", "length"));
|
||||
data.rotateMode = RotateMode.valueOf(constraintMap.getString("rotateMode", "tangent"));
|
||||
data.offsetRotation = constraintMap.getFloat("rotation", 0);
|
||||
PathConstraintPose setup = data.setup;
|
||||
setup.position = constraintMap.getFloat("position", 0);
|
||||
if (data.positionMode == PositionMode.fixed) setup.position *= scale;
|
||||
setup.spacing = constraintMap.getFloat("spacing", 0);
|
||||
if (data.spacingMode == SpacingMode.length || data.spacingMode == SpacingMode.fixed) setup.spacing *= scale;
|
||||
setup.mixRotate = constraintMap.getFloat("mixRotate", 1);
|
||||
setup.mixX = constraintMap.getFloat("mixX", 1);
|
||||
setup.mixY = constraintMap.getFloat("mixY", 1);
|
||||
|
||||
// Path constraints.
|
||||
for (JsonValue constraintMap = root.getChild("path"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
var data = new PathConstraintData(constraintMap.getString("name"));
|
||||
data.order = constraintMap.getInt("order", 0);
|
||||
data.skinRequired = constraintMap.getBoolean("skin", false);
|
||||
|
||||
for (JsonValue entry = constraintMap.getChild("bones"); entry != null; entry = entry.next) {
|
||||
BoneData bone = skeletonData.findBone(entry.asString());
|
||||
if (bone == null) throw new SerializationException("Path bone not found: " + entry);
|
||||
data.bones.add(bone);
|
||||
skeletonData.constraints.add(data);
|
||||
}
|
||||
case "physics" -> {
|
||||
var data = new PhysicsConstraintData(name);
|
||||
data.skinRequired = skinRequired;
|
||||
|
||||
String slotName = constraintMap.getString("slot");
|
||||
data.slot = skeletonData.findSlot(slotName);
|
||||
if (data.slot == null) throw new SerializationException("Path slot not found: " + slotName);
|
||||
String boneName = constraintMap.getString("bone");
|
||||
data.bone = skeletonData.findBone(boneName);
|
||||
if (data.bone == null) throw new SerializationException("Physics bone not found: " + boneName);
|
||||
|
||||
data.positionMode = PositionMode.valueOf(constraintMap.getString("positionMode", "percent"));
|
||||
data.spacingMode = SpacingMode.valueOf(constraintMap.getString("spacingMode", "length"));
|
||||
data.rotateMode = RotateMode.valueOf(constraintMap.getString("rotateMode", "tangent"));
|
||||
data.offsetRotation = constraintMap.getFloat("rotation", 0);
|
||||
data.position = constraintMap.getFloat("position", 0);
|
||||
if (data.positionMode == PositionMode.fixed) data.position *= scale;
|
||||
data.spacing = constraintMap.getFloat("spacing", 0);
|
||||
if (data.spacingMode == SpacingMode.length || data.spacingMode == SpacingMode.fixed) data.spacing *= scale;
|
||||
data.mixRotate = constraintMap.getFloat("mixRotate", 1);
|
||||
data.mixX = constraintMap.getFloat("mixX", 1);
|
||||
data.mixY = constraintMap.getFloat("mixY", 1);
|
||||
data.x = constraintMap.getFloat("x", 0);
|
||||
data.y = constraintMap.getFloat("y", 0);
|
||||
data.rotate = constraintMap.getFloat("rotate", 0);
|
||||
data.scaleX = constraintMap.getFloat("scaleX", 0);
|
||||
data.shearX = constraintMap.getFloat("shearX", 0);
|
||||
data.limit = constraintMap.getFloat("limit", 5000) * scale;
|
||||
data.step = 1f / constraintMap.getInt("fps", 60);
|
||||
PhysicsConstraintPose setup = data.setup;
|
||||
setup.inertia = constraintMap.getFloat("inertia", 0.5f);
|
||||
setup.strength = constraintMap.getFloat("strength", 100);
|
||||
setup.damping = constraintMap.getFloat("damping", 0.85f);
|
||||
setup.massInverse = 1 / constraintMap.getFloat("mass", 1);
|
||||
setup.wind = constraintMap.getFloat("wind", 0);
|
||||
setup.gravity = constraintMap.getFloat("gravity", 0);
|
||||
setup.mix = constraintMap.getFloat("mix", 1);
|
||||
data.inertiaGlobal = constraintMap.getBoolean("inertiaGlobal", false);
|
||||
data.strengthGlobal = constraintMap.getBoolean("strengthGlobal", false);
|
||||
data.dampingGlobal = constraintMap.getBoolean("dampingGlobal", false);
|
||||
data.massGlobal = constraintMap.getBoolean("massGlobal", false);
|
||||
data.windGlobal = constraintMap.getBoolean("windGlobal", false);
|
||||
data.gravityGlobal = constraintMap.getBoolean("gravityGlobal", false);
|
||||
data.mixGlobal = constraintMap.getBoolean("mixGlobal", false);
|
||||
|
||||
skeletonData.pathConstraints.add(data);
|
||||
}
|
||||
|
||||
// Physics constraints.
|
||||
for (JsonValue constraintMap = root.getChild("physics"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
var data = new PhysicsConstraintData(constraintMap.getString("name"));
|
||||
data.order = constraintMap.getInt("order", 0);
|
||||
data.skinRequired = constraintMap.getBoolean("skin", false);
|
||||
|
||||
String boneName = constraintMap.getString("bone");
|
||||
data.bone = skeletonData.findBone(boneName);
|
||||
if (data.bone == null) throw new SerializationException("Physics bone not found: " + boneName);
|
||||
|
||||
data.x = constraintMap.getFloat("x", 0);
|
||||
data.y = constraintMap.getFloat("y", 0);
|
||||
data.rotate = constraintMap.getFloat("rotate", 0);
|
||||
data.scaleX = constraintMap.getFloat("scaleX", 0);
|
||||
data.shearX = constraintMap.getFloat("shearX", 0);
|
||||
data.limit = constraintMap.getFloat("limit", 5000) * scale;
|
||||
data.step = 1f / constraintMap.getInt("fps", 60);
|
||||
data.inertia = constraintMap.getFloat("inertia", 1);
|
||||
data.strength = constraintMap.getFloat("strength", 100);
|
||||
data.damping = constraintMap.getFloat("damping", 1);
|
||||
data.massInverse = 1 / constraintMap.getFloat("mass", 1);
|
||||
data.wind = constraintMap.getFloat("wind", 0);
|
||||
data.gravity = constraintMap.getFloat("gravity", 0);
|
||||
data.mix = constraintMap.getFloat("mix", 1);
|
||||
data.inertiaGlobal = constraintMap.getBoolean("inertiaGlobal", false);
|
||||
data.strengthGlobal = constraintMap.getBoolean("strengthGlobal", false);
|
||||
data.dampingGlobal = constraintMap.getBoolean("dampingGlobal", false);
|
||||
data.massGlobal = constraintMap.getBoolean("massGlobal", false);
|
||||
data.windGlobal = constraintMap.getBoolean("windGlobal", false);
|
||||
data.gravityGlobal = constraintMap.getBoolean("gravityGlobal", false);
|
||||
data.mixGlobal = constraintMap.getBoolean("mixGlobal", false);
|
||||
|
||||
skeletonData.physicsConstraints.add(data);
|
||||
skeletonData.constraints.add(data);
|
||||
}
|
||||
case "slider" -> {
|
||||
var data = new SliderData(name);
|
||||
data.skinRequired = skinRequired;
|
||||
data.loop = constraintMap.getBoolean("loop", false);
|
||||
data.additive = constraintMap.getBoolean("additive", false);
|
||||
data.setup.time = constraintMap.getFloat("time", 0);
|
||||
data.setup.mix = constraintMap.getFloat("mix", 1);
|
||||
skeletonData.constraints.add(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Skins.
|
||||
@ -414,22 +427,22 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
}
|
||||
skin.bones.shrink();
|
||||
for (JsonValue entry = skinMap.getChild("ik"); entry != null; entry = entry.next) {
|
||||
IkConstraintData constraint = skeletonData.findIkConstraint(entry.asString());
|
||||
IkConstraintData constraint = skeletonData.findConstraint(entry.asString(), IkConstraintData.class);
|
||||
if (constraint == null) throw new SerializationException("Skin IK constraint not found: " + entry);
|
||||
skin.constraints.add(constraint);
|
||||
}
|
||||
for (JsonValue entry = skinMap.getChild("transform"); entry != null; entry = entry.next) {
|
||||
TransformConstraintData constraint = skeletonData.findTransformConstraint(entry.asString());
|
||||
TransformConstraintData constraint = skeletonData.findConstraint(entry.asString(), TransformConstraintData.class);
|
||||
if (constraint == null) throw new SerializationException("Skin transform constraint not found: " + entry);
|
||||
skin.constraints.add(constraint);
|
||||
}
|
||||
for (JsonValue entry = skinMap.getChild("path"); entry != null; entry = entry.next) {
|
||||
PathConstraintData constraint = skeletonData.findPathConstraint(entry.asString());
|
||||
PathConstraintData constraint = skeletonData.findConstraint(entry.asString(), PathConstraintData.class);
|
||||
if (constraint == null) throw new SerializationException("Skin path constraint not found: " + entry);
|
||||
skin.constraints.add(constraint);
|
||||
}
|
||||
for (JsonValue entry = skinMap.getChild("physics"); entry != null; entry = entry.next) {
|
||||
PhysicsConstraintData constraint = skeletonData.findPhysicsConstraint(entry.asString());
|
||||
PhysicsConstraintData constraint = skeletonData.findConstraint(entry.asString(), PhysicsConstraintData.class);
|
||||
if (constraint == null) throw new SerializationException("Skin physics constraint not found: " + entry);
|
||||
skin.constraints.add(constraint);
|
||||
}
|
||||
@ -455,10 +468,10 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
}
|
||||
|
||||
// Linked meshes.
|
||||
Object[] items = linkedMeshes.items;
|
||||
LinkedMesh[] items = linkedMeshes.items;
|
||||
for (int i = 0, n = linkedMeshes.size; i < n; i++) {
|
||||
var linkedMesh = (LinkedMesh)items[i];
|
||||
Skin skin = linkedMesh.skin == null ? skeletonData.getDefaultSkin() : skeletonData.findSkin(linkedMesh.skin);
|
||||
LinkedMesh linkedMesh = items[i];
|
||||
Skin skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);
|
||||
if (skin == null) throw new SerializationException("Skin not found: " + linkedMesh.skin);
|
||||
Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
||||
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
|
||||
@ -491,12 +504,22 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
}
|
||||
}
|
||||
|
||||
// Slider animations.
|
||||
for (JsonValue constraintMap = root.getChild("constraints"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
if (constraintMap.getString("type").equals("slider")) {
|
||||
SliderData data = skeletonData.findConstraint(constraintMap.getString("name"), SliderData.class);
|
||||
String animationName = constraintMap.getString("animation");
|
||||
data.animation = skeletonData.findAnimation(animationName);
|
||||
if (data.animation == null) throw new SerializationException("Slider animation not found: " + animationName);
|
||||
}
|
||||
}
|
||||
|
||||
skeletonData.bones.shrink();
|
||||
skeletonData.slots.shrink();
|
||||
skeletonData.skins.shrink();
|
||||
skeletonData.events.shrink();
|
||||
skeletonData.animations.shrink();
|
||||
skeletonData.ikConstraints.shrink();
|
||||
skeletonData.constraints.shrink();
|
||||
return skeletonData;
|
||||
}
|
||||
|
||||
@ -655,7 +678,7 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
|
||||
private void readAnimation (JsonValue map, String name, SkeletonData skeletonData) {
|
||||
float scale = this.scale;
|
||||
var timelines = new Array<Timeline>();
|
||||
var timelines = new Array<Timeline>(true, 16, Timeline[]::new);
|
||||
|
||||
// Slot timelines.
|
||||
for (JsonValue slotMap = map.getChild("slots"); slotMap != null; slotMap = slotMap.next) {
|
||||
@ -743,7 +766,7 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
}
|
||||
timelines.add(timeline);
|
||||
}
|
||||
case "alpha" -> timelines.add(readTimeline(keyMap, new AlphaTimeline(frames, frames, slot.index), 0, 1));
|
||||
case "alpha" -> readTimeline(timelines, keyMap, new AlphaTimeline(frames, frames, slot.index), 0, 1);
|
||||
case "rgba2" -> {
|
||||
var timeline = new RGBA2Timeline(frames, frames * 7, slot.index);
|
||||
float time = keyMap.getFloat("time", 0);
|
||||
@ -858,21 +881,17 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
|
||||
int frames = timelineMap.size;
|
||||
switch (timelineMap.name) {
|
||||
case "rotate" -> timelines.add(readTimeline(keyMap, new RotateTimeline(frames, frames, bone.index), 0, 1));
|
||||
case "rotate" -> readTimeline(timelines, keyMap, new RotateTimeline(frames, frames, bone.index), 0, 1);
|
||||
case "translate" -> //
|
||||
timelines.add(readTimeline(keyMap, new TranslateTimeline(frames, frames << 1, bone.index), "x", "y", 0, scale));
|
||||
case "translatex" -> //
|
||||
timelines.add(readTimeline(keyMap, new TranslateXTimeline(frames, frames, bone.index), 0, scale));
|
||||
case "translatey" -> //
|
||||
timelines.add(readTimeline(keyMap, new TranslateYTimeline(frames, frames, bone.index), 0, scale));
|
||||
case "scale" -> timelines
|
||||
.add(readTimeline(keyMap, new ScaleTimeline(frames, frames << 1, bone.index), "x", "y", 1, 1));
|
||||
case "scalex" -> timelines.add(readTimeline(keyMap, new ScaleXTimeline(frames, frames, bone.index), 1, 1));
|
||||
case "scaley" -> timelines.add(readTimeline(keyMap, new ScaleYTimeline(frames, frames, bone.index), 1, 1));
|
||||
case "shear" -> //
|
||||
timelines.add(readTimeline(keyMap, new ShearTimeline(frames, frames << 1, bone.index), "x", "y", 0, 1));
|
||||
case "shearx" -> timelines.add(readTimeline(keyMap, new ShearXTimeline(frames, frames, bone.index), 0, 1));
|
||||
case "sheary" -> timelines.add(readTimeline(keyMap, new ShearYTimeline(frames, frames, bone.index), 0, 1));
|
||||
readTimeline(timelines, keyMap, new TranslateTimeline(frames, frames << 1, bone.index), "x", "y", 0, scale);
|
||||
case "translatex" -> readTimeline(timelines, keyMap, new TranslateXTimeline(frames, frames, bone.index), 0, scale);
|
||||
case "translatey" -> readTimeline(timelines, keyMap, new TranslateYTimeline(frames, frames, bone.index), 0, scale);
|
||||
case "scale" -> readTimeline(timelines, keyMap, new ScaleTimeline(frames, frames << 1, bone.index), "x", "y", 1, 1);
|
||||
case "scalex" -> readTimeline(timelines, keyMap, new ScaleXTimeline(frames, frames, bone.index), 1, 1);
|
||||
case "scaley" -> readTimeline(timelines, keyMap, new ScaleYTimeline(frames, frames, bone.index), 1, 1);
|
||||
case "shear" -> readTimeline(timelines, keyMap, new ShearTimeline(frames, frames << 1, bone.index), "x", "y", 0, 1);
|
||||
case "shearx" -> readTimeline(timelines, keyMap, new ShearXTimeline(frames, frames, bone.index), 0, 1);
|
||||
case "sheary" -> readTimeline(timelines, keyMap, new ShearYTimeline(frames, frames, bone.index), 0, 1);
|
||||
case "inherit" -> {
|
||||
var timeline = new InheritTimeline(frames, bone.index);
|
||||
for (int frame = 0; keyMap != null; keyMap = keyMap.next, frame++) {
|
||||
@ -891,9 +910,9 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
for (JsonValue timelineMap = map.getChild("ik"); timelineMap != null; timelineMap = timelineMap.next) {
|
||||
JsonValue keyMap = timelineMap.child;
|
||||
if (keyMap == null) continue;
|
||||
IkConstraintData constraint = skeletonData.findIkConstraint(timelineMap.name);
|
||||
IkConstraintData constraint = skeletonData.findConstraint(timelineMap.name, IkConstraintData.class);
|
||||
var timeline = new IkConstraintTimeline(timelineMap.size, timelineMap.size << 1,
|
||||
skeletonData.getIkConstraints().indexOf(constraint, true));
|
||||
skeletonData.constraints.indexOf(constraint, true));
|
||||
float time = keyMap.getFloat("time", 0);
|
||||
float mix = keyMap.getFloat("mix", 1), softness = keyMap.getFloat("softness", 0) * scale;
|
||||
for (int frame = 0, bezier = 0;; frame++) {
|
||||
@ -923,9 +942,9 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
for (JsonValue timelineMap = map.getChild("transform"); timelineMap != null; timelineMap = timelineMap.next) {
|
||||
JsonValue keyMap = timelineMap.child;
|
||||
if (keyMap == null) continue;
|
||||
TransformConstraintData constraint = skeletonData.findTransformConstraint(timelineMap.name);
|
||||
TransformConstraintData constraint = skeletonData.findConstraint(timelineMap.name, TransformConstraintData.class);
|
||||
var timeline = new TransformConstraintTimeline(timelineMap.size, timelineMap.size * 6,
|
||||
skeletonData.getTransformConstraints().indexOf(constraint, true));
|
||||
skeletonData.constraints.indexOf(constraint, true));
|
||||
float time = keyMap.getFloat("time", 0);
|
||||
float mixRotate = keyMap.getFloat("mixRotate", 1);
|
||||
float mixX = keyMap.getFloat("mixX", 1), mixY = keyMap.getFloat("mixY", mixX);
|
||||
@ -966,9 +985,9 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
|
||||
// Path constraint timelines.
|
||||
for (JsonValue constraintMap = map.getChild("path"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
PathConstraintData constraint = skeletonData.findPathConstraint(constraintMap.name);
|
||||
PathConstraintData constraint = skeletonData.findConstraint(constraintMap.name, PathConstraintData.class);
|
||||
if (constraint == null) throw new SerializationException("Path constraint not found: " + constraintMap.name);
|
||||
int index = skeletonData.pathConstraints.indexOf(constraint, true);
|
||||
int index = skeletonData.constraints.indexOf(constraint, true);
|
||||
for (JsonValue timelineMap = constraintMap.child; timelineMap != null; timelineMap = timelineMap.next) {
|
||||
JsonValue keyMap = timelineMap.child;
|
||||
if (keyMap == null) continue;
|
||||
@ -977,12 +996,12 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
switch (timelineMap.name) {
|
||||
case "position" -> {
|
||||
var timeline = new PathConstraintPositionTimeline(frames, frames, index);
|
||||
timelines.add(readTimeline(keyMap, timeline, 0, constraint.positionMode == PositionMode.fixed ? scale : 1));
|
||||
readTimeline(timelines, keyMap, timeline, 0, constraint.positionMode == PositionMode.fixed ? scale : 1);
|
||||
}
|
||||
case "spacing" -> {
|
||||
var timeline = new PathConstraintSpacingTimeline(frames, frames, index);
|
||||
timelines.add(readTimeline(keyMap, timeline, 0,
|
||||
constraint.spacingMode == SpacingMode.length || constraint.spacingMode == SpacingMode.fixed ? scale : 1));
|
||||
readTimeline(timelines, keyMap, timeline, 0,
|
||||
constraint.spacingMode == SpacingMode.length || constraint.spacingMode == SpacingMode.fixed ? scale : 1);
|
||||
}
|
||||
case "mix" -> {
|
||||
var timeline = new PathConstraintMixTimeline(frames, frames * 3, index);
|
||||
@ -1021,9 +1040,9 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
for (JsonValue constraintMap = map.getChild("physics"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
int index = -1;
|
||||
if (!constraintMap.name.isEmpty()) {
|
||||
PhysicsConstraintData constraint = skeletonData.findPhysicsConstraint(constraintMap.name);
|
||||
PhysicsConstraintData constraint = skeletonData.findConstraint(constraintMap.name, PhysicsConstraintData.class);
|
||||
if (constraint == null) throw new SerializationException("Physics constraint not found: " + constraintMap.name);
|
||||
index = skeletonData.physicsConstraints.indexOf(constraint, true);
|
||||
index = skeletonData.constraints.indexOf(constraint, true);
|
||||
}
|
||||
for (JsonValue timelineMap = constraintMap.child; timelineMap != null; timelineMap = timelineMap.next) {
|
||||
JsonValue keyMap = timelineMap.child;
|
||||
@ -1031,6 +1050,7 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
|
||||
int frames = timelineMap.size;
|
||||
CurveTimeline1 timeline;
|
||||
float defaultValue = 0;
|
||||
switch (timelineMap.name) {
|
||||
case "reset" -> {
|
||||
var resetTimeline = new PhysicsConstraintResetTimeline(frames, index);
|
||||
@ -1045,12 +1065,32 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
case "mass" -> timeline = new PhysicsConstraintMassTimeline(frames, frames, index);
|
||||
case "wind" -> timeline = new PhysicsConstraintWindTimeline(frames, frames, index);
|
||||
case "gravity" -> timeline = new PhysicsConstraintGravityTimeline(frames, frames, index);
|
||||
case "mix" -> timeline = new PhysicsConstraintMixTimeline(frames, frames, index);
|
||||
case "mix" -> {
|
||||
defaultValue = 1;
|
||||
timeline = new PhysicsConstraintMixTimeline(frames, frames, index);
|
||||
}
|
||||
default -> {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
timelines.add(readTimeline(keyMap, timeline, 0, 1));
|
||||
readTimeline(timelines, keyMap, timeline, defaultValue, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Slider timelines.
|
||||
for (JsonValue constraintMap = map.getChild("slider"); constraintMap != null; constraintMap = constraintMap.next) {
|
||||
SliderData constraint = skeletonData.findConstraint(constraintMap.name, SliderData.class);
|
||||
if (constraint == null) throw new SerializationException("Slider not found: " + constraintMap.name);
|
||||
int index = skeletonData.constraints.indexOf(constraint, true);
|
||||
for (JsonValue timelineMap = constraintMap.child; timelineMap != null; timelineMap = timelineMap.next) {
|
||||
JsonValue keyMap = timelineMap.child;
|
||||
if (keyMap == null) continue;
|
||||
|
||||
int frames = timelineMap.size;
|
||||
switch (timelineMap.name) {
|
||||
case "time" -> readTimeline(timelines, keyMap, new SliderTimeline(frames, frames, index), 1, 1);
|
||||
case "mix" -> readTimeline(timelines, keyMap, new SliderMixTimeline(frames, frames, index), 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1174,7 +1214,7 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
event.intValue = keyMap.getInt("int", eventData.intValue);
|
||||
event.floatValue = keyMap.getFloat("float", eventData.floatValue);
|
||||
event.stringValue = keyMap.getString("string", eventData.stringValue);
|
||||
if (event.getData().audioPath != null) {
|
||||
if (event.data.audioPath != null) {
|
||||
event.volume = keyMap.getFloat("volume", eventData.volume);
|
||||
event.balance = keyMap.getFloat("balance", eventData.balance);
|
||||
}
|
||||
@ -1185,20 +1225,22 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
|
||||
timelines.shrink();
|
||||
float duration = 0;
|
||||
Object[] items = timelines.items;
|
||||
Timeline[] items = timelines.items;
|
||||
for (int i = 0, n = timelines.size; i < n; i++)
|
||||
duration = Math.max(duration, ((Timeline)items[i]).getDuration());
|
||||
duration = Math.max(duration, items[i].getDuration());
|
||||
skeletonData.animations.add(new Animation(name, timelines, duration));
|
||||
}
|
||||
|
||||
private Timeline readTimeline (JsonValue keyMap, CurveTimeline1 timeline, float defaultValue, float scale) {
|
||||
private void readTimeline (Array<Timeline> timelines, JsonValue keyMap, CurveTimeline1 timeline, float defaultValue,
|
||||
float scale) {
|
||||
float time = keyMap.getFloat("time", 0), value = keyMap.getFloat("value", defaultValue) * scale;
|
||||
for (int frame = 0, bezier = 0;; frame++) {
|
||||
timeline.setFrame(frame, time, value);
|
||||
JsonValue nextMap = keyMap.next;
|
||||
if (nextMap == null) {
|
||||
timeline.shrink(bezier);
|
||||
return timeline;
|
||||
timelines.add(timeline);
|
||||
return;
|
||||
}
|
||||
float time2 = nextMap.getFloat("time", 0);
|
||||
float value2 = nextMap.getFloat("value", defaultValue) * scale;
|
||||
@ -1210,8 +1252,8 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
}
|
||||
}
|
||||
|
||||
private Timeline readTimeline (JsonValue keyMap, CurveTimeline2 timeline, String name1, String name2, float defaultValue,
|
||||
float scale) {
|
||||
private void readTimeline (Array<Timeline> timelines, JsonValue keyMap, BoneTimeline2 timeline, String name1, String name2,
|
||||
float defaultValue, float scale) {
|
||||
float time = keyMap.getFloat("time", 0);
|
||||
float value1 = keyMap.getFloat(name1, defaultValue) * scale, value2 = keyMap.getFloat(name2, defaultValue) * scale;
|
||||
for (int frame = 0, bezier = 0;; frame++) {
|
||||
@ -1219,7 +1261,8 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
JsonValue nextMap = keyMap.next;
|
||||
if (nextMap == null) {
|
||||
timeline.shrink(bezier);
|
||||
return timeline;
|
||||
timelines.add(timeline);
|
||||
return;
|
||||
}
|
||||
float time2 = nextMap.getFloat("time", 0);
|
||||
float nvalue1 = nextMap.getFloat(name1, defaultValue) * scale, nvalue2 = nextMap.getFloat(name2, defaultValue) * scale;
|
||||
|
||||
@ -54,7 +54,7 @@ public class SkeletonRenderer {
|
||||
|
||||
/** Renders the specified skeleton. If the batch is a PolygonSpriteBatch, {@link #draw(PolygonSpriteBatch, Skeleton)} is
|
||||
* called. If the batch is a TwoColorPolygonBatch, {@link #draw(TwoColorPolygonBatch, Skeleton)} is called. Otherwise the
|
||||
* skeleton is rendered without two color tinting and any mesh attachments will throw an exception.
|
||||
* skeleton is rendered without two color tinting and any mesh or clipping attachments will throw an exception.
|
||||
* <p>
|
||||
* This method may change the batch's {@link Batch#setBlendFunctionSeparate(int, int, int, int) blending function}. The
|
||||
* previous blend function is not restored, since that could result in unnecessary flushes, depending on what is rendered
|
||||
@ -76,14 +76,15 @@ public class SkeletonRenderer {
|
||||
float[] vertices = this.vertices.items;
|
||||
Color skeletonColor = skeleton.color;
|
||||
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
|
||||
Object[] drawOrder = skeleton.drawOrder.items;
|
||||
Slot[] drawOrder = skeleton.drawOrder.items;
|
||||
for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) {
|
||||
var slot = (Slot)drawOrder[i];
|
||||
Slot slot = drawOrder[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
SlotPose pose = slot.applied;
|
||||
Attachment attachment = pose.attachment;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
region.computeWorldVertices(slot, vertices, 0, 5);
|
||||
Color color = region.getColor(), slotColor = slot.getColor();
|
||||
Color color = region.getColor(), slotColor = pose.getColor();
|
||||
float alpha = a * slotColor.a * color.a * 255;
|
||||
float multiplier = pmaColors ? alpha : 255;
|
||||
|
||||
@ -141,78 +142,79 @@ public class SkeletonRenderer {
|
||||
short[] triangles = null;
|
||||
Color color = null, skeletonColor = skeleton.color;
|
||||
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
|
||||
Object[] drawOrder = skeleton.drawOrder.items;
|
||||
Slot[] drawOrder = skeleton.drawOrder.items;
|
||||
for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) {
|
||||
var slot = (Slot)drawOrder[i];
|
||||
if (!slot.bone.active) {
|
||||
clipper.clipEnd(slot);
|
||||
continue;
|
||||
}
|
||||
Texture texture = null;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
verticesLength = 20;
|
||||
vertices = this.vertices.items;
|
||||
region.computeWorldVertices(slot, vertices, 0, 5);
|
||||
triangles = quadTriangles;
|
||||
texture = region.getRegion().getTexture();
|
||||
uvs = region.getUVs();
|
||||
color = region.getColor();
|
||||
Slot slot = drawOrder[i];
|
||||
if (slot.bone.active) {
|
||||
SlotPose pose = slot.applied;
|
||||
Attachment attachment = pose.attachment;
|
||||
if (attachment != null) {
|
||||
Texture texture = null;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
verticesLength = 20;
|
||||
vertices = this.vertices.items;
|
||||
region.computeWorldVertices(slot, vertices, 0, 5);
|
||||
triangles = quadTriangles;
|
||||
texture = region.getRegion().getTexture();
|
||||
uvs = region.getUVs();
|
||||
color = region.getColor();
|
||||
|
||||
} else if (attachment instanceof MeshAttachment mesh) {
|
||||
int count = mesh.getWorldVerticesLength();
|
||||
verticesLength = (count >> 1) * 5;
|
||||
vertices = this.vertices.setSize(verticesLength);
|
||||
mesh.computeWorldVertices(slot, 0, count, vertices, 0, 5);
|
||||
triangles = mesh.getTriangles();
|
||||
texture = mesh.getRegion().getTexture();
|
||||
uvs = mesh.getUVs();
|
||||
color = mesh.getColor();
|
||||
} else if (attachment instanceof MeshAttachment mesh) {
|
||||
int count = mesh.getWorldVerticesLength();
|
||||
verticesLength = (count >> 1) * 5;
|
||||
vertices = this.vertices.setSize(verticesLength);
|
||||
mesh.computeWorldVertices(skeleton, slot, 0, count, vertices, 0, 5);
|
||||
triangles = mesh.getTriangles();
|
||||
texture = mesh.getRegion().getTexture();
|
||||
uvs = mesh.getUVs();
|
||||
color = mesh.getColor();
|
||||
|
||||
} else if (attachment instanceof ClippingAttachment clip) {
|
||||
clipper.clipStart(slot, clip);
|
||||
continue;
|
||||
} else if (attachment instanceof ClippingAttachment clip) {
|
||||
clipper.clipEnd(slot);
|
||||
clipper.clipStart(skeleton, slot, clip);
|
||||
continue;
|
||||
|
||||
} else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
|
||||
Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
|
||||
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
|
||||
}
|
||||
|
||||
if (texture != null) {
|
||||
Color slotColor = slot.getColor();
|
||||
float alpha = a * slotColor.a * color.a * 255;
|
||||
float multiplier = pmaColors ? alpha : 255;
|
||||
|
||||
BlendMode slotBlendMode = slot.data.getBlendMode();
|
||||
if (slotBlendMode != blendMode) {
|
||||
if (slotBlendMode == BlendMode.additive && pmaColors) {
|
||||
slotBlendMode = BlendMode.normal;
|
||||
alpha = 0;
|
||||
} else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
|
||||
Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
|
||||
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
|
||||
}
|
||||
blendMode = slotBlendMode;
|
||||
blendMode.apply(batch, pmaBlendModes);
|
||||
}
|
||||
|
||||
float c = NumberUtils.intToFloatColor((int)alpha << 24 //
|
||||
| (int)(b * slotColor.b * color.b * multiplier) << 16 //
|
||||
| (int)(g * slotColor.g * color.g * multiplier) << 8 //
|
||||
| (int)(r * slotColor.r * color.r * multiplier));
|
||||
if (texture != null) {
|
||||
Color slotColor = pose.getColor();
|
||||
float alpha = a * slotColor.a * color.a * 255;
|
||||
float multiplier = pmaColors ? alpha : 255;
|
||||
|
||||
if (clipper.isClipping() && clipper.clipTriangles(vertices, triangles, triangles.length, uvs, c, 0, false, 5)) {
|
||||
FloatArray clippedVertices = clipper.getClippedVertices();
|
||||
ShortArray clippedTriangles = clipper.getClippedTriangles();
|
||||
batch.draw(texture, clippedVertices.items, 0, clippedVertices.size, clippedTriangles.items, 0,
|
||||
clippedTriangles.size);
|
||||
} else {
|
||||
for (int v = 2, u = 0; v < verticesLength; v += 5, u += 2) {
|
||||
vertices[v] = c;
|
||||
vertices[v + 1] = uvs[u];
|
||||
vertices[v + 2] = uvs[u + 1];
|
||||
BlendMode slotBlendMode = slot.data.getBlendMode();
|
||||
if (slotBlendMode != blendMode) {
|
||||
if (slotBlendMode == BlendMode.additive && pmaColors) {
|
||||
slotBlendMode = BlendMode.normal;
|
||||
alpha = 0;
|
||||
}
|
||||
blendMode = slotBlendMode;
|
||||
blendMode.apply(batch, pmaBlendModes);
|
||||
}
|
||||
|
||||
float c = NumberUtils.intToFloatColor((int)alpha << 24 //
|
||||
| (int)(b * slotColor.b * color.b * multiplier) << 16 //
|
||||
| (int)(g * slotColor.g * color.g * multiplier) << 8 //
|
||||
| (int)(r * slotColor.r * color.r * multiplier));
|
||||
|
||||
if (clipper.isClipping() && clipper.clipTriangles(vertices, triangles, triangles.length, uvs, c, 0, false, 5)) {
|
||||
FloatArray clippedVertices = clipper.getClippedVertices();
|
||||
ShortArray clippedTriangles = clipper.getClippedTriangles();
|
||||
batch.draw(texture, clippedVertices.items, 0, clippedVertices.size, clippedTriangles.items, 0,
|
||||
clippedTriangles.size);
|
||||
} else {
|
||||
for (int v = 2, u = 0; v < verticesLength; v += 5, u += 2) {
|
||||
vertices[v] = c;
|
||||
vertices[v + 1] = uvs[u];
|
||||
vertices[v + 2] = uvs[u + 1];
|
||||
}
|
||||
batch.draw(texture, vertices, 0, verticesLength, triangles, 0, triangles.length);
|
||||
}
|
||||
}
|
||||
batch.draw(texture, vertices, 0, verticesLength, triangles, 0, triangles.length);
|
||||
}
|
||||
}
|
||||
|
||||
clipper.clipEnd(slot);
|
||||
}
|
||||
clipper.clipEnd();
|
||||
@ -235,87 +237,89 @@ public class SkeletonRenderer {
|
||||
short[] triangles = null;
|
||||
Color color = null, skeletonColor = skeleton.color;
|
||||
float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a;
|
||||
Object[] drawOrder = skeleton.drawOrder.items;
|
||||
Slot[] drawOrder = skeleton.drawOrder.items;
|
||||
for (int i = 0, n = skeleton.drawOrder.size; i < n; i++) {
|
||||
var slot = (Slot)drawOrder[i];
|
||||
if (!slot.bone.active) {
|
||||
clipper.clipEnd(slot);
|
||||
continue;
|
||||
}
|
||||
Texture texture = null;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
verticesLength = 24;
|
||||
vertices = this.vertices.items;
|
||||
region.computeWorldVertices(slot, vertices, 0, 6);
|
||||
triangles = quadTriangles;
|
||||
texture = region.getRegion().getTexture();
|
||||
uvs = region.getUVs();
|
||||
color = region.getColor();
|
||||
Slot slot = drawOrder[i];
|
||||
if (slot.bone.active) {
|
||||
SlotPose pose = slot.applied;
|
||||
Attachment attachment = pose.attachment;
|
||||
if (attachment != null) {
|
||||
Texture texture = null;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
verticesLength = 24;
|
||||
vertices = this.vertices.items;
|
||||
region.computeWorldVertices(slot, vertices, 0, 6);
|
||||
triangles = quadTriangles;
|
||||
texture = region.getRegion().getTexture();
|
||||
uvs = region.getUVs();
|
||||
color = region.getColor();
|
||||
|
||||
} else if (attachment instanceof MeshAttachment mesh) {
|
||||
int count = mesh.getWorldVerticesLength();
|
||||
verticesLength = count * 3;
|
||||
vertices = this.vertices.setSize(verticesLength);
|
||||
mesh.computeWorldVertices(slot, 0, count, vertices, 0, 6);
|
||||
triangles = mesh.getTriangles();
|
||||
texture = mesh.getRegion().getTexture();
|
||||
uvs = mesh.getUVs();
|
||||
color = mesh.getColor();
|
||||
} else if (attachment instanceof MeshAttachment mesh) {
|
||||
int count = mesh.getWorldVerticesLength();
|
||||
verticesLength = count * 3;
|
||||
vertices = this.vertices.setSize(verticesLength);
|
||||
mesh.computeWorldVertices(skeleton, slot, 0, count, vertices, 0, 6);
|
||||
triangles = mesh.getTriangles();
|
||||
texture = mesh.getRegion().getTexture();
|
||||
uvs = mesh.getUVs();
|
||||
color = mesh.getColor();
|
||||
|
||||
} else if (attachment instanceof ClippingAttachment clip) {
|
||||
clipper.clipStart(slot, clip);
|
||||
continue;
|
||||
} else if (attachment instanceof ClippingAttachment clip) {
|
||||
clipper.clipEnd(slot);
|
||||
clipper.clipStart(skeleton, slot, clip);
|
||||
continue;
|
||||
|
||||
} else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
|
||||
Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
|
||||
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
|
||||
}
|
||||
|
||||
if (texture != null) {
|
||||
Color lightColor = slot.getColor();
|
||||
float alpha = a * lightColor.a * color.a * 255;
|
||||
float multiplier = pmaColors ? alpha : 255;
|
||||
|
||||
BlendMode slotBlendMode = slot.data.getBlendMode();
|
||||
if (slotBlendMode != blendMode) {
|
||||
if (slotBlendMode == BlendMode.additive && pmaColors) {
|
||||
slotBlendMode = BlendMode.normal;
|
||||
alpha = 0;
|
||||
} else if (attachment instanceof SkeletonAttachment skeletonAttachment) {
|
||||
Skeleton attachmentSkeleton = skeletonAttachment.getSkeleton();
|
||||
if (attachmentSkeleton != null) draw(batch, attachmentSkeleton);
|
||||
}
|
||||
blendMode = slotBlendMode;
|
||||
blendMode.apply(batch, pmaBlendModes);
|
||||
}
|
||||
|
||||
float red = r * color.r * multiplier;
|
||||
float green = g * color.g * multiplier;
|
||||
float blue = b * color.b * multiplier;
|
||||
float light = NumberUtils.intToFloatColor((int)alpha << 24 //
|
||||
| (int)(blue * lightColor.b) << 16 //
|
||||
| (int)(green * lightColor.g) << 8 //
|
||||
| (int)(red * lightColor.r));
|
||||
Color darkColor = slot.getDarkColor();
|
||||
float dark = darkColor == null ? 0
|
||||
: NumberUtils.intToFloatColor((int)(blue * darkColor.b) << 16 //
|
||||
| (int)(green * darkColor.g) << 8 //
|
||||
| (int)(red * darkColor.r));
|
||||
if (texture != null) {
|
||||
Color lightColor = pose.getColor();
|
||||
float alpha = a * lightColor.a * color.a * 255;
|
||||
float multiplier = pmaColors ? alpha : 255;
|
||||
|
||||
if (clipper.isClipping() && clipper.clipTriangles(vertices, triangles, triangles.length, uvs, light, dark, true, 6)) {
|
||||
FloatArray clippedVertices = clipper.getClippedVertices();
|
||||
ShortArray clippedTriangles = clipper.getClippedTriangles();
|
||||
batch.drawTwoColor(texture, clippedVertices.items, 0, clippedVertices.size, clippedTriangles.items, 0,
|
||||
clippedTriangles.size);
|
||||
} else {
|
||||
for (int v = 2, u = 0; v < verticesLength; v += 6, u += 2) {
|
||||
vertices[v] = light;
|
||||
vertices[v + 1] = dark;
|
||||
vertices[v + 2] = uvs[u];
|
||||
vertices[v + 3] = uvs[u + 1];
|
||||
BlendMode slotBlendMode = slot.data.getBlendMode();
|
||||
if (slotBlendMode != blendMode) {
|
||||
if (slotBlendMode == BlendMode.additive && pmaColors) {
|
||||
slotBlendMode = BlendMode.normal;
|
||||
alpha = 0;
|
||||
}
|
||||
blendMode = slotBlendMode;
|
||||
blendMode.apply(batch, pmaBlendModes);
|
||||
}
|
||||
|
||||
float red = r * color.r * multiplier;
|
||||
float green = g * color.g * multiplier;
|
||||
float blue = b * color.b * multiplier;
|
||||
float light = NumberUtils.intToFloatColor((int)alpha << 24 //
|
||||
| (int)(blue * lightColor.b) << 16 //
|
||||
| (int)(green * lightColor.g) << 8 //
|
||||
| (int)(red * lightColor.r));
|
||||
Color darkColor = pose.getDarkColor();
|
||||
float dark = darkColor == null ? 0
|
||||
: NumberUtils.intToFloatColor((int)(blue * darkColor.b) << 16 //
|
||||
| (int)(green * darkColor.g) << 8 //
|
||||
| (int)(red * darkColor.r));
|
||||
|
||||
if (clipper.isClipping()
|
||||
&& clipper.clipTriangles(vertices, triangles, triangles.length, uvs, light, dark, true, 6)) {
|
||||
FloatArray clippedVertices = clipper.getClippedVertices();
|
||||
ShortArray clippedTriangles = clipper.getClippedTriangles();
|
||||
batch.drawTwoColor(texture, clippedVertices.items, 0, clippedVertices.size, clippedTriangles.items, 0,
|
||||
clippedTriangles.size);
|
||||
} else {
|
||||
for (int v = 2, u = 0; v < verticesLength; v += 6, u += 2) {
|
||||
vertices[v] = light;
|
||||
vertices[v + 1] = dark;
|
||||
vertices[v + 2] = uvs[u];
|
||||
vertices[v + 3] = uvs[u + 1];
|
||||
}
|
||||
batch.drawTwoColor(texture, vertices, 0, verticesLength, triangles, 0, triangles.length);
|
||||
}
|
||||
}
|
||||
batch.drawTwoColor(texture, vertices, 0, verticesLength, triangles, 0, triangles.length);
|
||||
}
|
||||
}
|
||||
|
||||
clipper.clipEnd(slot);
|
||||
}
|
||||
clipper.clipEnd();
|
||||
|
||||
@ -38,7 +38,6 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.FloatArray;
|
||||
|
||||
import com.esotericsoftware.spine.attachments.Attachment;
|
||||
import com.esotericsoftware.spine.attachments.BoundingBoxAttachment;
|
||||
import com.esotericsoftware.spine.attachments.ClippingAttachment;
|
||||
import com.esotericsoftware.spine.attachments.MeshAttachment;
|
||||
@ -80,14 +79,15 @@ public class SkeletonRendererDebug {
|
||||
Gdx.gl.glBlendFunc(srcFunc, GL20.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
ShapeRenderer shapes = this.shapes;
|
||||
Array<Bone> bones = skeleton.getBones();
|
||||
Array<Slot> slots = skeleton.getSlots();
|
||||
Bone[] bones = skeleton.bones.items;
|
||||
Slot[] slots = skeleton.slots.items;
|
||||
int boneCount = skeleton.bones.size, slotCount = skeleton.slots.size;
|
||||
|
||||
shapes.begin(ShapeType.Filled);
|
||||
|
||||
if (drawBones) {
|
||||
for (int i = 0, n = bones.size; i < n; i++) {
|
||||
Bone bone = bones.get(i);
|
||||
for (int i = 0; i < boneCount; i++) {
|
||||
Bone bone = bones[i];
|
||||
if (bone.parent == null || !bone.active) continue;
|
||||
float length = bone.data.length, width = boneWidth;
|
||||
if (length == 0) {
|
||||
@ -96,22 +96,22 @@ public class SkeletonRendererDebug {
|
||||
shapes.setColor(boneOriginColor);
|
||||
} else
|
||||
shapes.setColor(boneLineColor);
|
||||
float x = length * bone.a + bone.worldX;
|
||||
float y = length * bone.c + bone.worldY;
|
||||
shapes.rectLine(bone.worldX, bone.worldY, x, y, width * scale);
|
||||
BonePose applied = bone.applied;
|
||||
float x = length * applied.a + applied.worldX;
|
||||
float y = length * applied.c + applied.worldY;
|
||||
shapes.rectLine(applied.worldX, applied.worldY, x, y, width * scale);
|
||||
}
|
||||
shapes.x(skeleton.getX(), skeleton.getY(), 4 * scale);
|
||||
shapes.x(skeleton.x, skeleton.y, 4 * scale);
|
||||
}
|
||||
|
||||
if (drawPoints) {
|
||||
shapes.setColor(boneOriginColor);
|
||||
for (int i = 0, n = slots.size; i < n; i++) {
|
||||
Slot slot = slots.get(i);
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (!(attachment instanceof PointAttachment point)) continue;
|
||||
point.computeWorldPosition(slot.getBone(), temp1);
|
||||
temp2.set(8, 0).rotate(point.computeWorldRotation(slot.getBone()));
|
||||
if (!(slot.applied.attachment instanceof PointAttachment point)) continue;
|
||||
point.computeWorldPosition(slot.bone.applied, temp1);
|
||||
temp2.set(8, 0).rotate(point.computeWorldRotation(slot.bone.applied));
|
||||
shapes.rectLine(temp1, temp2, boneWidth / 2 * scale);
|
||||
}
|
||||
}
|
||||
@ -121,11 +121,10 @@ public class SkeletonRendererDebug {
|
||||
|
||||
if (drawRegionAttachments) {
|
||||
shapes.setColor(attachmentLineColor);
|
||||
for (int i = 0, n = slots.size; i < n; i++) {
|
||||
Slot slot = slots.get(i);
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (attachment instanceof RegionAttachment region) {
|
||||
if (slot.pose.attachment instanceof RegionAttachment region) {
|
||||
float[] vertices = this.vertices.items;
|
||||
region.computeWorldVertices(slot, vertices, 0, 2);
|
||||
shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);
|
||||
@ -137,13 +136,12 @@ public class SkeletonRendererDebug {
|
||||
}
|
||||
|
||||
if (drawMeshHull || drawMeshTriangles) {
|
||||
for (int i = 0, n = slots.size; i < n; i++) {
|
||||
Slot slot = slots.get(i);
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (!(attachment instanceof MeshAttachment mesh)) continue;
|
||||
if (!(slot.pose.attachment instanceof MeshAttachment mesh)) continue;
|
||||
float[] vertices = this.vertices.setSize(mesh.getWorldVerticesLength());
|
||||
mesh.computeWorldVertices(slot, 0, mesh.getWorldVerticesLength(), vertices, 0, 2);
|
||||
mesh.computeWorldVertices(skeleton, slot, 0, mesh.getWorldVerticesLength(), vertices, 0, 2);
|
||||
short[] triangles = mesh.getTriangles();
|
||||
int hullLength = mesh.getHullLength();
|
||||
if (drawMeshTriangles) {
|
||||
@ -177,21 +175,20 @@ public class SkeletonRendererDebug {
|
||||
Array<FloatArray> polygons = bounds.getPolygons();
|
||||
Array<BoundingBoxAttachment> boxes = bounds.getBoundingBoxes();
|
||||
for (int i = 0, n = polygons.size; i < n; i++) {
|
||||
FloatArray polygon = polygons.get(i);
|
||||
shapes.setColor(boxes.get(i).getColor());
|
||||
FloatArray polygon = polygons.items[i];
|
||||
shapes.setColor(boxes.items[i].getColor());
|
||||
shapes.polygon(polygon.items, 0, polygon.size);
|
||||
}
|
||||
}
|
||||
|
||||
if (drawClipping) {
|
||||
for (int i = 0, n = slots.size; i < n; i++) {
|
||||
Slot slot = slots.get(i);
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (!(attachment instanceof ClippingAttachment clip)) continue;
|
||||
if (!(slot.pose.attachment instanceof ClippingAttachment clip)) continue;
|
||||
int nn = clip.getWorldVerticesLength();
|
||||
float[] vertices = this.vertices.setSize(nn);
|
||||
clip.computeWorldVertices(slot, 0, nn, vertices, 0, 2);
|
||||
clip.computeWorldVertices(skeleton, slot, 0, nn, vertices, 0, 2);
|
||||
shapes.setColor(clip.getColor());
|
||||
for (int ii = 2; ii < nn; ii += 2)
|
||||
shapes.line(vertices[ii - 2], vertices[ii - 1], vertices[ii], vertices[ii + 1]);
|
||||
@ -200,14 +197,13 @@ public class SkeletonRendererDebug {
|
||||
}
|
||||
|
||||
if (drawPaths) {
|
||||
for (int i = 0, n = slots.size; i < n; i++) {
|
||||
Slot slot = slots.get(i);
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (!(attachment instanceof PathAttachment path)) continue;
|
||||
if (!(slot.pose.attachment instanceof PathAttachment path)) continue;
|
||||
int nn = path.getWorldVerticesLength();
|
||||
float[] vertices = this.vertices.setSize(nn);
|
||||
path.computeWorldVertices(slot, 0, nn, vertices, 0, 2);
|
||||
path.computeWorldVertices(skeleton, slot, 0, nn, vertices, 0, 2);
|
||||
Color color = path.getColor();
|
||||
float x1 = vertices[2], y1 = vertices[3], x2 = 0, y2 = 0;
|
||||
if (path.getClosed()) {
|
||||
@ -241,27 +237,25 @@ public class SkeletonRendererDebug {
|
||||
|
||||
if (drawBones) {
|
||||
shapes.setColor(boneOriginColor);
|
||||
for (int i = 0, n = bones.size; i < n; i++) {
|
||||
Bone bone = bones.get(i);
|
||||
for (int i = 0; i < boneCount; i++) {
|
||||
Bone bone = bones[i];
|
||||
if (!bone.active) continue;
|
||||
shapes.circle(bone.worldX, bone.worldY, 3 * scale, 8);
|
||||
shapes.circle(bone.applied.worldX, bone.applied.worldY, 3 * scale, 8);
|
||||
}
|
||||
}
|
||||
|
||||
if (drawPoints) {
|
||||
shapes.setColor(boneOriginColor);
|
||||
for (int i = 0, n = slots.size; i < n; i++) {
|
||||
Slot slot = slots.get(i);
|
||||
for (int i = 0; i < slotCount; i++) {
|
||||
Slot slot = slots[i];
|
||||
if (!slot.bone.active) continue;
|
||||
Attachment attachment = slot.attachment;
|
||||
if (!(attachment instanceof PointAttachment point)) continue;
|
||||
point.computeWorldPosition(slot.getBone(), temp1);
|
||||
if (!(slot.pose.attachment instanceof PointAttachment point)) continue;
|
||||
point.computeWorldPosition(slot.bone.applied, temp1);
|
||||
shapes.circle(temp1.x, temp1.y, 3 * scale, 8);
|
||||
}
|
||||
}
|
||||
|
||||
shapes.end();
|
||||
|
||||
}
|
||||
|
||||
public ShapeRenderer getShapeRenderer () {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user