You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: spine-c/README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
14
14
15
15
## Spine version
16
16
17
-
spine-c works with data exported from Spine 4.1.xx.
17
+
spine-c works with data exported from Spine 4.2.xx.
18
18
19
19
spine-c supports all Spine features.
20
20
@@ -26,6 +26,7 @@ spine-c supports all Spine features.
26
26
If `SPINE_SHORT_NAMES` is defined, the `sp` prefix for all structs and functions is optional. Only use this if the spine-c names won't cause a conflict.
27
27
28
28
## Usage
29
+
29
30
### [Please see the spine-c guide for full documentation](http://esotericsoftware.com/spine-c)
Copy file name to clipboardexpand all lines: spine-cocos2dx/README.md
+20-17
Original file line number
Diff line number
Diff line change
@@ -14,40 +14,40 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
14
14
15
15
## Spine version
16
16
17
-
spine-cocos2dx works with data exported from Spine 4.1.xx.
17
+
spine-cocos2dx works with data exported from Spine 4.2.xx.
18
18
19
19
spine-cocos2dx supports all Spine features.
20
20
21
21
## Setup
22
22
23
-
The setup for cocos2d-x differs from most other Spine Runtimes because the cocos2d-x distribution includes a copy of the Spine Runtime files. This is not ideal because these files may be old and fail to work with the latest Spine editor. Also it means if cocos2d-x is updated, you may get newer Spine Runtime files which can break your application if you are not using the latest Spine editor. For these reasons, we have requested cocos2d-x to cease distributing the Spine Runtime files, but they continue to do so. The following instructions allow you to use the official Spine cocos2d-x runtime with your cocos2d-x project.
23
+
The setup for cocos2d-x differs from most other Spine Runtimes because the cocos2d-x distribution includes a copy of the Spine Runtime files. This is not ideal because these files may be old and fail to work with the latest Spine editor. Also it means if cocos2d-x is updated, you may get newer Spine Runtime files which can break your application if you are not using the latest Spine editor. For these reasons, we have requested cocos2d-x to cease distributing the Spine Runtime files, but they continue to do so. The following instructions allow you to use the official Spine cocos2d-x runtime with your cocos2d-x project.
24
24
25
25
spine-cocos2dx works with both Cocos2d-x v3 and v4. The setup process is identical in both cases. The preferred way to integrate spine-cocos2dx into your Cocos2d-x project is to use the [Cocos2d-x CMake build system].
26
26
27
-
28
27
1.[Create a new C++ cocos2d-x project](https://docs.cocos2d-x.org/cocos2d-x/v4/en/editors_and_tools/cocosCLTool.html). Let's assume you created your project in a folder `/path/to/MyGame/` somewhere on your disk.
29
28
2. Download the Spine Runtimes source using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above. Let's assume you cloned the Spine Runtimes to a folder `/path/to/spine-runtimes/` somewhere on your disk.
30
29
3. Open `MyGame/CMakeLists.txt` in a text editor and modify it as follows:
31
-
* After the line `project(${APP_NAME})` add the following line:
4. [Proceed with generating IDE files via CMake](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/CMake-Guide.html) and build and run your project.
40
39
41
40
For reference, have a look at our spine-cocos2dx example project in this repository described below.
42
41
43
42
## Example
43
+
44
44
The spine-cocos2dx example works on Windows, Linux, macOS, iOS, Linux, and Android, for both cocos2d-x v3 and v4.
45
45
46
46
Please [install the reprequisit software](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/prerequisites.html) as per the Cocos2d-x documentation. Ensure that the following programs are in your `PATH` environment variable and thus executable from the command line:
47
47
48
-
*`git`
49
-
*`cmake`
50
-
*`python`
48
+
- `git`
49
+
- `cmake`
50
+
- `python`
51
51
52
52
Before you can compile and run the example project for a specific target platform, you need to clone the [Cocos2d-x repository](https://github.com/cocos2d/cocos2d-x) to `spine-runtimes/spine-cocos2dx/example/cocos2d` and download the dependencies:
You can now use CMake to create IDE projects for the target platform you want to compile and run the example on.
65
65
66
66
### macOS
67
+
67
68
Execute the following on the command line:
68
69
69
70
```
@@ -77,6 +78,7 @@ This will generate an Xcode project in `build-macos/spine-cocos2dx-example.xcode
77
78
> **NOTE:** Passing `-DCMAKE_OSX_ARCHITECTURES=x86_64` to CMake is currently required, as Cocos2d-X only provides prebuilt x86_64 binaries for its external dependencies.
78
79
79
80
### iOS
81
+
80
82
Execute the following on the command line:
81
83
82
84
```
@@ -88,9 +90,11 @@ open build-ios/spine-cocos2dx-example.xcodeproj
88
90
This will generate an Xcode project in `build-ios/spine-cocos2dx-example.xcodeproj` and open it in Xcode. To build and run the example, select the `spine-cocos2dx-example` scheme and select a device or simulator to build for and run on. Finally, press `CMD + R` to build and run the example.
89
91
90
92
### Android
93
+
91
94
Open the project in `proj.android` in Android Studio. Make sure you have NDK version `24.0.8215888` installed via the SDK Manager. Alternatively, you can set the `ndkVersion` property in `proj.android/app/build.gradle` to the NDK version you have installed locally.
92
95
93
96
### Windows
97
+
94
98
Execute the following on the command line:
95
99
96
100
```
@@ -103,6 +107,5 @@ You can then open the file `build-win/spine-cocos2dx-example.sln` with Visual St
103
107
104
108
## Notes
105
109
106
-
* Images are premultiplied by cocos2d-x, so the Spine atlas images should *not* use premultiplied alpha.
107
-
* Two color tinting needs to be enabled on a per-skeleton basis. Call `SkeletonRenderer::setTwoColorTine(true)` or `SkeletonAnimation::setTwoColorTint(true)` after you created the skeleton instance. Note that two color tinting requires a custom shader and vertex format. Skeletons rendered with two color tinting can therefore not be batched with single color tinted skeletons or other 2D cocos2d-x elements like sprites. However, two-color tinted skeletons will be batched if possible when rendered after one another. Attaching a child to a two color tinted skeleton will also break the batch.
108
-
110
+
- Images are premultiplied by cocos2d-x, so the Spine atlas images should _not_ use premultiplied alpha.
111
+
- Two color tinting needs to be enabled on a per-skeleton basis. Call `SkeletonRenderer::setTwoColorTine(true)` or `SkeletonAnimation::setTwoColorTint(true)` after you created the skeleton instance. Note that two color tinting requires a custom shader and vertex format. Skeletons rendered with two color tinting can therefore not be batched with single color tinted skeletons or other 2D cocos2d-x elements like sprites. However, two-color tinted skeletons will be batched if possible when rendered after one another. Attaching a child to a two color tinted skeleton will also break the batch.
0 commit comments