diff --git a/assets/sequence_animation/images/fx1.png b/assets/sequence_animation/images/fx1.png new file mode 100644 index 0000000..f5be042 Binary files /dev/null and b/assets/sequence_animation/images/fx1.png differ diff --git a/assets/sequence_animation/images/fx10.png b/assets/sequence_animation/images/fx10.png new file mode 100644 index 0000000..8939f3e Binary files /dev/null and b/assets/sequence_animation/images/fx10.png differ diff --git a/assets/sequence_animation/images/fx11.png b/assets/sequence_animation/images/fx11.png new file mode 100644 index 0000000..cb37022 Binary files /dev/null and b/assets/sequence_animation/images/fx11.png differ diff --git a/assets/sequence_animation/images/fx12.png b/assets/sequence_animation/images/fx12.png new file mode 100644 index 0000000..a6a3d05 Binary files /dev/null and b/assets/sequence_animation/images/fx12.png differ diff --git a/assets/sequence_animation/images/fx13.png b/assets/sequence_animation/images/fx13.png new file mode 100644 index 0000000..782ec40 Binary files /dev/null and b/assets/sequence_animation/images/fx13.png differ diff --git a/assets/sequence_animation/images/fx14.png b/assets/sequence_animation/images/fx14.png new file mode 100644 index 0000000..e5d3e13 Binary files /dev/null and b/assets/sequence_animation/images/fx14.png differ diff --git a/assets/sequence_animation/images/fx15.png b/assets/sequence_animation/images/fx15.png new file mode 100644 index 0000000..e2afc9e Binary files /dev/null and b/assets/sequence_animation/images/fx15.png differ diff --git a/assets/sequence_animation/images/fx16.png b/assets/sequence_animation/images/fx16.png new file mode 100644 index 0000000..30bb25e Binary files /dev/null and b/assets/sequence_animation/images/fx16.png differ diff --git a/assets/sequence_animation/images/fx17.png b/assets/sequence_animation/images/fx17.png new file mode 100644 index 0000000..e2d5cc5 Binary files /dev/null and b/assets/sequence_animation/images/fx17.png differ diff --git a/assets/sequence_animation/images/fx18.png b/assets/sequence_animation/images/fx18.png new file mode 100644 index 0000000..be33edb Binary files /dev/null and b/assets/sequence_animation/images/fx18.png differ diff --git a/assets/sequence_animation/images/fx19.png b/assets/sequence_animation/images/fx19.png new file mode 100644 index 0000000..685d181 Binary files /dev/null and b/assets/sequence_animation/images/fx19.png differ diff --git a/assets/sequence_animation/images/fx2.png b/assets/sequence_animation/images/fx2.png new file mode 100644 index 0000000..2128258 Binary files /dev/null and b/assets/sequence_animation/images/fx2.png differ diff --git a/assets/sequence_animation/images/fx20.png b/assets/sequence_animation/images/fx20.png new file mode 100644 index 0000000..1c48617 Binary files /dev/null and b/assets/sequence_animation/images/fx20.png differ diff --git a/assets/sequence_animation/images/fx21.png b/assets/sequence_animation/images/fx21.png new file mode 100644 index 0000000..00e6924 Binary files /dev/null and b/assets/sequence_animation/images/fx21.png differ diff --git a/assets/sequence_animation/images/fx22.png b/assets/sequence_animation/images/fx22.png new file mode 100644 index 0000000..52974ac Binary files /dev/null and b/assets/sequence_animation/images/fx22.png differ diff --git a/assets/sequence_animation/images/fx23.png b/assets/sequence_animation/images/fx23.png new file mode 100644 index 0000000..d0687a7 Binary files /dev/null and b/assets/sequence_animation/images/fx23.png differ diff --git a/assets/sequence_animation/images/fx24.png b/assets/sequence_animation/images/fx24.png new file mode 100644 index 0000000..8148b41 Binary files /dev/null and b/assets/sequence_animation/images/fx24.png differ diff --git a/assets/sequence_animation/images/fx25.png b/assets/sequence_animation/images/fx25.png new file mode 100644 index 0000000..a021862 Binary files /dev/null and b/assets/sequence_animation/images/fx25.png differ diff --git a/assets/sequence_animation/images/fx26.png b/assets/sequence_animation/images/fx26.png new file mode 100644 index 0000000..ee861f5 Binary files /dev/null and b/assets/sequence_animation/images/fx26.png differ diff --git a/assets/sequence_animation/images/fx27.png b/assets/sequence_animation/images/fx27.png new file mode 100644 index 0000000..16e746c Binary files /dev/null and b/assets/sequence_animation/images/fx27.png differ diff --git a/assets/sequence_animation/images/fx28.png b/assets/sequence_animation/images/fx28.png new file mode 100644 index 0000000..c121ad9 Binary files /dev/null and b/assets/sequence_animation/images/fx28.png differ diff --git a/assets/sequence_animation/images/fx29.png b/assets/sequence_animation/images/fx29.png new file mode 100644 index 0000000..243a7bc Binary files /dev/null and b/assets/sequence_animation/images/fx29.png differ diff --git a/assets/sequence_animation/images/fx3.png b/assets/sequence_animation/images/fx3.png new file mode 100644 index 0000000..cfbbadd Binary files /dev/null and b/assets/sequence_animation/images/fx3.png differ diff --git a/assets/sequence_animation/images/fx30.png b/assets/sequence_animation/images/fx30.png new file mode 100644 index 0000000..dafcecc Binary files /dev/null and b/assets/sequence_animation/images/fx30.png differ diff --git a/assets/sequence_animation/images/fx31.png b/assets/sequence_animation/images/fx31.png new file mode 100644 index 0000000..89c655c Binary files /dev/null and b/assets/sequence_animation/images/fx31.png differ diff --git a/assets/sequence_animation/images/fx32.png b/assets/sequence_animation/images/fx32.png new file mode 100644 index 0000000..0bd389f Binary files /dev/null and b/assets/sequence_animation/images/fx32.png differ diff --git a/assets/sequence_animation/images/fx33.png b/assets/sequence_animation/images/fx33.png new file mode 100644 index 0000000..a95d56a Binary files /dev/null and b/assets/sequence_animation/images/fx33.png differ diff --git a/assets/sequence_animation/images/fx34.png b/assets/sequence_animation/images/fx34.png new file mode 100644 index 0000000..e7127fc Binary files /dev/null and b/assets/sequence_animation/images/fx34.png differ diff --git a/assets/sequence_animation/images/fx35.png b/assets/sequence_animation/images/fx35.png new file mode 100644 index 0000000..34bcd6e Binary files /dev/null and b/assets/sequence_animation/images/fx35.png differ diff --git a/assets/sequence_animation/images/fx36.png b/assets/sequence_animation/images/fx36.png new file mode 100644 index 0000000..cbc9219 Binary files /dev/null and b/assets/sequence_animation/images/fx36.png differ diff --git a/assets/sequence_animation/images/fx37.png b/assets/sequence_animation/images/fx37.png new file mode 100644 index 0000000..fa1d5c5 Binary files /dev/null and b/assets/sequence_animation/images/fx37.png differ diff --git a/assets/sequence_animation/images/fx38.png b/assets/sequence_animation/images/fx38.png new file mode 100644 index 0000000..900b203 Binary files /dev/null and b/assets/sequence_animation/images/fx38.png differ diff --git a/assets/sequence_animation/images/fx39.png b/assets/sequence_animation/images/fx39.png new file mode 100644 index 0000000..0f565cd Binary files /dev/null and b/assets/sequence_animation/images/fx39.png differ diff --git a/assets/sequence_animation/images/fx4.png b/assets/sequence_animation/images/fx4.png new file mode 100644 index 0000000..e066426 Binary files /dev/null and b/assets/sequence_animation/images/fx4.png differ diff --git a/assets/sequence_animation/images/fx40.png b/assets/sequence_animation/images/fx40.png new file mode 100644 index 0000000..3b42379 Binary files /dev/null and b/assets/sequence_animation/images/fx40.png differ diff --git a/assets/sequence_animation/images/fx41.png b/assets/sequence_animation/images/fx41.png new file mode 100644 index 0000000..9466d12 Binary files /dev/null and b/assets/sequence_animation/images/fx41.png differ diff --git a/assets/sequence_animation/images/fx42.png b/assets/sequence_animation/images/fx42.png new file mode 100644 index 0000000..defe998 Binary files /dev/null and b/assets/sequence_animation/images/fx42.png differ diff --git a/assets/sequence_animation/images/fx43.png b/assets/sequence_animation/images/fx43.png new file mode 100644 index 0000000..4ccdca1 Binary files /dev/null and b/assets/sequence_animation/images/fx43.png differ diff --git a/assets/sequence_animation/images/fx44.png b/assets/sequence_animation/images/fx44.png new file mode 100644 index 0000000..dcb8bae Binary files /dev/null and b/assets/sequence_animation/images/fx44.png differ diff --git a/assets/sequence_animation/images/fx45.png b/assets/sequence_animation/images/fx45.png new file mode 100644 index 0000000..dece304 Binary files /dev/null and b/assets/sequence_animation/images/fx45.png differ diff --git a/assets/sequence_animation/images/fx46.png b/assets/sequence_animation/images/fx46.png new file mode 100644 index 0000000..52cc904 Binary files /dev/null and b/assets/sequence_animation/images/fx46.png differ diff --git a/assets/sequence_animation/images/fx47.png b/assets/sequence_animation/images/fx47.png new file mode 100644 index 0000000..5b480aa Binary files /dev/null and b/assets/sequence_animation/images/fx47.png differ diff --git a/assets/sequence_animation/images/fx48.png b/assets/sequence_animation/images/fx48.png new file mode 100644 index 0000000..4775c61 Binary files /dev/null and b/assets/sequence_animation/images/fx48.png differ diff --git a/assets/sequence_animation/images/fx49.png b/assets/sequence_animation/images/fx49.png new file mode 100644 index 0000000..0bde4a0 Binary files /dev/null and b/assets/sequence_animation/images/fx49.png differ diff --git a/assets/sequence_animation/images/fx5.png b/assets/sequence_animation/images/fx5.png new file mode 100644 index 0000000..4663be4 Binary files /dev/null and b/assets/sequence_animation/images/fx5.png differ diff --git a/assets/sequence_animation/images/fx50.png b/assets/sequence_animation/images/fx50.png new file mode 100644 index 0000000..c6b478f Binary files /dev/null and b/assets/sequence_animation/images/fx50.png differ diff --git a/assets/sequence_animation/images/fx51.png b/assets/sequence_animation/images/fx51.png new file mode 100644 index 0000000..ac057ca Binary files /dev/null and b/assets/sequence_animation/images/fx51.png differ diff --git a/assets/sequence_animation/images/fx52.png b/assets/sequence_animation/images/fx52.png new file mode 100644 index 0000000..0c1ff42 Binary files /dev/null and b/assets/sequence_animation/images/fx52.png differ diff --git a/assets/sequence_animation/images/fx53.png b/assets/sequence_animation/images/fx53.png new file mode 100644 index 0000000..6e341b6 Binary files /dev/null and b/assets/sequence_animation/images/fx53.png differ diff --git a/assets/sequence_animation/images/fx54.png b/assets/sequence_animation/images/fx54.png new file mode 100644 index 0000000..34891bb Binary files /dev/null and b/assets/sequence_animation/images/fx54.png differ diff --git a/assets/sequence_animation/images/fx6.png b/assets/sequence_animation/images/fx6.png new file mode 100644 index 0000000..c8a7a1c Binary files /dev/null and b/assets/sequence_animation/images/fx6.png differ diff --git a/assets/sequence_animation/images/fx7.png b/assets/sequence_animation/images/fx7.png new file mode 100644 index 0000000..f100f56 Binary files /dev/null and b/assets/sequence_animation/images/fx7.png differ diff --git a/assets/sequence_animation/images/fx8.png b/assets/sequence_animation/images/fx8.png new file mode 100644 index 0000000..6bf74de Binary files /dev/null and b/assets/sequence_animation/images/fx8.png differ diff --git a/assets/sequence_animation/images/fx9.png b/assets/sequence_animation/images/fx9.png new file mode 100644 index 0000000..8424bac Binary files /dev/null and b/assets/sequence_animation/images/fx9.png differ diff --git a/assets/sequence_animation/sequence.atlas b/assets/sequence_animation/sequence.atlas new file mode 100644 index 0000000..0c930c8 --- /dev/null +++ b/assets/sequence_animation/sequence.atlas @@ -0,0 +1,219 @@ +images { + image: "/assets/sequence_animation/images/fx16.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx18.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx13.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx36.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx33.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx43.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx25.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx54.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx15.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx45.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx19.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx38.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx27.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx28.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx14.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx47.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx12.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx2.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx49.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx7.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx22.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx42.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx29.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx20.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx6.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx24.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx35.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx5.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx50.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx9.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx17.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx39.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx31.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx53.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx48.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx52.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx44.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx32.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx46.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx4.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx10.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx8.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx26.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx23.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx41.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx1.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx37.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx21.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx3.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx30.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx11.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx34.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx40.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/assets/sequence_animation/images/fx51.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +margin: 0 +extrude_borders: 2 +inner_padding: 0 diff --git a/assets/sequence_animation/sequence.spine b/assets/sequence_animation/sequence.spine new file mode 100644 index 0000000..0c5c437 Binary files /dev/null and b/assets/sequence_animation/sequence.spine differ diff --git a/assets/sequence_animation/sequence.spinejson b/assets/sequence_animation/sequence.spinejson new file mode 100644 index 0000000..71a35a4 --- /dev/null +++ b/assets/sequence_animation/sequence.spinejson @@ -0,0 +1,50 @@ +{ +"skeleton": { + "hash": "EGxx7RTgujk", + "spine": "4.1.19", + "x": -70, + "y": -74, + "width": 140, + "height": 149, + "images": "", + "audio": "" +}, +"bones": [ + { "name": "root" } +], +"slots": [ + { "name": "fx1", "bone": "root", "attachment": "fx1" } +], +"skins": [ + { + "name": "default", + "attachments": { + "fx1": { + "fx1": { + "path": "fx", + "y": 0.5, + "width": 140, + "height": 149, + "sequence": { "count": 54 } + } + } + } + } +], +"animations": { + "animation": { + "attachments": { + "default": { + "fx1": { + "fx1": { + "sequence": [ + { "mode": "loop", "delay": 0.0167 }, + { "time": 0.6333, "mode": "loop", "index": 38 } + ] + } + } + } + } + } +} +} \ No newline at end of file diff --git a/assets/sequence_animation/sequence.spinescene b/assets/sequence_animation/sequence.spinescene new file mode 100644 index 0000000..3c322d9 --- /dev/null +++ b/assets/sequence_animation/sequence.spinescene @@ -0,0 +1,2 @@ +spine_json: "/assets/sequence_animation/sequence.spinejson" +atlas: "/assets/sequence_animation/sequence.atlas" diff --git a/assets/spineboy/spineboy.spinejson b/assets/spineboy/spineboy.spinejson index 4d8c7c2..411d65f 100644 --- a/assets/spineboy/spineboy.spinejson +++ b/assets/spineboy/spineboy.spinejson @@ -1,7 +1,7 @@ { "skeleton": { - "hash": "IQgkYFQG8ng", - "spine": "4.0.31", + "hash": "itfFESDjM1c", + "spine": "4.1.19", "x": -188.63, "y": -7.94, "width": 418.45, @@ -2427,19 +2427,19 @@ "side-glow1": { "attachment": [ { "name": "hoverglow-small" }, - { "time": 0.9667, "name": null } + { "time": 0.9667 } ] }, "side-glow2": { "attachment": [ { "time": 0.0667, "name": "hoverglow-small" }, - { "time": 1, "name": null } + { "time": 1 } ] }, "side-glow3": { "attachment": [ { "name": "hoverglow-small" }, - { "time": 0.9667, "name": null } + { "time": 0.9667 } ] } }, @@ -3479,60 +3479,68 @@ { "mixX": 0, "mixScaleX": 0, "mixShearY": 0 } ] }, - "deform": { + "attachments": { "default": { "front-foot": { - "front-foot": [ - { - "offset": 26, - "vertices": [ -0.02832, -5.37024, -0.02832, -5.37024, 3.8188, -3.7757, -0.02832, -5.37024, -3.82159, 3.77847 ] - } - ] + "front-foot": { + "deform": [ + { + "offset": 26, + "vertices": [ -0.02832, -5.37024, -0.02832, -5.37024, 3.8188, -3.7757, -0.02832, -5.37024, -3.82159, 3.77847 ] + } + ] + } }, "front-shin": { - "front-shin": [ - { - "offset": 14, - "vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ] - }, - { - "time": 0.3667, - "offset": 14, - "vertices": [ 0.5298, -1.12677, -11.66571, -9.07211, -25.65866, -17.53735, -25.53217, -16.50978, -11.78232, -11.26097, 0, 0, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -2.64522, -7.35739, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -10.06873, -12.0999 ] - }, - { - "time": 0.5333, - "offset": 14, - "vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -7.00775, -8.24771, -6.45482, -6.49312, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ] - }, - { - "time": 1, - "offset": 14, - "vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ] - } - ] + "front-shin": { + "deform": [ + { + "offset": 14, + "vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ] + }, + { + "time": 0.3667, + "offset": 14, + "vertices": [ 0.5298, -1.12677, -11.66571, -9.07211, -25.65866, -17.53735, -25.53217, -16.50978, -11.78232, -11.26097, 0, 0, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -2.64522, -7.35739, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0.60487, -1.63589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.60487, -1.63589, 0, 0, -10.06873, -12.0999 ] + }, + { + "time": 0.5333, + "offset": 14, + "vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -7.00775, -8.24771, -6.45482, -6.49312, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ] + }, + { + "time": 1, + "offset": 14, + "vertices": [ 0.5298, -1.12677, -0.85507, -4.20587, -11.35158, -10.19225, -10.79865, -8.43765, -6.06447, -6.89757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.54892, -3.06021, 1.48463, -2.29663, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.80437, -7.01817 ] + } + ] + } }, "hoverboard-board": { - "hoverboard-board": [ - { - "curve": [ 0.067, 0, 0.2, 1 ] - }, - { - "time": 0.2667, - "offset": 1, - "vertices": [ 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 3.55673, -3.0E-4, 3.55673, -3.0E-4, 0, 0, 0, 0, 0, 0, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, 0, 0, 0, 0, 0, 0, 0, 0, -4.90558, 0.11214, -9.40706, 6.2E-4, -6.34871, 4.3E-4, -6.34925, -6.57018, -6.34925, -6.57018, -6.34871, 4.3E-4, -2.3308, 1.7E-4, -2.33133, -6.57045, -2.33133, -6.57045, -2.3308, 1.7E-4, 0, 0, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 3.3297, 4.44005, 3.3297, 4.44005, 3.3297, 4.44005, 1.2E-4, 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, 1.2E-4, 2.45856, 1.2E-4, 2.45856, -9.40694, 2.45918, 1.88063, 0.44197, -2.9E-4, -3.54808, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.46227, 1.7E-4, 0, 0, 0, 0, 1.2E-4, 2.45856 ], - "curve": [ 0.45, 0, 0.817, 1 ] - }, - { "time": 1 } - ] + "hoverboard-board": { + "deform": [ + { + "curve": [ 0.067, 0, 0.2, 1 ] + }, + { + "time": 0.2667, + "offset": 1, + "vertices": [ 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 3.55673, -3.0E-4, 3.55673, -3.0E-4, 0, 0, 0, 0, 0, 0, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, -7.6E-4, -9.84158, 0, 0, 0, 0, 0, 0, 0, 0, -4.90558, 0.11214, -9.40706, 6.2E-4, -6.34871, 4.3E-4, -6.34925, -6.57018, -6.34925, -6.57018, -6.34871, 4.3E-4, -2.3308, 1.7E-4, -2.33133, -6.57045, -2.33133, -6.57045, -2.3308, 1.7E-4, 0, 0, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 1.2E-4, 2.45856, 3.3297, 4.44005, 3.3297, 4.44005, 3.3297, 4.44005, 1.2E-4, 2.45856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, 1.2E-4, 2.45856, 1.2E-4, 2.45856, -9.40694, 2.45918, 1.88063, 0.44197, -2.9E-4, -3.54808, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.52316, 1.1313, -2.52316, 1.1313, -2.52316, 1.1313, -2.46227, 1.7E-4, -2.46227, 1.7E-4, -2.46227, 1.7E-4, 0, 0, 0, 0, 1.2E-4, 2.45856 ], + "curve": [ 0.45, 0, 0.817, 1 ] + }, + { "time": 1 } + ] + } }, "rear-foot": { - "rear-foot": [ - { - "offset": 28, - "vertices": [ -1.93078, 1.34782, -0.31417, 2.33363, 3.05122, 0.33946, 2.31472, -2.01678, 2.17583, -2.05795, -0.04277, -2.99459, 1.15429, 0.26328, 0.97501, -0.67169 ] - } - ] + "rear-foot": { + "deform": [ + { + "offset": 28, + "vertices": [ -1.93078, 1.34782, -0.31417, 2.33363, 3.05122, 0.33946, 2.31472, -2.01678, 2.17583, -2.05795, -0.04277, -2.99459, 1.15429, 0.26328, 0.97501, -0.67169 ] + } + ] + } } } } @@ -5203,7 +5211,7 @@ "portal-bg": { "attachment": [ { "name": "portal-bg" }, - { "time": 3, "name": null } + { "time": 3 } ] }, "portal-flare1": { @@ -5214,7 +5222,7 @@ { "time": 1.2, "name": "portal-flare1" }, { "time": 1.2333, "name": "portal-flare2" }, { "time": 1.2667, "name": "portal-flare1" }, - { "time": 1.3333, "name": null } + { "time": 1.3333 } ] }, "portal-flare2": { @@ -5224,14 +5232,14 @@ { "time": 1.1667, "name": "portal-flare1" }, { "time": 1.2, "name": "portal-flare2" }, { "time": 1.2333, "name": "portal-flare3" }, - { "time": 1.2667, "name": null } + { "time": 1.2667 } ] }, "portal-flare3": { "attachment": [ { "time": 1.2, "name": "portal-flare3" }, { "time": 1.2333, "name": "portal-flare2" }, - { "time": 1.2667, "name": null } + { "time": 1.2667 } ] }, "portal-flare4": { @@ -5239,33 +5247,33 @@ { "time": 1.2, "name": "portal-flare2" }, { "time": 1.2333, "name": "portal-flare1" }, { "time": 1.2667, "name": "portal-flare2" }, - { "time": 1.3333, "name": null } + { "time": 1.3333 } ] }, "portal-flare5": { "attachment": [ { "time": 1.2333, "name": "portal-flare3" }, { "time": 1.2667, "name": "portal-flare1" }, - { "time": 1.3333, "name": null } + { "time": 1.3333 } ] }, "portal-flare6": { "attachment": [ { "time": 1.2667, "name": "portal-flare3" }, - { "time": 1.3333, "name": null } + { "time": 1.3333 } ] }, "portal-flare7": { "attachment": [ { "time": 1.1333, "name": "portal-flare2" }, - { "time": 1.1667, "name": null } + { "time": 1.1667 } ] }, "portal-flare8": { "attachment": [ { "time": 1.2, "name": "portal-flare3" }, { "time": 1.2333, "name": "portal-flare2" }, - { "time": 1.2667, "name": null } + { "time": 1.2667 } ] }, "portal-flare9": { @@ -5273,7 +5281,7 @@ { "time": 1.2, "name": "portal-flare2" }, { "time": 1.2333, "name": "portal-flare3" }, { "time": 1.2667, "name": "portal-flare1" }, - { "time": 1.3, "name": null } + { "time": 1.3 } ] }, "portal-flare10": { @@ -5281,25 +5289,25 @@ { "time": 1.2, "name": "portal-flare2" }, { "time": 1.2333, "name": "portal-flare1" }, { "time": 1.2667, "name": "portal-flare3" }, - { "time": 1.3, "name": null } + { "time": 1.3 } ] }, "portal-shade": { "attachment": [ { "name": "portal-shade" }, - { "time": 3, "name": null } + { "time": 3 } ] }, "portal-streaks1": { "attachment": [ { "name": "portal-streaks1" }, - { "time": 3, "name": null } + { "time": 3 } ] }, "portal-streaks2": { "attachment": [ { "name": "portal-streaks2" }, - { "time": 3, "name": null } + { "time": 3 } ] } }, @@ -7696,7 +7704,7 @@ { "time": 0.1, "name": "muzzle03" }, { "time": 0.1333, "name": "muzzle04" }, { "time": 0.1667, "name": "muzzle05" }, - { "time": 0.2, "name": null } + { "time": 0.2 } ] }, "muzzle-glow": { @@ -7725,7 +7733,7 @@ ], "attachment": [ { "time": 0.0333, "name": "muzzle-ring" }, - { "time": 0.2333, "name": null } + { "time": 0.2333 } ] }, "muzzle-ring2": { @@ -7739,7 +7747,7 @@ ], "attachment": [ { "time": 0.0333, "name": "muzzle-ring" }, - { "time": 0.2, "name": null } + { "time": 0.2 } ] }, "muzzle-ring3": { @@ -7753,7 +7761,7 @@ ], "attachment": [ { "time": 0.0333, "name": "muzzle-ring" }, - { "time": 0.2, "name": null } + { "time": 0.2 } ] }, "muzzle-ring4": { @@ -7767,7 +7775,7 @@ ], "attachment": [ { "time": 0.0333, "name": "muzzle-ring" }, - { "time": 0.2, "name": null } + { "time": 0.2 } ] } }, diff --git a/assets/squirrel/Squirel.spinejson b/assets/squirrel/Squirel.spinejson index a59c236..473fd0f 100644 --- a/assets/squirrel/Squirel.spinejson +++ b/assets/squirrel/Squirel.spinejson @@ -1 +1,1678 @@ -{"skeleton":{"hash":"8gWBrsep6Ko","spine":"4.0.59","x":-69.21,"y":5.46,"width":100.54,"height":92.54,"images":"../images/","audio":""},"bones":[{"name":"root"},{"name":"C","parent":"root","x":-0.01,"y":-7.48},{"name":"Layer_2","parent":"C","x":38.35,"y":14.27},{"name":"EYES","parent":"Layer_2","x":-63.66,"y":51.75},{"name":"EYE_1","parent":"EYES","rotation":-178.24,"x":5.95,"y":8.9},{"name":"EYE_2","parent":"EYES","rotation":-43.03,"x":-8.25,"y":-4.87},{"name":"Layer_1","parent":"C","x":33.07,"y":6.45},{"name":"Layer_3","parent":"C","x":42.54,"y":21.37},{"name":"Layer_4","parent":"C","x":48.18,"y":28.29},{"name":"Neck","parent":"C","length":12.55,"rotation":136.52,"x":19.73,"y":22.92},{"name":"Nose","parent":"Layer_4","x":-62.79,"y":32.68},{"name":"bone10","parent":"Layer_3","x":-57.77,"y":-6.76,"color":"ff00e5ff"},{"name":"bone","parent":"bone10","x":6.47,"y":22.75,"color":"ff00ccff"},{"name":"bone2","parent":"bone10","x":-15.13,"y":13.76,"color":"ff00ccff"},{"name":"bone3","parent":"bone10","x":-23.11,"y":35.95,"color":"ff00ccff"},{"name":"bone4","parent":"bone10","x":-3.68,"y":47.84,"color":"ff00ccff"},{"name":"bone5","parent":"bone10","x":9.37,"y":63.5,"color":"ff00ccff"},{"name":"bone6","parent":"bone10","x":33.01,"y":50.88,"color":"ff00ccff"},{"name":"bone7","parent":"bone10","x":19.38,"y":33.34,"color":"ff00ccff"},{"name":"bone8","parent":"bone10","x":4.15,"y":38.7,"color":"ff00ccff"},{"name":"bone23","parent":"Layer_1","x":-55.2,"y":57.07,"color":"9c8b00ff"},{"name":"bone24","parent":"bone23","x":-13.12,"y":12.55,"color":"ffe100ff"},{"name":"bone11","parent":"bone24","length":9.36,"rotation":163.81,"x":-3.68,"y":-8.68,"color":"ffe900ff"},{"name":"bone12","parent":"bone11","length":10.64,"rotation":-47.94,"x":9.36,"color":"ffe900ff"},{"name":"bone13","parent":"bone12","length":10.87,"rotation":18.05,"x":10.64,"color":"ffe900ff"},{"name":"bone14","parent":"bone24","length":11.33,"rotation":106.35,"x":14.59,"y":3.07,"color":"ffe900ff"},{"name":"bone15","parent":"bone14","length":11.56,"rotation":56.13,"x":11.33,"color":"ffe900ff"},{"name":"bone16","parent":"bone15","length":10.5,"rotation":-17.92,"x":11.56,"color":"ffe900ff"},{"name":"bone21","parent":"bone23","x":-12.21,"y":-25.41,"color":"ffee00ff"},{"name":"bone17","parent":"bone21","x":-14.63,"y":-8.91,"color":"ffee00ff"},{"name":"bone18","parent":"bone21","x":1.21,"y":-14.96,"color":"ffee00ff"},{"name":"bone22","parent":"bone23","x":24.53,"y":5.28,"color":"ffee00ff"},{"name":"bone19","parent":"bone22","x":18.04,"y":-3.41,"color":"ffee00ff"},{"name":"bone20","parent":"bone22","x":14.41,"y":13.97,"color":"ffee00ff"},{"name":"bone25","parent":"bone23","x":18.11,"y":-21.61,"color":"ffe100ff"},{"name":"tooth","parent":"Layer_2","length":17.85,"rotation":-43.03,"x":-43.34,"y":30.93}],"slots":[{"name":"Squirrel_1","bone":"C","attachment":"Squirrel_1"},{"name":"Squirrel_2","bone":"C","attachment":"Squirrel_2"},{"name":"Squirrel_3","bone":"C","attachment":"Squirrel_3"},{"name":"Squirrel_4","bone":"C","attachment":"Squirrel_4"},{"name":"Squirrel_7","bone":"EYE_1","attachment":"Squirrel_7"},{"name":"Squirrel_8","bone":"EYE_2","attachment":"Squirrel_7"},{"name":"Squirrel_9","bone":"C"},{"name":"Squirrel_5","bone":"C","attachment":"Squirrel_5"},{"name":"Squirrel_6","bone":"C","attachment":"Squirrel_6"}],"skins":[{"name":"default","attachments":{"Squirrel_1":{"Squirrel_1":{"type":"mesh","uvs":[0,0.63345,0.59785,1,1,0.63345,0.60192,0,0.56321,0.55851],"triangles":[4,0,3,4,3,2,1,4,2,0,4,1],"vertices":[1,9,35.52,22.69,1,1,9,0.17,13.92,1,1,9,-2.93,-13.78,1,1,9,33.73,-21.79,1,1,9,16.39,-0.52,1],"hull":4,"edges":[0,2,2,4,4,6,0,6],"width":53,"height":49}},"Squirrel_2":{"Squirrel_2":{"type":"mesh","uvs":[0.40202,1,0.60487,0.92314,0.92692,0.66591,1,0.5259,1,0.36798,0.97939,0.20029,0.89859,0.15487,0.73891,0.2186,0.60782,0.14641,0.57138,0.05353,0.3668,0.0444,0.25112,0,0.14123,0.02097,0.13363,0.12183,0.27254,0.24123,0.26658,0.2483,0.11019,0.11821,0.04246,0.10521,0,0.13467,0,0.26649,0.07564,0.37251,0.1113,0.5389,0.20018,0.59701,0.20487,0.65255,0.12383,0.87689,0.14676,0.94437,0.20884,0.87598,0.38872,0.94861,0.57608,0.84631,0.81966,0.65911,0.95082,0.46167,0.90585,0.25094,0.74846,0.31845,0.51613,0.23252,0.50335,0.13706,0.33566,0.1299,0.24104,0.04397,0.26727,0.14627,0.3291,0.15445,0.39655,0.23731,0.36376,0.24652,0.286,0.37133,0.15485,0.29051,0.12768,0.20049,0.0265,0.20049,0.12674,0.30381,0.18483,0.47874,0.26633,0.4859,0.28319,0.70992,0.25808,0.42382,0.21205,0.40423,0.17552,0.35547,0.24267,0.34463,0.19027,0.31137,0.15679,0.38966,0.31594,0.4422,0.45644,0.23421,0.45897,0.27972,0.4337,0.18317,0.38949,0.16179,0.37651,0.21278,0.50969,0.1844,0.41411,0.12973,0.35579,0.18638,0.76322,0.49018,0.39805,0.81685,0.53834,0.73349,0.50843,0.49694],"triangles":[49,50,52,41,49,52,57,55,41,49,41,55,46,50,49,47,49,55,46,49,47,55,57,67,22,46,47,21,46,22,67,48,47,67,47,55,48,22,47,53,42,15,52,53,15,51,42,53,51,53,52,45,42,51,54,20,45,51,54,45,50,51,52,54,51,50,46,54,50,21,20,54,21,54,46,44,18,17,44,17,16,15,43,16,44,16,43,19,18,44,42,43,15,45,44,43,45,43,42,19,44,45,20,19,45,34,9,8,61,34,8,33,61,8,56,61,33,57,56,33,33,8,7,32,33,7,39,56,57,67,57,33,67,33,32,34,62,10,35,10,62,9,34,10,59,35,62,38,35,59,58,62,34,59,62,58,58,34,61,63,38,59,60,63,59,60,59,58,56,58,61,39,60,58,56,39,58,40,63,60,36,12,11,36,11,10,13,12,36,35,36,10,37,36,35,13,36,37,38,37,35,14,37,38,14,38,63,14,13,37,26,23,48,24,23,26,25,24,26,25,26,27,27,26,65,27,65,28,27,28,1,0,27,1,0,25,27,30,31,4,30,4,3,29,64,30,2,29,30,3,2,30,31,6,5,7,6,31,32,7,31,31,5,4,32,31,30,48,23,22,48,67,66,65,48,66,65,66,28,26,48,65,64,32,30,67,32,64,66,67,64,40,60,39,14,63,40,40,15,14,41,15,40,52,15,41,40,39,57,57,41,40,66,64,29,28,66,29,1,28,29,1,29,2],"vertices":[2,34,-27,-23.42,0.01042,30,2.12,-4.66,0.98958,3,34,-7.73,-16.74,0.51602,28,22.6,-12.94,0.16513,30,21.39,2.02,0.31885,3,34,22.87,5.64,0.33132,31,16.45,-21.25,0.11922,32,-1.59,-17.84,0.54946,3,34,29.81,17.82,0.05644,31,23.39,-9.07,0.00138,32,5.35,-5.66,0.94218,2,33,8.98,-9.3,0.41129,32,5.35,8.08,0.58871,1,33,7.03,5.29,1,3,31,13.76,23.21,0.00788,33,-0.65,9.24,0.98541,25,2,-38.95,0.00671,4,31,-1.41,17.67,0.37121,33,-15.82,3.7,0.30688,26,-24.75,-4.1,8.8E-4,25,0.95,-22.83,0.32103,4,31,-13.86,23.95,0.10248,33,-28.27,9.98,0.03195,26,-10.98,-6.34,0.18602,25,10.48,-12.65,0.67954,4,31,-17.32,32.03,0.0188,33,-31.73,18.06,0.00553,26,-5.25,-13,0.51291,25,19.21,-11.6,0.46276,2,27,4.31,-6.92,0.63707,26,13.53,-7.91,0.36293,1,27,15.5,-3.69,1,1,27,22.95,3.85,1,4,21,-21.26,18.82,0.00955,27,18.45,11.41,0.98437,24,13.78,-7.77,5.9E-4,23,26.15,-3.12,0.00548,6,21,-8.07,8.43,0.31128,27,1.67,12.22,0.29629,26,16.91,11.12,0.09895,24,-2.86,-10.08,0.1112,23,11.04,-10.46,0.17974,22,8.99,-15.21,0.00255,6,21,-8.63,7.82,0.30496,27,1.78,13.05,0.21883,26,17.26,11.87,0.07372,24,-2.91,-9.24,0.16277,23,10.73,-9.69,0.23054,22,9.36,-14.46,0.00919,1,24,15.55,-6.39,1,1,24,20.83,-2.54,1,1,24,21.78,2.14,1,5,21,-33.96,6.24,0,27,21.49,29.03,0,26,40.94,21.01,0,24,13.52,10.1,0.93335,23,20.36,13.79,0.06664,8,21,-26.77,-2.99,2.0E-5,28,-27.68,34.97,0.00247,29,-13.05,43.88,3.9E-4,27,10.29,32.38,1.0E-5,26,31.3,27.64,0,24,1.89,11.32,0.39919,23,8.92,11.35,0.54041,22,23.77,0.98,0.05751,8,21,-23.38,-17.46,0,28,-24.29,20.49,0.07843,29,-9.66,29.4,0.02,27,-0.87,42.21,0,26,23.72,40.43,0,24,-10.89,18.92,0.0051,23,-5.58,14.62,0.37675,22,16.48,13.93,0.51971,5,31,-52.59,-15.25,1.0E-5,28,-15.85,15.44,0.23977,29,-1.22,24.35,0.07939,23,-13.81,9.22,0.10544,22,6.96,16.43,0.57539,4,28,-15.4,10.61,0.36532,29,-0.77,19.52,0.18678,23,-18.35,10.93,0.03797,22,5.18,20.95,0.40994,2,29,-8.47,0,0.99945,22,7.13,41.84,5.5E-4,1,29,-6.29,-5.87,1,1,29,-0.4,0.08,1,1,30,0.85,-0.19,1,5,34,-10.46,-10.05,0.62543,28,19.86,-6.25,0.15778,30,18.65,8.71,0.21516,25,-47.1,7.38,2.2E-4,22,-33.38,27.31,0.00141,5,34,12.68,6.24,0.55445,31,6.26,-20.65,0.14411,32,-11.78,-17.24,0.30127,25,-37.99,-19.41,9.0E-5,22,-51.07,5.21,8.0E-5,1,32,0.68,-0.07,1,1,33,0.04,0.89,1,4,31,-0.5,8.98,0.48943,33,-14.91,-4.99,0.29036,32,-18.54,12.39,0.005,25,-7.65,-21.26,0.21521,1,25,5.74,-2.18,1,4,31,-23.79,24.76,0.02482,33,-38.2,10.79,0.00714,26,-1.27,-4.13,0.43439,25,14.05,-3.36,0.53366,2,27,2.4,0.86,0.80699,26,14.11,0.08,0.19301,4,21,-11.06,25.59,0.00235,27,14.06,-0.02,0.99602,24,11.58,-19.82,1.2E-4,23,27.79,-15.26,0.00151,4,21,-8.57,16.69,0.05661,27,6.87,5.78,0.91336,24,3.44,-15.45,0.00947,23,18.69,-13.62,0.02056,5,21,-2.69,15.98,0.17372,27,1.67,2.96,0.51083,26,14.06,2.3,0.26383,24,-1.15,-19.18,0.01745,23,15.49,-18.59,0.03418,6,21,3.72,8.77,0.46955,27,-7.73,5.11,0.09082,26,5.78,7.24,0.2981,25,8.54,8.83,0.11384,24,-10.78,-18.8,0.00783,23,6.21,-21.21,0.01987,6,21,0.6,7.97,0.46955,27,-5.66,7.57,0.09082,26,8.5,8.95,0.2981,25,8.65,12.05,0.11384,24,-9.2,-16,0.00783,23,6.85,-18.06,0.01987,3,21,-6.79,-2.89,0.61291,23,0.3,-6.68,0.06448,22,4.6,-4.69,0.32261,2,24,1.81,0.95,0.5,23,12.06,1.47,0.5,4,21,-21.83,11.98,0.00417,27,14.94,17.32,0.00361,26,31.1,11.88,7.4E-4,24,9.24,-2.62,0.99148,5,21,-31.44,11.98,0,27,22.77,22.89,0,26,40.26,14.78,0,24,15.91,4.3,0.99074,23,24.43,9.02,0.00926,3,24,2.83,3.68,0.64861,23,12.18,4.37,0.35018,22,20.77,-6.12,0.0012,5,28,-17.31,25.73,0.05713,29,-2.68,34.64,0.01317,24,-11.96,10.26,0.00649,23,-3.92,6.05,0.39169,22,11.23,6.96,0.53152,4,28,-9.56,25.1,0.06051,29,5.07,34.01,0.0117,23,-7.86,-0.65,0.15309,22,3.62,5.4,0.7747,6,31,-44.7,-25.08,8.4E-4,28,-7.96,5.61,0.598,29,6.67,14.52,0.19567,25,-27.89,30.74,8.7E-4,23,-26.09,6.41,0.00257,22,-3.35,23.67,0.20204,1,22,5.88,0.43,1,2,23,0.79,0.89,0.5,22,10.55,0.01,0.5,1,23,6.12,2.16,1,5,21,-10.9,-0.56,0.20503,27,-1.23,21.2,0.01606,26,16.9,20.55,0.00607,23,4.18,-3.99,0.50718,22,9.2,-5.78,0.26566,2,24,-1.83,-0.21,0.5,23,8.96,-0.77,0.5,5,28,-19.97,33.48,0.00548,29,-5.34,42.39,0.00111,24,-4.53,6.8,0.10762,23,4.22,5.06,0.76764,22,15.95,0.26,0.11815,1,22,0.15,0.43,1,6,21,9.4,9.04,0.22928,27,-12.21,1.6,5.3E-4,26,0.43,5.27,0.42114,25,7.2,3.3,0.34701,24,-14.54,-23.08,3.2E-4,23,3.97,-26.45,0.00172,4,21,9.64,5.08,0.32059,28,8.74,43.04,7.0E-5,26,-0.99,8.98,0.06844,25,3.33,4.18,0.6109,1,26,3.83,1.69,1,1,26,8.39,1.18,1,6,21,1.81,10.91,0.22003,27,-4.94,4.48,0.18376,26,8.23,5.78,0.54358,25,11.12,10.06,0.03384,24,-7.93,-18.91,0.0057,23,8.96,-20.43,0.01309,4,31,-23.19,20.64,0.03472,33,-37.6,6.67,0.00889,26,-3.09,-0.38,0.17079,25,9.93,-2.78,0.78561,1,26,7,-2.18,1,6,21,-0.16,13.2,0.22003,27,-2.01,3.75,0.18376,26,10.8,4.19,0.54358,25,13.88,11.3,0.03384,24,-4.91,-19.08,0.0057,23,11.88,-19.66,0.01309,6,34,7.32,20.93,0.06867,31,0.9,-5.96,0.79425,28,37.64,24.73,0.00115,33,-13.51,-19.93,0.00116,32,-17.14,-2.55,0.13325,22,-41.82,-7.4,0.00152,5,34,-27.38,-7.49,0.07185,31,-33.79,-34.38,6.5E-4,28,2.95,-3.69,0.69651,30,1.74,11.27,0.23004,25,-39.88,22.89,9.6E-4,7,34,-14.05,-0.24,0.34947,21,17.19,-34.39,7.6E-4,31,-20.46,-27.13,0.02246,28,16.28,3.56,0.42946,30,15.07,18.52,0.12282,25,-36.68,8.06,0.01847,22,-27.2,18.88,0.05656,6,34,-16.89,20.34,0.13522,21,14.34,-13.81,0.06948,31,-23.31,-6.55,0.13686,28,13.43,24.14,0.19265,25,-16.13,4.99,0.19723,22,-18.74,-0.09,0.26856],"hull":26,"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,16,16,18,18,20,20,22,22,24,24,26,26,28,28,30,30,32,32,34,34,36,36,38,38,40,40,42,46,48,48,50,0,50,42,44,44,46,52,54,54,56,56,58,58,60,60,62,62,64,64,66,70,72,72,74,74,76,78,80,80,82,84,86,86,88,88,90,92,94,94,96,96,52,82,98,98,94,98,100,100,102,82,104,104,100,100,92,84,106,106,104,102,106,90,108,108,92,102,108,98,110,112,114,112,66,112,78,112,116,116,118,120,78,120,116,66,122,122,68,116,122,68,124,124,70,118,124,76,126,126,120,118,126],"width":95,"height":87}},"Squirrel_3":{"Squirrel_3":{"type":"mesh","uvs":[0,0.61229,0.64285,1,1,0.65634,0.73535,0],"triangles":[0,3,2,1,0,2],"vertices":[1,35,-3.85,-12.98,1,1,35,17.66,-7.76,1,1,35,18.92,6.59,1,1,35,0.58,14.61,1],"hull":4,"edges":[0,2,2,4,4,6,0,6],"width":30,"height":28}},"Squirrel_4":{"Squirrel_4":{"type":"mesh","uvs":[0.994,0.61159,0.607,0.76275,0.4665,1,0,1,0,0.50434,0.273,0.338,0.3855,0,1,0,0.4545,0.53684],"triangles":[8,6,7,5,6,8,0,8,7,1,8,0,8,3,4,8,4,5,2,3,8,1,2,8],"vertices":[1,2,-42.01,47.55,1,1,2,-57.11,42.11,1,1,2,-62.58,33.57,1,1,2,-80.78,33.57,1,1,2,-80.78,51.41,1,1,2,-70.13,57.4,1,1,2,-65.74,69.57,1,1,2,-41.78,69.57,1,1,2,-63.05,50.24,1],"hull":8,"edges":[2,4,4,6,2,0,0,14,10,12,12,14,6,8,8,10],"width":39,"height":36}},"Squirrel_5":{"Squirrel_5":{"type":"mesh","uvs":[0,0.55767,0.13333,1,0.53586,0.84979,0.59157,0.6785,0.77264,0.62955,1,0.2732,0.57904,0,0.32832,0.30073,0.47875,0.51332],"triangles":[8,6,5,4,8,5,1,8,2,2,8,3,3,8,4,8,7,6,0,7,8,1,0,8],"vertices":[1,14,0.21,-0.07,1,1,13,-0.3,-0.44,1,1,12,0.64,-1.77,1,3,19,6.08,-8.99,0.41136,18,-9.15,-3.62,0.23742,12,3.76,6.96,0.35121,1,18,0.99,-1.13,1,1,17,0.1,-0.5,1,1,16,0.16,0.82,1,1,15,-0.83,1.14,1,1,19,-0.24,-0.56,1],"hull":8,"edges":[0,2,2,4,4,6,6,8,8,10,10,12,12,14,0,14],"width":56,"height":51}},"Squirrel_6":{"Squirrel_6":{"type":"mesh","uvs":[0.26694,0.04421,0,0.71353,0.63934,1,1,0.79125,0.94334,0,0.56714,0.47603],"triangles":[5,0,4,1,0,5,5,4,3,2,5,3,1,5,2],"vertices":[1,10,-8.37,10.55,1,1,10,-15.05,-4.18,1,1,10,0.94,-10.48,1,1,10,9.95,-5.89,1,1,10,8.54,11.52,1,1,10,-0.87,1.05,1],"hull":5,"edges":[0,2,2,4,4,6,6,8,0,8],"width":25,"height":22}},"Squirrel_7":{"Squirrel_7":{"x":-0.3,"y":0.17,"rotation":43.03,"width":8,"height":6}},"Squirrel_8":{"Squirrel_7":{"x":-0.3,"y":0.17,"rotation":43.03,"width":8,"height":6}},"Squirrel_9":{"Squirrel_4":{"type":"mesh","color":"210c00ff","uvs":[0.994,0.61159,0.607,0.76275,0.4665,1,0,1,0,0.50434,0.273,0.338,0.3855,0,1,0,0.4545,0.53684],"triangles":[8,6,7,5,6,8,0,8,7,1,8,0,8,3,4,8,4,5,2,3,8,1,2,8],"vertices":[1,2,-42.01,47.55,1,1,2,-57.11,42.11,1,1,2,-62.58,33.57,1,1,2,-80.78,33.57,1,1,2,-80.78,51.41,1,1,2,-70.13,57.4,1,1,2,-65.74,69.57,1,1,2,-41.78,69.57,1,1,2,-63.05,50.24,1],"hull":8,"edges":[2,4,4,6,2,0,0,14,10,12,12,14,6,8,8,10],"width":39,"height":36}}}}],"animations":{"Idle":{"slots":{"Squirrel_1":{"attachment":[{"name":"Squirrel_1"},{"time":1.6,"name":"Squirrel_1"}]},"Squirrel_2":{"attachment":[{"name":"Squirrel_2"},{"time":1.6,"name":"Squirrel_2"}]},"Squirrel_3":{"attachment":[{"name":"Squirrel_3"},{"time":1.6,"name":"Squirrel_3"}]},"Squirrel_4":{"attachment":[{"name":"Squirrel_4"},{"time":1.6,"name":"Squirrel_4"}]},"Squirrel_5":{"attachment":[{"name":"Squirrel_5"},{"time":1.6,"name":"Squirrel_5"}]},"Squirrel_6":{"attachment":[{"name":"Squirrel_6"},{"time":1.6,"name":"Squirrel_6"}]},"Squirrel_7":{"attachment":[{"name":"Squirrel_7"},{"time":1.6,"name":"Squirrel_7"}]},"Squirrel_8":{"attachment":[{"name":"Squirrel_7"},{"time":1.6,"name":"Squirrel_7"}]},"Squirrel_9":{"attachment":[{"name":null},{"time":0.7667,"name":null},{"time":0.8,"name":"Squirrel_4"},{"time":0.8667,"name":null},{"time":1.6,"name":null}]}},"bones":{"bone21":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":2.55,"y":2.4,"curve":[0.05,2.55,0.15,-3.9,0.05,2.4,0.15,-4.4]},{"time":0.2,"x":-3.9,"y":-4.4,"curve":[0.25,-3.9,0.35,2.55,0.25,-4.4,0.35,2.4]},{"time":0.4,"x":2.55,"y":2.4,"curve":[0.45,2.55,0.55,-3.9,0.45,2.4,0.55,-4.4]},{"time":0.6,"x":-3.9,"y":-4.4,"curve":[0.65,-3.9,0.75,2.55,0.65,-4.4,0.75,2.4]},{"time":0.8,"x":2.55,"y":2.4,"curve":[0.85,2.55,0.95,-3.9,0.85,2.4,0.95,-4.4]},{"time":1,"x":-3.9,"y":-4.4,"curve":[1.05,-3.9,1.15,2.55,1.05,-4.4,1.15,2.4]},{"time":1.2,"x":2.55,"y":2.4,"curve":[1.25,2.55,1.35,-3.9,1.25,2.4,1.35,-4.4]},{"time":1.4,"x":-3.9,"y":-4.4,"curve":[1.45,-3.9,1.55,2.55,1.45,-4.4,1.55,2.4]},{"time":1.6,"x":2.55,"y":2.4}]},"bone22":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-3,"y":-2.85,"curve":[0.05,-3,0.15,5.08,0.05,-2.85,0.15,2.77]},{"time":0.2,"x":5.08,"y":2.77,"curve":[0.25,5.08,0.35,-3,0.25,2.77,0.35,-2.85]},{"time":0.4,"x":-3,"y":-2.85,"curve":[0.45,-3,0.55,5.08,0.45,-2.85,0.55,2.77]},{"time":0.6,"x":5.08,"y":2.77,"curve":[0.65,5.08,0.75,-3,0.65,2.77,0.75,-2.85]},{"time":0.8,"x":-3,"y":-2.85,"curve":[0.85,-3,0.95,5.08,0.85,-2.85,0.95,2.77]},{"time":1,"x":5.08,"y":2.77,"curve":[1.05,5.08,1.15,-3,1.05,2.77,1.15,-2.85]},{"time":1.2,"x":-3,"y":-2.85,"curve":[1.25,-3,1.35,5.08,1.25,-2.85,1.35,2.77]},{"time":1.4,"x":5.08,"y":2.77,"curve":[1.45,5.08,1.55,-3,1.45,2.77,1.55,-2.85]},{"time":1.6,"x":-3,"y":-2.85}]},"bone18":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-1.87,"y":-4.17,"curve":[0.013,-2.22,0.024,-2.47,0.013,-4.95,0.024,-5.5]},{"time":0.0333,"x":-2.47,"y":-5.5,"curve":[0.092,-2.47,0.208,0,0.092,-5.5,0.208,0]},{"time":0.2667,"curve":[0.299,0,0.354,-1.17,0.299,0,0.354,-2.61]},{"time":0.4,"x":-1.87,"y":-4.17,"curve":[0.413,-2.22,0.424,-2.47,0.413,-4.95,0.424,-5.5]},{"time":0.4333,"x":-2.47,"y":-5.5,"curve":[0.492,-2.47,0.608,0,0.492,-5.5,0.608,0]},{"time":0.6667,"curve":[0.708,0,0.792,-6.06,0.708,0,0.792,-0.2]},{"time":0.8333,"x":-6.06,"y":-0.2,"curve":[0.883,-6.06,0.983,0,0.883,-0.2,0.983,0]},{"time":1.0333,"curve":[1.092,0,1.208,-8.96,1.092,0,1.208,-11.49]},{"time":1.2667,"x":-8.96,"y":-11.49,"curve":[1.317,-8.96,1.417,0,1.317,-11.49,1.417,0]},{"time":1.4667,"curve":[1.499,0,1.554,-1.17,1.499,0,1.554,-2.61]},{"time":1.6,"x":-1.87,"y":-4.17}]},"bone17":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-0.14,"y":1.29,"curve":[0.013,-0.17,0.024,-0.19,0.013,1.54,0.024,1.71]},{"time":0.0333,"x":-0.19,"y":1.71,"curve":[0.092,-0.19,0.208,0,0.092,1.71,0.208,0]},{"time":0.2667,"curve":[0.299,0,0.354,-0.09,0.299,0,0.354,0.81]},{"time":0.4,"x":-0.14,"y":1.29,"curve":[0.413,-0.17,0.424,-0.19,0.413,1.54,0.424,1.71]},{"time":0.4333,"x":-0.19,"y":1.71,"curve":[0.492,-0.19,0.608,0,0.492,1.71,0.608,0]},{"time":0.6667,"curve":[0.708,0,0.792,2.2,0.708,0,0.792,0.85]},{"time":0.8333,"x":2.2,"y":0.85,"curve":[0.883,2.2,0.983,0,0.883,0.85,0.983,0]},{"time":1.0333,"curve":[1.092,0,1.208,-9.29,1.092,0,1.208,1.19]},{"time":1.2667,"x":-9.29,"y":1.19,"curve":[1.317,-9.29,1.417,0,1.317,1.19,1.417,0]},{"time":1.4667,"curve":[1.499,0,1.554,-0.09,1.499,0,1.554,0.81]},{"time":1.6,"x":-0.14,"y":1.29}]},"bone19":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":5.61,"y":-1.29,"curve":[0.013,6.65,0.024,7.4,0.013,-1.54,0.024,-1.71]},{"time":0.0333,"x":7.4,"y":-1.71,"curve":[0.083,7.4,0.183,0,0.083,-1.71,0.183,0]},{"time":0.2333,"curve":[0.292,0,0.408,17.3,0.292,0,0.408,-0.29]},{"time":0.4667,"x":17.3,"y":-0.29,"curve":[0.517,17.3,0.617,0,0.517,-0.29,0.617,0]},{"time":0.6667,"curve":[0.699,0,0.754,3.5,0.699,0,0.754,-0.81]},{"time":0.8,"x":5.61,"y":-1.29,"curve":[0.813,6.65,0.824,7.4,0.813,-1.54,0.824,-1.71]},{"time":0.8333,"x":7.4,"y":-1.71,"curve":[0.892,7.4,1.008,0,0.892,-1.71,1.008,0]},{"time":1.0667,"curve":[1.108,0,1.192,4.32,1.108,0,1.192,3.08]},{"time":1.2333,"x":4.32,"y":3.08,"curve":[1.292,4.32,1.408,0,1.292,3.08,1.408,0]},{"time":1.4667,"curve":[1.499,0,1.554,3.5,1.499,0,1.554,-0.81]},{"time":1.6,"x":5.61,"y":-1.29}]},"bone20":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-0.86,"y":0.72,"curve":[0.013,-1.02,0.024,-1.14,0.013,0.85,0.024,0.95]},{"time":0.0333,"x":-1.14,"y":0.95,"curve":[0.083,-1.14,0.183,0,0.083,0.95,0.183,0]},{"time":0.2333,"curve":[0.292,0,0.408,0.28,0.292,0,0.408,9.03]},{"time":0.4667,"x":0.28,"y":9.03,"curve":[0.517,0.28,0.617,0,0.517,9.03,0.617,0]},{"time":0.6667,"curve":[0.699,0,0.754,-0.54,0.699,0,0.754,0.45]},{"time":0.8,"x":-0.86,"y":0.72,"curve":[0.813,-1.02,0.824,-1.14,0.813,0.85,0.824,0.95]},{"time":0.8333,"x":-1.14,"y":0.95,"curve":[0.892,-1.14,1.008,0,0.892,0.95,1.008,0]},{"time":1.0667,"curve":[1.108,0,1.192,-1.65,1.108,0,1.192,-0.25]},{"time":1.2333,"x":-1.65,"y":-0.25,"curve":[1.292,-1.65,1.408,0,1.292,-0.25,1.408,0]},{"time":1.4667,"curve":[1.499,0,1.554,-0.54,1.499,0,1.554,0.45]},{"time":1.6,"x":-0.86,"y":0.72}]},"bone10":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-2.54,"y":2.75,"curve":[0.05,-2.54,0.15,1.62,0.05,2.75,0.15,-2.63]},{"time":0.2,"x":1.62,"y":-2.63,"curve":[0.25,1.62,0.35,-2.54,0.25,-2.63,0.35,2.75]},{"time":0.4,"x":-2.54,"y":2.75,"curve":[0.45,-2.54,0.55,1.62,0.45,2.75,0.55,-2.63]},{"time":0.6,"x":1.62,"y":-2.63,"curve":[0.65,1.62,0.75,-2.54,0.65,-2.63,0.75,2.75]},{"time":0.8,"x":-2.54,"y":2.75,"curve":[0.85,-2.54,0.95,1.62,0.85,2.75,0.95,-2.63]},{"time":1,"x":1.62,"y":-2.63,"curve":[1.05,1.62,1.15,-2.54,1.05,-2.63,1.15,2.75]},{"time":1.2,"x":-2.54,"y":2.75,"curve":[1.25,-2.54,1.35,1.62,1.25,2.75,1.35,-2.63]},{"time":1.4,"x":1.62,"y":-2.63,"curve":[1.45,1.62,1.55,-2.54,1.45,-2.63,1.55,2.75]},{"time":1.6,"x":-2.54,"y":2.75}]},"tooth":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-4.71,"y":4.06,"curve":[0.053,-2.73,0.126,2.23,0.053,2.26,0.126,-2.23]},{"time":0.1667,"x":2.23,"y":-2.23,"curve":[0.217,2.23,0.317,-5.75,0.217,-2.23,0.317,5]},{"time":0.3667,"x":-5.75,"y":5,"curve":[0.376,-5.75,0.388,-5.35,0.376,5,0.388,4.64]},{"time":0.4,"x":-4.71,"y":4.06,"curve":[0.453,-2.73,0.526,2.23,0.453,2.26,0.526,-2.23]},{"time":0.5667,"x":2.23,"y":-2.23,"curve":[0.617,2.23,0.717,-5.75,0.617,-2.23,0.717,5]},{"time":0.7667,"x":-5.75,"y":5,"curve":[0.776,-5.75,0.788,-5.35,0.776,5,0.788,4.64]},{"time":0.8,"x":-4.71,"y":4.06,"curve":[0.853,-2.73,0.926,2.23,0.853,2.26,0.926,-2.23]},{"time":0.9667,"x":2.23,"y":-2.23,"curve":[1.017,2.23,1.117,-5.75,1.017,-2.23,1.117,5]},{"time":1.1667,"x":-5.75,"y":5,"curve":[1.176,-5.75,1.188,-5.35,1.176,5,1.188,4.64]},{"time":1.2,"x":-4.71,"y":4.06,"curve":[1.253,-2.73,1.326,2.23,1.253,2.26,1.326,-2.23]},{"time":1.3667,"x":2.23,"y":-2.23,"curve":[1.417,2.23,1.517,-5.75,1.417,-2.23,1.517,5]},{"time":1.5667,"x":-5.75,"y":5,"curve":[1.576,-5.75,1.588,-5.35,1.576,5,1.588,4.64]},{"time":1.6,"x":-4.71,"y":4.06}]},"bone8":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":0.2,"curve":"stepped"},{"time":0.4,"curve":"stepped"},{"time":0.6,"curve":"stepped"},{"time":0.8,"curve":"stepped"},{"time":1,"curve":"stepped"},{"time":1.2,"curve":"stepped"},{"time":1.4,"curve":"stepped"},{"time":1.6}]},"bone7":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":0.2,"curve":"stepped"},{"time":0.4,"curve":"stepped"},{"time":0.6,"curve":"stepped"},{"time":0.8,"curve":"stepped"},{"time":1,"curve":"stepped"},{"time":1.2,"curve":"stepped"},{"time":1.4,"curve":"stepped"},{"time":1.6}]},"bone6":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-1.58,"y":2.11,"curve":[0.05,-1.58,0.15,0,0.05,2.11,0.15,0]},{"time":0.2,"curve":[0.25,0,0.35,-1.58,0.25,0,0.35,2.11]},{"time":0.4,"x":-1.58,"y":2.11,"curve":[0.45,-1.58,0.55,0,0.45,2.11,0.55,0]},{"time":0.6,"curve":[0.65,0,0.75,-1.58,0.65,0,0.75,2.11]},{"time":0.8,"x":-1.58,"y":2.11,"curve":[0.85,-1.58,0.95,0,0.85,2.11,0.95,0]},{"time":1,"curve":[1.05,0,1.15,-1.58,1.05,0,1.15,2.11]},{"time":1.2,"x":-1.58,"y":2.11,"curve":[1.25,-1.58,1.35,0,1.25,2.11,1.35,0]},{"time":1.4,"curve":[1.45,0,1.55,-1.58,1.45,0,1.55,2.11]},{"time":1.6,"x":-1.58,"y":2.11}]},"bone5":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":6.86,"y":0.7,"curve":[0.05,6.86,0.15,0,0.05,0.7,0.15,0]},{"time":0.2,"curve":[0.25,0,0.35,6.86,0.25,0,0.35,0.7]},{"time":0.4,"x":6.86,"y":0.7,"curve":[0.45,6.86,0.55,0,0.45,0.7,0.55,0]},{"time":0.6,"curve":[0.65,0,0.75,6.86,0.65,0,0.75,0.7]},{"time":0.8,"x":6.86,"y":0.7,"curve":[0.85,6.86,0.95,0,0.85,0.7,0.95,0]},{"time":1,"curve":[1.05,0,1.15,6.86,1.05,0,1.15,0.7]},{"time":1.2,"x":6.86,"y":0.7,"curve":[1.25,6.86,1.35,0,1.25,0.7,1.35,0]},{"time":1.4,"curve":[1.45,0,1.55,6.86,1.45,0,1.55,0.7]},{"time":1.6,"x":6.86,"y":0.7}]},"bone4":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":0.2,"curve":"stepped"},{"time":0.4,"curve":"stepped"},{"time":0.6,"curve":"stepped"},{"time":0.8,"curve":"stepped"},{"time":1,"curve":"stepped"},{"time":1.2,"curve":"stepped"},{"time":1.4,"curve":"stepped"},{"time":1.6}]},"bone3":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-2.64,"y":-4.4,"curve":[0.05,-2.64,0.15,0,0.05,-4.4,0.15,0]},{"time":0.2,"curve":[0.25,0,0.35,-2.64,0.25,0,0.35,-4.4]},{"time":0.4,"x":-2.64,"y":-4.4,"curve":[0.45,-2.64,0.55,0,0.45,-4.4,0.55,0]},{"time":0.6,"curve":[0.65,0,0.75,-2.64,0.65,0,0.75,-4.4]},{"time":0.8,"x":-2.64,"y":-4.4,"curve":[0.85,-2.64,0.95,0,0.85,-4.4,0.95,0]},{"time":1,"curve":[1.05,0,1.15,-2.64,1.05,0,1.15,-4.4]},{"time":1.2,"x":-2.64,"y":-4.4,"curve":[1.25,-2.64,1.35,0,1.25,-4.4,1.35,0]},{"time":1.4,"curve":[1.45,0,1.55,-2.64,1.45,0,1.55,-4.4]},{"time":1.6,"x":-2.64,"y":-4.4}]},"bone2":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-4.75,"y":1.06,"curve":[0.05,-4.75,0.15,0,0.05,1.06,0.15,0]},{"time":0.2,"curve":[0.25,0,0.35,-4.75,0.25,0,0.35,1.06]},{"time":0.4,"x":-4.75,"y":1.06,"curve":[0.45,-4.75,0.55,0,0.45,1.06,0.55,0]},{"time":0.6,"curve":[0.65,0,0.75,-4.75,0.65,0,0.75,1.06]},{"time":0.8,"x":-4.75,"y":1.06,"curve":[0.85,-4.75,0.95,0,0.85,1.06,0.95,0]},{"time":1,"curve":[1.05,0,1.15,-4.75,1.05,0,1.15,1.06]},{"time":1.2,"x":-4.75,"y":1.06,"curve":[1.25,-4.75,1.35,0,1.25,1.06,1.35,0]},{"time":1.4,"curve":[1.45,0,1.55,-4.75,1.45,0,1.55,1.06]},{"time":1.6,"x":-4.75,"y":1.06}]},"bone":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":0.2,"curve":"stepped"},{"time":0.4,"curve":"stepped"},{"time":0.6,"curve":"stepped"},{"time":0.8,"curve":"stepped"},{"time":1,"curve":"stepped"},{"time":1.2,"curve":"stepped"},{"time":1.4,"curve":"stepped"},{"time":1.6}]},"Nose":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":-4.59,"y":2.75,"curve":[0.05,-4.59,0.15,-1.07,0.05,2.75,0.15,-2.45]},{"time":0.2,"x":-1.07,"y":-2.45,"curve":[0.25,-1.07,0.35,-4.59,0.25,-2.45,0.35,2.75]},{"time":0.4,"x":-4.59,"y":2.75,"curve":[0.45,-4.59,0.55,-1.07,0.45,2.75,0.55,-2.45]},{"time":0.6,"x":-1.07,"y":-2.45,"curve":[0.65,-1.07,0.75,-4.59,0.65,-2.45,0.75,2.75]},{"time":0.8,"x":-4.59,"y":2.75,"curve":[0.85,-4.59,0.95,-1.07,0.85,2.75,0.95,-2.45]},{"time":1,"x":-1.07,"y":-2.45,"curve":[1.05,-1.07,1.15,-4.59,1.05,-2.45,1.15,2.75]},{"time":1.2,"x":-4.59,"y":2.75,"curve":[1.25,-4.59,1.35,-1.07,1.25,2.75,1.35,-2.45]},{"time":1.4,"x":-1.07,"y":-2.45,"curve":[1.45,-1.07,1.55,-4.59,1.45,-2.45,1.55,2.75]},{"time":1.6,"x":-4.59,"y":2.75}]},"EYES":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":3.78,"y":2.52,"curve":[0.017,3.78,0.05,-3.36,0.017,2.52,0.05,-2.31]},{"time":0.0667,"x":-3.36,"y":-2.31,"curve":"stepped"},{"time":0.8333,"x":-3.36,"y":-2.31,"curve":[0.85,-3.36,0.883,3.78,0.85,-2.31,0.883,2.52]},{"time":0.9,"x":3.78,"y":2.52,"curve":"stepped"},{"time":1.6,"x":3.78,"y":2.52}]},"C":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":2.45,"y":1.63,"curve":[0.042,2.45,0.125,0.27,0.042,1.63,0.125,0]},{"time":0.1667,"x":0.27,"curve":"stepped"},{"time":0.7667,"x":0.27,"curve":[0.808,0.27,0.892,2.45,0.808,0,0.892,1.63]},{"time":0.9333,"x":2.45,"y":1.63,"curve":"stepped"},{"time":1.6,"x":2.45,"y":1.63}]},"bone14":{"rotate":[{"value":-8.7,"curve":[0.05,-8.7,0.15,-0.11]},{"time":0.2,"value":-0.11,"curve":[0.25,-0.11,0.35,-8.7]},{"time":0.4,"value":-8.7,"curve":[0.45,-8.7,0.55,-0.11]},{"time":0.6,"value":-0.11,"curve":[0.65,-0.11,0.75,-8.7]},{"time":0.8,"value":-8.7,"curve":[0.85,-8.7,0.95,-0.11]},{"time":1,"value":-0.11,"curve":[1.05,-0.11,1.15,-8.7]},{"time":1.2,"value":-8.7,"curve":[1.25,-8.7,1.35,-0.11]},{"time":1.4,"value":-0.11,"curve":[1.45,-0.11,1.55,-8.7]},{"time":1.6,"value":-8.7}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone15":{"rotate":[{"value":-6.26,"curve":[0.025,-7.65,0.049,-8.7]},{"time":0.0667,"value":-8.7,"curve":[0.1,-8.7,0.167,-0.11]},{"time":0.2,"value":-0.11,"curve":"stepped"},{"time":0.2667,"value":-0.11,"curve":[0.299,-0.11,0.353,-3.8]},{"time":0.4,"value":-6.26,"curve":[0.425,-7.65,0.449,-8.7]},{"time":0.4667,"value":-8.7,"curve":[0.517,-8.7,0.617,-0.11]},{"time":0.6667,"value":-0.11,"curve":[0.699,-0.11,0.753,-3.8]},{"time":0.8,"value":-6.26,"curve":[0.825,-7.65,0.849,-8.7]},{"time":0.8667,"value":-8.7,"curve":[0.917,-8.7,1.017,-0.11]},{"time":1.0667,"value":-0.11,"curve":[1.099,-0.11,1.153,-3.8]},{"time":1.2,"value":-6.26,"curve":[1.225,-7.65,1.249,-8.7]},{"time":1.2667,"value":-8.7,"curve":[1.317,-8.7,1.417,-0.11]},{"time":1.4667,"value":-0.11,"curve":[1.499,-0.11,1.553,-3.8]},{"time":1.6,"value":-6.26}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone16":{"rotate":[{"value":-2.55,"curve":[0.047,-5.01,0.101,-8.7]},{"time":0.1333,"value":-8.7,"curve":[0.15,-8.7,0.183,-0.11]},{"time":0.2,"value":-0.11,"curve":"stepped"},{"time":0.3333,"value":-0.11,"curve":[0.351,-0.11,0.375,-1.16]},{"time":0.4,"value":-2.55,"curve":[0.447,-5.01,0.501,-8.7]},{"time":0.5333,"value":-8.7,"curve":[0.583,-8.7,0.683,-0.11]},{"time":0.7333,"value":-0.11,"curve":[0.751,-0.11,0.775,-1.16]},{"time":0.8,"value":-2.55,"curve":[0.847,-5.01,0.901,-8.7]},{"time":0.9333,"value":-8.7,"curve":[0.983,-8.7,1.083,-0.11]},{"time":1.1333,"value":-0.11,"curve":[1.151,-0.11,1.175,-1.16]},{"time":1.2,"value":-2.55,"curve":[1.247,-5.01,1.301,-8.7]},{"time":1.3333,"value":-8.7,"curve":[1.383,-8.7,1.483,-0.11]},{"time":1.5333,"value":-0.11,"curve":[1.551,-0.11,1.575,-1.16]},{"time":1.6,"value":-2.55}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone11":{"rotate":[{"value":9.57,"curve":[0.017,9.57,0.05,22.14]},{"time":0.0667,"value":22.14,"curve":[0.083,22.14,0.117,-4.2]},{"time":0.1333,"value":-4.2,"curve":[0.158,-4.2,0.208,20.64]},{"time":0.2333,"value":20.64,"curve":[0.25,20.64,0.283,-1.27]},{"time":0.3,"value":-1.27,"curve":[0.338,5.24,0.372,9.57]},{"time":0.4,"value":9.57,"curve":[0.45,9.57,0.55,1.84]},{"time":0.6,"value":1.84,"curve":[0.65,1.84,0.75,9.57]},{"time":0.8,"value":9.57,"curve":[0.85,9.57,0.95,1.84]},{"time":1,"value":1.84,"curve":[1.05,1.84,1.15,9.57]},{"time":1.2,"value":9.57,"curve":[1.25,9.57,1.35,1.84]},{"time":1.4,"value":1.84,"curve":[1.45,1.84,1.55,9.57]},{"time":1.6,"value":9.57}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone12":{"rotate":[{"value":7.38,"curve":[0.017,7.38,0.05,-6.53]},{"time":0.0667,"value":-6.53,"curve":[0.083,-6.53,0.117,20.31]},{"time":0.1333,"value":20.31,"curve":[0.15,20.31,0.183,1.96]},{"time":0.2,"value":1.96,"curve":[0.225,1.96,0.275,31.3]},{"time":0.3,"value":31.3,"curve":[0.325,31.3,0.375,7.38]},{"time":0.4,"value":7.38,"curve":[0.425,8.63,0.449,9.57]},{"time":0.4667,"value":9.57,"curve":[0.517,9.57,0.617,1.84]},{"time":0.6667,"value":1.84,"curve":[0.699,1.84,0.753,5.16]},{"time":0.8,"value":7.38,"curve":[0.825,8.63,0.849,9.57]},{"time":0.8667,"value":9.57,"curve":[0.917,9.57,1.017,1.84]},{"time":1.0667,"value":1.84,"curve":[1.099,1.84,1.153,5.16]},{"time":1.2,"value":7.38,"curve":[1.225,8.63,1.249,9.57]},{"time":1.2667,"value":9.57,"curve":[1.317,9.57,1.417,1.84]},{"time":1.4667,"value":1.84,"curve":[1.499,1.84,1.553,5.16]},{"time":1.6,"value":7.38}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone13":{"rotate":[{"value":4.03,"curve":[0.017,4.03,0.05,-34.14]},{"time":0.0667,"value":-34.14,"curve":[0.083,-34.14,0.117,32.11]},{"time":0.1333,"value":32.11,"curve":[0.15,32.11,0.183,-28.57]},{"time":0.2,"value":-28.57,"curve":[0.225,-28.57,0.275,13.75]},{"time":0.3,"value":13.75,"curve":[0.325,13.75,0.375,4.03]},{"time":0.4,"value":4.03,"curve":[0.447,6.25,0.501,9.57]},{"time":0.5333,"value":9.57,"curve":[0.583,9.57,0.683,1.84]},{"time":0.7333,"value":1.84,"curve":[0.751,1.84,0.775,2.78]},{"time":0.8,"value":4.03,"curve":[0.847,6.25,0.901,9.57]},{"time":0.9333,"value":9.57,"curve":[0.983,9.57,1.083,1.84]},{"time":1.1333,"value":1.84,"curve":[1.151,1.84,1.175,2.78]},{"time":1.2,"value":4.03,"curve":[1.247,6.25,1.301,9.57]},{"time":1.3333,"value":9.57,"curve":[1.383,9.57,1.483,1.84]},{"time":1.5333,"value":1.84,"curve":[1.551,1.84,1.575,2.78]},{"time":1.6,"value":4.03}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone24":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":[0.05,0,0.15,1.7,0.05,0,0.15,-1.71]},{"time":0.2,"x":1.7,"y":-1.71,"curve":[0.25,1.7,0.35,0,0.25,-1.71,0.35,0]},{"time":0.4,"curve":[0.45,0,0.55,1.7,0.45,0,0.55,-1.71]},{"time":0.6,"x":1.7,"y":-1.71,"curve":[0.65,1.7,0.75,0,0.65,-1.71,0.75,0]},{"time":0.8,"curve":[0.85,0,0.95,1.7,0.85,0,0.95,-1.71]},{"time":1,"x":1.7,"y":-1.71,"curve":[1.05,1.7,1.15,0,1.05,-1.71,1.15,0]},{"time":1.2,"curve":[1.25,0,1.35,1.7,1.25,0,1.35,-1.71]},{"time":1.4,"x":1.7,"y":-1.71,"curve":[1.45,1.7,1.55,0,1.45,-1.71,1.55,0]},{"time":1.6}]},"Layer_1":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":0.45,"y":0.45,"curve":[0.042,0.45,0.125,-0.41,0.042,0.45,0.125,-1.02]},{"time":0.1667,"x":-0.41,"y":-1.02,"curve":"stepped"},{"time":0.7667,"x":-0.41,"y":-1.02,"curve":[0.808,-0.41,0.892,0.45,0.808,-1.02,0.892,0.45]},{"time":0.9333,"x":0.45,"y":0.45,"curve":"stepped"},{"time":1.6,"x":0.45,"y":0.45}]},"Layer_2":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":4.31,"y":2.04,"curve":[0.042,4.31,0.125,-2.86,0.042,2.04,0.125,-3.47]},{"time":0.1667,"x":-2.86,"y":-3.47,"curve":"stepped"},{"time":0.7667,"x":-2.86,"y":-3.47,"curve":[0.808,-2.86,0.892,4.31,0.808,-3.47,0.892,2.04]},{"time":0.9333,"x":4.31,"y":2.04,"curve":"stepped"},{"time":1.6,"x":4.31,"y":2.04}]},"Layer_3":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":7.94,"y":4.31,"curve":[0.042,7.94,0.125,-4.89,0.042,4.31,0.125,-4.83]},{"time":0.1667,"x":-4.89,"y":-4.83,"curve":"stepped"},{"time":0.7667,"x":-4.89,"y":-4.83,"curve":[0.808,-4.89,0.892,7.94,0.808,-4.83,0.892,4.31]},{"time":0.9333,"x":7.94,"y":4.31,"curve":"stepped"},{"time":1.6,"x":7.94,"y":4.31}]},"Layer_4":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"x":12.26,"y":6.58,"curve":[0.042,12.26,0.125,-12.1,0.042,6.58,0.125,-12.43]},{"time":0.1667,"x":-12.1,"y":-12.43,"curve":"stepped"},{"time":0.7667,"x":-12.1,"y":-12.43,"curve":[0.808,-12.1,0.892,12.26,0.808,-12.43,0.892,6.58]},{"time":0.9333,"x":12.26,"y":6.58,"curve":"stepped"},{"time":1.6,"x":12.26,"y":6.58}]},"Neck":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":1.6}]},"EYE_2":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":1.6}]},"EYE_1":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone25":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":1.6}]},"bone23":{"rotate":[{"curve":"stepped"},{"time":1.6}],"translate":[{"curve":"stepped"},{"time":1.6}]}}}}} \ No newline at end of file +{ +"skeleton": { + "hash": "CVqfdLVihO4", + "spine": "4.1.19", + "x": -69.21, + "y": 5.46, + "width": 100.54, + "height": 92.54, + "images": "../images/", + "audio": "" +}, +"bones": [ + { "name": "root" }, + { "name": "C", "parent": "root", "x": -0.01, "y": -7.48 }, + { "name": "Layer_2", "parent": "C", "x": 38.35, "y": 14.27 }, + { "name": "EYES", "parent": "Layer_2", "x": -63.66, "y": 51.75 }, + { "name": "EYE_1", "parent": "EYES", "rotation": -178.24, "x": 5.95, "y": 8.9 }, + { "name": "EYE_2", "parent": "EYES", "rotation": -43.03, "x": -8.25, "y": -4.87 }, + { "name": "Layer_1", "parent": "C", "x": 33.07, "y": 6.45 }, + { "name": "Layer_3", "parent": "C", "x": 42.54, "y": 21.37 }, + { "name": "Layer_4", "parent": "C", "x": 48.18, "y": 28.29 }, + { "name": "Neck", "parent": "C", "length": 12.55, "rotation": 136.52, "x": 19.73, "y": 22.92 }, + { "name": "Nose", "parent": "Layer_4", "x": -62.79, "y": 32.68 }, + { "name": "bone10", "parent": "Layer_3", "x": -57.77, "y": -6.76, "color": "ff00e5ff" }, + { "name": "bone", "parent": "bone10", "x": 6.47, "y": 22.75, "color": "ff00ccff" }, + { "name": "bone2", "parent": "bone10", "x": -15.13, "y": 13.76, "color": "ff00ccff" }, + { "name": "bone3", "parent": "bone10", "x": -23.11, "y": 35.95, "color": "ff00ccff" }, + { "name": "bone4", "parent": "bone10", "x": -3.68, "y": 47.84, "color": "ff00ccff" }, + { "name": "bone5", "parent": "bone10", "x": 9.37, "y": 63.5, "color": "ff00ccff" }, + { "name": "bone6", "parent": "bone10", "x": 33.01, "y": 50.88, "color": "ff00ccff" }, + { "name": "bone7", "parent": "bone10", "x": 19.38, "y": 33.34, "color": "ff00ccff" }, + { "name": "bone8", "parent": "bone10", "x": 4.15, "y": 38.7, "color": "ff00ccff" }, + { "name": "bone23", "parent": "Layer_1", "x": -55.2, "y": 57.07, "color": "9c8b00ff" }, + { "name": "bone24", "parent": "bone23", "x": -13.12, "y": 12.55, "color": "ffe100ff" }, + { + "name": "bone11", + "parent": "bone24", + "length": 9.36, + "rotation": 163.81, + "x": -3.68, + "y": -8.68, + "color": "ffe900ff" + }, + { "name": "bone12", "parent": "bone11", "length": 10.64, "rotation": -47.94, "x": 9.36, "color": "ffe900ff" }, + { "name": "bone13", "parent": "bone12", "length": 10.87, "rotation": 18.05, "x": 10.64, "color": "ffe900ff" }, + { + "name": "bone14", + "parent": "bone24", + "length": 11.33, + "rotation": 106.35, + "x": 14.59, + "y": 3.07, + "color": "ffe900ff" + }, + { "name": "bone15", "parent": "bone14", "length": 11.56, "rotation": 56.13, "x": 11.33, "color": "ffe900ff" }, + { "name": "bone16", "parent": "bone15", "length": 10.5, "rotation": -17.92, "x": 11.56, "color": "ffe900ff" }, + { "name": "bone21", "parent": "bone23", "x": -12.21, "y": -25.41, "color": "ffee00ff" }, + { "name": "bone17", "parent": "bone21", "x": -14.63, "y": -8.91, "color": "ffee00ff" }, + { "name": "bone18", "parent": "bone21", "x": 1.21, "y": -14.96, "color": "ffee00ff" }, + { "name": "bone22", "parent": "bone23", "x": 24.53, "y": 5.28, "color": "ffee00ff" }, + { "name": "bone19", "parent": "bone22", "x": 18.04, "y": -3.41, "color": "ffee00ff" }, + { "name": "bone20", "parent": "bone22", "x": 14.41, "y": 13.97, "color": "ffee00ff" }, + { "name": "bone25", "parent": "bone23", "x": 18.11, "y": -21.61, "color": "ffe100ff" }, + { "name": "tooth", "parent": "Layer_2", "length": 17.85, "rotation": -43.03, "x": -43.34, "y": 30.93 } +], +"slots": [ + { "name": "Squirrel_1", "bone": "C", "attachment": "Squirrel_1" }, + { "name": "Squirrel_2", "bone": "C", "attachment": "Squirrel_2" }, + { "name": "Squirrel_3", "bone": "C", "attachment": "Squirrel_3" }, + { "name": "Squirrel_4", "bone": "C", "attachment": "Squirrel_4" }, + { "name": "Squirrel_7", "bone": "EYE_1", "attachment": "Squirrel_7" }, + { "name": "Squirrel_8", "bone": "EYE_2", "attachment": "Squirrel_7" }, + { "name": "Squirrel_9", "bone": "C" }, + { "name": "Squirrel_5", "bone": "C", "attachment": "Squirrel_5" }, + { "name": "Squirrel_6", "bone": "C", "attachment": "Squirrel_6" } +], +"skins": [ + { + "name": "default", + "attachments": { + "Squirrel_1": { + "Squirrel_1": { + "type": "mesh", + "uvs": [ 0, 0.63345, 0.59785, 1, 1, 0.63345, 0.60192, 0, 0.56321, 0.55851 ], + "triangles": [ 4, 0, 3, 4, 3, 2, 1, 4, 2, 0, 4, 1 ], + "vertices": [ 1, 9, 35.52, 22.69, 1, 1, 9, 0.17, 13.92, 1, 1, 9, -2.93, -13.78, 1, 1, 9, 33.73, -21.79, 1, 1, 9, 16.39, -0.52, 1 ], + "hull": 4, + "edges": [ 0, 2, 2, 4, 4, 6, 0, 6 ], + "width": 53, + "height": 49 + } + }, + "Squirrel_2": { + "Squirrel_2": { + "type": "mesh", + "uvs": [ 0.40202, 1, 0.60487, 0.92314, 0.92692, 0.66591, 1, 0.5259, 1, 0.36798, 0.97939, 0.20029, 0.89859, 0.15487, 0.73891, 0.2186, 0.60782, 0.14641, 0.57138, 0.05353, 0.3668, 0.0444, 0.25112, 0, 0.14123, 0.02097, 0.13363, 0.12183, 0.27254, 0.24123, 0.26658, 0.2483, 0.11019, 0.11821, 0.04246, 0.10521, 0, 0.13467, 0, 0.26649, 0.07564, 0.37251, 0.1113, 0.5389, 0.20018, 0.59701, 0.20487, 0.65255, 0.12383, 0.87689, 0.14676, 0.94437, 0.20884, 0.87598, 0.38872, 0.94861, 0.57608, 0.84631, 0.81966, 0.65911, 0.95082, 0.46167, 0.90585, 0.25094, 0.74846, 0.31845, 0.51613, 0.23252, 0.50335, 0.13706, 0.33566, 0.1299, 0.24104, 0.04397, 0.26727, 0.14627, 0.3291, 0.15445, 0.39655, 0.23731, 0.36376, 0.24652, 0.286, 0.37133, 0.15485, 0.29051, 0.12768, 0.20049, 0.0265, 0.20049, 0.12674, 0.30381, 0.18483, 0.47874, 0.26633, 0.4859, 0.28319, 0.70992, 0.25808, 0.42382, 0.21205, 0.40423, 0.17552, 0.35547, 0.24267, 0.34463, 0.19027, 0.31137, 0.15679, 0.38966, 0.31594, 0.4422, 0.45644, 0.23421, 0.45897, 0.27972, 0.4337, 0.18317, 0.38949, 0.16179, 0.37651, 0.21278, 0.50969, 0.1844, 0.41411, 0.12973, 0.35579, 0.18638, 0.76322, 0.49018, 0.39805, 0.81685, 0.53834, 0.73349, 0.50843, 0.49694 ], + "triangles": [ 49, 50, 52, 41, 49, 52, 57, 55, 41, 49, 41, 55, 46, 50, 49, 47, 49, 55, 46, 49, 47, 55, 57, 67, 22, 46, 47, 21, 46, 22, 67, 48, 47, 67, 47, 55, 48, 22, 47, 53, 42, 15, 52, 53, 15, 51, 42, 53, 51, 53, 52, 45, 42, 51, 54, 20, 45, 51, 54, 45, 50, 51, 52, 54, 51, 50, 46, 54, 50, 21, 20, 54, 21, 54, 46, 44, 18, 17, 44, 17, 16, 15, 43, 16, 44, 16, 43, 19, 18, 44, 42, 43, 15, 45, 44, 43, 45, 43, 42, 19, 44, 45, 20, 19, 45, 34, 9, 8, 61, 34, 8, 33, 61, 8, 56, 61, 33, 57, 56, 33, 33, 8, 7, 32, 33, 7, 39, 56, 57, 67, 57, 33, 67, 33, 32, 34, 62, 10, 35, 10, 62, 9, 34, 10, 59, 35, 62, 38, 35, 59, 58, 62, 34, 59, 62, 58, 58, 34, 61, 63, 38, 59, 60, 63, 59, 60, 59, 58, 56, 58, 61, 39, 60, 58, 56, 39, 58, 40, 63, 60, 36, 12, 11, 36, 11, 10, 13, 12, 36, 35, 36, 10, 37, 36, 35, 13, 36, 37, 38, 37, 35, 14, 37, 38, 14, 38, 63, 14, 13, 37, 26, 23, 48, 24, 23, 26, 25, 24, 26, 25, 26, 27, 27, 26, 65, 27, 65, 28, 27, 28, 1, 0, 27, 1, 0, 25, 27, 30, 31, 4, 30, 4, 3, 29, 64, 30, 2, 29, 30, 3, 2, 30, 31, 6, 5, 7, 6, 31, 32, 7, 31, 31, 5, 4, 32, 31, 30, 48, 23, 22, 48, 67, 66, 65, 48, 66, 65, 66, 28, 26, 48, 65, 64, 32, 30, 67, 32, 64, 66, 67, 64, 40, 60, 39, 14, 63, 40, 40, 15, 14, 41, 15, 40, 52, 15, 41, 40, 39, 57, 57, 41, 40, 66, 64, 29, 28, 66, 29, 1, 28, 29, 1, 29, 2 ], + "vertices": [ 2, 34, -27, -23.42, 0.01042, 30, 2.12, -4.66, 0.98958, 3, 34, -7.73, -16.74, 0.51602, 28, 22.6, -12.94, 0.16513, 30, 21.39, 2.02, 0.31885, 3, 34, 22.87, 5.64, 0.33132, 31, 16.45, -21.25, 0.11922, 32, -1.59, -17.84, 0.54946, 3, 34, 29.81, 17.82, 0.05644, 31, 23.39, -9.07, 0.00138, 32, 5.35, -5.66, 0.94218, 2, 33, 8.98, -9.3, 0.41129, 32, 5.35, 8.08, 0.58871, 1, 33, 7.03, 5.29, 1, 3, 31, 13.76, 23.21, 0.00788, 33, -0.65, 9.24, 0.98541, 25, 2, -38.95, 0.00671, 4, 31, -1.41, 17.67, 0.37121, 33, -15.82, 3.7, 0.30688, 26, -24.75, -4.1, 8.8E-4, 25, 0.95, -22.83, 0.32103, 4, 31, -13.86, 23.95, 0.10248, 33, -28.27, 9.98, 0.03195, 26, -10.98, -6.34, 0.18602, 25, 10.48, -12.65, 0.67954, 4, 31, -17.32, 32.03, 0.0188, 33, -31.73, 18.06, 0.00553, 26, -5.25, -13, 0.51291, 25, 19.21, -11.6, 0.46276, 2, 27, 4.31, -6.92, 0.63707, 26, 13.53, -7.91, 0.36293, 1, 27, 15.5, -3.69, 1, 1, 27, 22.95, 3.85, 1, 4, 21, -21.26, 18.82, 0.00955, 27, 18.45, 11.41, 0.98437, 24, 13.78, -7.77, 5.9E-4, 23, 26.15, -3.12, 0.00548, 6, 21, -8.07, 8.43, 0.31128, 27, 1.67, 12.22, 0.29629, 26, 16.91, 11.12, 0.09895, 24, -2.86, -10.08, 0.1112, 23, 11.04, -10.46, 0.17974, 22, 8.99, -15.21, 0.00255, 6, 21, -8.63, 7.82, 0.30496, 27, 1.78, 13.05, 0.21883, 26, 17.26, 11.87, 0.07372, 24, -2.91, -9.24, 0.16277, 23, 10.73, -9.69, 0.23054, 22, 9.36, -14.46, 0.00919, 1, 24, 15.55, -6.39, 1, 1, 24, 20.83, -2.54, 1, 1, 24, 21.78, 2.14, 1, 5, 21, -33.96, 6.24, 0, 27, 21.49, 29.03, 0, 26, 40.94, 21.01, 0, 24, 13.52, 10.1, 0.93335, 23, 20.36, 13.79, 0.06664, 8, 21, -26.77, -2.99, 2.0E-5, 28, -27.68, 34.97, 0.00247, 29, -13.05, 43.88, 3.9E-4, 27, 10.29, 32.38, 1.0E-5, 26, 31.3, 27.64, 0, 24, 1.89, 11.32, 0.39919, 23, 8.92, 11.35, 0.54041, 22, 23.77, 0.98, 0.05751, 8, 21, -23.38, -17.46, 0, 28, -24.29, 20.49, 0.07843, 29, -9.66, 29.4, 0.02, 27, -0.87, 42.21, 0, 26, 23.72, 40.43, 0, 24, -10.89, 18.92, 0.0051, 23, -5.58, 14.62, 0.37675, 22, 16.48, 13.93, 0.51971, 5, 31, -52.59, -15.25, 1.0E-5, 28, -15.85, 15.44, 0.23977, 29, -1.22, 24.35, 0.07939, 23, -13.81, 9.22, 0.10544, 22, 6.96, 16.43, 0.57539, 4, 28, -15.4, 10.61, 0.36532, 29, -0.77, 19.52, 0.18678, 23, -18.35, 10.93, 0.03797, 22, 5.18, 20.95, 0.40994, 2, 29, -8.47, 0, 0.99945, 22, 7.13, 41.84, 5.5E-4, 1, 29, -6.29, -5.87, 1, 1, 29, -0.4, 0.08, 1, 1, 30, 0.85, -0.19, 1, 5, 34, -10.46, -10.05, 0.62543, 28, 19.86, -6.25, 0.15778, 30, 18.65, 8.71, 0.21516, 25, -47.1, 7.38, 2.2E-4, 22, -33.38, 27.31, 0.00141, 5, 34, 12.68, 6.24, 0.55445, 31, 6.26, -20.65, 0.14411, 32, -11.78, -17.24, 0.30127, 25, -37.99, -19.41, 9.0E-5, 22, -51.07, 5.21, 8.0E-5, 1, 32, 0.68, -0.07, 1, 1, 33, 0.04, 0.89, 1, 4, 31, -0.5, 8.98, 0.48943, 33, -14.91, -4.99, 0.29036, 32, -18.54, 12.39, 0.005, 25, -7.65, -21.26, 0.21521, 1, 25, 5.74, -2.18, 1, 4, 31, -23.79, 24.76, 0.02482, 33, -38.2, 10.79, 0.00714, 26, -1.27, -4.13, 0.43439, 25, 14.05, -3.36, 0.53366, 2, 27, 2.4, 0.86, 0.80699, 26, 14.11, 0.08, 0.19301, 4, 21, -11.06, 25.59, 0.00235, 27, 14.06, -0.02, 0.99602, 24, 11.58, -19.82, 1.2E-4, 23, 27.79, -15.26, 0.00151, 4, 21, -8.57, 16.69, 0.05661, 27, 6.87, 5.78, 0.91336, 24, 3.44, -15.45, 0.00947, 23, 18.69, -13.62, 0.02056, 5, 21, -2.69, 15.98, 0.17372, 27, 1.67, 2.96, 0.51083, 26, 14.06, 2.3, 0.26383, 24, -1.15, -19.18, 0.01745, 23, 15.49, -18.59, 0.03418, 6, 21, 3.72, 8.77, 0.46955, 27, -7.73, 5.11, 0.09082, 26, 5.78, 7.24, 0.2981, 25, 8.54, 8.83, 0.11384, 24, -10.78, -18.8, 0.00783, 23, 6.21, -21.21, 0.01987, 6, 21, 0.6, 7.97, 0.46955, 27, -5.66, 7.57, 0.09082, 26, 8.5, 8.95, 0.2981, 25, 8.65, 12.05, 0.11384, 24, -9.2, -16, 0.00783, 23, 6.85, -18.06, 0.01987, 3, 21, -6.79, -2.89, 0.61291, 23, 0.3, -6.68, 0.06448, 22, 4.6, -4.69, 0.32261, 2, 24, 1.81, 0.95, 0.5, 23, 12.06, 1.47, 0.5, 4, 21, -21.83, 11.98, 0.00417, 27, 14.94, 17.32, 0.00361, 26, 31.1, 11.88, 7.4E-4, 24, 9.24, -2.62, 0.99148, 5, 21, -31.44, 11.98, 0, 27, 22.77, 22.89, 0, 26, 40.26, 14.78, 0, 24, 15.91, 4.3, 0.99074, 23, 24.43, 9.02, 0.00926, 3, 24, 2.83, 3.68, 0.64861, 23, 12.18, 4.37, 0.35018, 22, 20.77, -6.12, 0.0012, 5, 28, -17.31, 25.73, 0.05713, 29, -2.68, 34.64, 0.01317, 24, -11.96, 10.26, 0.00649, 23, -3.92, 6.05, 0.39169, 22, 11.23, 6.96, 0.53152, 4, 28, -9.56, 25.1, 0.06051, 29, 5.07, 34.01, 0.0117, 23, -7.86, -0.65, 0.15309, 22, 3.62, 5.4, 0.7747, 6, 31, -44.7, -25.08, 8.4E-4, 28, -7.96, 5.61, 0.598, 29, 6.67, 14.52, 0.19567, 25, -27.89, 30.74, 8.7E-4, 23, -26.09, 6.41, 0.00257, 22, -3.35, 23.67, 0.20204, 1, 22, 5.88, 0.43, 1, 2, 23, 0.79, 0.89, 0.5, 22, 10.55, 0.01, 0.5, 1, 23, 6.12, 2.16, 1, 5, 21, -10.9, -0.56, 0.20503, 27, -1.23, 21.2, 0.01606, 26, 16.9, 20.55, 0.00607, 23, 4.18, -3.99, 0.50718, 22, 9.2, -5.78, 0.26566, 2, 24, -1.83, -0.21, 0.5, 23, 8.96, -0.77, 0.5, 5, 28, -19.97, 33.48, 0.00548, 29, -5.34, 42.39, 0.00111, 24, -4.53, 6.8, 0.10762, 23, 4.22, 5.06, 0.76764, 22, 15.95, 0.26, 0.11815, 1, 22, 0.15, 0.43, 1, 6, 21, 9.4, 9.04, 0.22928, 27, -12.21, 1.6, 5.3E-4, 26, 0.43, 5.27, 0.42114, 25, 7.2, 3.3, 0.34701, 24, -14.54, -23.08, 3.2E-4, 23, 3.97, -26.45, 0.00172, 4, 21, 9.64, 5.08, 0.32059, 28, 8.74, 43.04, 7.0E-5, 26, -0.99, 8.98, 0.06844, 25, 3.33, 4.18, 0.6109, 1, 26, 3.83, 1.69, 1, 1, 26, 8.39, 1.18, 1, 6, 21, 1.81, 10.91, 0.22003, 27, -4.94, 4.48, 0.18376, 26, 8.23, 5.78, 0.54358, 25, 11.12, 10.06, 0.03384, 24, -7.93, -18.91, 0.0057, 23, 8.96, -20.43, 0.01309, 4, 31, -23.19, 20.64, 0.03472, 33, -37.6, 6.67, 0.00889, 26, -3.09, -0.38, 0.17079, 25, 9.93, -2.78, 0.78561, 1, 26, 7, -2.18, 1, 6, 21, -0.16, 13.2, 0.22003, 27, -2.01, 3.75, 0.18376, 26, 10.8, 4.19, 0.54358, 25, 13.88, 11.3, 0.03384, 24, -4.91, -19.08, 0.0057, 23, 11.88, -19.66, 0.01309, 6, 34, 7.32, 20.93, 0.06867, 31, 0.9, -5.96, 0.79425, 28, 37.64, 24.73, 0.00115, 33, -13.51, -19.93, 0.00116, 32, -17.14, -2.55, 0.13325, 22, -41.82, -7.4, 0.00152, 5, 34, -27.38, -7.49, 0.07185, 31, -33.79, -34.38, 6.5E-4, 28, 2.95, -3.69, 0.69651, 30, 1.74, 11.27, 0.23004, 25, -39.88, 22.89, 9.6E-4, 7, 34, -14.05, -0.24, 0.34947, 21, 17.19, -34.39, 7.6E-4, 31, -20.46, -27.13, 0.02246, 28, 16.28, 3.56, 0.42946, 30, 15.07, 18.52, 0.12282, 25, -36.68, 8.06, 0.01847, 22, -27.2, 18.88, 0.05656, 6, 34, -16.89, 20.34, 0.13522, 21, 14.34, -13.81, 0.06948, 31, -23.31, -6.55, 0.13686, 28, 13.43, 24.14, 0.19265, 25, -16.13, 4.99, 0.19723, 22, -18.74, -0.09, 0.26856 ], + "hull": 26, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 46, 48, 48, 50, 0, 50, 42, 44, 44, 46, 52, 54, 54, 56, 56, 58, 58, 60, 60, 62, 62, 64, 64, 66, 70, 72, 72, 74, 74, 76, 78, 80, 80, 82, 84, 86, 86, 88, 88, 90, 92, 94, 94, 96, 96, 52, 82, 98, 98, 94, 98, 100, 100, 102, 82, 104, 104, 100, 100, 92, 84, 106, 106, 104, 102, 106, 90, 108, 108, 92, 102, 108, 98, 110, 112, 114, 112, 66, 112, 78, 112, 116, 116, 118, 120, 78, 120, 116, 66, 122, 122, 68, 116, 122, 68, 124, 124, 70, 118, 124, 76, 126, 126, 120, 118, 126 ], + "width": 95, + "height": 87 + } + }, + "Squirrel_3": { + "Squirrel_3": { + "type": "mesh", + "uvs": [ 0, 0.61229, 0.64285, 1, 1, 0.65634, 0.73535, 0 ], + "triangles": [ 0, 3, 2, 1, 0, 2 ], + "vertices": [ 1, 35, -3.85, -12.98, 1, 1, 35, 17.66, -7.76, 1, 1, 35, 18.92, 6.59, 1, 1, 35, 0.58, 14.61, 1 ], + "hull": 4, + "edges": [ 0, 2, 2, 4, 4, 6, 0, 6 ], + "width": 30, + "height": 28 + } + }, + "Squirrel_4": { + "Squirrel_4": { + "type": "mesh", + "uvs": [ 0.994, 0.61159, 0.607, 0.76275, 0.4665, 1, 0, 1, 0, 0.50434, 0.273, 0.338, 0.3855, 0, 1, 0, 0.4545, 0.53684 ], + "triangles": [ 8, 6, 7, 5, 6, 8, 0, 8, 7, 1, 8, 0, 8, 3, 4, 8, 4, 5, 2, 3, 8, 1, 2, 8 ], + "vertices": [ 1, 2, -42.01, 47.55, 1, 1, 2, -57.11, 42.11, 1, 1, 2, -62.58, 33.57, 1, 1, 2, -80.78, 33.57, 1, 1, 2, -80.78, 51.41, 1, 1, 2, -70.13, 57.4, 1, 1, 2, -65.74, 69.57, 1, 1, 2, -41.78, 69.57, 1, 1, 2, -63.05, 50.24, 1 ], + "hull": 8, + "edges": [ 2, 4, 4, 6, 2, 0, 0, 14, 10, 12, 12, 14, 6, 8, 8, 10 ], + "width": 39, + "height": 36 + } + }, + "Squirrel_5": { + "Squirrel_5": { + "type": "mesh", + "uvs": [ 0, 0.55767, 0.13333, 1, 0.53586, 0.84979, 0.59157, 0.6785, 0.77264, 0.62955, 1, 0.2732, 0.57904, 0, 0.32832, 0.30073, 0.47875, 0.51332 ], + "triangles": [ 8, 6, 5, 4, 8, 5, 1, 8, 2, 2, 8, 3, 3, 8, 4, 8, 7, 6, 0, 7, 8, 1, 0, 8 ], + "vertices": [ 1, 14, 0.21, -0.07, 1, 1, 13, -0.3, -0.44, 1, 1, 12, 0.64, -1.77, 1, 3, 19, 6.08, -8.99, 0.41136, 18, -9.15, -3.62, 0.23742, 12, 3.76, 6.96, 0.35121, 1, 18, 0.99, -1.13, 1, 1, 17, 0.1, -0.5, 1, 1, 16, 0.16, 0.82, 1, 1, 15, -0.83, 1.14, 1, 1, 19, -0.24, -0.56, 1 ], + "hull": 8, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 0, 14 ], + "width": 56, + "height": 51 + } + }, + "Squirrel_6": { + "Squirrel_6": { + "type": "mesh", + "uvs": [ 0.26694, 0.04421, 0, 0.71353, 0.63934, 1, 1, 0.79125, 0.94334, 0, 0.56714, 0.47603 ], + "triangles": [ 5, 0, 4, 1, 0, 5, 5, 4, 3, 2, 5, 3, 1, 5, 2 ], + "vertices": [ 1, 10, -8.37, 10.55, 1, 1, 10, -15.05, -4.18, 1, 1, 10, 0.94, -10.48, 1, 1, 10, 9.95, -5.89, 1, 1, 10, 8.54, 11.52, 1, 1, 10, -0.87, 1.05, 1 ], + "hull": 5, + "edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 0, 8 ], + "width": 25, + "height": 22 + } + }, + "Squirrel_7": { + "Squirrel_7": { "x": -0.3, "y": 0.17, "rotation": 43.03, "width": 8, "height": 6 } + }, + "Squirrel_8": { + "Squirrel_7": { "x": -0.3, "y": 0.17, "rotation": 43.03, "width": 8, "height": 6 } + }, + "Squirrel_9": { + "Squirrel_4": { + "type": "mesh", + "color": "210c00ff", + "uvs": [ 0.994, 0.61159, 0.607, 0.76275, 0.4665, 1, 0, 1, 0, 0.50434, 0.273, 0.338, 0.3855, 0, 1, 0, 0.4545, 0.53684 ], + "triangles": [ 8, 6, 7, 5, 6, 8, 0, 8, 7, 1, 8, 0, 8, 3, 4, 8, 4, 5, 2, 3, 8, 1, 2, 8 ], + "vertices": [ 1, 2, -42.01, 47.55, 1, 1, 2, -57.11, 42.11, 1, 1, 2, -62.58, 33.57, 1, 1, 2, -80.78, 33.57, 1, 1, 2, -80.78, 51.41, 1, 1, 2, -70.13, 57.4, 1, 1, 2, -65.74, 69.57, 1, 1, 2, -41.78, 69.57, 1, 1, 2, -63.05, 50.24, 1 ], + "hull": 8, + "edges": [ 2, 4, 4, 6, 2, 0, 0, 14, 10, 12, 12, 14, 6, 8, 8, 10 ], + "width": 39, + "height": 36 + } + } + } + } +], +"animations": { + "Idle": { + "slots": { + "Squirrel_1": { + "attachment": [ + { "name": "Squirrel_1" }, + { "time": 1.6, "name": "Squirrel_1" } + ] + }, + "Squirrel_2": { + "attachment": [ + { "name": "Squirrel_2" }, + { "time": 1.6, "name": "Squirrel_2" } + ] + }, + "Squirrel_3": { + "attachment": [ + { "name": "Squirrel_3" }, + { "time": 1.6, "name": "Squirrel_3" } + ] + }, + "Squirrel_4": { + "attachment": [ + { "name": "Squirrel_4" }, + { "time": 1.6, "name": "Squirrel_4" } + ] + }, + "Squirrel_5": { + "attachment": [ + { "name": "Squirrel_5" }, + { "time": 1.6, "name": "Squirrel_5" } + ] + }, + "Squirrel_6": { + "attachment": [ + { "name": "Squirrel_6" }, + { "time": 1.6, "name": "Squirrel_6" } + ] + }, + "Squirrel_7": { + "attachment": [ + { "name": "Squirrel_7" }, + { "time": 1.6, "name": "Squirrel_7" } + ] + }, + "Squirrel_8": { + "attachment": [ + { "name": "Squirrel_7" }, + { "time": 1.6, "name": "Squirrel_7" } + ] + }, + "Squirrel_9": { + "attachment": [ + {}, + { "time": 0.7667 }, + { "time": 0.8, "name": "Squirrel_4" }, + { "time": 0.8667 }, + { "time": 1.6 } + ] + } + }, + "bones": { + "bone21": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 2.55, + "y": 2.4, + "curve": [ 0.05, 2.55, 0.15, -3.9, 0.05, 2.4, 0.15, -4.4 ] + }, + { + "time": 0.2, + "x": -3.9, + "y": -4.4, + "curve": [ 0.25, -3.9, 0.35, 2.55, 0.25, -4.4, 0.35, 2.4 ] + }, + { + "time": 0.4, + "x": 2.55, + "y": 2.4, + "curve": [ 0.45, 2.55, 0.55, -3.9, 0.45, 2.4, 0.55, -4.4 ] + }, + { + "time": 0.6, + "x": -3.9, + "y": -4.4, + "curve": [ 0.65, -3.9, 0.75, 2.55, 0.65, -4.4, 0.75, 2.4 ] + }, + { + "time": 0.8, + "x": 2.55, + "y": 2.4, + "curve": [ 0.85, 2.55, 0.95, -3.9, 0.85, 2.4, 0.95, -4.4 ] + }, + { + "time": 1, + "x": -3.9, + "y": -4.4, + "curve": [ 1.05, -3.9, 1.15, 2.55, 1.05, -4.4, 1.15, 2.4 ] + }, + { + "time": 1.2, + "x": 2.55, + "y": 2.4, + "curve": [ 1.25, 2.55, 1.35, -3.9, 1.25, 2.4, 1.35, -4.4 ] + }, + { + "time": 1.4, + "x": -3.9, + "y": -4.4, + "curve": [ 1.45, -3.9, 1.55, 2.55, 1.45, -4.4, 1.55, 2.4 ] + }, + { "time": 1.6, "x": 2.55, "y": 2.4 } + ] + }, + "bone22": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -3, + "y": -2.85, + "curve": [ 0.05, -3, 0.15, 5.08, 0.05, -2.85, 0.15, 2.77 ] + }, + { + "time": 0.2, + "x": 5.08, + "y": 2.77, + "curve": [ 0.25, 5.08, 0.35, -3, 0.25, 2.77, 0.35, -2.85 ] + }, + { + "time": 0.4, + "x": -3, + "y": -2.85, + "curve": [ 0.45, -3, 0.55, 5.08, 0.45, -2.85, 0.55, 2.77 ] + }, + { + "time": 0.6, + "x": 5.08, + "y": 2.77, + "curve": [ 0.65, 5.08, 0.75, -3, 0.65, 2.77, 0.75, -2.85 ] + }, + { + "time": 0.8, + "x": -3, + "y": -2.85, + "curve": [ 0.85, -3, 0.95, 5.08, 0.85, -2.85, 0.95, 2.77 ] + }, + { + "time": 1, + "x": 5.08, + "y": 2.77, + "curve": [ 1.05, 5.08, 1.15, -3, 1.05, 2.77, 1.15, -2.85 ] + }, + { + "time": 1.2, + "x": -3, + "y": -2.85, + "curve": [ 1.25, -3, 1.35, 5.08, 1.25, -2.85, 1.35, 2.77 ] + }, + { + "time": 1.4, + "x": 5.08, + "y": 2.77, + "curve": [ 1.45, 5.08, 1.55, -3, 1.45, 2.77, 1.55, -2.85 ] + }, + { "time": 1.6, "x": -3, "y": -2.85 } + ] + }, + "bone18": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -1.87, + "y": -4.17, + "curve": [ 0.013, -2.22, 0.024, -2.47, 0.013, -4.95, 0.024, -5.5 ] + }, + { + "time": 0.0333, + "x": -2.47, + "y": -5.5, + "curve": [ 0.092, -2.47, 0.208, 0, 0.092, -5.5, 0.208, 0 ] + }, + { + "time": 0.2667, + "curve": [ 0.299, 0, 0.354, -1.17, 0.299, 0, 0.354, -2.61 ] + }, + { + "time": 0.4, + "x": -1.87, + "y": -4.17, + "curve": [ 0.413, -2.22, 0.424, -2.47, 0.413, -4.95, 0.424, -5.5 ] + }, + { + "time": 0.4333, + "x": -2.47, + "y": -5.5, + "curve": [ 0.492, -2.47, 0.608, 0, 0.492, -5.5, 0.608, 0 ] + }, + { + "time": 0.6667, + "curve": [ 0.708, 0, 0.792, -6.06, 0.708, 0, 0.792, -0.2 ] + }, + { + "time": 0.8333, + "x": -6.06, + "y": -0.2, + "curve": [ 0.883, -6.06, 0.983, 0, 0.883, -0.2, 0.983, 0 ] + }, + { + "time": 1.0333, + "curve": [ 1.092, 0, 1.208, -8.96, 1.092, 0, 1.208, -11.49 ] + }, + { + "time": 1.2667, + "x": -8.96, + "y": -11.49, + "curve": [ 1.317, -8.96, 1.417, 0, 1.317, -11.49, 1.417, 0 ] + }, + { + "time": 1.4667, + "curve": [ 1.499, 0, 1.554, -1.17, 1.499, 0, 1.554, -2.61 ] + }, + { "time": 1.6, "x": -1.87, "y": -4.17 } + ] + }, + "bone17": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -0.14, + "y": 1.29, + "curve": [ 0.013, -0.17, 0.024, -0.19, 0.013, 1.54, 0.024, 1.71 ] + }, + { + "time": 0.0333, + "x": -0.19, + "y": 1.71, + "curve": [ 0.092, -0.19, 0.208, 0, 0.092, 1.71, 0.208, 0 ] + }, + { + "time": 0.2667, + "curve": [ 0.299, 0, 0.354, -0.09, 0.299, 0, 0.354, 0.81 ] + }, + { + "time": 0.4, + "x": -0.14, + "y": 1.29, + "curve": [ 0.413, -0.17, 0.424, -0.19, 0.413, 1.54, 0.424, 1.71 ] + }, + { + "time": 0.4333, + "x": -0.19, + "y": 1.71, + "curve": [ 0.492, -0.19, 0.608, 0, 0.492, 1.71, 0.608, 0 ] + }, + { + "time": 0.6667, + "curve": [ 0.708, 0, 0.792, 2.2, 0.708, 0, 0.792, 0.85 ] + }, + { + "time": 0.8333, + "x": 2.2, + "y": 0.85, + "curve": [ 0.883, 2.2, 0.983, 0, 0.883, 0.85, 0.983, 0 ] + }, + { + "time": 1.0333, + "curve": [ 1.092, 0, 1.208, -9.29, 1.092, 0, 1.208, 1.19 ] + }, + { + "time": 1.2667, + "x": -9.29, + "y": 1.19, + "curve": [ 1.317, -9.29, 1.417, 0, 1.317, 1.19, 1.417, 0 ] + }, + { + "time": 1.4667, + "curve": [ 1.499, 0, 1.554, -0.09, 1.499, 0, 1.554, 0.81 ] + }, + { "time": 1.6, "x": -0.14, "y": 1.29 } + ] + }, + "bone19": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 5.61, + "y": -1.29, + "curve": [ 0.013, 6.65, 0.024, 7.4, 0.013, -1.54, 0.024, -1.71 ] + }, + { + "time": 0.0333, + "x": 7.4, + "y": -1.71, + "curve": [ 0.083, 7.4, 0.183, 0, 0.083, -1.71, 0.183, 0 ] + }, + { + "time": 0.2333, + "curve": [ 0.292, 0, 0.408, 17.3, 0.292, 0, 0.408, -0.29 ] + }, + { + "time": 0.4667, + "x": 17.3, + "y": -0.29, + "curve": [ 0.517, 17.3, 0.617, 0, 0.517, -0.29, 0.617, 0 ] + }, + { + "time": 0.6667, + "curve": [ 0.699, 0, 0.754, 3.5, 0.699, 0, 0.754, -0.81 ] + }, + { + "time": 0.8, + "x": 5.61, + "y": -1.29, + "curve": [ 0.813, 6.65, 0.824, 7.4, 0.813, -1.54, 0.824, -1.71 ] + }, + { + "time": 0.8333, + "x": 7.4, + "y": -1.71, + "curve": [ 0.892, 7.4, 1.008, 0, 0.892, -1.71, 1.008, 0 ] + }, + { + "time": 1.0667, + "curve": [ 1.108, 0, 1.192, 4.32, 1.108, 0, 1.192, 3.08 ] + }, + { + "time": 1.2333, + "x": 4.32, + "y": 3.08, + "curve": [ 1.292, 4.32, 1.408, 0, 1.292, 3.08, 1.408, 0 ] + }, + { + "time": 1.4667, + "curve": [ 1.499, 0, 1.554, 3.5, 1.499, 0, 1.554, -0.81 ] + }, + { "time": 1.6, "x": 5.61, "y": -1.29 } + ] + }, + "bone20": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -0.86, + "y": 0.72, + "curve": [ 0.013, -1.02, 0.024, -1.14, 0.013, 0.85, 0.024, 0.95 ] + }, + { + "time": 0.0333, + "x": -1.14, + "y": 0.95, + "curve": [ 0.083, -1.14, 0.183, 0, 0.083, 0.95, 0.183, 0 ] + }, + { + "time": 0.2333, + "curve": [ 0.292, 0, 0.408, 0.28, 0.292, 0, 0.408, 9.03 ] + }, + { + "time": 0.4667, + "x": 0.28, + "y": 9.03, + "curve": [ 0.517, 0.28, 0.617, 0, 0.517, 9.03, 0.617, 0 ] + }, + { + "time": 0.6667, + "curve": [ 0.699, 0, 0.754, -0.54, 0.699, 0, 0.754, 0.45 ] + }, + { + "time": 0.8, + "x": -0.86, + "y": 0.72, + "curve": [ 0.813, -1.02, 0.824, -1.14, 0.813, 0.85, 0.824, 0.95 ] + }, + { + "time": 0.8333, + "x": -1.14, + "y": 0.95, + "curve": [ 0.892, -1.14, 1.008, 0, 0.892, 0.95, 1.008, 0 ] + }, + { + "time": 1.0667, + "curve": [ 1.108, 0, 1.192, -1.65, 1.108, 0, 1.192, -0.25 ] + }, + { + "time": 1.2333, + "x": -1.65, + "y": -0.25, + "curve": [ 1.292, -1.65, 1.408, 0, 1.292, -0.25, 1.408, 0 ] + }, + { + "time": 1.4667, + "curve": [ 1.499, 0, 1.554, -0.54, 1.499, 0, 1.554, 0.45 ] + }, + { "time": 1.6, "x": -0.86, "y": 0.72 } + ] + }, + "bone10": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -2.54, + "y": 2.75, + "curve": [ 0.05, -2.54, 0.15, 1.62, 0.05, 2.75, 0.15, -2.63 ] + }, + { + "time": 0.2, + "x": 1.62, + "y": -2.63, + "curve": [ 0.25, 1.62, 0.35, -2.54, 0.25, -2.63, 0.35, 2.75 ] + }, + { + "time": 0.4, + "x": -2.54, + "y": 2.75, + "curve": [ 0.45, -2.54, 0.55, 1.62, 0.45, 2.75, 0.55, -2.63 ] + }, + { + "time": 0.6, + "x": 1.62, + "y": -2.63, + "curve": [ 0.65, 1.62, 0.75, -2.54, 0.65, -2.63, 0.75, 2.75 ] + }, + { + "time": 0.8, + "x": -2.54, + "y": 2.75, + "curve": [ 0.85, -2.54, 0.95, 1.62, 0.85, 2.75, 0.95, -2.63 ] + }, + { + "time": 1, + "x": 1.62, + "y": -2.63, + "curve": [ 1.05, 1.62, 1.15, -2.54, 1.05, -2.63, 1.15, 2.75 ] + }, + { + "time": 1.2, + "x": -2.54, + "y": 2.75, + "curve": [ 1.25, -2.54, 1.35, 1.62, 1.25, 2.75, 1.35, -2.63 ] + }, + { + "time": 1.4, + "x": 1.62, + "y": -2.63, + "curve": [ 1.45, 1.62, 1.55, -2.54, 1.45, -2.63, 1.55, 2.75 ] + }, + { "time": 1.6, "x": -2.54, "y": 2.75 } + ] + }, + "tooth": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -4.71, + "y": 4.06, + "curve": [ 0.053, -2.73, 0.126, 2.23, 0.053, 2.26, 0.126, -2.23 ] + }, + { + "time": 0.1667, + "x": 2.23, + "y": -2.23, + "curve": [ 0.217, 2.23, 0.317, -5.75, 0.217, -2.23, 0.317, 5 ] + }, + { + "time": 0.3667, + "x": -5.75, + "y": 5, + "curve": [ 0.376, -5.75, 0.388, -5.35, 0.376, 5, 0.388, 4.64 ] + }, + { + "time": 0.4, + "x": -4.71, + "y": 4.06, + "curve": [ 0.453, -2.73, 0.526, 2.23, 0.453, 2.26, 0.526, -2.23 ] + }, + { + "time": 0.5667, + "x": 2.23, + "y": -2.23, + "curve": [ 0.617, 2.23, 0.717, -5.75, 0.617, -2.23, 0.717, 5 ] + }, + { + "time": 0.7667, + "x": -5.75, + "y": 5, + "curve": [ 0.776, -5.75, 0.788, -5.35, 0.776, 5, 0.788, 4.64 ] + }, + { + "time": 0.8, + "x": -4.71, + "y": 4.06, + "curve": [ 0.853, -2.73, 0.926, 2.23, 0.853, 2.26, 0.926, -2.23 ] + }, + { + "time": 0.9667, + "x": 2.23, + "y": -2.23, + "curve": [ 1.017, 2.23, 1.117, -5.75, 1.017, -2.23, 1.117, 5 ] + }, + { + "time": 1.1667, + "x": -5.75, + "y": 5, + "curve": [ 1.176, -5.75, 1.188, -5.35, 1.176, 5, 1.188, 4.64 ] + }, + { + "time": 1.2, + "x": -4.71, + "y": 4.06, + "curve": [ 1.253, -2.73, 1.326, 2.23, 1.253, 2.26, 1.326, -2.23 ] + }, + { + "time": 1.3667, + "x": 2.23, + "y": -2.23, + "curve": [ 1.417, 2.23, 1.517, -5.75, 1.417, -2.23, 1.517, 5 ] + }, + { + "time": 1.5667, + "x": -5.75, + "y": 5, + "curve": [ 1.576, -5.75, 1.588, -5.35, 1.576, 5, 1.588, 4.64 ] + }, + { "time": 1.6, "x": -4.71, "y": 4.06 } + ] + }, + "bone8": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 0.2, "curve": "stepped" }, + { "time": 0.4, "curve": "stepped" }, + { "time": 0.6, "curve": "stepped" }, + { "time": 0.8, "curve": "stepped" }, + { "time": 1, "curve": "stepped" }, + { "time": 1.2, "curve": "stepped" }, + { "time": 1.4, "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone7": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 0.2, "curve": "stepped" }, + { "time": 0.4, "curve": "stepped" }, + { "time": 0.6, "curve": "stepped" }, + { "time": 0.8, "curve": "stepped" }, + { "time": 1, "curve": "stepped" }, + { "time": 1.2, "curve": "stepped" }, + { "time": 1.4, "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone6": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -1.58, + "y": 2.11, + "curve": [ 0.05, -1.58, 0.15, 0, 0.05, 2.11, 0.15, 0 ] + }, + { + "time": 0.2, + "curve": [ 0.25, 0, 0.35, -1.58, 0.25, 0, 0.35, 2.11 ] + }, + { + "time": 0.4, + "x": -1.58, + "y": 2.11, + "curve": [ 0.45, -1.58, 0.55, 0, 0.45, 2.11, 0.55, 0 ] + }, + { + "time": 0.6, + "curve": [ 0.65, 0, 0.75, -1.58, 0.65, 0, 0.75, 2.11 ] + }, + { + "time": 0.8, + "x": -1.58, + "y": 2.11, + "curve": [ 0.85, -1.58, 0.95, 0, 0.85, 2.11, 0.95, 0 ] + }, + { + "time": 1, + "curve": [ 1.05, 0, 1.15, -1.58, 1.05, 0, 1.15, 2.11 ] + }, + { + "time": 1.2, + "x": -1.58, + "y": 2.11, + "curve": [ 1.25, -1.58, 1.35, 0, 1.25, 2.11, 1.35, 0 ] + }, + { + "time": 1.4, + "curve": [ 1.45, 0, 1.55, -1.58, 1.45, 0, 1.55, 2.11 ] + }, + { "time": 1.6, "x": -1.58, "y": 2.11 } + ] + }, + "bone5": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 6.86, + "y": 0.7, + "curve": [ 0.05, 6.86, 0.15, 0, 0.05, 0.7, 0.15, 0 ] + }, + { + "time": 0.2, + "curve": [ 0.25, 0, 0.35, 6.86, 0.25, 0, 0.35, 0.7 ] + }, + { + "time": 0.4, + "x": 6.86, + "y": 0.7, + "curve": [ 0.45, 6.86, 0.55, 0, 0.45, 0.7, 0.55, 0 ] + }, + { + "time": 0.6, + "curve": [ 0.65, 0, 0.75, 6.86, 0.65, 0, 0.75, 0.7 ] + }, + { + "time": 0.8, + "x": 6.86, + "y": 0.7, + "curve": [ 0.85, 6.86, 0.95, 0, 0.85, 0.7, 0.95, 0 ] + }, + { + "time": 1, + "curve": [ 1.05, 0, 1.15, 6.86, 1.05, 0, 1.15, 0.7 ] + }, + { + "time": 1.2, + "x": 6.86, + "y": 0.7, + "curve": [ 1.25, 6.86, 1.35, 0, 1.25, 0.7, 1.35, 0 ] + }, + { + "time": 1.4, + "curve": [ 1.45, 0, 1.55, 6.86, 1.45, 0, 1.55, 0.7 ] + }, + { "time": 1.6, "x": 6.86, "y": 0.7 } + ] + }, + "bone4": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 0.2, "curve": "stepped" }, + { "time": 0.4, "curve": "stepped" }, + { "time": 0.6, "curve": "stepped" }, + { "time": 0.8, "curve": "stepped" }, + { "time": 1, "curve": "stepped" }, + { "time": 1.2, "curve": "stepped" }, + { "time": 1.4, "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone3": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -2.64, + "y": -4.4, + "curve": [ 0.05, -2.64, 0.15, 0, 0.05, -4.4, 0.15, 0 ] + }, + { + "time": 0.2, + "curve": [ 0.25, 0, 0.35, -2.64, 0.25, 0, 0.35, -4.4 ] + }, + { + "time": 0.4, + "x": -2.64, + "y": -4.4, + "curve": [ 0.45, -2.64, 0.55, 0, 0.45, -4.4, 0.55, 0 ] + }, + { + "time": 0.6, + "curve": [ 0.65, 0, 0.75, -2.64, 0.65, 0, 0.75, -4.4 ] + }, + { + "time": 0.8, + "x": -2.64, + "y": -4.4, + "curve": [ 0.85, -2.64, 0.95, 0, 0.85, -4.4, 0.95, 0 ] + }, + { + "time": 1, + "curve": [ 1.05, 0, 1.15, -2.64, 1.05, 0, 1.15, -4.4 ] + }, + { + "time": 1.2, + "x": -2.64, + "y": -4.4, + "curve": [ 1.25, -2.64, 1.35, 0, 1.25, -4.4, 1.35, 0 ] + }, + { + "time": 1.4, + "curve": [ 1.45, 0, 1.55, -2.64, 1.45, 0, 1.55, -4.4 ] + }, + { "time": 1.6, "x": -2.64, "y": -4.4 } + ] + }, + "bone2": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -4.75, + "y": 1.06, + "curve": [ 0.05, -4.75, 0.15, 0, 0.05, 1.06, 0.15, 0 ] + }, + { + "time": 0.2, + "curve": [ 0.25, 0, 0.35, -4.75, 0.25, 0, 0.35, 1.06 ] + }, + { + "time": 0.4, + "x": -4.75, + "y": 1.06, + "curve": [ 0.45, -4.75, 0.55, 0, 0.45, 1.06, 0.55, 0 ] + }, + { + "time": 0.6, + "curve": [ 0.65, 0, 0.75, -4.75, 0.65, 0, 0.75, 1.06 ] + }, + { + "time": 0.8, + "x": -4.75, + "y": 1.06, + "curve": [ 0.85, -4.75, 0.95, 0, 0.85, 1.06, 0.95, 0 ] + }, + { + "time": 1, + "curve": [ 1.05, 0, 1.15, -4.75, 1.05, 0, 1.15, 1.06 ] + }, + { + "time": 1.2, + "x": -4.75, + "y": 1.06, + "curve": [ 1.25, -4.75, 1.35, 0, 1.25, 1.06, 1.35, 0 ] + }, + { + "time": 1.4, + "curve": [ 1.45, 0, 1.55, -4.75, 1.45, 0, 1.55, 1.06 ] + }, + { "time": 1.6, "x": -4.75, "y": 1.06 } + ] + }, + "bone": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 0.2, "curve": "stepped" }, + { "time": 0.4, "curve": "stepped" }, + { "time": 0.6, "curve": "stepped" }, + { "time": 0.8, "curve": "stepped" }, + { "time": 1, "curve": "stepped" }, + { "time": 1.2, "curve": "stepped" }, + { "time": 1.4, "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "Nose": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": -4.59, + "y": 2.75, + "curve": [ 0.05, -4.59, 0.15, -1.07, 0.05, 2.75, 0.15, -2.45 ] + }, + { + "time": 0.2, + "x": -1.07, + "y": -2.45, + "curve": [ 0.25, -1.07, 0.35, -4.59, 0.25, -2.45, 0.35, 2.75 ] + }, + { + "time": 0.4, + "x": -4.59, + "y": 2.75, + "curve": [ 0.45, -4.59, 0.55, -1.07, 0.45, 2.75, 0.55, -2.45 ] + }, + { + "time": 0.6, + "x": -1.07, + "y": -2.45, + "curve": [ 0.65, -1.07, 0.75, -4.59, 0.65, -2.45, 0.75, 2.75 ] + }, + { + "time": 0.8, + "x": -4.59, + "y": 2.75, + "curve": [ 0.85, -4.59, 0.95, -1.07, 0.85, 2.75, 0.95, -2.45 ] + }, + { + "time": 1, + "x": -1.07, + "y": -2.45, + "curve": [ 1.05, -1.07, 1.15, -4.59, 1.05, -2.45, 1.15, 2.75 ] + }, + { + "time": 1.2, + "x": -4.59, + "y": 2.75, + "curve": [ 1.25, -4.59, 1.35, -1.07, 1.25, 2.75, 1.35, -2.45 ] + }, + { + "time": 1.4, + "x": -1.07, + "y": -2.45, + "curve": [ 1.45, -1.07, 1.55, -4.59, 1.45, -2.45, 1.55, 2.75 ] + }, + { "time": 1.6, "x": -4.59, "y": 2.75 } + ] + }, + "EYES": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 3.78, + "y": 2.52, + "curve": [ 0.017, 3.78, 0.05, -3.36, 0.017, 2.52, 0.05, -2.31 ] + }, + { "time": 0.0667, "x": -3.36, "y": -2.31, "curve": "stepped" }, + { + "time": 0.8333, + "x": -3.36, + "y": -2.31, + "curve": [ 0.85, -3.36, 0.883, 3.78, 0.85, -2.31, 0.883, 2.52 ] + }, + { "time": 0.9, "x": 3.78, "y": 2.52, "curve": "stepped" }, + { "time": 1.6, "x": 3.78, "y": 2.52 } + ] + }, + "C": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 2.45, + "y": 1.63, + "curve": [ 0.042, 2.45, 0.125, 0.27, 0.042, 1.63, 0.125, 0 ] + }, + { "time": 0.1667, "x": 0.27, "curve": "stepped" }, + { + "time": 0.7667, + "x": 0.27, + "curve": [ 0.808, 0.27, 0.892, 2.45, 0.808, 0, 0.892, 1.63 ] + }, + { "time": 0.9333, "x": 2.45, "y": 1.63, "curve": "stepped" }, + { "time": 1.6, "x": 2.45, "y": 1.63 } + ] + }, + "bone14": { + "rotate": [ + { + "value": -8.7, + "curve": [ 0.05, -8.7, 0.15, -0.11 ] + }, + { + "time": 0.2, + "value": -0.11, + "curve": [ 0.25, -0.11, 0.35, -8.7 ] + }, + { + "time": 0.4, + "value": -8.7, + "curve": [ 0.45, -8.7, 0.55, -0.11 ] + }, + { + "time": 0.6, + "value": -0.11, + "curve": [ 0.65, -0.11, 0.75, -8.7 ] + }, + { + "time": 0.8, + "value": -8.7, + "curve": [ 0.85, -8.7, 0.95, -0.11 ] + }, + { + "time": 1, + "value": -0.11, + "curve": [ 1.05, -0.11, 1.15, -8.7 ] + }, + { + "time": 1.2, + "value": -8.7, + "curve": [ 1.25, -8.7, 1.35, -0.11 ] + }, + { + "time": 1.4, + "value": -0.11, + "curve": [ 1.45, -0.11, 1.55, -8.7 ] + }, + { "time": 1.6, "value": -8.7 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone15": { + "rotate": [ + { + "value": -6.26, + "curve": [ 0.025, -7.65, 0.049, -8.7 ] + }, + { + "time": 0.0667, + "value": -8.7, + "curve": [ 0.1, -8.7, 0.167, -0.11 ] + }, + { "time": 0.2, "value": -0.11, "curve": "stepped" }, + { + "time": 0.2667, + "value": -0.11, + "curve": [ 0.299, -0.11, 0.353, -3.8 ] + }, + { + "time": 0.4, + "value": -6.26, + "curve": [ 0.425, -7.65, 0.449, -8.7 ] + }, + { + "time": 0.4667, + "value": -8.7, + "curve": [ 0.517, -8.7, 0.617, -0.11 ] + }, + { + "time": 0.6667, + "value": -0.11, + "curve": [ 0.699, -0.11, 0.753, -3.8 ] + }, + { + "time": 0.8, + "value": -6.26, + "curve": [ 0.825, -7.65, 0.849, -8.7 ] + }, + { + "time": 0.8667, + "value": -8.7, + "curve": [ 0.917, -8.7, 1.017, -0.11 ] + }, + { + "time": 1.0667, + "value": -0.11, + "curve": [ 1.099, -0.11, 1.153, -3.8 ] + }, + { + "time": 1.2, + "value": -6.26, + "curve": [ 1.225, -7.65, 1.249, -8.7 ] + }, + { + "time": 1.2667, + "value": -8.7, + "curve": [ 1.317, -8.7, 1.417, -0.11 ] + }, + { + "time": 1.4667, + "value": -0.11, + "curve": [ 1.499, -0.11, 1.553, -3.8 ] + }, + { "time": 1.6, "value": -6.26 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone16": { + "rotate": [ + { + "value": -2.55, + "curve": [ 0.047, -5.01, 0.101, -8.7 ] + }, + { + "time": 0.1333, + "value": -8.7, + "curve": [ 0.15, -8.7, 0.183, -0.11 ] + }, + { "time": 0.2, "value": -0.11, "curve": "stepped" }, + { + "time": 0.3333, + "value": -0.11, + "curve": [ 0.351, -0.11, 0.375, -1.16 ] + }, + { + "time": 0.4, + "value": -2.55, + "curve": [ 0.447, -5.01, 0.501, -8.7 ] + }, + { + "time": 0.5333, + "value": -8.7, + "curve": [ 0.583, -8.7, 0.683, -0.11 ] + }, + { + "time": 0.7333, + "value": -0.11, + "curve": [ 0.751, -0.11, 0.775, -1.16 ] + }, + { + "time": 0.8, + "value": -2.55, + "curve": [ 0.847, -5.01, 0.901, -8.7 ] + }, + { + "time": 0.9333, + "value": -8.7, + "curve": [ 0.983, -8.7, 1.083, -0.11 ] + }, + { + "time": 1.1333, + "value": -0.11, + "curve": [ 1.151, -0.11, 1.175, -1.16 ] + }, + { + "time": 1.2, + "value": -2.55, + "curve": [ 1.247, -5.01, 1.301, -8.7 ] + }, + { + "time": 1.3333, + "value": -8.7, + "curve": [ 1.383, -8.7, 1.483, -0.11 ] + }, + { + "time": 1.5333, + "value": -0.11, + "curve": [ 1.551, -0.11, 1.575, -1.16 ] + }, + { "time": 1.6, "value": -2.55 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone11": { + "rotate": [ + { + "value": 9.57, + "curve": [ 0.017, 9.57, 0.05, 22.14 ] + }, + { + "time": 0.0667, + "value": 22.14, + "curve": [ 0.083, 22.14, 0.117, -4.2 ] + }, + { + "time": 0.1333, + "value": -4.2, + "curve": [ 0.158, -4.2, 0.208, 20.64 ] + }, + { + "time": 0.2333, + "value": 20.64, + "curve": [ 0.25, 20.64, 0.283, -1.27 ] + }, + { + "time": 0.3, + "value": -1.27, + "curve": [ 0.338, 5.24, 0.372, 9.57 ] + }, + { + "time": 0.4, + "value": 9.57, + "curve": [ 0.45, 9.57, 0.55, 1.84 ] + }, + { + "time": 0.6, + "value": 1.84, + "curve": [ 0.65, 1.84, 0.75, 9.57 ] + }, + { + "time": 0.8, + "value": 9.57, + "curve": [ 0.85, 9.57, 0.95, 1.84 ] + }, + { + "time": 1, + "value": 1.84, + "curve": [ 1.05, 1.84, 1.15, 9.57 ] + }, + { + "time": 1.2, + "value": 9.57, + "curve": [ 1.25, 9.57, 1.35, 1.84 ] + }, + { + "time": 1.4, + "value": 1.84, + "curve": [ 1.45, 1.84, 1.55, 9.57 ] + }, + { "time": 1.6, "value": 9.57 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone12": { + "rotate": [ + { + "value": 7.38, + "curve": [ 0.017, 7.38, 0.05, -6.53 ] + }, + { + "time": 0.0667, + "value": -6.53, + "curve": [ 0.083, -6.53, 0.117, 20.31 ] + }, + { + "time": 0.1333, + "value": 20.31, + "curve": [ 0.15, 20.31, 0.183, 1.96 ] + }, + { + "time": 0.2, + "value": 1.96, + "curve": [ 0.225, 1.96, 0.275, 31.3 ] + }, + { + "time": 0.3, + "value": 31.3, + "curve": [ 0.325, 31.3, 0.375, 7.38 ] + }, + { + "time": 0.4, + "value": 7.38, + "curve": [ 0.425, 8.63, 0.449, 9.57 ] + }, + { + "time": 0.4667, + "value": 9.57, + "curve": [ 0.517, 9.57, 0.617, 1.84 ] + }, + { + "time": 0.6667, + "value": 1.84, + "curve": [ 0.699, 1.84, 0.753, 5.16 ] + }, + { + "time": 0.8, + "value": 7.38, + "curve": [ 0.825, 8.63, 0.849, 9.57 ] + }, + { + "time": 0.8667, + "value": 9.57, + "curve": [ 0.917, 9.57, 1.017, 1.84 ] + }, + { + "time": 1.0667, + "value": 1.84, + "curve": [ 1.099, 1.84, 1.153, 5.16 ] + }, + { + "time": 1.2, + "value": 7.38, + "curve": [ 1.225, 8.63, 1.249, 9.57 ] + }, + { + "time": 1.2667, + "value": 9.57, + "curve": [ 1.317, 9.57, 1.417, 1.84 ] + }, + { + "time": 1.4667, + "value": 1.84, + "curve": [ 1.499, 1.84, 1.553, 5.16 ] + }, + { "time": 1.6, "value": 7.38 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone13": { + "rotate": [ + { + "value": 4.03, + "curve": [ 0.017, 4.03, 0.05, -34.14 ] + }, + { + "time": 0.0667, + "value": -34.14, + "curve": [ 0.083, -34.14, 0.117, 32.11 ] + }, + { + "time": 0.1333, + "value": 32.11, + "curve": [ 0.15, 32.11, 0.183, -28.57 ] + }, + { + "time": 0.2, + "value": -28.57, + "curve": [ 0.225, -28.57, 0.275, 13.75 ] + }, + { + "time": 0.3, + "value": 13.75, + "curve": [ 0.325, 13.75, 0.375, 4.03 ] + }, + { + "time": 0.4, + "value": 4.03, + "curve": [ 0.447, 6.25, 0.501, 9.57 ] + }, + { + "time": 0.5333, + "value": 9.57, + "curve": [ 0.583, 9.57, 0.683, 1.84 ] + }, + { + "time": 0.7333, + "value": 1.84, + "curve": [ 0.751, 1.84, 0.775, 2.78 ] + }, + { + "time": 0.8, + "value": 4.03, + "curve": [ 0.847, 6.25, 0.901, 9.57 ] + }, + { + "time": 0.9333, + "value": 9.57, + "curve": [ 0.983, 9.57, 1.083, 1.84 ] + }, + { + "time": 1.1333, + "value": 1.84, + "curve": [ 1.151, 1.84, 1.175, 2.78 ] + }, + { + "time": 1.2, + "value": 4.03, + "curve": [ 1.247, 6.25, 1.301, 9.57 ] + }, + { + "time": 1.3333, + "value": 9.57, + "curve": [ 1.383, 9.57, 1.483, 1.84 ] + }, + { + "time": 1.5333, + "value": 1.84, + "curve": [ 1.551, 1.84, 1.575, 2.78 ] + }, + { "time": 1.6, "value": 4.03 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone24": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "curve": [ 0.05, 0, 0.15, 1.7, 0.05, 0, 0.15, -1.71 ] + }, + { + "time": 0.2, + "x": 1.7, + "y": -1.71, + "curve": [ 0.25, 1.7, 0.35, 0, 0.25, -1.71, 0.35, 0 ] + }, + { + "time": 0.4, + "curve": [ 0.45, 0, 0.55, 1.7, 0.45, 0, 0.55, -1.71 ] + }, + { + "time": 0.6, + "x": 1.7, + "y": -1.71, + "curve": [ 0.65, 1.7, 0.75, 0, 0.65, -1.71, 0.75, 0 ] + }, + { + "time": 0.8, + "curve": [ 0.85, 0, 0.95, 1.7, 0.85, 0, 0.95, -1.71 ] + }, + { + "time": 1, + "x": 1.7, + "y": -1.71, + "curve": [ 1.05, 1.7, 1.15, 0, 1.05, -1.71, 1.15, 0 ] + }, + { + "time": 1.2, + "curve": [ 1.25, 0, 1.35, 1.7, 1.25, 0, 1.35, -1.71 ] + }, + { + "time": 1.4, + "x": 1.7, + "y": -1.71, + "curve": [ 1.45, 1.7, 1.55, 0, 1.45, -1.71, 1.55, 0 ] + }, + { "time": 1.6 } + ] + }, + "Layer_1": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 0.45, + "y": 0.45, + "curve": [ 0.042, 0.45, 0.125, -0.41, 0.042, 0.45, 0.125, -1.02 ] + }, + { "time": 0.1667, "x": -0.41, "y": -1.02, "curve": "stepped" }, + { + "time": 0.7667, + "x": -0.41, + "y": -1.02, + "curve": [ 0.808, -0.41, 0.892, 0.45, 0.808, -1.02, 0.892, 0.45 ] + }, + { "time": 0.9333, "x": 0.45, "y": 0.45, "curve": "stepped" }, + { "time": 1.6, "x": 0.45, "y": 0.45 } + ] + }, + "Layer_2": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 4.31, + "y": 2.04, + "curve": [ 0.042, 4.31, 0.125, -2.86, 0.042, 2.04, 0.125, -3.47 ] + }, + { "time": 0.1667, "x": -2.86, "y": -3.47, "curve": "stepped" }, + { + "time": 0.7667, + "x": -2.86, + "y": -3.47, + "curve": [ 0.808, -2.86, 0.892, 4.31, 0.808, -3.47, 0.892, 2.04 ] + }, + { "time": 0.9333, "x": 4.31, "y": 2.04, "curve": "stepped" }, + { "time": 1.6, "x": 4.31, "y": 2.04 } + ] + }, + "Layer_3": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 7.94, + "y": 4.31, + "curve": [ 0.042, 7.94, 0.125, -4.89, 0.042, 4.31, 0.125, -4.83 ] + }, + { "time": 0.1667, "x": -4.89, "y": -4.83, "curve": "stepped" }, + { + "time": 0.7667, + "x": -4.89, + "y": -4.83, + "curve": [ 0.808, -4.89, 0.892, 7.94, 0.808, -4.83, 0.892, 4.31 ] + }, + { "time": 0.9333, "x": 7.94, "y": 4.31, "curve": "stepped" }, + { "time": 1.6, "x": 7.94, "y": 4.31 } + ] + }, + "Layer_4": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { + "x": 12.26, + "y": 6.58, + "curve": [ 0.042, 12.26, 0.125, -12.1, 0.042, 6.58, 0.125, -12.43 ] + }, + { "time": 0.1667, "x": -12.1, "y": -12.43, "curve": "stepped" }, + { + "time": 0.7667, + "x": -12.1, + "y": -12.43, + "curve": [ 0.808, -12.1, 0.892, 12.26, 0.808, -12.43, 0.892, 6.58 ] + }, + { "time": 0.9333, "x": 12.26, "y": 6.58, "curve": "stepped" }, + { "time": 1.6, "x": 12.26, "y": 6.58 } + ] + }, + "Neck": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "EYE_2": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "EYE_1": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone25": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + }, + "bone23": { + "rotate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ], + "translate": [ + { "curve": "stepped" }, + { "time": 1.6 } + ] + } + } + } +} +} \ No newline at end of file diff --git a/defold-spine/commonsrc/spine/Animation.c b/defold-spine/commonsrc/spine/Animation.c index 4288205..dfbf8de 100644 --- a/defold-spine/commonsrc/spine/Animation.c +++ b/defold-spine/commonsrc/spine/Animation.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -655,8 +655,8 @@ void _spScaleTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float la bone->scaleY = by + (ABS(y) * SIGNUM(by) - by) * alpha; break; case SP_MIX_BLEND_ADD: - bone->scaleX = (x - bone->data->scaleX) * alpha; - bone->scaleY = (y - bone->data->scaleY) * alpha; + bone->scaleX += (x - bone->data->scaleX) * alpha; + bone->scaleY += (y - bone->data->scaleY) * alpha; } } else { switch (blend) { @@ -748,7 +748,7 @@ void _spScaleXTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float l bone->scaleX = bx + (ABS(x) * SIGNUM(bx) - bx) * alpha; break; case SP_MIX_BLEND_ADD: - bone->scaleX = (x - bone->data->scaleX) * alpha; + bone->scaleX += (x - bone->data->scaleX) * alpha; } } else { switch (blend) { @@ -834,7 +834,7 @@ void _spScaleYTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float l bone->scaleY = by + (ABS(y) * SIGNUM(by) - by) * alpha; break; case SP_MIX_BLEND_ADD: - bone->scaleY = (y - bone->data->scaleY) * alpha; + bone->scaleY += (y - bone->data->scaleY) * alpha; } } else { switch (blend) { @@ -1756,7 +1756,7 @@ void _spDeformTimeline_apply( spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha, spMixBlend blend, spMixDirection direction) { int frame, i, vertexCount; - float percent, frameTime; + float percent; const float *prevVertices; const float *nextVertices; float *frames; @@ -1775,7 +1775,7 @@ void _spDeformTimeline_apply( case SP_ATTACHMENT_MESH: case SP_ATTACHMENT_PATH: { spVertexAttachment *vertexAttachment = SUB_CAST(spVertexAttachment, slot->attachment); - if (vertexAttachment->deformAttachment != SUB_CAST(spVertexAttachment, self->attachment)) return; + if (vertexAttachment->timelineAttachment != self->attachment) return; break; } default: @@ -1870,6 +1870,7 @@ void _spDeformTimeline_apply( /* Vertex positions or deform offsets, with alpha. */ for (i = 0; i < vertexCount; i++) deformArray[i] += (lastVertices[i] - deformArray[i]) * alpha; + break; case SP_MIX_BLEND_ADD: vertexAttachment = SUB_CAST(spVertexAttachment, slot->attachment); if (!vertexAttachment->bones) { @@ -1892,7 +1893,6 @@ void _spDeformTimeline_apply( percent = _spDeformTimeline_getCurvePercent(self, time, frame); prevVertices = frameVertices[frame]; nextVertices = frameVertices[frame + 1]; - frameTime = frames[frame]; if (alpha == 1) { if (blend == SP_MIX_BLEND_ADD) { @@ -2000,6 +2000,120 @@ void spDeformTimeline_setFrame(spDeformTimeline *self, int frame, float time, fl /**/ +static const int SEQUENCE_ENTRIES = 3, MODE = 1, DELAY = 2; + +void _spSequenceTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, + int *eventsCount, float alpha, spMixBlend blend, spMixDirection direction) { + spSequenceTimeline *self = (spSequenceTimeline *) timeline; + spSlot *slot = skeleton->slots[self->slotIndex]; + spAttachment *slotAttachment; + float *frames; + int i, modeAndIndex, count, index, mode; + float before, delay; + spSequence *sequence = NULL; + + if (!slot->bone->active) return; + + slotAttachment = slot->attachment; + if (slotAttachment != self->attachment) { + if (slotAttachment == NULL) return; + switch (slotAttachment->type) { + case SP_ATTACHMENT_BOUNDING_BOX: + case SP_ATTACHMENT_CLIPPING: + case SP_ATTACHMENT_MESH: + case SP_ATTACHMENT_PATH: { + spVertexAttachment *vertexAttachment = SUB_CAST(spVertexAttachment, slot->attachment); + if (vertexAttachment->timelineAttachment != self->attachment) return; + break; + } + default: + return; + } + } + + frames = self->super.frames->items; + if (time < frames[0]) { /* Time is before first frame. */ + if (blend == SP_MIX_BLEND_SETUP || blend == SP_MIX_BLEND_FIRST) slot->sequenceIndex = -1; + return; + } + + i = search2(self->super.frames, time, SEQUENCE_ENTRIES); + before = frames[i]; + modeAndIndex = (int) frames[i + MODE]; + delay = frames[i + DELAY]; + + if (self->attachment->type == SP_ATTACHMENT_REGION) sequence = ((spRegionAttachment *) self->attachment)->sequence; + if (self->attachment->type == SP_ATTACHMENT_MESH) sequence = ((spMeshAttachment *) self->attachment)->sequence; + if (!sequence) return; + index = modeAndIndex >> 4; + count = sequence->regions->size; + mode = modeAndIndex & 0xf; + if (mode != SP_SEQUENCE_MODE_HOLD) { + index += (int) (((time - before) / delay + 0.00001)); + switch (mode) { + case SP_SEQUENCE_MODE_ONCE: + index = MIN(count - 1, index); + break; + case SP_SEQUENCE_MODE_LOOP: + index %= count; + break; + case SP_SEQUENCE_MODE_PINGPONG: { + int n = (count << 1) - 2; + index = n == 0 ? 0 : index % n; + if (index >= count) index = n - index; + break; + } + case SP_SEQUENCE_MODE_ONCEREVERSE: + index = MAX(count - 1 - index, 0); + break; + case SP_SEQUENCE_MODE_LOOPREVERSE: + index = count - 1 - (index % count); + break; + case SP_SEQUENCE_MODE_PINGPONGREVERSE: { + int n = (count << 1) - 2; + index = n == 0 ? 0 : (index + count - 1) % n; + if (index >= count) index = n - index; + } + } + } + slot->sequenceIndex = index; + + UNUSED(lastTime); + UNUSED(firedEvents); + UNUSED(eventsCount); + UNUSED(alpha); + UNUSED(direction); +} + +void _spSequenceTimeline_dispose(spTimeline *timeline) { + /* NO-OP */ + UNUSED(timeline); +} + +spSequenceTimeline *spSequenceTimeline_create(int framesCount, int slotIndex, spAttachment *attachment) { + int sequenceId = 0; + spSequenceTimeline *self = NEW(spSequenceTimeline); + spPropertyId ids[1]; + if (attachment->type == SP_ATTACHMENT_REGION) sequenceId = ((spRegionAttachment *) attachment)->sequence->id; + if (attachment->type == SP_ATTACHMENT_MESH) sequenceId = ((spMeshAttachment *) attachment)->sequence->id; + ids[0] = (spPropertyId) SP_PROPERTY_SEQUENCE << 32 | ((slotIndex << 16 | sequenceId) & 0xffffffff); + _spTimeline_init(SUPER(self), framesCount, SEQUENCE_ENTRIES, ids, 1, SP_TIMELINE_SEQUENCE, _spSequenceTimeline_dispose, + _spSequenceTimeline_apply, 0); + self->slotIndex = slotIndex; + self->attachment = attachment; + return self; +} + +void spSequenceTimeline_setFrame(spSequenceTimeline *self, int frame, float time, int mode, int index, float delay) { + float *frames = self->super.frames->items; + frame *= SEQUENCE_ENTRIES; + frames[frame] = time; + frames[frame + MODE] = mode | (index << 4); + frames[frame + DELAY] = delay; +} + +/**/ + /** Fires events for frames > lastTime and <= time. */ void _spEventTimeline_apply(spTimeline *timeline, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha, spMixBlend blend, spMixDirection direction) { @@ -2384,7 +2498,7 @@ void spTransformConstraintTimeline_setFrame(spTransformConstraintTimeline *self, frames[frame] = time; frames[frame + TRANSFORMCONSTRAINT_ROTATE] = mixRotate; frames[frame + TRANSFORMCONSTRAINT_X] = mixX; - frames[frame + TRANSFORMCONSTRAINT_X] = mixY; + frames[frame + TRANSFORMCONSTRAINT_Y] = mixY; frames[frame + TRANSFORMCONSTRAINT_SCALEX] = mixScaleX; frames[frame + TRANSFORMCONSTRAINT_SCALEY] = mixScaleY; frames[frame + TRANSFORMCONSTRAINT_SHEARY] = mixShearY; diff --git a/defold-spine/commonsrc/spine/AnimationState.c b/defold-spine/commonsrc/spine/AnimationState.c index f15dfa3..23375ac 100644 --- a/defold-spine/commonsrc/spine/AnimationState.c +++ b/defold-spine/commonsrc/spine/AnimationState.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -374,7 +374,7 @@ int spAnimationState_apply(spAnimationState *self, spSkeleton *skeleton) { float animationLast, animationTime; int timelineCount; spTimeline **timelines; - int /*boolean*/ firstFrame; + int /*boolean*/ firstFrame, shortestRotation; float *timelinesRotation; spTimeline *timeline; int applied = 0; @@ -417,7 +417,7 @@ int spAnimationState_apply(spAnimationState *self, spSkeleton *skeleton) { if ((i == 0 && mix == 1) || blend == SP_MIX_BLEND_ADD) { for (ii = 0; ii < timelineCount; ii++) { timeline = timelines[ii]; - if (timeline->propertyIds[0] == SP_PROPERTY_ATTACHMENT) { + if (timeline->type == SP_TIMELINE_ATTACHMENT) { _spAnimationState_applyAttachmentTimeline(self, timeline, skeleton, applyTime, blend, -1); } else { spTimeline_apply(timelines[ii], skeleton, animationLast, applyTime, applyEvents, @@ -427,17 +427,18 @@ int spAnimationState_apply(spAnimationState *self, spSkeleton *skeleton) { } else { spIntArray *timelineMode = current->timelineMode; - firstFrame = current->timelinesRotationCount != timelineCount << 1; + shortestRotation = current->shortestRotation; + firstFrame = !shortestRotation && current->timelinesRotationCount != timelineCount << 1; if (firstFrame) _spAnimationState_resizeTimelinesRotation(current, timelineCount << 1); timelinesRotation = current->timelinesRotation; for (ii = 0; ii < timelineCount; ii++) { timeline = timelines[ii]; timelineBlend = timelineMode->items[ii] == SUBSEQUENT ? blend : SP_MIX_BLEND_SETUP; - if (timeline->propertyIds[0] == SP_PROPERTY_ROTATE) + if (!shortestRotation && timeline->type == SP_TIMELINE_ROTATE) _spAnimationState_applyRotateTimeline(self, timeline, skeleton, applyTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); - else if (timeline->propertyIds[0] == SP_PROPERTY_ATTACHMENT) + else if (timeline->type == SP_TIMELINE_ATTACHMENT) _spAnimationState_applyAttachmentTimeline(self, timeline, skeleton, applyTime, timelineBlend, -1); else spTimeline_apply(timeline, skeleton, animationLast, applyTime, applyEvents, &internal->eventsCount, @@ -481,7 +482,7 @@ float _spAnimationState_applyMixingFrom(spAnimationState *self, spTrackEntry *to float alphaHold; float alphaMix; float alpha; - int /*boolean*/ firstFrame; + int /*boolean*/ firstFrame, shortestRotation; float *timelinesRotation; int i; spTrackEntry *holdMix; @@ -525,7 +526,8 @@ float _spAnimationState_applyMixingFrom(spAnimationState *self, spTrackEntry *to timelineMode = from->timelineMode; timelineHoldMix = from->timelineHoldMix; - firstFrame = from->timelinesRotationCount != timelineCount << 1; + shortestRotation = from->shortestRotation; + firstFrame = !shortestRotation && from->timelinesRotationCount != timelineCount << 1; if (firstFrame) _spAnimationState_resizeTimelinesRotation(from, timelineCount << 1); timelinesRotation = from->timelinesRotation; @@ -536,7 +538,7 @@ float _spAnimationState_applyMixingFrom(spAnimationState *self, spTrackEntry *to switch (timelineMode->items[i]) { case SUBSEQUENT: - if (!drawOrder && timeline->propertyIds[0] == SP_PROPERTY_DRAWORDER) continue; + if (!drawOrder && timeline->type == SP_TIMELINE_DRAWORDER) continue; timelineBlend = blend; alpha = alphaMix; break; @@ -559,14 +561,14 @@ float _spAnimationState_applyMixingFrom(spAnimationState *self, spTrackEntry *to break; } from->totalAlpha += alpha; - if (timeline->propertyIds[0] == SP_PROPERTY_ROTATE) + if (!shortestRotation && timeline->type == SP_TIMELINE_ROTATE) _spAnimationState_applyRotateTimeline(self, timeline, skeleton, applyTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); - else if (timeline->propertyIds[0] == SP_PROPERTY_ATTACHMENT) + else if (timeline->type == SP_TIMELINE_ATTACHMENT) _spAnimationState_applyAttachmentTimeline(self, timeline, skeleton, applyTime, timelineBlend, attachments); else { - if (drawOrder && timeline->propertyIds[0] == SP_PROPERTY_DRAWORDER && + if (drawOrder && timeline->type == SP_TIMELINE_DRAWORDER && timelineBlend == SP_MIX_BLEND_SETUP) direction = SP_MIX_DIRECTION_IN; spTimeline_apply(timeline, skeleton, animationLast, applyTime, events, &internal->eventsCount, @@ -593,19 +595,11 @@ _spAnimationState_setAttachment(spAnimationState *self, spSkeleton *skeleton, sp /* @param target After the first and before the last entry. */ static int binarySearch1(float *values, int valuesLength, float target) { - int low = 0, current; - int high = valuesLength - 2; - if (high == 0) return 1; - current = high >> 1; - while (1) { - if (values[(current + 1)] <= target) - low = current + 1; - else - high = current; - if (low == high) return low + 1; - current = (low + high) >> 1; + int i; + for (i = 1; i < valuesLength; i++) { + if (values[i] > target) return (int) (i - 1); } - return 0; + return (int) valuesLength - 1; } void _spAnimationState_applyAttachmentTimeline(spAnimationState *self, spTimeline *timeline, spSkeleton *skeleton, @@ -908,6 +902,7 @@ _spAnimationState_trackEntry(spAnimationState *self, int trackIndex, spAnimation entry->loop = loop; entry->holdPrevious = 0; entry->reverse = 0; + entry->shortestRotation = 0; entry->previous = 0; entry->next = 0; @@ -928,9 +923,10 @@ _spAnimationState_trackEntry(spAnimationState *self, int trackIndex, spAnimation entry->timeScale = 1; entry->alpha = 1; - entry->interruptAlpha = 1; entry->mixTime = 0; entry->mixDuration = !last ? 0 : spAnimationStateData_getMix(self->data, last->animation, animation); + entry->interruptAlpha = 1; + entry->totalAlpha = 0; entry->mixBlend = SP_MIX_BLEND_REPLACE; entry->timelineMode = spIntArray_create(16); @@ -1079,9 +1075,9 @@ void _spTrackEntry_computeHold(spTrackEntry *entry, spAnimationState *state) { int numIds = timeline->propertyIdsCount; if (!_spAnimationState_addPropertyIDs(state, ids, numIds)) timelineMode[i] = SUBSEQUENT; - else if (to == 0 || timeline->propertyIds[0] == SP_PROPERTY_ATTACHMENT || - timeline->propertyIds[0] == SP_PROPERTY_DRAWORDER || - timeline->propertyIds[0] == SP_PROPERTY_EVENT || + else if (to == 0 || timeline->type == SP_TIMELINE_ATTACHMENT || + timeline->type == SP_TIMELINE_DRAWORDER || + timeline->type == SP_TIMELINE_EVENT || !spAnimation_hasTimeline(to->animation, ids, numIds)) { timelineMode[i] = FIRST; } else { diff --git a/defold-spine/commonsrc/spine/AnimationStateData.c b/defold-spine/commonsrc/spine/AnimationStateData.c index 462b6f2..0e9ae19 100644 --- a/defold-spine/commonsrc/spine/AnimationStateData.c +++ b/defold-spine/commonsrc/spine/AnimationStateData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/Array.c b/defold-spine/commonsrc/spine/Array.c index c9c1220..9aa6d42 100644 --- a/defold-spine/commonsrc/spine/Array.c +++ b/defold-spine/commonsrc/spine/Array.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/Atlas.c b/defold-spine/commonsrc/spine/Atlas.c index ea8b596..c71c321 100644 --- a/defold-spine/commonsrc/spine/Atlas.c +++ b/defold-spine/commonsrc/spine/Atlas.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -356,29 +356,29 @@ spAtlas *spAtlas_create(const char *begin, int length, const char *dir, void *re region->x = ss_toInt(&entry[1]); region->y = ss_toInt(&entry[2]); } else if (ss_equals(&entry[0], "size")) { - region->width = ss_toInt(&entry[1]); - region->height = ss_toInt(&entry[2]); + region->super.width = ss_toInt(&entry[1]); + region->super.height = ss_toInt(&entry[2]); } else if (ss_equals(&entry[0], "bounds")) { region->x = ss_toInt(&entry[1]); region->y = ss_toInt(&entry[2]); - region->width = ss_toInt(&entry[3]); - region->height = ss_toInt(&entry[4]); + region->super.width = ss_toInt(&entry[3]); + region->super.height = ss_toInt(&entry[4]); } else if (ss_equals(&entry[0], "offset")) { - region->offsetX = ss_toInt(&entry[1]); - region->offsetY = ss_toInt(&entry[2]); + region->super.offsetX = ss_toInt(&entry[1]); + region->super.offsetY = ss_toInt(&entry[2]); } else if (ss_equals(&entry[0], "orig")) { - region->originalWidth = ss_toInt(&entry[1]); - region->originalHeight = ss_toInt(&entry[2]); + region->super.originalWidth = ss_toInt(&entry[1]); + region->super.originalHeight = ss_toInt(&entry[2]); } else if (ss_equals(&entry[0], "offsets")) { - region->offsetX = ss_toInt(&entry[1]); - region->offsetY = ss_toInt(&entry[2]); - region->originalWidth = ss_toInt(&entry[3]); - region->originalHeight = ss_toInt(&entry[4]); + region->super.offsetX = ss_toInt(&entry[1]); + region->super.offsetY = ss_toInt(&entry[2]); + region->super.originalWidth = ss_toInt(&entry[3]); + region->super.originalHeight = ss_toInt(&entry[4]); } else if (ss_equals(&entry[0], "rotate")) { if (ss_equals(&entry[1], "true")) { - region->degrees = 90; + region->super.degrees = 90; } else if (!ss_equals(&entry[1], "false")) { - region->degrees = ss_toInt(&entry[1]); + region->super.degrees = ss_toInt(&entry[1]); } } else if (ss_equals(&entry[0], "index")) { region->index = ss_toInt(&entry[1]); @@ -392,19 +392,19 @@ spAtlas *spAtlas_create(const char *begin, int length, const char *dir, void *re spKeyValueArray_add(region->keyValues, keyValue); } } - if (region->originalWidth == 0 && region->originalHeight == 0) { - region->originalWidth = region->width; - region->originalHeight = region->height; + if (region->super.originalWidth == 0 && region->super.originalHeight == 0) { + region->super.originalWidth = region->super.width; + region->super.originalHeight = region->super.height; } - region->u = (float) region->x / page->width; - region->v = (float) region->y / page->height; - if (region->degrees == 90) { - region->u2 = (float) (region->x + region->height) / page->width; - region->v2 = (float) (region->y + region->width) / page->height; + region->super.u = (float) region->x / page->width; + region->super.v = (float) region->y / page->height; + if (region->super.degrees == 90) { + region->super.u2 = (float) (region->x + region->super.height) / page->width; + region->super.v2 = (float) (region->y + region->super.width) / page->height; } else { - region->u2 = (float) (region->x + region->width) / page->width; - region->v2 = (float) (region->y + region->height) / page->height; + region->super.u2 = (float) (region->x + region->super.width) / page->width; + region->super.v2 = (float) (region->y + region->super.height) / page->height; } } } diff --git a/defold-spine/commonsrc/spine/AtlasAttachmentLoader.c b/defold-spine/commonsrc/spine/AtlasAttachmentLoader.c index aab74d6..30f32a1 100644 --- a/defold-spine/commonsrc/spine/AtlasAttachmentLoader.c +++ b/defold-spine/commonsrc/spine/AtlasAttachmentLoader.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -29,50 +29,68 @@ #include #include +#include + +static int /*bool*/ loadSequence(spAtlas *atlas, const char *basePath, spSequence *sequence) { + spTextureRegionArray *regions = sequence->regions; + char *path = CALLOC(char, strlen(basePath) + sequence->digits + 1); + int i; + for (i = 0; i < regions->size; i++) { + spSequence_getPath(sequence, basePath, i, path); + regions->items[i] = SUPER(spAtlas_findRegion(atlas, path)); + if (!regions->items[i]) { + FREE(path); + return 0; + } + regions->items[i]->rendererObject = regions->items[i]; + } + FREE(path); + return -1; +} spAttachment *_spAtlasAttachmentLoader_createAttachment(spAttachmentLoader *loader, spSkin *skin, spAttachmentType type, - const char *name, const char *path) { + const char *name, const char *path, spSequence *sequence) { spAtlasAttachmentLoader *self = SUB_CAST(spAtlasAttachmentLoader, loader); switch (type) { case SP_ATTACHMENT_REGION: { - spRegionAttachment *attachment; - spAtlasRegion *region = spAtlas_findRegion(self->atlas, path); - if (!region) { - _spAttachmentLoader_setError(loader, "Region not found: ", path); - return 0; + spRegionAttachment *attachment = spRegionAttachment_create(name); + if (sequence) { + if (!loadSequence(self->atlas, path, sequence)) { + spAttachment_dispose(SUPER(attachment)); + _spAttachmentLoader_setError(loader, "Couldn't load sequence for region attachment: ", path); + return 0; + } + } else { + spAtlasRegion *region = spAtlas_findRegion(self->atlas, path); + if (!region) { + spAttachment_dispose(SUPER(attachment)); + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + attachment->rendererObject = region; + attachment->region = SUPER(region); } - attachment = spRegionAttachment_create(name); - attachment->rendererObject = region; - spRegionAttachment_setUVs(attachment, region->u, region->v, region->u2, region->v2, region->degrees); - attachment->regionOffsetX = region->offsetX; - attachment->regionOffsetY = region->offsetY; - attachment->regionWidth = region->width; - attachment->regionHeight = region->height; - attachment->regionOriginalWidth = region->originalWidth; - attachment->regionOriginalHeight = region->originalHeight; return SUPER(attachment); } case SP_ATTACHMENT_MESH: case SP_ATTACHMENT_LINKED_MESH: { - spMeshAttachment *attachment; - spAtlasRegion *region = spAtlas_findRegion(self->atlas, path); - if (!region) { - _spAttachmentLoader_setError(loader, "Region not found: ", path); - return 0; + spMeshAttachment *attachment = spMeshAttachment_create(name); + + if (sequence) { + if (!loadSequence(self->atlas, path, sequence)) { + spAttachment_dispose(SUPER(SUPER(attachment))); + _spAttachmentLoader_setError(loader, "Couldn't load sequence for mesh attachment: ", path); + return 0; + } + } else { + spAtlasRegion *region = spAtlas_findRegion(self->atlas, path); + if (!region) { + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + attachment->rendererObject = region; + attachment->region = SUPER(region); } - attachment = spMeshAttachment_create(name); - attachment->rendererObject = region; - attachment->regionU = region->u; - attachment->regionV = region->v; - attachment->regionU2 = region->u2; - attachment->regionV2 = region->v2; - attachment->regionDegrees = region->degrees; - attachment->regionOffsetX = region->offsetX; - attachment->regionOffsetY = region->offsetY; - attachment->regionWidth = region->width; - attachment->regionHeight = region->height; - attachment->regionOriginalWidth = region->originalWidth; - attachment->regionOriginalHeight = region->originalHeight; return SUPER(SUPER(attachment)); } case SP_ATTACHMENT_BOUNDING_BOX: diff --git a/defold-spine/commonsrc/spine/Attachment.c b/defold-spine/commonsrc/spine/Attachment.c index 225b212..8d18205 100644 --- a/defold-spine/commonsrc/spine/Attachment.c +++ b/defold-spine/commonsrc/spine/Attachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/AttachmentLoader.c b/defold-spine/commonsrc/spine/AttachmentLoader.c index feb027d..de23cb2 100644 --- a/defold-spine/commonsrc/spine/AttachmentLoader.c +++ b/defold-spine/commonsrc/spine/AttachmentLoader.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -33,7 +33,7 @@ typedef struct _spAttachmentLoaderVtable { spAttachment *(*createAttachment)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, - const char *path); + const char *path, spSequence *sequence); void (*configureAttachment)(spAttachmentLoader *self, spAttachment *); @@ -46,7 +46,7 @@ void _spAttachmentLoader_init(spAttachmentLoader *self, void (*dispose)(spAttachmentLoader *self), spAttachment *(*createAttachment)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, - const char *path), + const char *path, spSequence *sequence), void (*configureAttachment)(spAttachmentLoader *self, spAttachment *), void (*disposeAttachment)(spAttachmentLoader *self, spAttachment *)) { CONST_CAST(_spAttachmentLoaderVtable *, self->vtable) = NEW(_spAttachmentLoaderVtable); @@ -69,12 +69,12 @@ void spAttachmentLoader_dispose(spAttachmentLoader *self) { spAttachment * spAttachmentLoader_createAttachment(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, - const char *path) { + const char *path, spSequence *sequence) { FREE(self->error1); FREE(self->error2); self->error1 = 0; self->error2 = 0; - return VTABLE(spAttachmentLoader, self)->createAttachment(self, skin, type, name, path); + return VTABLE(spAttachmentLoader, self)->createAttachment(self, skin, type, name, path, sequence); } void spAttachmentLoader_configureAttachment(spAttachmentLoader *self, spAttachment *attachment) { diff --git a/defold-spine/commonsrc/spine/Bone.c b/defold-spine/commonsrc/spine/Bone.c index 2e8eccf..14f82a1 100644 --- a/defold-spine/commonsrc/spine/Bone.c +++ b/defold-spine/commonsrc/spine/Bone.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/BoneData.c b/defold-spine/commonsrc/spine/BoneData.c index 8621605..aa6fde4 100644 --- a/defold-spine/commonsrc/spine/BoneData.c +++ b/defold-spine/commonsrc/spine/BoneData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/BoundingBoxAttachment.c b/defold-spine/commonsrc/spine/BoundingBoxAttachment.c index 10fb6ff..6e1b832 100644 --- a/defold-spine/commonsrc/spine/BoundingBoxAttachment.c +++ b/defold-spine/commonsrc/spine/BoundingBoxAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/ClippingAttachment.c b/defold-spine/commonsrc/spine/ClippingAttachment.c index cf1410c..c1d6b0d 100644 --- a/defold-spine/commonsrc/spine/ClippingAttachment.c +++ b/defold-spine/commonsrc/spine/ClippingAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/Color.c b/defold-spine/commonsrc/spine/Color.c index ba13bc0..9a9bbf9 100644 --- a/defold-spine/commonsrc/spine/Color.c +++ b/defold-spine/commonsrc/spine/Color.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/Debug.c b/defold-spine/commonsrc/spine/Debug.c index f69a3cd..8a854a5 100644 --- a/defold-spine/commonsrc/spine/Debug.c +++ b/defold-spine/commonsrc/spine/Debug.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -205,6 +205,10 @@ void spDebug_printTimeline(spTimeline *timeline) { _spDebug_printTimelineBase(&t->super); break; } + case SP_TIMELINE_SEQUENCE: { + spSequenceTimeline *t = (spSequenceTimeline *) timeline; + _spDebug_printTimelineBase(&t->super); + } } } diff --git a/defold-spine/commonsrc/spine/Event.c b/defold-spine/commonsrc/spine/Event.c index 69e96be..92034d7 100644 --- a/defold-spine/commonsrc/spine/Event.c +++ b/defold-spine/commonsrc/spine/Event.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/EventData.c b/defold-spine/commonsrc/spine/EventData.c index ddbaec7..8233b4f 100644 --- a/defold-spine/commonsrc/spine/EventData.c +++ b/defold-spine/commonsrc/spine/EventData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/IkConstraint.c b/defold-spine/commonsrc/spine/IkConstraint.c index d6e7bfa..5d572c4 100644 --- a/defold-spine/commonsrc/spine/IkConstraint.c +++ b/defold-spine/commonsrc/spine/IkConstraint.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/IkConstraintData.c b/defold-spine/commonsrc/spine/IkConstraintData.c index aef8b69..4977a5b 100644 --- a/defold-spine/commonsrc/spine/IkConstraintData.c +++ b/defold-spine/commonsrc/spine/IkConstraintData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/MeshAttachment.c b/defold-spine/commonsrc/spine/MeshAttachment.c index 09dc9bc..ab5f448 100644 --- a/defold-spine/commonsrc/spine/MeshAttachment.c +++ b/defold-spine/commonsrc/spine/MeshAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -33,6 +33,7 @@ void _spMeshAttachment_dispose(spAttachment *attachment) { spMeshAttachment *self = SUB_CAST(spMeshAttachment, attachment); + if (self->sequence) spSequence_dispose(self->sequence); FREE(self->path); FREE(self->uvs); if (!self->parentMesh) { @@ -42,6 +43,7 @@ void _spMeshAttachment_dispose(spAttachment *attachment) { FREE(self->edges); } else _spAttachment_deinit(attachment); + if (self->sequence) FREE(self->sequence); FREE(self); } @@ -52,17 +54,8 @@ spAttachment *_spMeshAttachment_copy(spAttachment *attachment) { return SUPER(SUPER(spMeshAttachment_newLinkedMesh(self))); copy = spMeshAttachment_create(attachment->name); copy->rendererObject = self->rendererObject; - copy->regionU = self->regionU; - copy->regionV = self->regionV; - copy->regionU2 = self->regionU2; - copy->regionV2 = self->regionV2; - copy->regionDegrees = self->regionDegrees; - copy->regionOffsetX = self->regionOffsetX; - copy->regionOffsetY = self->regionOffsetY; - copy->regionWidth = self->regionWidth; - copy->regionHeight = self->regionHeight; - copy->regionOriginalWidth = self->regionOriginalWidth; - copy->regionOriginalHeight = self->regionOriginalHeight; + copy->region = self->region; + copy->sequence = self->sequence != NULL ? spSequence_copy(self->sequence) : NULL; MALLOC_STR(copy->path, self->path); spColor_setFromColor(©->color, &self->color); @@ -90,22 +83,12 @@ spMeshAttachment *spMeshAttachment_newLinkedMesh(spMeshAttachment *self) { spMeshAttachment *copy = spMeshAttachment_create(self->super.super.name); copy->rendererObject = self->rendererObject; - copy->regionU = self->regionU; - copy->regionV = self->regionV; - copy->regionU2 = self->regionU2; - copy->regionV2 = self->regionV2; - copy->regionDegrees = self->regionDegrees; - copy->regionOffsetX = self->regionOffsetX; - copy->regionOffsetY = self->regionOffsetY; - copy->regionWidth = self->regionWidth; - copy->regionHeight = self->regionHeight; - copy->regionOriginalWidth = self->regionOriginalWidth; - copy->regionOriginalHeight = self->regionOriginalHeight; + copy->region = self->region; MALLOC_STR(copy->path, self->path); spColor_setFromColor(©->color, &self->color); - copy->super.deformAttachment = self->super.deformAttachment; + copy->super.timelineAttachment = self->super.timelineAttachment; spMeshAttachment_setParentMesh(copy, self->parentMesh ? self->parentMesh : self); - spMeshAttachment_updateUVs(copy); + if (copy->region) spMeshAttachment_updateRegion(copy); return copy; } @@ -117,7 +100,7 @@ spMeshAttachment *spMeshAttachment_create(const char *name) { return self; } -void spMeshAttachment_updateUVs(spMeshAttachment *self) { +void spMeshAttachment_updateRegion(spMeshAttachment *self) { int i, n; float *uvs; float u, v, width, height; @@ -125,17 +108,17 @@ void spMeshAttachment_updateUVs(spMeshAttachment *self) { FREE(self->uvs); uvs = self->uvs = MALLOC(float, verticesLength); n = verticesLength; - u = self->regionU; - v = self->regionV; + u = self->region->u; + v = self->region->v; - switch (self->regionDegrees) { + switch (self->region->degrees) { case 90: { - float textureWidth = self->regionHeight / (self->regionU2 - self->regionU); - float textureHeight = self->regionWidth / (self->regionV2 - self->regionV); - u -= (self->regionOriginalHeight - self->regionOffsetY - self->regionHeight) / textureWidth; - v -= (self->regionOriginalWidth - self->regionOffsetX - self->regionWidth) / textureHeight; - width = self->regionOriginalHeight / textureWidth; - height = self->regionOriginalWidth / textureHeight; + float textureWidth = self->region->height / (self->region->u2 - self->region->u); + float textureHeight = self->region->width / (self->region->v2 - self->region->v); + u -= (self->region->originalHeight - self->region->offsetY - self->region->height) / textureWidth; + v -= (self->region->originalWidth - self->region->offsetX - self->region->width) / textureHeight; + width = self->region->originalHeight / textureWidth; + height = self->region->originalWidth / textureHeight; for (i = 0; i < n; i += 2) { uvs[i] = u + self->regionUVs[i + 1] * width; uvs[i + 1] = v + (1 - self->regionUVs[i]) * height; @@ -143,12 +126,12 @@ void spMeshAttachment_updateUVs(spMeshAttachment *self) { return; } case 180: { - float textureWidth = self->regionWidth / (self->regionU2 - self->regionU); - float textureHeight = self->regionHeight / (self->regionV2 - self->regionV); - u -= (self->regionOriginalWidth - self->regionOffsetX - self->regionWidth) / textureWidth; - v -= self->regionOffsetY / textureHeight; - width = self->regionOriginalWidth / textureWidth; - height = self->regionOriginalHeight / textureHeight; + float textureWidth = self->region->width / (self->region->u2 - self->region->u); + float textureHeight = self->region->height / (self->region->v2 - self->region->v); + u -= (self->region->originalWidth - self->region->offsetX - self->region->width) / textureWidth; + v -= self->region->offsetY / textureHeight; + width = self->region->originalWidth / textureWidth; + height = self->region->originalHeight / textureHeight; for (i = 0; i < n; i += 2) { uvs[i] = u + (1 - self->regionUVs[i]) * width; uvs[i + 1] = v + (1 - self->regionUVs[i + 1]) * height; @@ -156,12 +139,12 @@ void spMeshAttachment_updateUVs(spMeshAttachment *self) { return; } case 270: { - float textureHeight = self->regionHeight / (self->regionV2 - self->regionV); - float textureWidth = self->regionWidth / (self->regionU2 - self->regionU); - u -= self->regionOffsetY / textureWidth; - v -= self->regionOffsetX / textureHeight; - width = self->regionOriginalHeight / textureWidth; - height = self->regionOriginalWidth / textureHeight; + float textureHeight = self->region->height / (self->region->v2 - self->region->v); + float textureWidth = self->region->width / (self->region->u2 - self->region->u); + u -= self->region->offsetY / textureWidth; + v -= self->region->offsetX / textureHeight; + width = self->region->originalHeight / textureWidth; + height = self->region->originalWidth / textureHeight; for (i = 0; i < n; i += 2) { uvs[i] = u + (1 - self->regionUVs[i + 1]) * width; uvs[i + 1] = v + self->regionUVs[i] * height; @@ -169,12 +152,12 @@ void spMeshAttachment_updateUVs(spMeshAttachment *self) { return; } default: { - float textureWidth = self->regionWidth / (self->regionU2 - self->regionU); - float textureHeight = self->regionHeight / (self->regionV2 - self->regionV); - u -= self->regionOffsetX / textureWidth; - v -= (self->regionOriginalHeight - self->regionOffsetY - self->regionHeight) / textureHeight; - width = self->regionOriginalWidth / textureWidth; - height = self->regionOriginalHeight / textureHeight; + float textureWidth = self->region->width / (self->region->u2 - self->region->u); + float textureHeight = self->region->height / (self->region->v2 - self->region->v); + u -= self->region->offsetX / textureWidth; + v -= (self->region->originalHeight - self->region->offsetY - self->region->height) / textureHeight; + width = self->region->originalWidth / textureWidth; + height = self->region->originalHeight / textureHeight; for (i = 0; i < n; i += 2) { uvs[i] = u + self->regionUVs[i] * width; uvs[i + 1] = v + self->regionUVs[i + 1] * height; diff --git a/defold-spine/commonsrc/spine/PathAttachment.c b/defold-spine/commonsrc/spine/PathAttachment.c index 7a40386..c5e1a0f 100644 --- a/defold-spine/commonsrc/spine/PathAttachment.c +++ b/defold-spine/commonsrc/spine/PathAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/PathConstraint.c b/defold-spine/commonsrc/spine/PathConstraint.c index 833d359..849dd02 100644 --- a/defold-spine/commonsrc/spine/PathConstraint.c +++ b/defold-spine/commonsrc/spine/PathConstraint.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -286,7 +286,7 @@ float *spPathConstraint_computeWorldPositions(spPathConstraint *self, spPathAtta float *lengths = path->lengths; curveCount -= closed ? 1 : 2; pathLength = lengths[curveCount]; - if (self->data->positionMode == SP_POSITION_MODE_PERCENT) position += pathLength; + if (self->data->positionMode == SP_POSITION_MODE_PERCENT) position *= pathLength; switch (self->data->spacingMode) { case SP_SPACING_MODE_PERCENT: multiplier = pathLength; diff --git a/defold-spine/commonsrc/spine/PathConstraintData.c b/defold-spine/commonsrc/spine/PathConstraintData.c index 8d26e84..3b2adcb 100644 --- a/defold-spine/commonsrc/spine/PathConstraintData.c +++ b/defold-spine/commonsrc/spine/PathConstraintData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/PointAttachment.c b/defold-spine/commonsrc/spine/PointAttachment.c index 808950b..4d3508f 100644 --- a/defold-spine/commonsrc/spine/PointAttachment.c +++ b/defold-spine/commonsrc/spine/PointAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/RegionAttachment.c b/defold-spine/commonsrc/spine/RegionAttachment.c index fe3af4c..b91ce5b 100644 --- a/defold-spine/commonsrc/spine/RegionAttachment.c +++ b/defold-spine/commonsrc/spine/RegionAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -43,6 +43,7 @@ typedef enum { void _spRegionAttachment_dispose(spAttachment *attachment) { spRegionAttachment *self = SUB_CAST(spRegionAttachment, attachment); + if (self->sequence) spSequence_dispose(self->sequence); _spAttachment_deinit(attachment); FREE(self->path); FREE(self); @@ -51,12 +52,7 @@ void _spRegionAttachment_dispose(spAttachment *attachment) { spAttachment *_spRegionAttachment_copy(spAttachment *attachment) { spRegionAttachment *self = SUB_CAST(spRegionAttachment, attachment); spRegionAttachment *copy = spRegionAttachment_create(attachment->name); - copy->regionWidth = self->regionWidth; - copy->regionHeight = self->regionHeight; - copy->regionOffsetX = self->regionOffsetX; - copy->regionOffsetY = self->regionOffsetY; - copy->regionOriginalWidth = self->regionOriginalWidth; - copy->regionOriginalHeight = self->regionOriginalHeight; + copy->region = self->region; copy->rendererObject = self->rendererObject; MALLOC_STR(copy->path, self->path); copy->x = self->x; @@ -69,6 +65,7 @@ spAttachment *_spRegionAttachment_copy(spAttachment *attachment) { memcpy(copy->uvs, self->uvs, sizeof(float) * 8); memcpy(copy->offset, self->offset, sizeof(float) * 8); spColor_setFromColor(©->color, &self->color); + copy->sequence = self->sequence ? spSequence_copy(self->sequence) : NULL; return SUPER(copy); } @@ -81,45 +78,40 @@ spRegionAttachment *spRegionAttachment_create(const char *name) { return self; } -void spRegionAttachment_setUVs(spRegionAttachment *self, float u, float v, float u2, float v2, float degrees) { - if (degrees == 90) { - self->uvs[URX] = u; - self->uvs[URY] = v2; - self->uvs[BRX] = u; - self->uvs[BRY] = v; - self->uvs[BLX] = u2; - self->uvs[BLY] = v; - self->uvs[ULX] = u2; - self->uvs[ULY] = v2; - } else { - self->uvs[ULX] = u; - self->uvs[ULY] = v2; - self->uvs[URX] = u; - self->uvs[URY] = v; - self->uvs[BRX] = u2; - self->uvs[BRY] = v; - self->uvs[BLX] = u2; - self->uvs[BLY] = v2; +void spRegionAttachment_updateRegion(spRegionAttachment *self) { + float regionScaleX, regionScaleY, localX, localY, localX2, localY2; + float radians, cosine, sine; + float localXCos, localXSin, localYCos, localYSin, localX2Cos, localX2Sin, localY2Cos, localY2Sin; + + if (self->region == NULL) { + self->uvs[0] = 0; + self->uvs[1] = 0; + self->uvs[2] = 1; + self->uvs[3] = 1; + self->uvs[4] = 1; + self->uvs[5] = 0; + self->uvs[6] = 0; + self->uvs[7] = 0; + return; } -} -void spRegionAttachment_updateOffset(spRegionAttachment *self) { - float regionScaleX = self->width / self->regionOriginalWidth * self->scaleX; - float regionScaleY = self->height / self->regionOriginalHeight * self->scaleY; - float localX = -self->width / 2 * self->scaleX + self->regionOffsetX * regionScaleX; - float localY = -self->height / 2 * self->scaleY + self->regionOffsetY * regionScaleY; - float localX2 = localX + self->regionWidth * regionScaleX; - float localY2 = localY + self->regionHeight * regionScaleY; - float radians = self->rotation * DEG_RAD; - float cosine = COS(radians), sine = SIN(radians); - float localXCos = localX * cosine + self->x; - float localXSin = localX * sine; - float localYCos = localY * cosine + self->y; - float localYSin = localY * sine; - float localX2Cos = localX2 * cosine + self->x; - float localX2Sin = localX2 * sine; - float localY2Cos = localY2 * cosine + self->y; - float localY2Sin = localY2 * sine; + regionScaleX = self->width / self->region->originalWidth * self->scaleX; + regionScaleY = self->height / self->region->originalHeight * self->scaleY; + localX = -self->width / 2 * self->scaleX + self->region->offsetX * regionScaleX; + localY = -self->height / 2 * self->scaleY + self->region->offsetY * regionScaleY; + localX2 = localX + self->region->width * regionScaleX; + localY2 = localY + self->region->height * regionScaleY; + radians = self->rotation * DEG_RAD; + cosine = COS(radians), sine = SIN(radians); + localXCos = localX * cosine + self->x; + localXSin = localX * sine; + localYCos = localY * cosine + self->y; + localYSin = localY * sine; + localX2Cos = localX2 * cosine + self->x; + localX2Sin = localX2 * sine; + localY2Cos = localY2 * cosine + self->y; + localY2Sin = localY2 * sine; + self->offset[BLX] = localXCos - localYSin; self->offset[BLY] = localYCos + localXSin; self->offset[ULX] = localXCos - localY2Sin; @@ -128,14 +120,37 @@ void spRegionAttachment_updateOffset(spRegionAttachment *self) { self->offset[URY] = localY2Cos + localX2Sin; self->offset[BRX] = localX2Cos - localYSin; self->offset[BRY] = localYCos + localX2Sin; + + if (self->region->degrees == 90) { + self->uvs[URX] = self->region->u; + self->uvs[URY] = self->region->v2; + self->uvs[BRX] = self->region->u; + self->uvs[BRY] = self->region->v; + self->uvs[BLX] = self->region->u2; + self->uvs[BLY] = self->region->v; + self->uvs[ULX] = self->region->u2; + self->uvs[ULY] = self->region->v2; + } else { + self->uvs[ULX] = self->region->u; + self->uvs[ULY] = self->region->v2; + self->uvs[URX] = self->region->u; + self->uvs[URY] = self->region->v; + self->uvs[BRX] = self->region->u2; + self->uvs[BRY] = self->region->v; + self->uvs[BLX] = self->region->u2; + self->uvs[BLY] = self->region->v2; + } } -void spRegionAttachment_computeWorldVertices(spRegionAttachment *self, spBone *bone, float *vertices, int offset, +void spRegionAttachment_computeWorldVertices(spRegionAttachment *self, spSlot *slot, float *vertices, int offset, int stride) { const float *offsets = self->offset; + spBone *bone = slot->bone; float x = bone->worldX, y = bone->worldY; float offsetX, offsetY; + if (self->sequence) spSequence_apply(self->sequence, slot, SUPER(self)); + offsetX = offsets[BRX]; offsetY = offsets[BRY]; vertices[offset] = offsetX * bone->a + offsetY * bone->b + x; /* br */ diff --git a/defold-spine/commonsrc/spine/Sequence.c b/defold-spine/commonsrc/spine/Sequence.c new file mode 100644 index 0000000..caa256c --- /dev/null +++ b/defold-spine/commonsrc/spine/Sequence.c @@ -0,0 +1,115 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated September 24, 2021. Replaces all prior versions. + * + * Copyright (c) 2013-2021, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#include +#include +#include + +_SP_ARRAY_IMPLEMENT_TYPE(spTextureRegionArray, spTextureRegion *) + +static int nextSequenceId = 0; + +spSequence *spSequence_create(int numRegions) { + spSequence *self = NEW(spSequence); + self->id = nextSequenceId++; + self->regions = spTextureRegionArray_create(numRegions); + spTextureRegionArray_setSize(self->regions, numRegions); + return self; +} + +void spSequence_dispose(spSequence *self) { + FREE(self->regions); + FREE(self); +} + +spSequence *spSequence_copy(spSequence *self) { + int i = 0; + spSequence *copy = spSequence_create(self->regions->size); + for (; i < self->regions->size; i++) + copy->regions->items[i] = self->regions->items[i]; + copy->start = self->start; + copy->digits = self->digits; + copy->setupIndex = self->setupIndex; + return copy; +} + +void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment) { + int index = slot->sequenceIndex; + spTextureRegion *region = NULL; + if (index == -1) index = self->setupIndex; + if (index >= (int) self->regions->size) index = self->regions->size - 1; + region = self->regions->items[index]; + + if (attachment->type == SP_ATTACHMENT_REGION) { + spRegionAttachment *regionAttachment = (spRegionAttachment *) attachment; + if (regionAttachment->region != region) { + regionAttachment->rendererObject = region; + regionAttachment->region = region; + spRegionAttachment_updateRegion(regionAttachment); + } + } + + if (attachment->type == SP_ATTACHMENT_MESH) { + spMeshAttachment *meshAttachment = (spMeshAttachment *) attachment; + if (meshAttachment->region != region) { + meshAttachment->rendererObject = region; + meshAttachment->region = region; + spMeshAttachment_updateRegion(meshAttachment); + } + } +} + +static int num_digits(int value) { + int count = value < 0 ? 1 : 0; + do { + value /= 10; + ++count; + } while (value != 0); + return count; +} + +static char *string_append(char *str, const char *b) { + int lenB = strlen(b); + memcpy(str, b, lenB + 1); + return str + lenB; +} + +static char *string_append_int(char *str, int value) { + char intStr[20]; + sprintf(intStr, "%i", value); + return string_append(str, intStr); +} + +void spSequence_getPath(spSequence *self, const char *basePath, int index, char *path) { + int i; + path = string_append(path, basePath); + for (i = self->digits - num_digits(self->start + index); i > 0; i--) + path = string_append(path, "0"); + path = string_append_int(path, self->start + index); +} diff --git a/defold-spine/commonsrc/spine/Skeleton.c b/defold-spine/commonsrc/spine/Skeleton.c index 67878df..a637ba6 100644 --- a/defold-spine/commonsrc/spine/Skeleton.c +++ b/defold-spine/commonsrc/spine/Skeleton.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -161,8 +161,7 @@ static void _addToUpdateCache(_spSkeleton *const internal, _spUpdateType type, v _spUpdate *update; if (internal->updateCacheCount == internal->updateCacheCapacity) { internal->updateCacheCapacity *= 2; - internal->updateCache = (_spUpdate *) realloc(internal->updateCache, - sizeof(_spUpdate) * internal->updateCacheCapacity); + internal->updateCache = (_spUpdate *) REALLOC(internal->updateCache, _spUpdate, internal->updateCacheCapacity); } update = internal->updateCache + internal->updateCacheCount; update->type = type; @@ -438,7 +437,6 @@ void spSkeleton_updateWorldTransformWith(const spSkeleton *self, const spBone *p /* Apply the parent bone transform to the root bone. The root bone always inherits scale, rotation and reflection. */ int i; float rotationY, la, lb, lc, ld; - _spUpdate *updateCache; _spSkeleton *internal = SUB_CAST(_spSkeleton, self); spBone *rootBone = self->root; float pa = parent->a, pb = parent->b, pc = parent->c, pd = parent->d; @@ -456,7 +454,6 @@ void spSkeleton_updateWorldTransformWith(const spSkeleton *self, const spBone *p CONST_CAST(float, rootBone->d) = (pc * lb + pd * ld) * self->scaleY; /* Update everything except root bone. */ - updateCache = internal->updateCache; for (i = 0; i < internal->updateCacheCount; ++i) { _spUpdate *update = internal->updateCache + i; switch (update->type) { @@ -629,7 +626,3 @@ spPathConstraint *spSkeleton_findPathConstraint(const spSkeleton *self, const ch if (strcmp(self->pathConstraints[i]->data->name, constraintName) == 0) return self->pathConstraints[i]; return 0; } - -void spSkeleton_update(spSkeleton *self, float deltaTime) { - self->time += deltaTime; -} diff --git a/defold-spine/commonsrc/spine/SkeletonBinary.c b/defold-spine/commonsrc/spine/SkeletonBinary.c index db9431c..19fff28 100644 --- a/defold-spine/commonsrc/spine/SkeletonBinary.c +++ b/defold-spine/commonsrc/spine/SkeletonBinary.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -33,6 +33,7 @@ #include #include #include +#include typedef struct { const unsigned char *cursor; @@ -44,7 +45,7 @@ typedef struct { const char *skin; int slotIndex; spMeshAttachment *mesh; - int inheritDeform; + int inheritTimeline; } _spLinkedMesh; typedef struct { @@ -101,19 +102,19 @@ static int readBoolean(_dataInput *input) { } static int readInt(_dataInput *input) { - int result = readByte(input); + uint32_t result = readByte(input); result <<= 8; result |= readByte(input); result <<= 8; result |= readByte(input); result <<= 8; result |= readByte(input); - return result; + return (int) result; } static int readVarint(_dataInput *input, int /*bool*/ optimizePositive) { unsigned char b = readByte(input); - int value = b & 0x7F; + uint32_t value = b & 0x7F; if (b & 0x80) { b = readByte(input); value |= (b & 0x7F) << 7; @@ -123,12 +124,13 @@ static int readVarint(_dataInput *input, int /*bool*/ optimizePositive) { if (b & 0x80) { b = readByte(input); value |= (b & 0x7F) << 21; - if (b & 0x80) value |= (readByte(input) & 0x7F) << 28; + if (b & 0x80) value |= (uint32_t) (readByte(input) & 0x7F) << 28; } } } - if (!optimizePositive) value = (((unsigned int) value >> 1) ^ -(value & 1)); - return value; + if (!optimizePositive) + value = ((unsigned int) value >> 1) ^ (~(value & 1)); + return (int) value; } float readFloat(_dataInput *input) { @@ -192,6 +194,9 @@ static void readColor(_dataInput *input, float *r, float *g, float *b, float *a) #define SLOT_RGB2 4 #define SLOT_ALPHA 5 +#define ATTACHMENT_DEFORM 0 +#define ATTACHMENT_SEQUENCE 1 + #define PATH_POSITION 0 #define PATH_SPACING 1 #define PATH_MIX 2 @@ -211,6 +216,16 @@ static void readColor(_dataInput *input, float *r, float *g, float *b, float *a) #define PATH_ROTATE_CHAIN 1 #define PATH_ROTATE_CHAIN_SCALE 2 +static spSequence *readSequence(_dataInput *input) { + spSequence *sequence = NULL; + if (!readBoolean(input)) return NULL; + sequence = spSequence_create(readVarint(input, -1)); + sequence->start = readVarint(input, -1); + sequence->digits = readVarint(input, -1); + sequence->setupIndex = readVarint(input, -1); + return sequence; +} + static void setBezier(_dataInput *input, spTimeline *timeline, int bezier, int frame, int value, float time1, float time2, float value1, float value2, float scale) { @@ -293,7 +308,7 @@ static void _spSkeletonBinary_addLinkedMesh(spSkeletonBinary *self, spMeshAttach linkedMesh->skin = skin; linkedMesh->slotIndex = slotIndex; linkedMesh->parent = parent; - linkedMesh->inheritDeform = inheritDeform; + linkedMesh->inheritTimeline = inheritDeform; } static spAnimation *_spSkeletonBinary_readAnimation(spSkeletonBinary *self, const char *name, @@ -748,19 +763,17 @@ static spAnimation *_spSkeletonBinary_readAnimation(spSkeletonBinary *self, cons } } - /* Deform timelines. */ + /* Attachment timelines. */ for (i = 0, n = readVarint(input, 1); i < n; ++i) { spSkin *skin = skeletonData->skins[readVarint(input, 1)]; for (ii = 0, nn = readVarint(input, 1); ii < nn; ++ii) { int slotIndex = readVarint(input, 1); for (iii = 0, nnn = readVarint(input, 1); iii < nnn; ++iii) { - float *tempDeform; - spDeformTimeline *timeline; - int weighted, deformLength; - const char *attachmentName = readStringRef(input, skeletonData); int frameCount, frameLast, bezierCount; float time, time2; + unsigned int timelineType; + const char *attachmentName = readStringRef(input, skeletonData); spVertexAttachment *attachment = SUB_CAST(spVertexAttachment, spSkin_getAttachment(skin, slotIndex, attachmentName)); if (!attachment) { @@ -771,59 +784,83 @@ static spAnimation *_spSkeletonBinary_readAnimation(spSkeletonBinary *self, cons return NULL; } - weighted = attachment->bones != 0; - deformLength = weighted ? attachment->verticesCount / 3 * 2 : attachment->verticesCount; - tempDeform = MALLOC(float, deformLength); - + timelineType = readByte(input); frameCount = readVarint(input, 1); frameLast = frameCount - 1; - bezierCount = readVarint(input, 1); - timeline = spDeformTimeline_create(frameCount, deformLength, bezierCount, slotIndex, attachment); - - time = readFloat(input); - for (frame = 0, bezier = 0;; ++frame) { - float *deform; - int end = readVarint(input, 1); - if (!end) { - if (weighted) { - deform = tempDeform; - memset(deform, 0, sizeof(float) * deformLength); - } else - deform = attachment->vertices; - } else { - int v, start = readVarint(input, 1); - deform = tempDeform; - memset(deform, 0, sizeof(float) * start); - end += start; - if (self->scale == 1) { - for (v = start; v < end; ++v) - deform[v] = readFloat(input); - } else { - for (v = start; v < end; ++v) - deform[v] = readFloat(input) * self->scale; - } - memset(deform + v, 0, sizeof(float) * (deformLength - v)); - if (!weighted) { - float *vertices = attachment->vertices; - for (v = 0; v < deformLength; ++v) - deform[v] += vertices[v]; + + switch (timelineType) { + case ATTACHMENT_DEFORM: { + float *tempDeform; + int weighted, deformLength; + spDeformTimeline *timeline; + weighted = attachment->bones != 0; + deformLength = weighted ? attachment->verticesCount / 3 * 2 : attachment->verticesCount; + tempDeform = MALLOC(float, deformLength); + + bezierCount = readVarint(input, 1); + timeline = spDeformTimeline_create(frameCount, deformLength, bezierCount, slotIndex, + attachment); + + time = readFloat(input); + for (frame = 0, bezier = 0;; ++frame) { + float *deform; + int end = readVarint(input, 1); + if (!end) { + if (weighted) { + deform = tempDeform; + memset(deform, 0, sizeof(float) * deformLength); + } else + deform = attachment->vertices; + } else { + int v, start = readVarint(input, 1); + deform = tempDeform; + memset(deform, 0, sizeof(float) * start); + end += start; + if (self->scale == 1) { + for (v = start; v < end; ++v) + deform[v] = readFloat(input); + } else { + for (v = start; v < end; ++v) + deform[v] = readFloat(input) * self->scale; + } + memset(deform + v, 0, sizeof(float) * (deformLength - v)); + if (!weighted) { + float *vertices = attachment->vertices; + for (v = 0; v < deformLength; ++v) + deform[v] += vertices[v]; + } + } + spDeformTimeline_setFrame(timeline, frame, time, deform); + if (frame == frameLast) break; + time2 = readFloat(input); + switch (readSByte(input)) { + case CURVE_STEPPED: + spCurveTimeline_setStepped(SUPER(timeline), frame); + break; + case CURVE_BEZIER: + setBezier(input, SUPER(SUPER(timeline)), bezier++, frame, 0, time, time2, 0, 1, 1); + } + time = time2; } + FREE(tempDeform); + + spTimelineArray_add(timelines, (spTimeline *) timeline); + break; } - spDeformTimeline_setFrame(timeline, frame, time, deform); - if (frame == frameLast) break; - time2 = readFloat(input); - switch (readSByte(input)) { - case CURVE_STEPPED: - spCurveTimeline_setStepped(SUPER(timeline), frame); - break; - case CURVE_BEZIER: - setBezier(input, SUPER(SUPER(timeline)), bezier++, frame, 0, time, time2, 0, 1, 1); + case ATTACHMENT_SEQUENCE: { + int modeAndIndex; + float delay; + spSequenceTimeline *timeline = spSequenceTimeline_create(frameCount, slotIndex, (spAttachment *) attachment); + for (frame = 0; frame < frameCount; frame++) { + time = readFloat(input); + modeAndIndex = readInt(input); + delay = readFloat(input); + spSequenceTimeline_setFrame(timeline, frame, time, modeAndIndex & 0xf, modeAndIndex >> 4, delay); + } + spTimelineArray_add(timelines, (spTimeline *) timeline); + break; } - time = time2; } - FREE(tempDeform); - - spTimelineArray_add(timelines, (spTimeline *) timeline); } } } @@ -917,20 +954,20 @@ static short *_readShortArray(_dataInput *input, int *length) { return array; } -static void _readVertices(spSkeletonBinary *self, _dataInput *input, spVertexAttachment *attachment, - int vertexCount) { +static void _readVertices(spSkeletonBinary *self, _dataInput *input, int *bonesCount, int **bones2, int *verticesCount, + float **vertices, int *worldVerticesLength, int vertexCount) { int i, ii; int verticesLength = vertexCount << 1; spFloatArray *weights = spFloatArray_create(8); spIntArray *bones = spIntArray_create(8); - attachment->worldVerticesLength = verticesLength; + *worldVerticesLength = verticesLength; if (!readBoolean(input)) { - attachment->verticesCount = verticesLength; - attachment->vertices = _readFloatArray(input, verticesLength, self->scale); - attachment->bonesCount = 0; - attachment->bones = 0; + *verticesCount = verticesLength; + *vertices = _readFloatArray(input, verticesLength, self->scale); + *bonesCount = 0; + *bones2 = NULL; spFloatArray_dispose(weights); spIntArray_dispose(bones); return; @@ -950,12 +987,12 @@ static void _readVertices(spSkeletonBinary *self, _dataInput *input, spVertexAtt } } - attachment->verticesCount = weights->size; - attachment->vertices = weights->items; + *verticesCount = weights->size; + *vertices = weights->items; FREE(weights); - attachment->bonesCount = bones->size; - attachment->bones = bones->items; + *bonesCount = bones->size; + *bones2 = bones->items; FREE(bones); } @@ -972,33 +1009,52 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput switch (type) { case SP_ATTACHMENT_REGION: { const char *path = readStringRef(input, skeletonData); - spAttachment *attachment; - spRegionAttachment *region; + float rotation, x, y, scaleX, scaleY, width, height; + spColor color; + spSequence *sequence; if (!path) MALLOC_STR(path, name); else { const char *tmp = 0; MALLOC_STR(tmp, path); path = tmp; } - attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path); - region = SUB_CAST(spRegionAttachment, attachment); - region->path = path; - region->rotation = readFloat(input); - region->x = readFloat(input) * self->scale; - region->y = readFloat(input) * self->scale; - region->scaleX = readFloat(input); - region->scaleY = readFloat(input); - region->width = readFloat(input) * self->scale; - region->height = readFloat(input) * self->scale; - readColor(input, ®ion->color.r, ®ion->color.g, ®ion->color.b, ®ion->color.a); - spRegionAttachment_updateOffset(region); - spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment); - return attachment; + + rotation = readFloat(input); + x = readFloat(input) * self->scale; + y = readFloat(input) * self->scale; + scaleX = readFloat(input); + scaleY = readFloat(input); + width = readFloat(input) * self->scale; + height = readFloat(input) * self->scale; + readColor(input, &color.r, &color.g, &color.b, &color.a); + sequence = readSequence(input); + { + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, + path, sequence); + spRegionAttachment *region = SUB_CAST(spRegionAttachment, attachment); + region->path = path; + region->rotation = rotation; + region->x = x; + region->y = y; + region->scaleX = scaleX; + region->scaleY = scaleY; + region->width = width; + region->height = height; + spColor_setFromColor(®ion->color, &color); + region->sequence = sequence; + if (sequence == NULL) spRegionAttachment_updateRegion(region); + spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment); + return attachment; + } } case SP_ATTACHMENT_BOUNDING_BOX: { int vertexCount = readVarint(input, 1); - spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0); - _readVertices(self, input, SUB_CAST(spVertexAttachment, attachment), vertexCount); + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, + NULL); + spVertexAttachment *vertexAttachment = SUB_CAST(spVertexAttachment, attachment); + _readVertices(self, input, &vertexAttachment->bonesCount, &vertexAttachment->bones, + &vertexAttachment->verticesCount, &vertexAttachment->vertices, + &vertexAttachment->worldVerticesLength, vertexCount); if (nonessential) { spBoundingBoxAttachment *bbox = SUB_CAST(spBoundingBoxAttachment, attachment); readColor(input, &bbox->color.r, &bbox->color.g, &bbox->color.b, &bbox->color.a); @@ -1008,43 +1064,73 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput } case SP_ATTACHMENT_MESH: { int vertexCount; - spAttachment *attachment; - spMeshAttachment *mesh; const char *path = readStringRef(input, skeletonData); + spColor color; + float *regionUVs; + unsigned short *triangles; + int trianglesCount; + int *bones; + int bonesCount; + float *vertices; + int verticesCount; + int worldVerticesLength; + int hullLength; + spSequence *sequence; + int *edges = NULL; + int edgesCount = 0; + float width = 0; + float height = 0; if (!path) MALLOC_STR(path, name); else { const char *tmp = 0; MALLOC_STR(tmp, path); path = tmp; } - attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path); - mesh = SUB_CAST(spMeshAttachment, attachment); - mesh->path = path; - readColor(input, &mesh->color.r, &mesh->color.g, &mesh->color.b, &mesh->color.a); + + readColor(input, &color.r, &color.g, &color.b, &color.a); vertexCount = readVarint(input, 1); - mesh->regionUVs = _readFloatArray(input, vertexCount << 1, 1); - mesh->triangles = (unsigned short *) _readShortArray(input, &mesh->trianglesCount); - _readVertices(self, input, SUPER(mesh), vertexCount); - spMeshAttachment_updateUVs(mesh); - mesh->hullLength = readVarint(input, 1) << 1; + regionUVs = _readFloatArray(input, vertexCount << 1, 1); + triangles = (unsigned short *) _readShortArray(input, &trianglesCount); + _readVertices(self, input, &bonesCount, &bones, &verticesCount, &vertices, &worldVerticesLength, vertexCount); + hullLength = readVarint(input, 1) << 1; + sequence = readSequence(input); if (nonessential) { - mesh->edges = (int *) _readShortArray(input, &mesh->edgesCount); - mesh->width = readFloat(input) * self->scale; - mesh->height = readFloat(input) * self->scale; - } else { - mesh->edges = 0; - mesh->width = 0; - mesh->height = 0; + edges = (int *) _readShortArray(input, &edgesCount); + width = readFloat(input) * self->scale; + height = readFloat(input) * self->scale; + } + + { + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path, sequence); + spMeshAttachment *mesh = SUB_CAST(spMeshAttachment, attachment); + mesh->path = path; + spColor_setFromColor(&mesh->color, &color); + mesh->regionUVs = regionUVs; + mesh->triangles = triangles; + mesh->trianglesCount = trianglesCount; + mesh->super.vertices = vertices; + mesh->super.verticesCount = verticesCount; + mesh->super.bones = bones; + mesh->super.bonesCount = bonesCount; + mesh->super.worldVerticesLength = worldVerticesLength; + mesh->hullLength = hullLength; + mesh->edges = edges; + mesh->edgesCount = edgesCount; + mesh->width = width; + mesh->height = height; + mesh->sequence = sequence; + if (sequence == NULL) spMeshAttachment_updateRegion(mesh); + spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment); + return attachment; } - spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment); - return attachment; } case SP_ATTACHMENT_LINKED_MESH: { + spColor color; + float width = 0, height = 0; const char *skinName; const char *parent; - spAttachment *attachment; - spMeshAttachment *mesh; - int inheritDeform; + int inheritTimeline; + spSequence *sequence; const char *path = readStringRef(input, skeletonData); if (!path) MALLOC_STR(path, name); else { @@ -1052,28 +1138,41 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput MALLOC_STR(tmp, path); path = tmp; } - attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path); - mesh = SUB_CAST(spMeshAttachment, attachment); - mesh->path = path; - readColor(input, &mesh->color.r, &mesh->color.g, &mesh->color.b, &mesh->color.a); + + readColor(input, &color.r, &color.g, &color.b, &color.a); skinName = readStringRef(input, skeletonData); parent = readStringRef(input, skeletonData); - inheritDeform = readBoolean(input); + inheritTimeline = readBoolean(input); + sequence = readSequence(input); if (nonessential) { - mesh->width = readFloat(input) * self->scale; - mesh->height = readFloat(input) * self->scale; + width = readFloat(input) * self->scale; + height = readFloat(input) * self->scale; + } + + { + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, path, sequence); + spMeshAttachment *mesh = SUB_CAST(spMeshAttachment, attachment); + mesh->path = path; + spColor_setFromColor(&mesh->color, &color); + mesh->sequence = sequence; + mesh->width = width; + mesh->height = height; + _spSkeletonBinary_addLinkedMesh(self, mesh, skinName, slotIndex, parent, inheritTimeline); + return attachment; } - _spSkeletonBinary_addLinkedMesh(self, mesh, skinName, slotIndex, parent, inheritDeform); - return attachment; } case SP_ATTACHMENT_PATH: { - spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0); + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, + NULL); spPathAttachment *path = SUB_CAST(spPathAttachment, attachment); + spVertexAttachment *vertexAttachment = SUPER(path); int vertexCount = 0; path->closed = readBoolean(input); path->constantSpeed = readBoolean(input); vertexCount = readVarint(input, 1); - _readVertices(self, input, SUPER(path), vertexCount); + _readVertices(self, input, &vertexAttachment->bonesCount, &vertexAttachment->bones, + &vertexAttachment->verticesCount, &vertexAttachment->vertices, + &vertexAttachment->worldVerticesLength, vertexCount); path->lengthsLength = vertexCount / 3; path->lengths = MALLOC(float, path->lengthsLength); for (i = 0; i < path->lengthsLength; ++i) { @@ -1086,7 +1185,8 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput return attachment; } case SP_ATTACHMENT_POINT: { - spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0); + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, + NULL); spPointAttachment *point = SUB_CAST(spPointAttachment, attachment); point->rotation = readFloat(input); point->x = readFloat(input) * self->scale; @@ -1101,9 +1201,13 @@ spAttachment *spSkeletonBinary_readAttachment(spSkeletonBinary *self, _dataInput case SP_ATTACHMENT_CLIPPING: { int endSlotIndex = readVarint(input, 1); int vertexCount = readVarint(input, 1); - spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0); + spAttachment *attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, name, 0, + NULL); spClippingAttachment *clip = SUB_CAST(spClippingAttachment, attachment); - _readVertices(self, input, SUB_CAST(spVertexAttachment, attachment), vertexCount); + spVertexAttachment *vertexAttachment = SUPER(clip); + _readVertices(self, input, &vertexAttachment->bonesCount, &vertexAttachment->bones, + &vertexAttachment->verticesCount, &vertexAttachment->vertices, + &vertexAttachment->worldVerticesLength, vertexCount); if (nonessential) { readColor(input, &clip->color.r, &clip->color.g, &clip->color.b, &clip->color.a); } @@ -1168,6 +1272,18 @@ spSkeletonData *spSkeletonBinary_readSkeletonDataFile(spSkeletonBinary *self, co return skeletonData; } +static int string_starts_with(const char *str, const char *needle) { + int lenStr, lenNeedle, i; + if (!str) return 0; + lenStr = strlen(str); + lenNeedle = strlen(needle); + if (lenStr < lenNeedle) return 0; + for (i = 0; i < lenNeedle; i++) { + if (str[i] != needle[i]) return 0; + } + return -1; +} + spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const unsigned char *binary, const int length) { int i, n, ii, nonessential; @@ -1189,12 +1305,19 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const highHash = readInt(input); sprintf(buffer, "%x%x", highHash, lowHash); buffer[31] = 0; - skeletonData->hash = strdup(buffer); + MALLOC_STR(skeletonData->hash, buffer); skeletonData->version = readString(input); if (!strlen(skeletonData->version)) { FREE(skeletonData->version); skeletonData->version = 0; + } else { + if (!string_starts_with(skeletonData->version, SPINE_VERSION_STRING)) { + char errorMsg[255]; + sprintf(errorMsg, "Skeleton version %s does not match runtime version %s", skeletonData->version, SPINE_VERSION_STRING); + _spSkeletonBinary_setError(self, errorMsg, NULL); + return NULL; + } } skeletonData->x = readFloat(input); @@ -1418,11 +1541,10 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const _spSkeletonBinary_setError(self, "Parent mesh not found: ", linkedMesh->parent); return NULL; } - linkedMesh->mesh->super.deformAttachment = linkedMesh->inheritDeform ? SUB_CAST(spVertexAttachment, parent) - : SUB_CAST(spVertexAttachment, - linkedMesh->mesh); + linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritTimeline ? parent + : SUPER(SUPER(linkedMesh->mesh)); spMeshAttachment_setParentMesh(linkedMesh->mesh, SUB_CAST(spMeshAttachment, parent)); - spMeshAttachment_updateUVs(linkedMesh->mesh); + if (linkedMesh->mesh->region) spMeshAttachment_updateRegion(linkedMesh->mesh); spAttachmentLoader_configureAttachment(self->attachmentLoader, SUPER(SUPER(linkedMesh->mesh))); } diff --git a/defold-spine/commonsrc/spine/SkeletonBounds.c b/defold-spine/commonsrc/spine/SkeletonBounds.c index 3500269..a873eb9 100644 --- a/defold-spine/commonsrc/spine/SkeletonBounds.c +++ b/defold-spine/commonsrc/spine/SkeletonBounds.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/SkeletonClipping.c b/defold-spine/commonsrc/spine/SkeletonClipping.c index 29a36e0..c3718ff 100644 --- a/defold-spine/commonsrc/spine/SkeletonClipping.c +++ b/defold-spine/commonsrc/spine/SkeletonClipping.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/SkeletonData.c b/defold-spine/commonsrc/spine/SkeletonData.c index bb927b7..ffb1c66 100644 --- a/defold-spine/commonsrc/spine/SkeletonData.c +++ b/defold-spine/commonsrc/spine/SkeletonData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/SkeletonJson.c b/defold-spine/commonsrc/spine/SkeletonJson.c index e6bbf63..b897df6 100644 --- a/defold-spine/commonsrc/spine/SkeletonJson.c +++ b/defold-spine/commonsrc/spine/SkeletonJson.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -28,22 +28,19 @@ *****************************************************************************/ #include "Json.h" +#include #include #include #include #include #include -#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) -#define strdup _strdup -#endif - typedef struct { const char *parent; const char *skin; int slotIndex; spMeshAttachment *mesh; - int inheritDeform; + int inheritTimeline; } _spLinkedMesh; typedef struct { @@ -109,6 +106,8 @@ static void toColor2(spColor *color, const char *value, int /*bool*/ hasAlpha) { color->g = toColor(value, 1); color->b = toColor(value, 2); if (hasAlpha) color->a = toColor(value, 3); + else + color->a = 1.0f; } static void @@ -188,6 +187,16 @@ readTimeline2(Json *keyMap, spCurveTimeline2 *timeline, const char *name1, const return SUPER(timeline); } +static spSequence *readSequence(Json *item) { + spSequence *sequence; + if (item == NULL) return NULL; + sequence = spSequence_create(Json_getInt(item, "count", 0)); + sequence->start = Json_getInt(item, "start", 1); + sequence->digits = Json_getInt(item, "digits", 0); + sequence->setupIndex = Json_getInt(item, "setupIndex", 0); + return sequence; +} + static void _spSkeletonJson_addLinkedMesh(spSkeletonJson *self, spMeshAttachment *mesh, const char *skin, int slotIndex, const char *parent, int inheritDeform) { _spLinkedMesh *linkedMesh; @@ -208,7 +217,7 @@ static void _spSkeletonJson_addLinkedMesh(spSkeletonJson *self, spMeshAttachment linkedMesh->skin = skin; linkedMesh->slotIndex = slotIndex; linkedMesh->parent = parent; - linkedMesh->inheritDeform = inheritDeform; + linkedMesh->inheritTimeline = inheritDeform; } static void cleanUpTimelines(spTimelineArray *timelines) { @@ -268,10 +277,11 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro Json *ik = Json_getItem(root, "ik"); Json *transform = Json_getItem(root, "transform"); Json *paths = Json_getItem(root, "path"); - Json *deformJson = Json_getItem(root, "deform"); + Json *attachmentsJson = Json_getItem(root, "attachments"); Json *drawOrderJson = Json_getItem(root, "drawOrder"); Json *events = Json_getItem(root, "events"); - Json *boneMap, *slotMap, *constraintMap, *keyMap, *nextMap, *curve, *timelineMap; + Json *boneMap, *slotMap, *keyMap, *nextMap, *curve, *timelineMap; + Json *attachmentsMap, *constraintMap; int frame, bezier, i, n; spColor color, color2, newColor, newColor2; @@ -286,7 +296,7 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro spAttachmentTimeline *timeline = spAttachmentTimeline_create(frames, slotIndex); for (keyMap = timelineMap->child, frame = 0; keyMap; keyMap = keyMap->next, ++frame) { spAttachmentTimeline_setFrame(timeline, frame, Json_getFloat(keyMap, "time", 0), - Json_getItem(keyMap, "name")->valueString); + Json_getItem(keyMap, "name") ? Json_getItem(keyMap, "name")->valueString : NULL); } spTimelineArray_add(timelines, SUPER(timeline)); @@ -691,82 +701,114 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro } } - /* Deform timelines. */ - for (constraintMap = deformJson ? deformJson->child : 0; constraintMap; constraintMap = constraintMap->next) { - spSkin *skin = spSkeletonData_findSkin(skeletonData, constraintMap->name); - for (slotMap = constraintMap->child; slotMap; slotMap = slotMap->next) { + /* Attachment timelines. */ + for (attachmentsMap = attachmentsJson ? attachmentsJson->child : 0; attachmentsMap; attachmentsMap = attachmentsMap->next) { + spSkin *skin = spSkeletonData_findSkin(skeletonData, attachmentsMap->name); + for (slotMap = attachmentsMap->child; slotMap; slotMap = slotMap->next) { + Json *attachmentMap; int slotIndex = findSlotIndex(self, skeletonData, slotMap->name, timelines); if (slotIndex == -1) return NULL; - for (timelineMap = slotMap->child; timelineMap; timelineMap = timelineMap->next) { - float *tempDeform; - spVertexAttachment *attachment; - int weighted, deformLength; - spDeformTimeline *timeline; - float time; - keyMap = timelineMap->child; - if (keyMap == NULL) continue; - - attachment = SUB_CAST(spVertexAttachment, spSkin_getAttachment(skin, slotIndex, timelineMap->name)); - if (!attachment) { + for (attachmentMap = slotMap->child; attachmentMap; attachmentMap = attachmentMap->next) { + spAttachment *baseAttachment = spSkin_getAttachment(skin, slotIndex, attachmentMap->name); + if (!baseAttachment) { cleanUpTimelines(timelines); - _spSkeletonJson_setError(self, 0, "Attachment not found: ", timelineMap->name); + _spSkeletonJson_setError(self, 0, "Attachment not found: ", attachmentMap->name); return NULL; } - weighted = attachment->bones != 0; - deformLength = weighted ? attachment->verticesCount / 3 * 2 : attachment->verticesCount; - tempDeform = MALLOC(float, deformLength); - timeline = spDeformTimeline_create(timelineMap->size, deformLength, timelineMap->size, slotIndex, - attachment); - - time = Json_getFloat(keyMap, "time", 0); - for (frame = 0, bezier = 0;; ++frame) { - Json *vertices = Json_getItem(keyMap, "vertices"); - float *deform; - float time2; - if (!vertices) { - if (weighted) { - deform = tempDeform; - memset(deform, 0, sizeof(float) * deformLength); - } else - deform = attachment->vertices; - } else { - int v, start = Json_getInt(keyMap, "offset", 0); - Json *vertex; - deform = tempDeform; - memset(deform, 0, sizeof(float) * start); - if (self->scale == 1) { - for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v) - deform[v] = vertex->valueFloat; - } else { - for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v) - deform[v] = vertex->valueFloat * self->scale; + for (timelineMap = attachmentMap->child; timelineMap; timelineMap = timelineMap->next) { + int frames; + const char *timelineName; + keyMap = timelineMap->child; + if (keyMap == NULL) continue; + frames = timelineMap->size; + timelineName = timelineMap->name; + if (!strcmp("deform", timelineName)) { + float *tempDeform; + spVertexAttachment *vertexAttachment; + int weighted, deformLength; + spDeformTimeline *timeline; + float time; + + vertexAttachment = SUB_CAST(spVertexAttachment, baseAttachment); + weighted = vertexAttachment->bones != 0; + deformLength = weighted ? vertexAttachment->verticesCount / 3 * 2 : vertexAttachment->verticesCount; + tempDeform = MALLOC(float, deformLength); + + timeline = spDeformTimeline_create(timelineMap->size, deformLength, timelineMap->size, + slotIndex, + vertexAttachment); + + time = Json_getFloat(keyMap, "time", 0); + for (frame = 0, bezier = 0;; ++frame) { + Json *vertices = Json_getItem(keyMap, "vertices"); + float *deform; + float time2; + + if (!vertices) { + if (weighted) { + deform = tempDeform; + memset(deform, 0, sizeof(float) * deformLength); + } else + deform = vertexAttachment->vertices; + } else { + int v, start = Json_getInt(keyMap, "offset", 0); + Json *vertex; + deform = tempDeform; + memset(deform, 0, sizeof(float) * start); + if (self->scale == 1) { + for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v) + deform[v] = vertex->valueFloat; + } else { + for (vertex = vertices->child, v = start; vertex; vertex = vertex->next, ++v) + deform[v] = vertex->valueFloat * self->scale; + } + memset(deform + v, 0, sizeof(float) * (deformLength - v)); + if (!weighted) { + float *verticesValues = vertexAttachment->vertices; + for (v = 0; v < deformLength; ++v) + deform[v] += verticesValues[v]; + } + } + spDeformTimeline_setFrame(timeline, frame, time, deform); + nextMap = keyMap->next; + if (!nextMap) { + /* timeline.shrink(); // BOZO */ + break; + } + time2 = Json_getFloat(nextMap, "time", 0); + curve = Json_getItem(keyMap, "curve"); + if (curve) { + bezier = readCurve(curve, SUPER(timeline), bezier, frame, 0, time, time2, 0, 1, 1); + } + time = time2; + keyMap = nextMap; } - memset(deform + v, 0, sizeof(float) * (deformLength - v)); - if (!weighted) { - float *verticesValues = attachment->vertices; - for (v = 0; v < deformLength; ++v) - deform[v] += verticesValues[v]; + FREE(tempDeform); + + spTimelineArray_add(timelines, SUPER(SUPER(timeline))); + } else if (!strcmp(timelineName, "sequence")) { + spSequenceTimeline *timeline = spSequenceTimeline_create(frames, slotIndex, baseAttachment); + float lastDelay = 0; + for (frame = 0; keyMap != NULL; keyMap = keyMap->next, frame++) { + float delay = Json_getFloat(keyMap, "delay", lastDelay); + float time = Json_getFloat(keyMap, "time", 0); + const char *modeString = Json_getString(keyMap, "mode", "hold"); + int index = Json_getInt(keyMap, "index", 0); + int mode = SP_SEQUENCE_MODE_HOLD; + if (!strcmp(modeString, "once")) mode = SP_SEQUENCE_MODE_ONCE; + if (!strcmp(modeString, "loop")) mode = SP_SEQUENCE_MODE_LOOP; + if (!strcmp(modeString, "pingpong")) mode = SP_SEQUENCE_MODE_PINGPONG; + if (!strcmp(modeString, "onceReverse")) mode = SP_SEQUENCE_MODE_ONCEREVERSE; + if (!strcmp(modeString, "loopReverse")) mode = SP_SEQUENCE_MODE_LOOPREVERSE; + if (!strcmp(modeString, "pingpongReverse")) mode = SP_SEQUENCE_MODE_PINGPONGREVERSE; + spSequenceTimeline_setFrame(timeline, frame, time, mode, index, delay); + lastDelay = delay; } + spTimelineArray_add(timelines, SUPER(timeline)); } - spDeformTimeline_setFrame(timeline, frame, time, deform); - nextMap = keyMap->next; - if (!nextMap) { - /* timeline.shrink(); // BOZO */ - break; - } - time2 = Json_getFloat(nextMap, "time", 0); - curve = Json_getItem(keyMap, "curve"); - if (curve) { - bezier = readCurve(curve, SUPER(timeline), bezier, frame, 0, time, time2, 0, 1, 1); - } - time = time2; - keyMap = nextMap; } - FREE(tempDeform); - - spTimelineArray_add(timelines, SUPER(SUPER(timeline))); } } } @@ -910,6 +952,18 @@ spSkeletonData *spSkeletonJson_readSkeletonDataFile(spSkeletonJson *self, const return skeletonData; } +static int string_starts_with(const char *str, const char *needle) { + int lenStr, lenNeedle, i; + if (!str) return 0; + lenStr = (int) strlen(str); + lenNeedle = (int) strlen(needle); + if (lenStr < lenNeedle) return 0; + for (i = 0; i < lenNeedle; i++) { + if (str[i] != needle[i]) return 0; + } + return -1; +} + spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char *json) { int i, ii; spSkeletonData *skeletonData; @@ -932,15 +986,29 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char if (skeleton) { MALLOC_STR(skeletonData->hash, Json_getString(skeleton, "hash", 0)); MALLOC_STR(skeletonData->version, Json_getString(skeleton, "spine", 0)); + if (!string_starts_with(skeletonData->version, SPINE_VERSION_STRING)) { + char errorMsg[255]; + sprintf(errorMsg, "Skeleton version %s does not match runtime version %s", skeletonData->version, SPINE_VERSION_STRING); + _spSkeletonJson_setError(self, 0, errorMsg, NULL); + return NULL; + } skeletonData->x = Json_getFloat(skeleton, "x", 0); skeletonData->y = Json_getFloat(skeleton, "y", 0); skeletonData->width = Json_getFloat(skeleton, "width", 0); skeletonData->height = Json_getFloat(skeleton, "height", 0); skeletonData->fps = Json_getFloat(skeleton, "fps", 30); skeletonData->imagesPath = Json_getString(skeleton, "images", 0); - if (skeletonData->imagesPath) skeletonData->imagesPath = strdup(skeletonData->imagesPath); + if (skeletonData->imagesPath) { + char *tmp = NULL; + MALLOC_STR(tmp, skeletonData->imagesPath); + skeletonData->imagesPath = tmp; + } skeletonData->audioPath = Json_getString(skeleton, "audio", 0); - if (skeletonData->audioPath) skeletonData->audioPath = strdup(skeletonData->audioPath); + if (skeletonData->audioPath) { + char *tmp = NULL; + MALLOC_STR(tmp, skeletonData->audioPath); + skeletonData->audioPath = tmp; + } } /* Bones. */ @@ -1136,6 +1204,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char data->offsetScaleY = Json_getFloat(constraintMap, "scaleY", 0); data->offsetShearY = Json_getFloat(constraintMap, "shearY", 0); + data->mixRotate = Json_getFloat(constraintMap, "mixRotate", 1); data->mixX = Json_getFloat(constraintMap, "mixX", 1); data->mixY = Json_getFloat(constraintMap, "mixY", data->mixX); data->mixScaleX = Json_getFloat(constraintMap, "mixScaleX", 1); @@ -1191,6 +1260,8 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char data->spacingMode = SP_SPACING_MODE_FIXED; else if (strcmp(item, "percent") == 0) data->spacingMode = SP_SPACING_MODE_PERCENT; + else + data->spacingMode = SP_SPACING_MODE_PROPORTIONAL; item = Json_getString(constraintMap, "rotateMode", "tangent"); if (strcmp(item, "tangent") == 0) data->rotateMode = SP_ROTATE_MODE_TANGENT; @@ -1297,6 +1368,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char const char *path = Json_getString(attachmentMap, "path", attachmentName); const char *color; Json *entry; + spSequence *sequence; const char *typeString = Json_getString(attachmentMap, "type", "region"); spAttachmentType type; @@ -1319,8 +1391,9 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char return NULL; } + sequence = readSequence(Json_getItem(attachmentMap, "sequence")); attachment = spAttachmentLoader_createAttachment(self->attachmentLoader, skin, type, attachmentName, - path); + path, sequence); if (!attachment) { if (self->attachmentLoader->error1) { spSkeletonData_dispose(skeletonData); @@ -1342,6 +1415,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char region->rotation = Json_getFloat(attachmentMap, "rotation", 0); region->width = Json_getFloat(attachmentMap, "width", 32) * self->scale; region->height = Json_getFloat(attachmentMap, "height", 32) * self->scale; + region->sequence = sequence; color = Json_getString(attachmentMap, "color", 0); if (color) { @@ -1352,7 +1426,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char toColor(color, 3)); } - spRegionAttachment_updateOffset(region); + if (region->region != NULL) spRegionAttachment_updateRegion(region); spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment); break; @@ -1374,6 +1448,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char mesh->width = Json_getFloat(attachmentMap, "width", 32) * self->scale; mesh->height = Json_getFloat(attachmentMap, "height", 32) * self->scale; + mesh->sequence = sequence; entry = Json_getItem(attachmentMap, "parent"); if (!entry) { @@ -1392,7 +1467,7 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char _readVertices(self, attachmentMap, SUPER(mesh), verticesLength); - spMeshAttachment_updateUVs(mesh); + if (mesh->region != NULL) spMeshAttachment_updateRegion(mesh); mesh->hullLength = Json_getInt(attachmentMap, "hull", 0); @@ -1406,10 +1481,10 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char spAttachmentLoader_configureAttachment(self->attachmentLoader, attachment); } else { - int inheritDeform = Json_getInt(attachmentMap, "deform", 1); + int inheritTimelines = Json_getInt(attachmentMap, "timelines", 1); _spSkeletonJson_addLinkedMesh(self, SUB_CAST(spMeshAttachment, attachment), Json_getString(attachmentMap, "skin", 0), slot->index, - entry->valueString, inheritDeform); + entry->valueString, inheritTimelines); } break; } @@ -1514,11 +1589,10 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char _spSkeletonJson_setError(self, 0, "Parent mesh not found: ", linkedMesh->parent); return NULL; } - linkedMesh->mesh->super.deformAttachment = linkedMesh->inheritDeform ? SUB_CAST(spVertexAttachment, parent) - : SUB_CAST(spVertexAttachment, - linkedMesh->mesh); + linkedMesh->mesh->super.timelineAttachment = linkedMesh->inheritTimeline ? parent + : SUPER(SUPER(linkedMesh->mesh)); spMeshAttachment_setParentMesh(linkedMesh->mesh, SUB_CAST(spMeshAttachment, parent)); - spMeshAttachment_updateUVs(linkedMesh->mesh); + if (linkedMesh->mesh->region != NULL) spMeshAttachment_updateRegion(linkedMesh->mesh); spAttachmentLoader_configureAttachment(self->attachmentLoader, SUPER(SUPER(linkedMesh->mesh))); } diff --git a/defold-spine/commonsrc/spine/Skin.c b/defold-spine/commonsrc/spine/Skin.c index 1894aec..517844b 100644 --- a/defold-spine/commonsrc/spine/Skin.c +++ b/defold-spine/commonsrc/spine/Skin.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/Slot.c b/defold-spine/commonsrc/spine/Slot.c index d227790..3973d77 100644 --- a/defold-spine/commonsrc/spine/Slot.c +++ b/defold-spine/commonsrc/spine/Slot.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -30,13 +30,8 @@ #include #include -typedef struct { - spSlot super; - float attachmentTime; -} _spSlot; - spSlot *spSlot_create(spSlotData *data, spBone *bone) { - spSlot *self = SUPER(NEW(_spSlot)); + spSlot *self = NEW(spSlot); CONST_CAST(spSlotData *, self->data) = data; CONST_CAST(spBone *, self->bone) = bone; spColor_setFromFloats(&self->color, 1, 1, 1, 1); @@ -68,20 +63,12 @@ void spSlot_setAttachment(spSlot *self, spAttachment *attachment) { if (attachment == self->attachment) return; if (!isVertexAttachment(attachment) || - !isVertexAttachment(self->attachment) || (SUB_CAST(spVertexAttachment, attachment)->deformAttachment != SUB_CAST(spVertexAttachment, self->attachment)->deformAttachment)) { + !isVertexAttachment(self->attachment) || (SUB_CAST(spVertexAttachment, attachment)->timelineAttachment != SUB_CAST(spVertexAttachment, self->attachment)->timelineAttachment)) { self->deformCount = 0; } CONST_CAST(spAttachment *, self->attachment) = attachment; - SUB_CAST(_spSlot, self)->attachmentTime = self->bone->skeleton->time; -} - -void spSlot_setAttachmentTime(spSlot *self, float time) { - SUB_CAST(_spSlot, self)->attachmentTime = self->bone->skeleton->time - time; -} - -float spSlot_getAttachmentTime(const spSlot *self) { - return self->bone->skeleton->time - SUB_CAST(_spSlot, self)->attachmentTime; + self->sequenceIndex = -1; } void spSlot_setToSetupPose(spSlot *self) { diff --git a/defold-spine/commonsrc/spine/SlotData.c b/defold-spine/commonsrc/spine/SlotData.c index 1bbdde0..424ac73 100644 --- a/defold-spine/commonsrc/spine/SlotData.c +++ b/defold-spine/commonsrc/spine/SlotData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/TransformConstraint.c b/defold-spine/commonsrc/spine/TransformConstraint.c index 96e1740..ec67f28 100644 --- a/defold-spine/commonsrc/spine/TransformConstraint.c +++ b/defold-spine/commonsrc/spine/TransformConstraint.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -240,7 +240,7 @@ void _spTransformConstraint_applyRelativeLocal(spTransformConstraint *self) { } void spTransformConstraint_update(spTransformConstraint *self) { - if (self->mixRotate == 0 && self->mixX == 0 && self->mixY == 0 && self->mixScaleX == 0 && self->mixScaleX == 0 && + if (self->mixRotate == 0 && self->mixX == 0 && self->mixY == 0 && self->mixScaleX == 0 && self->mixScaleY == 0 && self->mixShearY == 0) return; diff --git a/defold-spine/commonsrc/spine/TransformConstraintData.c b/defold-spine/commonsrc/spine/TransformConstraintData.c index 91a94ff..01284d8 100644 --- a/defold-spine/commonsrc/spine/TransformConstraintData.c +++ b/defold-spine/commonsrc/spine/TransformConstraintData.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/Triangulator.c b/defold-spine/commonsrc/spine/Triangulator.c index cec7183..c3d6701 100644 --- a/defold-spine/commonsrc/spine/Triangulator.c +++ b/defold-spine/commonsrc/spine/Triangulator.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine/VertexAttachment.c b/defold-spine/commonsrc/spine/VertexAttachment.c index f6d62df..23ac0a4 100644 --- a/defold-spine/commonsrc/spine/VertexAttachment.c +++ b/defold-spine/commonsrc/spine/VertexAttachment.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -35,7 +35,7 @@ static int nextID = 0; void _spVertexAttachment_init(spVertexAttachment *attachment) { attachment->id = nextID++; - attachment->deformAttachment = attachment; + attachment->timelineAttachment = SUPER(attachment); } void _spVertexAttachment_deinit(spVertexAttachment *attachment) { @@ -52,6 +52,11 @@ void spVertexAttachment_computeWorldVertices(spVertexAttachment *self, spSlot *s float *vertices; int *bones; + if (self->super.type == SP_ATTACHMENT_MESH || self->super.type == SP_ATTACHMENT_LINKED_MESH) { + spMeshAttachment *mesh = SUB_CAST(spMeshAttachment, self); + if (mesh->sequence) spSequence_apply(mesh->sequence, slot, SUPER(self)); + } + count = offset + (count >> 1) * stride; skeleton = slot->bone->skeleton; deformLength = slot->deformCount; diff --git a/defold-spine/commonsrc/spine/VertexEffect.c b/defold-spine/commonsrc/spine/VertexEffect.c deleted file mode 100644 index 6721fd1..0000000 --- a/defold-spine/commonsrc/spine/VertexEffect.c +++ /dev/null @@ -1,112 +0,0 @@ -/****************************************************************************** - * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. - * - * Copyright (c) 2013-2020, Esoteric Software LLC - * - * Integration of the Spine Runtimes into software or otherwise creating - * derivative works of the Spine Runtimes is permitted under the terms and - * conditions of Section 2 of the Spine Editor License Agreement: - * http://esotericsoftware.com/spine-editor-license - * - * Otherwise, it is permitted to integrate the Spine Runtimes into software - * or otherwise create derivative works of the Spine Runtimes (collectively, - * "Products"), provided that each user of the Products must obtain their own - * Spine Editor license and redistribution of the Products in any form must - * include this license and copyright notice. - * - * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, - * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - *****************************************************************************/ - -#include -#include - -void _spJitterVertexEffect_begin(spVertexEffect *self, spSkeleton *skeleton) { - UNUSED(self); - UNUSED(skeleton); -} - -void _spJitterVertexEffect_transform(spVertexEffect *self, float *x, float *y, float *u, float *v, spColor *light, - spColor *dark) { - spJitterVertexEffect *internal = (spJitterVertexEffect *) self; - float jitterX = internal->jitterX; - float jitterY = internal->jitterY; - (*x) += _spMath_randomTriangular(-jitterX, jitterY); - (*y) += _spMath_randomTriangular(-jitterX, jitterY); - UNUSED(u); - UNUSED(v); - UNUSED(light); - UNUSED(dark); -} - -void _spJitterVertexEffect_end(spVertexEffect *self) { - UNUSED(self); -} - -spJitterVertexEffect *spJitterVertexEffect_create(float jitterX, float jitterY) { - spJitterVertexEffect *effect = CALLOC(spJitterVertexEffect, 1); - effect->super.begin = _spJitterVertexEffect_begin; - effect->super.transform = _spJitterVertexEffect_transform; - effect->super.end = _spJitterVertexEffect_end; - effect->jitterX = jitterX; - effect->jitterY = jitterY; - return effect; -} - -void spJitterVertexEffect_dispose(spJitterVertexEffect *effect) { - FREE(effect); -} - -void _spSwirlVertexEffect_begin(spVertexEffect *self, spSkeleton *skeleton) { - spSwirlVertexEffect *internal = (spSwirlVertexEffect *) self; - internal->worldX = skeleton->x + internal->centerX; - internal->worldY = skeleton->y + internal->centerY; -} - -void _spSwirlVertexEffect_transform(spVertexEffect *self, float *positionX, float *positionY, float *u, float *v, - spColor *light, spColor *dark) { - spSwirlVertexEffect *internal = (spSwirlVertexEffect *) self; - float radAngle = internal->angle * DEG_RAD; - float x = *positionX - internal->worldX; - float y = *positionY - internal->worldY; - float dist = SQRT(x * x + y * y); - if (dist < internal->radius) { - float theta = _spMath_interpolate(_spMath_pow2_apply, 0, radAngle, - (internal->radius - dist) / internal->radius); - float cosine = COS(theta); - float sine = SIN(theta); - (*positionX) = cosine * x - sine * y + internal->worldX; - (*positionY) = sine * x + cosine * y + internal->worldY; - } - UNUSED(self); - UNUSED(u); - UNUSED(v); - UNUSED(light); - UNUSED(dark); -} - -void _spSwirlVertexEffect_end(spVertexEffect *self) { - UNUSED(self); -} - -spSwirlVertexEffect *spSwirlVertexEffect_create(float radius) { - spSwirlVertexEffect *effect = CALLOC(spSwirlVertexEffect, 1); - effect->super.begin = _spSwirlVertexEffect_begin; - effect->super.transform = _spSwirlVertexEffect_transform; - effect->super.end = _spSwirlVertexEffect_end; - effect->radius = radius; - return effect; -} - -void spSwirlVertexEffect_dispose(spSwirlVertexEffect *effect) { - FREE(effect); -} diff --git a/defold-spine/commonsrc/spine/extension.c b/defold-spine/commonsrc/spine/extension.c index eff84dc..85b8d30 100644 --- a/defold-spine/commonsrc/spine/extension.c +++ b/defold-spine/commonsrc/spine/extension.c @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/commonsrc/spine_loader.cpp b/defold-spine/commonsrc/spine_loader.cpp index d6855c9..ef40b2a 100644 --- a/defold-spine/commonsrc/spine_loader.cpp +++ b/defold-spine/commonsrc/spine_loader.cpp @@ -2,6 +2,7 @@ extern "C" { #include #include +#include #include } @@ -143,8 +144,9 @@ namespace dmSpine // Since this struct is only used as a placeholder to show which values are needed // we only set the ones we care about - spAtlasRegion* region = ®ions[i]; - memset(region, 0, sizeof(spAtlasRegion)); + spAtlasRegion* atlasRegion = ®ions[i]; + memset(atlasRegion, 0, sizeof(spAtlasRegion)); + spTextureRegion* region = SUPER(atlasRegion); if (unrotated) { @@ -207,8 +209,28 @@ namespace dmSpine return ®ions[*anim_index]; } + static bool loadSequence(dmHashTable64* name_to_index, spAtlasRegion* atlasRegions, const char *basePath, spSequence *sequence, spAtlasRegion* default_region) { + bool is_atlas_available = name_to_index != 0; + + spTextureRegionArray *regions = sequence->regions; + char *path = (char*)MALLOC(char, strlen(basePath) + sequence->digits + 1); + path[0] = 0; + int i; + for (i = 0; i < regions->size; i++) { + spSequence_getPath(sequence, basePath, i, path); + regions->items[i] = is_atlas_available ? SUPER(FindAtlasRegion(name_to_index, atlasRegions, path)) : SUPER(default_region); + if (!regions->items[i]) { + FREE(path); + return false; + } + regions->items[i]->rendererObject = regions->items[i]; + } + FREE(path); + return true; + } + static spAttachment* spDefoldAtlasAttachmentLoader_createAttachment(spAttachmentLoader* loader, spSkin* skin, spAttachmentType type, - const char* name, const char* path) + const char* name, const char* path, spSequence *sequence) { spDefoldAtlasAttachmentLoader* self = SUB_CAST(spDefoldAtlasAttachmentLoader, loader); bool is_atlas_available = self->name_to_index != 0; @@ -217,63 +239,66 @@ namespace dmSpine spAtlasRegion default_region; if (!is_atlas_available) { - default_region.u = default_region.v = default_region.u2 = default_region.v2 = default_region.degrees = 0; - default_region.offsetX = default_region.offsetY = 0; - default_region.width = default_region.height = 0; - default_region.originalWidth = default_region.originalHeight = 0; + spTextureRegion* textureRegion = &default_region.super; + textureRegion->u = textureRegion->v = textureRegion->u2 = textureRegion->v2 = textureRegion->degrees = 0; + textureRegion->offsetX = textureRegion->offsetY = 0; + textureRegion->width = textureRegion->height = 0; + textureRegion->originalWidth = textureRegion->originalHeight = 0; } switch (type) { case SP_ATTACHMENT_REGION: { - spAtlasRegion* region; - if (is_atlas_available) - { - region = FindAtlasRegion(self->name_to_index, self->regions, path); - if (!region) { - _spAttachmentLoader_setError(loader, "Region not found: ", path); + spRegionAttachment* attachment = spRegionAttachment_create(name); + if (sequence) { + if (!loadSequence(self->name_to_index, self->regions, path, sequence, &default_region)) { + spAttachment_dispose(SUPER(attachment)); + _spAttachmentLoader_setError(loader, "Couldn't load sequence for region attachment: ", path); return 0; } } else { - region = &default_region; + spAtlasRegion* region; + if (is_atlas_available) + { + region = FindAtlasRegion(self->name_to_index, self->regions, path); + if (!region) { + spAttachment_dispose(SUPER(attachment)); + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + } else { + region = &default_region; + } + attachment->rendererObject = is_atlas_available ? region : 0; + attachment->region = SUPER(region); + spRegionAttachment_updateRegion(attachment); } - spRegionAttachment* attachment = spRegionAttachment_create(name); - attachment->rendererObject = is_atlas_available ? region : 0; - spRegionAttachment_setUVs(attachment, region->u, region->v, region->u2, region->v2, region->degrees); - attachment->regionOffsetX = region->offsetX; - attachment->regionOffsetY = region->offsetY; - attachment->regionWidth = region->width; - attachment->regionHeight = region->height; - attachment->regionOriginalWidth = region->originalWidth; - attachment->regionOriginalHeight = region->originalHeight; return SUPER(attachment); } case SP_ATTACHMENT_MESH: case SP_ATTACHMENT_LINKED_MESH: { - spAtlasRegion* region; - if (is_atlas_available) - { - region = FindAtlasRegion(self->name_to_index, self->regions, path); - if (!region) { - _spAttachmentLoader_setError(loader, "Region not found: ", path); + spMeshAttachment* attachment = spMeshAttachment_create(name); + if (sequence) { + if (!loadSequence(self->name_to_index, self->regions, path, sequence, &default_region)) { + spAttachment_dispose(SUPER(SUPER(attachment))); + _spAttachmentLoader_setError(loader, "Couldn't load sequence for mesh attachment: ", path); return 0; } + } else { + spAtlasRegion* region; + if (is_atlas_available) + { + region = FindAtlasRegion(self->name_to_index, self->regions, path); + if (!region) { + spAttachment_dispose(SUPER(SUPER(attachment))); + _spAttachmentLoader_setError(loader, "Region not found: ", path); + return 0; + } + } else { + region = &default_region; + } + attachment->rendererObject = is_atlas_available ? region : 0; + attachment->region = SUPER(region); } - else { - region = &default_region; - } - spMeshAttachment* attachment = spMeshAttachment_create(name); - attachment->rendererObject = is_atlas_available ? region : 0; - attachment->regionU = region->u; - attachment->regionV = region->v; - attachment->regionU2 = region->u2; - attachment->regionV2 = region->v2; - attachment->regionDegrees = region->degrees; - attachment->regionOffsetX = region->offsetX; - attachment->regionOffsetY = region->offsetY; - attachment->regionWidth = region->width; - attachment->regionHeight = region->height; - attachment->regionOriginalWidth = region->originalWidth; - attachment->regionOriginalHeight = region->originalHeight; return SUPER(SUPER(attachment)); } case SP_ATTACHMENT_BOUNDING_BOX: @@ -343,6 +368,8 @@ namespace dmSpine spSkeletonData* skeletonData = spSkeletonJson_readSkeletonData(skeleton_json, (const char *)json_data); if (!skeletonData) { + loader->error1 = strdup(skeleton_json->error ? skeleton_json->error : "unknown error"); + spSkeletonJson_dispose(skeleton_json); dmLogError("Failed to read spine skeleton for %s: %s", path, skeleton_json->error); return 0; } diff --git a/defold-spine/commonsrc/vertices.cpp b/defold-spine/commonsrc/vertices.cpp index 06addf0..945d822 100644 --- a/defold-spine/commonsrc/vertices.cpp +++ b/defold-spine/commonsrc/vertices.cpp @@ -76,7 +76,7 @@ void GetSkeletonBounds(const spSkeleton* skeleton, SpineModelBounds& bounds) // the rectangular region attachment. This assumes the world transform of the // bone to which the slot (and hence attachment) is attached has been calculated // before rendering via spSkeleton_updateWorldTransform - spRegionAttachment_computeWorldVertices(regionAttachment, slot->bone, scratch.Begin(), 0, 2); + spRegionAttachment_computeWorldVertices(regionAttachment, slot, scratch.Begin(), 0, 2); num_world_vertices = 4; } else if (attachment->type == SP_ATTACHMENT_MESH) @@ -188,7 +188,7 @@ uint32_t GenerateVertexData(dmArray& vertex_buffer, const spSkeleto // the rectangular region attachment. This assumes the world transform of the // bone to which the slot (and hence attachment) is attached has been calculated // before rendering via spSkeleton_updateWorldTransform - spRegionAttachment_computeWorldVertices(regionAttachment, slot->bone, scratch.Begin(), 0, 2); + spRegionAttachment_computeWorldVertices(regionAttachment, slot, scratch.Begin(), 0, 2); // Create 2 triangles, with 3 vertices each from the region's // world vertex positions and its UV coordinates (in the range [0-1]). diff --git a/defold-spine/editor/src/spineext.clj b/defold-spine/editor/src/spineext.clj index 3f7f404..c88b7d5 100644 --- a/defold-spine/editor/src/spineext.clj +++ b/defold-spine/editor/src/spineext.clj @@ -574,7 +574,8 @@ all-tx-data (concat tx-data (create-bones node-id bones))] all-tx-data) (catch Exception error - (handle-read-error error node-id resource))))) + (let [error-value (handle-read-error error node-id resource)] + (throw (ex-info (:message error-value) error-value))))))) (defn- build-spine-json [resource dep-resources user-data] {:resource resource :content (resource->bytes (:resource resource))}) diff --git a/defold-spine/include/spine/Animation.h b/defold-spine/include/spine/Animation.h index 587d12a..26aa66b 100644 --- a/defold-spine/include/spine/Animation.h +++ b/defold-spine/include/spine/Animation.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -99,6 +100,7 @@ typedef enum { SP_TIMELINE_SHEAR, SP_TIMELINE_TRANSLATE, SP_TIMELINE_DEFORM, + SP_TIMELINE_SEQUENCE, SP_TIMELINE_IKCONSTRAINT, SP_TIMELINE_PATHCONSTRAINTMIX, SP_TIMELINE_RGB2, @@ -131,7 +133,8 @@ typedef enum { SP_PROPERTY_TRANSFORMCONSTRAINT = 1 << 15, SP_PROPERTY_PATHCONSTRAINT_POSITION = 1 << 16, SP_PROPERTY_PATHCONSTRAINT_SPACING = 1 << 17, - SP_PROPERTY_PATHCONSTRAINT_MIX = 1 << 18 + SP_PROPERTY_PATHCONSTRAINT_MIX = 1 << 18, + SP_PROPERTY_SEQUENCE = 1 << 19 } spProperty; #define SP_MAX_PROPERTY_IDS 3 @@ -399,6 +402,20 @@ SP_API void spDeformTimeline_setFrame(spDeformTimeline *self, int frameIndex, fl /**/ +typedef struct spSequenceTimeline { + spTimeline super; + int slotIndex; + spAttachment *attachment; +} spSequenceTimeline; + +SP_API spSequenceTimeline *spSequenceTimeline_create(int framesCount, int slotIndex, spAttachment *attachment); + +SP_API void spSequenceTimeline_setFrame(spSequenceTimeline *self, int frameIndex, float time, int mode, int index, float delay); + +/**/ + +/**/ + typedef struct spEventTimeline { spTimeline super; spEvent **const events; diff --git a/defold-spine/include/spine/AnimationState.h b/defold-spine/include/spine/AnimationState.h index 0612eb5..fbbed37 100644 --- a/defold-spine/include/spine/AnimationState.h +++ b/defold-spine/include/spine/AnimationState.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -68,6 +68,7 @@ struct spTrackEntry { int /*boolean*/ loop; int /*boolean*/ holdPrevious; int /*boolean*/ reverse; + int /*boolean*/ shortestRotation; float eventThreshold, attachmentThreshold, drawOrderThreshold; float animationStart, animationEnd, animationLast, nextAnimationLast; float delay, trackTime, trackLast, nextTrackLast, trackEnd, timeScale; diff --git a/defold-spine/include/spine/AnimationStateData.h b/defold-spine/include/spine/AnimationStateData.h index f6dcb31..60c59a7 100644 --- a/defold-spine/include/spine/AnimationStateData.h +++ b/defold-spine/include/spine/AnimationStateData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Array.h b/defold-spine/include/spine/Array.h index d032c55..e4d98fd 100644 --- a/defold-spine/include/spine/Array.h +++ b/defold-spine/include/spine/Array.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -118,6 +118,65 @@ extern "C" { return self->items[self->size - 1]; \ } +#define _SP_ARRAY_IMPLEMENT_TYPE_NO_CONTAINS(name, itemType) \ + name* name##_create(int initialCapacity) { \ + name* array = CALLOC(name, 1); \ + array->size = 0; \ + array->capacity = initialCapacity; \ + array->items = CALLOC(itemType, initialCapacity); \ + return array; \ + } \ + void name##_dispose(name* self) { \ + FREE(self->items); \ + FREE(self); \ + } \ + void name##_clear(name* self) { \ + self->size = 0; \ + } \ + name* name##_setSize(name* self, int newSize) { \ + self->size = newSize; \ + if (self->capacity < newSize) { \ + self->capacity = MAX(8, (int)(self->size * 1.75f)); \ + self->items = REALLOC(self->items, itemType, self->capacity); \ + } \ + return self; \ + } \ + void name##_ensureCapacity(name* self, int newCapacity) { \ + if (self->capacity >= newCapacity) return; \ + self->capacity = newCapacity; \ + self->items = REALLOC(self->items, itemType, self->capacity); \ + } \ + void name##_add(name* self, itemType value) { \ + if (self->size == self->capacity) { \ + self->capacity = MAX(8, (int)(self->size * 1.75f)); \ + self->items = REALLOC(self->items, itemType, self->capacity); \ + } \ + self->items[self->size++] = value; \ + } \ + void name##_addAll(name* self, name* other) { \ + int i = 0; \ + for (; i < other->size; i++) { \ + name##_add(self, other->items[i]); \ + } \ + } \ + void name##_addAllValues(name* self, itemType* values, int offset, int count) { \ + int i = offset, n = offset + count; \ + for (; i < n; i++) { \ + name##_add(self, values[i]); \ + } \ + } \ + void name##_removeAt(name* self, int index) { \ + self->size--; \ + memmove(self->items + index, self->items + index + 1, sizeof(itemType) * (self->size - index)); \ + } \ + itemType name##_pop(name* self) { \ + itemType item = self->items[--self->size]; \ + return item; \ + } \ + itemType name##_peek(name* self) { \ + return self->items[self->size - 1]; \ + } + _SP_ARRAY_DECLARE_TYPE(spFloatArray, float) _SP_ARRAY_DECLARE_TYPE(spIntArray, int) diff --git a/defold-spine/include/spine/Atlas.h b/defold-spine/include/spine/Atlas.h index 3f338f7..0aef18d 100644 --- a/defold-spine/include/spine/Atlas.h +++ b/defold-spine/include/spine/Atlas.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -32,6 +32,7 @@ #include #include +#include "TextureRegion.h" #ifdef __cplusplus extern "C" { @@ -96,13 +97,10 @@ _SP_ARRAY_DECLARE_TYPE(spKeyValueArray, spKeyValue) /**/ typedef struct spAtlasRegion spAtlasRegion; struct spAtlasRegion { + spTextureRegion super; const char *name; - int x, y, width, height; - float u, v, u2, v2; - int offsetX, offsetY; - int originalWidth, originalHeight; + int x, y; int index; - int degrees; int *splits; int *pads; spKeyValueArray *keyValues; diff --git a/defold-spine/include/spine/AtlasAttachmentLoader.h b/defold-spine/include/spine/AtlasAttachmentLoader.h index 9642f3d..ce2986c 100644 --- a/defold-spine/include/spine/AtlasAttachmentLoader.h +++ b/defold-spine/include/spine/AtlasAttachmentLoader.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Attachment.h b/defold-spine/include/spine/Attachment.h index 3fa42e6..e9a33b1 100644 --- a/defold-spine/include/spine/Attachment.h +++ b/defold-spine/include/spine/Attachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/AttachmentLoader.h b/defold-spine/include/spine/AttachmentLoader.h index 47011c7..eea153f 100644 --- a/defold-spine/include/spine/AttachmentLoader.h +++ b/defold-spine/include/spine/AttachmentLoader.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -51,7 +52,7 @@ SP_API void spAttachmentLoader_dispose(spAttachmentLoader *self); * called, an error occurred. */ SP_API spAttachment * spAttachmentLoader_createAttachment(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, - const char *path); + const char *path, spSequence *sequence); /* Called after the attachment has been fully configured. */ SP_API void spAttachmentLoader_configureAttachment(spAttachmentLoader *self, spAttachment *attachment); /* Called just before the attachment is disposed. This can release allocations made in spAttachmentLoader_configureAttachment. */ diff --git a/defold-spine/include/spine/Bone.h b/defold-spine/include/spine/Bone.h index 744a556..243d76d 100644 --- a/defold-spine/include/spine/Bone.h +++ b/defold-spine/include/spine/Bone.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/BoneData.h b/defold-spine/include/spine/BoneData.h index 6ed33d8..f70a6b0 100644 --- a/defold-spine/include/spine/BoneData.h +++ b/defold-spine/include/spine/BoneData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/BoundingBoxAttachment.h b/defold-spine/include/spine/BoundingBoxAttachment.h index 39c2af3..0928421 100644 --- a/defold-spine/include/spine/BoundingBoxAttachment.h +++ b/defold-spine/include/spine/BoundingBoxAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/ClippingAttachment.h b/defold-spine/include/spine/ClippingAttachment.h index 8bbb5ef..dc80bf9 100644 --- a/defold-spine/include/spine/ClippingAttachment.h +++ b/defold-spine/include/spine/ClippingAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Color.h b/defold-spine/include/spine/Color.h index c206eb4..395598d 100644 --- a/defold-spine/include/spine/Color.h +++ b/defold-spine/include/spine/Color.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Debug.h b/defold-spine/include/spine/Debug.h index 1f79a4a..f1b3227 100644 --- a/defold-spine/include/spine/Debug.h +++ b/defold-spine/include/spine/Debug.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Event.h b/defold-spine/include/spine/Event.h index 8b64bc2..c8830e8 100644 --- a/defold-spine/include/spine/Event.h +++ b/defold-spine/include/spine/Event.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/EventData.h b/defold-spine/include/spine/EventData.h index beb153f..a764621 100644 --- a/defold-spine/include/spine/EventData.h +++ b/defold-spine/include/spine/EventData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/IkConstraint.h b/defold-spine/include/spine/IkConstraint.h index 8351869..c3276d1 100644 --- a/defold-spine/include/spine/IkConstraint.h +++ b/defold-spine/include/spine/IkConstraint.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/IkConstraintData.h b/defold-spine/include/spine/IkConstraintData.h index 8f6a794..61187d4 100644 --- a/defold-spine/include/spine/IkConstraintData.h +++ b/defold-spine/include/spine/IkConstraintData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/MeshAttachment.h b/defold-spine/include/spine/MeshAttachment.h index 2d2d491..df2bae8 100644 --- a/defold-spine/include/spine/MeshAttachment.h +++ b/defold-spine/include/spine/MeshAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -45,11 +46,8 @@ struct spMeshAttachment { spVertexAttachment super; void *rendererObject; - int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */ - int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */ - int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */ - float regionU, regionV, regionU2, regionV2; - int regionDegrees; + spTextureRegion *region; + spSequence *sequence; const char *path; @@ -73,7 +71,7 @@ struct spMeshAttachment { SP_API spMeshAttachment *spMeshAttachment_create(const char *name); -SP_API void spMeshAttachment_updateUVs(spMeshAttachment *self); +SP_API void spMeshAttachment_updateRegion(spMeshAttachment *self); SP_API void spMeshAttachment_setParentMesh(spMeshAttachment *self, spMeshAttachment *parentMesh); diff --git a/defold-spine/include/spine/PathAttachment.h b/defold-spine/include/spine/PathAttachment.h index 3713be9..69f3913 100644 --- a/defold-spine/include/spine/PathAttachment.h +++ b/defold-spine/include/spine/PathAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/PathConstraint.h b/defold-spine/include/spine/PathConstraint.h index 0ec200f..8e17842 100644 --- a/defold-spine/include/spine/PathConstraint.h +++ b/defold-spine/include/spine/PathConstraint.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/PathConstraintData.h b/defold-spine/include/spine/PathConstraintData.h index e2ad782..bd146da 100644 --- a/defold-spine/include/spine/PathConstraintData.h +++ b/defold-spine/include/spine/PathConstraintData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/PointAttachment.h b/defold-spine/include/spine/PointAttachment.h index 7496d03..842b703 100644 --- a/defold-spine/include/spine/PointAttachment.h +++ b/defold-spine/include/spine/PointAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/RegionAttachment.h b/defold-spine/include/spine/RegionAttachment.h index 26cb3f2..4a52678 100644 --- a/defold-spine/include/spine/RegionAttachment.h +++ b/defold-spine/include/spine/RegionAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -46,9 +47,8 @@ typedef struct spRegionAttachment { spColor color; void *rendererObject; - int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */ - int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */ - int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */ + spTextureRegion *region; + spSequence *sequence; float offset[8]; float uvs[8]; @@ -56,11 +56,9 @@ typedef struct spRegionAttachment { SP_API spRegionAttachment *spRegionAttachment_create(const char *name); -SP_API void spRegionAttachment_setUVs(spRegionAttachment *self, float u, float v, float u2, float v2, float degrees); +SP_API void spRegionAttachment_updateRegion(spRegionAttachment *self); -SP_API void spRegionAttachment_updateOffset(spRegionAttachment *self); - -SP_API void spRegionAttachment_computeWorldVertices(spRegionAttachment *self, spBone *bone, float *vertices, int offset, +SP_API void spRegionAttachment_computeWorldVertices(spRegionAttachment *self, spSlot *slot, float *vertices, int offset, int stride); #ifdef __cplusplus diff --git a/defold-spine/include/spine/Sequence.h b/defold-spine/include/spine/Sequence.h new file mode 100644 index 0000000..0104d6d --- /dev/null +++ b/defold-spine/include/spine/Sequence.h @@ -0,0 +1,75 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated September 24, 2021. Replaces all prior versions. + * + * Copyright (c) 2013-2021, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_SEQUENCE_H +#define SPINE_SEQUENCE_H + +#include +#include +#include +#include "Attachment.h" +#include "Slot.h" + +#ifdef __cplusplus +extern "C" { +#endif + +_SP_ARRAY_DECLARE_TYPE(spTextureRegionArray, spTextureRegion*) + +typedef struct spSequence { + int id; + int start; + int digits; + int setupIndex; + spTextureRegionArray *regions; +} spSequence; + +SP_API spSequence *spSequence_create(int numRegions); + +SP_API void spSequence_dispose(spSequence *self); + +SP_API spSequence *spSequence_copy(spSequence *self); + +SP_API void spSequence_apply(spSequence *self, spSlot *slot, spAttachment *attachment); + +SP_API void spSequence_getPath(spSequence *self, const char *basePath, int index, char *path); + +#define SP_SEQUENCE_MODE_HOLD 0 +#define SP_SEQUENCE_MODE_ONCE 1 +#define SP_SEQUENCE_MODE_LOOP 2 +#define SP_SEQUENCE_MODE_PINGPONG 3 +#define SP_SEQUENCE_MODE_ONCEREVERSE 4 +#define SP_SEQUENCE_MODE_LOOPREVERSE 5 +#define SP_SEQUENCE_MODE_PINGPONGREVERSE 6 + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/defold-spine/include/spine/Skeleton.h b/defold-spine/include/spine/Skeleton.h index 37bd141..bb9d842 100644 --- a/defold-spine/include/spine/Skeleton.h +++ b/defold-spine/include/spine/Skeleton.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -64,7 +64,6 @@ typedef struct spSkeleton { spSkin *const skin; spColor color; - float time; float scaleX, scaleY; float x, y; } spSkeleton; @@ -120,8 +119,6 @@ SP_API spTransformConstraint *spSkeleton_findTransformConstraint(const spSkeleto /* Returns 0 if the path constraint was not found. */ SP_API spPathConstraint *spSkeleton_findPathConstraint(const spSkeleton *self, const char *constraintName); -SP_API void spSkeleton_update(spSkeleton *self, float deltaTime); - #ifdef __cplusplus } #endif diff --git a/defold-spine/include/spine/SkeletonBinary.h b/defold-spine/include/spine/SkeletonBinary.h index 9056710..aa2e5b0 100644 --- a/defold-spine/include/spine/SkeletonBinary.h +++ b/defold-spine/include/spine/SkeletonBinary.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/SkeletonBounds.h b/defold-spine/include/spine/SkeletonBounds.h index c656607..422e2db 100644 --- a/defold-spine/include/spine/SkeletonBounds.h +++ b/defold-spine/include/spine/SkeletonBounds.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/SkeletonClipping.h b/defold-spine/include/spine/SkeletonClipping.h index aab2417..bc6bfba 100644 --- a/defold-spine/include/spine/SkeletonClipping.h +++ b/defold-spine/include/spine/SkeletonClipping.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/SkeletonData.h b/defold-spine/include/spine/SkeletonData.h index 00aab08..f529130 100644 --- a/defold-spine/include/spine/SkeletonData.h +++ b/defold-spine/include/spine/SkeletonData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/SkeletonJson.h b/defold-spine/include/spine/SkeletonJson.h index 7659577..6715755 100644 --- a/defold-spine/include/spine/SkeletonJson.h +++ b/defold-spine/include/spine/SkeletonJson.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Skin.h b/defold-spine/include/spine/Skin.h index cc75298..91cd4eb 100644 --- a/defold-spine/include/spine/Skin.h +++ b/defold-spine/include/spine/Skin.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Slot.h b/defold-spine/include/spine/Slot.h index 4ebea15..40d52c9 100644 --- a/defold-spine/include/spine/Slot.h +++ b/defold-spine/include/spine/Slot.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -50,6 +50,8 @@ typedef struct spSlot { int deformCapacity; int deformCount; float *deform; + + int sequenceIndex; } spSlot; SP_API spSlot *spSlot_create(spSlotData *data, spBone *bone); @@ -59,10 +61,6 @@ SP_API void spSlot_dispose(spSlot *self); /* @param attachment May be 0 to clear the attachment for the slot. */ SP_API void spSlot_setAttachment(spSlot *self, spAttachment *attachment); -SP_API void spSlot_setAttachmentTime(spSlot *self, float time); - -SP_API float spSlot_getAttachmentTime(const spSlot *self); - SP_API void spSlot_setToSetupPose(spSlot *self); #ifdef __cplusplus diff --git a/defold-spine/include/spine/SlotData.h b/defold-spine/include/spine/SlotData.h index 67e0f6c..1a2a03f 100644 --- a/defold-spine/include/spine/SlotData.h +++ b/defold-spine/include/spine/SlotData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/TextureRegion.h b/defold-spine/include/spine/TextureRegion.h new file mode 100644 index 0000000..f672297 --- /dev/null +++ b/defold-spine/include/spine/TextureRegion.h @@ -0,0 +1,50 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated September 24, 2021. Replaces all prior versions. + * + * Copyright (c) 2013-2021, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_TEXTURE_REGION_H +#define SPINE_TEXTURE_REGION_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct spTextureRegion { + void *rendererObject; + float u, v, u2, v2; + int degrees; + float offsetX, offsetY; + int width, height; + int originalWidth, originalHeight; +} spTextureRegion; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/defold-spine/include/spine/TransformConstraint.h b/defold-spine/include/spine/TransformConstraint.h index 1698f7f..95f28b9 100644 --- a/defold-spine/include/spine/TransformConstraint.h +++ b/defold-spine/include/spine/TransformConstraint.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/TransformConstraintData.h b/defold-spine/include/spine/TransformConstraintData.h index 9263a81..86912a9 100644 --- a/defold-spine/include/spine/TransformConstraintData.h +++ b/defold-spine/include/spine/TransformConstraintData.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Triangulator.h b/defold-spine/include/spine/Triangulator.h index b9a29fd..ac47c20 100644 --- a/defold-spine/include/spine/Triangulator.h +++ b/defold-spine/include/spine/Triangulator.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/Version.h b/defold-spine/include/spine/Version.h new file mode 100644 index 0000000..1822b62 --- /dev/null +++ b/defold-spine/include/spine/Version.h @@ -0,0 +1,37 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated September 24, 2021. Replaces all prior versions. + * + * Copyright (c) 2013-2021, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software + * or otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +#ifndef SPINE_VERTEXEFFECT_H_ +#define SPINE_VERTEXEFFECT_H_ + +#define SPINE_MAJOR_VERSION 4 +#define SPINE_MINOR_VERSION 1 +#define SPINE_VERSION_STRING "4.1" + +#endif diff --git a/defold-spine/include/spine/VertexAttachment.h b/defold-spine/include/spine/VertexAttachment.h index 19f3ed9..91d6b49 100644 --- a/defold-spine/include/spine/VertexAttachment.h +++ b/defold-spine/include/spine/VertexAttachment.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -50,7 +50,7 @@ struct spVertexAttachment { int worldVerticesLength; - spVertexAttachment *deformAttachment; + spAttachment *timelineAttachment; int id; }; diff --git a/defold-spine/include/spine/dll.h b/defold-spine/include/spine/dll.h index 2fe0160..70116a1 100644 --- a/defold-spine/include/spine/dll.h +++ b/defold-spine/include/spine/dll.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and diff --git a/defold-spine/include/spine/extension.h b/defold-spine/include/spine/extension.h index 91c3d7b..ac5dd89 100644 --- a/defold-spine/include/spine/extension.h +++ b/defold-spine/include/spine/extension.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -246,7 +246,7 @@ void _spAttachmentLoader_init(spAttachmentLoader *self, void (*dispose)(spAttachmentLoader *self), spAttachment *(*createAttachment)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, - const char *path), + const char *path, spSequence *sequence), void (*configureAttachment)(spAttachmentLoader *self, spAttachment *), void (*disposeAttachment)(spAttachmentLoader *self, spAttachment *) ); diff --git a/defold-spine/include/spine/spine.h b/defold-spine/include/spine/spine.h index 5db4885..458c21f 100644 --- a/defold-spine/include/spine/spine.h +++ b/defold-spine/include/spine/spine.h @@ -1,8 +1,8 @@ /****************************************************************************** * Spine Runtimes License Agreement - * Last updated January 1, 2020. Replaces all prior versions. + * Last updated September 24, 2021. Replaces all prior versions. * - * Copyright (c) 2013-2020, Esoteric Software LLC + * Copyright (c) 2013-2021, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and @@ -58,6 +58,5 @@ #include #include #include -#include #endif /* SPINE_SPINE_H_ */ diff --git a/defold-spine/lib/arm64-android/libspinec.a b/defold-spine/lib/arm64-android/libspinec.a new file mode 100644 index 0000000..78ad480 Binary files /dev/null and b/defold-spine/lib/arm64-android/libspinec.a differ diff --git a/defold-spine/lib/arm64-ios/libspinec.a b/defold-spine/lib/arm64-ios/libspinec.a new file mode 100644 index 0000000..47c356e Binary files /dev/null and b/defold-spine/lib/arm64-ios/libspinec.a differ diff --git a/defold-spine/lib/armv7-android/libspinec.a b/defold-spine/lib/armv7-android/libspinec.a new file mode 100644 index 0000000..8b13ef8 Binary files /dev/null and b/defold-spine/lib/armv7-android/libspinec.a differ diff --git a/defold-spine/lib/js-web/libspinec.a b/defold-spine/lib/js-web/libspinec.a new file mode 100644 index 0000000..cbe9828 Binary files /dev/null and b/defold-spine/lib/js-web/libspinec.a differ diff --git a/defold-spine/lib/wasm-web/libspinec.a b/defold-spine/lib/wasm-web/libspinec.a new file mode 100644 index 0000000..cbe9828 Binary files /dev/null and b/defold-spine/lib/wasm-web/libspinec.a differ diff --git a/defold-spine/lib/x86-win32/libspinec.lib b/defold-spine/lib/x86-win32/libspinec.lib new file mode 100644 index 0000000..ed5cef3 Binary files /dev/null and b/defold-spine/lib/x86-win32/libspinec.lib differ diff --git a/defold-spine/lib/x86_64-linux/libspinec.a b/defold-spine/lib/x86_64-linux/libspinec.a new file mode 100644 index 0000000..80bc9e4 Binary files /dev/null and b/defold-spine/lib/x86_64-linux/libspinec.a differ diff --git a/defold-spine/lib/x86_64-osx/libspinec.a b/defold-spine/lib/x86_64-osx/libspinec.a new file mode 100644 index 0000000..2f71a3e Binary files /dev/null and b/defold-spine/lib/x86_64-osx/libspinec.a differ diff --git a/defold-spine/lib/x86_64-win32/libspinec.lib b/defold-spine/lib/x86_64-win32/libspinec.lib new file mode 100644 index 0000000..4099c2f Binary files /dev/null and b/defold-spine/lib/x86_64-win32/libspinec.lib differ diff --git a/defold-spine/plugins/lib/x86_64-linux/libSpineExt.so b/defold-spine/plugins/lib/x86_64-linux/libSpineExt.so index 14e5e0f..efc8fc8 100644 Binary files a/defold-spine/plugins/lib/x86_64-linux/libSpineExt.so and b/defold-spine/plugins/lib/x86_64-linux/libSpineExt.so differ diff --git a/defold-spine/plugins/lib/x86_64-osx/libSpineExt.dylib b/defold-spine/plugins/lib/x86_64-osx/libSpineExt.dylib index 1d028c4..ce64fd0 100644 Binary files a/defold-spine/plugins/lib/x86_64-osx/libSpineExt.dylib and b/defold-spine/plugins/lib/x86_64-osx/libSpineExt.dylib differ diff --git a/defold-spine/plugins/lib/x86_64-win32/libSpineExt.dll b/defold-spine/plugins/lib/x86_64-win32/libSpineExt.dll index b591b76..5bb9f56 100644 Binary files a/defold-spine/plugins/lib/x86_64-win32/libSpineExt.dll and b/defold-spine/plugins/lib/x86_64-win32/libSpineExt.dll differ diff --git a/defold-spine/plugins/share/pluginSpineExt.jar b/defold-spine/plugins/share/pluginSpineExt.jar index 4e922e5..31f19a5 100644 Binary files a/defold-spine/plugins/share/pluginSpineExt.jar and b/defold-spine/plugins/share/pluginSpineExt.jar differ diff --git a/docs/index.md b/docs/index.md index 7ad4e30..67c1eda 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,11 +14,10 @@ _Spine_ is a third party animation tool by Esoteric Software. Spine animation pr ## Requirements ### Installation -To use this library in your Defold project, add the following URL to your `game.project` dependencies: +To use this library in your Defold project, add the needed version URL to your game.project dependencies from [Releases](https://github.com/defold/extension-spine/releases): -[https://github.com/defold/extension-spine/archive/main.zip](https://github.com/defold/extension-spine/archive/main.zip) -We recommend using a link to a zip file of a [specific release](https://github.com/defold/extension-spine/releases). +![Releases](releases.png){.inline} ## Migration guide @@ -31,7 +30,7 @@ Spine animations used to be part of the main Defold engine. Starting with Defold - Set this as the output suffix in the Spine Editor * Update the spine source files to latest version - - The new runtime is based on Spine 4.0.xx + - The new runtime is based on Spine 4.1.xx - NOTE: The old spine version json files won't work as they are too old! diff --git a/docs/releases.png b/docs/releases.png new file mode 100644 index 0000000..65e2922 Binary files /dev/null and b/docs/releases.png differ diff --git a/main/main.collection b/main/main.collection index ae31fac..7f377fe 100644 --- a/main/main.collection +++ b/main/main.collection @@ -267,3 +267,93 @@ embedded_instances { z: 1.0 } } +embedded_instances { + id: "sequence" + data: "embedded_components {\n" + " id: \"spinemodel\"\n" + " type: \"spinemodel\"\n" + " data: \"spine_scene: \\\"/assets/sequence_animation/sequence.spinescene\\\"\\n" + "default_animation: \\\"animation\\\"\\n" + "skin: \\\"\\\"\\n" + "blend_mode: BLEND_MODE_ALPHA\\n" + "material: \\\"/defold-spine/assets/spine.material\\\"\\n" + "create_go_bones: false\\n" + "\"\n" + " position {\n" + " x: 0.0\n" + " y: 0.0\n" + " z: 0.0\n" + " }\n" + " rotation {\n" + " x: 0.0\n" + " y: 0.0\n" + " z: 0.0\n" + " w: 1.0\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"label\"\n" + " type: \"label\"\n" + " data: \"size {\\n" + " x: 128.0\\n" + " y: 32.0\\n" + " z: 0.0\\n" + " w: 0.0\\n" + "}\\n" + "color {\\n" + " x: 1.0\\n" + " y: 1.0\\n" + " z: 1.0\\n" + " w: 1.0\\n" + "}\\n" + "outline {\\n" + " x: 0.0\\n" + " y: 0.0\\n" + " z: 0.0\\n" + " w: 1.0\\n" + "}\\n" + "shadow {\\n" + " x: 0.0\\n" + " y: 0.0\\n" + " z: 0.0\\n" + " w: 1.0\\n" + "}\\n" + "leading: 1.0\\n" + "tracking: 0.0\\n" + "pivot: PIVOT_CENTER\\n" + "blend_mode: BLEND_MODE_ALPHA\\n" + "line_break: false\\n" + "text: \\\"sequence\\\"\\n" + "font: \\\"/builtins/fonts/system_font.font\\\"\\n" + "material: \\\"/builtins/fonts/label.material\\\"\\n" + "\"\n" + " position {\n" + " x: 0.0\n" + " y: 93.0\n" + " z: 0.0\n" + " }\n" + " rotation {\n" + " x: 0.0\n" + " y: 0.0\n" + " z: 0.0\n" + " w: 1.0\n" + " }\n" + "}\n" + "" + position { + x: 420.0 + y: 450.0 + z: 0.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale3 { + x: 1.0 + y: 1.0 + z: 1.0 + } +} diff --git a/utils/runtime/build_runtime_lib.sh b/utils/runtime/build_runtime_lib.sh index 17a46ff..97c6417 100755 --- a/utils/runtime/build_runtime_lib.sh +++ b/utils/runtime/build_runtime_lib.sh @@ -2,7 +2,7 @@ set -e -VERSION=4.0 +VERSION=4.1 #URL=https://github.com/EsotericSoftware/spine-runtimes/archive/refs/tags/${VERSION}.zip URL=https://github.com/EsotericSoftware/spine-runtimes/archive/refs/heads/${VERSION}.zip UNPACK_FOLDER="spine-runtimes-${VERSION}" @@ -261,12 +261,12 @@ case $PLATFORM in export CXXFLAGS="${CXXFLAGS} -fpic -ffunction-sections -funwind-tables -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fomit-frame-pointer -fno-strict-aliasing -DANDROID -Wno-c++11-narrowing" if [ -z "${ANDROID_VERSION}" ]; then - ANDROID_VERSION=16 + ANDROID_VERSION=19 fi export CXX="${llvm}/armv7a-linux-androideabi${ANDROID_VERSION}-${CXX_NAME}" - export AR=${llvm}/arm-linux-androideabi-ar - export RANLIB=${llvm}/arm-linux-androideabi-ranlib + export AR=${llvm}/llvm-ar + export RANLIB=${llvm}/llvm-ranlib ;; arm64-android) @@ -285,8 +285,8 @@ case $PLATFORM in fi export CXX="${llvm}/aarch64-linux-android${ANDROID_VERSION}-${CXX_NAME}" - export AR=${llvm}/aarch64-linux-android-ar - export RANLIB=${llvm}/aarch64-linux-android-ranlib + export AR=${llvm}/llvm-ar + export RANLIB=${llvm}/llvm-ranlib ;; js-web)