ソースを参照

[haxe] Physics porting completed - Added 4 physics examples

Davide Tantillo 1 年間 前
コミット
9b5dcdac1f
41 ファイル変更3905 行追加296 行削除
  1. 16 0
      examples/export/runtimes.sh
  2. 0 3
      spine-haxe/.vscode/settings.json
  3. 174 0
      spine-haxe/example/assets/celestial-circus-pma.atlas
  4. BIN
      spine-haxe/example/assets/celestial-circus-pma.png
  5. 817 0
      spine-haxe/example/assets/celestial-circus-pro.json
  6. BIN
      spine-haxe/example/assets/celestial-circus-pro.skel
  7. 173 0
      spine-haxe/example/assets/celestial-circus.atlas
  8. BIN
      spine-haxe/example/assets/celestial-circus.png
  9. 49 80
      spine-haxe/example/assets/cloud-pot.atlas
  10. 123 60
      spine-haxe/example/assets/cloud-pot.json
  11. BIN
      spine-haxe/example/assets/cloud-pot.png
  12. BIN
      spine-haxe/example/assets/cloud-pot.skel
  13. BIN
      spine-haxe/example/assets/sack-pma.png
  14. 1 2
      spine-haxe/example/assets/sack.atlas
  15. BIN
      spine-haxe/example/assets/sack.png
  16. 210 0
      spine-haxe/example/assets/snowglobe-pma.atlas
  17. BIN
      spine-haxe/example/assets/snowglobe-pma.png
  18. BIN
      spine-haxe/example/assets/snowglobe-pma_2.png
  19. BIN
      spine-haxe/example/assets/snowglobe-pma_3.png
  20. BIN
      spine-haxe/example/assets/snowglobe-pma_4.png
  21. BIN
      spine-haxe/example/assets/snowglobe-pma_5.png
  22. 1553 0
      spine-haxe/example/assets/snowglobe-pro.json
  23. BIN
      spine-haxe/example/assets/snowglobe-pro.skel
  24. 205 0
      spine-haxe/example/assets/snowglobe.atlas
  25. BIN
      spine-haxe/example/assets/snowglobe.png
  26. BIN
      spine-haxe/example/assets/snowglobe_2.png
  27. BIN
      spine-haxe/example/assets/snowglobe_3.png
  28. BIN
      spine-haxe/example/assets/snowglobe_4.png
  29. BIN
      spine-haxe/example/assets/snowglobe_5.png
  30. 0 1
      spine-haxe/example/src/BasicExample.hx
  31. 95 0
      spine-haxe/example/src/CelestialCircusExample.hx
  32. 78 0
      spine-haxe/example/src/CloudPotExample.hx
  33. 1 2
      spine-haxe/example/src/Main.hx
  34. 79 0
      spine-haxe/example/src/SackExample.hx
  35. 4 5
      spine-haxe/example/src/Scene.hx
  36. 77 0
      spine-haxe/example/src/SnowglobeExample.hx
  37. 7 21
      spine-haxe/example/src/VineExample.hx
  38. 15 10
      spine-haxe/spine-haxe/spine/IkConstraint.hx
  39. 217 102
      spine-haxe/spine-haxe/spine/SkeletonBinary.hx
  40. 11 9
      spine-haxe/spine-haxe/spine/SkeletonJson.hx
  41. 0 1
      spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx

+ 16 - 0
examples/export/runtimes.sh

@@ -624,6 +624,22 @@ cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-haxe/example/a
 cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-haxe/example/assets/"
 cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-haxe/example/assets/"
 
