diff --git a/examples/example 12 - Spine/data/goblins.json b/examples/example 12 - Spine/data/goblins.json new file mode 100644 index 0000000..985205c --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.json @@ -0,0 +1,332 @@ +{"frames": { + +"dagger.png": +{ + "frame": {"x":2,"y":372,"w":26,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":26,"h":108}, + "sourceSize": {"w":26,"h":108} +}, +"goblin/eyes-closed.png": +{ + "frame": {"x":64,"y":354,"w":34,"h":12}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":12}, + "sourceSize": {"w":34,"h":12} +}, +"goblin/head.png": +{ + "frame": {"x":59,"y":83,"w":103,"h":64}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":103,"h":64}, + "sourceSize": {"w":103,"h":66} +}, +"goblin/left-arm.png": +{ + "frame": {"x":30,"y":445,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblin/left-foot.png": +{ + "frame": {"x":59,"y":182,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblin/left-hand.png": +{ + "frame": {"x":107,"y":436,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/left-lower-leg.png": +{ + "frame": {"x":26,"y":74,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblin/left-shoulder.png": +{ + "frame": {"x":26,"y":146,"w":29,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":44}, + "sourceSize": {"w":29,"h":44} +}, +"goblin/left-upper-leg.png": +{ + "frame": {"x":30,"y":370,"w":33,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":73}, + "sourceSize": {"w":33,"h":73} +}, +"goblin/neck.png": +{ + "frame": {"x":146,"y":309,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/pelvis.png": +{ + "frame": {"x":163,"y":233,"w":62,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":62,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblin/right-arm.png": +{ + "frame": {"x":30,"y":240,"w":23,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":23,"h":50}, + "sourceSize": {"w":23,"h":50} +}, +"goblin/right-foot.png": +{ + "frame": {"x":164,"y":198,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblin/right-hand.png": +{ + "frame": {"x":154,"y":462,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblin/right-lower-leg.png": +{ + "frame": {"x":26,"y":292,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblin/right-shoulder.png": +{ + "frame": {"x":105,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblin/right-upper-leg.png": +{ + "frame": {"x":136,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblin/torso.png": +{ + "frame": {"x":164,"y":2,"w":68,"h":96}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblin/undie-straps.png": +{ + "frame": {"x":59,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblin/undies.png": +{ + "frame": {"x":116,"y":479,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"goblingirl/eyes-closed.png": +{ + "frame": {"x":100,"y":419,"w":37,"h":15}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":6,"w":37,"h":15}, + "sourceSize": {"w":37,"h":21} +}, +"goblingirl/head.png": +{ + "frame": {"x":59,"y":2,"w":103,"h":79}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":103,"h":79}, + "sourceSize": {"w":103,"h":81} +}, +"goblingirl/left-arm.png": +{ + "frame": {"x":124,"y":227,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblingirl/left-foot.png": +{ + "frame": {"x":59,"y":149,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblingirl/left-hand.png": +{ + "frame": {"x":55,"y":250,"w":35,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":40}, + "sourceSize": {"w":35,"h":40} +}, +"goblingirl/left-lower-leg.png": +{ + "frame": {"x":26,"y":2,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/left-shoulder.png": +{ + "frame": {"x":26,"y":192,"w":28,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":28,"h":46}, + "sourceSize": {"w":28,"h":46} +}, +"goblingirl/left-upper-leg.png": +{ + "frame": {"x":65,"y":368,"w":33,"h":70}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/neck.png": +{ + "frame": {"x":145,"y":419,"w":33,"h":41}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":41}, + "sourceSize": {"w":35,"h":41} +}, +"goblingirl/pelvis.png": +{ + "frame": {"x":92,"y":264,"w":60,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblingirl/right-arm.png": +{ + "frame": {"x":232,"y":100,"w":22,"h":50}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":0,"w":22,"h":50}, + "sourceSize": {"w":28,"h":50} +}, +"goblingirl/right-foot.png": +{ + "frame": {"x":59,"y":215,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblingirl/right-hand.png": +{ + "frame": {"x":69,"y":440,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblingirl/right-lower-leg.png": +{ + "frame": {"x":126,"y":149,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblingirl/right-shoulder.png": +{ + "frame": {"x":64,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblingirl/right-upper-leg.png": +{ + "frame": {"x":100,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblingirl/torso.png": +{ + "frame": {"x":164,"y":100,"w":66,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblingirl/undie-straps.png": +{ + "frame": {"x":2,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblingirl/undies.png": +{ + "frame": {"x":154,"y":278,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"spear.png": +{ + "frame": {"x":2,"y":2,"w":22,"h":368}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":368}, + "sourceSize": {"w":22,"h":368} +}}, +"meta": { + "app": "http://www.codeandweb.com/texturepacker ", + "version": "1.0", + "image": "goblins.png", + "format": "RGBA8888", + "size": {"w":256,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:f89858b99c6b15e23d39806c4170313a:1/1$" +} +} diff --git a/examples/example 12 - Spine/data/goblins.json b/examples/example 12 - Spine/data/goblins.json new file mode 100644 index 0000000..985205c --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.json @@ -0,0 +1,332 @@ +{"frames": { + +"dagger.png": +{ + "frame": {"x":2,"y":372,"w":26,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":26,"h":108}, + "sourceSize": {"w":26,"h":108} +}, +"goblin/eyes-closed.png": +{ + "frame": {"x":64,"y":354,"w":34,"h":12}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":12}, + "sourceSize": {"w":34,"h":12} +}, +"goblin/head.png": +{ + "frame": {"x":59,"y":83,"w":103,"h":64}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":103,"h":64}, + "sourceSize": {"w":103,"h":66} +}, +"goblin/left-arm.png": +{ + "frame": {"x":30,"y":445,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblin/left-foot.png": +{ + "frame": {"x":59,"y":182,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblin/left-hand.png": +{ + "frame": {"x":107,"y":436,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/left-lower-leg.png": +{ + "frame": {"x":26,"y":74,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblin/left-shoulder.png": +{ + "frame": {"x":26,"y":146,"w":29,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":44}, + "sourceSize": {"w":29,"h":44} +}, +"goblin/left-upper-leg.png": +{ + "frame": {"x":30,"y":370,"w":33,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":73}, + "sourceSize": {"w":33,"h":73} +}, +"goblin/neck.png": +{ + "frame": {"x":146,"y":309,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/pelvis.png": +{ + "frame": {"x":163,"y":233,"w":62,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":62,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblin/right-arm.png": +{ + "frame": {"x":30,"y":240,"w":23,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":23,"h":50}, + "sourceSize": {"w":23,"h":50} +}, +"goblin/right-foot.png": +{ + "frame": {"x":164,"y":198,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblin/right-hand.png": +{ + "frame": {"x":154,"y":462,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblin/right-lower-leg.png": +{ + "frame": {"x":26,"y":292,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblin/right-shoulder.png": +{ + "frame": {"x":105,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblin/right-upper-leg.png": +{ + "frame": {"x":136,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblin/torso.png": +{ + "frame": {"x":164,"y":2,"w":68,"h":96}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblin/undie-straps.png": +{ + "frame": {"x":59,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblin/undies.png": +{ + "frame": {"x":116,"y":479,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"goblingirl/eyes-closed.png": +{ + "frame": {"x":100,"y":419,"w":37,"h":15}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":6,"w":37,"h":15}, + "sourceSize": {"w":37,"h":21} +}, +"goblingirl/head.png": +{ + "frame": {"x":59,"y":2,"w":103,"h":79}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":103,"h":79}, + "sourceSize": {"w":103,"h":81} +}, +"goblingirl/left-arm.png": +{ + "frame": {"x":124,"y":227,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblingirl/left-foot.png": +{ + "frame": {"x":59,"y":149,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblingirl/left-hand.png": +{ + "frame": {"x":55,"y":250,"w":35,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":40}, + "sourceSize": {"w":35,"h":40} +}, +"goblingirl/left-lower-leg.png": +{ + "frame": {"x":26,"y":2,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/left-shoulder.png": +{ + "frame": {"x":26,"y":192,"w":28,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":28,"h":46}, + "sourceSize": {"w":28,"h":46} +}, +"goblingirl/left-upper-leg.png": +{ + "frame": {"x":65,"y":368,"w":33,"h":70}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/neck.png": +{ + "frame": {"x":145,"y":419,"w":33,"h":41}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":41}, + "sourceSize": {"w":35,"h":41} +}, +"goblingirl/pelvis.png": +{ + "frame": {"x":92,"y":264,"w":60,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblingirl/right-arm.png": +{ + "frame": {"x":232,"y":100,"w":22,"h":50}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":0,"w":22,"h":50}, + "sourceSize": {"w":28,"h":50} +}, +"goblingirl/right-foot.png": +{ + "frame": {"x":59,"y":215,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblingirl/right-hand.png": +{ + "frame": {"x":69,"y":440,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblingirl/right-lower-leg.png": +{ + "frame": {"x":126,"y":149,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblingirl/right-shoulder.png": +{ + "frame": {"x":64,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblingirl/right-upper-leg.png": +{ + "frame": {"x":100,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblingirl/torso.png": +{ + "frame": {"x":164,"y":100,"w":66,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblingirl/undie-straps.png": +{ + "frame": {"x":2,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblingirl/undies.png": +{ + "frame": {"x":154,"y":278,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"spear.png": +{ + "frame": {"x":2,"y":2,"w":22,"h":368}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":368}, + "sourceSize": {"w":22,"h":368} +}}, +"meta": { + "app": "http://www.codeandweb.com/texturepacker ", + "version": "1.0", + "image": "goblins.png", + "format": "RGBA8888", + "size": {"w":256,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:f89858b99c6b15e23d39806c4170313a:1/1$" +} +} diff --git a/examples/example 12 - Spine/data/goblins.png b/examples/example 12 - Spine/data/goblins.png new file mode 100644 index 0000000..5c26ca0 --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.png Binary files differ diff --git a/examples/example 12 - Spine/data/goblins.json b/examples/example 12 - Spine/data/goblins.json new file mode 100644 index 0000000..985205c --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.json @@ -0,0 +1,332 @@ +{"frames": { + +"dagger.png": +{ + "frame": {"x":2,"y":372,"w":26,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":26,"h":108}, + "sourceSize": {"w":26,"h":108} +}, +"goblin/eyes-closed.png": +{ + "frame": {"x":64,"y":354,"w":34,"h":12}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":12}, + "sourceSize": {"w":34,"h":12} +}, +"goblin/head.png": +{ + "frame": {"x":59,"y":83,"w":103,"h":64}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":103,"h":64}, + "sourceSize": {"w":103,"h":66} +}, +"goblin/left-arm.png": +{ + "frame": {"x":30,"y":445,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblin/left-foot.png": +{ + "frame": {"x":59,"y":182,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblin/left-hand.png": +{ + "frame": {"x":107,"y":436,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/left-lower-leg.png": +{ + "frame": {"x":26,"y":74,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblin/left-shoulder.png": +{ + "frame": {"x":26,"y":146,"w":29,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":44}, + "sourceSize": {"w":29,"h":44} +}, +"goblin/left-upper-leg.png": +{ + "frame": {"x":30,"y":370,"w":33,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":73}, + "sourceSize": {"w":33,"h":73} +}, +"goblin/neck.png": +{ + "frame": {"x":146,"y":309,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/pelvis.png": +{ + "frame": {"x":163,"y":233,"w":62,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":62,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblin/right-arm.png": +{ + "frame": {"x":30,"y":240,"w":23,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":23,"h":50}, + "sourceSize": {"w":23,"h":50} +}, +"goblin/right-foot.png": +{ + "frame": {"x":164,"y":198,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblin/right-hand.png": +{ + "frame": {"x":154,"y":462,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblin/right-lower-leg.png": +{ + "frame": {"x":26,"y":292,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblin/right-shoulder.png": +{ + "frame": {"x":105,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblin/right-upper-leg.png": +{ + "frame": {"x":136,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblin/torso.png": +{ + "frame": {"x":164,"y":2,"w":68,"h":96}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblin/undie-straps.png": +{ + "frame": {"x":59,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblin/undies.png": +{ + "frame": {"x":116,"y":479,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"goblingirl/eyes-closed.png": +{ + "frame": {"x":100,"y":419,"w":37,"h":15}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":6,"w":37,"h":15}, + "sourceSize": {"w":37,"h":21} +}, +"goblingirl/head.png": +{ + "frame": {"x":59,"y":2,"w":103,"h":79}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":103,"h":79}, + "sourceSize": {"w":103,"h":81} +}, +"goblingirl/left-arm.png": +{ + "frame": {"x":124,"y":227,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblingirl/left-foot.png": +{ + "frame": {"x":59,"y":149,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblingirl/left-hand.png": +{ + "frame": {"x":55,"y":250,"w":35,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":40}, + "sourceSize": {"w":35,"h":40} +}, +"goblingirl/left-lower-leg.png": +{ + "frame": {"x":26,"y":2,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/left-shoulder.png": +{ + "frame": {"x":26,"y":192,"w":28,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":28,"h":46}, + "sourceSize": {"w":28,"h":46} +}, +"goblingirl/left-upper-leg.png": +{ + "frame": {"x":65,"y":368,"w":33,"h":70}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/neck.png": +{ + "frame": {"x":145,"y":419,"w":33,"h":41}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":41}, + "sourceSize": {"w":35,"h":41} +}, +"goblingirl/pelvis.png": +{ + "frame": {"x":92,"y":264,"w":60,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblingirl/right-arm.png": +{ + "frame": {"x":232,"y":100,"w":22,"h":50}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":0,"w":22,"h":50}, + "sourceSize": {"w":28,"h":50} +}, +"goblingirl/right-foot.png": +{ + "frame": {"x":59,"y":215,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblingirl/right-hand.png": +{ + "frame": {"x":69,"y":440,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblingirl/right-lower-leg.png": +{ + "frame": {"x":126,"y":149,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblingirl/right-shoulder.png": +{ + "frame": {"x":64,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblingirl/right-upper-leg.png": +{ + "frame": {"x":100,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblingirl/torso.png": +{ + "frame": {"x":164,"y":100,"w":66,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblingirl/undie-straps.png": +{ + "frame": {"x":2,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblingirl/undies.png": +{ + "frame": {"x":154,"y":278,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"spear.png": +{ + "frame": {"x":2,"y":2,"w":22,"h":368}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":368}, + "sourceSize": {"w":22,"h":368} +}}, +"meta": { + "app": "http://www.codeandweb.com/texturepacker ", + "version": "1.0", + "image": "goblins.png", + "format": "RGBA8888", + "size": {"w":256,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:f89858b99c6b15e23d39806c4170313a:1/1$" +} +} diff --git a/examples/example 12 - Spine/data/goblins.png b/examples/example 12 - Spine/data/goblins.png new file mode 100644 index 0000000..5c26ca0 --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.png Binary files differ diff --git a/examples/example 12 - Spine/data/goblinsSpineData.json b/examples/example 12 - Spine/data/goblinsSpineData.json new file mode 100644 index 0000000..4a44566 --- /dev/null +++ b/examples/example 12 - Spine/data/goblinsSpineData.json @@ -0,0 +1,502 @@ +{ +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, + { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, + { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, + { "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 }, + { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 }, + { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 }, + { "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 }, + { "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 }, + { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 }, + { "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 }, + { "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 }, + { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 }, + { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 }, + { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 }, + { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, + { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, + { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } +], +"slots": [ + { "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" }, + { "name": "left arm", "bone": "left arm", "attachment": "left arm" }, + { "name": "left hand item", "bone": "left hand", "attachment": "spear" }, + { "name": "left hand", "bone": "left hand", "attachment": "left hand" }, + { "name": "left foot", "bone": "left foot", "attachment": "left foot" }, + { "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" }, + { "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" }, + { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, + { "name": "right foot", "bone": "right foot", "attachment": "right foot" }, + { "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" }, + { "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" }, + { "name": "undies", "bone": "pelvis", "attachment": "undies" }, + { "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" }, + { "name": "head", "bone": "head", "attachment": "head" }, + { "name": "eyes", "bone": "head" }, + { "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" }, + { "name": "right arm", "bone": "right arm", "attachment": "right arm" }, + { "name": "right hand item", "bone": "right hand", "attachment": "dagger" }, + { "name": "right hand", "bone": "right hand", "attachment": "right hand" } +], +"skins": { + "default": { + "left hand item": { + "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, + "spear": { "x": -4.55, "y": 39.2, "rotation": 13.04, "width": 22, "height": 368 } + }, + "right hand item": { + "dagger": { "x": 6.51, "y": -24.15, "rotation": -8.06, "width": 26, "height": 108 } + } + }, + "goblin": { + "eyes": { + "eyes closed": { "name": "goblin/eyes-closed", "x": 32.21, "y": -21.27, "rotation": -88.92, "width": 34, "height": 12 } + }, + "head": { + "head": { "name": "goblin/head", "x": 25.73, "y": 2.33, "rotation": -92.29, "width": 103, "height": 66 } + }, + "left arm": { + "left arm": { + "name": "goblin/left-arm", + "x": 16.7, + "y": -1.69, + "scaleX": 1.057, + "scaleY": 1.057, + "rotation": 33.84, + "width": 37, + "height": 35 + } + }, + "left foot": { + "left foot": { "name": "goblin/left-foot", "x": 24.85, "y": 8.74, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblin/left-hand", + "x": 3.47, + "y": 3.41, + "scaleX": 0.892, + "scaleY": 0.892, + "rotation": 31.14, + "width": 36, + "height": 41 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblin/left-lower-leg", "x": 23.58, "y": -2.06, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblin/left-shoulder", "x": 15.56, "y": -2.26, "rotation": 62.01, "width": 29, "height": 44 } + }, + "left upper leg": { + "left upper leg": { "name": "goblin/left-upper-leg", "x": 29.68, "y": -3.87, "rotation": 89.09, "width": 33, "height": 73 } + }, + "neck": { + "neck": { "name": "goblin/neck", "x": 10.1, "y": 0.42, "rotation": -93.69, "width": 36, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblin/pelvis", "x": -5.61, "y": 0.76, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblin/right-arm", "x": 16.44, "y": -1.04, "rotation": 94.32, "width": 23, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblin/right-foot", "x": 23.56, "y": 9.8, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblin/right-hand", "x": 7.88, "y": 2.78, "rotation": 91.96, "width": 36, "height": 37 } + }, + "right lower leg": { + "right lower leg": { "name": "goblin/right-lower-leg", "x": 25.68, "y": -3.15, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblin/right-shoulder", "x": 15.68, "y": -1.03, "rotation": 130.65, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblin/right-upper-leg", "x": 20.35, "y": 1.47, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblin/torso", "x": 38.09, "y": -3.87, "rotation": -94.95, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblin/undie-straps", "x": -3.87, "y": 13.1, "scaleX": 1.089, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblin/undies", "x": 6.3, "y": 0.12, "rotation": 0.91, "width": 36, "height": 29 } + } + }, + "goblingirl": { + "eyes": { + "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } + }, + "head": { + "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } + }, + "left arm": { + "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } + }, + "left foot": { + "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblingirl/left-hand", + "x": 4.34, + "y": 2.39, + "scaleX": 0.896, + "scaleY": 0.896, + "rotation": 30.34, + "width": 35, + "height": 40 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } + }, + "left upper leg": { + "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } + }, + "neck": { + "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right hand item": { + "right hand item": { "name": "goblingirl/dagger-tip", "x": 13.45, "y": 22.07, "rotation": -3.23, "width": 17, "height": 17 } + }, + "right lower leg": { + "right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 } + } + } +}, +"animations": { + "walk": { + "bones": { + "left upper leg": { + "rotate": [ + { "time": 0, "angle": -26.55 }, + { "time": 0.1333, "angle": -8.78 }, + { "time": 0.2333, "angle": 9.51 }, + { "time": 0.3666, "angle": 30.74 }, + { "time": 0.5, "angle": 25.33 }, + { "time": 0.6333, "angle": 26.11 }, + { "time": 0.7333, "angle": -7.7 }, + { "time": 0.8666, "angle": -21.19 }, + { "time": 1, "angle": -26.55 } + ], + "translate": [ + { "time": 0, "x": -1.32, "y": 1.7 }, + { "time": 0.3666, "x": -0.06, "y": 2.42 }, + { "time": 1, "x": -1.32, "y": 1.7 } + ] + }, + "right upper leg": { + "rotate": [ + { "time": 0, "angle": 42.45 }, + { "time": 0.1333, "angle": 52.1 }, + { "time": 0.2333, "angle": 8.53 }, + { "time": 0.5, "angle": -16.93 }, + { "time": 0.6333, "angle": 1.89 }, + { + "time": 0.7333, + "angle": 28.06, + "curve": [ 0.462, 0.11, 1, 1 ] + }, + { + "time": 0.8666, + "angle": 58.68, + "curve": [ 0.5, 0.02, 1, 1 ] + }, + { "time": 1, "angle": 42.45 } + ], + "translate": [ + { "time": 0, "x": 6.23, "y": 0 }, + { "time": 0.2333, "x": 2.14, "y": 2.4 }, + { "time": 0.5, "x": 2.44, "y": 4.8 }, + { "time": 1, "x": 6.23, "y": 0 } + ] + }, + "left lower leg": { + "rotate": [ + { "time": 0, "angle": -22.98 }, + { "time": 0.1333, "angle": -63.5 }, + { "time": 0.2333, "angle": -73.76 }, + { "time": 0.5, "angle": 5.11 }, + { "time": 0.6333, "angle": -28.29 }, + { "time": 0.7333, "angle": 4.08 }, + { "time": 0.8666, "angle": 3.53 }, + { "time": 1, "angle": -22.98 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2333, "x": 2.55, "y": -0.47 }, + { "time": 0.5, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "left foot": { + "rotate": [ + { "time": 0, "angle": -3.69 }, + { "time": 0.1333, "angle": -10.42 }, + { "time": 0.2333, "angle": -5.01 }, + { "time": 0.3666, "angle": 3.87 }, + { "time": 0.5, "angle": -3.87 }, + { "time": 0.6333, "angle": 2.78 }, + { "time": 0.7333, "angle": 1.68 }, + { "time": 0.8666, "angle": -8.54 }, + { "time": 1, "angle": -3.69 } + ] + }, + "right shoulder": { + "rotate": [ + { + "time": 0, + "angle": 5.29, + "curve": [ 0.264, 0, 0.75, 1 ] + }, + { "time": 0.6333, "angle": 6.65 }, + { "time": 1, "angle": 5.29 } + ] + }, + "right arm": { + "rotate": [ + { + "time": 0, + "angle": -4.02, + "curve": [ 0.267, 0, 0.804, 0.99 ] + }, + { + "time": 0.6333, + "angle": 19.78, + "curve": [ 0.307, 0, 0.787, 0.99 ] + }, + { "time": 1, "angle": -4.02 } + ] + }, + "right hand": { + "rotate": [ + { "time": 0, "angle": 8.98 }, + { "time": 0.6333, "angle": 0.51 }, + { "time": 1, "angle": 8.98 } + ] + }, + "left shoulder": { + "rotate": [ + { + "time": 0, + "angle": 6.25, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": -11.78, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 6.25 } + ], + "translate": [ + { "time": 0, "x": 1.15, "y": 0.23 } + ] + }, + "left hand": { + "rotate": [ + { + "time": 0, + "angle": -21.23, + "curve": [ 0.295, 0, 0.755, 0.98 ] + }, + { + "time": 0.5, + "angle": -27.28, + "curve": [ 0.241, 0, 0.75, 0.97 ] + }, + { "time": 1, "angle": -21.23 } + ] + }, + "left arm": { + "rotate": [ + { + "time": 0, + "angle": 28.37, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": 60.09, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 28.37 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -10.28 }, + { + "time": 0.1333, + "angle": -15.38, + "curve": [ 0.545, 0, 0.818, 1 ] + }, + { + "time": 0.3666, + "angle": -9.78, + "curve": [ 0.58, 0.17, 0.669, 0.99 ] + }, + { + "time": 0.6333, + "angle": -15.75, + "curve": [ 0.235, 0.01, 0.795, 1 ] + }, + { + "time": 0.8666, + "angle": -7.06, + "curve": [ 0.209, 0, 0.816, 0.98 ] + }, + { "time": 1, "angle": -10.28 } + ], + "translate": [ + { "time": 0, "x": -1.29, "y": 1.68 } + ] + }, + "right foot": { + "rotate": [ + { "time": 0, "angle": -5.25 }, + { "time": 0.2333, "angle": -1.91 }, + { "time": 0.3666, "angle": -6.45 }, + { "time": 0.5, "angle": -5.39 }, + { "time": 0.7333, "angle": -11.68 }, + { "time": 0.8666, "angle": 0.46 }, + { "time": 1, "angle": -5.25 } + ] + }, + "right lower leg": { + "rotate": [ + { + "time": 0, + "angle": -3.39, + "curve": [ 0.316, 0.01, 0.741, 0.98 ] + }, + { + "time": 0.1333, + "angle": -45.53, + "curve": [ 0.229, 0, 0.738, 0.97 ] + }, + { "time": 0.2333, "angle": -4.83 }, + { "time": 0.5, "angle": -19.53 }, + { "time": 0.6333, "angle": -64.8 }, + { + "time": 0.7333, + "angle": -82.56, + "curve": [ 0.557, 0.18, 1, 1 ] + }, + { "time": 1, "angle": -3.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.6333, "x": 2.18, "y": 0.21 }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": -4.16 }, + { + "time": 0.1333, + "x": 0, + "y": -7.05, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { "time": 0.3666, "x": 0, "y": 6.78 }, + { "time": 0.5, "x": 0, "y": -6.13 }, + { + "time": 0.6333, + "x": 0, + "y": -7.05, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { "time": 0.8666, "x": 0, "y": 6.78 }, + { "time": 1, "x": 0, "y": -4.16 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 3.6 }, + { "time": 0.1333, "angle": 17.49 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { "time": 0.5, "angle": 5.17 }, + { "time": 0.6333, "angle": 18.36 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": 3.6, + "curve": [ 0, 0, 0.704, 1.17 ] + }, + { "time": 0.1333, "angle": -0.2 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { + "time": 0.5, + "angle": 5.17, + "curve": [ 0, 0, 0.704, 1.61 ] + }, + { "time": 0.6666, "angle": 1.1 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + } + }, + "slots": { + "eyes": { + "attachment": [ + { "time": 0.7, "name": "eyes closed" }, + { "time": 0.8, "name": null } + ] + } + } + } +} +} \ No newline at end of file diff --git a/examples/example 12 - Spine/data/goblins.json b/examples/example 12 - Spine/data/goblins.json new file mode 100644 index 0000000..985205c --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.json @@ -0,0 +1,332 @@ +{"frames": { + +"dagger.png": +{ + "frame": {"x":2,"y":372,"w":26,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":26,"h":108}, + "sourceSize": {"w":26,"h":108} +}, +"goblin/eyes-closed.png": +{ + "frame": {"x":64,"y":354,"w":34,"h":12}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":12}, + "sourceSize": {"w":34,"h":12} +}, +"goblin/head.png": +{ + "frame": {"x":59,"y":83,"w":103,"h":64}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":103,"h":64}, + "sourceSize": {"w":103,"h":66} +}, +"goblin/left-arm.png": +{ + "frame": {"x":30,"y":445,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblin/left-foot.png": +{ + "frame": {"x":59,"y":182,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblin/left-hand.png": +{ + "frame": {"x":107,"y":436,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/left-lower-leg.png": +{ + "frame": {"x":26,"y":74,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblin/left-shoulder.png": +{ + "frame": {"x":26,"y":146,"w":29,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":44}, + "sourceSize": {"w":29,"h":44} +}, +"goblin/left-upper-leg.png": +{ + "frame": {"x":30,"y":370,"w":33,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":73}, + "sourceSize": {"w":33,"h":73} +}, +"goblin/neck.png": +{ + "frame": {"x":146,"y":309,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/pelvis.png": +{ + "frame": {"x":163,"y":233,"w":62,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":62,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblin/right-arm.png": +{ + "frame": {"x":30,"y":240,"w":23,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":23,"h":50}, + "sourceSize": {"w":23,"h":50} +}, +"goblin/right-foot.png": +{ + "frame": {"x":164,"y":198,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblin/right-hand.png": +{ + "frame": {"x":154,"y":462,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblin/right-lower-leg.png": +{ + "frame": {"x":26,"y":292,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblin/right-shoulder.png": +{ + "frame": {"x":105,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblin/right-upper-leg.png": +{ + "frame": {"x":136,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblin/torso.png": +{ + "frame": {"x":164,"y":2,"w":68,"h":96}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblin/undie-straps.png": +{ + "frame": {"x":59,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblin/undies.png": +{ + "frame": {"x":116,"y":479,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"goblingirl/eyes-closed.png": +{ + "frame": {"x":100,"y":419,"w":37,"h":15}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":6,"w":37,"h":15}, + "sourceSize": {"w":37,"h":21} +}, +"goblingirl/head.png": +{ + "frame": {"x":59,"y":2,"w":103,"h":79}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":103,"h":79}, + "sourceSize": {"w":103,"h":81} +}, +"goblingirl/left-arm.png": +{ + "frame": {"x":124,"y":227,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblingirl/left-foot.png": +{ + "frame": {"x":59,"y":149,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblingirl/left-hand.png": +{ + "frame": {"x":55,"y":250,"w":35,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":40}, + "sourceSize": {"w":35,"h":40} +}, +"goblingirl/left-lower-leg.png": +{ + "frame": {"x":26,"y":2,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/left-shoulder.png": +{ + "frame": {"x":26,"y":192,"w":28,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":28,"h":46}, + "sourceSize": {"w":28,"h":46} +}, +"goblingirl/left-upper-leg.png": +{ + "frame": {"x":65,"y":368,"w":33,"h":70}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/neck.png": +{ + "frame": {"x":145,"y":419,"w":33,"h":41}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":41}, + "sourceSize": {"w":35,"h":41} +}, +"goblingirl/pelvis.png": +{ + "frame": {"x":92,"y":264,"w":60,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblingirl/right-arm.png": +{ + "frame": {"x":232,"y":100,"w":22,"h":50}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":0,"w":22,"h":50}, + "sourceSize": {"w":28,"h":50} +}, +"goblingirl/right-foot.png": +{ + "frame": {"x":59,"y":215,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblingirl/right-hand.png": +{ + "frame": {"x":69,"y":440,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblingirl/right-lower-leg.png": +{ + "frame": {"x":126,"y":149,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblingirl/right-shoulder.png": +{ + "frame": {"x":64,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblingirl/right-upper-leg.png": +{ + "frame": {"x":100,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblingirl/torso.png": +{ + "frame": {"x":164,"y":100,"w":66,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblingirl/undie-straps.png": +{ + "frame": {"x":2,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblingirl/undies.png": +{ + "frame": {"x":154,"y":278,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"spear.png": +{ + "frame": {"x":2,"y":2,"w":22,"h":368}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":368}, + "sourceSize": {"w":22,"h":368} +}}, +"meta": { + "app": "http://www.codeandweb.com/texturepacker ", + "version": "1.0", + "image": "goblins.png", + "format": "RGBA8888", + "size": {"w":256,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:f89858b99c6b15e23d39806c4170313a:1/1$" +} +} diff --git a/examples/example 12 - Spine/data/goblins.png b/examples/example 12 - Spine/data/goblins.png new file mode 100644 index 0000000..5c26ca0 --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.png Binary files differ diff --git a/examples/example 12 - Spine/data/goblinsSpineData.json b/examples/example 12 - Spine/data/goblinsSpineData.json new file mode 100644 index 0000000..4a44566 --- /dev/null +++ b/examples/example 12 - Spine/data/goblinsSpineData.json @@ -0,0 +1,502 @@ +{ +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, + { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, + { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, + { "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 }, + { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 }, + { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 }, + { "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 }, + { "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 }, + { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 }, + { "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 }, + { "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 }, + { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 }, + { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 }, + { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 }, + { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, + { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, + { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } +], +"slots": [ + { "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" }, + { "name": "left arm", "bone": "left arm", "attachment": "left arm" }, + { "name": "left hand item", "bone": "left hand", "attachment": "spear" }, + { "name": "left hand", "bone": "left hand", "attachment": "left hand" }, + { "name": "left foot", "bone": "left foot", "attachment": "left foot" }, + { "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" }, + { "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" }, + { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, + { "name": "right foot", "bone": "right foot", "attachment": "right foot" }, + { "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" }, + { "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" }, + { "name": "undies", "bone": "pelvis", "attachment": "undies" }, + { "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" }, + { "name": "head", "bone": "head", "attachment": "head" }, + { "name": "eyes", "bone": "head" }, + { "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" }, + { "name": "right arm", "bone": "right arm", "attachment": "right arm" }, + { "name": "right hand item", "bone": "right hand", "attachment": "dagger" }, + { "name": "right hand", "bone": "right hand", "attachment": "right hand" } +], +"skins": { + "default": { + "left hand item": { + "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, + "spear": { "x": -4.55, "y": 39.2, "rotation": 13.04, "width": 22, "height": 368 } + }, + "right hand item": { + "dagger": { "x": 6.51, "y": -24.15, "rotation": -8.06, "width": 26, "height": 108 } + } + }, + "goblin": { + "eyes": { + "eyes closed": { "name": "goblin/eyes-closed", "x": 32.21, "y": -21.27, "rotation": -88.92, "width": 34, "height": 12 } + }, + "head": { + "head": { "name": "goblin/head", "x": 25.73, "y": 2.33, "rotation": -92.29, "width": 103, "height": 66 } + }, + "left arm": { + "left arm": { + "name": "goblin/left-arm", + "x": 16.7, + "y": -1.69, + "scaleX": 1.057, + "scaleY": 1.057, + "rotation": 33.84, + "width": 37, + "height": 35 + } + }, + "left foot": { + "left foot": { "name": "goblin/left-foot", "x": 24.85, "y": 8.74, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblin/left-hand", + "x": 3.47, + "y": 3.41, + "scaleX": 0.892, + "scaleY": 0.892, + "rotation": 31.14, + "width": 36, + "height": 41 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblin/left-lower-leg", "x": 23.58, "y": -2.06, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblin/left-shoulder", "x": 15.56, "y": -2.26, "rotation": 62.01, "width": 29, "height": 44 } + }, + "left upper leg": { + "left upper leg": { "name": "goblin/left-upper-leg", "x": 29.68, "y": -3.87, "rotation": 89.09, "width": 33, "height": 73 } + }, + "neck": { + "neck": { "name": "goblin/neck", "x": 10.1, "y": 0.42, "rotation": -93.69, "width": 36, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblin/pelvis", "x": -5.61, "y": 0.76, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblin/right-arm", "x": 16.44, "y": -1.04, "rotation": 94.32, "width": 23, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblin/right-foot", "x": 23.56, "y": 9.8, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblin/right-hand", "x": 7.88, "y": 2.78, "rotation": 91.96, "width": 36, "height": 37 } + }, + "right lower leg": { + "right lower leg": { "name": "goblin/right-lower-leg", "x": 25.68, "y": -3.15, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblin/right-shoulder", "x": 15.68, "y": -1.03, "rotation": 130.65, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblin/right-upper-leg", "x": 20.35, "y": 1.47, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblin/torso", "x": 38.09, "y": -3.87, "rotation": -94.95, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblin/undie-straps", "x": -3.87, "y": 13.1, "scaleX": 1.089, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblin/undies", "x": 6.3, "y": 0.12, "rotation": 0.91, "width": 36, "height": 29 } + } + }, + "goblingirl": { + "eyes": { + "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } + }, + "head": { + "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } + }, + "left arm": { + "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } + }, + "left foot": { + "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblingirl/left-hand", + "x": 4.34, + "y": 2.39, + "scaleX": 0.896, + "scaleY": 0.896, + "rotation": 30.34, + "width": 35, + "height": 40 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } + }, + "left upper leg": { + "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } + }, + "neck": { + "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right hand item": { + "right hand item": { "name": "goblingirl/dagger-tip", "x": 13.45, "y": 22.07, "rotation": -3.23, "width": 17, "height": 17 } + }, + "right lower leg": { + "right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 } + } + } +}, +"animations": { + "walk": { + "bones": { + "left upper leg": { + "rotate": [ + { "time": 0, "angle": -26.55 }, + { "time": 0.1333, "angle": -8.78 }, + { "time": 0.2333, "angle": 9.51 }, + { "time": 0.3666, "angle": 30.74 }, + { "time": 0.5, "angle": 25.33 }, + { "time": 0.6333, "angle": 26.11 }, + { "time": 0.7333, "angle": -7.7 }, + { "time": 0.8666, "angle": -21.19 }, + { "time": 1, "angle": -26.55 } + ], + "translate": [ + { "time": 0, "x": -1.32, "y": 1.7 }, + { "time": 0.3666, "x": -0.06, "y": 2.42 }, + { "time": 1, "x": -1.32, "y": 1.7 } + ] + }, + "right upper leg": { + "rotate": [ + { "time": 0, "angle": 42.45 }, + { "time": 0.1333, "angle": 52.1 }, + { "time": 0.2333, "angle": 8.53 }, + { "time": 0.5, "angle": -16.93 }, + { "time": 0.6333, "angle": 1.89 }, + { + "time": 0.7333, + "angle": 28.06, + "curve": [ 0.462, 0.11, 1, 1 ] + }, + { + "time": 0.8666, + "angle": 58.68, + "curve": [ 0.5, 0.02, 1, 1 ] + }, + { "time": 1, "angle": 42.45 } + ], + "translate": [ + { "time": 0, "x": 6.23, "y": 0 }, + { "time": 0.2333, "x": 2.14, "y": 2.4 }, + { "time": 0.5, "x": 2.44, "y": 4.8 }, + { "time": 1, "x": 6.23, "y": 0 } + ] + }, + "left lower leg": { + "rotate": [ + { "time": 0, "angle": -22.98 }, + { "time": 0.1333, "angle": -63.5 }, + { "time": 0.2333, "angle": -73.76 }, + { "time": 0.5, "angle": 5.11 }, + { "time": 0.6333, "angle": -28.29 }, + { "time": 0.7333, "angle": 4.08 }, + { "time": 0.8666, "angle": 3.53 }, + { "time": 1, "angle": -22.98 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2333, "x": 2.55, "y": -0.47 }, + { "time": 0.5, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "left foot": { + "rotate": [ + { "time": 0, "angle": -3.69 }, + { "time": 0.1333, "angle": -10.42 }, + { "time": 0.2333, "angle": -5.01 }, + { "time": 0.3666, "angle": 3.87 }, + { "time": 0.5, "angle": -3.87 }, + { "time": 0.6333, "angle": 2.78 }, + { "time": 0.7333, "angle": 1.68 }, + { "time": 0.8666, "angle": -8.54 }, + { "time": 1, "angle": -3.69 } + ] + }, + "right shoulder": { + "rotate": [ + { + "time": 0, + "angle": 5.29, + "curve": [ 0.264, 0, 0.75, 1 ] + }, + { "time": 0.6333, "angle": 6.65 }, + { "time": 1, "angle": 5.29 } + ] + }, + "right arm": { + "rotate": [ + { + "time": 0, + "angle": -4.02, + "curve": [ 0.267, 0, 0.804, 0.99 ] + }, + { + "time": 0.6333, + "angle": 19.78, + "curve": [ 0.307, 0, 0.787, 0.99 ] + }, + { "time": 1, "angle": -4.02 } + ] + }, + "right hand": { + "rotate": [ + { "time": 0, "angle": 8.98 }, + { "time": 0.6333, "angle": 0.51 }, + { "time": 1, "angle": 8.98 } + ] + }, + "left shoulder": { + "rotate": [ + { + "time": 0, + "angle": 6.25, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": -11.78, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 6.25 } + ], + "translate": [ + { "time": 0, "x": 1.15, "y": 0.23 } + ] + }, + "left hand": { + "rotate": [ + { + "time": 0, + "angle": -21.23, + "curve": [ 0.295, 0, 0.755, 0.98 ] + }, + { + "time": 0.5, + "angle": -27.28, + "curve": [ 0.241, 0, 0.75, 0.97 ] + }, + { "time": 1, "angle": -21.23 } + ] + }, + "left arm": { + "rotate": [ + { + "time": 0, + "angle": 28.37, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": 60.09, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 28.37 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -10.28 }, + { + "time": 0.1333, + "angle": -15.38, + "curve": [ 0.545, 0, 0.818, 1 ] + }, + { + "time": 0.3666, + "angle": -9.78, + "curve": [ 0.58, 0.17, 0.669, 0.99 ] + }, + { + "time": 0.6333, + "angle": -15.75, + "curve": [ 0.235, 0.01, 0.795, 1 ] + }, + { + "time": 0.8666, + "angle": -7.06, + "curve": [ 0.209, 0, 0.816, 0.98 ] + }, + { "time": 1, "angle": -10.28 } + ], + "translate": [ + { "time": 0, "x": -1.29, "y": 1.68 } + ] + }, + "right foot": { + "rotate": [ + { "time": 0, "angle": -5.25 }, + { "time": 0.2333, "angle": -1.91 }, + { "time": 0.3666, "angle": -6.45 }, + { "time": 0.5, "angle": -5.39 }, + { "time": 0.7333, "angle": -11.68 }, + { "time": 0.8666, "angle": 0.46 }, + { "time": 1, "angle": -5.25 } + ] + }, + "right lower leg": { + "rotate": [ + { + "time": 0, + "angle": -3.39, + "curve": [ 0.316, 0.01, 0.741, 0.98 ] + }, + { + "time": 0.1333, + "angle": -45.53, + "curve": [ 0.229, 0, 0.738, 0.97 ] + }, + { "time": 0.2333, "angle": -4.83 }, + { "time": 0.5, "angle": -19.53 }, + { "time": 0.6333, "angle": -64.8 }, + { + "time": 0.7333, + "angle": -82.56, + "curve": [ 0.557, 0.18, 1, 1 ] + }, + { "time": 1, "angle": -3.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.6333, "x": 2.18, "y": 0.21 }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": -4.16 }, + { + "time": 0.1333, + "x": 0, + "y": -7.05, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { "time": 0.3666, "x": 0, "y": 6.78 }, + { "time": 0.5, "x": 0, "y": -6.13 }, + { + "time": 0.6333, + "x": 0, + "y": -7.05, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { "time": 0.8666, "x": 0, "y": 6.78 }, + { "time": 1, "x": 0, "y": -4.16 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 3.6 }, + { "time": 0.1333, "angle": 17.49 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { "time": 0.5, "angle": 5.17 }, + { "time": 0.6333, "angle": 18.36 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": 3.6, + "curve": [ 0, 0, 0.704, 1.17 ] + }, + { "time": 0.1333, "angle": -0.2 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { + "time": 0.5, + "angle": 5.17, + "curve": [ 0, 0, 0.704, 1.61 ] + }, + { "time": 0.6666, "angle": 1.1 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + } + }, + "slots": { + "eyes": { + "attachment": [ + { "time": 0.7, "name": "eyes closed" }, + { "time": 0.8, "name": null } + ] + } + } + } +} +} \ No newline at end of file diff --git a/examples/example 12 - Spine/index_goblins.html b/examples/example 12 - Spine/index_goblins.html new file mode 100644 index 0000000..550187d --- /dev/null +++ b/examples/example 12 - Spine/index_goblins.html @@ -0,0 +1,104 @@ + + + + pixi.js example 12 Spine + + + + + + + + + + diff --git a/examples/example 12 - Spine/data/goblins.json b/examples/example 12 - Spine/data/goblins.json new file mode 100644 index 0000000..985205c --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.json @@ -0,0 +1,332 @@ +{"frames": { + +"dagger.png": +{ + "frame": {"x":2,"y":372,"w":26,"h":108}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":26,"h":108}, + "sourceSize": {"w":26,"h":108} +}, +"goblin/eyes-closed.png": +{ + "frame": {"x":64,"y":354,"w":34,"h":12}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":12}, + "sourceSize": {"w":34,"h":12} +}, +"goblin/head.png": +{ + "frame": {"x":59,"y":83,"w":103,"h":64}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":103,"h":64}, + "sourceSize": {"w":103,"h":66} +}, +"goblin/left-arm.png": +{ + "frame": {"x":30,"y":445,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblin/left-foot.png": +{ + "frame": {"x":59,"y":182,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblin/left-hand.png": +{ + "frame": {"x":107,"y":436,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/left-lower-leg.png": +{ + "frame": {"x":26,"y":74,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblin/left-shoulder.png": +{ + "frame": {"x":26,"y":146,"w":29,"h":44}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":29,"h":44}, + "sourceSize": {"w":29,"h":44} +}, +"goblin/left-upper-leg.png": +{ + "frame": {"x":30,"y":370,"w":33,"h":73}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":73}, + "sourceSize": {"w":33,"h":73} +}, +"goblin/neck.png": +{ + "frame": {"x":146,"y":309,"w":36,"h":41}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":41}, + "sourceSize": {"w":36,"h":41} +}, +"goblin/pelvis.png": +{ + "frame": {"x":163,"y":233,"w":62,"h":43}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":62,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblin/right-arm.png": +{ + "frame": {"x":30,"y":240,"w":23,"h":50}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":23,"h":50}, + "sourceSize": {"w":23,"h":50} +}, +"goblin/right-foot.png": +{ + "frame": {"x":164,"y":198,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblin/right-hand.png": +{ + "frame": {"x":154,"y":462,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblin/right-lower-leg.png": +{ + "frame": {"x":26,"y":292,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblin/right-shoulder.png": +{ + "frame": {"x":105,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblin/right-upper-leg.png": +{ + "frame": {"x":136,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblin/torso.png": +{ + "frame": {"x":164,"y":2,"w":68,"h":96}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":68,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblin/undie-straps.png": +{ + "frame": {"x":59,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblin/undies.png": +{ + "frame": {"x":116,"y":479,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"goblingirl/eyes-closed.png": +{ + "frame": {"x":100,"y":419,"w":37,"h":15}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":6,"w":37,"h":15}, + "sourceSize": {"w":37,"h":21} +}, +"goblingirl/head.png": +{ + "frame": {"x":59,"y":2,"w":103,"h":79}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":103,"h":79}, + "sourceSize": {"w":103,"h":81} +}, +"goblingirl/left-arm.png": +{ + "frame": {"x":124,"y":227,"w":37,"h":35}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":37,"h":35}, + "sourceSize": {"w":37,"h":35} +}, +"goblingirl/left-foot.png": +{ + "frame": {"x":59,"y":149,"w":65,"h":31}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":65,"h":31}, + "sourceSize": {"w":65,"h":31} +}, +"goblingirl/left-hand.png": +{ + "frame": {"x":55,"y":250,"w":35,"h":40}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":35,"h":40}, + "sourceSize": {"w":35,"h":40} +}, +"goblingirl/left-lower-leg.png": +{ + "frame": {"x":26,"y":2,"w":31,"h":70}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":1,"y":0,"w":31,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/left-shoulder.png": +{ + "frame": {"x":26,"y":192,"w":28,"h":46}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":28,"h":46}, + "sourceSize": {"w":28,"h":46} +}, +"goblingirl/left-upper-leg.png": +{ + "frame": {"x":65,"y":368,"w":33,"h":70}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":70}, + "sourceSize": {"w":33,"h":70} +}, +"goblingirl/neck.png": +{ + "frame": {"x":145,"y":419,"w":33,"h":41}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":33,"h":41}, + "sourceSize": {"w":35,"h":41} +}, +"goblingirl/pelvis.png": +{ + "frame": {"x":92,"y":264,"w":60,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":60,"h":43}, + "sourceSize": {"w":62,"h":43} +}, +"goblingirl/right-arm.png": +{ + "frame": {"x":232,"y":100,"w":22,"h":50}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":3,"y":0,"w":22,"h":50}, + "sourceSize": {"w":28,"h":50} +}, +"goblingirl/right-foot.png": +{ + "frame": {"x":59,"y":215,"w":63,"h":33}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":63,"h":33}, + "sourceSize": {"w":63,"h":33} +}, +"goblingirl/right-hand.png": +{ + "frame": {"x":69,"y":440,"w":36,"h":37}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":37}, + "sourceSize": {"w":36,"h":37} +}, +"goblingirl/right-lower-leg.png": +{ + "frame": {"x":126,"y":149,"w":36,"h":76}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":76}, + "sourceSize": {"w":36,"h":76} +}, +"goblingirl/right-shoulder.png": +{ + "frame": {"x":64,"y":309,"w":39,"h":43}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":2,"w":39,"h":43}, + "sourceSize": {"w":39,"h":45} +}, +"goblingirl/right-upper-leg.png": +{ + "frame": {"x":100,"y":354,"w":34,"h":63}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":34,"h":63}, + "sourceSize": {"w":34,"h":63} +}, +"goblingirl/torso.png": +{ + "frame": {"x":164,"y":100,"w":66,"h":96}, + "rotated": false, + "trimmed": true, + "spriteSourceSize": {"x":0,"y":0,"w":66,"h":96}, + "sourceSize": {"w":68,"h":96} +}, +"goblingirl/undie-straps.png": +{ + "frame": {"x":2,"y":482,"w":55,"h":19}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":55,"h":19}, + "sourceSize": {"w":55,"h":19} +}, +"goblingirl/undies.png": +{ + "frame": {"x":154,"y":278,"w":36,"h":29}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":36,"h":29}, + "sourceSize": {"w":36,"h":29} +}, +"spear.png": +{ + "frame": {"x":2,"y":2,"w":22,"h":368}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":22,"h":368}, + "sourceSize": {"w":22,"h":368} +}}, +"meta": { + "app": "http://www.codeandweb.com/texturepacker ", + "version": "1.0", + "image": "goblins.png", + "format": "RGBA8888", + "size": {"w":256,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:f89858b99c6b15e23d39806c4170313a:1/1$" +} +} diff --git a/examples/example 12 - Spine/data/goblins.png b/examples/example 12 - Spine/data/goblins.png new file mode 100644 index 0000000..5c26ca0 --- /dev/null +++ b/examples/example 12 - Spine/data/goblins.png Binary files differ diff --git a/examples/example 12 - Spine/data/goblinsSpineData.json b/examples/example 12 - Spine/data/goblinsSpineData.json new file mode 100644 index 0000000..4a44566 --- /dev/null +++ b/examples/example 12 - Spine/data/goblinsSpineData.json @@ -0,0 +1,502 @@ +{ +"bones": [ + { "name": "root" }, + { "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 }, + { "name": "left upper leg", "parent": "hip", "length": 50.39, "x": 14.45, "y": 2.81, "rotation": -89.09 }, + { "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.57 }, + { "name": "right upper leg", "parent": "hip", "length": 42.45, "x": -20.07, "y": -6.83, "rotation": -97.49 }, + { "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 93.92 }, + { "name": "left lower leg", "parent": "left upper leg", "length": 49.89, "x": 56.34, "y": 0.98, "rotation": -16.65 }, + { "name": "left shoulder", "parent": "torso", "length": 35.43, "x": 74.04, "y": -20.38, "rotation": -156.96 }, + { "name": "neck", "parent": "torso", "length": 18.38, "x": 81.67, "y": -6.34, "rotation": -1.51 }, + { "name": "right lower leg", "parent": "right upper leg", "length": 58.52, "x": 42.99, "y": -0.61, "rotation": -14.34 }, + { "name": "right shoulder", "parent": "torso", "length": 37.24, "x": 76.02, "y": 18.14, "rotation": 133.88 }, + { "name": "head", "parent": "neck", "length": 68.28, "x": 20.93, "y": 11.59, "rotation": -13.92 }, + { "name": "left arm", "parent": "left shoulder", "length": 35.62, "x": 37.85, "y": -2.34, "rotation": 28.16 }, + { "name": "left foot", "parent": "left lower leg", "length": 46.5, "x": 58.94, "y": -7.61, "rotation": 102.43 }, + { "name": "right arm", "parent": "right shoulder", "length": 36.74, "x": 37.6, "y": 0.31, "rotation": 36.32 }, + { "name": "right foot", "parent": "right lower leg", "length": 45.45, "x": 64.88, "y": 0.04, "rotation": 110.3 }, + { "name": "left hand", "parent": "left arm", "length": 11.52, "x": 35.62, "y": 0.07, "rotation": 2.7 }, + { "name": "right hand", "parent": "right arm", "length": 15.32, "x": 36.9, "y": 0.34, "rotation": 2.35 } +], +"slots": [ + { "name": "left shoulder", "bone": "left shoulder", "attachment": "left shoulder" }, + { "name": "left arm", "bone": "left arm", "attachment": "left arm" }, + { "name": "left hand item", "bone": "left hand", "attachment": "spear" }, + { "name": "left hand", "bone": "left hand", "attachment": "left hand" }, + { "name": "left foot", "bone": "left foot", "attachment": "left foot" }, + { "name": "left lower leg", "bone": "left lower leg", "attachment": "left lower leg" }, + { "name": "left upper leg", "bone": "left upper leg", "attachment": "left upper leg" }, + { "name": "neck", "bone": "neck", "attachment": "neck" }, + { "name": "torso", "bone": "torso", "attachment": "torso" }, + { "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" }, + { "name": "right foot", "bone": "right foot", "attachment": "right foot" }, + { "name": "right lower leg", "bone": "right lower leg", "attachment": "right lower leg" }, + { "name": "undie straps", "bone": "pelvis", "attachment": "undie straps" }, + { "name": "undies", "bone": "pelvis", "attachment": "undies" }, + { "name": "right upper leg", "bone": "right upper leg", "attachment": "right upper leg" }, + { "name": "head", "bone": "head", "attachment": "head" }, + { "name": "eyes", "bone": "head" }, + { "name": "right shoulder", "bone": "right shoulder", "attachment": "right shoulder" }, + { "name": "right arm", "bone": "right arm", "attachment": "right arm" }, + { "name": "right hand item", "bone": "right hand", "attachment": "dagger" }, + { "name": "right hand", "bone": "right hand", "attachment": "right hand" } +], +"skins": { + "default": { + "left hand item": { + "dagger": { "x": 7.88, "y": -23.45, "rotation": 10.47, "width": 26, "height": 108 }, + "spear": { "x": -4.55, "y": 39.2, "rotation": 13.04, "width": 22, "height": 368 } + }, + "right hand item": { + "dagger": { "x": 6.51, "y": -24.15, "rotation": -8.06, "width": 26, "height": 108 } + } + }, + "goblin": { + "eyes": { + "eyes closed": { "name": "goblin/eyes-closed", "x": 32.21, "y": -21.27, "rotation": -88.92, "width": 34, "height": 12 } + }, + "head": { + "head": { "name": "goblin/head", "x": 25.73, "y": 2.33, "rotation": -92.29, "width": 103, "height": 66 } + }, + "left arm": { + "left arm": { + "name": "goblin/left-arm", + "x": 16.7, + "y": -1.69, + "scaleX": 1.057, + "scaleY": 1.057, + "rotation": 33.84, + "width": 37, + "height": 35 + } + }, + "left foot": { + "left foot": { "name": "goblin/left-foot", "x": 24.85, "y": 8.74, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblin/left-hand", + "x": 3.47, + "y": 3.41, + "scaleX": 0.892, + "scaleY": 0.892, + "rotation": 31.14, + "width": 36, + "height": 41 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblin/left-lower-leg", "x": 23.58, "y": -2.06, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblin/left-shoulder", "x": 15.56, "y": -2.26, "rotation": 62.01, "width": 29, "height": 44 } + }, + "left upper leg": { + "left upper leg": { "name": "goblin/left-upper-leg", "x": 29.68, "y": -3.87, "rotation": 89.09, "width": 33, "height": 73 } + }, + "neck": { + "neck": { "name": "goblin/neck", "x": 10.1, "y": 0.42, "rotation": -93.69, "width": 36, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblin/pelvis", "x": -5.61, "y": 0.76, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblin/right-arm", "x": 16.44, "y": -1.04, "rotation": 94.32, "width": 23, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblin/right-foot", "x": 23.56, "y": 9.8, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblin/right-hand", "x": 7.88, "y": 2.78, "rotation": 91.96, "width": 36, "height": 37 } + }, + "right lower leg": { + "right lower leg": { "name": "goblin/right-lower-leg", "x": 25.68, "y": -3.15, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblin/right-shoulder", "x": 15.68, "y": -1.03, "rotation": 130.65, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblin/right-upper-leg", "x": 20.35, "y": 1.47, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblin/torso", "x": 38.09, "y": -3.87, "rotation": -94.95, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblin/undie-straps", "x": -3.87, "y": 13.1, "scaleX": 1.089, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblin/undies", "x": 6.3, "y": 0.12, "rotation": 0.91, "width": 36, "height": 29 } + } + }, + "goblingirl": { + "eyes": { + "eyes closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.54, "rotation": -87.04, "width": 37, "height": 21 } + }, + "head": { + "head": { "name": "goblingirl/head", "x": 27.71, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 } + }, + "left arm": { + "left arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.42, "rotation": 33.05, "width": 37, "height": 35 } + }, + "left foot": { + "left foot": { "name": "goblingirl/left-foot", "x": 25.17, "y": 7.92, "rotation": 3.32, "width": 65, "height": 31 } + }, + "left hand": { + "left hand": { + "name": "goblingirl/left-hand", + "x": 4.34, + "y": 2.39, + "scaleX": 0.896, + "scaleY": 0.896, + "rotation": 30.34, + "width": 35, + "height": 40 + } + }, + "left lower leg": { + "left lower leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.6, "rotation": 105.75, "width": 33, "height": 70 } + }, + "left shoulder": { + "left shoulder": { "name": "goblingirl/left-shoulder", "x": 19.8, "y": -0.42, "rotation": 61.21, "width": 28, "height": 46 } + }, + "left upper leg": { + "left upper leg": { "name": "goblingirl/left-upper-leg", "x": 30.21, "y": -2.95, "rotation": 89.09, "width": 33, "height": 70 } + }, + "neck": { + "neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.14, "rotation": -98.86, "width": 35, "height": 41 } + }, + "pelvis": { + "pelvis": { "name": "goblingirl/pelvis", "x": -3.87, "y": 3.18, "width": 62, "height": 43 } + }, + "right arm": { + "right arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.52, "width": 28, "height": 50 } + }, + "right foot": { + "right foot": { "name": "goblingirl/right-foot", "x": 23.46, "y": 9.66, "rotation": 1.52, "width": 63, "height": 33 } + }, + "right hand": { + "right hand": { "name": "goblingirl/right-hand", "x": 7.21, "y": 3.43, "rotation": 91.16, "width": 36, "height": 37 } + }, + "right hand item": { + "right hand item": { "name": "goblingirl/dagger-tip", "x": 13.45, "y": 22.07, "rotation": -3.23, "width": 17, "height": 17 } + }, + "right lower leg": { + "right lower leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.27, "rotation": 111.83, "width": 36, "height": 76 } + }, + "right shoulder": { + "right shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.45, "rotation": 129.85, "width": 39, "height": 45 } + }, + "right upper leg": { + "right upper leg": { "name": "goblingirl/right-upper-leg", "x": 19.69, "y": 2.13, "rotation": 97.49, "width": 34, "height": 63 } + }, + "torso": { + "torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.74, "width": 68, "height": 96 } + }, + "undie straps": { + "undie straps": { "name": "goblingirl/undie-straps", "x": -1.51, "y": 14.18, "width": 55, "height": 19 } + }, + "undies": { + "undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.7, "width": 36, "height": 29 } + } + } +}, +"animations": { + "walk": { + "bones": { + "left upper leg": { + "rotate": [ + { "time": 0, "angle": -26.55 }, + { "time": 0.1333, "angle": -8.78 }, + { "time": 0.2333, "angle": 9.51 }, + { "time": 0.3666, "angle": 30.74 }, + { "time": 0.5, "angle": 25.33 }, + { "time": 0.6333, "angle": 26.11 }, + { "time": 0.7333, "angle": -7.7 }, + { "time": 0.8666, "angle": -21.19 }, + { "time": 1, "angle": -26.55 } + ], + "translate": [ + { "time": 0, "x": -1.32, "y": 1.7 }, + { "time": 0.3666, "x": -0.06, "y": 2.42 }, + { "time": 1, "x": -1.32, "y": 1.7 } + ] + }, + "right upper leg": { + "rotate": [ + { "time": 0, "angle": 42.45 }, + { "time": 0.1333, "angle": 52.1 }, + { "time": 0.2333, "angle": 8.53 }, + { "time": 0.5, "angle": -16.93 }, + { "time": 0.6333, "angle": 1.89 }, + { + "time": 0.7333, + "angle": 28.06, + "curve": [ 0.462, 0.11, 1, 1 ] + }, + { + "time": 0.8666, + "angle": 58.68, + "curve": [ 0.5, 0.02, 1, 1 ] + }, + { "time": 1, "angle": 42.45 } + ], + "translate": [ + { "time": 0, "x": 6.23, "y": 0 }, + { "time": 0.2333, "x": 2.14, "y": 2.4 }, + { "time": 0.5, "x": 2.44, "y": 4.8 }, + { "time": 1, "x": 6.23, "y": 0 } + ] + }, + "left lower leg": { + "rotate": [ + { "time": 0, "angle": -22.98 }, + { "time": 0.1333, "angle": -63.5 }, + { "time": 0.2333, "angle": -73.76 }, + { "time": 0.5, "angle": 5.11 }, + { "time": 0.6333, "angle": -28.29 }, + { "time": 0.7333, "angle": 4.08 }, + { "time": 0.8666, "angle": 3.53 }, + { "time": 1, "angle": -22.98 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0 }, + { "time": 0.2333, "x": 2.55, "y": -0.47 }, + { "time": 0.5, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "left foot": { + "rotate": [ + { "time": 0, "angle": -3.69 }, + { "time": 0.1333, "angle": -10.42 }, + { "time": 0.2333, "angle": -5.01 }, + { "time": 0.3666, "angle": 3.87 }, + { "time": 0.5, "angle": -3.87 }, + { "time": 0.6333, "angle": 2.78 }, + { "time": 0.7333, "angle": 1.68 }, + { "time": 0.8666, "angle": -8.54 }, + { "time": 1, "angle": -3.69 } + ] + }, + "right shoulder": { + "rotate": [ + { + "time": 0, + "angle": 5.29, + "curve": [ 0.264, 0, 0.75, 1 ] + }, + { "time": 0.6333, "angle": 6.65 }, + { "time": 1, "angle": 5.29 } + ] + }, + "right arm": { + "rotate": [ + { + "time": 0, + "angle": -4.02, + "curve": [ 0.267, 0, 0.804, 0.99 ] + }, + { + "time": 0.6333, + "angle": 19.78, + "curve": [ 0.307, 0, 0.787, 0.99 ] + }, + { "time": 1, "angle": -4.02 } + ] + }, + "right hand": { + "rotate": [ + { "time": 0, "angle": 8.98 }, + { "time": 0.6333, "angle": 0.51 }, + { "time": 1, "angle": 8.98 } + ] + }, + "left shoulder": { + "rotate": [ + { + "time": 0, + "angle": 6.25, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": -11.78, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 6.25 } + ], + "translate": [ + { "time": 0, "x": 1.15, "y": 0.23 } + ] + }, + "left hand": { + "rotate": [ + { + "time": 0, + "angle": -21.23, + "curve": [ 0.295, 0, 0.755, 0.98 ] + }, + { + "time": 0.5, + "angle": -27.28, + "curve": [ 0.241, 0, 0.75, 0.97 ] + }, + { "time": 1, "angle": -21.23 } + ] + }, + "left arm": { + "rotate": [ + { + "time": 0, + "angle": 28.37, + "curve": [ 0.339, 0, 0.683, 1 ] + }, + { + "time": 0.5, + "angle": 60.09, + "curve": [ 0.281, 0, 0.686, 0.99 ] + }, + { "time": 1, "angle": 28.37 } + ] + }, + "torso": { + "rotate": [ + { "time": 0, "angle": -10.28 }, + { + "time": 0.1333, + "angle": -15.38, + "curve": [ 0.545, 0, 0.818, 1 ] + }, + { + "time": 0.3666, + "angle": -9.78, + "curve": [ 0.58, 0.17, 0.669, 0.99 ] + }, + { + "time": 0.6333, + "angle": -15.75, + "curve": [ 0.235, 0.01, 0.795, 1 ] + }, + { + "time": 0.8666, + "angle": -7.06, + "curve": [ 0.209, 0, 0.816, 0.98 ] + }, + { "time": 1, "angle": -10.28 } + ], + "translate": [ + { "time": 0, "x": -1.29, "y": 1.68 } + ] + }, + "right foot": { + "rotate": [ + { "time": 0, "angle": -5.25 }, + { "time": 0.2333, "angle": -1.91 }, + { "time": 0.3666, "angle": -6.45 }, + { "time": 0.5, "angle": -5.39 }, + { "time": 0.7333, "angle": -11.68 }, + { "time": 0.8666, "angle": 0.46 }, + { "time": 1, "angle": -5.25 } + ] + }, + "right lower leg": { + "rotate": [ + { + "time": 0, + "angle": -3.39, + "curve": [ 0.316, 0.01, 0.741, 0.98 ] + }, + { + "time": 0.1333, + "angle": -45.53, + "curve": [ 0.229, 0, 0.738, 0.97 ] + }, + { "time": 0.2333, "angle": -4.83 }, + { "time": 0.5, "angle": -19.53 }, + { "time": 0.6333, "angle": -64.8 }, + { + "time": 0.7333, + "angle": -82.56, + "curve": [ 0.557, 0.18, 1, 1 ] + }, + { "time": 1, "angle": -3.39 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.5, "x": 0, "y": 0 }, + { "time": 0.6333, "x": 2.18, "y": 0.21 }, + { "time": 1, "x": 0, "y": 0 } + ] + }, + "hip": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 1, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": -4.16 }, + { + "time": 0.1333, + "x": 0, + "y": -7.05, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { "time": 0.3666, "x": 0, "y": 6.78 }, + { "time": 0.5, "x": 0, "y": -6.13 }, + { + "time": 0.6333, + "x": 0, + "y": -7.05, + "curve": [ 0.359, 0.47, 0.646, 0.74 ] + }, + { "time": 0.8666, "x": 0, "y": 6.78 }, + { "time": 1, "x": 0, "y": -4.16 } + ] + }, + "neck": { + "rotate": [ + { "time": 0, "angle": 3.6 }, + { "time": 0.1333, "angle": 17.49 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { "time": 0.5, "angle": 5.17 }, + { "time": 0.6333, "angle": 18.36 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + }, + "head": { + "rotate": [ + { + "time": 0, + "angle": 3.6, + "curve": [ 0, 0, 0.704, 1.17 ] + }, + { "time": 0.1333, "angle": -0.2 }, + { "time": 0.2333, "angle": 6.1 }, + { "time": 0.3666, "angle": 3.45 }, + { + "time": 0.5, + "angle": 5.17, + "curve": [ 0, 0, 0.704, 1.61 ] + }, + { "time": 0.6666, "angle": 1.1 }, + { "time": 0.7333, "angle": 6.09 }, + { "time": 0.8666, "angle": 2.28 }, + { "time": 1, "angle": 3.6 } + ] + } + }, + "slots": { + "eyes": { + "attachment": [ + { "time": 0.7, "name": "eyes closed" }, + { "time": 0.8, "name": null } + ] + } + } + } +} +} \ No newline at end of file diff --git a/examples/example 12 - Spine/index_goblins.html b/examples/example 12 - Spine/index_goblins.html new file mode 100644 index 0000000..550187d --- /dev/null +++ b/examples/example 12 - Spine/index_goblins.html @@ -0,0 +1,104 @@ + + + + pixi.js example 12 Spine + + + + + + + + + + diff --git a/src/pixi/extras/Spine.js b/src/pixi/extras/Spine.js index 5170be5..8dda8c1 100644 --- a/src/pixi/extras/Spine.js +++ b/src/pixi/extras/Spine.js @@ -46,6 +46,7 @@ var spriteName = attachment.rendererObject.name; var sprite = this.createSprite(slot, attachment.rendererObject); slot.currentSprite = sprite; + slot.currentSpriteName = spriteName; slotContainer.addChild(sprite); } }; @@ -78,7 +79,7 @@ } if (attachment.rendererObject) { - if (!slot.data.attachmentName || attachment.rendererObject.name != slot.data.attachmentName) { + if (!slot.currentSpriteName || slot.currentSpriteName != attachment.name) { var spriteName = attachment.rendererObject.name; if (slot.currentSprite !== undefined) { slot.currentSprite.visible = false; @@ -90,8 +91,8 @@ var sprite = this.createSprite(slot, attachment.rendererObject); slotContainer.addChild(sprite); } - slot.data.attachmentName = attachment.rendererObject.name; slot.currentSprite = slot.sprites[spriteName]; + slot.currentSpriteName = spriteName; } } slotContainer.visible = true;