65 Commits

Author SHA1 Message Date
NathanSweet
6cdcdbdb40 Renamed TextureAtlasAttachmentLoader to AtlasAttachmentLoader, matching the other runtimes. 2016-10-15 10:27:38 +02:00
NathanSweet
f63561085a List explicit Spine editor version that is supported. 2016-10-13 22:55:04 +02:00
badlogic
ef50131431 [runtimes] Updated all LICENSE files and README.mds 2016-10-13 15:21:05 +02:00
badlogic
5aa27771c3 [runtimes] Updated ALL sources to use latest Spine Runtimes License v2.5. Manually checked all the things... 2016-10-13 15:12:05 +02:00
Mario Zechner
5b1814cff3 spine-lua, spine-love, spine-corona update to 3.4.02 (#722)
The spine-lua API has been updated to be compatible with Spine version 3.4.02 (latest stable). The spine-lua API now supports path constraints, transform constraints, uses the new way we encode meshes etc. There are no API breaking changes, only API additions, such as PathConstraints and TransformConstraints as well as additional methods to Skeleton and similar classes. The internals of the spine-lua API have also been updated to follow Lua best performance practices by localizing heavily and using meta tables for "class methods". The spine-lua API now also loads texture atlases as exported by Spine. All that is required for a consumer is to supply an image loading function for their specific engine/framework. We provide implementations for spine-love and spine-corona.

The spine-love API can now render all Spine attachment types, including meshes and linked meshes. The API has changed. Where previously a "class" Skeleton existed with a draw function, the new spine-love API introduces a new SkeletonRenderer. See the example on API usage.

The spine-corona API can now also render all Spine attachment types. The API has not changed.
2016-10-11 16:33:25 +02:00
Vlad Shcherban
559fcbfcb9 * [Lua] Adding Spine atlas parser
* [Corona] Adding ability to load atlas files
* [Corona] Added example of using atlas

# Documentation:

## Lua runtime: `spine.Atlas.parse`

`Atlas.lua` introduces `spine.Atlas.parse(atlasPath, baseDir)` funciton. This function can be use across Lua runtimes to implement their their own image sheet bindings. It will return Array of `Page`s or `nil` if error.

### `Page` properties:
* `name` - filename of the page (`"raptor.png"`)
* `size` - dimmensions of original image (`[1022,1022]`)
* `format` - texture format (`"RGBA8888"`)
* `filter` - filter for texture scalin up and down (`["Linear","Linear"]`)
* `wrap` - wrap modes (`"none"`)
* `regions` - Array of `Region`s on this page

### `Region` properties:
* `name` - region name (`"torso"`)
* `rotate` - is image rotated in texture (`true`)
* `xy` - image frame position on texture (`[610,647]`)
* `size` - image frame size on texture (`[54,91]`)
* `splits` - (optional)
* `pad` - (optional)
* `orig` - original image size (`[54,91]`)
* `offset` - offset if image was trimmed (`[0,0]`)
* `index` - `-1`

## Corona runtime: `spine.GetAtlasSprites`

`spine.lua` introduces `spine.GetAtlasSprites(atlasName, baseDir)`, which returns `Sprites` table. This funciton would parse atlas, locate atlas textures, load them to Corona's image sheets and create convinience bindings and functions. User can use convenience functions, or write own wrappers.

### `Sprites` table
#### Convenience functions:
* `ATLAS_HELPER_createImage` - can be assigned to `skeleton.createImage`
* `ATLAS_HELPER_createMesh` - can be assigned to `skeleton.createMesh`
* `ATLAS_HELPER_setupSkeleton` - use this on skeleton to assing both creation functions (`sprites.setupSkeleton(skeleton)`)

### Region name bindings:
All other elements of `Sprites` table would contain binding `sprites["region_name"] = sheetReference`, where each `sheetReference` contains following elements:

* `frame` - number of frame in image sheet (`42`)
* `region` - reference to `Region` table
* `page` -  reference to `Page` table. `Page` table would also get new property - `sheet`, reference to Corona's image sheet where sprites can be accessed.

As result, to create image for `attachment` code would look something like `display.newImage( sprites[attachment.name].page.sheet, sprites[attachment.name].frame )`. For more rubust example see `ATLAS_HELPER_createImage` in `spine-corona/spine.lua`.

# Known Issues:

* Corona would not work with padded/cropped atlases.
* Possible (but unprobable) name collision with region names and `ATLAS_HELPER_*` functions.
2016-06-23 11:07:12 -04:00
NathanSweet
e834982b49 Updated READMEs for v3.3 support. 2016-06-20 19:26:05 +02:00
Svoka
1ea57900c5 Fixing bugs in Lua runtime; adding support for meshes in Corona runtime; adding spineboy-mesh demo (#600)
Bugs:

* ffd animation was ignoring last frame. Lua has 1-based arrays, so last frame is `frames[#frames]`, not `frames[#frames - 1]`
* nil exception when accessing array lenght after it's confirmed nil. First we check if `not vertices` and in next statement we're trying to check for it's length, which causes exception. This code is logically equivalent to code before but avoids checking potentially nil array for length.
2016-06-04 16:12:43 +02:00
NathanSweet
8d7f761311 spine-libgdx updated to 3.2.00.
* Added transform constraint rotate, scale, and shear offsets and mixes.
* Added TransformConstraintTimeline.
* Added bone shearing.
* Added ShearTimeline.
* Changed Skeleton#updateCache.
* Changed JSON and binary formats. Some binary format fields and enums were rearranged for consistency -- sorry, but it's better for the long term. Docs for both are up to date.
http://esotericsoftware.com/spine-json-format
http://esotericsoftware.com/spine-binary-format
2016-04-26 22:51:04 +02:00
NathanSweet
d0d7e64b43 Docs: added a note to runtimes that don't yet support the binary format. 2016-04-07 22:50:00 +02:00
NathanSweet
4f3ccc2c51 List the supported editor version on each runtime README.
closes #526
2016-04-03 19:10:47 +02:00
NathanSweet
01cb844993 You get a license file, you get a license file, EVERYBODY GETS A LICENSE FILE! 2015-07-30 22:47:00 +02:00
NathanSweet
f06fbb3d8d Clarified licensing on runtimes pages. 2015-07-30 22:44:47 +02:00
NathanSweet
27270a5781 Spine Runtimes license update.
Minor update to fix "SOFTARE" typo and clairfy how to get permission.
2015-04-24 21:33:24 +02:00
NathanSweet
f8a76c6455 Blend modes for all runtimes. 2015-04-02 14:20:20 +02:00
NathanSweet
7c065a76e2 IK for spine-lua, spine-corona, spine-love. 2014-11-16 03:05:46 +01:00
NathanSweet
c3e8058208 Removed test flip timeline. 2014-11-16 00:33:09 +01:00
NathanSweet
59204db7f8 Flip timelines for spine-lua, spine-corona, spine-love. 2014-11-16 00:05:01 +01:00
NathanSweet
81ae526a7b Meshes, FFD and skinning for spine-lua. 2014-05-23 12:37:55 +02:00
Nathan Sweet
6b7ed29684 Merge pull request #192 from reaver/master
Update Corona Runtime for the new Graphics 2.0
2014-05-15 18:49:06 +02:00
NathanSweet
26e4fb0d74 License header update.
2 -> 2.1 (clearer how permission is granted, formatting).
2014-04-23 12:04:43 +02:00
Matt
a28ddaf5d9 updates color values and image anchor for Corona Graphics 2.0 compatablility. 2014-02-28 19:30:06 +01:00
NathanSweet
b272808a2d Use display.remove(). 2014-02-01 02:07:50 +01:00
NathanSweet
661a0436bc Documentation 2014-01-20 04:51:20 +01:00
NathanSweet
b0c96fd66b Typo 2014-01-11 21:20:46 +01:00
NathanSweet
d520addb9b Updated license to version 2.
Version 1 of the license didn't make sense: it required a Spine license to use the Spine Runtimes at all. This means if you used the Spine Runtimes in your application, anyone who purchased a copy of your application also needed a Spine license to use the runtimes. This was not the intent!

Version 2 of the license fixes this by allowing anyone to use the Spine Runtimes but only for internal use. When you purchase Spine, the Spine license (http://esotericsoftware.com/spine/files/license.txt) grants you the right to make and distribute derivative works of the Spine Runtimes. Now it makes sense: making and distributing applications with the Spine Runtimes requires a Spine license, but anyone can run that software without needing a Spine license.

With this fixed, I hope we never need to change the license again!
2014-01-11 21:07:28 +01:00
NathanSweet
35810a5961 Comments. 2013-11-04 22:11:01 +01:00
Felix Holmgren
ee5dd750a5 Use setAnimationByName instead of setAnimation
* goblin and dragon examples wouldn't start without this fix
2013-10-24 00:36:38 +02:00
NathanSweet
9f6fd34389 Fixed images not being removed correctly. 2013-10-22 11:42:10 +02:00
NathanSweet
f08d9b817c Fixed slot not having attachment. 2013-10-15 19:19:42 +02:00
NathanSweet
ed4cf32726 spine-lua: bounding boxes. 2013-10-13 17:08:26 +02:00
NathanSweet
a793d2bfa6 spine-lua: keyable draw order, events, new AnimationState. 2013-10-13 14:31:07 +02:00
NathanSweet
2005404321 spine-corona refactoring, easier to use Corona image sheets. 2013-10-12 14:13:48 +02:00
NathanSweet
9a347d5eb8 Updated license.
Nailed it this time, quite sure!
2013-10-04 04:13:09 +02:00
NathanSweet
47ce2a40c1 Minor update to the license to include education. 2013-10-01 14:55:15 +02:00
NathanSweet
a5008e221e Additive blending for spine-lua and spine-corona. 2013-09-30 14:50:04 +02:00
NathanSweet
8e4f1e5f49 Removed non-uniform scale from dragon for Corona. 2013-09-29 17:01:06 +02:00
NathanSweet
19918edfe7 Better Corona examples. 2013-09-29 16:50:48 +02:00
NathanSweet
e2fccf72d6 License update.
Changed from New BSD to a custom license. The new license requires a Spine license to use the code. If you have a valid Spine license, you can do whatever you like with the code. This should not be a problem for anyone using the runtimes with Spine, nothing changes. If using the runtimes without a Spine license, you now need a Spine license. This is because the runtimes were created explicitly to be used with Spine.
2013-09-20 19:46:23 +02:00
NathanSweet
9ffb689b49 Warning for nonuniform scaling in Corona. 2013-08-17 12:25:58 +02:00
NathanSweet
59513b4afa Added skeleton RGBA tint. 2013-07-30 20:50:00 +02:00
NathanSweet
6de19dc914 Added AnimationState to spine-lua. 2013-07-24 03:56:18 +02:00
Matias
116ad3ce53 fix indentation 2013-05-29 12:29:49 +03:00
Matias
f3d1467972 comment out the warning 2013-05-29 12:24:36 +03:00
Matias
460451a6a2 fix scaling when attachment is rotated 90 degrees from the bone 2013-05-29 12:18:18 +03:00
Matias
b5da5daa38 add relative path to package.path to make running the example work straight out of the box on simulator 2013-05-29 12:05:31 +03:00
Matias
32c7dc8cb0 Revert "add support for loading from relative directories to make the example load out of the box"
This reverts commit 3a9623cdd7f1f7a376442d36ee760de1f9ff1b08.
2013-05-29 11:50:26 +03:00
Matias
3a9623cdd7 add support for loading from relative directories to make the example load out of the box 2013-05-29 11:19:08 +03:00
NathanSweet
1cf4071cf7 Prevent errors if image could not be loaded. 2013-05-24 13:38:08 +02:00
NathanSweet
7f69300bcc Refactoring: changed references to "bind pose" to "setup pose".
This better matches "setup mode" in the editor and we can be consistent in code and docs from now on.
2013-05-05 12:38:06 +02:00