+cp -f ../celestial-circus/export/* "$ROOT/spine-haxe/example/assets/"
+
+cp -f ../cloud-pot/export/cloud-pot.json "$ROOT/spine-haxe/example/assets/"
+cp -f ../cloud-pot/export/cloud-pot.skel "$ROOT/spine-haxe/example/assets/"
+cp -f ../cloud-pot/export/cloud-pot.atlas "$ROOT/spine-haxe/example/assets/"
+cp -f ../cloud-pot/export/cloud-pot.png "$ROOT/spine-haxe/example/assets/"
+
+cp -f ../sack/export/sack-pro.json "$ROOT/spine-haxe/example/assets/"
+cp -f ../sack/export/sack-pro.skel "$ROOT/spine-haxe/example/assets/"
+cp -f ../sack/export/sack.atlas "$ROOT/spine-haxe/example/assets/"
+cp -f ../sack/export/sack.png "$ROOT/spine-haxe/example/assets/"
+
+cp -f ../snowglobe/export/snowglobe-pro.json "$ROOT/spine-haxe/example/assets/"
+cp -f ../snowglobe/export/snowglobe-pro.skel "$ROOT/spine-haxe/example/assets/"
+cp -f ../snowglobe/export/snowglobe* "$ROOT/spine-haxe/example/assets/"
+
 echo "spine-ue"
 rm -f "$ROOT/spine-ue/Content/GettingStarted/Assets/Raptor/raptor.json"
 rm -f "$ROOT/spine-ue/Content/GettingStarted/Assets/Raptor/raptor-pro.json"

+ 0 - 3
spine-haxe/.vscode/settings.json

@@ -1,3 +0,0 @@
-{
-    "cmake.configureOnOpen": false
-}

+ 174 - 0
spine-haxe/example/assets/celestial-circus-pma.atlas

@@ -0,0 +1,174 @@
+celestial-circus-pma.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	pma: true
+	scale: 0.4
+arm-back-down
+	bounds: 324, 401, 38, 82
+	rotate: 90
+arm-back-up
+	bounds: 290, 44, 83, 116
+	rotate: 90
+arm-front-down
+	bounds: 706, 2, 36, 78
+	rotate: 90
+arm-front-up
+	bounds: 860, 138, 77, 116
+bench
+	bounds: 725, 256, 189, 48
+body-bottom
+	bounds: 879, 868, 154, 124
+	rotate: 90
+body-top
+	bounds: 725, 128, 126, 133
+	rotate: 90
+chest
+	bounds: 408, 26, 104, 93
+cloud-back
+	bounds: 752, 378, 202, 165
+cloud-front
+	bounds: 2, 2, 325, 196
+	rotate: 90
+collar
+	bounds: 786, 13, 47, 26
+ear
+	bounds: 1002, 643, 20, 28
+eye-back-shadow
+	bounds: 428, 395, 14, 10
+eye-front-shadow
+	bounds: 704, 529, 24, 14
+eye-reflex-back
+	bounds: 860, 128, 8, 7
+	rotate: 90
+eye-reflex-front
+	bounds: 726, 386, 10, 7
+eye-white-back
+	bounds: 835, 23, 13, 16
+eye-white-front
+	bounds: 1005, 1000, 22, 17
+	rotate: 90
+eyelashes-down-back
+	bounds: 232, 329, 11, 6
+	rotate: 90
+eyelashes-down-front
+	bounds: 913, 851, 15, 6
+	rotate: 90
+eyelashes-top-back
+	bounds: 408, 395, 18, 10
+eyelashes-top-front
+	bounds: 702, 179, 30, 16
+	rotate: 90
+face
+	bounds: 514, 26, 93, 102
+	rotate: 90
+feathers-back
+	bounds: 954, 625, 46, 46
+feathers-front
+	bounds: 706, 40, 72, 86
+fringe-middle-back
+	bounds: 200, 6, 33, 52
+	rotate: 90
+fringe-middle-front
+	bounds: 878, 76, 60, 50
+	rotate: 90
+fringe-side-back
+	bounds: 780, 41, 27, 94
+	rotate: 90
+fringe-side-front
+	bounds: 939, 161, 26, 93
+glove-bottom-back
+	bounds: 954, 572, 51, 41
+	rotate: 90
+glove-bottom-front
+	bounds: 916, 256, 47, 48
+hair-back-1
+	bounds: 444, 395, 132, 306
+	rotate: 90
+hair-back-2
+	bounds: 438, 211, 80, 285
+	rotate: 90
+hair-back-3
+	bounds: 719, 306, 70, 268
+	rotate: 90
+hair-back-4
+	bounds: 438, 121, 88, 262
+	rotate: 90
+hair-back-5
+	bounds: 438, 293, 88, 279
+	rotate: 90
+hair-back-6
+	bounds: 200, 41, 88, 286
+hair-hat-shadow
+	bounds: 232, 398, 90, 41
+hand-back
+	bounds: 954, 673, 60, 47
+	rotate: 90
+hand-front
+	bounds: 967, 172, 53, 60
+hat-back
+	bounds: 954, 802, 64, 45
+	rotate: 90
+hat-front
+	bounds: 780, 70, 96, 56
+head-back
+	bounds: 618, 17, 102, 86
+	rotate: 90
+jabot
+	bounds: 967, 234, 70, 55
+	rotate: 90
+leg-back
+	bounds: 232, 441, 210, 333
+leg-front
+	bounds: 444, 529, 258, 320
+logo-brooch
+	bounds: 954, 545, 16, 25
+mouth
+	bounds: 408, 121, 22, 6
+neck
+	bounds: 232, 342, 39, 56
+	rotate: 90
+nose
+	bounds: 742, 529, 6, 7
+	rotate: 90
+nose-highlight
+	bounds: 719, 300, 4, 4
+nose-shadow
+	bounds: 869, 128, 7, 8
+pupil-back
+	bounds: 730, 529, 10, 14
+pupil-front
+	bounds: 254, 21, 12, 18
+rope-back
+	bounds: 232, 383, 10, 492
+	rotate: 90
+rope-front
+	bounds: 232, 383, 10, 492
+	rotate: 90
+rope-front-bottom
+	bounds: 954, 735, 42, 65
+skirt
+	bounds: 2, 776, 440, 246
+sock-bow
+	bounds: 408, 407, 33, 32
+spine-logo-body
+	bounds: 879, 853, 13, 32
+	rotate: 90
+star-big
+	bounds: 939, 141, 18, 24
+	rotate: 90
+star-medium
+	bounds: 742, 537, 6, 8
+	rotate: 90
+star-small
+	bounds: 719, 378, 3, 4
+	rotate: 90
+underskirt
+	bounds: 2, 329, 445, 228
+	rotate: 90
+underskirt-back
+	bounds: 444, 851, 433, 171
+wing-back
+	bounds: 290, 129, 146, 252
+wing-front
+	bounds: 704, 545, 304, 248
+	rotate: 90

BIN
spine-haxe/example/assets/celestial-circus-pma.png


ファイルの差分が大きいため隠しています
+ 817 - 0
spine-haxe/example/assets/celestial-circus-pro.json


BIN
spine-haxe/example/assets/celestial-circus-pro.skel


+ 173 - 0
spine-haxe/example/assets/celestial-circus.atlas

@@ -0,0 +1,173 @@
+celestial-circus.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	scale: 0.4
+arm-back-down
+	bounds: 324, 401, 38, 82
+	rotate: 90
+arm-back-up
+	bounds: 290, 44, 83, 116
+	rotate: 90
+arm-front-down
+	bounds: 706, 2, 36, 78
+	rotate: 90
+arm-front-up
+	bounds: 860, 138, 77, 116
+bench
+	bounds: 725, 256, 189, 48
+body-bottom
+	bounds: 879, 868, 154, 124
+	rotate: 90
+body-top
+	bounds: 725, 128, 126, 133
+	rotate: 90
+chest
+	bounds: 408, 26, 104, 93
+cloud-back
+	bounds: 752, 378, 202, 165
+cloud-front
+	bounds: 2, 2, 325, 196
+	rotate: 90
+collar
+	bounds: 786, 13, 47, 26
+ear
+	bounds: 1002, 643, 20, 28
+eye-back-shadow
+	bounds: 428, 395, 14, 10
+eye-front-shadow
+	bounds: 704, 529, 24, 14
+eye-reflex-back
+	bounds: 860, 128, 8, 7
+	rotate: 90
+eye-reflex-front
+	bounds: 726, 386, 10, 7
+eye-white-back
+	bounds: 835, 23, 13, 16
+eye-white-front
+	bounds: 1005, 1000, 22, 17
+	rotate: 90
+eyelashes-down-back
+	bounds: 232, 329, 11, 6
+	rotate: 90
+eyelashes-down-front
+	bounds: 913, 851, 15, 6
+	rotate: 90
+eyelashes-top-back
+	bounds: 408, 395, 18, 10
+eyelashes-top-front
+	bounds: 702, 179, 30, 16
+	rotate: 90
+face
+	bounds: 514, 26, 93, 102
+	rotate: 90
+feathers-back
+	bounds: 954, 625, 46, 46
+feathers-front
+	bounds: 706, 40, 72, 86
+fringe-middle-back
+	bounds: 200, 6, 33, 52
+	rotate: 90
+fringe-middle-front
+	bounds: 878, 76, 60, 50
+	rotate: 90
+fringe-side-back
+	bounds: 780, 41, 27, 94
+	rotate: 90
+fringe-side-front
+	bounds: 939, 161, 26, 93
+glove-bottom-back
+	bounds: 954, 572, 51, 41
+	rotate: 90
+glove-bottom-front
+	bounds: 916, 256, 47, 48
+hair-back-1
+	bounds: 444, 395, 132, 306
+	rotate: 90
+hair-back-2
+	bounds: 438, 211, 80, 285
+	rotate: 90
+hair-back-3
+	bounds: 719, 306, 70, 268
+	rotate: 90
+hair-back-4
+	bounds: 438, 121, 88, 262
+	rotate: 90
+hair-back-5
+	bounds: 438, 293, 88, 279
+	rotate: 90
+hair-back-6
+	bounds: 200, 41, 88, 286
+hair-hat-shadow
+	bounds: 232, 398, 90, 41
+hand-back
+	bounds: 954, 673, 60, 47
+	rotate: 90
+hand-front
+	bounds: 967, 172, 53, 60
+hat-back
+	bounds: 954, 802, 64, 45
+	rotate: 90
+hat-front
+	bounds: 780, 70, 96, 56
+head-back
+	bounds: 618, 17, 102, 86
+	rotate: 90
+jabot
+	bounds: 967, 234, 70, 55
+	rotate: 90
+leg-back
+	bounds: 232, 441, 210, 333
+leg-front
+	bounds: 444, 529, 258, 320
+logo-brooch
+	bounds: 954, 545, 16, 25
+mouth
+	bounds: 408, 121, 22, 6
+neck
+	bounds: 232, 342, 39, 56
+	rotate: 90
+nose
+	bounds: 742, 529, 6, 7
+	rotate: 90
+nose-highlight
+	bounds: 719, 300, 4, 4
+nose-shadow
+	bounds: 869, 128, 7, 8
+pupil-back
+	bounds: 730, 529, 10, 14
+pupil-front
+	bounds: 254, 21, 12, 18
+rope-back
+	bounds: 232, 383, 10, 492
+	rotate: 90
+rope-front
+	bounds: 232, 383, 10, 492
+	rotate: 90
+rope-front-bottom
+	bounds: 954, 735, 42, 65
+skirt
+	bounds: 2, 776, 440, 246
+sock-bow
+	bounds: 408, 407, 33, 32
+spine-logo-body
+	bounds: 879, 853, 13, 32
+	rotate: 90
+star-big
+	bounds: 939, 141, 18, 24
+	rotate: 90
+star-medium
+	bounds: 742, 537, 6, 8
+	rotate: 90
+star-small
+	bounds: 719, 378, 3, 4
+	rotate: 90
+underskirt
+	bounds: 2, 329, 445, 228
+	rotate: 90
+underskirt-back
+	bounds: 444, 851, 433, 171
+wing-back
+	bounds: 290, 129, 146, 252
+wing-front
+	bounds: 704, 545, 304, 248
+	rotate: 90

BIN
spine-haxe/example/assets/celestial-circus.png


+ 49 - 80
spine-haxe/example/assets/cloud-pot.atlas

@@ -1,116 +1,85 @@
 cloud-pot.png
-size:4096,512
-filter:MipMapLinearLinear,MipMapLinearLinear
+	size: 1024, 512
+	filter: Linear, Linear
+	scale: 0.5
 cloud-base-1
-bounds:1109,8,458,415
-offsets:5,1,465,420
+	bounds: 2, 300, 233, 210
 cloud-base-10
-bounds:279,175,190,199
-offsets:2,1,193,201
+	bounds: 214, 113, 97, 101
 cloud-base-2
-bounds:1575,10,416,413
-offsets:3,1,420,415
+	bounds: 2, 90, 210, 208
 cloud-base-3
-bounds:2331,91,332,324
-offsets:16,1,349,327
-rotate:90
+	bounds: 237, 346, 175, 164
 cloud-base-4
-bounds:1999,78,345,324
-offsets:6,1,352,326
-rotate:90
+	bounds: 414, 347, 176, 163
 cloud-base-5
-bounds:3496,137,286,248
-offsets:2,1,289,250
-rotate:90
+	bounds: 313, 89, 145, 125
 cloud-base-6
-bounds:2663,104,319,269
-offsets:2,1,322,272
-rotate:90
+	bounds: 744, 374, 161, 136
 cloud-base-7
-bounds:2940,128,287,295
-offsets:12,1,300,297
+	bounds: 592, 361, 150, 149
 cloud-base-8
-bounds:3235,123,300,253
-offsets:6,1,307,256
-rotate:90
+	bounds: 237, 216, 154, 128
 cloud-base-9
-bounds:3752,209,211,214
-offsets:2,1,214,216
+	bounds: 907, 402, 107, 108
 cloud-cheeks
-bounds:548,227,433,156
-offsets:1,1,435,158
+	bounds: 2, 9, 218, 79
 cloud-eyes-closed
-bounds:279,382,261,41
-offsets:1,1,263,43
+	bounds: 744, 350, 132, 22
 cloud-eyes-open
-bounds:8,374,263,49
-offsets:1,1,265,51
+	bounds: 592, 333, 133, 26
 cloud-eyes-reflex
-bounds:548,391,237,32
-offsets:1,1,239,34
+	bounds: 393, 224, 120, 17
+	rotate: 90
 cloud-mouth-closed
-bounds:166,336,95,30
-offsets:1,1,97,32
+	bounds: 907, 374, 49, 16
 cloud-mouth-open
-bounds:3971,307,116,68
-offsets:1,1,118,70
-rotate:90
+	bounds: 222, 15, 59, 35
 leaf-big
-bounds:989,359,40,98
-rotate:90
+	bounds: 214, 218, 20, 49
 leaf-small
-bounds:989,319,32,57
-offsets:1,1,34,59
-rotate:90
+	bounds: 958, 373, 17, 30
+	rotate: 90
 petal-1
-bounds:477,292,50,34
-offsets:1,1,52,36
+	bounds: 283, 2, 26, 18
 petal-2
-bounds:166,296,54,32
-offsets:1,1,56,34
+	bounds: 283, 22, 28, 17
+	rotate: 90
 petal-3
-bounds:477,334,56,40
-offsets:1,1,58,42
+	bounds: 214, 269, 29, 21
+	rotate: 90
 pot-base
-bounds:8,250,150,116
-offsets:1,1,152,118
+	bounds: 222, 52, 76, 59
 pot-eyes-closed
-bounds:1011,408,90,15
-offsets:1,1,92,17
+	bounds: 878, 363, 46, 9
 pot-eyes-open
-bounds:989,291,78,20
-offsets:1,1,80,22
+	bounds: 222, 2, 40, 11
 pot-mouth-open
-bounds:4047,394,25,29
-offsets:1,1,27,31
+	bounds: 990, 374, 14, 16
 pot-mouth-pouty
-bounds:228,287,33,17
-offsets:1,1,35,19
+	bounds: 300, 93, 18, 10
+	rotate: 90
 pot-mouth-smile
-bounds:3971,281,25,18
-offsets:1,1,27,20
+	bounds: 300, 77, 14, 10
+	rotate: 90
 pot-mouth-smile-big
-bounds:228,312,37,16
-offsets:1,1,39,18
+	bounds: 878, 352, 20, 9
 rain-blue
-bounds:4047,310,21,34
-offsets:1,1,23,36
+	bounds: 926, 360, 12, 18
+	rotate: 90
 rain-color
-bounds:4047,270,16,32
-offsets:1,1,18,34
+	bounds: 264, 4, 9, 17
+	rotate: 90
 rain-green
-bounds:4047,352,21,34
-offsets:1,1,23,36
+	bounds: 900, 349, 12, 18
+	rotate: 90
 rain-white
-bounds:1054,330,21,42
-offsets:1,1,23,44
-rotate:90
+	bounds: 727, 337, 12, 22
 rain-white-reflex
-bounds:4080,406,8,17
-offsets:1,1,10,19
+	bounds: 2, 2, 5, 10
+	rotate: 90
 stem
-bounds:793,407,16,210
-rotate:90
+	bounds: 907, 392, 8, 105
+	rotate: 90
 stem-end
-bounds:1075,298,23,24
-offsets:1,1,25,26
+	bounds: 300, 62, 13, 13

+ 123 - 60
spine-haxe/example/assets/cloud-pot.json

@@ -1,66 +1,123 @@
 {
-"skeleton": { "hash": "WlXIcG5lrwQ", "spine": "4.2.67-beta", "x": -345, "y": -17, "width": 756, "height": 1098 },
+"skeleton": {
+	"hash": "CKnF82un6n8",
+	"spine": "4.2.64-beta",
+	"x": -345,
+	"y": -272846.84,
+	"width": 756,
+	"height": 273927.84,
+	"images": "./images/",
+	"audio": ""
+},
 "bones": [
 	{ "name": "root" },
-	{ "name": "pot-control", "parent": "root", "x": 5, "y": 42 },
-	{ "name": "cloud", "parent": "pot-control", "x": 26.5, "y": 772 },
-	{ "name": "cloud-base-1", "parent": "cloud", "x": -4, "y": 57 },
-	{ "name": "cloud-base-2", "parent": "cloud-base-1", "x": 148.5, "y": -18.5 },
-	{ "name": "cloud-base-3", "parent": "cloud-base-1", "x": -182, "y": -87.5 },
-	{ "name": "cloud-base-4", "parent": "cloud", "x": -31.5, "y": -77 },
-	{ "name": "cloud-base-5", "parent": "cloud-base-4", "x": 177.5, "y": 8 },
-	{ "name": "cloud-base-6", "parent": "cloud-base-1", "x": -150.5, "y": 40 },
-	{ "name": "cloud-base-7", "parent": "cloud-base-1", "x": 8.5, "y": 36.5 },
-	{ "name": "cloud-base-8", "parent": "cloud-base-2", "x": 3.5, "y": 68.5 },
-	{ "name": "cloud-base-9", "parent": "cloud-base-3", "x": -83.5, "y": 30.5 },
-	{ "name": "cloud-base-10", "parent": "cloud-base-5", "x": 137, "y": 54.5 },
-	{ "name": "rain-blue", "parent": "cloud", "x": 102.49, "y": -26 },
-	{ "name": "rain-color", "parent": "cloud", "x": -39.42, "y": -26 },
-	{ "name": "rain-green", "parent": "cloud", "x": 35.08, "y": -26 },
-	{ "name": "rain-white", "parent": "cloud", "x": -103.92, "y": -26 },
-	{ "name": "pot", "parent": "pot-control", "x": -5, "y": -42 },
-	{ "name": "pot-face", "parent": "pot", "x": -1.06, "y": 28.16 },
-	{ "name": "leaf-big", "parent": "pot", "length": 46.73, "rotation": 119.24, "x": 4.04, "y": 95.05 },
-	{ "name": "leaf-big-tip", "parent": "leaf-big", "length": 46.73, "x": 46.73 },
-	{ "name": "leaf-small", "parent": "pot", "length": 51.32, "rotation": 50.93, "x": 10.16, "y": 96.81 },
-	{ "name": "stem", "parent": "pot", "length": 104.76, "rotation": 90, "x": 7.24, "y": 92.61 },
-	{ "name": "stem2", "parent": "stem", "length": 69.84, "x": 104.76 },
-	{ "name": "stem3", "parent": "stem2", "length": 34.92, "x": 69.84 },
-	{ "name": "petal-3", "parent": "stem3", "length": 37.74, "rotation": 1.03, "x": 30.73, "y": 0.64 },
-	{ "name": "petal-1", "parent": "stem3", "length": 40.11, "rotation": 70.18, "x": 34.13, "y": 3.02 },
-	{ "name": "petal-2", "parent": "stem3", "length": 48.62, "rotation": -80.34, "x": 32.09, "y": -4.46 },
-	{ "name": "cloud-face", "parent": "cloud", "y": 14.93 }
+	{ "name": "pot-control", "parent": "root", "x": 5, "y": 42, "color": "8828ffff", "icon": "arrowsB" },
+	{ "name": "cloud", "parent": "pot-control", "x": 26.5, "y": 772, "color": "1ee8c0ff", "icon": "circle" },
+	{ "name": "cloud-base-1", "parent": "cloud", "x": -4, "y": 57, "color": "b0d5eaff" },
+	{ "name": "cloud-base-2", "parent": "cloud-base-1", "x": 148.5, "y": -18.5, "color": "b0d5eaff" },
+	{ "name": "cloud-base-3", "parent": "cloud-base-1", "x": -182, "y": -87.5, "color": "b0d5eaff" },
+	{ "name": "cloud-base-4", "parent": "cloud", "x": -31.5, "y": -77, "color": "b0d5eaff" },
+	{ "name": "cloud-base-5", "parent": "cloud-base-4", "x": 177.5, "y": 8, "color": "b0d5eaff" },
+	{ "name": "cloud-base-6", "parent": "cloud-base-1", "x": -150.5, "y": 40, "color": "b0d5eaff" },
+	{ "name": "cloud-base-7", "parent": "cloud-base-1", "x": 8.5, "y": 36.5, "color": "b0d5eaff" },
+	{ "name": "cloud-base-8", "parent": "cloud-base-2", "x": 3.5, "y": 68.5, "color": "b0d5eaff" },
+	{ "name": "cloud-base-9", "parent": "cloud-base-3", "x": -83.5, "y": 30.5, "color": "b0d5eaff" },
+	{ "name": "cloud-base-10", "parent": "cloud-base-5", "x": 137, "y": 54.5, "color": "b0d5eaff" },
+	{ "name": "rain-blue", "parent": "cloud", "x": 102.49, "y": -26, "color": "2360e3ff", "icon": "diamond" },
+	{ "name": "rain-color", "parent": "cloud", "x": -39.42, "y": -26, "color": "2360e3ff", "icon": "diamond" },
+	{ "name": "rain-green", "parent": "cloud", "x": 35.08, "y": -26, "color": "2360e3ff", "icon": "diamond" },
+	{ "name": "rain-white", "parent": "cloud", "x": -103.92, "y": -26, "color": "2360e3ff", "icon": "diamond" },
+	{ "name": "pot", "parent": "pot-control", "x": -5, "y": -42, "color": "8828ffff" },
+	{ "name": "pot-face", "parent": "pot", "x": -1.06, "y": 28.16, "color": "f38383ff", "icon": "gear" },
+	{
+		"name": "leaf-big",
+		"parent": "pot",
+		"length": 46.73,
+		"rotation": 119.24,
+		"x": 4.04,
+		"y": 95.05,
+		"color": "abe323ff"
+	},
+	{ "name": "leaf-big-tip", "parent": "leaf-big", "length": 46.73, "x": 46.73, "color": "abe323ff" },
+	{
+		"name": "leaf-small",
+		"parent": "pot",
+		"length": 51.32,
+		"rotation": 50.93,
+		"x": 10.16,
+		"y": 96.81,
+		"color": "abe323ff"
+	},
+	{
+		"name": "stem",
+		"parent": "pot",
+		"length": 104.76,
+		"rotation": 90,
+		"x": 7.24,
+		"y": 92.61,
+		"color": "abe323ff"
+	},
+	{ "name": "stem2", "parent": "stem", "length": 69.84, "x": 104.76, "color": "abe323ff" },
+	{ "name": "stem3", "parent": "stem2", "length": 34.92, "x": 69.84, "color": "abe323ff" },
+	{
+		"name": "petal-3",
+		"parent": "stem3",
+		"length": 37.74,
+		"rotation": 1.03,
+		"x": 30.73,
+		"y": 0.64,
+		"color": "2381e3ff"
+	},
+	{
+		"name": "petal-1",
+		"parent": "stem3",
+		"length": 40.11,
+		"rotation": 70.18,
+		"x": 34.13,
+		"y": 3.02,
+		"color": "2381e3ff"
+	},
+	{
+		"name": "petal-2",
+		"parent": "stem3",
+		"length": 48.62,
+		"rotation": -80.34,
+		"x": 32.09,
+		"y": -4.46,
+		"color": "2381e3ff"
+	},
+	{ "name": "cloud-face", "parent": "cloud", "y": 14.93, "color": "9e82ffff", "icon": "arrowsB" }
 ],
 "slots": [
-	{ "name": "rain-green", "bone": "rain-green", "attachment": "rain-green" },
-	{ "name": "rain-blue", "bone": "rain-blue", "attachment": "rain-blue" },
-	{ "name": "rain-color", "bone": "rain-color", "attachment": "rain-color" },
-	{ "name": "rain-white", "bone": "rain-white", "attachment": "rain-white" },
-	{ "name": "rain-white-reflex", "bone": "rain-white", "attachment": "rain-white-reflex" },
-	{ "name": "petal-1", "bone": "petal-1", "attachment": "petal-1" },
-	{ "name": "petal-2", "bone": "petal-2", "attachment": "petal-2" },
-	{ "name": "petal-3", "bone": "petal-3", "attachment": "petal-3" },
-	{ "name": "stem", "bone": "stem", "attachment": "stem" },
-	{ "name": "leaf-big", "bone": "leaf-big", "attachment": "leaf-big" },
-	{ "name": "leaf-small", "bone": "leaf-small", "attachment": "leaf-small" },
-	{ "name": "stem-end", "bone": "stem3", "attachment": "stem-end" },
-	{ "name": "pot-base", "bone": "pot", "attachment": "pot-base" },
-	{ "name": "pot-mouth", "bone": "pot-face", "attachment": "pot-mouth-smile-big" },
-	{ "name": "pot-eyes", "bone": "pot-face", "attachment": "pot-eyes-open" },
-	{ "name": "cloud-base-1", "bone": "cloud-base-1", "attachment": "cloud-base-1" },
-	{ "name": "cloud-base-2", "bone": "cloud-base-2", "attachment": "cloud-base-2" },
-	{ "name": "cloud-base-3", "bone": "cloud-base-3", "attachment": "cloud-base-3" },
-	{ "name": "cloud-base-4", "bone": "cloud-base-4", "attachment": "cloud-base-4" },
-	{ "name": "cloud-base-5", "bone": "cloud-base-5", "attachment": "cloud-base-5" },
-	{ "name": "cloud-base-6", "bone": "cloud-base-6", "attachment": "cloud-base-6" },
-	{ "name": "cloud-base-7", "bone": "cloud-base-7", "attachment": "cloud-base-7" },
-	{ "name": "cloud-base-8", "bone": "cloud-base-8", "attachment": "cloud-base-8" },
-	{ "name": "cloud-base-9", "bone": "cloud-base-9", "attachment": "cloud-base-9" },
-	{ "name": "cloud-base-10", "bone": "cloud-base-10", "attachment": "cloud-base-10" },
-	{ "name": "cloud-cheeks", "bone": "cloud-face", "attachment": "cloud-cheeks" },
-	{ "name": "cloud-eyes", "bone": "cloud-face", "attachment": "cloud-eyes-open" },
-	{ "name": "cloud-eyes-reflex", "bone": "cloud-face", "attachment": "cloud-eyes-reflex" },
-	{ "name": "cloud-mouth", "bone": "cloud-face", "attachment": "cloud-mouth-closed" }
+	{ "name": "rain/rain-green", "bone": "rain-green", "attachment": "rain-green" },
+	{ "name": "rain/rain-blue", "bone": "rain-blue", "attachment": "rain-blue" },
+	{ "name": "rain/rain-color", "bone": "rain-color", "attachment": "rain-color" },
+	{ "name": "rain/rain-white", "bone": "rain-white", "attachment": "rain-white" },
+	{ "name": "rain/rain-white-reflex", "bone": "rain-white", "attachment": "rain-white-reflex" },
+	{ "name": "flower/petal-1", "bone": "petal-1", "attachment": "petal-1" },
+	{ "name": "flower/petal-2", "bone": "petal-2", "attachment": "petal-2" },
+	{ "name": "flower/petal-3", "bone": "petal-3", "attachment": "petal-3" },
+	{ "name": "flower/stem", "bone": "stem", "attachment": "stem" },
+	{ "name": "flower/leaf-big", "bone": "leaf-big", "attachment": "leaf-big" },
+	{ "name": "flower/leaf-small", "bone": "leaf-small", "attachment": "leaf-small" },
+	{ "name": "flower/stem-end", "bone": "stem3", "attachment": "stem-end" },
+	{ "name": "pot/pot-base", "bone": "pot", "attachment": "pot-base" },
+	{ "name": "pot/pot-mouth", "bone": "pot-face", "attachment": "pot-mouth-smile-big" },
+	{ "name": "pot/pot-eyes", "bone": "pot-face", "attachment": "pot-eyes-open" },
+	{ "name": "cloud/cloud-base/cloud-base-1", "bone": "cloud-base-1", "attachment": "cloud-base-1" },
+	{ "name": "cloud/cloud-base/cloud-base-2", "bone": "cloud-base-2", "attachment": "cloud-base-2" },
+	{ "name": "cloud/cloud-base/cloud-base-3", "bone": "cloud-base-3", "attachment": "cloud-base-3" },
+	{ "name": "cloud/cloud-base/cloud-base-4", "bone": "cloud-base-4", "attachment": "cloud-base-4" },
+	{ "name": "cloud/cloud-base/cloud-base-5", "bone": "cloud-base-5", "attachment": "cloud-base-5" },
+	{ "name": "cloud/cloud-base/cloud-base-6", "bone": "cloud-base-6", "attachment": "cloud-base-6" },
+	{ "name": "cloud/cloud-base/cloud-base-7", "bone": "cloud-base-7", "attachment": "cloud-base-7" },
+	{ "name": "cloud/cloud-base/cloud-base-8", "bone": "cloud-base-8", "attachment": "cloud-base-8" },
+	{ "name": "cloud/cloud-base/cloud-base-9", "bone": "cloud-base-9", "attachment": "cloud-base-9" },
+	{ "name": "cloud/cloud-base/cloud-base-10", "bone": "cloud-base-10", "attachment": "cloud-base-10" },
+	{ "name": "cloud/cloud-cheeks", "bone": "cloud-face", "attachment": "cloud-cheeks" },
+	{ "name": "cloud/cloud-eyes", "bone": "cloud-face", "attachment": "cloud-eyes-open" },
+	{ "name": "cloud/cloud-eyes-reflex", "bone": "cloud-face", "attachment": "cloud-eyes-reflex" },
+	{ "name": "cloud/cloud-mouth", "bone": "cloud-face", "attachment": "cloud-mouth-closed" }
 ],
 "physics": [
 	{
@@ -398,7 +455,10 @@
 					"uvs": [ 1, 1, 0, 1, 0, 0.75, 0, 0.5, 0, 0.25, 0, 0, 1, 0, 1, 0.25, 1, 0.5, 1, 0.75 ],
 					"triangles": [ 8, 3, 7, 3, 4, 7, 7, 4, 6, 4, 5, 6, 0, 1, 9, 1, 2, 9, 9, 2, 8, 2, 3, 8 ],
 					"vertices": [ 1, 19, -5.05, -21.72, 1, 1, 19, -5.05, 18.28, 1, 2, 19, 19.45, 18.28, 0.75483, 20, -27.28, 18.28, 0.24517, 2, 19, 43.95, 18.28, 0.50538, 20, -2.78, 18.28, 0.49462, 2, 19, 68.45, 18.28, 0.25278, 20, 21.72, 18.28, 0.74722, 1, 20, 46.22, 18.28, 1, 1, 20, 46.22, -21.72, 1, 2, 19, 68.45, -21.72, 0.24458, 20, 21.72, -21.72, 0.75542, 2, 19, 43.95, -21.72, 0.4937, 20, -2.78, -21.72, 0.5063, 2, 19, 19.45, -21.72, 0.74651, 20, -27.28, -21.72, 0.25349 ],
-					"hull": 10
+					"hull": 10,
+					"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 0 ],
+					"width": 40,
+					"height": 98
 				}
 			},
 			"leaf-small": {
@@ -419,7 +479,10 @@
 					"uvs": [ 1, 1, 0, 1, 0, 0.90909, 0, 0.81818, 0, 0.72727, 0, 0.63636, 0, 0.54545, 0, 0.45455, 0, 0.36364, 0, 0.27273, 0, 0.18182, 0, 0.09091, 0, 0, 1, 0, 1, 0.09091, 1, 0.18182, 1, 0.27273, 1, 0.36364, 1, 0.45455, 1, 0.54545, 1, 0.63636, 1, 0.72727, 1, 0.81818, 1, 0.90909 ],
 					"triangles": [ 15, 10, 14, 10, 11, 14, 14, 11, 13, 11, 12, 13, 18, 7, 17, 7, 8, 17, 17, 8, 16, 8, 9, 16, 16, 9, 15, 9, 10, 15, 0, 1, 23, 1, 2, 23, 23, 2, 22, 2, 3, 22, 22, 3, 21, 3, 4, 21, 21, 4, 20, 4, 5, 20, 20, 5, 19, 5, 6, 19, 19, 6, 18, 6, 7, 18 ],
 					"vertices": [ 1, 22, -3.61, -6.76, 1, 1, 22, -3.61, 9.24, 1, 3, 22, 15.49, 9.24, 0.97258, 23, -89.27, 9.24, 0.02734, 24, -159.11, 9.24, 8.0E-5, 3, 22, 34.58, 9.24, 0.92758, 23, -70.18, 9.24, 0.07175, 24, -140.02, 9.24, 6.7E-4, 3, 22, 53.67, 9.24, 0.851, 23, -51.09, 9.24, 0.14565, 24, -120.93, 9.24, 0.00335, 3, 22, 72.76, 9.24, 0.73702, 23, -32, 9.24, 0.25075, 24, -101.84, 9.24, 0.01223, 3, 22, 91.85, 9.24, 0.59184, 23, -12.91, 9.24, 0.37282, 24, -82.74, 9.24, 0.03534, 3, 22, 110.94, 9.24, 0.43333, 23, 6.18, 9.24, 0.482, 24, -63.65, 9.24, 0.08467, 3, 22, 130.03, 9.24, 0.28467, 23, 25.27, 9.24, 0.54153, 24, -44.56, 9.24, 0.1738, 3, 22, 149.12, 9.24, 0.16502, 23, 44.37, 9.24, 0.52188, 24, -25.47, 9.24, 0.3131, 3, 22, 168.21, 9.24, 0.08234, 23, 63.46, 9.24, 0.4129, 24, -6.38, 9.24, 0.50477, 3, 22, 187.3, 9.24, 0.03198, 23, 82.55, 9.24, 0.228, 24, 12.71, 9.24, 0.74001, 1, 24, 31.8, 9.24, 1, 1, 24, 31.8, -6.76, 1, 3, 22, 187.3, -6.76, 0.02989, 23, 82.55, -6.76, 0.23389, 24, 12.71, -6.76, 0.73622, 3, 22, 168.21, -6.76, 0.07799, 23, 63.46, -6.76, 0.42357, 24, -6.38, -6.76, 0.49844, 3, 22, 149.12, -6.76, 0.1584, 23, 44.37, -6.76, 0.53549, 24, -25.47, -6.76, 0.30611, 3, 22, 130.03, -6.76, 0.27629, 23, 25.27, -6.76, 0.55594, 24, -44.56, -6.76, 0.16777, 3, 22, 110.94, -6.76, 0.42428, 23, 6.18, -6.76, 0.49529, 24, -63.65, -6.76, 0.08044, 3, 22, 91.85, -6.76, 0.58346, 23, -12.91, -6.76, 0.38366, 24, -82.74, -6.76, 0.03289, 3, 22, 72.76, -6.76, 0.73038, 23, -32, -6.76, 0.25856, 24, -101.84, -6.76, 0.01107, 3, 22, 53.67, -6.76, 0.84652, 23, -51.09, -6.76, 0.15057, 24, -120.93, -6.76, 0.00291, 3, 22, 34.58, -6.76, 0.92506, 23, -70.18, -6.76, 0.0744, 24, -140.02, -6.76, 5.4E-4, 3, 22, 15.49, -6.76, 0.97151, 23, -89.27, -6.76, 0.02843, 24, -159.11, -6.76, 6.0E-5 ],
-					"hull": 24
+					"hull": 24,
+					"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, 42, 44, 44, 46, 46, 0 ],
+					"width": 16,
+					"height": 210
 				}
 			},
 			"stem-end": {

BIN
spine-haxe/example/assets/cloud-pot.png


BIN
spine-haxe/example/assets/cloud-pot.skel


BIN
spine-haxe/example/assets/sack-pma.png


+ 1 - 2
spine-haxe/example/assets/sack-pma.atlas → spine-haxe/example/assets/sack.atlas

@@ -1,7 +1,6 @@
-sack-pma.png
+sack.png
 	size: 512, 512
 	filter: Linear, Linear
-	pma: true
 	scale: 0.5
 cape-back
 	bounds: 237, 149, 260, 260

BIN
spine-haxe/example/assets/sack.png


+ 210 - 0
spine-haxe/example/assets/snowglobe-pma.atlas

@@ -0,0 +1,210 @@
+snowglobe-pma.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	pma: true
+	scale: 0.5
+arm-down-r
+	bounds: 884, 129, 76, 53
+arm-up-l
+	bounds: 718, 23, 49, 114
+	rotate: 90
+arm-up-r
+	bounds: 867, 69, 58, 104
+	rotate: 90
+blue-present-base
+	bounds: 884, 883, 126, 139
+eye-reflex-l
+	bounds: 991, 347, 12, 13
+eye-reflex-r
+	bounds: 867, 129, 10, 12
+	rotate: 90
+eye-white-l
+	bounds: 987, 697, 35, 43
+eye-white-r
+	bounds: 560, 2, 34, 48
+eyelashes-l
+	bounds: 982, 2, 32, 40
+gift-base
+	bounds: 884, 335, 125, 105
+	rotate: 90
+gift-decoration
+	bounds: 518, 2, 48, 40
+	rotate: 90
+globe-borders
+	bounds: 2, 141, 880, 881
+glove-l
+	bounds: 982, 44, 40, 61
+glove-shadow-l
+	bounds: 991, 403, 28, 57
+glove-shadow-r
+	bounds: 960, 204, 38, 62
+	rotate: 90
+green-present-base
+	bounds: 138, 13, 126, 139
+	rotate: 90
+hair-front
+	bounds: 884, 590, 150, 101
+	rotate: 90
+hair-side
+	bounds: 995, 574, 27, 53
+hair-strand-2
+	bounds: 987, 629, 26, 66
+hair-strand-5
+	bounds: 690, 7, 25, 47
+hair-strand-6
+	bounds: 995, 507, 14, 35
+head-base
+	bounds: 2, 4, 134, 135
+leg-down-l
+	bounds: 596, 3, 92, 51
+leg-up-l
+	bounds: 718, 74, 65, 147
+	rotate: 90
+leg-up-l-fuzzy
+	bounds: 834, 2, 73, 65
+leg-up-r
+	bounds: 576, 56, 83, 140
+	rotate: 90
+leg-up-r-fuzzy
+	bounds: 909, 2, 65, 71
+	rotate: 90
+mouth
+	bounds: 991, 362, 39, 13
+	rotate: 90
+neck-scarf
+	bounds: 279, 25, 142, 114
+nose
+	bounds: 995, 488, 17, 14
+	rotate: 90
+nose-shadow
+	bounds: 299, 8, 15, 15
+red-present-base
+	bounds: 884, 742, 126, 139
+scarf-end-l
+	bounds: 884, 462, 126, 109
+	rotate: 90
+scarf-end-r
+	bounds: 423, 52, 151, 87
+scarf-ribbon-middle-r
+	bounds: 960, 244, 62, 89
+scarf-shadow
+	bounds: 884, 184, 149, 74
+	rotate: 90
+shoe-l
+	bounds: 973, 107, 49, 95
+shoe-r
+	bounds: 423, 6, 44, 93
+	rotate: 90
+shoelace
+	bounds: 279, 2, 21, 18
+	rotate: 90
+snow
+	bounds: 995, 544, 27, 28
+string
+	bounds: 138, 6, 5, 53
+	rotate: 90
+
+snowglobe-pma_2.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	pma: true
+	scale: 0.5
+arm-down-l
+	bounds: 884, 579, 56, 54
+arm-down-l-fuzzy
+	bounds: 884, 635, 57, 59
+arm-down-r-fuzzy
+	bounds: 884, 696, 61, 66
+blue-present-decoration
+	bounds: 884, 216, 41, 40
+green-present-decoration
+	bounds: 884, 216, 41, 40
+ear-l
+	bounds: 884, 527, 55, 50
+ear-r
+	bounds: 291, 94, 45, 66
+	rotate: 90
+eyelashes-r
+	bounds: 2, 2, 32, 47
+	rotate: 90
+globe-texture-strong
+	bounds: 2, 141, 880, 881
+glove-fingers-l
+	bounds: 884, 361, 39, 51
+glove-fingers-r
+	bounds: 884, 469, 41, 56
+glove-r
+	bounds: 76, 36, 44, 65
+	rotate: 90
+hair-strand-1
+	bounds: 359, 102, 37, 65
+	rotate: 90
+hair-strand-3
+	bounds: 884, 414, 40, 53
+hair-strand-4
+	bounds: 939, 893, 37, 69
+iris-l
+	bounds: 884, 173, 40, 41
+iris-r
+	bounds: 143, 39, 40, 41
+leg-down-r
+	bounds: 2, 36, 72, 103
+pupil-l
+	bounds: 51, 2, 32, 32
+pupil-r
+	bounds: 85, 2, 32, 32
+red-present-decoration
+	bounds: 426, 99, 41, 40
+scarf-pompom-l
+	bounds: 884, 309, 50, 46
+	rotate: 90
+scarf-pompom-r
+	bounds: 884, 258, 49, 47
+	rotate: 90
+scarf-ribbon-bottom-l
+	bounds: 884, 856, 106, 53
+	rotate: 90
+scarf-ribbon-bottom-r
+	bounds: 76, 82, 105, 57
+scarf-ribbon-middle-l
+	bounds: 884, 764, 63, 90
+scarf-ribbon-top-l
+	bounds: 884, 964, 105, 58
+scarf-ribbon-top-r
+	bounds: 183, 86, 106, 53
+
+snowglobe-pma_3.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	pma: true
+	scale: 0.5
+globe-texture
+	bounds: 2, 2, 880, 881
+
+snowglobe-pma_4.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	pma: true
+	scale: 0.5
+elf-shadow
+	bounds: 2, 2, 395, 158
+globe-reflections
+	bounds: 2, 162, 646, 835
+globe-shadow
+	bounds: 650, 77, 920, 366
+	rotate: 90
+hat
+	bounds: 399, 7, 153, 221
+	rotate: 90
+
+snowglobe-pma_5.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	pma: true
+	scale: 0.5
+body
+	bounds: 710, 569, 139, 151
+globe-base-back
+	bounds: 2, 2, 606, 258
+globe-base-front
+	bounds: 2, 262, 706, 458

BIN
spine-haxe/example/assets/snowglobe-pma.png


BIN
spine-haxe/example/assets/snowglobe-pma_2.png


BIN
spine-haxe/example/assets/snowglobe-pma_3.png


BIN
spine-haxe/example/assets/snowglobe-pma_4.png


BIN
spine-haxe/example/assets/snowglobe-pma_5.png


ファイルの差分が大きいため隠しています
+ 1553 - 0
spine-haxe/example/assets/snowglobe-pro.json


BIN
spine-haxe/example/assets/snowglobe-pro.skel


+ 205 - 0
spine-haxe/example/assets/snowglobe.atlas

@@ -0,0 +1,205 @@
+snowglobe.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	scale: 0.5
+arm-down-r
+	bounds: 884, 129, 76, 53
+arm-up-l
+	bounds: 718, 23, 49, 114
+	rotate: 90
+arm-up-r
+	bounds: 867, 69, 58, 104
+	rotate: 90
+blue-present-base
+	bounds: 884, 883, 126, 139
+eye-reflex-l
+	bounds: 991, 347, 12, 13
+eye-reflex-r
+	bounds: 867, 129, 10, 12
+	rotate: 90
+eye-white-l
+	bounds: 987, 697, 35, 43
+eye-white-r
+	bounds: 560, 2, 34, 48
+eyelashes-l
+	bounds: 982, 2, 32, 40
+gift-base
+	bounds: 884, 335, 125, 105
+	rotate: 90
+gift-decoration
+	bounds: 518, 2, 48, 40
+	rotate: 90
+globe-borders
+	bounds: 2, 141, 880, 881
+glove-l
+	bounds: 982, 44, 40, 61
+glove-shadow-l
+	bounds: 991, 403, 28, 57
+glove-shadow-r
+	bounds: 960, 204, 38, 62
+	rotate: 90
+green-present-base
+	bounds: 138, 13, 126, 139
+	rotate: 90
+hair-front
+	bounds: 884, 590, 150, 101
+	rotate: 90
+hair-side
+	bounds: 995, 574, 27, 53
+hair-strand-2
+	bounds: 987, 629, 26, 66
+hair-strand-5
+	bounds: 690, 7, 25, 47
+hair-strand-6
+	bounds: 995, 507, 14, 35
+head-base
+	bounds: 2, 4, 134, 135
+leg-down-l
+	bounds: 596, 3, 92, 51
+leg-up-l
+	bounds: 718, 74, 65, 147
+	rotate: 90
+leg-up-l-fuzzy
+	bounds: 834, 2, 73, 65
+leg-up-r
+	bounds: 576, 56, 83, 140
+	rotate: 90
+leg-up-r-fuzzy
+	bounds: 909, 2, 65, 71
+	rotate: 90
+mouth
+	bounds: 991, 362, 39, 13
+	rotate: 90
+neck-scarf
+	bounds: 279, 25, 142, 114
+nose
+	bounds: 995, 488, 17, 14
+	rotate: 90
+nose-shadow
+	bounds: 299, 8, 15, 15
+red-present-base
+	bounds: 884, 742, 126, 139
+scarf-end-l
+	bounds: 884, 462, 126, 109
+	rotate: 90
+scarf-end-r
+	bounds: 423, 52, 151, 87
+scarf-ribbon-middle-r
+	bounds: 960, 244, 62, 89
+scarf-shadow
+	bounds: 884, 184, 149, 74
+	rotate: 90
+shoe-l
+	bounds: 973, 107, 49, 95
+shoe-r
+	bounds: 423, 6, 44, 93
+	rotate: 90
+shoelace
+	bounds: 279, 2, 21, 18
+	rotate: 90
+snow
+	bounds: 995, 544, 27, 28
+string
+	bounds: 138, 6, 5, 53
+	rotate: 90
+
+snowglobe_2.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	scale: 0.5
+arm-down-l
+	bounds: 884, 579, 56, 54
+arm-down-l-fuzzy
+	bounds: 884, 635, 57, 59
+arm-down-r-fuzzy
+	bounds: 884, 696, 61, 66
+blue-present-decoration
+	bounds: 884, 216, 41, 40
+green-present-decoration
+	bounds: 884, 216, 41, 40
+ear-l
+	bounds: 884, 527, 55, 50
+ear-r
+	bounds: 291, 94, 45, 66
+	rotate: 90
+eyelashes-r
+	bounds: 2, 2, 32, 47
+	rotate: 90
+globe-texture-strong
+	bounds: 2, 141, 880, 881
+glove-fingers-l
+	bounds: 884, 361, 39, 51
+glove-fingers-r
+	bounds: 884, 469, 41, 56
+glove-r
+	bounds: 76, 36, 44, 65
+	rotate: 90
+hair-strand-1
+	bounds: 359, 102, 37, 65
+	rotate: 90
+hair-strand-3
+	bounds: 884, 414, 40, 53
+hair-strand-4
+	bounds: 939, 893, 37, 69
+iris-l
+	bounds: 884, 173, 40, 41
+iris-r
+	bounds: 143, 39, 40, 41
+leg-down-r
+	bounds: 2, 36, 72, 103
+pupil-l
+	bounds: 51, 2, 32, 32
+pupil-r
+	bounds: 85, 2, 32, 32
+red-present-decoration
+	bounds: 426, 99, 41, 40
+scarf-pompom-l
+	bounds: 884, 309, 50, 46
+	rotate: 90
+scarf-pompom-r
+	bounds: 884, 258, 49, 47
+	rotate: 90
+scarf-ribbon-bottom-l
+	bounds: 884, 856, 106, 53
+	rotate: 90
+scarf-ribbon-bottom-r
+	bounds: 76, 82, 105, 57
+scarf-ribbon-middle-l
+	bounds: 884, 764, 63, 90
+scarf-ribbon-top-l
+	bounds: 884, 964, 105, 58
+scarf-ribbon-top-r
+	bounds: 183, 86, 106, 53
+
+snowglobe_3.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	scale: 0.5
+globe-texture
+	bounds: 2, 2, 880, 881
+
+snowglobe_4.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	scale: 0.5
+elf-shadow
+	bounds: 2, 2, 395, 158
+globe-reflections
+	bounds: 2, 162, 646, 835
+globe-shadow
+	bounds: 650, 77, 920, 366
+	rotate: 90
+hat
+	bounds: 399, 7, 153, 221
+	rotate: 90
+
+snowglobe_5.png
+	size: 1024, 1024
+	filter: Linear, Linear
+	scale: 0.5
+body
+	bounds: 710, 569, 139, 151
+globe-base-back
+	bounds: 2, 2, 606, 258
+globe-base-front
+	bounds: 2, 262, 706, 458

BIN
spine-haxe/example/assets/snowglobe.png


BIN
spine-haxe/example/assets/snowglobe_2.png


BIN
spine-haxe/example/assets/snowglobe_3.png


BIN
spine-haxe/example/assets/snowglobe_4.png


BIN
spine-haxe/example/assets/snowglobe_5.png


+ 0 - 1
spine-haxe/example/src/BasicExample.hx

@@ -65,7 +65,6 @@ class BasicExample extends Scene {
 
 	public function onTouch(e:TouchEvent) {
 		var touch = e.getTouch(this);
-		trace(touch);
 		if (touch != null && touch.phase == TouchPhase.ENDED) {
 			SceneManager.getInstance().switchScene(new SequenceExample());
 		}

+ 95 - 0
spine-haxe/example/src/CelestialCircusExample.hx

@@ -0,0 +1,95 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated July 28, 2023. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2023, 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.
+*****************************************************************************/
+
+import spine.BlendMode;
+import Scene.SceneManager;
+import openfl.utils.Assets;
+import spine.SkeletonData;
+import spine.Physics;
+import spine.animation.AnimationStateData;
+import spine.atlas.TextureAtlas;
+import spine.starling.SkeletonSprite;
+import spine.starling.StarlingTextureLoader;
+import starling.core.Starling;
+import starling.events.TouchEvent;
+import starling.events.TouchPhase;
+
+class CelestialCircusExample extends Scene {
+	var loadBinary = true;
+
+	var skeletonSprite:SkeletonSprite;
+	private var movement = new openfl.geom.Point();
+
+	public function load():Void {
+		background.color = 0x333333;
+
+		var atlas = new TextureAtlas(Assets.getText("assets/celestial-circus.atlas"), new StarlingTextureLoader("assets/celestial-circus.atlas"));
+		var skeletondata = SkeletonData.from(loadBinary ? Assets.getBytes("assets/celestial-circus-pro.skel") : Assets.getText("assets/celestial-circus-pro.json"), atlas);
+
+		var animationStateData = new AnimationStateData(skeletondata);
+		animationStateData.defaultMix = 0.25;
+
+		skeletonSprite = new SkeletonSprite(skeletondata, animationStateData);
+		skeletonSprite.skeleton.updateWorldTransform(Physics.update);
+		var bounds = skeletonSprite.skeleton.getBounds();
+		
+		skeletonSprite.scale = 0.2;
+		skeletonSprite.x = Starling.current.stage.stageWidth / 2;
+		skeletonSprite.y = Starling.current.stage.stageHeight / 1.5;
+		
+		skeletonSprite.state.setAnimationByName(0, "eyeblink-long", true);
+
+		addText("Drag Celeste to move her around");
+		addText("Click background for next scene", 10, 30);
+
+		addChild(skeletonSprite);
+		juggler.add(skeletonSprite);
+
+		addEventListener(TouchEvent.TOUCH, onTouch);
+	}
+
+	public function onTouch(e:TouchEvent) {
+		var skeletonTouch = e.getTouch(skeletonSprite);
+		if (skeletonTouch != null) {
+			if (skeletonTouch.phase == TouchPhase.MOVED) {
+				skeletonTouch.getMovement(this, movement);
+				skeletonSprite.skeleton.x += movement.x / skeletonSprite.scale;
+				skeletonSprite.skeleton.y += movement.y / skeletonSprite.scale;
+			}
+		} else {
+			var sceneTouch = e.getTouch(this);
+			if (sceneTouch != null && sceneTouch.phase == TouchPhase.ENDED) {
+				SceneManager.getInstance().switchScene(new SnowglobeExample());
+			}
+		}
+
+		
+	}
+
+}

