Merge branch '4.1-beta' into 4.2-beta

# Conflicts:
#	spine-ts/package-lock.json
#	spine-ts/package.json
#	spine-ts/spine-canvas/package.json
#	spine-ts/spine-core/package.json
#	spine-ts/spine-player/package.json
#	spine-ts/spine-threejs/package.json
#	spine-ts/spine-webgl/package.json
This commit is contained in:
Mario Zechner 2022-04-04 15:01:45 +02:00
commit 53c58351ae
576 changed files with 16415 additions and 48120 deletions

7
.gitignore vendored
View File

@ -157,3 +157,10 @@ spine-monogame/spine-monogame-example/bin
spine-monogame/spine-monogame-example/obj
spine-libgdx/spine-libgdx/out
spine-libgdx/spine-skeletonviewer/out
spine-cocos2d-objc/cocos2d/
cmake-build-release
spine-cocos2dx/example-v4/build-ios
spine-cocos2dx/example-v4/build-macos
spine-cocos2dx/example/build-ios
spine-cocos2dx/example/proj.android/app/.cxx
spine-cocos2dx/example/build-win

View File

@ -1,12 +1,31 @@
# 4.1
## C
* **Additions**
* Support for sequences.
* Support for `shortestRotation` in animation state. See https://github.com/esotericsoftware/spine-runtimes/issues/2027.
* Added CMake parameter `SPINE_SANITIZE` which will enable sanitizers on macOS and Linux.
* Added `SPINE_MAJOR_VERSION`, `SPINE_MINOR_VERSION`, and `SPINE_VERSION_STRING`. Parsing skeleton .JSON and .skel files will report an error if the skeleton version does not match the runtime version.
* **Breaking changes**
* `spRegionAttachment` and `spMeshAttachment` now contain a `spTextureRegion*` instead of encoding region fields directly.
* `sp_AttachmentLoader_newRegionAttachment()` and `spAttachmentLoader_newMeshAttachment()` now take an additional `Sequence*` parameter.
* `spMeshAttachment_updateUVs()` was renamed to `spMeshAttachment_updateRegion()`.
* `spRegionAttachment_updateOffset()` was renamed to `spRegionAttachment_updateRegion()`, `spRegionAttachment_setUVs()` was merged into `spRegionAttachment_updateRegion()`.
* `spSlot_getAttachmentTime()` and `spSlot_setAttachmentTime()` have been removed.
* `spVertexAttachment->deformAttachment` was renamed to `spVertexAttachment->timelineAttachment`.
* `spSkeleton_update()` has been removed.
* `spSkeleton->time` has been removed.
### SFML
* Updated example to use SFML 2.5.1.
* Added dragon example.
## C++
* **Additions**
* Support for sequences.
* Support for `shortestRotation` in animation state. See https://github.com/esotericsoftware/spine-runtimes/issues/2027.
* Added CMake parameter `SPINE_SANITIZE` which will enable sanitizers on macOS and Linux.
* Added `SPINE_MAJOR_VERSION`, `SPINE_MINOR_VERSION`, and `SPINE_VERSION_STRING`. Parsing skeleton .JSON and .skel files will report an error if the skeleton version does not match the runtime version.
* **Breaking changes**
* `RegionAttachment` and `MeshAttachment` now contain a `TextureRegion*` instead of encoding region fields directly.
* `AttachmentLoader::newRegionAttachment()` and `AttachmentLoader::newMeshAttachment()` now take an additional `Sequence*` parameter.
@ -17,17 +36,20 @@
* `Skeleton::update()` has been removed.
* `Skeleton::getTime()` has been removed.
### Cocos2d-x
### SFML
* Updated example to use SFML 2.5.1.
* Added dragon example.
### UE4
* Updated example project to UE 4.27
## C# ##
* **Additions**
* Full support for sequences.
* Support for `shortestRotation` in animation state. See https://github.com/esotericsoftware/spine-runtimes/issues/2027.
* `RegionAttachment` and `MeshAttachment` now provide a `Region` property. Use this property instead of the removed `RendererObject` property (see section *Breaking Changes* below).
* **Breaking changes**
@ -46,12 +68,19 @@
* **Officially supported Unity versions are 2017.1-2021.1**.
* **Breaking changes**
* **Additions**
* `BoneFollower` and `BoneFollowerGraphic` now provide an additional `Follow Parent World Scale` parameter to allow following simple scale of parent bones (rotated/skewed scale can't be supported).
* `SpineAtlasAsset.CreateRuntimeInstance` methods now provide an optional `newCustomTextureLoader` parameter (defaults to `null`) which can be set to e.g. `(a) => new YourCustomTextureLoader(a)` to use your own `TextureLoader` subclass instead of `MaterialsTextureLoader`.
* `SkeletonAnimation`, `SkeletonMecanim` and `SkeletonGraphic` now provide an Inspector parameter `Advanced` - `Animation Update` with modes `In Update` **(previous behaviour, the default)**, `In FixedUpdate` and `Manual Update`. This allows to update animation in `FixedUpdate` when using the `SkeletonRootMotion` component (which is the recommended combination now, issuing a warning otherwise). The reason is that when root motion leads to a collision with a physics collider, it can introduce jittery excess movement when updating animation in `Update` due to more `Update` calls following a single `FixedUpdate` call.
* Added `SkeletonRootMotion` properties `PreviousRigidbodyRootMotion` and `AdditionalRigidbody2DMovement`. Setting or querying these movement vectors can be necessary when multiple scripts call `Rigidbody2D.MovePosition` on the same object where the last call overwrites the effect of preceding ones.
* `BoneFollower` and `BoneFollowerGraphic` now provide an additional `Follow Parent World Scale` parameter to allow following simple scale of parent bones (rotated/skewed scale can't be supported).
* Improved `Advanced - Fix Prefab Override MeshFilter` property for `SkeletonRenderer` (and subclasses`SkeletonAnimation` and `SkeletonMecanim`), now providing an additional option to use a global value which can be set in `Edit - Preferences - Spine`.
* Timeline naming improvements: `Spine AnimationState Clip` Inspector parameter `Custom Duration` changed and inverted to `Default Mix Duration` for more clarity. Shortened all Timeline add track menu entries from: `Spine.Unity.Playables - <track type>` to `Spine - <track type>`, `Spine Animation State Track` to `SkeletonAnimation Track`, `Spine AnimationState Graphic Track` to `SkeletonGraphic Track`, and `Spine Skeleton Flip Track` to `Skeleton Flip Track`.
* Timeline track appearance and Inspector: Tracks now show icons and track colors to make them easier to distinguish. When a Track is selected, the Inspector now shows an editable track name which was previously only editable at the Timeline asset.
* Added example component `SkeletonRenderTexture` to render a `SkeletonRenderer` to a `RenderTexture`, mainly for proper transparency. Added an example scene named `RenderTexture FadeOut Transparency` that demonstrates usage for a fadeout transparency effect.
* Added another fadeout example component named `SkeletonRenderTextureFadeout` which takes over transparency fadeout when enabled. You can use this component as-is, attach it in disabled state and enable it to start a fadeout effect.
* Timeline clips now offer an additional `Alpha` parameter for setting a custom constant mix alpha value other than 1.0, just as `TrackEntry.Alpha`. Defaults to 1.0.
* **Breaking changes**
* **Changes of default values**
@ -64,12 +93,15 @@
* Added new spine-monogame solution. See [spine-monogame/README.md](spine-monogame/README.md) for updated instructions on how to use spine-monogame.
## Java
* **Breaking change**: `AttachmentLoader#newRegionAttachment()` and `AttachmentLoader#newMeshAttachment()` take an additional `Sequence` parameter.
* **Breaking change**: `Slot#setAttachmentTime()` and `Slot#getAttachmentTime()` have been removed.
* **Breaking change**: `VertexAttachment#setDeformAttachment()` and `VertexAttachment#getDeformAttachment()` have been replaced with `VertexAttachment#setTimelineAttachment()` and `VertexAttachment#getTimelineAttachment()`.
* **Breaking change**: `RegionAttachment#updateOffset()` has been renamed to `RegionAttachment#updateRegion()`. The caller must ensure that the attachment's region is not `null`.
* **Breaking change**: `RegionAttachment#computeWorldVertices()` takes a `Slot` instead of a `Bone` as the first argument.
* **Addition**: full support for sequences.
* **Additions**
* Support for `shortestRotation` in animation state. See https://github.com/esotericsoftware/spine-runtimes/issues/2027.
* Support for sequences.
* **Breaking changes**
* `AttachmentLoader#newRegionAttachment()` and `AttachmentLoader#newMeshAttachment()` take an additional `Sequence` parameter.
* `Slot#setAttachmentTime()` and `Slot#getAttachmentTime()` have been removed.
* `VertexAttachment#setDeformAttachment()` and `VertexAttachment#getDeformAttachment()` have been replaced with `VertexAttachment#setTimelineAttachment()` and `VertexAttachment#getTimelineAttachment()`.
* `RegionAttachment#updateOffset()` has been renamed to `RegionAttachment#updateRegion()`. The caller must ensure that the attachment's region is not `null`.
* `RegionAttachment#computeWorldVertices()` takes a `Slot` instead of a `Bone` as the first argument.
### libGDX
@ -77,20 +109,33 @@
* `spine-skeletonviewer` now supports quickly loading skeletons by dragging and dropping `.json` or `.skel` skeleton files onto the window.
## Typescript/Javascript
* **Breaking change**: `AttachmentLoader#newRegionAttachment()` and `AttachmentLoader#newMeshAttachment()` take an additional `Sequence` parameter.
* **Breaking change**: `Slot#attachmentTime` and has been removed.
* **Breaking change**: `VertexAttachment#deformAttachment` has been replaced with `VertexAttachment#timelineAttachment`.
* **Breaking change**: `RegionAttachment#updateOffset()` has been renamed to `RegionAttachment#updateRegion()`. The caller must ensure that the attachment's region is not `null`.
* **Breaking change**: `RegionAttachment#computeWorldVertices()` takes a `Slot` instead of a `Bone` as the first argument.
* **Addition**: full support for sequences.
* **Additions**
* full support for sequences.
* Added `Promise` based `AssetManager.loadAll()`. Allows synchronous waiting via `await assetManager.loadAll()`, simplifying loader logic in applications.
* Support for `shortestRotation` in animation state. See https://github.com/esotericsoftware/spine-runtimes/issues/2027.
* Full support for sequences.
* **Breaking changes**
* `AttachmentLoader#newRegionAttachment()` and `AttachmentLoader#newMeshAttachment()` take an additional `Sequence` parameter.
* `Slot#attachmentTime` and has been removed.
* `VertexAttachment#deformAttachment` has been replaced with `VertexAttachment#timelineAttachment`.
* `RegionAttachment#updateOffset()` has been renamed to `RegionAttachment#updateRegion()`. The caller must ensure that the attachment's region is not `null`.
* `RegionAttachment#computeWorldVertices()` takes a `Slot` instead of a `Bone` as the first argument.
* Removed `PlayerEditor`.
### WebGL backend
* `PolygonBatcher.start()` now disables culling and restores the previous state on `PolygonBatcher.end()`.
* Added `SpineCanvas`, a simpler way to render a scene via spine-webgl. See `spine-ts/spine-webgl/examples/barebones.html` and `spine-ts/spine-webgl/examples/mix-and-match.html`.
### Canvas backend
* Improved example.
### Three.js backend
* Added orbital controls to THREJS example.
* `SkeletonMesh` takes an optional `SkeletonMeshMaterialCustomizer`, allowing modification of materials used by `SkeletonMesh`.
* Added `SkeletonMeshMaterial.alphaTest`, when > 0, alpha testing will be performed and fragments will not be written to the depth buffer, if depth writes are enabled.
### Player
* Added `SpinePlayer.dispose()` to explicitely dispose of all resources the player holds on to.
# 4.0
@ -204,7 +249,7 @@
* Fixed Timeline not pausing (and resuming) clip playback on Director pause, this is now the default behaviour. If you require the old behaviour (e.g. to continue playing an idle animation during Director pause), there is now an additional parameter `Don't Pause with Director` provided that can be enabled for each Timeline clip.
* Fixed Timeline `Spine AnimationState Clips` ignoring empty space on the Timeline after a clip's end. Timeline clips now also offer `Don't End with Clip` and `Clip End Mix Out Duration` parameters if you prefer the old behaviour of previous versions. By default when empty space follows the clip on the timeline, the empty animation is set on the track with a MixDuration of `Clip End Mix Out Duration`. Set `Don't End with Clip` to `true` to continue playing the clip's animation instead and mimic the old 3.8 behaviour. If you prefer pausing the animation instead of mixing out to the empty animation, set `Clip End Mix Out Duration` to a value less than 0, then the animation is paused instead.
* **Additions**
* **Additions and Improvements**
* Additional **Fix Draw Order** parameter at SkeletonRenderer, defaults to `disabled` (previous behaviour).
Applies only when 3+ submeshes are used (2+ materials with alternating order, e.g. "A B A").
If `true`, MaterialPropertyBlocks are assigned at each material to prevent aggressive batching of submeshes
@ -255,6 +300,11 @@
* `BoundingBoxFollower` and `BoundingBoxFollowerGraphic` now provide previously missing `usedByEffector` and `usedByComposite` parameters to be set at all generated colliders.
* `BoneFollower` and `BoneFollowerGraphic` now provide an additional `Follow Parent World Scale` parameter to allow following simple scale of parent bones (rotated/skewed scale can't be supported).
* Improved `Advanced - Fix Prefab Override MeshFilter` property for `SkeletonRenderer` (and subclasses`SkeletonAnimation` and `SkeletonMecanim`), now providing an additional option to use a global value which can be set in `Edit - Preferences - Spine`.
* Timeline naming improvements: `Spine AnimationState Clip` Inspector parameter `Custom Duration` changed and inverted to `Default Mix Duration` for more clarity. Shortened all Timeline add track menu entries from: `Spine.Unity.Playables - <track type>` to `Spine - <track type>`, `Spine Animation State Track` to `SkeletonAnimation Track`, `Spine AnimationState Graphic Track` to `SkeletonGraphic Track`, and `Spine Skeleton Flip Track` to `Skeleton Flip Track`.
* Timeline track appearance and Inspector: Tracks now show icons and track colors to make them easier to distinguish. When a Track is selected, the Inspector now shows an editable track name which was previously only editable at the Timeline asset.
* Added example component `SkeletonRenderTexture` to render a `SkeletonRenderer` to a `RenderTexture`, mainly for proper transparency. Added an example scene named `RenderTexture FadeOut Transparency` that demonstrates usage for a fadeout transparency effect.
* Added another fadeout example component named `SkeletonRenderTextureFadeout` which takes over transparency fadeout when enabled. You can use this component as-is, attach it in disabled state and enable it to start a fadeout effect.
* Timeline clips now offer an additional `Alpha` parameter for setting a custom constant mix alpha value other than 1.0, just as `TrackEntry.Alpha`. Defaults to 1.0.
* **Changes of default values**
@ -329,6 +379,7 @@
* `SkeletonMesh` now takes an optional `SkeletonMeshMaterialParametersCustomizer` function that allows you to modify the `ShaderMaterialParameters` before the material is finalized. Use it to modify things like THREEJS' `Material.depthTest` etc. See #1590.
* **Breaking change:** the global object `spine.canvas` no longer exists. All classes and functions are now exposed on the global `spine` object directly. Simply replace any reference to `spine.threejs.` in your source code with `spine.`.
* **Breaking change:** the default fragment shader of `SkeletonMeshMaterial` now explicitely discards fragments with alpha < 0.5. See https://github.com/EsotericSoftware/spine-runtimes/issues/1985
* **Breaking change:** reversal of the previous breaking change: the default fragment shader of `SkeletonMeshMaterial` does no longer discard fragments with alpha < 0.5. Pass a `SkeletonMeshMaterialParametersCustomizer` to the `SkeletonMesh` constructor, and modify `parameters.alphaTest` to be > 0.
### Player
* Added `SpinePlayerConfig.rawDataURIs`. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. See the example for a demonstration.
@ -723,6 +774,8 @@
* Added `MeshAttachment#newLinkedMesh()`, creates a linked mesh linkted to either the original mesh, or the parent of the original mesh.
* Added IK softness.
* Added `AssetManager.setRawDataURI(path, data)`. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file.
* Added `AssetManager.loadAll()` to allow Promise/async/await based waiting for completion of asset load. See the `spine-canvas` examples.
* Added `Skeleton.getBoundRect()` helper method to calculate the bouding rectangle of the current pose, returning the result as `{ x, y, width, height }`. Note that this method will create temporary objects which can add to garbage collection pressure.
### WebGL backend
* `Input` can now take a partially defined implementation of `InputListener`.
@ -965,6 +1018,7 @@ This will automatically:
* Support for audio events, see `audioPath`, `volume` and `balance` fields on event (data).
* `TrackEntry` has an additional field called `holdPrevious`. It can be used to counter act a limitation of `AnimationState` resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this [forum thread](http://esotericsoftware.com/forum/Probably-Easy-Animation-mixing-with-multiple-tracks-10682?p=48130&hilit=holdprevious#p48130).
* Added `AssetManager#setRawDataURI(path, data)`. Allows to set raw data URIs for a specific path, which in turn enables embedding assets into JavaScript/HTML.
* `PolygonBatcher` will now disable `CULL_FACE` and restore the state as it was before rendering.
### WebGL backend
* Added `VertexEffect` interface, instances of which can be set on `SkeletonRenderer`. Allows to modify vertices before submitting them to GPU. See `SwirlEffect`, `JitterEffect`, and the example which allows to set effects.

View File

@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.17)
project(spine)
set(CMAKE_INSTALL_PREFIX "./")
set(CMAKE_VERBOSE_MAKEFILE ON)
set(SPINE_SFML FALSE CACHE BOOL FALSE)
set(SPINE_SANITIZE FALSE CACHE BOOL FALSE)
if(MSVC)
message("MSCV detected")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
@ -8,13 +13,12 @@ if(MSVC)
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused-value -Wno-c++11-long-long -Wno-variadic-macros -Werror -Wextra -pedantic -Wnonportable-include-path -Wshadow -std=c89")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused-value -Wno-c++11-long-long -Wno-variadic-macros -Werror -Wextra -Wnon-virtual-dtor -pedantic -Wnonportable-include-path -Wshadow -std=c++11 -fno-exceptions -fno-rtti")
endif()
set(CMAKE_INSTALL_PREFIX "./")
set(CMAKE_VERBOSE_MAKEFILE ON)
set(SPINE_SFML FALSE CACHE BOOL FALSE)
set(SPINE_COCOS2D_OBJC FALSE CACHE BOOL FALSE)
set(SPINE_COCOS2D_X FALSE CACHE BOOL FALSE)
if (${SPINE_SANITIZE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined")
endif()
endif()
if((${SPINE_SFML}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sfml"))
add_subdirectory(spine-c)
@ -23,15 +27,5 @@ if((${SPINE_SFML}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sfml"))
add_subdirectory(spine-sfml/cpp)
endif()
if((${SPINE_COCOS2D_OBJC}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-cocos2d-objc"))
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_subdirectory(spine-cocos2d-objc)
endif()
endif()
if((${SPINE_COCOS2D_X}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-cocos2dx"))
add_subdirectory(spine-cocos2dx)
endif()
# add_subdirectory(spine-c/spine-c-unit-tests)
add_subdirectory(spine-cpp/spine-cpp-unit-tests)
add_subdirectory(spine-cpp/spine-cpp-unit-tests)

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "F735snjE3r4",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -191.3,
"y": -4.51,
"width": 365.79,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "C2C382BhioQ",
"spine": "4.1.04-beta",
"hash": "UmVPCRBPHcg",
"spine": "4.1.23-beta",
"x": -191.3,
"y": -4.51,
"width": 368.26,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "5q2VQysgSd0",
"spine": "4.1.04-beta",
"hash": "oo0dBSCqNHM",
"spine": "4.1.23-beta",
"x": -152.5,
"y": -151,
"width": 305,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "aPoA1GjXkVI",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -366.31,
"y": -327.81,
"width": 660.39,

View File

@ -35,6 +35,29 @@ cp -f ../mix-and-match/export/*.json "$ROOT/spine-libgdx/spine-libgdx-tests/asse
cp -f ../mix-and-match/export/*.skel "$ROOT/spine-libgdx/spine-libgdx-tests/assets/mix-and-match/"
cp -f ../mix-and-match/export/*-pma.* "$ROOT/spine-libgdx/spine-libgdx-tests/assets/mix-and-match/"
echo "spine-cocos2d-objc"
rm "$ROOT/spine-cocos2d-objc/Resources/"*
cp -f ../coin/export/coin-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../coin/export/coin.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../coin/export/coin.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../goblins/export/goblins-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../goblins/export/goblins.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../goblins/export/goblins.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../raptor/export/raptor.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../raptor/export/raptor.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../spineboy/export/spineboy.png "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../tank/export/tank-pro.json "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../tank/export/tank.atlas "$ROOT/spine-cocos2d-objc/Resources/"
cp -f ../tank/export/tank.png "$ROOT/spine-cocos2d-objc/Resources/"
echo "spine-cocos2dx"
rm -rf "$ROOT/spine-cocos2dx/example/Resources/common/"*

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "djttFmlR6Co",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -92.53,
"y": -5.3,
"width": 234.03,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "5+0u5UUVwqA",
"spine": "4.1.04-beta",
"hash": "CdaHvXeCMjE",
"spine": "4.1.23-beta",
"x": -134.12,
"y": -3.28,
"width": 266.94,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "oG+kkp8qkDs",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -87.83,
"y": 0.01,
"width": 319.3,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "4TnFPRyMQMQ",
"spine": "4.1.04-beta",
"hash": "iMg/Nef4GhU",
"spine": "4.1.23-beta",
"x": -85.7,
"y": -0.02,
"width": 321.77,
@ -309,7 +309,7 @@
},
{
"name": "weapon/morningstar",
"bones": [ "chain1", "chain2", "chain3", "chain4", "chain5", "chain6", "chain7", "chain8", "weapon-morningstar", "weapon-morningstar-physics1", "weapon-morningstar-physics2", "weapon-morningstar-physics3", "weapon-morningstar-physics4" ],
"bones": [ "chain4", "weapon-morningstar-physics2", "weapon-morningstar-physics1", "weapon-morningstar-physics3", "chain8", "chain1", "chain6", "weapon-morningstar", "chain5", "chain7", "weapon-morningstar-physics4", "chain2", "chain3" ],
"path": [ "weapon-morningstar" ]
},
{

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "8lXskz65X7Q",
"spine": "4.1.04-beta",
"hash": "HtoSOJus9ic",
"spine": "4.1.23-beta",
"x": -644,
"y": -274,
"width": 1350.84,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "g51gqFUAXaM",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -207.3,
"y": 119.41,
"width": 413.19,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "BtMW31RrxLs",
"spine": "4.1.04-beta",
"hash": "/2dOCTLjcJ4",
"spine": "4.1.23-beta",
"x": -208.76,
"y": 119.41,
"width": 414.65,

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "D5Ad2Zbw5iM",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -95.43,
"y": -18.79,
"width": 196.03,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "gt+DSJjR5MM",
"spine": "4.1.04-beta",
"hash": "SmUDxzck41o",
"spine": "4.1.23-beta",
"x": -221.27,
"y": -8.57,
"width": 470.72,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "ttp88nCyPm0",
"spine": "4.1.04-beta",
"hash": "itfFESDjM1c",
"spine": "4.1.23-beta",
"x": -188.63,
"y": -7.94,
"width": 418.45,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "9GzkJCsNn3g",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -840,
"y": -766.03,
"width": 1680,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "NNUiOwCxKWo",
"spine": "4.1.04-beta",
"hash": "QqiPXGOfONE",
"spine": "4.1.23-beta",
"x": -100.47,
"y": -9.21,
"width": 260.65,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "zExzm/6YDxM",
"spine": "4.1.04-beta",
"hash": "ulJOWXMG9PE",
"spine": "4.1.23-beta",
"x": -5852.65,
"y": -348.5,
"width": 7202.61,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "Si0Beql3I1U",
"spine": "4.1.04-beta",
"hash": "J/Kz2d3OlD0",
"spine": "4.1.23-beta",
"x": -87.7,
"y": -1.71,
"width": 227.65,

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "tB4/IVbSSaY",
"spine": "4.1.04-beta",
"spine": "4.1.23-beta",
"x": -564.6,
"y": -335.4,
"width": 1124.2,

View File

@ -26,7 +26,7 @@ spotless {
'spine-sfml/**/*.h',
'spine-ue4/**/*.cpp',
'spine-ue4/**/*.h'
clangFormat("12.0.1").pathToExe("$System.env.CLANGFORMAT").style('file')
clangFormat("13.0.1").pathToExe("$System.env.CLANGFORMAT").style('file')
}
typescript {

View File

@ -28,9 +28,11 @@ setup
# Execute spotless and dotnet-format
pushd $dir/..
./formatters/gradlew spotlessApply
dotnet-format spine-csharp/spine-csharp.sln
dotnet-format -f spine-monogame
dotnet-format -f spine-unity
if [ "$1" != "skipdotnet" ] ; then
dotnet-format spine-csharp/spine-csharp.sln
dotnet-format -f spine-monogame
dotnet-format -f spine-unity
fi
popd
# Delete Gradle, dotnet-format, and clang-format config files in root

View File

@ -34,6 +34,7 @@
#include <spine/Event.h>
#include <spine/Attachment.h>
#include <spine/VertexAttachment.h>
#include <spine/Sequence.h>
#include <spine/Array.h>
#include <stdint.h>
@ -99,6 +100,7 @@ typedef enum {
SP_TIMELINE_SHEAR,
SP_TIMELINE_TRANSLATE,
SP_TIMELINE_DEFORM,
SP_TIMELINE_SEQUENCE,
SP_TIMELINE_IKCONSTRAINT,
SP_TIMELINE_PATHCONSTRAINTMIX,
SP_TIMELINE_RGB2,
@ -131,7 +133,8 @@ typedef enum {
SP_PROPERTY_TRANSFORMCONSTRAINT = 1 << 15,
SP_PROPERTY_PATHCONSTRAINT_POSITION = 1 << 16,
SP_PROPERTY_PATHCONSTRAINT_SPACING = 1 << 17,
SP_PROPERTY_PATHCONSTRAINT_MIX = 1 << 18
SP_PROPERTY_PATHCONSTRAINT_MIX = 1 << 18,
SP_PROPERTY_SEQUENCE = 1 << 19
} spProperty;
#define SP_MAX_PROPERTY_IDS 3
@ -399,6 +402,20 @@ SP_API void spDeformTimeline_setFrame(spDeformTimeline *self, int frameIndex, fl
/**/
typedef struct spSequenceTimeline {
spTimeline super;
int slotIndex;
spAttachment *attachment;
} spSequenceTimeline;
SP_API spSequenceTimeline *spSequenceTimeline_create(int framesCount, int slotIndex, spAttachment *attachment);
SP_API void spSequenceTimeline_setFrame(spSequenceTimeline *self, int frameIndex, float time, int mode, int index, float delay);
/**/
/**/
typedef struct spEventTimeline {
spTimeline super;
spEvent **const events;

View File

@ -50,7 +50,7 @@ typedef struct spSequence {
spTextureRegionArray *regions;
} spSequence;
SP_API spSequence *spSequence_create(int start, int digits, int setupIndex, int numRegions);
SP_API spSequence *spSequence_create(int numRegions);
SP_API void spSequence_dispose(spSequence *self);
@ -58,7 +58,7 @@ SP_API spSequence *spSequence_copy(spSequence *self);
SP_API void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment);
SP_API void spSequence_getPath(const char* basePath, int index, char *path);
SP_API void spSequence_getPath(spSequence *self, const char *basePath, int index, char *path);
#define SP_SEQUENCE_MODE_HOLD 0
#define SP_SEQUENCE_MODE_ONCE 1

View File

@ -27,7 +27,11 @@
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#include "SpineAtlasImportFactory.h"
#include "SpineEditorPlugin.h"
#include "SpinePlugin.h"
#include "SpineSkeletonImportFactory.h"
#ifndef SPINE_VERTEXEFFECT_H_
#define SPINE_VERTEXEFFECT_H_
#define SPINE_MAJOR_VERSION 4
#define SPINE_MINOR_VERSION 1
#define SPINE_VERSION_STRING "4.1"
#endif

View File

@ -1999,6 +1999,118 @@ void spDeformTimeline_setFrame(spDeformTimeline *self, int frame, float time, fl
/**/
static const int SEQUENCE_ENTRIES = 3, MODE = 1, DELAY = 2;
void _spSequenceTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents,
int *eventsCount, float alpha, spMixBlend blend, spMixDirection direction) {
spSequenceTimeline *self = (spSequenceTimeline *) timeline;
spSlot *slot = skeleton->slots[self->slotIndex];
spAttachment *slotAttachment;
float *frames;
int i, modeAndIndex, count, index, mode;
float before, delay;
spSequence *sequence = NULL;
if (!slot->bone->active) return;
slotAttachment = slot->attachment;
if (slotAttachment != self->attachment) {
switch (slot->attachment->type) {
case SP_ATTACHMENT_BOUNDING_BOX:
case SP_ATTACHMENT_CLIPPING:
case SP_ATTACHMENT_MESH:
case SP_ATTACHMENT_PATH: {
spVertexAttachment *vertexAttachment = SUB_CAST(spVertexAttachment, slot->attachment);
if (vertexAttachment->timelineAttachment != self->attachment) return;
break;
}
default:
return;
}
}
frames = self->super.frames->items;
if (time < frames[0]) { /* Time is before first frame. */
if (blend == SP_MIX_BLEND_SETUP || blend == SP_MIX_BLEND_FIRST) slot->sequenceIndex = -1;
return;
}
i = search2(self->super.frames, time, SEQUENCE_ENTRIES);
before = frames[i];
modeAndIndex = (int) frames[i + MODE];
delay = frames[i + DELAY];
if (self->attachment->type == SP_ATTACHMENT_REGION) sequence = ((spRegionAttachment *) self->attachment)->sequence;
if (self->attachment->type == SP_ATTACHMENT_MESH) sequence = ((spMeshAttachment *) self->attachment)->sequence;
index = modeAndIndex >> 4;
count = sequence->regions->size;
mode = modeAndIndex & 0xf;
if (mode != SP_SEQUENCE_MODE_HOLD) {
index += (int) (((time - before) / delay + 0.00001));
switch (mode) {
case SP_SEQUENCE_MODE_ONCE:
index = MIN(count - 1, index);
break;
case SP_SEQUENCE_MODE_LOOP:
index %= count;
break;
case SP_SEQUENCE_MODE_PINGPONG: {
int n = (count << 1) - 2;
index %= n;
if (index >= count) index = n - index;
break;
}
case SP_SEQUENCE_MODE_ONCEREVERSE:
index = MAX(count - 1 - index, 0);
break;
case SP_SEQUENCE_MODE_LOOPREVERSE:
index = count - 1 - (index % count);
break;
case SP_SEQUENCE_MODE_PINGPONGREVERSE: {
int n = (count << 1) - 2;
index = (index + count - 1) % n;
if (index >= count) index = n - index;
}
}
}
slot->sequenceIndex = index;
UNUSED(lastTime);
UNUSED(firedEvents);
UNUSED(eventsCount);
UNUSED(alpha);
UNUSED(direction);
}
void _spSequenceTimeline_dispose(spTimeline *timeline) {
/* NO-OP */
UNUSED(timeline);
}
spSequenceTimeline *spSequenceTimeline_create(int framesCount, int slotIndex, spAttachment *attachment) {
int sequenceId = 0;
spSequenceTimeline *self = NEW(spSequenceTimeline);
spPropertyId ids[1];
if (attachment->type == SP_ATTACHMENT_REGION) sequenceId = ((spRegionAttachment *) attachment)->sequence->id;
if (attachment->type == SP_ATTACHMENT_MESH) sequenceId = ((spMeshAttachment *) attachment)->sequence->id;
ids[0] = (spPropertyId) SP_PROPERTY_SEQUENCE << 32 | ((slotIndex << 16 | sequenceId) & 0xffffffff);
_spTimeline_init(SUPER(self), framesCount, SEQUENCE_ENTRIES, ids, 1, SP_TIMELINE_SEQUENCE, _spSequenceTimeline_dispose,
_spSequenceTimeline_apply, 0);
self->slotIndex = slotIndex;
self->attachment = attachment;
return self;
}
void spSequenceTimeline_setFrame(spSequenceTimeline *self, int frame, float time, int mode, int index, float delay) {
float *frames = self->super.frames->items;
frame *= SEQUENCE_ENTRIES;
frames[frame] = time;
frames[frame + MODE] = mode | (index << 4);
frames[frame + DELAY] = delay;
}
/**/
/** Fires events for frames > lastTime and <= time. */
void _spEventTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents,
int *eventsCount, float alpha, spMixBlend blend, spMixDirection direction) {

View File

@ -36,7 +36,7 @@ static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequenc
char *path = CALLOC(char, strlen(basePath) + sequence->digits + 1);
int i;
for (i = 0; i < regions->size; i++) {
spSequence_getPath(basePath, i, path);
spSequence_getPath(sequence, basePath, i, path);
regions->items[i] = SUPER(spAtlas_findRegion(atlas, path));
if (!regions->items[i]) {
FREE(path);

View File

@ -205,6 +205,10 @@ void spDebug_printTimeline(spTimeline *timeline) {
_spDebug_printTimelineBase(&t->super);
break;
}
case SP_TIMELINE_SEQUENCE: {
spSequenceTimeline *t = (spSequenceTimeline *) timeline;
_spDebug_printTimelineBase(&t->super);
}
}
}

View File

@ -33,6 +33,7 @@
void _spMeshAttachment_dispose(spAttachment *attachment) {
spMeshAttachment *self = SUB_CAST(spMeshAttachment, attachment);
if (self->sequence) spSequence_dispose(self->sequence);
FREE(self->path);
FREE(self->uvs);
if (!self->parentMesh) {

View File

@ -43,6 +43,7 @@ typedef enum {
void _spRegionAttachment_dispose(spAttachment *attachment) {
spRegionAttachment *self = SUB_CAST(spRegionAttachment, attachment);
if (self->sequence) spSequence_dispose(self->sequence);
_spAttachment_deinit(attachment);
FREE(self->path);
FREE(self);

View File

@ -29,17 +29,15 @@
#include <spine/Sequence.h>
#include <spine/extension.h>
#include <stdio.h>
_SP_ARRAY_IMPLEMENT_TYPE(spTextureRegionArray, spTextureRegion *)
static int nextSequenceId = 0;
spSequence *spSequence_create(int start, int digits, int setupIndex, int numRegions) {
spSequence *spSequence_create(int numRegions) {
spSequence *self = NEW(spSequence);
self->id = nextSequenceId++;
self->start = start;
self->digits = digits;
self->setupIndex = setupIndex;
self->regions = spTextureRegionArray_create(numRegions);
spTextureRegionArray_setSize(self->regions, numRegions);
return self;
@ -52,7 +50,7 @@ void spSequence_dispose(spSequence *self) {
spSequence *spSequence_copy(spSequence *self) {
int i = 0;
spSequence *copy = spSequence_create(self->start, self->digits, self->setupIndex, self->regions->size);
spSequence *copy = spSequence_create(self->regions->size);
for (; i < self->regions->size; i++)
copy->regions->items[i] = self->regions->items[i];
copy->start = self->start;
@ -87,6 +85,31 @@ void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment)
}
}
void spSequence_getPath(const char *basePath, int index, char *path) {
fix me
static int num_digits(int value) {
int count = value < 0 ? 1 : 0;
do {
value /= 10;
++count;
} while (value != 0);
return count;
}
static char *string_append(char *str, const char *b) {
int lenB = strlen(b);
memcpy(str, b, lenB + 1);
return str + lenB;
}
static char *string_append_int(char *str, int value) {
char intStr[20];
sprintf(intStr, "%i", value);
return string_append(str, intStr);
}
void spSequence_getPath(spSequence *self, const char *basePath, int index, char *path) {
int i;
path = string_append(path, basePath);
for (i = self->digits - num_digits(self->start + index); i > 0; i--)
path = string_append(path, "0");
path = string_append_int(path, self->start + index);
}

View File

@ -33,6 +33,7 @@
#include <spine/SkeletonBinary.h>
#include <spine/extension.h>
#include <stdio.h>
#include <spine/Version.h>
typedef struct {
const unsigned char *cursor;
@ -44,7 +45,7 @@ typedef struct {
const char *skin;
int slotIndex;
spMeshAttachment *mesh;
int inheritDeform;
int inheritTimeline;
} _spLinkedMesh;
typedef struct {
@ -101,19 +102,19 @@ static int readBoolean(_dataInput *input) {
}
static int readInt(_dataInput *input) {
int result = readByte(input);
uint32_t result = readByte(input);
result <<= 8;
result |= readByte(input);
result <<= 8;
result |= readByte(input);
result <<= 8;
result |= readByte(input);
return result;
return (int) result;
}
static int readVarint(_dataInput *input, int /*bool*/ optimizePositive) {
unsigned char b = readByte(input);
int value = b & 0x7F;
uint32_t value = b & 0x7F;
if (b & 0x80) {
b = readByte(input);
value |= (b & 0x7F) << 7;
@ -123,12 +124,12 @@ static int readVarint(_dataInput *input, int /*bool*/ optimizePositive) {
if (b & 0x80) {
b = readByte(input);
value |= (b & 0x7F) << 21;
if (b & 0x80) value |= (readByte(input) & 0x7F) << 28;
if (b & 0x80) value |= (uint32_t) (readByte(input) & 0x7F) << 28;
}
}
}
if (!optimizePositive) value = (((unsigned int) value >> 1) ^ -(value & 1));
return value;
return (int) value;
}
float readFloat(_dataInput *input) {
@ -192,6 +193,9 @@ static void readColor(_dataInput *input, float *r, float *g, float *b, float *a)
#define SLOT_RGB2 4
#define SLOT_ALPHA 5
#define ATTACHMENT_DEFORM 0
#define ATTACHMENT_SEQUENCE 1
#define PATH_POSITION 0
#define PATH_SPACING 1
#define PATH_MIX 2
@ -211,6 +215,16 @@ static void readColor(_dataInput *input, float *r, float *g, float *b, float *a)
#define PATH_ROTATE_CHAIN 1
#define PATH_ROTATE_CHAIN_SCALE 2
static spSequence *readSequence(_dataInput *input) {
spSequence *sequence = NULL;
if (!readBoolean(input)) return NULL;
sequence = spSequence_create(readVarint(input, -1));
sequence->start = readVarint(input, -1);
sequence->digits = readVarint(input, -1);
sequence->setupIndex = readVarint(input, -1);
return sequence;
}
static void
setBezier(_dataInput *input, spTimeline *timeline, int bezier, int frame, int value, float time1, float time2,
float value1, float value2, float scale) {
@ -293,7 +307,7 @@ static void _spSkeletonBinary_addLinkedMesh(spSkeletonBinary *self, spMeshAttach
linkedMesh->skin = skin;
linkedMesh->slotIndex = slotIndex;
linkedMesh->parent = parent;
linkedMesh->inheritDeform = inheritDeform;
linkedMesh->inheritTimeline = inheritDeform;
}
static spAnimation *_spSkeletonBinary_readAnimation(spSkeletonBinary *self, const char *name,
@ -748,19 +762,17 @@ static spAnimation *_spSkeletonBinary_readAnimation(spSkeletonBinary *self, cons
}
}
/* Deform timelines. */
/* Attachment timelines. */
for (i = 0, n = readVarint(input, 1); i < n; ++i) {
spSkin *skin = skeletonData->skins[readVarint(input, 1)];
for (ii = 0, nn = readVarint(input, 1); ii < nn; ++ii) {
int slotIndex = readVarint(input, 1);
for (iii = 0, nnn = readVarint(input, 1); iii < nnn; ++iii) {
float *tempDeform;
spDeformTimeline *timeline;
int weighted, deformLength;
const char *attachmentName = readStringRef(input, skeletonData);
int frameCount, frameLast, bezierCount;
float time, time2;
unsigned int timelineType;
const char *attachmentName = readStringRef(input, skeletonData);
spVertexAttachment *attachment = SUB_CAST(spVertexAttachment,
spSkin_getAttachment(skin, slotIndex, attachmentName));
if (!attachment) {
@ -771,59 +783,83 @@ static spAnimation *_spSkeletonBinary_readAnimation(spSkeletonBinary *self, cons
return NULL;
}
weighted = attachment->bones != 0;
deformLength = weighted ? attachment->verticesCount / 3 * 2 : attachment->verticesCount;
tempDeform = MALLOC(float, deformLength);
timelineType = readByte(input);
frameCount = readVarint(input, 1);
frameLast = frameCount - 1;
bezierCount = readVarint(input, 1);
timeline = spDeformTimeline_create(frameCount, deformLength, bezierCount, slotIndex, attachment);
time = readFloat(input);
for (frame = 0, bezier = 0;; ++frame) {
float *deform;
int end = readVarint(input, 1);
if (!end) {
if (weighted) {
deform = tempDeform;
memset(deform, 0, sizeof(float) * deformLength);
} else
deform = attachment->vertices;
} else {
int v, start = readVarint(input, 1);
deform = tempDeform;
memset(deform, 0, sizeof(float) * start);
end += start;
if (self->scale == 1) {
for (v = start; v < end; ++v)
deform[v] = readFloat(input);
} else {
for (v = start; v < end; ++v)
deform[v] = readFloat(input) * self->scale;
switch (timelineType) {
case ATTACHMENT_DEFORM: {
float *tempDeform;
int weighted, deformLength;
spDeformTimeline *timeline;
weighted = attachment->bones != 0;
deformLength = weighted ? attachment->verticesCount / 3 * 2 : attachment->verticesCount;
tempDeform = MALLOC(float, deformLength);
bezierCount = readVarint(input, 1);
timeline = spDeformTimeline_create(frameCount, deformLength, bezierCount, slotIndex,
attachment);
time = readFloat(input);
for (frame = 0, bezier = 0;; ++frame) {
float *deform;
int end = readVarint(input, 1);
if (!end) {
if (weighted) {
deform = tempDeform;
memset(deform, 0, sizeof(float) * deformLength);
} else
deform = attachment->vertices;
} else {
int v, start = readVarint(input, 1);
deform = tempDeform;
memset(deform, 0, sizeof(float) * start);
end += start;
if (self->scale == 1) {
for (v = start; v < end; ++v)
deform[v] = readFloat(input);
} else {
for (v = start; v < end; ++v)
deform[v] = readFloat(input) * self->scale;
}
memset(deform + v, 0, sizeof(float) * (deformLength - v));
if (!weighted) {
float *vertices = attachment->vertices;
for (v = 0; v < deformLength; ++v)
deform[v] += vertices[v];
}
}
spDeformTimeline_setFrame(timeline, frame, time, deform);
if (frame == frameLast) break;
time2 = readFloat(input);
switch (readSByte(input)) {
case CURVE_STEPPED:
spCurveTimeline_setStepped(SUPER(timeline), frame);
break;
case CURVE_BEZIER:
setBezier(input, SUPER(SUPER(timeline)), bezier++, frame, 0, time, time2, 0, 1, 1);
}
time = time2;
}
memset(deform + v, 0, sizeof(float) * (deformLength - v));
if (!weighted) {
float *vertices = attachment->vertices;
for (v = 0; v < deformLength; ++v)
deform[v] += vertices[v];
FREE(tempDeform);
spTimelineArray_add(timelines, (spTimeline *) timeline);
break;
}
case ATTACHMENT_SEQUENCE: {
int modeAndIndex;
float delay;
spSequenceTimeline *timeline = spSequenceTimeline_create(frameCount, slotIndex, (spAttachment *) attachment);
for (frame = 0; frame < frameCount; frame++) {
time = readFloat(input);
modeAndIndex = readInt(input);
delay = readFloat(input);
spSequenceTimeline_setFrame(timeline, frame, time, modeAndIndex & 0xf, modeAndIndex >> 4, delay);
}
spTimelineArray_add(timelines, (spTimeline *) timeline);
break;
}
spDeformTimeline_setFrame(timeline, frame, time, deform);
if (frame == frameLast) break;
time2 = readFloat(input);
switch (readSByte(input)) {
case CURVE_STEPPED:
spCurveTimeline_setStepped(SUPER(timeline), frame);
break;
case CURVE_BEZIER:
setBezier(input, SUPER(SUPER(timeline)), bezier++, frame, 0, time, time2, 0, 1, 1);
}
time = time2;
}
FREE(tempDeform);
spTimelineArray_add(timelines, (spTimeline *) timeline);
}
}
}
@ -917,20 +953,20 @@ static short *_readShortArray(_dataInput *input, int *length) {
return array;
}
static void _readVertices(spSkeletonBinary *self, _dataInput *input, spVertexAttachment *attachment,
int vertexCount) {
static void _readVertices(spSkeletonBinary *self, _dataInput *input, int *bonesCount, int **bones2, int *verticesCount,
float **vertices, int *worldVerticesLength, int vertexCount) {
int i, ii;
int verticesLength = vertexCount << 1;
spFloatArray *weights = spFloatArray_create(8);
spIntArray *bones = spIntArray_create(8);
attachment->worldVerticesLength = verticesLength;
*worldVerticesLength = verticesLength;
if (!readBoolean(input)) {
attachment->verticesCount = verticesLength;
attachment->vertices = _readFloatArray(input, verticesLength, self->scale);
attachment->bonesCount = 0;
attachment->bones = 0;
*verticesCount = verticesLength;
*vertices = _readFloatArray(input, verticesLength, self->scale);
*bonesCount = 0;
*bones2 = NULL;
spFloatArray_dispose(weights);
spIntArray_dispose(bones);
return;
@ -950,12 +986,12 @@ static void _readVertices(spSkeletonBinary *self, _dataInput *input, spVertexAtt
}
}
attachment->verticesCount = weights->size;
attachment->vertices = weights->items;
*verticesCount = weights->size;
*vertices = weights->items;
FREE(weights);
attachment->bonesCount = bones->size;
attachment->bones = bones->items;
*bonesCount = bones->size;
*bones2 = bones->items;
FREE(bones);
}
@ -972,33 +1008,52 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
switch (type) {
case SP_ATTACHMENT_REGION: {
const char *path = readStringRef(input, skeletonData);
spAttachment *attachment;
spRegionAttachment *region;
float rotation, x, y, scaleX, scaleY, width, height;
spColor color;
spSequence *sequence;
if (!path) MALLOC_STR(path, name);
else {
const char *tmp = 0;
MALLOC_STR(tmp, path);
path = tmp;
}
attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path);
region = SUB_CAST(spRegionAttachment, attachment);
region->path = path;
region->rotation = readFloat(input);
region->x = readFloat(input) * self->scale;
region->y = readFloat(input) * self->scale;
region->scaleX = readFloat(input);
region->scaleY = readFloat(input);
region->width = readFloat(input) * self->scale;
region->height = readFloat(input) * self->scale;
readColor(input, &region->color.r, &region->color.g, &region->color.b, &region->color.a);
spRegionAttachment_updateRegion(region);
spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment);
return attachment;
rotation = readFloat(input);
x = readFloat(input) * self->scale;
y = readFloat(input) * self->scale;
scaleX = readFloat(input);
scaleY = readFloat(input);
width = readFloat(input) * self->scale;
height = readFloat(input) * self->scale;
readColor(input, &color.r, &color.g, &color.b, &color.a);
sequence = readSequence(input);
{
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name,
path, sequence);
spRegionAttachment *region = SUB_CAST(spRegionAttachment, attachment);
region->path = path;
region->rotation = rotation;
region->x = x;
region->y = y;
region->scaleX = scaleX;
region->scaleY = scaleY;
region->width = width;
region->height = height;
spColor_setFromColor(&region->color, &color);
region->sequence = sequence;
if (sequence == NULL) spRegionAttachment_updateRegion(region);
spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment);
return attachment;
}
}
case SP_ATTACHMENT_BOUNDING_BOX: {
int vertexCount = readVarint(input, 1);
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, NULL);
_readVertices(self, input, SUB_CAST(spVertexAttachment, attachment), vertexCount);
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0,
NULL);
spVertexAttachment *vertexAttachment = SUB_CAST(spVertexAttachment, attachment);
_readVertices(self, input, &vertexAttachment->bonesCount, &vertexAttachment->bones,
&vertexAttachment->verticesCount, &vertexAttachment->vertices,
&vertexAttachment->worldVerticesLength, vertexCount);
if (nonessential) {
spBoundingBoxAttachment *bbox = SUB_CAST(spBoundingBoxAttachment, attachment);
readColor(input, &bbox->color.r, &bbox->color.g, &bbox->color.b, &bbox->color.a);
@ -1008,43 +1063,73 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
}
case SP_ATTACHMENT_MESH: {
int vertexCount;
spAttachment *attachment;
spMeshAttachment *mesh;
const char *path = readStringRef(input, skeletonData);
spColor color;
float *regionUVs;
unsigned short *triangles;
int trianglesCount;
int *bones;
int bonesCount;
float *vertices;
int verticesCount;
int worldVerticesLength;
int hullLength;
spSequence *sequence;
int *edges = NULL;
int edgesCount = 0;
float width = 0;
float height = 0;
if (!path) MALLOC_STR(path, name);
else {
const char *tmp = 0;
MALLOC_STR(tmp, path);
path = tmp;
}
attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path);
mesh = SUB_CAST(spMeshAttachment, attachment);
mesh->path = path;
readColor(input, &mesh->color.r, &mesh->color.g, &mesh->color.b, &mesh->color.a);
readColor(input, &color.r, &color.g, &color.b, &color.a);
vertexCount = readVarint(input, 1);
mesh->regionUVs = _readFloatArray(input, vertexCount << 1, 1);
mesh->triangles = (unsigned short *) _readShortArray(input, &mesh->trianglesCount);
_readVertices(self, input, SUPER(mesh), vertexCount);
spMeshAttachment_updateRegion(mesh);
mesh->hullLength = readVarint(input, 1) << 1;
regionUVs = _readFloatArray(input, vertexCount << 1, 1);
triangles = (unsigned short *) _readShortArray(input, &trianglesCount);
_readVertices(self, input, &bonesCount, &bones, &verticesCount, &vertices, &worldVerticesLength, vertexCount);
hullLength = readVarint(input, 1) << 1;
sequence = readSequence(input);
if (nonessential) {
mesh->edges = (int *) _readShortArray(input, &mesh->edgesCount);
mesh->width = readFloat(input) * self->scale;
mesh->height = readFloat(input) * self->scale;
} else {
mesh->edges = 0;
mesh->width = 0;
mesh->height = 0;
edges = (int *) _readShortArray(input, &edgesCount);
width = readFloat(input) * self->scale;
height = readFloat(input) * self->scale;
}
{
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path, sequence);
spMeshAttachment *mesh = SUB_CAST(spMeshAttachment, attachment);
mesh->path = path;
spColor_setFromColor(&mesh->color, &color);
mesh->regionUVs = regionUVs;
mesh->triangles = triangles;
mesh->trianglesCount = trianglesCount;
mesh->super.vertices = vertices;
mesh->super.verticesCount = verticesCount;
mesh->super.bones = bones;
mesh->super.bonesCount = bonesCount;
mesh->super.worldVerticesLength = worldVerticesLength;
mesh->hullLength = hullLength;
mesh->edges = edges;
mesh->edgesCount = edgesCount;
mesh->width = width;
mesh->height = height;
mesh->sequence = sequence;
if (sequence == NULL) spMeshAttachment_updateRegion(mesh);
spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment);
return attachment;
}
spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment);
return attachment;
}
case SP_ATTACHMENT_LINKED_MESH: {
spColor color;
float width = 0, height = 0;
const char *skinName;
const char *parent;
spAttachment *attachment;
spMeshAttachment *mesh;
int inheritDeform;
int inheritTimeline;
spSequence *sequence;
const char *path = readStringRef(input, skeletonData);
if (!path) MALLOC_STR(path, name);
else {
@ -1052,28 +1137,41 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
MALLOC_STR(tmp, path);
path = tmp;
}
attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path);
mesh = SUB_CAST(spMeshAttachment, attachment);
mesh->path = path;
readColor(input, &mesh->color.r, &mesh->color.g, &mesh->color.b, &mesh->color.a);
readColor(input, &color.r, &color.g, &color.b, &color.a);
skinName = readStringRef(input, skeletonData);
parent = readStringRef(input, skeletonData);
inheritDeform = readBoolean(input);
inheritTimeline = readBoolean(input);
sequence = readSequence(input);
if (nonessential) {
mesh->width = readFloat(input) * self->scale;
mesh->height = readFloat(input) * self->scale;
width = readFloat(input) * self->scale;
height = readFloat(input) * self->scale;
}
{
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path, sequence);
spMeshAttachment *mesh = SUB_CAST(spMeshAttachment, attachment);
mesh->path = path;
spColor_setFromColor(&mesh->color, &color);
mesh->sequence = sequence;
mesh->width = width;
mesh->height = height;
_spSkeletonBinary_addLinkedMesh(self, mesh, skinName, slotIndex, parent, inheritTimeline);
return attachment;
}
_spSkeletonBinary_addLinkedMesh(self, mesh, skinName, slotIndex, parent, inheritDeform);
return attachment;
}
case SP_ATTACHMENT_PATH: {
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, NULL);
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0,
NULL);
spPathAttachment *path = SUB_CAST(spPathAttachment, attachment);
spVertexAttachment *vertexAttachment = SUPER(path);
int vertexCount = 0;
path->closed = readBoolean(input);
path->constantSpeed = readBoolean(input);
vertexCount = readVarint(input, 1);
_readVertices(self, input, SUPER(path), vertexCount);
_readVertices(self, input, &vertexAttachment->bonesCount, &vertexAttachment->bones,
&vertexAttachment->verticesCount, &vertexAttachment->vertices,
&vertexAttachment->worldVerticesLength, vertexCount);
path->lengthsLength = vertexCount / 3;
path->lengths = MALLOC(float, path->lengthsLength);
for (i = 0; i < path->lengthsLength; ++i) {
@ -1086,7 +1184,8 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
return attachment;
}
case SP_ATTACHMENT_POINT: {
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, NULL);
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0,
NULL);
spPointAttachment *point = SUB_CAST(spPointAttachment, attachment);
point->rotation = readFloat(input);
point->x = readFloat(input) * self->scale;
@ -1101,9 +1200,13 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput
case SP_ATTACHMENT_CLIPPING: {
int endSlotIndex = readVarint(input, 1);
int vertexCount = readVarint(input, 1);
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, NULL);
spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0,
NULL);
spClippingAttachment *clip = SUB_CAST(spClippingAttachment, attachment);
_readVertices(self, input, SUB_CAST(spVertexAttachment, attachment), vertexCount);
spVertexAttachment *vertexAttachment = SUPER(clip);
_readVertices(self, input, &vertexAttachment->bonesCount, &vertexAttachment->bones,
&vertexAttachment->verticesCount, &vertexAttachment->vertices,
&vertexAttachment->worldVerticesLength, vertexCount);
if (nonessential) {
readColor(input, &clip->color.r, &clip->color.g, &clip->color.b, &clip->color.a);
}
@ -1168,6 +1271,18 @@ spSkeletonData *spSkeletonBinary_readSkeletonDataFile(spSkeletonBinary *self, co
return skeletonData;
}
static int string_starts_with(const char *str, const char *needle) {
int lenStr, lenNeedle, i;
if (!str) return 0;
lenStr = strlen(str);
lenNeedle = strlen(needle);
if (lenStr < lenNeedle) return 0;
for (i = 0; i < lenNeedle; i++) {
if (str[i] != needle[i]) return 0;
}
return -1;
}
spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const unsigned char *binary,
const int length) {
int i, n, ii, nonessential;
@ -1189,12 +1304,19 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const
highHash = readInt(input);
sprintf(buffer, "%x%x", highHash, lowHash);
buffer[31] = 0;
skeletonData->hash = strdup(buffer);
MALLOC_STR(skeletonData->hash, buffer);
skeletonData->version = readString(input);
if (!strlen(skeletonData->version)) {
FREE(skeletonData->version);
skeletonData->version = 0;
} else {
if (!string_starts_with(skeletonData->version, SPINE_VERSION_STRING)) {
char errorMsg[255];
sprintf(errorMsg, "Skeleton version %s does not match runtime version %s", skeletonData->version, SPINE_VERSION_STRING);
_spSkeletonBinary_setError(self, errorMsg, NULL);
return NULL;
}
}
skeletonData->x = readFloat(input);
@ -1418,10 +1540,10 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const
_spSkeletonBinary_setError(self, "Parent mesh not found: ", linkedMesh->parent);
return NULL;
}
linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritDeform ? parent
: SUPER(SUPER(linkedMesh->mesh));
linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritTimeline ? parent
: SUPER(SUPER(linkedMesh->mesh));
spMeshAttachment_setParentMesh(linkedMesh->mesh, SUB_CAST(spMeshAttachment, parent));
spMeshAttachment_updateRegion(linkedMesh->mesh);
if (linkedMesh->mesh->region) spMeshAttachment_updateRegion(linkedMesh->mesh);
spAttachmentLoader_configureAttachment(self->attachmentLoader, SUPER(SUPER(linkedMesh->mesh)));
}

View File

@ -28,22 +28,19 @@
*****************************************************************************/
#include "Json.h"
#include <spine/Version.h>
#include <spine/Array.h>
#include <spine/AtlasAttachmentLoader.h>
#include <spine/SkeletonJson.h>
#include <spine/extension.h>
#include <stdio.h>
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
#define strdup _strdup
#endif
typedef struct {
const char *parent;
const char *skin;
int slotIndex;
spMeshAttachment *mesh;
int inheritDeform;
int inheritTimeline;
} _spLinkedMesh;
typedef struct {
@ -188,6 +185,16 @@ readTimeline2(Json *keyMap, spCurveTimeline2 *timeline, const char *name1, const
return SUPER(timeline);
}
static spSequence *readSequence(Json *item) {
spSequence *sequence;
if (item == NULL) return NULL;
sequence = spSequence_create(Json_getInt(item, "count", 0));
sequence->start = Json_getInt(item, "start", 1);
sequence->digits = Json_getInt(item, "digits", 0);
sequence->setupIndex = Json_getInt(item, "setupIndex", 0);
return sequence;
}
static void _spSkeletonJson_addLinkedMesh(spSkeletonJson *self, spMeshAttachment *mesh, const char *skin, int slotIndex,
const char *parent, int inheritDeform) {
_spLinkedMesh *linkedMesh;
@ -208,7 +215,7 @@ static void _spSkeletonJson_addLinkedMesh(spSkeletonJson *self, spMeshAttachment
linkedMesh->skin = skin;
linkedMesh->slotIndex = slotIndex;
linkedMesh->parent = parent;
linkedMesh->inheritDeform = inheritDeform;
linkedMesh->inheritTimeline = inheritDeform;
}
static void cleanUpTimelines(spTimelineArray *timelines) {
@ -268,10 +275,11 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro
Json *ik = Json_getItem(root, "ik");
Json *transform = Json_getItem(root, "transform");
Json *paths = Json_getItem(root, "path");
Json *deformJson = Json_getItem(root, "deform");
Json *attachmentsJson = Json_getItem(root, "attachments");
Json *drawOrderJson = Json_getItem(root, "drawOrder");
Json *events = Json_getItem(root, "events");
Json *boneMap, *slotMap, *constraintMap, *keyMap, *nextMap, *curve, *timelineMap;
Json *boneMap, *slotMap, *keyMap, *nextMap, *curve, *timelineMap;
Json *attachmentsMap, *constraintMap;
int frame, bezier, i, n;
spColor color, color2, newColor, newColor2;
@ -286,7 +294,7 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro
spAttachmentTimeline *timeline = spAttachmentTimeline_create(frames, slotIndex);
for (keyMap = timelineMap->child, frame = 0; keyMap; keyMap = keyMap->next, ++frame) {
spAttachmentTimeline_setFrame(timeline, frame, Json_getFloat(keyMap, "time", 0),
Json_getItem(keyMap, "name")->valueString);
Json_getItem(keyMap, "name") ? Json_getItem(keyMap, "name")->valueString : NULL);
}
spTimelineArray_add(timelines, SUPER(timeline));
@ -691,82 +699,114 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro
}
}
/* Deform timelines. */
for (constraintMap = deformJson ? deformJson->child : 0; constraintMap; constraintMap = constraintMap->next) {
spSkin *skin = spSkeletonData_findSkin(skeletonData, constraintMap->name);
for (slotMap = constraintMap->child; slotMap; slotMap = slotMap->next) {
/* Attachment timelines. */
for (attachmentsMap = attachmentsJson ? attachmentsJson->child : 0; attachmentsMap; attachmentsMap = attachmentsMap->next) {
spSkin *skin = spSkeletonData_findSkin(skeletonData, attachmentsMap->name);
for (slotMap = attachmentsMap->child; slotMap; slotMap = slotMap->next) {
Json *attachmentMap;
int slotIndex = findSlotIndex(self, skeletonData, slotMap->name, timelines);
if (slotIndex == -1) return NULL;
for (timelineMap = slotMap->child; timelineMap; timelineMap = timelineMap->next) {
float *tempDeform;
spVertexAttachment *attachment;
int weighted, deformLength;
spDeformTimeline *timeline;
float time;
keyMap = timelineMap->child;
if (keyMap == NULL) continue;
attachment = SUB_CAST(spVertexAttachment, spSkin_getAttachment(skin, slotIndex, timelineMap->name));
if (!attachment) {
for (attachmentMap = slotMap->child; attachmentMap; attachmentMap = attachmentMap->next) {
spAttachment *baseAttachment = spSkin_getAttachment(skin, slotIndex, attachmentMap->name);
if (!baseAttachment) {
cleanUpTimelines(timelines);
_spSkeletonJson_setError(self, 0, "Attachment not found: ", timelineMap->name);
_spSkeletonJson_setError(self, 0, "Attachment not found: ", attachmentMap->name);
return NULL;
}
weighted = attachment->bones != 0;
deformLength = weighted ? attachment->verticesCount / 3 * 2 : attachment->verticesCount;
tempDeform = MALLOC(float, deformLength);
timeline = spDeformTimeline_create(timelineMap->size, deformLength, timelineMap->size, slotIndex,
attachment);
time = Json_getFloat(keyMap, "time", 0);
for (frame = 0, bezier = 0;; ++frame) {
Json *vertices = Json_getItem(keyMap, "vertices");
float *deform;
float time2;
for (timelineMap = attachmentMap->child; timelineMap; timelineMap = timelineMap->next) {
int frames;
const char *timelineName;
keyMap = timelineMap->child;
if (keyMap == NULL) continue;
frames = timelineMap->size;
timelineName = timelineMap->name;
if (!strcmp("deform", timelineName)) {
float *tempDeform;
spVertexAttachment *vertexAttachment;
int weighted, deformLength;
spDeformTimeline *timeline;
float time;
if (!vertices) {
if (weighted) {
deform = tempDeform;
memset(deform, 0, sizeof(float) * deformLength);
} else
deform = attachment->vertices;
} else {
int v, start = Json_getInt(keyMap, "offset", 0);
Json *vertex;
deform = tempDeform;
memset(deform, 0, sizeof(float) * start);
if (self->scale == 1) {
for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v)
deform[v] = vertex->valueFloat;
} else {
for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v)
deform[v] = vertex->valueFloat * self->scale;
vertexAttachment = SUB_CAST(spVertexAttachment, baseAttachment);
weighted = vertexAttachment->bones != 0;
deformLength = weighted ? vertexAttachment->verticesCount / 3 * 2 : vertexAttachment->verticesCount;
tempDeform = MALLOC(float, deformLength);
timeline = spDeformTimeline_create(timelineMap->size, deformLength, timelineMap->size,
slotIndex,
vertexAttachment);
time = Json_getFloat(keyMap, "time", 0);
for (frame = 0, bezier = 0;; ++frame) {
Json *vertices = Json_getItem(keyMap, "vertices");
float *deform;
float time2;
if (!vertices) {
if (weighted) {
deform = tempDeform;
memset(deform, 0, sizeof(float) * deformLength);
} else
deform = vertexAttachment->vertices;
} else {
int v, start = Json_getInt(keyMap, "offset", 0);
Json *vertex;
deform = tempDeform;
memset(deform, 0, sizeof(float) * start);
if (self->scale == 1) {
for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v)
deform[v] = vertex->valueFloat;
} else {
for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v)
deform[v] = vertex->valueFloat * self->scale;
}
memset(deform + v, 0, sizeof(float) * (deformLength - v));
if (!weighted) {
float *verticesValues = vertexAttachment->vertices;
for (v = 0; v < deformLength; ++v)
deform[v] += verticesValues[v];
}
}
spDeformTimeline_setFrame(timeline, frame, time, deform);
nextMap = keyMap->next;
if (!nextMap) {
/* timeline.shrink(); // BOZO */
break;
}
time2 = Json_getFloat(nextMap, "time", 0);
curve = Json_getItem(keyMap, "curve");
if (curve) {
bezier = readCurve(curve, SUPER(timeline), bezier, frame, 0, time, time2, 0, 1, 1);
}
time = time2;
keyMap = nextMap;
}
memset(deform + v, 0, sizeof(float) * (deformLength - v));
if (!weighted) {
float *verticesValues = attachment->vertices;
for (v = 0; v < deformLength; ++v)
deform[v] += verticesValues[v];
FREE(tempDeform);
spTimelineArray_add(timelines, SUPER(SUPER(timeline)));
} else if (!strcmp(timelineName, "sequence")) {
spSequenceTimeline *timeline = spSequenceTimeline_create(frames, slotIndex, baseAttachment);
float lastDelay = 0;
for (frame = 0; keyMap != NULL; keyMap = keyMap->next, frame++) {
float delay = Json_getFloat(keyMap, "delay", lastDelay);
float time = Json_getFloat(keyMap, "time", 0);
const char *modeString = Json_getString(keyMap, "mode", "hold");
int index = Json_getInt(keyMap, "index", 0);
int mode = SP_SEQUENCE_MODE_HOLD;
if (!strcmp(modeString, "once")) mode = SP_SEQUENCE_MODE_ONCE;
if (!strcmp(modeString, "loop")) mode = SP_SEQUENCE_MODE_LOOP;
if (!strcmp(modeString, "pingpong")) mode = SP_SEQUENCE_MODE_PINGPONG;
if (!strcmp(modeString, "onceReverse")) mode = SP_SEQUENCE_MODE_ONCEREVERSE;
if (!strcmp(modeString, "loopReverse")) mode = SP_SEQUENCE_MODE_LOOPREVERSE;
if (!strcmp(modeString, "pingpongReverse")) mode = SP_SEQUENCE_MODE_PINGPONGREVERSE;
spSequenceTimeline_setFrame(timeline, frame, time, mode, index, delay);
lastDelay = delay;
}
spTimelineArray_add(timelines, SUPER(timeline));
}
spDeformTimeline_setFrame(timeline, frame, time, deform);
nextMap = keyMap->next;
if (!nextMap) {
/* timeline.shrink(); // BOZO */
break;
}
time2 = Json_getFloat(nextMap, "time", 0);
curve = Json_getItem(keyMap, "curve");
if (curve) {
bezier = readCurve(curve, SUPER(timeline), bezier, frame, 0, time, time2, 0, 1, 1);
}
time = time2;
keyMap = nextMap;
}
FREE(tempDeform);
spTimelineArray_add(timelines, SUPER(SUPER(timeline)));
}
}
}
@ -910,6 +950,18 @@ spSkeletonData *spSkeletonJson_readSkeletonDataFile(spSkeletonJson *self, const
return skeletonData;
}
static int string_starts_with(const char *str, const char *needle) {
int lenStr, lenNeedle, i;
if (!str) return 0;
lenStr = (int)strlen(str);
lenNeedle = (int)strlen(needle);
if (lenStr < lenNeedle) return 0;
for (i = 0; i < lenNeedle; i++) {
if (str[i] != needle[i]) return 0;
}
return -1;
}
spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char *json) {
int i, ii;
spSkeletonData *skeletonData;
@ -932,15 +984,29 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
if (skeleton) {
MALLOC_STR(skeletonData->hash, Json_getString(skeleton, "hash", 0));
MALLOC_STR(skeletonData->version, Json_getString(skeleton, "spine", 0));
if (!string_starts_with(skeletonData->version, SPINE_VERSION_STRING)) {
char errorMsg[255];
sprintf(errorMsg, "Skeleton version %s does not match runtime version %s", skeletonData->version, SPINE_VERSION_STRING);
_spSkeletonJson_setError(self, 0, errorMsg, NULL);
return NULL;
}
skeletonData->x = Json_getFloat(skeleton, "x", 0);
skeletonData->y = Json_getFloat(skeleton, "y", 0);
skeletonData->width = Json_getFloat(skeleton, "width", 0);
skeletonData->height = Json_getFloat(skeleton, "height", 0);
skeletonData->fps = Json_getFloat(skeleton, "fps", 30);
skeletonData->imagesPath = Json_getString(skeleton, "images", 0);
if (skeletonData->imagesPath) skeletonData->imagesPath = strdup(skeletonData->imagesPath);
if (skeletonData->imagesPath) {
char *tmp = NULL;
MALLOC_STR(tmp, skeletonData->imagesPath);
skeletonData->imagesPath = tmp;
}
skeletonData->audioPath = Json_getString(skeleton, "audio", 0);
if (skeletonData->audioPath) skeletonData->audioPath = strdup(skeletonData->audioPath);
if (skeletonData->audioPath) {
char *tmp = NULL;
MALLOC_STR(tmp, skeletonData->audioPath);
skeletonData->audioPath = tmp;
}
}
/* Bones. */
@ -1297,6 +1363,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
const char *path = Json_getString(attachmentMap, "path", attachmentName);
const char *color;
Json *entry;
spSequence *sequence;
const char *typeString = Json_getString(attachmentMap, "type", "region");
spAttachmentType type;
@ -1319,8 +1386,9 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
return NULL;
}
sequence = readSequence(Json_getItem(attachmentMap, "sequence"));
attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, attachmentName,
path);
path, sequence);
if (!attachment) {
if (self->attachmentLoader->error1) {
spSkeletonData_dispose(skeletonData);
@ -1342,6 +1410,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
region->rotation = Json_getFloat(attachmentMap, "rotation", 0);
region->width = Json_getFloat(attachmentMap, "width", 32) * self->scale;
region->height = Json_getFloat(attachmentMap, "height", 32) * self->scale;
region->sequence = sequence;
color = Json_getString(attachmentMap, "color", 0);
if (color) {
@ -1352,7 +1421,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
toColor(color, 3));
}
spRegionAttachment_updateRegion(region);
if (region->region != NULL) spRegionAttachment_updateRegion(region);
spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment);
break;
@ -1374,6 +1443,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
mesh->width = Json_getFloat(attachmentMap, "width", 32) * self->scale;
mesh->height = Json_getFloat(attachmentMap, "height", 32) * self->scale;
mesh->sequence = sequence;
entry = Json_getItem(attachmentMap, "parent");
if (!entry) {
@ -1392,7 +1462,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
_readVertices(self, attachmentMap, SUPER(mesh), verticesLength);
spMeshAttachment_updateRegion(mesh);
if (mesh->region != NULL) spMeshAttachment_updateRegion(mesh);
mesh->hullLength = Json_getInt(attachmentMap, "hull", 0);
@ -1406,10 +1476,10 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment);
} else {
int inheritDeform = Json_getInt(attachmentMap, "deform", 1);
int inheritTimelines = Json_getInt(attachmentMap, "timelines", 1);
_spSkeletonJson_addLinkedMesh(self, SUB_CAST(spMeshAttachment, attachment),
Json_getString(attachmentMap, "skin", 0), slot->index,
entry->valueString, inheritDeform);
entry->valueString, inheritTimelines);
}
break;
}
@ -1514,10 +1584,10 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
_spSkeletonJson_setError(self, 0, "Parent mesh not found: ", linkedMesh->parent);
return NULL;
}
linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritDeform ? parent
: SUPER(SUPER(linkedMesh->mesh));
linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritTimeline ? parent
: SUPER(SUPER(linkedMesh->mesh));
spMeshAttachment_setParentMesh(linkedMesh->mesh, SUB_CAST(spMeshAttachment, parent));
spMeshAttachment_updateRegion(linkedMesh->mesh);
if (linkedMesh->mesh->region != NULL) spMeshAttachment_updateRegion(linkedMesh->mesh);
spAttachmentLoader_configureAttachment(self->attachmentLoader, SUPER(SUPER(linkedMesh->mesh)));
}

View File

@ -45,6 +45,7 @@ The Spine cocos2d-objc example works on iOS simulators and devices.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2d-objc` folder
5. Type `mkdir build && cd build && cmake ../..`, this will download the cocos2d-objc dependency
6. Open the Xcode project in `spine-runtimes/spine-cocos2d-objc/spine-cocos2d-objc.xcodeproj/`
7. In the file `spine-runtimes/spine-cocos2d-objc/cocos2d/cocos2d/CCRendererBasicTypes.m`, change line 56 from `-(id)objectForKey:(id<NSCopying>)options` to `-(id)objectForKey:(id)options`. This will allow building cocos2d-objc with the latest Xcode version.
7. In Xcode, click the `Run` button or type `CMD+R` to run the example on the simulator
## Links

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "svidebPqqeg",
"spine": "4.0.31",
"hash": "oo0dBSCqNHM",
"spine": "4.1.23-beta",
"x": -152.5,
"y": -151,
"width": 305,

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "PtTAK+zF95I",
"spine": "4.0.31",
"hash": "CdaHvXeCMjE",
"spine": "4.1.23-beta",
"x": -134.12,
"y": -3.28,
"width": 266.94,
@ -571,7 +571,7 @@
"eyes": {
"attachment": [
{ "time": 0.7, "name": "eyes-closed" },
{ "time": 0.8, "name": null }
{ "time": 0.8 }
]
}
},
@ -899,309 +899,331 @@
]
}
},
"deform": {
"attachments": {
"default": {
"right-hand-item": {
"dagger": [
{
"offset": 26,
"vertices": [ 2.34755, 0.1447 ],
"curve": [ 0.125, 0, 0.375, 1 ]
},
{
"time": 0.5,
"offset": 8,
"vertices": [ -1.19415, 4.31532, 0.07279, 6.41351, 1.66048, 6.18883, 1.75233, 3.59555 ],
"curve": [ 0.625, 0, 0.875, 1 ]
},
{
"time": 1,
"offset": 26,
"vertices": [ 2.34755, 0.1447 ]
}
]
"dagger": {
"deform": [
{
"offset": 26,
"vertices": [ 2.34755, 0.1447 ],
"curve": [ 0.125, 0, 0.375, 1 ]
},
{
"time": 0.5,
"offset": 8,
"vertices": [ -1.19415, 4.31532, 0.07279, 6.41351, 1.66048, 6.18883, 1.75233, 3.59555 ],
"curve": [ 0.625, 0, 0.875, 1 ]
},
{
"time": 1,
"offset": 26,
"vertices": [ 2.34755, 0.1447 ]
}
]
}
}
},
"goblin": {
"head": {
"head": [
{
"curve": [ 0.127, 0, 0.15, 1 ]
},
{
"time": 0.2,
"vertices": [ -10.97827, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08392, -1.08534, 0.08392, -1.08534, 0.08392, 0, 0, -2.22325, 2.66465, -4.83295, 2.70085, -5.70553, -0.51941, -3.15962, -1.61502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64742, 0.81612, -11.82286, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08392 ],
"curve": [ 0.242, 0, 0.325, 1 ]
},
{
"time": 0.3667,
"vertices": [ 10.69276, 4.05949, 3.66373, 1.85427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09018, 1.47305, 0.09018, 1.47305, 0.09018, 0, 0, 2.69653, -0.22738, 3.77135, 0.11418, 3.6893, 1.55352, 2.49595, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45881, -3.9113, 9.19594, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09018 ],
"curve": [ 0.574, 0, 0.617, 1 ]
},
{
"time": 0.7,
"vertices": [ -10.97827, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17551, -0.17183, -1.17551, -0.17183, -1.17551, -0.17183, 0, 0, -2.22325, 2.66465, -4.83295, 2.70085, -5.70553, -0.51941, -3.15962, -1.61502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64742, 0.81612, -11.82286, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17551, -0.17183 ],
"curve": [ 0.742, 0, 0.825, 1 ]
},
{
"time": 0.8667,
"vertices": [ 10.69276, 4.05949, 3.66373, 1.85427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446, 0.38687, 0.08446, 0.38687, 0.08446, 0, 0, 2.69653, -0.22738, 3.77135, 0.11418, 3.6893, 1.55352, 2.49595, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45881, -3.9113, 9.19594, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446 ],
"curve": [ 0.9, 0, 0.967, 1 ]
},
{ "time": 1 }
]
"head": {
"deform": [
{
"curve": [ 0.127, 0, 0.15, 1 ]
},
{
"time": 0.2,
"vertices": [ -10.97827, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08392, -1.08534, 0.08392, -1.08534, 0.08392, 0, 0, -2.22325, 2.66465, -4.83295, 2.70085, -5.70553, -0.51941, -3.15962, -1.61502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64742, 0.81612, -11.82286, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08392 ],
"curve": [ 0.242, 0, 0.325, 1 ]
},
{
"time": 0.3667,
"vertices": [ 10.69276, 4.05949, 3.66373, 1.85427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09018, 1.47305, 0.09018, 1.47305, 0.09018, 0, 0, 2.69653, -0.22738, 3.77135, 0.11418, 3.6893, 1.55352, 2.49595, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45881, -3.9113, 9.19594, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09018 ],
"curve": [ 0.574, 0, 0.617, 1 ]
},
{
"time": 0.7,
"vertices": [ -10.97827, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17551, -0.17183, -1.17551, -0.17183, -1.17551, -0.17183, 0, 0, -2.22325, 2.66465, -4.83295, 2.70085, -5.70553, -0.51941, -3.15962, -1.61502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64742, 0.81612, -11.82286, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17551, -0.17183 ],
"curve": [ 0.742, 0, 0.825, 1 ]
},
{
"time": 0.8667,
"vertices": [ 10.69276, 4.05949, 3.66373, 1.85427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446, 0.38687, 0.08446, 0.38687, 0.08446, 0, 0, 2.69653, -0.22738, 3.77135, 0.11418, 3.6893, 1.55352, 2.49595, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45881, -3.9113, 9.19594, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446 ],
"curve": [ 0.9, 0, 0.967, 1 ]
},
{ "time": 1 }
]
}
},
"left-foot": {
"left-foot": [
{
"offset": 8,
"vertices": [ 3.69298, 2.37573, -7.16969, 18.79733, -12.78162, 14.7778, -12.75776, 6.50514, -3.13476, 1.98906, -0.44402, 0.36629, 0, 0, -3.80085, 2.98474 ]
},
{ "time": 0.1333 },
{
"time": 0.2333,
"offset": 8,
"vertices": [ -3.96073, -2.34594, -5.80446, -12.47629, -2.2313, -12.99038, 2.02942, -9.1036, 0, 0, 0, 0, 0, 0, -1.35254, -5.2883 ]
},
{
"time": 0.3667,
"offset": 8,
"vertices": [ 0.66505, 0.33548, 0.33902, 2.69014, -0.48171, 2.54524, -1.13593, 1.38562, 0, 0, 0, 0, 0, 0, -0.11908, 0.79273 ]
},
{ "time": 0.5, "curve": "stepped" },
{ "time": 0.6333 },
{
"time": 0.7333,
"offset": 8,
"vertices": [ -2.97738, 9.40254, -6.91661, 19.92794, -10.55287, 18.41085, -12.37161, 12.38473, -4.72607, 6.30799, 0, 0, -1.48902, 4.88944, -7.06773, 10.70102 ]
},
{
"time": 0.8333,
"offset": 6,
"vertices": [ 1.05319, 1.56362, -2.52723, 7.9974, -5.52031, 17.14137, -8.93317, 15.79635, -10.73748, 10.22056, -4.23801, 5.36992, 0, 0, 0, 0, -5.83148, 8.55532 ]
},
{
"time": 1,
"offset": 8,
"vertices": [ 3.69298, 2.37573, -7.16969, 18.79733, -12.78162, 14.7778, -12.75776, 6.50514, -3.13476, 1.98906, -0.44402, 0.36629, 0, 0, -3.80085, 2.98474 ]
}
]
"left-foot": {
"deform": [
{
"offset": 8,
"vertices": [ 3.69298, 2.37573, -7.16969, 18.79733, -12.78162, 14.7778, -12.75776, 6.50514, -3.13476, 1.98906, -0.44402, 0.36629, 0, 0, -3.80085, 2.98474 ]
},
{ "time": 0.1333 },
{
"time": 0.2333,
"offset": 8,
"vertices": [ -3.96073, -2.34594, -5.80446, -12.47629, -2.2313, -12.99038, 2.02942, -9.1036, 0, 0, 0, 0, 0, 0, -1.35254, -5.2883 ]
},
{
"time": 0.3667,
"offset": 8,
"vertices": [ 0.66505, 0.33548, 0.33902, 2.69014, -0.48171, 2.54524, -1.13593, 1.38562, 0, 0, 0, 0, 0, 0, -0.11908, 0.79273 ]
},
{ "time": 0.5, "curve": "stepped" },
{ "time": 0.6333 },
{
"time": 0.7333,
"offset": 8,
"vertices": [ -2.97738, 9.40254, -6.91661, 19.92794, -10.55287, 18.41085, -12.37161, 12.38473, -4.72607, 6.30799, 0, 0, -1.48902, 4.88944, -7.06773, 10.70102 ]
},
{
"time": 0.8333,
"offset": 6,
"vertices": [ 1.05319, 1.56362, -2.52723, 7.9974, -5.52031, 17.14137, -8.93317, 15.79635, -10.73748, 10.22056, -4.23801, 5.36992, 0, 0, 0, 0, -5.83148, 8.55532 ]
},
{
"time": 1,
"offset": 8,
"vertices": [ 3.69298, 2.37573, -7.16969, 18.79733, -12.78162, 14.7778, -12.75776, 6.50514, -3.13476, 1.98906, -0.44402, 0.36629, 0, 0, -3.80085, 2.98474 ]
}
]
}
},
"pelvis": {
"pelvis": [
{},
{
"time": 0.1333,
"offset": 6,
"vertices": [ -0.6899, -4.13284 ]
},
{
"time": 0.3333,
"offset": 6,
"vertices": [ -1.04945, -3.10477 ]
},
{
"time": 0.7,
"offset": 6,
"vertices": [ -1.4245, -6.30617 ]
},
{
"time": 0.8667,
"offset": 6,
"vertices": [ -1.13542, -1.79036 ]
},
{ "time": 1 }
]
"pelvis": {
"deform": [
{},
{
"time": 0.1333,
"offset": 6,
"vertices": [ -0.6899, -4.13284 ]
},
{
"time": 0.3333,
"offset": 6,
"vertices": [ -1.04945, -3.10477 ]
},
{
"time": 0.7,
"offset": 6,
"vertices": [ -1.4245, -6.30617 ]
},
{
"time": 0.8667,
"offset": 6,
"vertices": [ -1.13542, -1.79036 ]
},
{ "time": 1 }
]
}
},
"right-foot": {
"right-foot": [
{},
{
"time": 0.1333,
"offset": 2,
"vertices": [ -2.81259, 2.63115, -2.35238, 3.89441, -1.99921, 4.8639, -0.93273, 5.57982, -0.48886, 5.09855, -0.34813, 3.42912, -0.17446, 1.36899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.31305, 1.91372, -1.32986, 3.65703 ]
},
{
"time": 0.2333,
"offset": 2,
"vertices": [ -6.39088, 6.41246, -7.74575, 8.27192, -7.02471, 11.35894, -4.03471, 13.93454, -2.50399, 12.62963, -1.46125, 7.58915, -0.17446, 1.36899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.84766, 2.61216, -4.53956, 7.92358 ]
},
{
"time": 0.3,
"offset": 2,
"vertices": [ -8.27185, 6.68822, -9.29764, 10.13797, -8.62231, 14.7134, -4.5863, 18.81939, -2.20304, 17.10709, -0.07795, 9.9046, 2.54452, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94625, 2.38008, -4.59399, 10.01888 ]
},
{
"time": 0.3667,
"offset": 2,
"vertices": [ -10.47684, 9.44176, -13.36883, 12.40983, -14.32569, 16.94392, -9.24463, 23.55674, -5.51712, 21.51378, -1.19582, 11.53193, 2.54452, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.14848, 2.29389, -6.63419, 11.37127 ]
},
{
"time": 0.5,
"offset": 2,
"vertices": [ -5.42474, 4.36854, -10.59004, 7.04468, -11.64251, 11.55845, -6.19665, 20.12806, -1.45498, 18.05411, 4.8662, 6.41679, 2.81463, 0.27601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.96412, 4.9483 ]
},
{ "time": 0.6333 },
{
"time": 0.7333,
"offset": 4,
"vertices": [ 1.31462, -6.84099, -0.87905, -12.54479, -5.9851, -14.08368, -7.15892, -11.63194, -5.6792, -4.83545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06164, -6.93844 ]
},
{
"time": 0.8,
"offset": 4,
"vertices": [ 0.65731, -3.4205, -0.43953, -6.2724, -2.99255, -7.04184, -3.57946, -5.81597, -2.8396, -2.41772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79688, -1.28021, 0, 0, 0, 0, -1.03082, -3.46922 ]
},
{ "time": 0.8667 }
]
"right-foot": {
"deform": [
{},
{
"time": 0.1333,
"offset": 2,
"vertices": [ -2.81259, 2.63115, -2.35238, 3.89441, -1.99921, 4.8639, -0.93273, 5.57982, -0.48886, 5.09855, -0.34813, 3.42912, -0.17446, 1.36899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.31305, 1.91372, -1.32986, 3.65703 ]
},
{
"time": 0.2333,
"offset": 2,
"vertices": [ -6.39088, 6.41246, -7.74575, 8.27192, -7.02471, 11.35894, -4.03471, 13.93454, -2.50399, 12.62963, -1.46125, 7.58915, -0.17446, 1.36899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.84766, 2.61216, -4.53956, 7.92358 ]
},
{
"time": 0.3,
"offset": 2,
"vertices": [ -8.27185, 6.68822, -9.29764, 10.13797, -8.62231, 14.7134, -4.5863, 18.81939, -2.20304, 17.10709, -0.07795, 9.9046, 2.54452, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94625, 2.38008, -4.59399, 10.01888 ]
},
{
"time": 0.3667,
"offset": 2,
"vertices": [ -10.47684, 9.44176, -13.36883, 12.40983, -14.32569, 16.94392, -9.24463, 23.55674, -5.51712, 21.51378, -1.19582, 11.53193, 2.54452, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.14848, 2.29389, -6.63419, 11.37127 ]
},
{
"time": 0.5,
"offset": 2,
"vertices": [ -5.42474, 4.36854, -10.59004, 7.04468, -11.64251, 11.55845, -6.19665, 20.12806, -1.45498, 18.05411, 4.8662, 6.41679, 2.81463, 0.27601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.96412, 4.9483 ]
},
{ "time": 0.6333 },
{
"time": 0.7333,
"offset": 4,
"vertices": [ 1.31462, -6.84099, -0.87905, -12.54479, -5.9851, -14.08368, -7.15892, -11.63194, -5.6792, -4.83545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06164, -6.93844 ]
},
{
"time": 0.8,
"offset": 4,
"vertices": [ 0.65731, -3.4205, -0.43953, -6.2724, -2.99255, -7.04184, -3.57946, -5.81597, -2.8396, -2.41772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79688, -1.28021, 0, 0, 0, 0, -1.03082, -3.46922 ]
},
{ "time": 0.8667 }
]
}
},
"right-hand": {
"right-hand": [
{
"offset": 4,
"vertices": [ -1.48417, 0.34736, 0, 0, 1.31152, 0.08085, 1.60296, 0.09882, 0.13673, 0.15471, 0, 0, 0, 0, -0.72862, -0.0449 ]
},
{ "time": 0.5 },
{
"time": 1,
"offset": 4,
"vertices": [ -1.48417, 0.34736, 0, 0, 1.31152, 0.08085, 1.60296, 0.09882, 0.13673, 0.15471, 0, 0, 0, 0, -0.72862, -0.0449 ]
}
]
"right-hand": {
"deform": [
{
"offset": 4,
"vertices": [ -1.48417, 0.34736, 0, 0, 1.31152, 0.08085, 1.60296, 0.09882, 0.13673, 0.15471, 0, 0, 0, 0, -0.72862, -0.0449 ]
},
{ "time": 0.5 },
{
"time": 1,
"offset": 4,
"vertices": [ -1.48417, 0.34736, 0, 0, 1.31152, 0.08085, 1.60296, 0.09882, 0.13673, 0.15471, 0, 0, 0, 0, -0.72862, -0.0449 ]
}
]
}
},
"right-lower-leg": {
"right-lower-leg": [
{},
{
"time": 0.6,
"offset": 6,
"vertices": [ 1.80396, -1.56553 ]
},
{ "time": 1 }
]
"right-lower-leg": {
"deform": [
{},
{
"time": 0.6,
"offset": 6,
"vertices": [ 1.80396, -1.56553 ]
},
{ "time": 1 }
]
}
},
"right-upper-leg": {
"right-upper-leg": [
{
"vertices": [ -6.03857, -1.46325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34685, -1.93102, -1.86047, -5.05266, -2.5014, -3.09985 ]
},
{ "time": 0.3333 },
{
"time": 0.8667,
"offset": 14,
"vertices": [ 0.13425, -2.35378, -1.33318, -5.99573, -1.35862, -4.43324 ]
},
{
"time": 1,
"vertices": [ -6.03857, -1.46325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34685, -1.93102, -1.86047, -5.05266, -2.5014, -3.09985 ]
}
]
"right-upper-leg": {
"deform": [
{
"vertices": [ -6.03857, -1.46325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34685, -1.93102, -1.86047, -5.05266, -2.5014, -3.09985 ]
},
{ "time": 0.3333 },
{
"time": 0.8667,
"offset": 14,
"vertices": [ 0.13425, -2.35378, -1.33318, -5.99573, -1.35862, -4.43324 ]
},
{
"time": 1,
"vertices": [ -6.03857, -1.46325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34685, -1.93102, -1.86047, -5.05266, -2.5014, -3.09985 ]
}
]
}
},
"torso": {
"torso": [
{
"offset": 2,
"vertices": [ 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, -1.24131, 2.62652, -2.47492, 0.71183, -0.26363, -0.5308, 0.24821, 2.86673, 0.24821, 2.86673, 0, 0, 0, 0, 0, 0, 0, 0, 1.34461, 0.25215, 0.24821, 2.86673, 0.82507, 1.61798, 0.24821, 2.86673, 0, 0, -1.86431, -0.4326, 0.24821, 2.86673 ]
},
{
"time": 0.1333,
"offset": 2,
"vertices": [ 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 1.66908, 3.51187, -0.62355, 2.47979, 1.1045, 3.49684, -1.09009, 6.08429, 0.35589, 4.10914, 0, 0, 0, 0, 0, 0, 0, 0, 3.01291, 0.15693, 0.35589, 4.10914, -1.11398, 3.7954, 0.35589, 4.10914, 0, 0, -2.96167, 0.55563, -2.20741, 4.40587 ]
},
{
"time": 0.3,
"offset": 2,
"vertices": [ 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 6.32601, 0.19387, 7.84315, 1.94837, 7.08587, 3.64119, 4.52343, 4.46961, 0.2884, 3.32948, 0, 0, 0, 0, 0, 0, 0, 0, 4.36416, -1.83876, 0.2884, 3.32948, 4.2925, 3.60194, 0.2884, 3.32948, 0, 0, 3.72601, -0.19338, 0.2884, 3.32948 ]
},
{
"time": 0.5,
"offset": 2,
"vertices": [ 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 2.57273, 2.74457, 2.88831, 3.04797, 3.48442, 3.04655, 1.80035, 4.609, 0.3133, 3.61659, 0, 0, 0, 0, 0, 0, 0, 0, 3.53782, -0.82203, 0.3133, 3.61659, 1.80022, 3.63246, 0.3133, 3.61659, 0, 0, 0.62718, 0.33564, -1.22467, 3.79463 ]
},
{
"time": 0.6333,
"offset": 2,
"vertices": [ 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 1.19401, 3.60798, -0.53546, 3.49565, 1.1926, 4.5127, -1.002, 7.10015, 0.44398, 5.125, 0, 0, 0, 0, 0, 0, 0, 0, 3.101, 1.17278, 0.44398, 5.125, -1.02589, 4.81126, 0.44398, 5.125, 0, 0, -2.87358, 1.57149, -2.11931, 5.42173 ]
},
{
"time": 0.8667,
"offset": 2,
"vertices": [ 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.92587, 2.24385, 0.68874, 1.29945, 3.55433, 3.00604, 2.71494, 5.89962, 0.30385, 3.50647, 0, 0, 0, 0, 0, 0, 0, 0, 1.96775, 0.40548, 0.30385, 3.50647, 2.6104, 2.3545, 0.30385, 3.50647, 0, 0, 0.22709, -0.12851, -0.62826, 3.61437 ]
},
{
"time": 1,
"offset": 2,
"vertices": [ 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, -1.1615, 3.54805, -2.39511, 1.63336, -0.18382, 0.39073, 0.32802, 3.78826, 0.32802, 3.78826, 0, 0, 0, 0, 0, 0, 0, 0, 1.42442, 1.17368, 0.32802, 3.78826, 0.90488, 2.53951, 0.32802, 3.78826, 0, 0, -1.7845, 0.48894, 0.32802, 3.78826 ]
}
]
"torso": {
"deform": [
{
"offset": 2,
"vertices": [ 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, -1.24131, 2.62652, -2.47492, 0.71183, -0.26363, -0.5308, 0.24821, 2.86673, 0.24821, 2.86673, 0, 0, 0, 0, 0, 0, 0, 0, 1.34461, 0.25215, 0.24821, 2.86673, 0.82507, 1.61798, 0.24821, 2.86673, 0, 0, -1.86431, -0.4326, 0.24821, 2.86673 ]
},
{
"time": 0.1333,
"offset": 2,
"vertices": [ 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 1.66908, 3.51187, -0.62355, 2.47979, 1.1045, 3.49684, -1.09009, 6.08429, 0.35589, 4.10914, 0, 0, 0, 0, 0, 0, 0, 0, 3.01291, 0.15693, 0.35589, 4.10914, -1.11398, 3.7954, 0.35589, 4.10914, 0, 0, -2.96167, 0.55563, -2.20741, 4.40587 ]
},
{
"time": 0.3,
"offset": 2,
"vertices": [ 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 6.32601, 0.19387, 7.84315, 1.94837, 7.08587, 3.64119, 4.52343, 4.46961, 0.2884, 3.32948, 0, 0, 0, 0, 0, 0, 0, 0, 4.36416, -1.83876, 0.2884, 3.32948, 4.2925, 3.60194, 0.2884, 3.32948, 0, 0, 3.72601, -0.19338, 0.2884, 3.32948 ]
},
{
"time": 0.5,
"offset": 2,
"vertices": [ 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 2.57273, 2.74457, 2.88831, 3.04797, 3.48442, 3.04655, 1.80035, 4.609, 0.3133, 3.61659, 0, 0, 0, 0, 0, 0, 0, 0, 3.53782, -0.82203, 0.3133, 3.61659, 1.80022, 3.63246, 0.3133, 3.61659, 0, 0, 0.62718, 0.33564, -1.22467, 3.79463 ]
},
{
"time": 0.6333,
"offset": 2,
"vertices": [ 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 1.19401, 3.60798, -0.53546, 3.49565, 1.1926, 4.5127, -1.002, 7.10015, 0.44398, 5.125, 0, 0, 0, 0, 0, 0, 0, 0, 3.101, 1.17278, 0.44398, 5.125, -1.02589, 4.81126, 0.44398, 5.125, 0, 0, -2.87358, 1.57149, -2.11931, 5.42173 ]
},
{
"time": 0.8667,
"offset": 2,
"vertices": [ 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.92587, 2.24385, 0.68874, 1.29945, 3.55433, 3.00604, 2.71494, 5.89962, 0.30385, 3.50647, 0, 0, 0, 0, 0, 0, 0, 0, 1.96775, 0.40548, 0.30385, 3.50647, 2.6104, 2.3545, 0.30385, 3.50647, 0, 0, 0.22709, -0.12851, -0.62826, 3.61437 ]
},
{
"time": 1,
"offset": 2,
"vertices": [ 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, -1.1615, 3.54805, -2.39511, 1.63336, -0.18382, 0.39073, 0.32802, 3.78826, 0.32802, 3.78826, 0, 0, 0, 0, 0, 0, 0, 0, 1.42442, 1.17368, 0.32802, 3.78826, 0.90488, 2.53951, 0.32802, 3.78826, 0, 0, -1.7845, 0.48894, 0.32802, 3.78826 ]
}
]
}
},
"undie-straps": {
"undie-straps": [
{
"offset": 2,
"vertices": [ -1.77697, 0.5476, -0.96145, -1.03793, -0.39148, -0.24072, -1.77697, 0.5476 ]
},
{
"time": 0.1333,
"offset": 2,
"vertices": [ -2.25684, -1.03177, -1.49719, -4.23862, -0.7447, -2.84907, -1.90072, 0.54478 ]
},
{
"time": 0.3333,
"offset": 2,
"vertices": [ -2.37974, -0.05432, -0.49433, 0.19437, -0.90861, 1.16519, -1.60956, 2.70799, 0.96186, 0.80615 ]
},
{
"time": 0.7,
"offset": 2,
"vertices": [ -0.91715, -2.76567, -0.62215, -3.63489, -0.84941, -2.26772, -2.56077, 0.52971 ]
},
{
"time": 0.8667,
"offset": 2,
"vertices": [ -2.56077, 0.52971, -1.58065, 0.32031, -1.3847, 0.32476, -2.56077, 0.52971 ]
},
{
"time": 1,
"offset": 2,
"vertices": [ -1.77697, 0.5476, -0.80128, 0.53413, -0.80128, 0.53413, -1.77697, 0.5476 ]
}
]
"undie-straps": {
"deform": [
{
"offset": 2,
"vertices": [ -1.77697, 0.5476, -0.96145, -1.03793, -0.39148, -0.24072, -1.77697, 0.5476 ]
},
{
"time": 0.1333,
"offset": 2,
"vertices": [ -2.25684, -1.03177, -1.49719, -4.23862, -0.7447, -2.84907, -1.90072, 0.54478 ]
},
{
"time": 0.3333,
"offset": 2,
"vertices": [ -2.37974, -0.05432, -0.49433, 0.19437, -0.90861, 1.16519, -1.60956, 2.70799, 0.96186, 0.80615 ]
},
{
"time": 0.7,
"offset": 2,
"vertices": [ -0.91715, -2.76567, -0.62215, -3.63489, -0.84941, -2.26772, -2.56077, 0.52971 ]
},
{
"time": 0.8667,
"offset": 2,
"vertices": [ -2.56077, 0.52971, -1.58065, 0.32031, -1.3847, 0.32476, -2.56077, 0.52971 ]
},
{
"time": 1,
"offset": 2,
"vertices": [ -1.77697, 0.5476, -0.80128, 0.53413, -0.80128, 0.53413, -1.77697, 0.5476 ]
}
]
}
},
"undies": {
"undies": [
{
"vertices": [ 0.43099, 0.722, 10.60295, -0.117, 2.29599, 0, 2.29599, 0, 2.29599, 0, 0.58799, 0.244, -2.40018, -0.65335, -2.2782, -0.77534, 2.29599, 0, 0.58799, -0.488, 4.98698, -0.117, 6.50797, -0.23399 ]
},
{
"time": 0.1333,
"vertices": [ 0.72659, 0.4332, 7.20417, -0.1638, 1.37759, 0, 1.37759, 0, 1.37759, 0, 1.25279, 0.0464, -0.99862, -2.95085, -1.37543, -3.07404, 1.37759, 0, 0.35279, -0.2928, 2.99219, -0.0702, 3.90478, -0.1404 ]
},
{
"time": 0.3333,
"vertices": [ 1.16999, 0, 2.10599, -0.23401, 0, 0, 0, 0, 0, 0, 2.24999, -0.24999, -0.4344, 0.60551, -1.55939, 0.48051 ]
},
{
"time": 0.5333,
"vertices": [ 1.16999, 0, -0.234, -0.936, -2.92499, 0.351, 0, 0, 0, 0, 0.5, -0.24999, -0.64079, -2.07915, -0.64079, -2.07915 ]
},
{
"time": 0.7,
"vertices": [ 1.86271, -0.11514, 4.66327, -0.091, -1.76428, 0.21171, 0, 0, -0.56833, 0.32833, -1.13833, -1.15111, -2.19996, -3.47068, -1.29719, -3.47068, 0, 0, 0, 0, 1.58785, -0.04643, 2.65942, 0.16715 ]
},
{
"time": 0.8333,
"vertices": [ 2.41688, -0.20726, 8.58108, 0.585, -0.83571, 0.10029, 0, 0, -1.02299, 0.59099, -2.449, -1.872, -1.625, 0, 0, 0, 0, 0, 0, 0, 2.85813, -0.08357, 4.78695, 0.30086 ]
},
{
"time": 0.8667,
"vertices": [ 2.0197, -0.02141, 8.98546, 0.4446, -0.20937, 0.08023, 0.4592, 0, -0.3592, 0.47279, -1.8416, -1.4488, -0.79153, 1.26421, 0.53286, 1.23981, 0.4592, 0, 0.1176, -0.0976, 3.2839, -0.09025, 5.13116, 0.19389 ]
},
{
"time": 1,
"vertices": [ 0.43099, 0.722, 10.60295, -0.117, 2.29599, 0, 2.29599, 0, 2.29599, 0, 0.58799, 0.244, -2.40018, -0.65335, -2.2782, -0.77534, 2.29599, 0, 0.58799, -0.488, 4.98698, -0.117, 6.50797, -0.23399 ]
}
]
"undies": {
"deform": [
{
"vertices": [ 0.43099, 0.722, 10.60295, -0.117, 2.29599, 0, 2.29599, 0, 2.29599, 0, 0.58799, 0.244, -2.40018, -0.65335, -2.2782, -0.77534, 2.29599, 0, 0.58799, -0.488, 4.98698, -0.117, 6.50797, -0.23399 ]
},
{
"time": 0.1333,
"vertices": [ 0.72659, 0.4332, 7.20417, -0.1638, 1.37759, 0, 1.37759, 0, 1.37759, 0, 1.25279, 0.0464, -0.99862, -2.95085, -1.37543, -3.07404, 1.37759, 0, 0.35279, -0.2928, 2.99219, -0.0702, 3.90478, -0.1404 ]
},
{
"time": 0.3333,
"vertices": [ 1.16999, 0, 2.10599, -0.23401, 0, 0, 0, 0, 0, 0, 2.24999, -0.24999, -0.4344, 0.60551, -1.55939, 0.48051 ]
},
{
"time": 0.5333,
"vertices": [ 1.16999, 0, -0.234, -0.936, -2.92499, 0.351, 0, 0, 0, 0, 0.5, -0.24999, -0.64079, -2.07915, -0.64079, -2.07915 ]
},
{
"time": 0.7,
"vertices": [ 1.86271, -0.11514, 4.66327, -0.091, -1.76428, 0.21171, 0, 0, -0.56833, 0.32833, -1.13833, -1.15111, -2.19996, -3.47068, -1.29719, -3.47068, 0, 0, 0, 0, 1.58785, -0.04643, 2.65942, 0.16715 ]
},
{
"time": 0.8333,
"vertices": [ 2.41688, -0.20726, 8.58108, 0.585, -0.83571, 0.10029, 0, 0, -1.02299, 0.59099, -2.449, -1.872, -1.625, 0, 0, 0, 0, 0, 0, 0, 2.85813, -0.08357, 4.78695, 0.30086 ]
},
{
"time": 0.8667,
"vertices": [ 2.0197, -0.02141, 8.98546, 0.4446, -0.20937, 0.08023, 0.4592, 0, -0.3592, 0.47279, -1.8416, -1.4488, -0.79153, 1.26421, 0.53286, 1.23981, 0.4592, 0, 0.1176, -0.0976, 3.2839, -0.09025, 5.13116, 0.19389 ]
},
{
"time": 1,
"vertices": [ 0.43099, 0.722, 10.60295, -0.117, 2.29599, 0, 2.29599, 0, 2.29599, 0, 0.58799, 0.244, -2.40018, -0.65335, -2.2782, -0.77534, 2.29599, 0, 0.58799, -0.488, 4.98698, -0.117, 6.50797, -0.23399 ]
}
]
}
}
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 KiB

After

Width:  |  Height:  |  Size: 411 KiB

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "IQgkYFQG8ng",
"spine": "4.0.31",
"hash": "itfFESDjM1c",
"spine": "4.1.23-beta",
"x": -188.63,
"y": -7.94,
"width": 418.45,
@ -2427,19 +2427,19 @@
"side-glow1": {
"attachment": [
{ "name": "hoverglow-small" },
{ "time": 0.9667, "name": null }
{ "time": 0.9667 }
]
},
"side-glow2": {
"attachment": [
{ "time": 0.0667, "name": "hoverglow-small" },
{ "time": 1, "name": null }
{ "time": 1 }
]
},
"side-glow3": {
"attachment": [
{ "name": "hoverglow-small" },
{ "time": 0.9667, "name": null }
{ "time": 0.9667 }
]
}
},
@ -3479,60 +3479,68 @@
{ "mixX": 0, "mixScaleX": 0, "mixShearY": 0 }
]
},
"deform": {
"attachments": {
"default": {
"front-foot": {
"front-foot": [
{
"offset": 26,
"vertices": [ -0.02832, -5.37024, -0.02832, -5.37024, 3.8188, -3.7757, -0.02832, -5.37024, -3.82159, 3.77847 ]
}
]
"front-foot": {
"deform": [
{
"offset": 26,
"vertices": [ -0.02832, -5.37024, -0.02832, -5.37024, 3.8188, -3.7757, -0.02832, -5.37024, -3.82159, 3.77847 ]
}
]
}
},
"front-shin": {
"front-shin": [
{
"offset": 14,
"vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ]
},
{
"time": 0.3667,
"offset": 14,
"vertices": [ 0.5298, -1.12677, -11.66571, -9.07211, -25.65866, -17.53735, -25.53217, -16.50978, -11.78232, -11.26097, 0, 0, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -2.64522, -7.35739, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -10.06873, -12.0999 ]
},
{
"time": 0.5333,
"offset": 14,
"vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -7.00775, -8.24771, -6.45482, -6.49312, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ]
},
{
"time": 1,
"offset": 14,
"vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ]
}
]
"front-shin": {
"deform": [
{
"offset": 14,
"vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ]
},
{
"time": 0.3667,
"offset": 14,
"vertices": [ 0.5298, -1.12677, -11.66571, -9.07211, -25.65866, -17.53735, -25.53217, -16.50978, -11.78232, -11.26097, 0, 0, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -2.64522, -7.35739, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -10.06873, -12.0999 ]
},
{
"time": 0.5333,
"offset": 14,
"vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -7.00775, -8.24771, -6.45482, -6.49312, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ]
},
{
"time": 1,
"offset": 14,
"vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ]
}
]
}
},
"hoverboard-board": {
"hoverboard-board": [
{
"curve": [ 0.067, 0, 0.2, 1 ]
},
{
"time": 0.2667,
"offset": 1,
"vertices": [ 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 3.55673, -3.0E-4, 3.55673, -3.0E-4, 0, 0, 0, 0, 0, 0, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, 0, 0, 0, 0, 0, 0, 0, 0, -4.90558, 0.11214, -9.40706, 6.2E-4, -6.34871, 4.3E-4, -6.34925, -6.57018, -6.34925, -6.57018, -6.34871, 4.3E-4, -2.3308, 1.7E-4, -2.33133, -6.57045, -2.33133, -6.57045, -2.3308, 1.7E-4, 0, 0, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 3.3297, 4.44005, 3.3297, 4.44005, 3.3297, 4.44005, 1.2E-4, 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, 1.2E-4, 2.45856, 1.2E-4, 2.45856, -9.40694, 2.45918, 1.88063, 0.44197, -2.9E-4, -3.54808, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.46227, 1.7E-4, 0, 0, 0, 0, 1.2E-4, 2.45856 ],
"curve": [ 0.45, 0, 0.817, 1 ]
},
{ "time": 1 }
]
"hoverboard-board": {
"deform": [
{
"curve": [ 0.067, 0, 0.2, 1 ]
},
{
"time": 0.2667,
"offset": 1,
"vertices": [ 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 3.55673, -3.0E-4, 3.55673, -3.0E-4, 0, 0, 0, 0, 0, 0, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, 0, 0, 0, 0, 0, 0, 0, 0, -4.90558, 0.11214, -9.40706, 6.2E-4, -6.34871, 4.3E-4, -6.34925, -6.57018, -6.34925, -6.57018, -6.34871, 4.3E-4, -2.3308, 1.7E-4, -2.33133, -6.57045, -2.33133, -6.57045, -2.3308, 1.7E-4, 0, 0, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 3.3297, 4.44005, 3.3297, 4.44005, 3.3297, 4.44005, 1.2E-4, 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, 1.2E-4, 2.45856, 1.2E-4, 2.45856, -9.40694, 2.45918, 1.88063, 0.44197, -2.9E-4, -3.54808, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.46227, 1.7E-4, 0, 0, 0, 0, 1.2E-4, 2.45856 ],
"curve": [ 0.45, 0, 0.817, 1 ]
},
{ "time": 1 }
]
}
},
"rear-foot": {
"rear-foot": [
{
"offset": 28,
"vertices": [ -1.93078, 1.34782, -0.31417, 2.33363, 3.05122, 0.33946, 2.31472, -2.01678, 2.17583, -2.05795, -0.04277, -2.99459, 1.15429, 0.26328, 0.97501, -0.67169 ]
}
]
"rear-foot": {
"deform": [
{
"offset": 28,
"vertices": [ -1.93078, 1.34782, -0.31417, 2.33363, 3.05122, 0.33946, 2.31472, -2.01678, 2.17583, -2.05795, -0.04277, -2.99459, 1.15429, 0.26328, 0.97501, -0.67169 ]
}
]
}
}
}
}
@ -5203,7 +5211,7 @@
"portal-bg": {
"attachment": [
{ "name": "portal-bg" },
{ "time": 3, "name": null }
{ "time": 3 }
]
},
"portal-flare1": {
@ -5214,7 +5222,7 @@
{ "time": 1.2, "name": "portal-flare1" },
{ "time": 1.2333, "name": "portal-flare2" },
{ "time": 1.2667, "name": "portal-flare1" },
{ "time": 1.3333, "name": null }
{ "time": 1.3333 }
]
},
"portal-flare2": {
@ -5224,14 +5232,14 @@
{ "time": 1.1667, "name": "portal-flare1" },
{ "time": 1.2, "name": "portal-flare2" },
{ "time": 1.2333, "name": "portal-flare3" },
{ "time": 1.2667, "name": null }
{ "time": 1.2667 }
]
},
"portal-flare3": {
"attachment": [
{ "time": 1.2, "name": "portal-flare3" },
{ "time": 1.2333, "name": "portal-flare2" },
{ "time": 1.2667, "name": null }
{ "time": 1.2667 }
]
},
"portal-flare4": {
@ -5239,33 +5247,33 @@
{ "time": 1.2, "name": "portal-flare2" },
{ "time": 1.2333, "name": "portal-flare1" },
{ "time": 1.2667, "name": "portal-flare2" },
{ "time": 1.3333, "name": null }
{ "time": 1.3333 }
]
},
"portal-flare5": {
"attachment": [
{ "time": 1.2333, "name": "portal-flare3" },
{ "time": 1.2667, "name": "portal-flare1" },
{ "time": 1.3333, "name": null }
{ "time": 1.3333 }
]
},
"portal-flare6": {
"attachment": [
{ "time": 1.2667, "name": "portal-flare3" },
{ "time": 1.3333, "name": null }
{ "time": 1.3333 }
]
},
"portal-flare7": {
"attachment": [
{ "time": 1.1333, "name": "portal-flare2" },
{ "time": 1.1667, "name": null }
{ "time": 1.1667 }
]
},
"portal-flare8": {
"attachment": [
{ "time": 1.2, "name": "portal-flare3" },
{ "time": 1.2333, "name": "portal-flare2" },
{ "time": 1.2667, "name": null }
{ "time": 1.2667 }
]
},
"portal-flare9": {
@ -5273,7 +5281,7 @@
{ "time": 1.2, "name": "portal-flare2" },
{ "time": 1.2333, "name": "portal-flare3" },
{ "time": 1.2667, "name": "portal-flare1" },
{ "time": 1.3, "name": null }
{ "time": 1.3 }
]
},
"portal-flare10": {
@ -5281,25 +5289,25 @@
{ "time": 1.2, "name": "portal-flare2" },
{ "time": 1.2333, "name": "portal-flare1" },
{ "time": 1.2667, "name": "portal-flare3" },
{ "time": 1.3, "name": null }
{ "time": 1.3 }
]
},
"portal-shade": {
"attachment": [
{ "name": "portal-shade" },
{ "time": 3, "name": null }
{ "time": 3 }
]
},
"portal-streaks1": {
"attachment": [
{ "name": "portal-streaks1" },
{ "time": 3, "name": null }
{ "time": 3 }
]
},
"portal-streaks2": {
"attachment": [
{ "name": "portal-streaks2" },
{ "time": 3, "name": null }
{ "time": 3 }
]
}
},
@ -7696,7 +7704,7 @@
{ "time": 0.1, "name": "muzzle03" },
{ "time": 0.1333, "name": "muzzle04" },
{ "time": 0.1667, "name": "muzzle05" },
{ "time": 0.2, "name": null }
{ "time": 0.2 }
]
},
"muzzle-glow": {
@ -7725,7 +7733,7 @@
],
"attachment": [
{ "time": 0.0333, "name": "muzzle-ring" },
{ "time": 0.2333, "name": null }
{ "time": 0.2333 }
]
},
"muzzle-ring2": {
@ -7739,7 +7747,7 @@
],
"attachment": [
{ "time": 0.0333, "name": "muzzle-ring" },
{ "time": 0.2, "name": null }
{ "time": 0.2 }
]
},
"muzzle-ring3": {
@ -7753,7 +7761,7 @@
],
"attachment": [
{ "time": 0.0333, "name": "muzzle-ring" },
{ "time": 0.2, "name": null }
{ "time": 0.2 }
]
},
"muzzle-ring4": {
@ -7767,7 +7775,7 @@
],
"attachment": [
{ "time": 0.0333, "name": "muzzle-ring" },
{ "time": 0.2, "name": null }
{ "time": 0.2 }
]
}
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

After

Width:  |  Height:  |  Size: 238 KiB

View File

@ -1,7 +1,7 @@
{
"skeleton": {
"hash": "3P3VgYJ8Bxk",
"spine": "4.0.31",
"hash": "ulJOWXMG9PE",
"spine": "4.1.23-beta",
"x": -5852.65,
"y": -348.5,
"width": 7202.61,
@ -3420,7 +3420,7 @@
"slots": {
"rock": {
"attachment": [
{ "name": null }
{}
]
},
"smoke-glow": {
@ -3432,7 +3432,7 @@
],
"attachment": [
{ "time": 0.0667, "name": "smoke-glow" },
{ "time": 0.3, "name": null }
{ "time": 0.3 }
]
},
"smoke-puff1-bg": {
@ -4049,7 +4049,7 @@
],
"attachment": [
{ "time": 0.0667, "name": "smoke-glow" },
{ "time": 0.2667, "name": null }
{ "time": 0.2667 }
]
}
},
@ -4870,65 +4870,69 @@
]
}
},
"deform": {
"attachments": {
"default": {
"clipping": {
"clipping": [
{
"time": 0.0667,
"offset": 54,
"vertices": [ 4.59198, -4.59192 ]
},
{
"time": 0.1333,
"offset": 8,
"vertices": [ -8.97369, -1.88211, 9.11177, 1.02258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -14.73321, -45.16878, -30.31448, -84.4631, -32.24969, -108.78421, 70.26825, -36.90201 ]
},
{
"time": 0.1667,
"offset": 8,
"vertices": [ -11.32373, -1.65065, 11.42179, 0.53259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -15.36503, -69.18713, -4.45626, -121.90839, 5.46554, -115.23274, 71.78526, -33.85687 ]
},
{
"time": 0.2,
"offset": 8,
"vertices": [ -8.70522, 1.02196, 8.65102, -1.4101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.59198, -4.59192 ]
},
{
"time": 0.2333,
"offset": 8,
"vertices": [ -5.23146, 0.85796, 5.23882, -0.81519 ]
},
{
"time": 0.2667,
"offset": 54,
"vertices": [ 4.59198, -4.59192 ]
}
]
"clipping": {
"deform": [
{
"time": 0.0667,
"offset": 54,
"vertices": [ 4.59198, -4.59192 ]
},
{
"time": 0.1333,
"offset": 8,
"vertices": [ -8.97369, -1.88211, 9.11177, 1.02258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -14.73321, -45.16878, -30.31448, -84.4631, -32.24969, -108.78421, 70.26825, -36.90201 ]
},
{
"time": 0.1667,
"offset": 8,
"vertices": [ -11.32373, -1.65065, 11.42179, 0.53259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -15.36503, -69.18713, -4.45626, -121.90839, 5.46554, -115.23274, 71.78526, -33.85687 ]
},
{
"time": 0.2,
"offset": 8,
"vertices": [ -8.70522, 1.02196, 8.65102, -1.4101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.59198, -4.59192 ]
},
{
"time": 0.2333,
"offset": 8,
"vertices": [ -5.23146, 0.85796, 5.23882, -0.81519 ]
},
{
"time": 0.2667,
"offset": 54,
"vertices": [ 4.59198, -4.59192 ]
}
]
}
},
"smoke-glow": {
"smoke-glow": [
{
"time": 0.1333,
"vertices": [ -14.17073, 19.14352, 0, 0, -10.97961, -15.09065, -5.79558, -24.82121, 0.68117, -17.78759, -1.1179, -5.4463, 0, 0, 0, 0, 17.52957, 6.89397, -0.33841, -2.21582, 5.51004, 18.88118, -6.80153, 20.91101 ]
},
{
"time": 0.1667,
"vertices": [ -4.34264, 39.78125, 5.6649, -2.42686, -8.39346, -22.52338, -2.66431, 5.08595, -19.28093, 3.98568, -11.21397, 10.2879, 4.56749, 4.1329, -19.50706, -2.28786, 11.35747, 4.55941, 9.04341, -11.72194, 2.15381, 5.14344, -12.82158, 16.08209, -23.19814, 1.81836 ]
},
{
"time": 0.2,
"vertices": [ -3.95581, 36.12203, 37.20779, -0.87419, 21.29579, -15.76854, -2.02438, 6.16526, -5.92201, 4.19709, -1.39027, 9.92793, 7.70584, -0.7169, -6.69733, -2.62048, 17.91826, 7.77333, -12.2858, 3.25454, -12.75876, 3.71516, 9.67891, 15.48546 ]
},
{
"time": 0.2333,
"vertices": [ -11.9371, 26.01078, 2.91821, -0.27533, 7.69899, -17.45375, -2.02438, 6.16526, -5.92201, 4.19709, -1.39027, 9.92793, 7.70584, -0.7169, -6.69733, -2.62048, 17.91826, 7.77333, -4.30551, -6.01406, -12.75876, 3.71516, -5.10017, 17.59191 ]
},
{
"time": 0.2667,
"vertices": [ 0.5959, 23.58176, 20.74303, 0.93943, 7.69899, -17.45375, -2.02438, 6.16526, -5.92201, 4.19709, -1.39027, 9.92793, 20.51733, 2.52203, 13.35544, 2.64274, 24.32408, -1.94308, 8.50604, -20.99353, 13.14276, 5.73959, 6.31876, 19.2114, 16.98909, 0.80981 ]
}
]
"smoke-glow": {
"deform": [
{
"time": 0.1333,
"vertices": [ -14.17073, 19.14352, 0, 0, -10.97961, -15.09065, -5.79558, -24.82121, 0.68117, -17.78759, -1.1179, -5.4463, 0, 0, 0, 0, 17.52957, 6.89397, -0.33841, -2.21582, 5.51004, 18.88118, -6.80153, 20.91101 ]
},
{
"time": 0.1667,
"vertices": [ -4.34264, 39.78125, 5.6649, -2.42686, -8.39346, -22.52338, -2.66431, 5.08595, -19.28093, 3.98568, -11.21397, 10.2879, 4.56749, 4.1329, -19.50706, -2.28786, 11.35747, 4.55941, 9.04341, -11.72194, 2.15381, 5.14344, -12.82158, 16.08209, -23.19814, 1.81836 ]
},
{
"time": 0.2,
"vertices": [ -3.95581, 36.12203, 37.20779, -0.87419, 21.29579, -15.76854, -2.02438, 6.16526, -5.92201, 4.19709, -1.39027, 9.92793, 7.70584, -0.7169, -6.69733, -2.62048, 17.91826, 7.77333, -12.2858, 3.25454, -12.75876, 3.71516, 9.67891, 15.48546 ]
},
{
"time": 0.2333,
"vertices": [ -11.9371, 26.01078, 2.91821, -0.27533, 7.69899, -17.45375, -2.02438, 6.16526, -5.92201, 4.19709, -1.39027, 9.92793, 7.70584, -0.7169, -6.69733, -2.62048, 17.91826, 7.77333, -4.30551, -6.01406, -12.75876, 3.71516, -5.10017, 17.59191 ]
},
{
"time": 0.2667,
"vertices": [ 0.5959, 23.58176, 20.74303, 0.93943, 7.69899, -17.45375, -2.02438, 6.16526, -5.92201, 4.19709, -1.39027, 9.92793, 20.51733, 2.52203, 13.35544, 2.64274, 24.32408, -1.94308, 8.50604, -20.99353, 13.14276, 5.73959, 6.31876, 19.2114, 16.98909, 0.80981 ]
}
]
}
}
}
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 KiB

After

Width:  |  Height:  |  Size: 418 KiB

View File

@ -92,7 +92,6 @@
spBone_worldToLocal(crosshair->parent, sceneStrong->position.x, sceneStrong->position.y, &localX, &localY);
crosshair->x = localX;
crosshair->y = localY;
crosshair->appliedValid = FALSE;
spBone_updateWorldTransform(crosshair);
}
};

View File

@ -32,6 +32,7 @@
652107961895250000B1FF07 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 652107951895250000B1FF07 /* CoreText.framework */; };
765A2EF61D7D7A08003FB779 /* goblins.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 765A2EF41D7D7A08003FB779 /* goblins.atlas */; };
765A2EF71D7D7A08003FB779 /* goblins.png in Resources */ = {isa = PBXBuildFile; fileRef = 765A2EF51D7D7A08003FB779 /* goblins.png */; };
766ECCEF27EDFC110074EA8B /* Sequence.c in Sources */ = {isa = PBXBuildFile; fileRef = 766ECCEA27EDFC110074EA8B /* Sequence.c */; };
76BF7E071E66ED9C00485998 /* GLUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = 76BF7E051E66ED9C00485998 /* GLUtils.c */; };
76C893BC23672757009D8DC8 /* IKExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 76C893B623672757009D8DC8 /* IKExample.m */; };
76C893BF236728A4009D8DC8 /* spineboy-pro.json in Resources */ = {isa = PBXBuildFile; fileRef = 76C893BE236728A4009D8DC8 /* spineboy-pro.json */; };
@ -169,6 +170,7 @@
652107951895250000B1FF07 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
765A2EF41D7D7A08003FB779 /* goblins.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = goblins.atlas; path = Resources/goblins.atlas; sourceTree = "<group>"; };
765A2EF51D7D7A08003FB779 /* goblins.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = goblins.png; path = Resources/goblins.png; sourceTree = "<group>"; };
766ECCEA27EDFC110074EA8B /* Sequence.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Sequence.c; path = "../spine-c/spine-c/src/spine/Sequence.c"; sourceTree = "<group>"; };
76BF7E051E66ED9C00485998 /* GLUtils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = GLUtils.c; path = src/spine/GLUtils.c; sourceTree = "<group>"; };
76BF7E061E66ED9C00485998 /* GLUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLUtils.h; path = src/spine/GLUtils.h; sourceTree = "<group>"; };
76C893B623672757009D8DC8 /* IKExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IKExample.m; path = example/IKExample.m; sourceTree = "<group>"; };
@ -306,6 +308,7 @@
43C32822170B0BC2004A9460 /* spine-c */ = {
isa = PBXGroup;
children = (
766ECCEA27EDFC110074EA8B /* Sequence.c */,
76FB15191F01413B00C5377F /* VertexEffect.c */,
76EE4E421EB36DE6000254F4 /* Array.c */,
76EE4E431EB36DE6000254F4 /* ClippingAttachment.c */,
@ -580,6 +583,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
766ECCEF27EDFC110074EA8B /* Sequence.c in Sources */,
76F28D191DEC810300CDE54D /* Atlas.c in Sources */,
76F28D1D1DEC810300CDE54D /* Bone.c in Sources */,
76F28D201DEC810300CDE54D /* Event.c in Sources */,

View File

@ -150,8 +150,7 @@ static _TrackEntryListeners* getListeners (spTrackEntry* entry) {
}
- (void) update:(CCTime)deltaTime {
deltaTime *= _timeScale;
spSkeleton_update(_skeleton, deltaTime);
deltaTime *= _timeScale;
spAnimationState_update(_state, deltaTime);
spAnimationState_apply(_state, _skeleton);
if (_preUpdateWorldTransformsListener) _preUpdateWorldTransformsListener(self);

View File

@ -200,7 +200,7 @@ static bool handlerQueued = false;
switch (slot->attachment->type) {
case SP_ATTACHMENT_REGION: {
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment;
spRegionAttachment_computeWorldVertices(attachment, slot->bone, vertices, 0, 2);
spRegionAttachment_computeWorldVertices(attachment, slot, vertices, 0, 2);
texture = [self getTextureForRegion:attachment];
uvs = attachment->uvs;
verticesCount = 8;

View File

@ -1,61 +0,0 @@
cmake_minimum_required(VERSION 3.6)
project(spine-cocos2dx-example)
set(EXAMPLE_DIR "${CMAKE_CURRENT_LIST_DIR}/example")
option(USE_COCOS2DX_V4 "Use cocos2d-x version 4.0+" OFF)
if(USE_COCOS2DX_V4)
set(COCOS_FOLDER_NAME "cocos2d-x-4.0")
set(COCOS_DOWNLOAD_URL "https://download.cocos.com/Cocos2D-X/${COCOS_FOLDER_NAME}.zip")
set(COCOS_SHORT_VERSION "v4")
set(EXAMPLE_DIR "${CMAKE_CURRENT_LIST_DIR}/example-v4")
else()
set(COCOS_FOLDER_NAME "cocos2d-x-3.17.2")
set(COCOS_DOWNLOAD_URL "http://download.cocos.com/Cocos2D-X/${COCOS_FOLDER_NAME}.zip")
set(COCOS_SHORT_VERSION "v3")
endif()
if((NOT ${COCOS_CURRENT_VERSION} STREQUAL ${COCOS_SHORT_VERSION}) AND (NOT ${COCOS_CURRENT_VERSION} STREQUAL ""))
message(STATUS "Target Cocos2d-x version ${COCOS_SHORT_VERSION}, current ${COCOS_CURRENT_VERSION}")
message(STATUS "remove current folder ${EXAMPLE_DIR}/cocos2d")
file(REMOVE_RECURSE ${EXAMPLE_DIR}/cocos2d ${EXAMPLE_DIR}/cocos2dx.zip)
endif()
if (NOT EXISTS ${EXAMPLE_DIR}/cocos2d)
if(NOT EXISTS ${EXAMPLE_DIR}/cocos2dx.zip)
message(STATUS "Downloading cocos2dx ${COCOS_SHORT_VERSION}, this may take some time!")
# download cocos2d-x package
file(DOWNLOAD ${COCOS_DOWNLOAD_URL} "${EXAMPLE_DIR}/cocos2dx.zip" SHOW_PROGRESS)
else()
message(STATUS "${EXAMPLE_DIR}/cocos2dx.zip found!")
endif()
# untar
message(STATUS "untar ${EXAMPLE_DIR}/cocos2dx.zip ...")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar x ${EXAMPLE_DIR}/cocos2dx.zip
WORKING_DIRECTORY ${EXAMPLE_DIR}
)
# rename folder
execute_process(
COMMAND ${CMAKE_COMMAND} -E rename
"${EXAMPLE_DIR}/${COCOS_FOLDER_NAME}" "${EXAMPLE_DIR}/cocos2d"
)
set(COCOS_CURRENT_VERSION ${COCOS_SHORT_VERSION} CACHE STRING "update current version" FORCE)
# remove spine source code in cocos2d-x's source tree
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove_directory "${EXAMPLE_DIR}/cocos2d/cocos/editor-support/spine"
COMMAND ${CMAKE_COMMAND} -E make_directory "${EXAMPLE_DIR}/cocos2d/cocos/editor-support/spine"
)
else()
message(STATUS "${EXAMPLE_DIR}/cocos2d is already exists, current version ${COCOS_SHORT_VERSION}.")
endif()
if(USE_COCOS2DX_V4)
add_subdirectory("${EXAMPLE_DIR}")
endif()

View File

@ -22,115 +22,85 @@ spine-cocos2dx supports all Spine features.
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.
### Cocos2d-x v3.x
1. Create a new cocos2d-x project. See [the cocos2d-x documentation](https://docs.cocos2d-x.org/cocos2d-x/v3/en/installation/)
2. Delete the folder `cocos2d/cocos/editor-support/spine`. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x.
3. Open your project in your IDE of choice, then open the cocos2d_libs sub project and delete the `editor-support/spine` group. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x from your build.
3. 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.
4. Add the sources from `spine-cpp/spine-cpp/src/spine` and `spine-cocos2dx/src/spine` to your project
4. Add the folders `spine-cpp/spine-cpp/include` and `spine-cocos2dx/src` to your header search path. Note that includes are specified as `#inclue <spine/file.h>`, so the `spine` directory cannot be omitted when copying the source files.
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].
### Cocos2d-x v4.x
TBD
1. Create a new Cocos2D-x project. See [the cocos2d-x documentation](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/)
2. Delete the folder `cocos2d/cocos/editor-support/spine` in your project. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x.
3. TBD Integration in `CMakeLists.txt`
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.
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.
3. Open `MyGame/CMakeLists.txt` in a text editor and modify it as follows:
* After the line `project(${APP_NAME})` add the following line:
```
include(/path/to/spine-runtimes/spine-cocos2dx/spine-cocos2dx.cmake)
```
* Before the line `target_link_libraries(${APP_NAME} cocos2d)`add the following line:
```
target_link_libraries(${APP_NAME} spine-cpp spine-cocos2dx)
```
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.
For reference, have a look at our spine-cocos2dx example project in this repository described below.
## Example
The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android.
The spine-cocos2dx example works on Windows, Linux, macOS, iOS, Linux, and Android, for both cocos2d-x v3 and v4.
### Cocos2d-x v3.x
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:
#### Windows
1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
2. Install CMake via the [Windows installer package](https://cmake.org/download/).
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Run CMake GUI from the start menu
5. Click `Browse Source` and select the directory `spine-runtimes/spine-cocos2dx/`
6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build/` directory. You can create the `build` folder directly in the file dialog via `New Folder`.
7. Click `Configure` again. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
8. Open the file `spine-cocos2dx\example\cocos2d\cocos\2d\cocos2dx.props` and remove the `libSpine.lib` entry from the `<AdditionalDependencies>` tag.
8. Open the `spine-runtimes/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.sln` file in Visual Studio 2019. Visual Studio may ask you to install the Windows XP/7 SDK, which you should install.
9. Expand `References` of the `libcocos2d` sub project, and remove the entry for `libSpine`, which should be marked with an error.
9. Right click the `spine-cocos2d-x` project in the solution explorer and select `Set as Startup Project` from the context menu
10. Click `Local Windows Debugger` to run the example
* `git`
* `cmake`
* `python`
#### macOS/iOS
1. Install [Xcode](https://developer.apple.com/xcode/)
2. Install [Homebrew](http://brew.sh/)
3. Open a terminal and install CMake via `brew install cmake`
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
5. Type `mkdir build && cd build && cmake ../..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
6. Open the Xcode project in `spine-runtimes/spine-cocos2dx/example/proj.ios_mac`
7. Expand the `cocos2d_libs.xcodeproj` sub project, delete the group `editor-support/spine`. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x.
8. Click the `Run` button or type `CMD+R` to run the example
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:
#### Android (on macOS)
1. Install the prerequisits for [cocos2d-x Android development](http://www.cocos2d-x.org/docs/installation/Android-terminal/)
2. Install [Homebrew](http://brew.sh/)
3. Open a terminal and install CMake via `brew install cmake`
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
5. Type `mkdir build && cd build && cmake ../..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
6. Delete `spine-runtimes/spine-cocos2dx/example/cocos2d/cocos/editor-support/spine`
7. Open `spine-runtimes/spine-cocos2dx/example/cocos2d/cocos/Android.mk` and remove the lines `LOCAL_STATIC_LIBRARIES += spine_static` and `$(call import-module,editor-support/spine)
8. Switch to `spine-runtimes/spine-cocos2dx/example/proj.android/jni` and execute `cocos compile -p android -m debug --ndk-mode debug` to compile the example for Android
9. In the same directory, execute `cocos run -p android -m debug` to deploy to the device
10. For debugging, run `ndk-debug` in the `proj.android/jni` folder. This will attach to the running app via GDB.
```
cd spine-runtimes/spine-cocos2dx/example
git clone -b v4 --depth 1 https://github.com/cocos2d/cocos2d-x cocos2d
python cocos2d/download-deps.py -r yes
```
### Cocos2d-x v4.x
> **NOTE:** If you want to run the example with Cocos2d-x version 3, replace `-b v4` with `-b v3` in the `git clone` command.
Please note the [new prerequisits to compile Cocos2d-x v4 projects on different platforms](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/prerequisites.html). This includes an installation of Python 2.7.x!
> **NOTE:** On macOS Big Sur, replace `python` with `python3`.
#### Windows
1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
2. Install CMake via the [Windows installer package](https://cmake.org/download/).
3. Install Python and make sure the `python.exe` is in your `PATH` environment variable. Python is required by cocos2d-x`s build system.
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Run CMake GUI from the start menu
5. Click `Browse Source` and select the directory `spine-runtimes`
6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build-v4` directory. You can create the `build-v4` folder directly in the file dialog via `New Folder`.
7. Click `Configure`. Check `USE_COCOS2DX_V4`
8. Click `Configure` again. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
9. Click `Generate` this will create the Visual Studio solution in `spine-runtimes/spine-cocos2dx/build-v4`.
8. Open the `spine-runtimes/spine-cocos2dx/build-v4/spine-cocos2dx-example.sln` file in Visual Studio 2019. Visual Studio may ask you to install the Windows XP/7 SDK, which you should install.
9. Right click the `spine-cocos2dx-example` project in the solution explorer and select `Set as Startup Project` from the context menu
10. Click `Local Windows Debugger` to run the example
You can now use CMake to create IDE projects for the target platform you want to compile and run the example on.
Make sure to build the example for Windows 32-bit!
### macOS
Execute the following on the command line:
#### macOS
1. Install [Xcode](https://developer.apple.com/xcode/)
2. Install [Homebrew](http://brew.sh/)
3. Open a terminal and install CMake via `brew install cmake`
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
5. Type `mkdir build-v4 && cd build-v4 && cmake -GXcode -DUSE_COCOS2DX_V4=on ..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
6. Open the Xcode project in `spine-runtimes/spine-cocos2dx/build-v4`
7. Make sure you select `spine-cocos2dx-example > My Mac` as the target and click the `Run` button or type `CMD+R` to run the example.
```
cd spine-runtimes/spine-cocos2dx/example
mkdir build-macos && cmake . -GXcode -Bbuild-macos
open build-macos/spine-cocos2dx-example.xcodeproj
```
#### iOS
1. Install [Xcode](https://developer.apple.com/xcode/)
2. Install [Homebrew](http://brew.sh/)
3. Open a terminal and install CMake via `brew install cmake`
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
5. Type `mkdir build-v4 && cd build-v4 && cmake -GXcode -DUSE_COCOS2DX_V4=on -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos ..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
6. Open the Xcode project in `spine-runtimes/spine-cocos2dx/build-v4`
7. Make sure you select `spine-cocos2dx-example > Device` as the target, where `Device` is either a simulator or a physically connected device. Click the `Run` button or type `CMD+R` to run the example.
This will generate an Xcode project in `build-macos/spine-cocos2dx-example.xcodeproj` and open it in Xcode. To build and run the example, select the `spine-cocos2dx-example` scheme and press `CMD + R`.
#### Android (on macOS)
1. Install the prerequisits for [cocos2d-x Android development](http://www.cocos2d-x.org/docs/installation/Android-terminal/)
2. Install [Homebrew](http://brew.sh/)
3. Open a terminal and install CMake via `brew install cmake`
3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
5. Type `mkdir build-v4 && cd build-v4 && cmake -DUSE_COCOS2DX_V4=on ..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
6. Execute `cocos run -s . -p android`, this will build, deploy and run the APK on a connected device.
### iOS
Execute the following on the command line:
```
cd spine-runtimes/spine-cocos2dx/example
mkdir build-ios && cmake . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -Bbuild-ios
open build-ios/spine-cocos2dx-example.xcodeproj
```
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.
### Android
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.
### Windows
Execute the following on the command line:
```
cd spine-runtimes/spine-cocos2dx/example
mkdir build-win
cmake . -G "Visual Studio 16 2019" -A Win32 -T host=x86 -Bbuild-win
```
You can then open the file `build-win/spine-cocos2dx-example.sln` with Visual Studio 2019. In the solution explorer, right click the `spine-cocos2dx-example` project, then click `Set as Startup Project` in the context menu. Finally, click the `Local Windows Debugger` button to build and run the example.
## Notes
* Images are premultiplied by cocos2d-x, so the Spine atlas images should *not* use premultiplied alpha.
* 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.

View File

@ -1,4 +0,0 @@
{
"engine_version": "cocos2d-x-4.0",
"project_type": "cpp"
}

View File

@ -1,171 +0,0 @@
#/****************************************************************************
# Copyright (c) 2013-2014 cocos2d-x.org
# Copyright (c) 2015-2017 Chukong Technologies Inc.
#
# http://www.cocos2d-x.org
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# ****************************************************************************/
cmake_minimum_required(VERSION 3.6)
set(APP_NAME spine-cocos2dx-example)
project(${APP_NAME})
set(BUILD_EDITOR_SPINE OFF CACHE BOOL "Build editor support for spine" FORCE)
set(BUILD_EXTENSIONS OFF CACHE BOOL "Build extensions" FORCE)
if(XCODE)
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
SET (CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 8.0)
endif()
endif()
if(NOT DEFINED BUILD_ENGINE_DONE) # to test spine-cocos2dx-example into root project
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
include(CocosBuildSet)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
endif()
# Add spine-cpp library
file(GLOB SPINE_CPP_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/include/**/*.h")
file(GLOB SPINE_CPP_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/src/**/*.cpp")
add_library(spine-cpp STATIC ${SPINE_CPP_SOURCE} ${SPINE_CPP_HEADER})
target_include_directories(spine-cpp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/include/")
# Add spine-cocos2dx library
file(GLOB_RECURSE SPINE_COCOS2DX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../src/**/*.h")
file(GLOB_RECURSE SPINE_COCOS2DX_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../src/**/*.cpp")
add_library(spine-cocos2dx STATIC ${SPINE_COCOS2DX_SOURCE} ${SPINE_COCOS2DX_HEADER})
target_include_directories(spine-cocos2dx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/include/")
target_include_directories(spine-cocos2dx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../src/")
target_link_libraries(spine-cocos2dx PRIVATE cocos2d)
# record sources, headers, resources...
set(GAME_RES_FOLDER
"${CMAKE_CURRENT_SOURCE_DIR}/../example/Resources"
)
if(APPLE OR WINDOWS)
cocos_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
endif()
# add cross-platforms source files and header files
file(GLOB_RECURSE GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../example/Classes/*.cpp")
file(GLOB_RECURSE GAME_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../example/Classes/*.h")
set(GAME_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../example/Classes")
if(ANDROID)
# change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
set(APP_NAME MyGame)
list(APPEND GAME_SOURCE
proj.android/app/jni/hellocpp/main.cpp
)
elseif(LINUX)
list(APPEND GAME_SOURCE
proj.linux/main.cpp
)
elseif(WINDOWS)
list(APPEND GAME_HEADER
proj.win32/main.h
proj.win32/resource.h
)
list(APPEND GAME_SOURCE
proj.win32/main.cpp
proj.win32/game.rc
${common_res_files}
)
elseif(APPLE)
if(IOS)
list(APPEND GAME_HEADER
proj.ios_mac/ios/AppController.h
proj.ios_mac/ios/RootViewController.h
)
set(APP_UI_RES
proj.ios_mac/ios/LaunchScreen.storyboard
proj.ios_mac/ios/LaunchScreenBackground.png
proj.ios_mac/ios/Images.xcassets
)
list(APPEND GAME_SOURCE
proj.ios_mac/ios/main.m
proj.ios_mac/ios/AppController.mm
proj.ios_mac/ios/RootViewController.mm
proj.ios_mac/ios/Prefix.pch
${APP_UI_RES}
)
elseif(MACOSX)
set(APP_UI_RES
proj.ios_mac/mac/Icon.icns
proj.ios_mac/mac/Info.plist
)
list(APPEND GAME_SOURCE
proj.ios_mac/mac/main.cpp
proj.ios_mac/mac/Prefix.pch
${APP_UI_RES}
)
endif()
list(APPEND GAME_SOURCE ${common_res_files})
endif()
# mark app complie info and libs info
set(all_code_files
${GAME_HEADER}
${GAME_SOURCE}
)
if(NOT ANDROID)
add_executable(${APP_NAME} ${all_code_files})
target_link_libraries(${APP_NAME} spine-cpp spine-cocos2dx)
else()
add_library(${APP_NAME} SHARED ${all_code_files})
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/platform/android ${ENGINE_BINARY_PATH}/cocos/platform)
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
target_link_libraries(${APP_NAME} spine-cocos2dx)
target_link_libraries(${APP_NAME} spine-cpp)
endif()
target_link_libraries(${APP_NAME} cocos2d)
target_include_directories(${APP_NAME}
PRIVATE ${GAME_INCLUDE}
PRIVATE ${COCOS2DX_ROOT_PATH}/cocos/audio/include/
)
# mark app resources
setup_cocos_app_config(${APP_NAME})
if(APPLE)
set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
if(MACOSX)
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
elseif(IOS)
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
endif()
# For code-signing, set the DEVELOPMENT_TEAM:
#set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
endif()
if(LINUX OR WINDOWS)
cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
endif()

View File

@ -1,18 +0,0 @@
coin.png
size: 1024, 1024
filter: Linear, Linear
coin-front-logo
bounds: 2, 570, 305, 302
coin-front-shine-logo
bounds: 2, 286, 282, 282
coin-front-shine-spineboy
bounds: 305, 283, 282, 282
coin-front-spineboy
bounds: 309, 567, 305, 302
rotate: 90
coin-side-round
bounds: 2, 2, 144, 282
coin-side-straight
bounds: 286, 286, 17, 282
shine
bounds: 148, 39, 72, 245

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,96 +0,0 @@
goblins.png
size: 1024, 128
filter: Linear, Linear
dagger
bounds: 2, 18, 26, 108
goblin/eyes-closed
bounds: 2, 4, 34, 12
goblin/head
bounds: 113, 23, 103, 66
rotate: 90
goblin/left-arm
bounds: 937, 89, 37, 35
rotate: 90
goblin/left-foot
bounds: 609, 61, 65, 31
rotate: 90
goblin/left-hand
bounds: 840, 21, 36, 41
goblin/left-lower-leg
bounds: 504, 56, 33, 70
goblin/left-shoulder
bounds: 745, 17, 29, 44
goblin/left-upper-leg
bounds: 397, 53, 33, 73
goblin/neck
bounds: 862, 85, 36, 41
goblin/pelvis
bounds: 776, 18, 62, 43
goblin/right-arm
bounds: 181, 5, 23, 50
rotate: 90
goblin/right-foot
bounds: 747, 63, 63, 33
rotate: 90
goblin/right-hand
bounds: 878, 3, 36, 37
goblin/right-lower-leg
bounds: 321, 50, 36, 76
goblin/right-shoulder
bounds: 663, 14, 39, 45
goblin/right-upper-leg
bounds: 675, 63, 34, 63
goblin/torso
bounds: 181, 30, 68, 96
goblin/undie-straps
bounds: 38, 2, 55, 19
goblin/undies
bounds: 974, 97, 36, 29
goblingirl/eyes-closed
bounds: 397, 30, 37, 21
goblingirl/head
bounds: 30, 23, 103, 81
rotate: 90
goblingirl/left-arm
bounds: 916, 8, 37, 35
rotate: 90
goblingirl/left-foot
bounds: 642, 61, 65, 31
rotate: 90
goblingirl/left-hand
bounds: 900, 86, 35, 40
goblingirl/left-lower-leg
bounds: 539, 56, 33, 70
goblingirl/left-shoulder
bounds: 633, 13, 28, 46
goblingirl/left-upper-leg
bounds: 574, 56, 33, 70
goblingirl/neck
bounds: 878, 42, 35, 41
goblingirl/pelvis
bounds: 817, 64, 62, 43
rotate: 90
goblingirl/right-arm
bounds: 603, 4, 28, 50
goblingirl/right-foot
bounds: 782, 63, 63, 33
rotate: 90
goblingirl/right-hand
bounds: 915, 47, 36, 37
goblingirl/right-lower-leg
bounds: 359, 50, 36, 76
goblingirl/right-shoulder
bounds: 704, 16, 39, 45
goblingirl/right-upper-leg
bounds: 711, 63, 34, 63
goblingirl/torso
bounds: 251, 30, 68, 96
goblingirl/undie-straps
bounds: 95, 2, 55, 19
goblingirl/undies
bounds: 974, 66, 36, 29
shield
bounds: 432, 54, 70, 72
spear
bounds: 233, 6, 22, 368
rotate: 90

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

View File

@ -1,362 +0,0 @@
mix-and-match.png
size: 1024, 512
filter: Linear, Linear
scale: 0.5
base-head
bounds: 587, 2, 95, 73
boy/arm-front
bounds: 558, 271, 36, 115
boy/backpack
bounds: 235, 109, 119, 153
boy/backpack-pocket
bounds: 328, 73, 34, 62
rotate: 90
boy/backpack-strap-front
bounds: 665, 79, 38, 88
boy/backpack-up
bounds: 395, 364, 21, 70
rotate: 90
boy/body
bounds: 251, 264, 97, 132
rotate: 90
boy/boot-ribbon-front
bounds: 648, 131, 9, 11
boy/collar
bounds: 744, 4, 73, 29
rotate: 90
boy/ear
bounds: 383, 109, 19, 23
rotate: 90
boy/eye-back-low-eyelid
bounds: 739, 284, 17, 6
rotate: 90
boy/eye-back-pupil
bounds: 832, 443, 8, 9
rotate: 90
boy/eye-back-up-eyelid
bounds: 558, 264, 23, 5
boy/eye-back-up-eyelid-back
bounds: 802, 491, 19, 10
rotate: 90
boy/eye-front-low-eyelid
bounds: 386, 363, 22, 7
rotate: 90
boy/eye-front-pupil
bounds: 816, 389, 9, 9
boy/eye-front-up-eyelid
bounds: 160, 71, 31, 6
rotate: 90
boy/eye-front-up-eyelid-back
bounds: 801, 434, 26, 9
rotate: 90
boy/eye-iris-back
bounds: 618, 264, 17, 17
boy/eye-iris-front
bounds: 727, 264, 18, 18
boy/eye-white-back
bounds: 580, 131, 20, 12
boy/eye-white-front
bounds: 510, 130, 27, 13
boy/eyebrow-back
bounds: 751, 88, 20, 11
rotate: 90
boy/eyebrow-front
bounds: 483, 130, 25, 11
boy/hair-back
bounds: 494, 388, 122, 81
rotate: 90
boy/hair-bangs
bounds: 667, 284, 70, 37
boy/hair-side
bounds: 789, 374, 25, 43
boy/hand-backfingers
bounds: 467, 364, 19, 21
boy/hand-front-fingers
bounds: 488, 364, 19, 21
boy/hat
bounds: 615, 417, 93, 56
rotate: 90
boy/leg-front
bounds: 138, 104, 31, 158
boy/mouth-close
bounds: 551, 365, 21, 5
rotate: 90
girl-blue-cape/mouth-close
bounds: 551, 365, 21, 5
rotate: 90
girl-spring-dress/mouth-close
bounds: 551, 365, 21, 5
rotate: 90
girl/mouth-close
bounds: 551, 365, 21, 5
rotate: 90
boy/mouth-smile
bounds: 705, 79, 29, 7
boy/nose
bounds: 836, 473, 17, 10
rotate: 90
boy/pompom
bounds: 747, 273, 48, 43
rotate: 90
boy/zip
bounds: 648, 144, 14, 23
girl-blue-cape/back-eyebrow
bounds: 602, 131, 18, 12
girl-blue-cape/body-dress
bounds: 2, 264, 109, 246
girl-blue-cape/body-ribbon
bounds: 615, 283, 50, 38
girl-blue-cape/cape-back
bounds: 2, 69, 134, 193
girl-blue-cape/cape-back-up
bounds: 386, 387, 123, 106
rotate: 90
girl-blue-cape/cape-ribbon
bounds: 675, 264, 50, 18
girl-blue-cape/cape-shoulder-back
bounds: 751, 110, 49, 59
girl-blue-cape/cape-shoulder-front
bounds: 113, 264, 62, 76
rotate: 90
girl-blue-cape/cape-up-front
bounds: 399, 264, 98, 117
rotate: 90
girl-blue-cape/ear
bounds: 775, 2, 19, 23
girl-spring-dress/ear
bounds: 775, 2, 19, 23
girl/ear
bounds: 775, 2, 19, 23
girl-blue-cape/eye-back-low-eyelid
bounds: 802, 463, 17, 6
girl-spring-dress/eye-back-low-eyelid
bounds: 802, 463, 17, 6
girl/eye-back-low-eyelid
bounds: 802, 463, 17, 6
girl-blue-cape/eye-back-pupil
bounds: 816, 367, 8, 9
girl-spring-dress/eye-back-pupil
bounds: 816, 367, 8, 9
girl/eye-back-pupil
bounds: 816, 367, 8, 9
girl-blue-cape/eye-back-up-eyelid
bounds: 554, 131, 24, 12
girl-spring-dress/eye-back-up-eyelid
bounds: 554, 131, 24, 12
girl/eye-back-up-eyelid
bounds: 554, 131, 24, 12
girl-blue-cape/eye-back-up-eyelid-back
bounds: 832, 453, 17, 11
rotate: 90
girl-spring-dress/eye-back-up-eyelid-back
bounds: 832, 453, 17, 11
rotate: 90
girl/eye-back-up-eyelid-back
bounds: 832, 453, 17, 11
rotate: 90
girl-blue-cape/eye-front-low-eyelid
bounds: 739, 303, 18, 6
rotate: 90
girl-spring-dress/eye-front-low-eyelid
bounds: 739, 303, 18, 6
rotate: 90
girl/eye-front-low-eyelid
bounds: 739, 303, 18, 6
rotate: 90
girl-blue-cape/eye-front-pupil
bounds: 816, 378, 9, 9
girl-spring-dress/eye-front-pupil
bounds: 816, 378, 9, 9
girl/eye-front-pupil
bounds: 816, 378, 9, 9
girl-blue-cape/eye-front-up-eyelid
bounds: 392, 77, 30, 14
rotate: 90
girl-spring-dress/eye-front-up-eyelid
bounds: 392, 77, 30, 14
rotate: 90
girl/eye-front-up-eyelid
bounds: 392, 77, 30, 14
rotate: 90
girl-blue-cape/eye-front-up-eyelid-back
bounds: 455, 130, 26, 11
girl-spring-dress/eye-front-up-eyelid-back
bounds: 455, 130, 26, 11
girl/eye-front-up-eyelid-back
bounds: 455, 130, 26, 11
girl-blue-cape/eye-iris-back
bounds: 637, 264, 17, 17
girl-blue-cape/eye-iris-front
bounds: 802, 471, 18, 18
girl-blue-cape/eye-white-back
bounds: 596, 264, 20, 16
girl-spring-dress/eye-white-back
bounds: 596, 264, 20, 16
girl-blue-cape/eye-white-front
bounds: 796, 5, 20, 16
rotate: 90
girl-spring-dress/eye-white-front
bounds: 796, 5, 20, 16
rotate: 90
girl/eye-white-front
bounds: 796, 5, 20, 16
rotate: 90
girl-blue-cape/front-eyebrow
bounds: 608, 149, 18, 12
rotate: 90
girl-blue-cape/hair-back
bounds: 508, 145, 117, 98
rotate: 90
girl-blue-cape/hair-bangs
bounds: 673, 419, 91, 40
rotate: 90
girl-blue-cape/hair-head-side-back
bounds: 196, 331, 30, 52
rotate: 90
girl-blue-cape/hair-head-side-front
bounds: 738, 323, 41, 42
girl-blue-cape/hair-side
bounds: 473, 3, 36, 71
girl-blue-cape/hand-front-fingers
bounds: 509, 365, 19, 21
girl-spring-dress/hand-front-fingers
bounds: 509, 365, 19, 21
girl-blue-cape/leg-front
bounds: 168, 72, 30, 158
rotate: 90
girl-blue-cape/mouth-smile
bounds: 736, 79, 29, 7
girl-spring-dress/mouth-smile
bounds: 736, 79, 29, 7
girl/mouth-smile
bounds: 736, 79, 29, 7
girl-blue-cape/nose
bounds: 747, 264, 11, 7
girl-spring-dress/nose
bounds: 747, 264, 11, 7
girl/nose
bounds: 747, 264, 11, 7
girl-blue-cape/sleeve-back
bounds: 767, 79, 42, 29
girl-blue-cape/sleeve-front
bounds: 408, 76, 52, 119
rotate: 90
girl-spring-dress/arm-front
bounds: 596, 282, 17, 111
girl-spring-dress/back-eyebrow
bounds: 801, 420, 18, 12
girl-spring-dress/body-up
bounds: 179, 4, 64, 66
girl-spring-dress/cloak-down
bounds: 775, 27, 50, 50
girl-spring-dress/cloak-up
bounds: 360, 7, 64, 58
rotate: 90
girl-spring-dress/eye-iris-back
bounds: 656, 264, 17, 17
girl-spring-dress/eye-iris-front
bounds: 814, 492, 18, 18
girl-spring-dress/front-eyebrow
bounds: 822, 472, 18, 12
rotate: 90
girl-spring-dress/hair-back
bounds: 196, 363, 147, 93
rotate: 90
girl-spring-dress/hair-bangs
bounds: 696, 326, 91, 40
rotate: 90
girl-spring-dress/hair-head-side-back
bounds: 529, 76, 30, 52
girl-spring-dress/hair-head-side-front
bounds: 781, 323, 41, 42
girl-spring-dress/hair-side
bounds: 511, 3, 36, 71
girl-spring-dress/leg-front
bounds: 171, 104, 30, 158
girl-spring-dress/neck
bounds: 138, 70, 20, 32
girl-spring-dress/shoulder-ribbon
bounds: 622, 131, 36, 24
rotate: 90
girl-spring-dress/skirt
bounds: 113, 328, 182, 81
rotate: 90
girl-spring-dress/underskirt
bounds: 2, 2, 175, 65
girl/arm-front
bounds: 577, 395, 36, 115
girl/back-eyebrow
bounds: 834, 492, 18, 12
rotate: 90
girl/bag-base
bounds: 191, 264, 62, 58
rotate: 90
girl/bag-strap-front
bounds: 385, 265, 12, 96
girl/bag-top
bounds: 738, 367, 49, 50
girl/body
bounds: 356, 130, 97, 132
girl/boot-ribbon-front
bounds: 539, 130, 13, 13
girl/eye-iris-back
bounds: 821, 424, 17, 17
girl/eye-iris-front
bounds: 812, 443, 18, 18
girl/eye-white-back
bounds: 814, 5, 20, 16
rotate: 90
girl/front-eyebrow
bounds: 816, 400, 18, 12
rotate: 90
girl/hair-back
bounds: 291, 363, 147, 93
rotate: 90
girl/hair-bangs
bounds: 715, 419, 91, 40
rotate: 90
girl/hair-flap-down-front
bounds: 288, 5, 70, 65
girl/hair-head-side-back
bounds: 561, 77, 30, 52
girl/hair-head-side-front
bounds: 757, 419, 41, 42
rotate: 90
girl/hair-patch
bounds: 245, 4, 66, 41
rotate: 90
girl/hair-side
bounds: 549, 3, 36, 71
girl/hair-strand-back-1
bounds: 684, 3, 58, 74
girl/hair-strand-back-2
bounds: 692, 171, 91, 58
rotate: 90
girl/hair-strand-back-3
bounds: 615, 323, 92, 79
rotate: 90
girl/hair-strand-front-1
bounds: 518, 269, 38, 94
girl/hair-strand-front-2
bounds: 593, 79, 70, 50
girl/hair-strand-front-3
bounds: 705, 88, 44, 81
girl/hand-front-fingers
bounds: 530, 365, 19, 21
girl/hat
bounds: 608, 169, 93, 82
rotate: 90
girl/leg-front
bounds: 203, 104, 30, 158
girl/pompom
bounds: 757, 462, 48, 43
rotate: 90
girl/scarf
bounds: 455, 143, 119, 51
rotate: 90
girl/scarf-back
bounds: 420, 2, 72, 51
rotate: 90
girl/zip
bounds: 356, 109, 19, 25
rotate: 90

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 KiB

File diff suppressed because one or more lines are too long

View File

@ -1,100 +0,0 @@
raptor.png
size: 1024, 512
filter: Linear, Linear
scale: 0.5
back-arm
bounds: 829, 88, 46, 25
rotate: 90
back-bracer
bounds: 195, 238, 39, 28
rotate: 90
back-hand
bounds: 724, 140, 36, 34
rotate: 90
back-knee
bounds: 760, 131, 49, 67
rotate: 90
back-thigh
bounds: 225, 238, 39, 24
rotate: 90
eyes-open
bounds: 975, 204, 47, 45
front-arm
bounds: 969, 112, 48, 26
front-bracer
bounds: 724, 97, 41, 29
rotate: 90
front-hand
bounds: 251, 239, 41, 38
front-open-hand
bounds: 856, 76, 43, 44
rotate: 90
front-thigh
bounds: 729, 178, 57, 29
rotate: 90
gun
bounds: 894, 251, 107, 103
gun-nohand
bounds: 764, 241, 105, 102
head
bounds: 756, 345, 136, 149
lower-leg
bounds: 475, 237, 73, 98
rotate: 90
mouth-grind
bounds: 975, 172, 47, 30
mouth-smile
bounds: 975, 140, 47, 30
neck
bounds: 366, 282, 18, 21
raptor-back-arm
bounds: 636, 97, 82, 86
rotate: 90
raptor-body
bounds: 2, 2, 632, 233
raptor-front-arm
bounds: 871, 168, 81, 102
rotate: 90
raptor-front-leg
bounds: 2, 237, 191, 257
raptor-hindleg-back
bounds: 195, 279, 169, 215
raptor-horn
bounds: 431, 312, 182, 80
rotate: 90
raptor-horn-back
bounds: 513, 318, 176, 77
rotate: 90
raptor-jaw
bounds: 894, 356, 126, 138
raptor-jaw-tooth
bounds: 294, 240, 37, 48
rotate: 90
raptor-mouth-inside
bounds: 344, 241, 36, 41
rotate: 90
raptor-saddle-strap-back
bounds: 575, 242, 54, 74
raptor-saddle-strap-front
bounds: 764, 182, 57, 95
rotate: 90
raptor-saddle-w-shadow
bounds: 592, 323, 162, 171
raptor-tail-shadow
bounds: 366, 305, 189, 63
rotate: 90
raptor-tongue
bounds: 387, 239, 86, 64
stirrup-back
bounds: 829, 136, 44, 35
rotate: 90
stirrup-front
bounds: 866, 121, 45, 50
rotate: 90
stirrup-strap
bounds: 918, 120, 49, 46
torso
bounds: 636, 181, 54, 91
rotate: 90
visor
bounds: 631, 237, 131, 84

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,101 +0,0 @@
spineboy.png
size: 1024, 256
filter: Linear, Linear
scale: 0.5
crosshair
bounds: 813, 160, 45, 45
eye-indifferent
bounds: 569, 2, 47, 45
eye-surprised
bounds: 643, 7, 47, 45
rotate: 90
front-bracer
bounds: 811, 51, 29, 40
front-fist-closed
bounds: 807, 93, 38, 41
front-fist-open
bounds: 815, 210, 43, 44
front-foot
bounds: 706, 64, 63, 35
rotate: 90
front-shin
bounds: 80, 11, 41, 92
front-thigh
bounds: 754, 12, 23, 56
front-upper-arm
bounds: 618, 5, 23, 49
goggles
bounds: 214, 20, 131, 83
gun
bounds: 347, 14, 105, 102
rotate: 90
head
bounds: 80, 105, 136, 149
hoverboard-board
bounds: 2, 8, 246, 76
rotate: 90
hoverboard-thruster
bounds: 478, 2, 30, 32
hoverglow-small
bounds: 218, 117, 137, 38
rotate: 90
mouth-grind
bounds: 775, 80, 47, 30
rotate: 90
mouth-oooo
bounds: 779, 31, 47, 30
rotate: 90
mouth-smile
bounds: 783, 207, 47, 30
rotate: 90
muzzle-glow
bounds: 779, 4, 25, 25
muzzle-ring
bounds: 451, 14, 25, 105
muzzle01
bounds: 664, 60, 67, 40
rotate: 90
muzzle02
bounds: 580, 56, 68, 42
rotate: 90
muzzle03
bounds: 478, 36, 83, 53
rotate: 90
muzzle04
bounds: 533, 49, 75, 45
rotate: 90
muzzle05
bounds: 624, 56, 68, 38
rotate: 90
neck
bounds: 806, 8, 18, 21
portal-bg
bounds: 258, 121, 133, 133
portal-flare1
bounds: 690, 2, 56, 30
rotate: 90
portal-flare2
bounds: 510, 3, 57, 31
portal-flare3
bounds: 722, 4, 58, 30
rotate: 90
portal-shade
bounds: 393, 121, 133, 133
portal-streaks1
bounds: 528, 126, 126, 128
portal-streaks2
bounds: 656, 129, 125, 125
rear-bracer
bounds: 826, 13, 28, 36
rear-foot
bounds: 743, 70, 57, 30
rotate: 90
rear-shin
bounds: 174, 14, 38, 89
rear-thigh
bounds: 783, 158, 28, 47
rear-upper-arm
bounds: 783, 136, 20, 44
rotate: 90
torso
bounds: 123, 13, 49, 90

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

View File

@ -1,56 +0,0 @@
tank.png
size: 1024, 1024
filter: Linear, Linear
scale: 0.5
antenna
bounds: 2, 712, 11, 152
rotate: 90
cannon
bounds: 222, 694, 466, 29
cannon-connector
bounds: 82, 654, 56, 68
rotate: 90
ground
bounds: 2, 175, 512, 177
guntower
bounds: 647, 347, 365, 145
machinegun
bounds: 690, 694, 166, 29
machinegun-mount
bounds: 858, 687, 36, 48
rotate: 90
rock
bounds: 664, 607, 290, 64
smoke-glow
bounds: 946, 673, 50, 50
smoke-puff01-bg
bounds: 312, 630, 92, 62
smoke-puff01-fg
bounds: 222, 633, 88, 59
smoke-puff02-fg
bounds: 406, 630, 92, 62
smoke-puff03-fg
bounds: 500, 630, 92, 62
smoke-puff04-fg
bounds: 2, 662, 78, 48
tank-bottom
bounds: 2, 354, 643, 138
tank-bottom-shadow
bounds: 2, 2, 646, 171
tank-top
bounds: 195, 494, 704, 111
tread
bounds: 172, 708, 48, 15
tread-inside
bounds: 156, 710, 13, 14
rotate: 90
wheel-big
bounds: 97, 540, 96, 96
wheel-big-overlay
bounds: 2, 559, 93, 93
wheel-mid
bounds: 594, 624, 68, 68
wheel-mid-overlay
bounds: 152, 638, 68, 68
wheel-small
bounds: 908, 687, 36, 36

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

View File

@ -1,36 +0,0 @@
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#import <UIKit/UIKit.h>
@class RootViewController;
@interface AppController : NSObject <UIApplicationDelegate> {
}
@property(nonatomic, readonly) RootViewController *viewController;
@end

View File

@ -1,153 +0,0 @@
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#import "AppController.h"
#import "cocos2d.h"
#import "AppDelegate.h"
#import "RootViewController.h"
@implementation AppController
@synthesize window;
#pragma mark -
#pragma mark Application lifecycle
// cocos2d application instance
static AppDelegate s_sharedApplication;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
cocos2d::Application *app = cocos2d::Application::getInstance();
// Initialize the GLView attributes
app->initGLContextAttrs();
cocos2d::GLViewImpl::convertAttrs();
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
// Use RootViewController to manage CCEAGLView
_viewController = [[RootViewController alloc]init];
_viewController.wantsFullScreenLayout = YES;
// Set RootViewController to window
if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)
{
// warning: addSubView doesn't work on iOS6
[window addSubview: _viewController.view];
}
else
{
// use this method on ios6
[window setRootViewController:_viewController];
}
[window makeKeyAndVisible];
[[UIApplication sharedApplication] setStatusBarHidden:true];
//Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
{
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
}
// IMPORTANT: Setting the GLView should be done after creating the RootViewController
cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view);
cocos2d::Director::getInstance()->setOpenGLView(glview);
//run the cocos2d-x game scene
app->run();
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
// We don't need to call this method any more. It will interrupt user defined game pause&resume logic
/* cocos2d::Director::getInstance()->pause(); */
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
// We don't need to call this method any more. It will interrupt user defined game pause&resume logic
/* cocos2d::Director::getInstance()->resume(); */
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
*/
cocos2d::Application::getInstance()->applicationDidEnterBackground();
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
/*
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
*/
cocos2d::Application::getInstance()->applicationWillEnterForeground();
}
- (void)applicationWillTerminate:(UIApplication *)application {
/*
Called when the application is about to terminate.
See also applicationDidEnterBackground:.
*/
}
#pragma mark -
#pragma mark Memory management
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
/*
Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
*/
}
#if __has_feature(objc_arc)
#else
- (void)dealloc {
[window release];
[_viewController release];
[super dealloc];
}
#endif
@end

View File

@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>Icon-57.png</string>
<key>CFBundleIdentifier</key>
<string>org.cocos2dx.${PRODUCT_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIAppFonts</key>
<array/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019. All rights reserved.</string>
</dict>
</plist>

View File

@ -1,12 +0,0 @@
//
// Prefix header for all source files of the 'iphone' target in the 'iphone' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
#ifdef __cplusplus
#include "cocos2d.h"
#endif

View File

@ -1,34 +0,0 @@
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#import <UIKit/UIKit.h>
@interface RootViewController : UIViewController {
}
- (BOOL)prefersStatusBarHidden;
@end

Some files were not shown because too many files have changed in this diff Show More