141 Commits

Author SHA1 Message Date
badlogic
4ee17864a2 Merged manually with master. @pharan please check AttachmentTools, stretchyman diffuse pma material 2017-05-09 13:32:19 +02:00
badlogic
7f864d6bc5 [lua] Fixed typo in SkeletonJson, closes #893 2017-05-08 12:39:16 +02:00
badlogic
c496c0aa08 [lua] Fixed typo in SkeletonJson, closes #893 2017-05-08 12:38:31 +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
7e2bd632ea [lua] Fixed bug in Slot, attachment vertices didn't get cleared upon Slot:setAttachment call 2017-05-02 14:03:31 +02:00
badlogic
755425d4be [lua] Fixed bug in Slot, attachment vertices didn't get cleared upon Slot:setAttachment call 2017-05-02 14:02:55 +02:00
badlogic
c7ca217d52 [lua] Ported AnimationState change 2017-04-10 15:46:40 +02:00
badlogic
76f8d683fa [lua] Fixed dipping fix 2017-04-10 12:11:33 +02:00
badlogic
4a3a18eef4 [lua] Ported dipping problem fix, see #867 2017-04-06 15:12:46 +02:00
badlogic
8f923971ce [lua][love] Two color tinting, one bug remaining, works otherwise. 2017-03-13 17:05:08 +01:00
badlogic
946a97d67a [lua] Ported 3.6 changes of TransformConstraint 2017-02-23 13:52:04 +01:00
badlogic
0a2ca732cd [lua][corona] Ported 3.6 changes except TransformConstraint update 2017-02-22 14:40:55 +01:00
badlogic
744230359b [lua] Closes #823, accessed global instead of property 2017-01-24 09:23:32 +01:00
badlogic
343f144c93 [lua] Skeleton:setColor was wrong 2017-01-04 10:57:32 +01:00
badlogic
8f10c759ad [lua] Ported fix from f3dbc650f83ae698443bb34ad4034dad9946fa08 2016-12-28 21:30:13 +01:00
badlogic
757b0e5172 [lua] Ported d77e1fbc53ba809b255db7ceda26f2c1f6c74739 2016-12-15 14:53:24 +01:00
badlogic
2be667dd62 [lua] Fix for clearTracks, see #805 2016-12-15 13:48:54 +01:00
badlogic
b3912899ab [lua] Fixes bug in ColorTimeline 2016-12-09 09:48:19 +01:00
badlogic
4a0ef931c0 [lua] Fixed method name typo, closes #799 2016-12-08 13:29:19 +01:00
badlogic
168186f170 [lua] Fix modulo usage in AnimationState, closes #798 2016-12-08 13:24:39 +01:00
badlogic
aba6a4b74c [lua] Ported latest AnimationState changes, see c512ee5d595076842cbb12d95a3a7f06792b81d1 2016-12-06 13:47:10 +01:00
badlogic
8e9d54b3ad [lua] Ported latest AnimationState changes. See #792 2016-12-02 15:42:31 +01:00
badlogic
7c59ef2f09 [lua] Fix for rotation timelines in AnimationState 2016-11-29 13:18:55 +01:00
badlogic
61c5c8f7a1 [lua] Ported latest AnimationState changes 2016-11-28 16:40:38 +01:00
badlogic
c0908f19ed [lua] Ported AnimationState changes 2016-11-24 13:01:14 +01:00
badlogic
2e252783a7 [lua] Fixed bug in AnimationState, indexing of timelines was incorrect. Fixed but in AttachmentTimeline, called wrong setAttachment 2016-11-21 13:53:03 +01:00
badlogic
2888ece970 [lua] Closes 760, passed wrong type to setAttachment 2016-11-18 09:49:54 +01:00
NathanSweet
d52d2e72ee Updated READMEs, supported version is 3.5.xx. 2016-11-15 23:29:27 +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
badlogic
6eb86fd3a1 [lua] Closes #739, forgot math_min/max assignemnts 2016-10-20 14:38:13 +02:00
badlogic
e93e9e77c4 [lua] Closes #739, bug in Skeleton:getBounds, need to nil check attachment 2016-10-20 14:37:24 +02:00
badlogic
315e2eef40 [lua] Closes #729, error in texture atlas parser 2016-10-20 14:33:21 +02:00
badlogic
6629a7d332 [lua] Fixed type in SkeletonJson.lua 2016-10-17 14:20:36 +02:00
NathanSweet
c0fdc454a2 Fixed inconsistent newlines.
License header was followed by \n\n and files ended with \n. Changed to \r\n.
2016-10-15 23:45:16 +02:00
NathanSweet
7a18f0818c Every space in its place! (tm)
(whitespace clean up)
2016-10-15 23:15:41 +02:00
NathanSweet
ded7a697d9 Removed obsolete SkinnedMeshAttachment. 2016-10-15 23:15:01 +02:00
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
Mario Zechner
e4cff0a319 Merge pull request #382 from SilverThorax/master
[LUA] Added missing require
2016-07-18 16:37:47 +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
Matthew
db2190e7db [LUA] AnimationState trackCount bugfixes (#466)
* resolved conflict

* made trackCount keep count, not maximum track index.
2016-06-17 20:11:41 +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