+ 78 - 0
spine-haxe/example/src/CloudPotExample.hx

@@ -0,0 +1,78 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated July 28, 2023. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2023, 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.
+*****************************************************************************/
+
+import spine.BlendMode;
+import Scene.SceneManager;
+import openfl.utils.Assets;
+import spine.SkeletonData;
+import spine.Physics;
+import spine.animation.AnimationStateData;
+import spine.atlas.TextureAtlas;
+import spine.starling.SkeletonSprite;
+import spine.starling.StarlingTextureLoader;
+import starling.core.Starling;
+import starling.events.TouchEvent;
+import starling.events.TouchPhase;
+
+class CloudPotExample extends Scene {
+	var loadBinary = false;
+
+	public function load():Void {
+		background.color = 0x333333;
+
+		var atlas = new TextureAtlas(Assets.getText("assets/cloud-pot.atlas"), new StarlingTextureLoader("assets/cloud-pot.atlas"));
+		var skeletondata = SkeletonData.from(Assets.getText("assets/cloud-pot.json"), atlas);
+
+		var animationStateData = new AnimationStateData(skeletondata);
+		animationStateData.defaultMix = 0.25;
+
+		var skeletonSprite = new SkeletonSprite(skeletondata, animationStateData);
+		skeletonSprite.skeleton.updateWorldTransform(Physics.update);
+		var bounds = skeletonSprite.skeleton.getBounds();
+
+		
+		skeletonSprite.scale = 0.2;
+		skeletonSprite.x = Starling.current.stage.stageWidth / 2;
+		skeletonSprite.y = Starling.current.stage.stageHeight / 2;
+		
+		skeletonSprite.state.setAnimationByName(0, "playing-in-the-rain", true);
+
+		addChild(skeletonSprite);
+		juggler.add(skeletonSprite);
+
+		addEventListener(TouchEvent.TOUCH, onTouch);
+	}
+
+	public function onTouch(e:TouchEvent) {
+		var touch = e.getTouch(this);
+		if (touch != null && touch.phase == TouchPhase.ENDED) {
+			SceneManager.getInstance().switchScene(new BasicExample());
+		}
+	}
+}

