Skip to content

Commit 072c2c0

Browse files
committed
Update README.mds, preprare spine-flutter for publication
1 parent 5e34031 commit 072c2c0

File tree

20 files changed

+212
-128
lines changed

20 files changed

+212
-128
lines changed

examples/export/export.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fi
1919
echo "Spine exe: $SPINE_EXE"
2020

2121
if [ "$#" -eq 0 ]; then
22-
echo "Enter the Spine editor version to use for the export (eg 4.1.xx):"
22+
echo "Enter the Spine editor version to use for the export (eg 4.2.xx):"
2323
read version
2424
else
2525
version=${1%/}

spine-c/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
1414

1515
## Spine version
1616

17-
spine-c works with data exported from Spine 4.1.xx.
17+
spine-c works with data exported from Spine 4.2.xx.
1818

1919
spine-c supports all Spine features.
2020

@@ -26,6 +26,7 @@ spine-c supports all Spine features.
2626
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.
2727

2828
## Usage
29+
2930
### [Please see the spine-c guide for full documentation](http://esotericsoftware.com/spine-c)
3031

3132
## Extension

spine-cocos2dx/README.md

+20-17
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,40 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
1414

1515
## Spine version
1616

17-
spine-cocos2dx works with data exported from Spine 4.1.xx.
17+
spine-cocos2dx works with data exported from Spine 4.2.xx.
1818

1919
spine-cocos2dx supports all Spine features.
2020

2121
## Setup
2222

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.
2424

2525
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].
2626

27-
2827
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.
2928
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.
3029
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:
32-
```
33-
include(/path/to/spine-runtimes/spine-cocos2dx/spine-cocos2dx.cmake)
34-
```
35-
* Before the line `target_link_libraries(${APP_NAME} cocos2d)`add the following line:
36-
```
37-
target_link_libraries(${APP_NAME} spine-cpp spine-cocos2dx)
38-
```
30+
- After the line `project(${APP_NAME})` add the following line:
31+
```
32+
include(/path/to/spine-runtimes/spine-cocos2dx/spine-cocos2dx.cmake)
33+
```
34+
- Before the line `target_link_libraries(${APP_NAME} cocos2d)`add the following line:
35+
```
36+
target_link_libraries(${APP_NAME} spine-cpp spine-cocos2dx)
37+
```
3938
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.
4039
4140
For reference, have a look at our spine-cocos2dx example project in this repository described below.
4241
4342
## Example
43+
4444
The spine-cocos2dx example works on Windows, Linux, macOS, iOS, Linux, and Android, for both cocos2d-x v3 and v4.
4545
4646
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:
4747
48-
* `git`
49-
* `cmake`
50-
* `python`
48+
- `git`
49+
- `cmake`
50+
- `python`
5151
5252
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:
5353
@@ -64,6 +64,7 @@ python cocos2d/download-deps.py -r yes
6464
You can now use CMake to create IDE projects for the target platform you want to compile and run the example on.
6565
6666
### macOS
67+
6768
Execute the following on the command line:
6869
6970
```
@@ -77,6 +78,7 @@ This will generate an Xcode project in `build-macos/spine-cocos2dx-example.xcode
7778
> **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.
7879
7980
### iOS
81+
8082
Execute the following on the command line:
8183
8284
```
@@ -88,9 +90,11 @@ open build-ios/spine-cocos2dx-example.xcodeproj
8890
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.
8991
9092
### Android
93+
9194
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.
9295
9396
### Windows
97+
9498
Execute the following on the command line:
9599
96100
```
@@ -103,6 +107,5 @@ You can then open the file `build-win/spine-cocos2dx-example.sln` with Visual St
103107
104108
## Notes
105109
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.

spine-cpp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
1414

1515
## Spine version
1616

17-
spine-cpp works with data exported from spine 4.1.xx.
17+
spine-cpp works with data exported from spine 4.2.xx.
1818

1919
spine-cpp supports all spine features.
2020

spine-csharp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
1414

1515
## Spine version
1616

17-
spine-csharp works with data exported from Spine 4.1.xx.
17+
spine-csharp works with data exported from Spine 4.2.xx.
1818

1919
spine-csharp supports all Spine features.
2020

spine-flutter/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 4.2.23
2+
- Physics support
3+
14
# 4.2.22
25

36
- Fix multiply blend mode, see https://esotericsoftware.com/forum/d/25369-spine-flutter-slot%E6%B7%B7%E5%90%88%E6%A8%A1%E5%BC%8F%E5%90%8Ealpha%E4%B8%A2%E5%A4%B1/2

spine-flutter/example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ packages:
169169
path: ".."
170170
relative: true
171171
source: path
172-
version: "4.1.14"
172+
version: "4.2.23"
173173
string_scanner:
174174
dependency: transitive
175175
description:

0 commit comments

Comments
 (0)