Merge branch '3.8' into 3.9-beta

This commit is contained in:
badlogic 2019-11-19 15:28:47 +01:00
commit 93bc9dcf4e
7 changed files with 104 additions and 10 deletions

30
.github/workflows/settings.xml vendored Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.SONATYPE_USER}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>${env.SONATYPE_USER}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>gpg</id>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.passphrase>${env.GPG_PASSWORD}</gpg.passphrase>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>gpg</activeProfile>
</activeProfiles>
</settings>

24
.github/workflows/spine-libgdx.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Build spine-libgdx
on:
push:
paths:
- 'spine-libgdx/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.7
uses: actions/setup-java@v1
with:
java-version: 1.7
- name: Build spine-libgdx
working-directory: spine-libgdx/spine-libgdx
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn -s ../../.github/workflows/settings.xml clean deploy

22
.github/workflows/spine-ts.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Build spine-ts
on:
push:
paths:
- 'spine-ts/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup TypeScript
uses: actions/setup-node@v1
with:
node-version: '13.x'
- run: npm install -g typescript
- name: Build spine-ts
working-directory: spine-ts
env:
TS_UPDATE_URL: ${{secrets.TS_UPDATE_URL}}
run: ./build.sh

View File

@ -1,4 +1,4 @@
# spine-ts
# spine-ts
The spine-ts runtime provides functionality to load and manipulate [Spine](http://esotericsoftware.com) skeletal animation data using TypeScript and JavaScript. spine-ts is split
up into multiple modules:

View File

@ -1,5 +1,14 @@
#!/bin/sh
set -e -x
set -e
if [ -z "$GITHUB_REF" ];
then
BRANCH=$(git symbolic-ref --short -q HEAD)
else
BRANCH=${GITHUB_REF#refs/heads/}
fi
echo "Building spine-ts $BRANCH artifacts"
tsc -p tsconfig.json
tsc -p tsconfig.core.json
tsc -p tsconfig.webgl.json
@ -7,3 +16,12 @@ tsc -p tsconfig.canvas.json
tsc -p tsconfig.threejs.json
tsc -p tsconfig.player.json
ls build/*.js build/*.ts | awk '{print "unexpand -t 4 ", $0, " > /tmp/e; mv /tmp/e ", $0}' | sh
if ! [ -z "$TS_UPDATE_URL" ] && ! [ -z "$BRANCH" ];
then
echo "Deploying spine-ts $BRANCH artifacts"
zip -j spine-ts.zip build/* player/css/spine-player.css player/example/external/*
curl -F "file=@spine-ts.zip" "$TS_UPDATE_URL$BRANCH"
else
echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set."
fi

View File

@ -40,8 +40,8 @@ void UTrackEntry::SetTrackEntry(TrackEntry* trackEntry) {
void callback(AnimationState* state, spine::EventType type, TrackEntry* entry, Event* event) {
USpineSkeletonAnimationComponent* component = (USpineSkeletonAnimationComponent*)state->getRendererObject();
if (entry->getRendererObject()) {
if (entry->getRendererObject()) {
UTrackEntry* uEntry = (UTrackEntry*)entry->getRendererObject();
if (type == EventType_Start) {
component->AnimationStart.Broadcast(uEntry);
@ -70,7 +70,7 @@ void callback(AnimationState* state, spine::EventType type, TrackEntry* entry, E
uEntry->SetTrackEntry(nullptr);
component->GCTrackEntry(uEntry);
}
}
}
}
USpineSkeletonAnimationComponent::USpineSkeletonAnimationComponent () {
@ -154,7 +154,7 @@ void USpineSkeletonAnimationComponent::CheckState () {
}
}
void USpineSkeletonAnimationComponent::DisposeState () {
void USpineSkeletonAnimationComponent::DisposeState () {
if (state) {
delete state;
state = nullptr;
@ -225,14 +225,14 @@ UTrackEntry* USpineSkeletonAnimationComponent::SetAnimation (int trackIndex, FSt
trackEntries.Add(uEntry);
return uEntry;
} else return NewObject<UTrackEntry>();
}
UTrackEntry* USpineSkeletonAnimationComponent::AddAnimation (int trackIndex, FString animationName, bool loop, float delay) {
CheckState();
if (state && skeleton->getData()->findAnimation(TCHAR_TO_UTF8(*animationName))) {
state->disableQueue();
TrackEntry* entry = state->addAnimation(trackIndex, TCHAR_TO_UTF8(*animationName), loop, delay);
TrackEntry* entry = state->addAnimation(trackIndex, TCHAR_TO_UTF8(*animationName), loop, delay);
state->enableQueue();
UTrackEntry* uEntry = NewObject<UTrackEntry>();
uEntry->SetTrackEntry(entry);
@ -265,7 +265,7 @@ UTrackEntry* USpineSkeletonAnimationComponent::AddEmptyAnimation (int trackIndex
UTrackEntry* USpineSkeletonAnimationComponent::GetCurrent (int trackIndex) {
CheckState();
if (state) {
if (state && state->getCurrent(trackIndex)) {
TrackEntry* entry = state->getCurrent(trackIndex);
if (entry->getRendererObject()) {
return (UTrackEntry*)entry->getRendererObject();

View File

@ -436,7 +436,7 @@ UTrackEntry* USpineWidget::AddEmptyAnimation(int trackIndex, float mixDuration,
UTrackEntry* USpineWidget::GetCurrent(int trackIndex) {
CheckState();
if (state) {
if (state && state->getCurrent(trackIndex)) {
TrackEntry* entry = state->getCurrent(trackIndex);
if (entry->getRendererObject()) {
return (UTrackEntry*)entry->getRendererObject();