+ 1 - 2
spine-haxe/example/src/Main.hx

@@ -49,7 +49,6 @@ class Main extends Sprite {
 		starlingSingleton.start();
 		Starling.current.stage.color = 0x000000;
 
-		// SceneManager.getInstance().switchScene(new TankExample());
-		SceneManager.getInstance().switchScene(new VineExample());
+		SceneManager.getInstance().switchScene(new BasicExample());
 	}
 }

+ 79 - 0
spine-haxe/example/src/SackExample.hx

@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated July 28, 2023. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2023, 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.
+*****************************************************************************/
+
+import Scene.SceneManager;
+import openfl.utils.Assets;
+import spine.SkeletonData;
+import spine.Physics;
+import spine.animation.AnimationStateData;
+import spine.atlas.TextureAtlas;
+import spine.starling.SkeletonSprite;
+import spine.starling.StarlingTextureLoader;
+import starling.core.Starling;
+import starling.events.TouchEvent;
+import starling.events.TouchPhase;
+
+class SackExample extends Scene {
+	var loadBinary = false;
+
+	public function load():Void {
+		background.color = 0x333333;
+
+		var atlas = new TextureAtlas(Assets.getText("assets/sack.atlas"), new StarlingTextureLoader("assets/sack.atlas"));
+		var skeletondata = SkeletonData.from(Assets.getText("assets/sack-pro.json"), atlas);
+
+		var animationStateData = new AnimationStateData(skeletondata);
+		animationStateData.defaultMix = 0.25;
+
+		var skeletonSprite = new SkeletonSprite(skeletondata, animationStateData);
+		skeletonSprite.skeleton.updateWorldTransform(Physics.update);
+		var bounds = skeletonSprite.skeleton.getBounds();
+
+		
+		skeletonSprite.scale = 0.2;
+		skeletonSprite.x = Starling.current.stage.stageWidth / 2;
+		skeletonSprite.y = Starling.current.stage.stageHeight/ 2;
+		
+		trace(skeletonSprite);
+
+		skeletonSprite.state.setAnimationByName(0, "cape-follow-example", true);
+
+		addChild(skeletonSprite);
+		juggler.add(skeletonSprite);
+
+		addEventListener(TouchEvent.TOUCH, onTouch);
+	}
+
+	public function onTouch(e:TouchEvent) {
+		var touch = e.getTouch(this);
+		if (touch != null && touch.phase == TouchPhase.ENDED) {
+			SceneManager.getInstance().switchScene(new CelestialCircusExample());
+		}
+	}
+}

