166 Commits

Author SHA1 Message Date
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
NathanSweet
d0d7e64b43 Docs: added a note to runtimes that don't yet support the binary format. 2016-04-07 22:50:00 +02:00
Nathan Sweet
085468320d Merge pull request #491 from ficoos/patch-1
[LUA] Change null to nil
2016-04-04 15:02:52 +02:00
NathanSweet
4f3ccc2c51 List the supported editor version on each runtime README.
closes #526
2016-04-03 19:10:47 +02:00
NathanSweet
e114f04bba Don't mix from uninitialized slot vertices.
Related to 27bab7bb951650c50c98b3b9b7bcc1fcb90c1570.
2016-03-29 03:14:03 +02:00
Steven Johnson
48f8ea1707 FFD fixes
Mesh attachment

Animation fixes (still seem to be timing issues looping frames)

Fix for loading default skin

Zeroing out vertices when loading

Miscellaneous indexing and name issues
2016-02-23 16:30:35 -06:00
Steven Johnson
678c6b1e14 Off-by-one error in skinned mesh attachment 2016-02-20 22:45:59 -06:00
Steven Johnson
aaa0c1f25d Added requires in attachment loader
Minor fixes for off-by-one indexing and loop counts for skinned meshes

Some fixes for names or counts, again for skinned meshes
2016-02-19 19:18:12 -06:00
NathanSweet
318b9939e6 Made consistent when slot vertices and attachment time are reset.
setAttachment resets vertices and attachment time only if the attachment actually changed. setToSetupPose always resets vertices and attachment time.

http://esotericsoftware.com/forum/Spine-API-SetToSetupPose-FFD-Questions-2102?p=26119#p26119
2016-01-15 07:02:09 +01:00
Saggi Mizrahi
87f5bedead Change null to nil
nil is the actual keyword. 'null' works in non strict mode as all undeclared variables are considered 'nil' in non strict mode.
2015-12-05 21:23:50 +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
davidroulin
ab79c06443 Added missing require
Corona SDK was throwing the following error:
File: spine-lua/AttachmentLoader.lua
Line: 46
Attempt to index global 'MeshAttachment' (a nil value)
2015-03-10 11:35:54 +01:00
Charilaos Kalogirou
db0ec554ce return the proper local for the module 2015-02-08 11:54:37 +02:00
NathanSweet
028769f54f Fixed single bone IK with flipping and y-up coordinate systems. 2015-01-30 17:59:11 +01:00
NathanSweet
ee849c62eb Fix mixing from uninitialized slot vertices. 2015-01-30 15:40:13 +01:00
NathanSweet
66dee75951 Fixed spine-lua IK timelines. 2014-11-17 23:06:52 +01:00
NathanSweet
63801b6f13 setSkin docs. 2014-11-17 19:41:50 +01: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
22b2086f39 Flip for bones. Flip timelines now affect bones. "draworder" in JSON -> "drawOrder".
Falls back to "draworder" to not break existing JSON (for the time being).
2014-10-04 13:01:52 +02:00
NathanSweet
eafcc2829f Fixed EventTimeline.
#300
2014-09-30 01:25:35 +02:00
NathanSweet
3ed7fb6865 Changed how scale is applied.
Scale is now multiplicative, as it was intended to be.
http://esotericsoftware.com/forum/viewtopic.php?p=16259#p16259
This change means skeletons need to be exported again using Spine 2.0.00+.
2014-09-24 16:14:42 +02:00
NathanSweet
8887677cd7 Missig function. 2014-05-23 16:21:41 +02:00