36 Commits

Author SHA1 Message Date
badlogic
7a803f8b1b Updated example project exports. 2018-12-03 17:12:03 +01:00
badlogic
c95af40579 Updated all exports, using PMA now where possible in all examples. Did not update UE4 and Unity assets, these need to be updated manually. 2018-11-15 10:58:30 +01:00
badlogic
751c6e23db [lua] Added event volume and balance, see #1171. 2018-09-06 15:57:27 +02:00
badlogic
fd7b0caec4 [lua] Ported stretchy IK. 2018-08-14 16:12:15 +02:00
badlogic
84dcd6ba25 [lua] Ported flipX/flipY -> scaleX/scaleY change. See #1142. 2018-07-24 15:01:20 +02:00
badlogic
71a50183c7 [lua] Manually merged PR #1103. 2018-06-07 17:26:37 +02:00
badlogic
54e99f1454 [lua] Ported additive blending, see #1060, see #1029 2018-01-29 15:37:13 +01:00
badlogic
84fe30a2bf [runtimes] Fixed handling of zero length bones in PathConstraint if spacing is length based. Closes #957 2017-07-31 11:29:03 +02:00
badlogic
fdee465333 [lua][love][corona] Added vertex effect support. See #898 2017-06-27 15:46:44 +02:00
badlogic
add46aeda6 [corona] Another fix for color handling in renderer. 2017-06-19 18:23:13 +02:00
badlogic
14bd5ecbfe [corona] Fixed color handling in renderer. 2017-06-19 18:08:22 +02:00
badlogic
9bd1153518 Updated examples and runtime demo code 2017-06-19 16:47:28 +02:00
badlogic
8123422f33 [lua] Fixed SkeletonClipping. [corona] Refactored rendering, should be a bit faster as it avoids a bunch of copies. Fixed RegionAttachment to be in alignement with reference implementation 2017-05-04 13:17:54 +02:00
badlogic
1fafbd0cb7 [corona] Added coin sample, added clipping attachment loading, fixed bug in Corona renderer. 2017-05-03 14:45:25 +02:00
badlogic
abc5ff272d [lua] Added convex decomposition 2017-05-03 14:16:32 +02:00
badlogic
d218cf1544 [lua] Added triangulator. 2017-05-03 13:44:34 +02:00
badlogic
9cd5f25cdb [ts] Moved conversion to typed array to minimize allocations 2017-02-23 13:33:40 +01:00
badlogic
0a2ca732cd [lua][corona] Ported 3.6 changes except TransformConstraint update 2017-02-22 14:40:55 +01:00
badlogic
aca4060fad [lua] Ported AnimationState changes 2016-11-24 13:00:46 +01:00
NathanSweet
36000e3c55 Updated to v3.5 (merge dev branch).
# Conflicts:
#	spine-c/src/spine/AnimationState.c
2016-11-15 23:10:23 +01:00
NathanSweet
7a18f0818c Every space in its place! (tm)
(whitespace clean up)
2016-10-15 23:15:41 +02:00
NathanSweet
6cdcdbdb40 Renamed TextureAtlasAttachmentLoader to AtlasAttachmentLoader, matching the other runtimes. 2016-10-15 10:27:38 +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
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
7c065a76e2 IK for spine-lua, spine-corona, spine-love. 2014-11-16 03:05:46 +01:00
NathanSweet
59204db7f8 Flip timelines for spine-lua, spine-corona, spine-love. 2014-11-16 00:05:01 +01: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
6de19dc914 Added AnimationState to spine-lua. 2013-07-24 03:56:18 +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
NathanSweet
2c3453f4dd Fixed spine-corona skins, slots. 2013-04-27 13:51:31 +02:00
NathanSweet
9e49979db1 spine-lua generic Lua runtime, refactored spine-corona. 2013-04-19 10:54:15 +02:00
NathanSweet
dd27ee184c Changed Spine export format.
There are no longer separate animation files, they are now inside the skeleton file. This means there is just one file to manage, which is cleaner. Now that animations are stored in SkeletonData, they can be looked up by name which leads to cleaner runtime APIs.

cocos2d and cocos2d-x runtimes got a cleaner ObjC/C++ API.
2013-04-04 04:00:45 +02:00
NathanSweet
0c2e2b1d3e Refactored spine-corona to use an attachment loader like the other runtimes. This is more flexible than the old attachment resolver. 2013-03-20 15:44:05 +01:00
NathanSweet
e2120ca07b Initial Corona runtime. 2013-02-20 01:13:59 +01:00