+ 4 - 5
spine-haxe/example/src/Scene.hx

@@ -28,7 +28,6 @@
 *****************************************************************************/
 
 import starling.display.Quad;
-import starling.geom.Rectangle;
 import starling.text.TextField;
 import starling.core.Starling;
 import starling.display.Sprite;
@@ -82,10 +81,10 @@ abstract class Scene extends Sprite {
 		super.dispose();
 	}
 
-	public function addText(text:String) {
-		var textField = new TextField(200, 30, text);
-		textField.x = 10;
-		textField.y = 10;
+	public function addText(text:String, x:Int = 10, y:Int = 10) {
+		var textField = new TextField(250, 30, text);
+		textField.x = x;
+		textField.y = y;
 		textField.format.color = 0xffffffff;
 		addChild(textField);
 		return textField;

+ 77 - 0
spine-haxe/example/src/SnowglobeExample.hx

@@ -0,0 +1,77 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated July 28, 2023. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2023, 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.
+*****************************************************************************/
+
+import Scene.SceneManager;
+import openfl.utils.Assets;
+import spine.SkeletonData;
+import spine.Physics;
+import spine.animation.AnimationStateData;
+import spine.atlas.TextureAtlas;
+import spine.starling.SkeletonSprite;
+import spine.starling.StarlingTextureLoader;
+import starling.core.Starling;
+import starling.events.TouchEvent;
+import starling.events.TouchPhase;
+
+class SnowglobeExample extends Scene {
+	var loadBinary = false;
+
+	public function load():Void {
+		background.color = 0x333333;
+
+		var atlas = new TextureAtlas(Assets.getText("assets/snowglobe.atlas"), new StarlingTextureLoader("assets/snowglobe.atlas"));
+		var skeletondata = SkeletonData.from(Assets.getText("assets/snowglobe-pro.json"), atlas);
+
+		var animationStateData = new AnimationStateData(skeletondata);
+		animationStateData.defaultMix = 0.25;
+
+		var skeletonSprite = new SkeletonSprite(skeletondata, animationStateData);
+		skeletonSprite.skeleton.updateWorldTransform(Physics.update);
+		var bounds = skeletonSprite.skeleton.getBounds();
+
+		
+		skeletonSprite.scale = 0.15;
+		skeletonSprite.x = Starling.current.stage.stageWidth / 2;
+		skeletonSprite.y = Starling.current.stage.stageHeight/ 1.5;
+		
+		skeletonSprite.state.setAnimationByName(0, "shake", true);
+
+		addChild(skeletonSprite);
+		juggler.add(skeletonSprite);
+
+		addEventListener(TouchEvent.TOUCH, onTouch);
+	}
+
+	public function onTouch(e:TouchEvent) {
+		var touch = e.getTouch(this);
+		if (touch != null && touch.phase == TouchPhase.ENDED) {
+			SceneManager.getInstance().switchScene(new CloudPotExample());
+		}
+	}
+}

+ 7 - 21
spine-haxe/example/src/VineExample.hx

@@ -27,7 +27,6 @@
  * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *****************************************************************************/
 
-import spine.BlendMode;
 import Scene.SceneManager;
 import openfl.utils.Assets;
 import spine.SkeletonData;
@@ -45,31 +44,17 @@ class VineExample extends Scene {
 
 	public function load():Void {
 		background.color = 0xffffffff;
-
-		// var atlas = new TextureAtlas(Assets.getText("assets/cloud-pot.atlas"), new StarlingTextureLoader("assets/cloud-pot.atlas"));
-		// var skeletondata = SkeletonData.from(Assets.getText("assets/cloud-pot.json"), atlas);
-
-		var atlas = new TextureAtlas(Assets.getText("assets/sack-pma.atlas"), new StarlingTextureLoader("assets/sack-pma.atlas"));
-		var skeletondata = SkeletonData.from(Assets.getText("assets/sack-pro.json"), atlas);
-
+		var atlas = new TextureAtlas(Assets.getText("assets/vine.atlas"), new StarlingTextureLoader("assets/vine.atlas"));
+		var skeletondata = SkeletonData.from(loadBinary ? Assets.getBytes("assets/vine-pro.skel") : Assets.getText("assets/vine-pro.json"), atlas);
 		var animationStateData = new AnimationStateData(skeletondata);
 		animationStateData.defaultMix = 0.25;
 
 		var skeletonSprite = new SkeletonSprite(skeletondata, animationStateData);
-		skeletonSprite.skeleton.updateWorldTransform(Physics.update);
+		skeletonSprite.skeleton.updateWorldTransform(Physics.none);
 		var bounds = skeletonSprite.skeleton.getBounds();
-
-		
-		skeletonSprite.scale = 0.2;
+		skeletonSprite.scale = Starling.current.stage.stageWidth / bounds.width;
 		skeletonSprite.x = Starling.current.stage.stageWidth / 2;
-		skeletonSprite.y = Starling.current.stage.stageHeight/ 2;
-		
-		trace(skeletonSprite);
-
-		// skeletonSprite.state.setAnimationByName(0, "playing-in-the-rain", true);
-		
-		
-		skeletonSprite.state.setAnimationByName(0, "cape-follow-example", true);
+		skeletonSprite.y = Starling.current.stage.stageHeight * 0.5;
 
 		addChild(skeletonSprite);
 		juggler.add(skeletonSprite);
@@ -80,7 +65,8 @@ class VineExample extends Scene {
 	public function onTouch(e:TouchEvent) {
 		var touch = e.getTouch(this);
 		if (touch != null && touch.phase == TouchPhase.ENDED) {
-			// SceneManager.getInstance().switchScene(new BasicExample());
+			SceneManager.getInstance().switchScene(new SackExample());
 		}
 	}
 }
+

+ 15 - 10
spine-haxe/spine-haxe/spine/IkConstraint.hx

@@ -102,6 +102,19 @@ class IkConstraint implements Updatable {
 		var rotationIK:Float = -bone.ashearX - bone.arotation,
 			tx:Float = 0,
 			ty:Float = 0;
+
+		function switchDefault() {
+			var x:Float = targetX - p.worldX, y:Float = targetY - p.worldY;
+			var d:Float = pa * pd - pb * pc;
+			if (Math.abs(d) <= 0.0001) {
+				tx = 0;
+				ty = 0;
+			} else {
+				tx = (x * pd - y * pb) / d - bone.ax;
+				ty = (y * pa - x * pc) / d - bone.ay;
+			}
+		}
+
 		switch (bone.inherit) {
 			case Inherit.onlyTranslation:
 				tx = (targetX - bone.worldX) * MathUtils.signum(bone.skeleton.scaleX);
@@ -117,17 +130,9 @@ class IkConstraint implements Updatable {
 				var d:Float = pa * pd - pb * pc;
 				tx = (x * pd - y * pb) / d - bone.ax;
 				ty = (y * pa - x * pc) / d - bone.ay;
-				// TODO: this should fall-through!
+				switchDefault(); // Fall through.
 			default:
-				var x:Float = targetX - p.worldX, y:Float = targetY - p.worldY;
-				var d:Float = pa * pd - pb * pc;
-				if (Math.abs(d) <= 0.0001) {
-					tx = 0;
-					ty = 0;
-				} else {
-					tx = (x * pd - y * pb) / d - bone.ax;
-					ty = (y * pa - x * pc) / d - bone.ay;
-				}
+				switchDefault();
 		}
 
 		rotationIK += Math.atan2(ty, tx) * MathUtils.radDeg;

+ 217 - 102
spine-haxe/spine-haxe/spine/SkeletonBinary.hx

@@ -41,9 +41,19 @@ import spine.animation.DeformTimeline;
 import spine.animation.DrawOrderTimeline;
 import spine.animation.EventTimeline;
 import spine.animation.IkConstraintTimeline;
+import spine.animation.InheritTimeline;
 import spine.animation.PathConstraintMixTimeline;
 import spine.animation.PathConstraintPositionTimeline;
 import spine.animation.PathConstraintSpacingTimeline;
+import spine.animation.PhysicsConstraintDampingTimeline;
+import spine.animation.PhysicsConstraintGravityTimeline;
+import spine.animation.PhysicsConstraintInertiaTimeline;
+import spine.animation.PhysicsConstraintMassTimeline;
+import spine.animation.PhysicsConstraintMixTimeline;
+import spine.animation.PhysicsConstraintResetTimeline;
+import spine.animation.PhysicsConstraintStrengthTimeline;
+import spine.animation.PhysicsConstraintTimeline;
+import spine.animation.PhysicsConstraintWindTimeline;
 import spine.animation.RGB2Timeline;
 import spine.animation.RGBA2Timeline;
 import spine.animation.RGBATimeline;
@@ -88,6 +98,7 @@ class SkeletonBinary {
 	private static inline var BONE_SHEAR:Int = 7;
 	private static inline var BONE_SHEARX:Int = 8;
 	private static inline var BONE_SHEARY:Int = 9;
+	private static inline var BONE_INHERIT:Int = 10;
 
 	private static inline var SLOT_ATTACHMENT:Int = 0;
 	private static inline var SLOT_RGBA:Int = 1;
@@ -103,6 +114,15 @@ class SkeletonBinary {
 	private static inline var PATH_SPACING:Int = 1;
 	private static inline var PATH_MIX:Int = 2;
 
+	private static inline var PHYSICS_INERTIA:Int = 0;
+	private static inline var PHYSICS_STRENGTH:Int = 1;
+	private static inline var PHYSICS_DAMPING:Int = 2;
+	private static inline var PHYSICS_MASS:Int = 4;
+	private static inline var PHYSICS_WIND:Int = 5;
+	private static inline var PHYSICS_GRAVITY:Int = 6;
+	private static inline var PHYSICS_MIX:Int = 7;
+	private static inline var PHYSICS_RESET:Int = 8;
+
 	private static inline var CURVE_LINEAR:Int = 0;
 	private static inline var CURVE_STEPPED:Int = 1;
 	private static inline var CURVE_BEZIER:Int = 2;
@@ -161,8 +181,11 @@ class SkeletonBinary {
 			boneData.length = input.readFloat() * scale;
 			boneData.inherit = Inherit.values[input.readInt(true)];
 			boneData.skinRequired = input.readBoolean();
-			if (nonessential)
+			if (nonessential) {
 				boneData.color.setFromRgba8888(input.readInt32());
+				boneData.icon = input.readString();
+				boneData.visible = input.readBoolean();
+			}
 			skeletonData.bones.push(boneData);
 		}
 
@@ -170,6 +193,14 @@ class SkeletonBinary {
 		n = input.readInt(true);
 		for (i in 0...n) {
 			var slotName:String = input.readString();
+			var path:String = null;
+			if (nonessential) {
+				var slash:Int = slotName.lastIndexOf('/');
+				if (slash != -1) {
+					path = slotName.substring(0, slash);
+					slotName = slotName.substring(slash + 1);
+				}
+			}
 			var slotBoneData:BoneData = skeletonData.bones[input.readInt(true)];
 			var slotData:SlotData = new SlotData(i, slotName, slotBoneData);
 			slotData.color.setFromRgba8888(input.readInt32());
@@ -182,6 +213,10 @@ class SkeletonBinary {
 
 			slotData.attachmentName = input.readStringRef();
 			slotData.blendMode = BlendMode.values[input.readInt(true)];
+			if (nonessential) {
+				slotData.visible = input.readBoolean();
+				slotData.path = path;
+			}
 			skeletonData.slots.push(slotData);
 		}
 
@@ -190,18 +225,19 @@ class SkeletonBinary {
 		for (i in 0...n) {
 			var ikData:IkConstraintData = new IkConstraintData(input.readString());
 			ikData.order = input.readInt(true);
-			ikData.skinRequired = input.readBoolean();
 			nn = input.readInt(true);
 			for (ii in 0...nn) {
 				ikData.bones.push(skeletonData.bones[input.readInt(true)]);
 			}
 			ikData.target = skeletonData.bones[input.readInt(true)];
-			ikData.mix = input.readFloat();
-			ikData.softness = input.readFloat() * scale;
-			ikData.bendDirection = input.readByte();
-			ikData.compress = input.readBoolean();
-			ikData.stretch = input.readBoolean();
-			ikData.uniform = input.readBoolean();
+			var flags = input.readByte();
+			ikData.skinRequired = (flags & 1) != 0;
+			ikData.bendDirection = (flags & 2) != 0 ? 1 : -1;
+			ikData.compress = (flags & 4) != 0;
+			ikData.stretch = (flags & 8) != 0;
+			ikData.uniform = (flags & 16) != 0;
+			if ((flags & 32) != 0) ikData.mix = (flags & 64) != 0 ? input.readFloat() : 1;
+			if ((flags & 128) != 0) ikData.softness = input.readFloat() * scale;
 			skeletonData.ikConstraints.push(ikData);
 		}
 
@@ -210,26 +246,28 @@ class SkeletonBinary {
 		for (i in 0...n) {
 			var transformData:TransformConstraintData = new TransformConstraintData(input.readString());
 			transformData.order = input.readInt(true);
-			transformData.skinRequired = input.readBoolean();
 			nn = input.readInt(true);
 			for (ii in 0...nn) {
 				transformData.bones.push(skeletonData.bones[input.readInt(true)]);
 			}
 			transformData.target = skeletonData.bones[input.readInt(true)];
-			transformData.local = input.readBoolean();
-			transformData.relative = input.readBoolean();
-			transformData.offsetRotation = input.readFloat();
-			transformData.offsetX = input.readFloat() * scale;
-			transformData.offsetY = input.readFloat() * scale;
-			transformData.offsetScaleX = input.readFloat();
-			transformData.offsetScaleY = input.readFloat();
-			transformData.offsetShearY = input.readFloat();
-			transformData.mixRotate = input.readFloat();
-			transformData.mixX = input.readFloat();
-			transformData.mixY = input.readFloat();
-			transformData.mixScaleX = input.readFloat();
-			transformData.mixScaleY = input.readFloat();
-			transformData.mixShearY = input.readFloat();
+			var flags = input.readByte();
+			transformData.skinRequired = (flags & 1) != 0;
+			transformData.local = (flags & 2) != 0;
+			transformData.relative = (flags & 4) != 0;
+			if ((flags & 8) != 0) transformData.offsetRotation = input.readFloat();
+			if ((flags & 16) != 0) transformData.offsetX = input.readFloat() * scale;
+			if ((flags & 32) != 0) transformData.offsetY = input.readFloat() * scale;
+			if ((flags & 64) != 0) transformData.offsetScaleX = input.readFloat();
+			if ((flags & 128) != 0) transformData.offsetScaleY = input.readFloat();
+			flags = input.readByte();
+			if ((flags & 1) != 0) transformData.offsetShearY = input.readFloat();
+			if ((flags & 2) != 0) transformData.mixRotate = input.readFloat();
+			if ((flags & 4) != 0) transformData.mixX = input.readFloat();
+			if ((flags & 8) != 0) transformData.mixY = input.readFloat();
+			if ((flags & 16) != 0) transformData.mixScaleX = input.readFloat();
+			if ((flags & 32) != 0) transformData.mixScaleY = input.readFloat();
+			if ((flags & 64) != 0) transformData.mixShearY = input.readFloat();
 			skeletonData.transformConstraints.push(transformData);
 		}
 
@@ -244,10 +282,11 @@ class SkeletonBinary {
 				pathData.bones.push(skeletonData.bones[input.readInt(true)]);
 			}
 			pathData.target = skeletonData.slots[input.readInt(true)];
-			pathData.positionMode = PositionMode.values[input.readInt(true)];
-			pathData.spacingMode = SpacingMode.values[input.readInt(true)];
-			pathData.rotateMode = RotateMode.values[input.readInt(true)];
-			pathData.offsetRotation = input.readFloat();
+			var flags = input.readByte();
+			pathData.positionMode = PositionMode.values[flags & 1];
+			pathData.spacingMode = SpacingMode.values[(flags >> 1) & 3];
+			pathData.rotateMode = RotateMode.values[(flags >> 3) & 3];
+			if ((flags & 128) != 0) pathData.offsetRotation = input.readFloat();
 			pathData.position = input.readFloat();
 			if (pathData.positionMode == PositionMode.fixed)
 				pathData.position *= scale;
@@ -260,6 +299,39 @@ class SkeletonBinary {
 			skeletonData.pathConstraints.push(pathData);
 		}
 
+		// Physics constraints.
+		n = input.readInt(true);
+		for (i in 0...n) {
+			var physicsData:PhysicsConstraintData = new PhysicsConstraintData(input.readString());
+			physicsData.order = input.readInt(true);
+			physicsData.bone = skeletonData.bones[input.readInt(true)];
+			var flags = input.readByte();
+			physicsData.skinRequired = (flags & 1) != 0;
+			if ((flags & 2) != 0) physicsData.x = input.readFloat();
+			if ((flags & 4) != 0) physicsData.y = input.readFloat();
+			if ((flags & 8) != 0) physicsData.rotate = input.readFloat();
+			if ((flags & 16) != 0) physicsData.scaleX = input.readFloat();
+			if ((flags & 32) != 0) physicsData.shearX = input.readFloat();
+			physicsData.limit = ((flags & 64) != 0 ? input.readFloat() : 5000) * scale;
+			physicsData.step = 1 / input.readUnsignedByte();
+			physicsData.inertia = input.readFloat();
+			physicsData.strength = input.readFloat();
+			physicsData.damping = input.readFloat();
+			physicsData.massInverse = (flags & 128) != 0 ? input.readFloat() : 1;
+			physicsData.wind = input.readFloat();
+			physicsData.gravity = input.readFloat();
+			flags = input.readByte();
+			if ((flags & 1) != 0) physicsData.inertiaGlobal = true;
+			if ((flags & 2) != 0) physicsData.strengthGlobal = true;
+			if ((flags & 4) != 0) physicsData.dampingGlobal = true;
+			if ((flags & 8) != 0) physicsData.massGlobal = true;
+			if ((flags & 16) != 0) physicsData.windGlobal = true;
+			if ((flags & 32) != 0) physicsData.gravityGlobal = true;
+			if ((flags & 64) != 0) physicsData.mixGlobal = true;
+			physicsData.mix = (flags & 128) != 0 ? input.readFloat() : 1;
+			skeletonData.physicsConstraints.push(physicsData);
+		}
+
 		// Default skin.
 		var defaultSkin:Skin = readSkin(input, skeletonData, true, nonessential);
 		if (defaultSkin != null) {
@@ -279,9 +351,7 @@ class SkeletonBinary {
 
 		// Linked meshes.
 		for (linkedMesh in linkedMeshes) {
-			var skin:Skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);
-			if (skin == null)
-				throw new SpineException("Skin not found: " + linkedMesh.skin);
+			var skin:Skin = skeletonData.skins[linkedMesh.skinIndex];
 			var parent:Attachment = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
 			if (parent == null)
 				throw new SpineException("Parent mesh not found: " + linkedMesh.parent);
@@ -295,7 +365,7 @@ class SkeletonBinary {
 		// Events.
 		n = input.readInt(true);
 		for (i in 0...n) {
-			var data:EventData = new EventData(input.readStringRef());
+			var data:EventData = new EventData(input.readString());
 			data.intValue = input.readInt(false);
 			data.floatValue = input.readFloat();
 			data.stringValue = input.readString();
@@ -325,7 +395,8 @@ class SkeletonBinary {
 				return null;
 			skin = new Skin("default");
 		} else {
-			skin = new Skin(input.readStringRef());
+			skin = new Skin(input.readString());
+			if (nonessential) skin.color.setFromRgba8888(input.readInt32());
 			skin.bones.resize(input.readInt(true));
 			for (i in 0...skin.bones.length) {
 				skin.bones[i] = skeletonData.bones[input.readInt(true)];
@@ -340,6 +411,9 @@ class SkeletonBinary {
 			for (i in 0...input.readInt(true)) {
 				skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);
 			}
+			for (i in 0...input.readInt(true)) {
+				skin.constraints.push(skeletonData.physicsConstraints[input.readInt(true)]);
+			}
 
 			slotCount = input.readInt(true);
 		}
@@ -348,6 +422,8 @@ class SkeletonBinary {
 			var slotIndex:Int = input.readInt(true);
 			for (ii in 0...input.readInt(true)) {
 				var name:String = input.readStringRef();
+				if (name == null)
+					throw new SpineException("Attachment name must not be null");
 				var attachment:Attachment = readAttachment(input, skeletonData, skin, slotIndex, name, nonessential);
 				if (attachment != null)
 					skin.setAttachment(slotIndex, name, attachment);
@@ -357,8 +433,6 @@ class SkeletonBinary {
 	}
 
 	private function readSequence(input:BinaryInput):Sequence {
-		if (!input.readBoolean())
-			return null;
 		var sequence = new Sequence(input.readInt(true));
 		sequence.start = input.readInt(true);
 		sequence.digits = input.readInt(true);
@@ -368,7 +442,6 @@ class SkeletonBinary {
 
 	private function readAttachment(input:BinaryInput, skeletonData:SkeletonData, skin:Skin, slotIndex:Int, attachmentName:String,
 			nonessential:Bool):Attachment {
-		var vertexCount:Int;
 		var vertices:Vertices;
 		var path:String;
 		var rotation:Float;
@@ -381,22 +454,22 @@ class SkeletonBinary {
 		var color:Int;
 		var mesh:MeshAttachment;
 
-		var name:String = input.readStringRef();
+		var flags = input.readByte();
+		var name:String = (flags & 8) != 0 ? input.readStringRef() : attachmentName;
 		if (name == null)
-			name = attachmentName;
-
-		switch (AttachmentType.values[input.readByte()]) {
+			throw new SpineException("Attachment name must not be null");
+		switch (AttachmentType.values[flags & 7]) {
 			case AttachmentType.region:
-				path = input.readStringRef();
-				rotation = input.readFloat();
+				path = (flags & 16) != 0 ? input.readStringRef() : null;
+				color = (flags & 32) != 0 ? input.readInt32() : 0xffffffff;
+				var sequence = (flags & 64) != 0 ? readSequence(input) : null;
+				rotation = (flags & 128) != 0 ? input.readFloat() : 0;
 				x = input.readFloat();
 				y = input.readFloat();
 				scaleX = input.readFloat();
 				scaleY = input.readFloat();
 				width = input.readFloat();
 				height = input.readFloat();
-				color = input.readInt32();
-				var sequence = readSequence(input);
 
 				if (path == null)
 					path = name;
@@ -417,14 +490,13 @@ class SkeletonBinary {
 					region.updateRegion();
 				return region;
 			case AttachmentType.boundingbox:
-				vertexCount = input.readInt(true);
-				vertices = readVertices(input, vertexCount);
+				vertices = readVertices(input, (flags & 16) != 0);
 				color = nonessential ? input.readInt32() : 0;
 
 				var box:BoundingBoxAttachment = attachmentLoader.newBoundingBoxAttachment(skin, name);
 				if (box == null)
 					return null;
-				box.worldVerticesLength = vertexCount << 1;
+				box.worldVerticesLength = vertices.length;
 				box.vertices = vertices.vertices;
 				if (vertices.bones.length > 0)
 					box.bones = vertices.bones;
@@ -432,17 +504,16 @@ class SkeletonBinary {
 					box.color.setFromRgba8888(color);
 				return box;
 			case AttachmentType.mesh:
-				path = input.readStringRef();
-				color = input.readInt32();
-				vertexCount = input.readInt(true);
-				var uvs:Array<Float> = readFloatArray(input, vertexCount << 1, 1);
-				var triangles:Array<Int> = readShortArray(input);
-				vertices = readVertices(input, vertexCount);
-				var hullLength:Int = input.readInt(true);
-				var sequence = readSequence(input);
+				path = (flags & 16) != 0 ? input.readStringRef() : name;
+				color = (flags & 32) != 0 ? input.readInt32() : 0xffffffff;
+				var sequence = (flags & 64) != 0 ? readSequence(input) : null;
+				var hullLength = input.readInt(true);
+				vertices = readVertices(input, (flags & 128) != 0);
+				var uvs:Array<Float> = readFloatArray(input, vertices.length, 1);
+				var triangles:Array<Int> = readShortArray(input, (vertices.length - hullLength - 2) * 3);
 				var edges:Array<Int> = null;
 				if (nonessential) {
-					edges = readShortArray(input);
+					edges = readShortArray(input, input.readInt(true));
 					width = input.readFloat();
 					height = input.readFloat();
 				}
@@ -457,7 +528,7 @@ class SkeletonBinary {
 				if (vertices.bones.length > 0)
 					mesh.bones = vertices.bones;
 				mesh.vertices = vertices.vertices;
-				mesh.worldVerticesLength = vertexCount << 1;
+				mesh.worldVerticesLength = vertices.length;
 				mesh.triangles = triangles;
 				mesh.regionUVs = uvs;
 				if (sequence == null)
@@ -471,19 +542,18 @@ class SkeletonBinary {
 				}
 				return mesh;
 			case AttachmentType.linkedmesh:
-				path = input.readStringRef();
-				color = input.readInt32();
-				var skinName:String = input.readStringRef();
+				path = (flags & 16) != 0 ? input.readStringRef() : name;
+				if (path == null) throw new SpineException("Path of linked mesh must not be null");
+				color = (flags & 32) != 0 ? input.readInt32() : 0xffffffff;
+				var sequence = (flags & 64) != 0 ? this.readSequence(input) : null;
+				var inheritTimelines:Bool = (flags & 128) != 0;
+				var skinIndex = input.readInt(true);
 				var parent:String = input.readStringRef();
-				var inheritTimelines:Bool = input.readBoolean();
-				var sequence = readSequence(input);
 				if (nonessential) {
 					width = input.readFloat();
 					height = input.readFloat();
 				}
 
-				if (path == null)
-					path = name;
 				mesh = attachmentLoader.newMeshAttachment(skin, name, path, sequence);
 				if (mesh == null)
 					return null;
@@ -494,15 +564,14 @@ class SkeletonBinary {
 					mesh.width = width * scale;
 					mesh.height = height * scale;
 				}
-				this.linkedMeshes.push(new LinkedMeshBinary(mesh, skinName, slotIndex, parent, inheritTimelines));
+				this.linkedMeshes.push(new LinkedMeshBinary(mesh, skinIndex, slotIndex, parent, inheritTimelines));
 				return mesh;
 			case AttachmentType.path:
-				var closed:Bool = input.readBoolean();
-				var constantSpeed:Bool = input.readBoolean();
-				vertexCount = input.readInt(true);
-				vertices = readVertices(input, vertexCount);
+				var closed:Bool = (flags & 16) != 0;
+				var constantSpeed:Bool = (flags & 32) != 0;
+				vertices = readVertices(input, (flags & 64) != 0);
 				var lengths:Array<Float> = new Array<Float>();
-				lengths.resize(Std.int(vertexCount / 3));
+				lengths.resize(Std.int(vertices.length / 6));
 				for (i in 0...lengths.length) {
 					lengths[i] = input.readFloat() * scale;
 				}
@@ -513,7 +582,7 @@ class SkeletonBinary {
 					return null;
 				pathAttachment.closed = closed;
 				pathAttachment.constantSpeed = constantSpeed;
-				pathAttachment.worldVerticesLength = vertexCount << 1;
+				pathAttachment.worldVerticesLength = vertices.length;
 				pathAttachment.vertices = vertices.vertices;
 				if (vertices.bones.length > 0)
 					pathAttachment.bones = vertices.bones;
@@ -538,15 +607,14 @@ class SkeletonBinary {
 				return point;
 			case AttachmentType.clipping:
 				var endSlotIndex:Int = input.readInt(true);
-				vertexCount = input.readInt(true);
-				vertices = readVertices(input, vertexCount);
+				vertices = readVertices(input, (flags & 16) != 0);
 				color = nonessential ? input.readInt32() : 0;
 
 				var clip:ClippingAttachment = attachmentLoader.newClippingAttachment(skin, name);
 				if (clip == null)
 					return null;
 				clip.endSlot = skeletonData.slots[endSlotIndex];
-				clip.worldVerticesLength = vertexCount << 1;
+				clip.worldVerticesLength = vertices.length;
 				clip.vertices = vertices.vertices;
 				if (vertices.bones.length > 0)
 					clip.bones = vertices.bones;
@@ -557,13 +625,12 @@ class SkeletonBinary {
 		return null;
 	}
 
-	private function readVertices(input:BinaryInput, vertexCount:Int):Vertices {
-		var verticesLength:Int = vertexCount << 1;
+	private function readVertices(input:BinaryInput, weighted:Bool):Vertices {
+		var vertexCount:Int = input.readInt(true);
 		var vertices:Vertices = new Vertices();
-
-		var isWeighted:Bool = input.readBoolean();
-		if (!isWeighted) {
-			vertices.vertices = readFloatArray(input, verticesLength, scale);
+		vertices.length = vertexCount << 1;
+		if (!weighted) {
+			vertices.vertices = readFloatArray(input, vertices.length, scale);
 			return vertices;
 		}
 		var weights:Array<Float> = new Array<Float>();
@@ -597,11 +664,10 @@ class SkeletonBinary {
 		return array;
 	}
 
-	private function readShortArray(input:BinaryInput):Array<Int> {
-		var n:Int = input.readInt(true);
+	private function readShortArray(input:BinaryInput, n:Int):Array<Int> {
 		var array:Array<Int> = new Array<Int>();
 		for (i in 0...n) {
-			array.push(input.readShort());
+			array.push(input.readInt(true));
 		}
 		return array;
 	}
@@ -854,6 +920,14 @@ class SkeletonBinary {
 			for (ii in 0...input.readInt(true)) {
 				timelineType = input.readByte();
 				frameCount = input.readInt(true);
+				if (timelineType == BONE_INHERIT) {
+					var timeline = new InheritTimeline(frameCount, boneIndex);
+					for (frame in 0...frameCount) {
+						timeline.setFrame(frame, input.readFloat(), Inherit.values[input.readByte()]);
+					}
+					timelines.push(timeline);
+					continue;
+				}
 				bezierCount = input.readInt(true);
 				switch (timelineType) {
 					case BONE_ROTATE:
@@ -886,26 +960,26 @@ class SkeletonBinary {
 			frameCount = input.readInt(true);
 			frameLast = frameCount - 1;
 			var ikTimeline:IkConstraintTimeline = new IkConstraintTimeline(frameCount, input.readInt(true), index);
+			var flags = input.readByte();
 			time = input.readFloat();
-			var mix:Float = input.readFloat(),
-				softness:Float = input.readFloat() * scale;
+			var mix:Float = (flags & 1) != 0 ? ((flags & 2) != 0 ? input.readFloat() : 1) : 0;
+			var	softness:Float = (flags & 4) != 0 ? input.readFloat() * scale : 0;
 
 			frame = 0;
 			bezier = 0;
 			while (true) {
-				ikTimeline.setFrame(frame, time, mix, softness, input.readByte(), input.readBoolean(), input.readBoolean());
+				ikTimeline.setFrame(frame, time, mix, softness, (flags & 8) != 0 ? 1 : -1, (flags & 16) != 0, (flags & 32) != 0);
 				if (frame == frameLast)
 					break;
-
+				flags = input.readByte();
 				time2 = input.readFloat();
-				var mix2:Float = input.readFloat(),
-					softness2:Float = input.readFloat() * scale;
-				switch (input.readByte()) {
-					case CURVE_STEPPED:
-						ikTimeline.setStepped(frame);
-					case CURVE_BEZIER:
-						setBezier(input, ikTimeline, bezier++, frame, 0, time, time2, mix, mix2, 1);
-						setBezier(input, ikTimeline, bezier++, frame, 1, time, time2, softness, softness2, scale);
+				var mix2:Float = (flags & 1) != 0 ? ((flags & 2) != 0 ? input.readFloat() : 1) : 0;
+				var	softness2:Float = (flags & 4) != 0 ? input.readFloat() * scale : 0;
+				if ((flags & 64) != 0) {
+					ikTimeline.setStepped(frame);
+				} else if ((flags & 128) != 0) {
+					setBezier(input, ikTimeline, bezier++, frame, 0, time, time2, mix, mix2, 1);
+					setBezier(input, ikTimeline, bezier++, frame, 1, time, time2, softness, softness2, scale);
 				}
 				time = time2;
 				mix = mix2;
@@ -977,16 +1051,17 @@ class SkeletonBinary {
 			index = input.readInt(true);
 			var data:PathConstraintData = skeletonData.pathConstraints[index];
 			for (ii in 0...input.readInt(true)) {
-				switch (input.readByte()) {
+				var type:Int = input.readByte(), frameCount:Int = input.readInt(true), bezierCount:Int = input.readInt(true);
+				switch (type) {
 					case PATH_POSITION:
-						timelines.push(readTimeline(input, new PathConstraintPositionTimeline(input.readInt(true), input.readInt(true), index),
+						timelines.push(readTimeline(input, new PathConstraintPositionTimeline(frameCount, bezierCount, index),
 							data.positionMode == PositionMode.fixed ? scale : 1));
 					case PATH_SPACING:
-						timelines.push(readTimeline(input, new PathConstraintSpacingTimeline(input.readInt(true), input.readInt(true), index),
+						timelines.push(readTimeline(input, new PathConstraintSpacingTimeline(frameCount, bezierCount, index),
 							data.spacingMode == SpacingMode.length
 							|| data.spacingMode == SpacingMode.fixed ? scale : 1));
 					case PATH_MIX:
-						var mixTimeline:PathConstraintMixTimeline = new PathConstraintMixTimeline(input.readInt(true), input.readInt(true), index);
+						var mixTimeline:PathConstraintMixTimeline = new PathConstraintMixTimeline(frameCount, bezierCount, index);
 						time = input.readFloat();
 						mixRotate = input.readFloat();
 						mixX = input.readFloat();
@@ -1023,6 +1098,44 @@ class SkeletonBinary {
 			}
 		}
 
+		// Physics timelines.
+		for (i in 0...input.readInt(true)) {
+			var constraintIndex:Int = input.readInt(true) - 1;
+			for (ii in 0...input.readInt(true)) {
+				var type:Int = input.readByte(), frameCount:Int = input.readInt(true);
+				if (type == PHYSICS_RESET) {
+					var timeline:PhysicsConstraintResetTimeline = new PhysicsConstraintResetTimeline(frameCount, constraintIndex);
+					for (frame in 0...frameCount)
+						timeline.setFrame(frame, input.readFloat());
+					timelines.push(timeline);
+					continue;
+				}
+				var bezierCount = input.readInt(true);
+				switch (type) {
+					case PHYSICS_INERTIA:
+						timelines.push(readTimeline(input, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, constraintIndex), 1));
+						break;
+					case PHYSICS_STRENGTH:
+						timelines.push(readTimeline(input, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, constraintIndex), 1));
+						break;
+					case PHYSICS_DAMPING:
+						timelines.push(readTimeline(input, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, constraintIndex), 1));
+						break;
+					case PHYSICS_MASS:
+						timelines.push(readTimeline(input, new PhysicsConstraintMassTimeline(frameCount, bezierCount, constraintIndex), 1));
+						break;
+					case PHYSICS_WIND:
+						timelines.push(readTimeline(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, constraintIndex), 1));
+						break;
+					case PHYSICS_GRAVITY:
+						timelines.push(readTimeline(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, constraintIndex), 1));
+						break;
+					case PHYSICS_MIX:
+						timelines.push(readTimeline(input, new PhysicsConstraintMixTimeline(frameCount, bezierCount, constraintIndex), 1));
+				}
+			}
+		}
+
 		// Deform timelines.
 		for (i in 0...input.readInt(true)) {
 			var skin:Skin = skeletonData.skins[input.readInt(true)];
@@ -1163,7 +1276,8 @@ class SkeletonBinary {
 				var event:Event = new Event(time, eventData);
 				event.intValue = input.readInt(false);
 				event.floatValue = input.readFloat();
-				event.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;
+				event.stringValue = input.readString();
+				if (event.stringValue == null) event.stringValue = eventData.stringValue;
 				if (event.data.audioPath != null) {
 					event.volume = input.readFloat();
 					event.balance = input.readFloat();
@@ -1250,20 +1364,21 @@ class SkeletonBinary {
 class Vertices {
 	public var vertices:Array<Float> = new Array<Float>();
 	public var bones:Array<Int> = new Array<Int>();
+	public var length:Int = 0;
 
 	public function new() {}
 }
 
 class LinkedMeshBinary {
 	public var parent(default, null):String;
-	public var skin(default, null):String;
+	public var skinIndex(default, null):Int;
 	public var slotIndex(default, null):Int;
 	public var mesh(default, null):MeshAttachment;
 	public var inheritTimeline(default, null):Bool;
 
-	public function new(mesh:MeshAttachment, skin:String, slotIndex:Int, parent:String, inheritTimeline:Bool) {
+	public function new(mesh:MeshAttachment, skinIndex:Int, slotIndex:Int, parent:String, inheritTimeline:Bool) {
 		this.mesh = mesh;
-		this.skin = skin;
+		this.skinIndex = skinIndex;
 		this.slotIndex = slotIndex;
 		this.parent = parent;
 		this.inheritTimeline = inheritTimeline;

+ 11 - 9
spine-haxe/spine-haxe/spine/SkeletonJson.hx

@@ -45,15 +45,15 @@ import spine.animation.InheritTimeline;
 import spine.animation.PathConstraintMixTimeline;
 import spine.animation.PathConstraintPositionTimeline;
 import spine.animation.PathConstraintSpacingTimeline;
-import spine.animation.PhysicsConstraintResetTimeline;
-import spine.animation.PhysicsConstraintInertiaTimeline;
-import spine.animation.PhysicsConstraintStrengthTimeline;
 import spine.animation.PhysicsConstraintDampingTimeline;
-import spine.animation.PhysicsConstraintMassTimeline;
-import spine.animation.PhysicsConstraintWindTimeline;
 import spine.animation.PhysicsConstraintGravityTimeline;
+import spine.animation.PhysicsConstraintInertiaTimeline;
+import spine.animation.PhysicsConstraintMassTimeline;
 import spine.animation.PhysicsConstraintMixTimeline;
+import spine.animation.PhysicsConstraintResetTimeline;
+import spine.animation.PhysicsConstraintStrengthTimeline;
 import spine.animation.PhysicsConstraintTimeline;
+import spine.animation.PhysicsConstraintWindTimeline;
 import spine.animation.RGB2Timeline;
 import spine.animation.RGBA2Timeline;
 import spine.animation.RGBATimeline;
@@ -1018,10 +1018,12 @@ class SkeletonJson {
 		// Physics constraint timelines.
 		var physics:Dynamic = Reflect.getProperty(map, "physics");
 		for (physicsName in Reflect.fields(physics)) {
-			var constraintIndex:Int = skeletonData.findPhysicsConstraintIndex(physicsName);
-			if (constraintIndex == -1)
-				throw new SpineException("Physics constraint not found: " + physicsName);
-
+			var constraintIndex:Int = -1;
+			if (physicsName.length > 0) {
+				constraintIndex = skeletonData.findPhysicsConstraintIndex(physicsName);
+				if (constraintIndex == -1)
+					throw new SpineException("Physics constraint not found: " + physicsName);
+			}
 			var physicsMap:Dynamic = Reflect.field(physics, physicsName);
 			for (timelineName in Reflect.fields(physicsMap)) {
 				timelineMap = Reflect.field(physicsMap, timelineName);

+ 0 - 1
spine-haxe/spine-haxe/spine/starling/SkeletonSprite.hx

@@ -342,7 +342,6 @@ class SkeletonSprite extends DisplayObject implements IAnimatable {
 		_state.apply(skeleton);
 		skeleton.update(time);
 		skeleton.updateWorldTransform(Physics.update);
-
 		this.setRequiresRedraw();
 	}
 }

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません