Nathan Sweet e4f344f22b [libgdx] Update for latest libgdx, gdx-lwjgl3-glfw-awt-macos removal. 11 tháng trước cách đây
..
gradle eeb2ae6910 [libgdx] Switch to Gradle 8.4, publish to Maven Central via Maven. 1 năm trước cách đây
spine-libgdx d769c1a930 [libgdx] Fixed noRotationOrReflection with skeleton scale. 11 tháng trước cách đây
spine-libgdx-tests 4214e8a8e6 [libgdx] Added an example for SkeletonActor. 1 năm trước cách đây
spine-skeletonviewer e4f344f22b [libgdx] Update for latest libgdx, gdx-lwjgl3-glfw-awt-macos removal. 11 tháng trước cách đây
LICENSE 7f7e5f0fec Updated license headers and LICENSE files. 6 năm trước cách đây
README.md 67e937e798 [libgdx] Update README.md with better info on versioning. 1 năm trước cách đây
build.gradle 6fa31a2903 [libgdx] Remove dependency on gdx-lwjgl3-glfw-awt-macos in SkeletonViewer, use LWJGL glfw_async instead 11 tháng trước cách đây
gradlew 90537ca2d9 [libgdx] Gradleify all projects, switch to LWJGL3 3 năm trước cách đây
gradlew.bat 90537ca2d9 [libgdx] Gradleify all projects, switch to LWJGL3 3 năm trước cách đây
publish.sh dffc4484f1 [libgdx] Ensure compatibility with Java 7. 11 tháng trước cách đây
publishing.gradle b6139109e6 [libgdx] New snapshot release 4.2.8 11 tháng trước cách đây
settings.gradle ceb9ae13f4 Load Atlas/Skeleton from assets + Add basic classes (#2570) 1 năm trước cách đây

README.md

spine-libgdx

The spine-libgdx runtime provides functionality to load, manipulate and render Spine skeletal animation data using libgdx.

Licensing

You are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.

You can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own Spine license. Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.

In order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a Spine license at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.

For the official legal terms governing the Spine Runtimes, please read the Spine Runtimes License Agreement and Section 2 of the Spine Editor License Agreement.

Spine version

spine-libgdx works with data exported from Spine 4.2.xx.

spine-libgdx supports all Spine features and is the reference runtime implementation.

Setup

The simplest way to add spine-libgdx to your libGDX project is to copy the contents of the spine-libgdx/src folder to your project's source folder. However, this is not the recommended approach. Generally, you want to use spine-libgdx by depending on it via Maven or Gradle.

Maven & Gradle

The spine-libgdx runtime is released to Maven Central through SonaType. We also deploy snapshot builds on every commit to the repository via GitHub Actions.

Versions

You can find the latest version for release builds here.

You can find the latest SNAPSHOT version in this listing in the SonaType snapshot repository (https://oss.sonatype.org/content/repositories/snapshots/com/esotericsoftware/spine/spine-libgdx/).

You can also build and install spine-libgdx into your local Maven repository:

cd spine-libgdx/spine-libgdx
mvn install

The version number is composed of the corresponding editor major.minor version, and runtime update version for the runtime. E.g. 4.1.10 means editor version 4.1, runtime update version 10. All runtime versions are compatible with the exports from the correspongind major.minor editor version.

Maven

To add the spine-libgdx runtime to your Maven project, add this dependency:

<dependency>
	<groupId>com.esotericsoftware.spine</groupId>
	<artifactId>spine-libgdx</artifactId>
	<version>4.2.0</version>
</dependency>

For SNAPSHOT versions, add the SonaType Snapshot repository to your pom.xml:

<repositories>
	<repository>
		<id>nightlies</id>
		<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
	</repository>
</repositories>

Gradle

To add the spine-libgdx runtime to your libGDX Gradle project, add the following dependencies to the core project in the build.gradle file at the root of your libGDX project:

project(":core") {
    apply plugin: "java"

    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"

        compile "com.esotericsoftware.spine:spine-libgdx:4.2.+"
    }
}

Note that 4.2.+ will pull in the latest -SNAPSHOT release. Our snapshot releases are considered stable and based on the latest commit to the Spine Runtimes branch corresponding to the latest Spine Editor release version.

Running the examples

Clone this repository and load the spine-libgdx/build.gradle file with IntelliJ IDEA or Eclipse. Alterantively, you can run ./gradlew eclipse on the command line to generate Eclipse projects without having to use the Gradle build.

The spine-libgdx-tests project has various examples you can inspect and run.

Building SkeletonViewer

To build SkeletonViewer, run:

./gradlew spine-libgdx:jar spine-skeletonviewer.jar

You can then find an uber-jar of SkeletonViewer in spine-skeletonviewer/build/libs/spine-skeletonviewer.jar. You can run it via java -jar spine-skeletonviewer.jar or double clicking it in the file explorer.