spine-cocos2d-objc
The spine-cocos2d-objc runtime provides functionality to load, manipulate and render Spine skeletal animation data using the latest cocos2d-objc. spine-cocos2d-objc is based on spine-c.
Licensing
This Spine Runtime may only be used for personal or internal use, typically to evaluate Spine before purchasing. If you would like to incorporate a Spine Runtime into your applications, distribute software containing a Spine Runtime, or modify a Spine Runtime, then you will need a valid Spine license. Please see the Spine Runtimes Software License for detailed information.
The Spine Runtimes are developed with the intent to be used with data exported from Spine. By purchasing Spine, Section 2 of the Spine Software License grants the right to create and distribute derivative works of the Spine Runtimes.
Spine version
spine-cocos2d-objc works with data exported from Spine 3.4.02.
spine-cocos2d-objc supports all Spine features.
spine-cocos2d-objc does not yet support loading the binary format.
Usage
- Create a new cocos2d-obj project. See the cocos2d-objc documentation or have a look at the example in this repository.
- Download the Spine Runtimes source using git (
git clone https://github.com/esotericsoftware/spine-runtimes) or download it as a zip - Add the sources from
spine-c/src/spineandspine-cocos2d-objc/src/spineto your project - Add the folders
spine-c/includeandspine-cocos2d-objc/srcto your header search path. Note that includes are specified as#inclue <spine/file.h>, so thespinedirectory cannot be omitted when copying the source files.
See the Spine Runtimes documentation on how to use the APIs or check out the Spine cocos2d-objc example.
Examples
The Spine cocos2d-objc example works on iOS simulators and devices.
iOS
- Install Xcode
- Install Homebrew
- Open a terminal and install CMake via
brew install cmake - Download the Spine Runtimes repository using git (
git clone https://github.com/esotericsoftware/spine-runtimes) or download it as a zip - Open a terminal, and
cdinto thespine-runtimes/spine-cocos2d-objcfolder - Type
mkdir build && cd build && cmake ../.., this will download the cocos2d-objc dependency - Open the Xcode project in
spine-runtimes/spine-cocos2d-objc/spine-cocos2d-objc.xcodeproj/ - In Xcode, click the
Runbutton or typeCMD+Rto run the example on the simulator
Links
podspec (maintained externally)