Эх сурвалжийг харах

Merge branch 'spine-lua-3.5' into spine-3.5

badlogic 9 жил өмнө
parent
commit
360c1de38f

+ 30 - 0
examples/export/runtimes.sh

@@ -68,6 +68,36 @@ cp -f ../tank/export/tank.json ../../spine-cocos2dx/example/Resources/common/
 cp -f ../tank/export/tank.atlas ../../spine-cocos2dx/example/Resources/common/
 cp -f ../tank/export/tank.png ../../spine-cocos2dx/example/Resources/common/
 
+echo "spine-corona"
+rm -f ../../spine-corona/data/*
+cp -f ../goblins/export/goblins-mesh.json ../../spine-corona/data
+cp -f ../goblins/export/goblins.atlas ../../spine-corona/data
+cp -f ../goblins/export/goblins.png ../../spine-corona/data
+
+cp -f ../raptor/export/raptor.json ../../spine-corona/data
+cp -f ../raptor/export/raptor.atlas ../../spine-corona/data
+cp -f ../raptor/export/raptor.png ../../spine-corona/data
+
+cp -f ../spineboy/export/spineboy.json ../../spine-corona/data
+cp -f ../spineboy/export/spineboy.atlas ../../spine-corona/data
+cp -f ../spineboy/export/spineboy.png ../../spine-corona/data
+
+cp -f ../tank/export/tank.json ../../spine-corona/data
+cp -f ../tank/export/tank.atlas ../../spine-corona/data
+cp -f ../tank/export/tank.png ../../spine-corona/data
+
+cp -f ../vine/export/vine.json ../../spine-corona/data
+cp -f ../vine/export/vine.atlas ../../spine-corona/data
+cp -f ../vine/export/vine.png ../../spine-corona/data
+
+cp -f ../stretchyman/export/stretchyman.json ../../spine-corona/data
+cp -f ../stretchyman/export/stretchyman.atlas ../../spine-corona/data
+cp -f ../stretchyman/export/stretchyman.png ../../spine-corona/data
+
+cp -f ../test/export/test.json ../../spine-corona/data
+cp -f ../test/export/test.atlas ../../spine-corona/data
+cp -f ../test/export/test.png ../../spine-corona/data
+
 echo "spine-love"
 rm -f ../../spine-love/data/*
 cp -f ../goblins/export/goblins-mesh.json ../../spine-love/data

+ 40 - 33
spine-corona/data/goblins-mesh.json

@@ -1,5 +1,12 @@
 {
-"skeleton": { "hash": "3Z6FWT/Kylgd8cbSWBEwAsOcPEM", "spine": "3.4.02", "width": 266.87, "height": 349.55, "images": "./images/" },
+"skeleton": {
+	"hash": "RVwj3d7R/kLKOn5pep0SkQV51Kc",
+	"spine": "3.5.03-beta",
+	"width": 266.87,
+	"height": 349.55,
+	"fps": 30,
+	"images": "./images/"
+},
 "bones": [
 	{ "name": "root" },
 	{ "name": "hip", "parent": "root", "x": 0.64, "y": 114.41 },
@@ -56,7 +63,7 @@
 				"type": "mesh",
 				"uvs": [ 1, 0.11236, 0.77096, 0.13278, 0.76608, 0.21781, 0.75642, 0.386, 0.74723, 0.54607, 0.72117, 1, 0.28838, 1, 0.24208, 0.54327, 0.22589, 0.38361, 0.2089, 0.21605, 0.20043, 0.13242, 0, 0.11519, 0.4527, 0, 0.58399, 0 ],
 				"triangles": [ 5, 6, 4, 6, 7, 4, 4, 7, 3, 2, 9, 1, 9, 10, 1, 10, 12, 1, 12, 13, 1, 1, 13, 0, 10, 11, 12, 3, 8, 2, 8, 9, 2, 7, 8, 3 ],
-				"vertices": [ 1, 20, 38.54, -10.88, 1, 1, 20, 30.97, -5.93, 1, 2, 19, 61.48, -5.58, 0.5116, 20, -0.31, -6.16, 0.48839, 2, 18, 64.73, -5.03, 0.50272, 19, -0.4, -5.06, 0.49728, 1, 10, 4.56, 23.91, 1, 1, 10, 41.7, -138.95, 1, 1, 10, 32.41999, -141.1, 1, 1, 10, -6.49, 22.4, 1, 2, 18, 65.48, 6.64, 0.50272, 19, 0.52999, 6.59, 0.49728, 2, 19, 62.18, 6.66, 0.5116, 20, 0.2, 6.09, 0.48839, 1, 20, 30.96, 6.61, 1, 1, 20, 37.25999, 11.09, 1, 1, 20, 79.75, 1.59, 1, 1, 20, 79.78, -1.29, 1 ],
+				"vertices": [ 1, 20, 38.54, -10.88, 1, 1, 20, 30.96999, -5.92999, 1, 2, 19, 61.47999, -5.57999, 0.5116, 20, -0.31, -6.15999, 0.48838, 2, 18, 64.73, -5.03, 0.5027, 19, -0.4, -5.05999, 0.49728, 1, 10, 4.55999, 23.90999, 1, 1, 10, 41.7, -138.95, 1, 1, 10, 32.41999, -141.1, 1, 1, 10, -6.48999, 22.39999, 1, 2, 18, 65.48, 6.63999, 0.5027, 19, 0.52999, 6.59, 0.49728, 2, 19, 62.18, 6.65999, 0.5116, 20, 0.2, 6.09, 0.48838, 1, 20, 30.95999, 6.61, 1, 1, 20, 37.25999, 11.09, 1, 1, 20, 79.75, 1.59, 1, 1, 20, 79.77999, -1.28999, 1 ],
 				"hull": 14,
 				"edges": [ 24, 22, 22, 20, 10, 12, 2, 0, 24, 26, 0, 26, 8, 10, 12, 14, 6, 8, 14, 16, 2, 4, 4, 6, 16, 18, 18, 20, 20, 2 ],
 				"width": 22,
@@ -68,7 +75,7 @@
 				"type": "mesh",
 				"uvs": [ 0.78091, 0.38453, 1, 0.38405, 1, 0.44881, 0.73953, 0.4687, 0.74641, 0.81344, 0.34022, 1, 0.15434, 1, 0.11303, 0.78858, 0.23007, 0.47367, 0, 0.45047, 0, 0.38621, 0.22367, 0.38573, 0.24384, 0, 1, 0 ],
 				"triangles": [ 0, 12, 13, 11, 12, 0, 0, 1, 2, 9, 10, 11, 3, 11, 0, 3, 0, 2, 8, 11, 3, 9, 11, 8, 5, 6, 7, 4, 5, 8, 4, 8, 3, 5, 7, 8 ],
-				"vertices": [ 15.49, -12.82, 21.13, -13.57, 20.16, -20.49, 13.15, -21.67, 8.13, -58.56, -5.13, -77.04, -9.92, -76.36, -7.79, -53.6, -0.03, -20.36, -5.6, -17.04, -4.63, -10.17, 1.12, -10.93, 7.46, 30.24, 26.93, 27.49 ],
+				"vertices": [ 15.48999, -12.81999, 21.12999, -13.56999, 20.15999, -20.48999, 13.14999, -21.67, 8.13, -58.56, -5.13, -77.04, -9.92, -76.36, -7.78999, -53.59999, -0.02999, -20.36, -5.59999, -17.04, -4.63, -10.17, 1.12, -10.93, 7.46, 30.23999, 26.93, 27.48999 ],
 				"hull": 14,
 				"edges": [ 22, 20, 24, 26, 22, 24, 2, 0, 0, 22, 0, 26, 12, 14, 14, 16, 18, 20, 16, 18, 2, 4, 4, 6, 6, 8, 10, 12, 8, 10 ],
 				"width": 26,
@@ -89,7 +96,7 @@
 				"type": "mesh",
 				"uvs": [ 0, 0.60494, 0.14172, 0.5145, 0.24218, 0.55229, 0.32667, 0.67806, 0.37969, 0.79352, 0.53505, 0.93014, 0.86056, 1, 0.94071, 0.94169, 0.92098, 0.69923, 0.9888, 0.65497, 0.99003, 0.51643, 0.89632, 0.43561, 0.94487, 0.41916, 1, 0.39713, 1, 0.2836, 0.94017, 0.27027, 0.87906, 0.25666, 0.80754, 0.16044, 0.66698, 0.01997, 0.4734, 0.01805, 0.29215, 0.19893, 0.25392, 0.31823, 0.09117, 0.324, 0, 0.44331, 0.43271, 0.69153, 0.466, 0.47794, 0.35996, 0.31246, 0.73473, 0.68593, 0.72215, 0.57425, 0.88179, 0.5583, 0.80267, 0.51015 ],
 				"triangles": [ 5, 27, 6, 7, 27, 8, 7, 6, 27, 4, 24, 5, 5, 24, 27, 4, 3, 24, 27, 29, 8, 8, 29, 9, 24, 28, 27, 24, 25, 28, 24, 3, 25, 29, 28, 30, 29, 27, 28, 25, 2, 26, 25, 3, 2, 9, 29, 10, 0, 23, 1, 28, 25, 30, 29, 11, 10, 29, 30, 11, 2, 21, 26, 2, 1, 21, 23, 22, 1, 1, 22, 21, 30, 16, 11, 30, 17, 16, 30, 25, 17, 17, 26, 18, 18, 26, 19, 26, 17, 25, 11, 15, 12, 11, 16, 15, 12, 15, 13, 15, 14, 13, 21, 20, 26, 26, 20, 19 ],
-				"vertices": [ 14.56, 50.42, 23.12, 35.47, 17.45999, 26.36, 11.57, 16.86, 3.74, 11.71, -5.89, -3.91, -11.83, -37.23, -8.31, -45.63, 7.75, -44.24, 10.39, -51.33, 19.52, -51.82, 25.21, -43.15, 26.12, -47.43, 27.35, -53.16, 34.84, -53.46, 35.96, -47.33, 37.11, -41.08, 43.75, -33.97, 53.58, -19.87, 54.5, 0.03, 43.31, 19.16, 35.59999, 23.41, 35.89, 40.16999, 28.39, 49.87, 10.25, 5.99, 24.2, 2, 35.55, 12.48, 9.39, -25.1, 16.79999, -24.31, 17.2, -40.65, 20.68, -33.02 ],
+				"vertices": [ 14.56, 50.41999, 23.12, 35.47, 17.45999, 26.36, 11.56999, 16.86, 3.74, 11.71, -5.88999, -3.91, -11.82999, -37.22999, -8.31, -45.63, 7.75, -44.24, 10.39, -51.33, 19.52, -51.81999, 25.20999, -43.15, 26.12, -47.43, 27.35, -53.15999, 34.84, -53.45999, 35.95999, -47.33, 37.11, -41.08, 43.75, -33.97, 53.58, -19.87, 54.5, 0.02999, 43.31, 19.15999, 35.59999, 23.40999, 35.88999, 40.16999, 28.38999, 49.86999, 10.25, 5.98999, 24.2, 2, 35.54999, 12.47999, 9.39, -25.1, 16.79999, -24.30999, 17.2, -40.65, 20.68, -33.02 ],
 				"hull": 24,
 				"edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 26, 28, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 0, 46, 6, 48, 48, 50, 50, 52, 52, 42, 2, 4, 4, 6, 4, 52, 2, 44, 22, 32, 22, 24, 24, 26, 28, 30, 30, 32, 24, 30, 16, 54, 54, 56, 20, 58, 58, 54, 16, 58, 22, 60, 60, 56, 58, 60 ],
 				"width": 103,
@@ -102,7 +109,7 @@
 				"type": "mesh",
 				"uvs": [ 0.68992, 0.29284, 1, 0.46364, 1, 0.74643, 0.84089, 1, 0.66344, 1, 0.33765, 0.64284, 0, 0.44124, 0, 0, 0.34295, 0 ],
 				"triangles": [ 3, 4, 2, 4, 5, 2, 5, 0, 2, 0, 1, 2, 0, 5, 8, 5, 6, 8, 6, 7, 8 ],
-				"vertices": [ 18.6, 8.81, 32.18999, 10.31, 38.02, 1.62, 38.08, -9.63, 32.31, -13.49, 14.37, -9.62, -0.75, -10.78, -9.84, 2.77, 1.29, 10.25 ],
+				"vertices": [ 18.6, 8.81, 32.18999, 10.31, 38.02, 1.62, 38.08, -9.63, 32.31, -13.48999, 14.36999, -9.61999, -0.75, -10.77999, -9.84, 2.76999, 1.28999, 10.25 ],
 				"hull": 9,
 				"edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 6, 4, 6, 8, 8, 10, 12, 14, 10, 12 ],
 				"width": 37,
@@ -115,7 +122,7 @@
 				"type": "mesh",
 				"uvs": [ 0.15733, 0.31873, 0.08195, 0.78502, 0.15884, 0.99366, 0.41633, 0.96804, 0.68822, 0.97636, 1, 0.96388, 0.99385, 0.73501, 0.85294, 0.51862, 0.61479, 0.31056, 0.46991, 0, 0.48032, 0.75604, 0.75994, 0.77706 ],
 				"triangles": [ 0, 9, 8, 10, 0, 8, 10, 8, 7, 11, 10, 7, 11, 7, 6, 1, 0, 10, 11, 6, 5, 3, 1, 10, 4, 10, 11, 4, 11, 5, 3, 10, 4, 2, 1, 3 ],
-				"vertices": [ 2.28, 13.07, -1.76, -1.64, 3.59, -7.8, 20.25, -6.04, 37.91, -5.27, 58.12, -3.71, 57.31, 3.34, 47.78, 9.51, 31.95, 15.05, 21.99, 24.11, 24.03, 0.75, 42.21, 1.16 ],
+				"vertices": [ 2.27999, 13.06999, -1.75999, -1.63999, 3.58999, -7.8, 20.25, -6.03999, 37.90999, -5.26999, 58.11999, -3.71, 57.31, 3.33999, 47.77999, 9.51, 31.95, 15.05, 21.98999, 24.11, 24.03, 0.75, 42.20999, 1.15999 ],
 				"hull": 10,
 				"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 6, 20, 20, 16, 2, 20, 8, 22, 22, 14, 20, 22, 22, 10 ],
 				"width": 65,
@@ -128,7 +135,7 @@
 				"type": "mesh",
 				"uvs": [ 0.518, 0.12578, 1, 0.16285, 0.99788, 0.50578, 0.69745, 1, 0.37445, 1, 0, 0.80051, 0, 0.42792, 0.17601, 0, 0.43567, 0 ],
 				"triangles": [ 2, 0, 1, 0, 5, 6, 6, 7, 0, 0, 7, 8, 3, 4, 0, 4, 5, 0, 2, 3, 0 ],
-				"vertices": [ -3.11, 15.42, 10.83, 22.27, 15.5, 14.55, 18.35, -8.96, 9.47999, -14.32, -4.58, -14.3, -11.63, -2.63, -14.89, 13.68, -7.75, 17.99 ],
+				"vertices": [ -3.10999, 15.42, 10.82999, 22.27, 15.5, 14.55, 18.35, -8.96, 9.47999, -14.31999, -4.57999, -14.3, -11.63, -2.63, -14.89, 13.68, -7.75, 17.98999 ],
 				"hull": 9,
 				"edges": [ 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 14, 16, 12, 14 ],
 				"width": 36,
@@ -139,9 +146,9 @@
 			"left lower leg": {
 				"name": "goblin/left-lower-leg",
 				"type": "mesh",
-				"uvs": [ 0.95508, 0.20749, 0.81927, 0.65213, 0.94754, 0.77308, 0.67842, 0.97346, 0.46463, 1, 0.26845, 1, 0.04963, 0.90706, 0.2106, 0.60115, 0.07478, 0.40195, 0.18545, 0, 0.28857, 0 ],
+				"uvs": [ 0.95508, 0.20749, 0.81927, 0.65213, 0.94754, 0.77307, 0.67842, 0.97346, 0.46463, 1, 0.26845, 1, 0.04963, 0.90706, 0.2106, 0.60115, 0.07478, 0.40195, 0.18545, 0, 0.28857, 0 ],
 				"triangles": [ 10, 8, 9, 1, 7, 10, 7, 8, 10, 0, 1, 10, 1, 4, 7, 3, 1, 2, 5, 6, 7, 7, 4, 5, 1, 3, 4 ],
-				"vertices": [ -0.19, 6.82, 30.97, 10.96, 37.97, 17.33, 53.88, 12.6, 57.58, 6.31, 59.34, 0.08, 55.04, -8.63, 32.99, -9.33, 20.79, -17.43, -7.27, -21.56, -8.18999, -18.29 ],
+				"vertices": [ -0.18999, 6.82, 30.96999, 10.96, 37.97, 17.32999, 53.88, 12.6, 57.58, 6.30999, 59.34, 0.07999, 55.04, -8.63, 32.99, -9.32999, 20.79, -17.43, -7.26999, -21.55999, -8.18999, -18.29 ],
 				"hull": 11,
 				"edges": [ 20, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 18, 20, 16, 18 ],
 				"width": 33,
@@ -154,7 +161,7 @@
 				"type": "mesh",
 				"uvs": [ 0.7377, 0.40692, 1, 0.75237, 1, 1, 0.62046, 1, 0.26184, 0.56601, 0, 0.29783, 0, 0, 0.44115, 0 ],
 				"triangles": [ 3, 1, 2, 3, 0, 1, 3, 4, 0, 4, 7, 0, 4, 5, 7, 5, 6, 7 ],
-				"vertices": [ 15.18, 5.74, 32.16999, 5.32, 41.79, 0.21, 36.63, -9.5, 14.88, -9.72, 0.9, -10.89, -10.66, -4.73999, -4.66, 6.54 ],
+				"vertices": [ 15.18, 5.73999, 32.16999, 5.32, 41.79, 0.20999, 36.63, -9.5, 14.88, -9.72, 0.89999, -10.89, -10.65999, -4.73999, -4.65999, 6.53999 ],
 				"hull": 8,
 				"edges": [ 12, 14, 14, 0, 4, 2, 0, 2, 4, 6, 6, 8, 10, 12, 8, 10 ],
 				"width": 29,
@@ -167,7 +174,7 @@
 				"type": "mesh",
 				"uvs": [ 1, 0.12167, 1, 0.54873, 0.91067, 0.78907, 0.76567, 1, 0.3087, 0.9579, 0, 0.68777, 0, 0.219, 0.51961, 0, 0.87552, 0 ],
 				"triangles": [ 7, 8, 0, 5, 6, 7, 0, 1, 7, 4, 5, 7, 1, 4, 7, 2, 4, 1, 3, 4, 2 ],
-				"vertices": [ 2.33, 13.06, 33.5, 12.57, 51, 9.34, 66.32, 4.31, 63, -10.71, 43.13, -20.58, 8.91, -20.04, -6.79, -2.64, -6.61, 9.1 ],
+				"vertices": [ 2.32999, 13.06, 33.5, 12.56999, 51, 9.34, 66.31999, 4.30999, 63, -10.71, 43.13, -20.57999, 8.90999, -20.04, -6.78999, -2.64, -6.61, 9.1 ],
 				"hull": 9,
 				"edges": [ 10, 8, 8, 6, 6, 4, 4, 2, 10, 12, 12, 14, 14, 16, 2, 0, 16, 0 ],
 				"width": 33,
@@ -180,7 +187,7 @@
 				"type": "mesh",
 				"uvs": [ 0.81967, 0.27365, 0.92101, 0.82048, 0.47134, 1, 0.15679, 0.9354, 0, 0.7556, 0.19268, 0.51833, 0.15468, 0.35706, 0, 0.21989, 0.13568, 0, 0.68878, 0, 0.70145, 0.53872 ],
 				"triangles": [ 3, 5, 2, 2, 10, 1, 2, 5, 10, 3, 4, 5, 10, 0, 1, 0, 10, 6, 10, 5, 6, 7, 8, 6, 6, 9, 0, 6, 8, 9 ],
-				"vertices": [ 18.62, -11.65, -3.98, -13.85, -10.28, 2.76, -6.91, 13.89, 0.8, 19.04999, 10.06, 11.51, 16.74, 12.45, 22.71, 17.64, 31.4, 12.19, 30.12, -7.67, 8.05, -6.71 ],
+				"vertices": [ 18.62, -11.64999, -3.98, -13.85, -10.27999, 2.75999, -6.90999, 13.89, 0.8, 19.04999, 10.06, 11.51, 16.73999, 12.44999, 22.70999, 17.63999, 31.39999, 12.18999, 30.12, -7.67, 8.05, -6.71 ],
 				"hull": 10,
 				"edges": [ 14, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 2, 2, 20, 20, 0, 0, 18, 16, 18, 14, 16, 0, 2 ],
 				"width": 36,
@@ -193,7 +200,7 @@
 				"type": "mesh",
 				"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
 				"triangles": [ 1, 2, 3, 1, 3, 0 ],
-				"vertices": [ 25.38, -20.73, -36.61, -20.73, -36.61, 22.26, 25.38, 22.26 ],
+				"vertices": [ 25.37999, -20.72999, -36.61, -20.72999, -36.61, 22.26, 25.37999, 22.26 ],
 				"hull": 4,
 				"edges": [ 0, 2, 2, 4, 4, 6, 0, 6 ],
 				"width": 62,
@@ -206,7 +213,7 @@
 				"type": "mesh",
 				"uvs": [ 1, 0.09223, 1, 0.8501, 0.72058, 1, 0.24384, 1, 0, 0.86558, 0.20822, 0.10919, 0.50903, 0, 0.85342, 0 ],
 				"triangles": [ 1, 2, 6, 6, 2, 5, 1, 6, 0, 4, 5, 3, 2, 3, 5, 6, 7, 0 ],
-				"vertices": [ -4.75, 8.89, 33.03, 11.74, 40.99, 5.89, 41.81, -5.03, 35.53, -11.13, -2.53, -9.2, -8.5, -2.71, -9.09, 5.17999 ],
+				"vertices": [ -4.75, 8.89, 33.02999, 11.73999, 40.99, 5.88999, 41.81, -5.03, 35.52999, -11.13, -2.52999, -9.19999, -8.5, -2.71, -9.09, 5.17999 ],
 				"hull": 8,
 				"edges": [ 8, 6, 4, 6, 4, 2, 12, 14, 2, 0, 14, 0, 10, 12, 8, 10 ],
 				"width": 23,
@@ -219,7 +226,7 @@
 				"type": "mesh",
 				"uvs": [ 0.40851, 0.0047, 0.59087, 0.33404, 0.75959, 0.48311, 0.88907, 0.59751, 0.97532, 0.89391, 0.90385, 1, 0.6722, 1, 0.38633, 1, 0.08074, 1, 0, 0.88921, 0, 0.65984, 0, 0.46577, 0.0906, 0.0988, 0.305, 0, 0.47461, 0.71257, 0.715, 0.74681 ],
 				"triangles": [ 1, 10, 11, 1, 13, 0, 14, 1, 2, 1, 12, 13, 12, 1, 11, 14, 10, 1, 15, 14, 2, 15, 2, 3, 9, 10, 14, 15, 3, 4, 7, 8, 9, 14, 7, 9, 6, 14, 15, 5, 6, 15, 7, 14, 6, 4, 5, 15 ],
-				"vertices": [ 17.36, 25.99, 29.13, 15.44, 39.89, 10.8, 48.14, 7.24, 53.84, -2.38, 49.43, -6, 34.84, -6.39, 16.84, -6.87, -2.4, -7.38, -7.58, -3.86, -7.78, 3.7, -7.95, 10.1, -2.57, 22.36, 10.84, 25.97, 22.14, 2.75, 37.31, 2.03 ],
+				"vertices": [ 17.36, 25.98999, 29.12999, 15.43999, 39.88999, 10.8, 48.13999, 7.23999, 53.84, -2.38, 49.43, -6, 34.84, -6.38999, 16.84, -6.86999, -2.4, -7.38, -7.57999, -3.85999, -7.78, 3.7, -7.94999, 10.1, -2.56999, 22.36, 10.84, 25.96999, 22.13999, 2.75, 37.31, 2.02999 ],
 				"hull": 14,
 				"edges": [ 0, 2, 6, 8, 8, 10, 16, 18, 22, 24, 24, 26, 0, 26, 10, 12, 2, 4, 4, 6, 12, 14, 14, 16, 18, 20, 20, 22, 2, 28, 28, 14, 20, 28, 4, 30, 30, 12, 28, 30, 30, 8 ],
 				"width": 63,
@@ -232,7 +239,7 @@
 				"type": "mesh",
 				"uvs": [ 0.17957, 0, 0, 0.44772, 0, 0.79734, 0.20057, 0.94264, 0.55057, 1, 0.8539, 1, 0.89823, 0.82004, 0.8259, 0.74285, 0.84223, 0.49993, 0.96356, 0.34102, 0.66023, 0 ],
 				"triangles": [ 8, 10, 9, 0, 10, 1, 8, 2, 1, 8, 1, 10, 7, 3, 8, 3, 2, 8, 4, 3, 7, 5, 7, 6, 4, 7, 5 ],
-				"vertices": [ -10.82, -9.45, 5.95, -15.34, 18.87999, -14.9, 24, -7.5, 25.69, 5.16, 25.31, 16.07, 18.61, 17.44, 15.84, 14.74, 6.84, 15.02, 0.81, 19.18, -11.41, 7.83 ],
+				"vertices": [ -10.81999, -9.44999, 5.94999, -15.34, 18.87999, -14.89999, 24, -7.5, 25.69, 5.15999, 25.30999, 16.06999, 18.61, 17.44, 15.84, 14.73999, 6.84, 15.02, 0.81, 19.18, -11.40999, 7.82999 ],
 				"hull": 11,
 				"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 0, 20 ],
 				"width": 36,
@@ -245,7 +252,7 @@
 				"type": "mesh",
 				"uvs": [ 0.88538, 0.22262, 0.76167, 0.3594, 0.75088, 0.78308, 0.95326, 0.84981, 1, 0.60302 ],
 				"triangles": [ 1, 0, 4, 2, 1, 4, 3, 2, 4 ],
-				"vertices": [ -2.82, 15.97, 2.4, 11.71, 18.08, 11.9, 20.27, 19.27, 11.09, 20.62 ],
+				"vertices": [ -2.81999, 15.97, 2.4, 11.71, 18.07999, 11.89999, 20.27, 19.27, 11.09, 20.62 ],
 				"hull": 5,
 				"edges": [ 2, 4, 4, 6, 6, 8, 2, 0, 0, 8 ],
 				"width": 36,
@@ -258,7 +265,7 @@
 				"type": "mesh",
 				"uvs": [ 1, 0.27261, 0.81312, 0.52592, 0.79587, 0.71795, 0.95544, 0.80988, 0.85193, 0.95493, 0.47241, 1, 0.14033, 1, 0, 0.8773, 0.14896, 0.67914, 0.1619, 0.30325, 0.60611, 0 ],
 				"triangles": [ 1, 10, 0, 9, 10, 1, 8, 9, 1, 2, 8, 1, 4, 2, 3, 6, 7, 8, 5, 6, 8, 2, 5, 8, 4, 5, 2 ],
-				"vertices": [ 6.26, 8.46, 23.32, 8.04, 37.09999, 12.89, 41.45, 20.82, 53.07, 21.46, 61.33, 10.06, 65.76999, -1.03, 58.99, -9.18999, 43.02, -9.81, 16.33, -20, -12.79, -9.26 ],
+				"vertices": [ 6.26, 8.46, 23.31999, 8.03999, 37.09999, 12.89, 41.45, 20.81999, 53.06999, 21.45999, 61.33, 10.06, 65.76999, -1.02999, 58.99, -9.18999, 43.02, -9.81, 16.32999, -20, -12.78999, -9.26 ],
 				"hull": 11,
 				"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 20, 18, 20 ],
 				"width": 36,
@@ -271,7 +278,7 @@
 				"type": "mesh",
 				"uvs": [ 0.62008, 0.03708, 0.92131, 0.09048, 1, 0.38319, 0.72049, 0.6937, 0.31656, 1, 0, 1, 0, 0.75106, 0.28233, 0.49988 ],
 				"triangles": [ 4, 6, 7, 4, 7, 3, 4, 5, 6, 7, 0, 3, 2, 0, 1, 2, 3, 0 ],
-				"vertices": [ -3.17, -11.05, -9, -0.57, -1.01, 10.33, 16.69, 11.17, 37.41, 8.2, 45.45, -1.16, 36.95, -8.46, 21.2, -7.47 ],
+				"vertices": [ -3.17, -11.05, -9, -0.56999, -1.00999, 10.32999, 16.69, 11.17, 37.40999, 8.19999, 45.45, -1.15999, 36.95, -8.46, 21.2, -7.46999 ],
 				"hull": 8,
 				"edges": [ 10, 12, 12, 14, 14, 0, 0, 2, 2, 4, 4, 6, 8, 10, 6, 8 ],
 				"width": 39,
@@ -284,7 +291,7 @@
 				"type": "mesh",
 				"uvs": [ 0.27018, 0, 0.11618, 0.18177, 0, 0.70688, 0, 0.89577, 0.26668, 1, 0.48718, 1, 0.67618, 0.83532, 1, 0.5161, 1, 0.25543, 0.74618, 0.0571 ],
 				"triangles": [ 9, 8, 7, 9, 1, 0, 6, 9, 7, 6, 1, 9, 2, 1, 6, 4, 3, 2, 6, 4, 2, 5, 4, 6 ],
-				"vertices": [ -9.85, -10.37, 2.17, -14.07, 35.49, -13.66, 47.29, -12.11, 52.61, -2.26, 51.63, 5.16, 40.50999, 10.18, 19.12999, 18.46999, 2.85, 16.32, -8.39999, 6.14 ],
+				"vertices": [ -9.85, -10.36999, 2.17, -14.06999, 35.49, -13.65999, 47.29, -12.10999, 52.61, -2.25999, 51.63, 5.15999, 40.50999, 10.18, 19.12999, 18.46999, 2.84999, 16.31999, -8.39999, 6.13999 ],
 				"hull": 10,
 				"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18 ],
 				"width": 34,
@@ -297,7 +304,7 @@
 				"type": "mesh",
 				"uvs": [ 0, 0.33287, 0.15945, 0.46488, 0.15761, 0.60314, 0.15502, 0.79806, 0.32807, 0.93478, 0.6875, 1, 0.80731, 1, 1, 0.77763, 1, 0.66147, 1, 0.56703, 0.93207, 0.4771, 0.86944, 0.39416, 0.83837, 0.226, 0.68085, 0, 0.14836, 0, 0, 0.07199, 0.78734, 0.86249, 0.43679, 0.79649, 0.76738, 0.61733, 0.44345, 0.58747, 0.54329, 0.38316, 0.77692, 0.73446, 0.66478, 0.51012 ],
 				"triangles": [ 5, 16, 6, 6, 16, 7, 4, 17, 5, 5, 17, 16, 4, 3, 17, 17, 21, 16, 16, 21, 7, 3, 2, 17, 21, 19, 18, 21, 17, 19, 17, 2, 19, 21, 8, 7, 21, 18, 8, 18, 9, 8, 19, 22, 18, 18, 10, 9, 18, 22, 10, 2, 1, 19, 19, 20, 22, 19, 1, 20, 22, 11, 10, 22, 20, 11, 20, 1, 14, 20, 12, 11, 1, 0, 14, 20, 13, 12, 20, 14, 13, 0, 15, 14 ],
-				"vertices": [ 56.93, 27.95, 43.37, 18.23, 30.16, 19.5, 11.53, 21.28, -2.55, 10.69, -10.89, -13.12, -11.59, -21.23, 8.54, -36.12, 19.65, -37.08, 28.68, -37.86, 37.68, -34, 45.98, -30.44, 56.4, -29.07, 84.78, -20.92, 87.9, 15.15, 81.87999, 25.79, 1.67, -21.01, 10.03, 2.18, 25.23, -18.25, 29.98, 0, 48.54, -8.39, 13.98, -21.36, 35.9, -15.6 ],
+				"vertices": [ 56.93, 27.95, 43.36999, 18.22999, 30.15999, 19.5, 11.52999, 21.28, -2.54999, 10.68999, -10.89, -13.11999, -11.59, -21.22999, 8.53999, -36.11999, 19.64999, -37.08, 28.68, -37.86, 37.68, -34, 45.97999, -30.44, 56.4, -29.06999, 84.77999, -20.92, 87.9, 15.14999, 81.87999, 25.79, 1.66999, -21.01, 10.02999, 2.18, 25.22999, -18.25, 29.97999, 0, 48.54, -8.39, 13.97999, -21.36, 35.9, -15.6 ],
 				"hull": 16,
 				"edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 22, 24, 24, 26, 26, 28, 28, 30, 0, 30, 14, 32, 32, 34, 34, 6, 18, 36, 36, 38, 2, 4, 4, 6, 38, 4, 2, 40, 40, 22, 40, 38, 38, 34, 32, 10, 34, 8, 40, 28, 14, 16, 16, 18, 32, 42, 42, 36, 16, 42, 42, 34, 18, 20, 20, 22, 36, 44, 44, 40, 20, 44 ],
 				"width": 68,
@@ -310,7 +317,7 @@
 				"type": "mesh",
 				"uvs": [ 0.36097, 0.44959, 0.66297, 0.60591, 1, 0.19486, 1, 0.57117, 0.75897, 1, 0.38697, 1, 0, 0.26433, 0, 0, 0.12497, 0 ],
 				"triangles": [ 6, 7, 8, 6, 8, 0, 3, 1, 2, 5, 0, 1, 6, 0, 5, 4, 1, 3, 5, 1, 4 ],
-				"vertices": [ -10.56, 12.87, 6.53, 9.89999, 25.62, 17.70999, 25.62, 10.56, 11.97, 2.41, -9.09, 2.41, -31, 16.39, -31, 21.41, -23.92, 21.41 ],
+				"vertices": [ -10.56, 12.86999, 6.53, 9.89999, 25.62, 17.70999, 25.62, 10.56, 11.97, 2.41, -9.09, 2.41, -31, 16.38999, -31, 21.40999, -23.92, 21.40999 ],
 				"hull": 9,
 				"edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 12, 14, 10, 12, 0, 10, 2, 8 ],
 				"width": 55,
@@ -323,7 +330,7 @@
 				"type": "mesh",
 				"uvs": [ 0, 0.32029, 0.14893, 0.59457, 0.22437, 1, 0.35909, 1, 0.50998, 1, 0.79559, 0.58453, 0.9842, 0.28015, 1, 0.00588, 0.46957, 0.17646, 0, 0.03933, 0.48843, 0.59122, 0.48114, 0.43099 ],
 				"triangles": [ 6, 8, 7, 0, 9, 8, 11, 8, 6, 0, 8, 11, 5, 11, 6, 10, 11, 5, 1, 0, 11, 1, 11, 10, 3, 2, 1, 10, 3, 1, 4, 10, 5, 3, 10, 4 ],
-				"vertices": [ -13.22, 5.56, -8, -2.47, -5.49, -14.27, -0.64, -14.36, 4.78, -14.45, 15.27, -2.58999, 22.22, 6.11, 22.92, 14.05, 3.75, 9.43999, -13.08, 13.71, 4.21, -2.58999, 4.03, 2.05 ],
+				"vertices": [ -13.22, 5.55999, -8, -2.47, -5.48999, -14.27, -0.63999, -14.35999, 4.78, -14.44999, 15.27, -2.58999, 22.21999, 6.11, 22.92, 14.05, 3.75, 9.43999, -13.07999, 13.71, 4.21, -2.58999, 4.03, 2.04999 ],
 				"hull": 10,
 				"edges": [ 0, 2, 2, 4, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 4, 6, 6, 8, 6, 20, 16, 22, 22, 20, 0, 22, 22, 12, 2, 20, 20, 10 ],
 				"width": 36,
@@ -408,7 +415,7 @@
 		"slots": {
 			"eyes": {
 				"attachment": [
-					{ "time": 0.7, "name": "eyes closed" },
+					{ "time": 0.6999, "name": "eyes closed" },
 					{ "time": 0.8, "name": null }
 				]
 			}
@@ -805,7 +812,7 @@
 							"curve": [ 0.621, 0, 0.75, 1 ]
 						},
 						{
-							"time": 0.7,
+							"time": 0.6999,
 							"vertices": [ -10.97826, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.1755, -0.17183, -1.1755, -0.17182, -1.1755, -0.17183, 0, 0, -2.22324, 2.66465, -4.83295, 2.70084, -5.70553, -0.51941, -3.15962, -1.61501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64741, 0.81612, -11.82285, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.1755, -0.17183 ],
 							"curve": [ 0.25, 0, 0.75, 1 ]
 						},
@@ -840,7 +847,7 @@
 						{
 							"time": 0.7333,
 							"offset": 8,
-							"vertices": [ -2.97737, 9.40254, -6.91661, 19.92794, -10.55287, 18.41085, -12.37161, 12.38473, -4.72606, 6.30798, 0, 0, -1.48902, 4.88944, -7.06773, 10.70101 ]
+							"vertices": [ -2.97737, 9.40254, -6.91661, 19.92794, -10.55287, 18.41085, -12.37161, 12.38473, -4.72606, 6.30798, 0, 0, -1.48902, 4.88944, -7.06772, 10.70101 ]
 						},
 						{
 							"time": 0.8333,
@@ -868,7 +875,7 @@
 							"vertices": [ -1.04945, -3.10476 ]
 						},
 						{
-							"time": 0.7,
+							"time": 0.6999,
 							"offset": 6,
 							"vertices": [ -1.4245, -6.30616 ]
 						},
@@ -896,7 +903,7 @@
 						{
 							"time": 0.3,
 							"offset": 2,
-							"vertices": [ -8.27184, 6.68821, -9.29764, 10.13797, -8.62231, 14.71339, -4.58629, 18.81939, -2.20304, 17.10709, -0.07794, 9.9046, 2.54451, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94624, 2.38007, -4.59398, 10.01888 ]
+							"vertices": [ -8.27184, 6.68821, -9.29764, 10.13797, -8.62231, 14.71339, -4.58629, 18.81939, -2.20304, 17.10709, -0.07794, 9.9046, 2.54451, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94624, 2.38007, -4.59398, 10.01887 ]
 						},
 						{
 							"time": 0.3666,
@@ -912,12 +919,12 @@
 						{
 							"time": 0.7333,
 							"offset": 4,
-							"vertices": [ 1.31462, -6.84099, -0.87905, -12.54479, -5.9851, -14.08367, -7.15892, -11.63193, -5.6792, -4.83544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06163, -6.93844 ]
+							"vertices": [ 1.31462, -6.84099, -0.87905, -12.54479, -5.98509, -14.08367, -7.15892, -11.63193, -5.6792, -4.83544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06163, -6.93844 ]
 						},
 						{
 							"time": 0.8,
 							"offset": 4,
-							"vertices": [ 0.65731, -3.42049, -0.43952, -6.27239, -2.99255, -7.04183, -3.57946, -5.81596, -2.83959, -2.41772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79687, -1.2802, 0, 0, 0, 0, -1.03081, -3.46922 ]
+							"vertices": [ 0.65731, -3.42049, -0.43952, -6.27239, -2.99254, -7.04183, -3.57946, -5.81596, -2.83959, -2.41772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79687, -1.2802, 0, 0, 0, 0, -1.03081, -3.46922 ]
 						},
 						{ "time": 0.8666 }
 					]
@@ -1023,7 +1030,7 @@
 							"vertices": [ -2.37974, -0.05431, -0.49433, 0.19436, -0.90861, 1.16519, -1.60956, 2.70798, 0.96186, 0.80615 ]
 						},
 						{
-							"time": 0.7,
+							"time": 0.6999,
 							"offset": 2,
 							"vertices": [ -0.91714, -2.76567, -0.62214, -3.63489, -0.8494, -2.26772, -2.56076, 0.5297 ]
 						},
@@ -1058,7 +1065,7 @@
 							"vertices": [ 1.16999, 0, -0.234, -0.93599, -2.92499, 0.35099, 0, 0, 0, 0, 0.49999, -0.24999, -0.64078, -2.07914, -0.64078, -2.07914 ]
 						},
 						{
-							"time": 0.7,
+							"time": 0.6999,
 							"vertices": [ 1.8627, -0.11514, 4.66326, -0.09099, -1.76428, 0.21171, 0, 0, -0.56832, 0.32832, -1.13833, -1.1511, -2.19996, -3.47068, -1.29718, -3.47068, 0, 0, 0, 0, 1.58785, -0.04642, 2.65941, 0.16714 ]
 						},
 						{
@@ -1067,7 +1074,7 @@
 						},
 						{
 							"time": 0.8666,
-							"vertices": [ 2.01969, -0.0214, 8.98545, 0.4446, -0.20937, 0.08022, 0.45919, 0, -0.35919, 0.47279, -1.84159, -1.4488, -0.79153, 1.2642, 0.53285, 1.23981, 0.45919, 0, 0.11759, -0.09759, 3.2839, -0.09025, 5.13115, 0.19388 ]
+							"vertices": [ 2.01969, -0.0214, 8.98545, 0.4446, -0.20937, 0.08022, 0.45919, 0, -0.35919, 0.47279, -1.84159, -1.4488, -0.79153, 1.2642, 0.53285, 1.2398, 0.45919, 0, 0.11759, -0.09759, 3.2839, -0.09025, 5.13115, 0.19388 ]
 						},
 						{
 							"time": 1,

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 23 - 7
spine-corona/data/raptor.json


+ 20 - 13
spine-corona/data/spineboy.json

@@ -1,5 +1,12 @@
 {
-"skeleton": { "hash": "rPoYyBLFG6F0CGZ5wsUEBKDJU9U", "spine": "3.4.02", "width": 470.9, "height": 731.49, "images": "./images/" },
+"skeleton": {
+	"hash": "H7+xXqKKrnDC1fiM9L7F+WiY4ro",
+	"spine": "3.5.03-beta",
+	"width": 470.9,
+	"height": 731.49,
+	"fps": 30,
+	"images": "./images/"
+},
 "bones": [
 	{ "name": "hip", "y": 247.47 },
 	{ "name": "torso", "parent": "hip", "length": 127.55, "rotation": 103.82, "x": -1.61, "y": 4.9, "color": "e0da19ff" },
@@ -89,7 +96,7 @@
 			"head": {
 				"type": "boundingbox",
 				"vertexCount": 6,
-				"vertices": [ -19.14, -70.3, 40.8, -118.07, 257.77, -115.61, 285.16, 57.18, 120.77, 164.95, -5.06, 76.94 ]
+				"vertices": [ -19.13999, -70.3, 40.79999, -118.06999, 257.77, -115.61, 285.16, 57.18, 120.76999, 164.95, -5.05999, 76.94 ]
 			}
 		},
 		"mouth": {
@@ -230,7 +237,7 @@
 					{ "time": 0.4, "angle": -292.35 },
 					{ "time": 0.4333, "angle": -315.84 },
 					{ "time": 0.5, "angle": -347.94 },
-					{ "time": 0.7, "angle": -347.33, "curve": "stepped" },
+					{ "time": 0.6999, "angle": -347.33, "curve": "stepped" },
 					{ "time": 2.2333, "angle": -347.33 },
 					{ "time": 2.7, "angle": -290.68 },
 					{ "time": 2.7666, "angle": -285.1 },
@@ -271,7 +278,7 @@
 					{ "time": 0.4, "angle": -18.92 },
 					{ "time": 0.4333, "angle": -18.28 },
 					{ "time": 0.5, "angle": 60.61 },
-					{ "time": 0.7, "angle": -18.87, "curve": "stepped" },
+					{ "time": 0.6999, "angle": -18.87, "curve": "stepped" },
 					{ "time": 2.2333, "angle": -18.87 },
 					{ "time": 2.7, "angle": -1.95, "curve": "stepped" },
 					{ "time": 4.6666, "angle": -1.95 },
@@ -289,7 +296,7 @@
 				"rotate": [
 					{ "time": 0, "angle": -2.33 },
 					{ "time": 0.2666, "angle": 26.34 },
-					{ "time": 0.7, "angle": -6.07, "curve": "stepped" },
+					{ "time": 0.6999, "angle": -6.07, "curve": "stepped" },
 					{ "time": 2.2333, "angle": -6.07 },
 					{ "time": 2.7, "angle": 5.72, "curve": "stepped" },
 					{ "time": 4.6666, "angle": 5.72 },
@@ -2054,7 +2061,7 @@
 					{ "time": 0.4, "angle": -28.62 },
 					{ "time": 0.5, "angle": -19.3 },
 					{ "time": 0.6, "angle": -3.08 },
-					{ "time": 0.7, "angle": 29.51 },
+					{ "time": 0.6999, "angle": 29.51 },
 					{ "time": 0.8, "angle": 15.79 }
 				],
 				"translate": [
@@ -2078,7 +2085,7 @@
 					{ "time": 0.3, "angle": 15.98 },
 					{ "time": 0.4, "angle": 5.94 },
 					{ "time": 0.5, "angle": -26.76 },
-					{ "time": 0.7, "angle": -55.44 },
+					{ "time": 0.6999, "angle": -55.44 },
 					{ "time": 0.8, "angle": 5.12 }
 				],
 				"translate": [
@@ -2099,14 +2106,14 @@
 					{ "time": 0.4, "angle": 8.69 },
 					{ "time": 0.5, "angle": 12.16 },
 					{ "time": 0.6, "angle": -24.62 },
-					{ "time": 0.7, "angle": -27.26 },
+					{ "time": 0.6999, "angle": -27.26 },
 					{ "time": 0.8, "angle": -34.38 }
 				],
 				"translate": [
 					{ "time": 0, "x": 0, "y": 0 },
 					{ "time": 0.4, "x": 4.08, "y": -9.53 },
 					{ "time": 0.5, "x": 0, "y": 0 },
-					{ "time": 0.7, "x": -21.14, "y": -9.6 },
+					{ "time": 0.6999, "x": -21.14, "y": -9.6 },
 					{ "time": 0.8, "x": 0, "y": 0 }
 				],
 				"scale": [
@@ -2123,7 +2130,7 @@
 					{ "time": 0.4, "angle": 15.95 },
 					{ "time": 0.5, "angle": -9 },
 					{ "time": 0.6, "angle": 26.06 },
-					{ "time": 0.7, "angle": 21.85 },
+					{ "time": 0.6999, "angle": 21.85 },
 					{ "time": 0.8, "angle": 14.26 }
 				],
 				"translate": [
@@ -2146,7 +2153,7 @@
 					{ "time": 0.4, "angle": 13.45 },
 					{ "time": 0.5, "angle": -3.57 },
 					{ "time": 0.6, "angle": -0.97 },
-					{ "time": 0.7, "angle": 2.97 },
+					{ "time": 0.6999, "angle": 2.97 },
 					{ "time": 0.8, "angle": 10.13 }
 				],
 				"translate": [
@@ -2290,7 +2297,7 @@
 						"curve": [ 0.287, 0.37, 0.718, 0.76 ]
 					},
 					{
-						"time": 0.7,
+						"time": 0.6999,
 						"x": -23.93,
 						"y": 10.34,
 						"curve": [ 0.615, 0, 0.75, 1 ]
@@ -2327,7 +2334,7 @@
 					{ "time": 0.4, "angle": 10.22 },
 					{ "time": 0.5, "angle": 11.44 },
 					{ "time": 0.6, "angle": -0.33 },
-					{ "time": 0.7, "angle": 0.15 },
+					{ "time": 0.6999, "angle": 0.15 },
 					{ "time": 0.8, "angle": 12.49 }
 				],
 				"translate": [

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 27 - 16
spine-corona/data/stretchyman.json


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 21 - 6
spine-corona/data/tank.json


+ 36 - 27
spine-corona/data/test.json

@@ -1,18 +1,25 @@
 {
-"skeleton": { "hash": "xbu5IFg+2tCx4+2MavNPurEogzA", "spine": "3.4.02", "width": 1333.78, "height": 1112.91, "images": "./images/" },
+"skeleton": {
+	"hash": "i05EldfljpjLC64I/kHnNrqzJ5A",
+	"spine": "3.5.03-beta",
+	"width": 1333.78,
+	"height": 1112.91,
+	"fps": 30,
+	"images": "./images/"
+},
 "bones": [
-	{ "name": "root", "x": 28.68, "y": -105.71 },
-	{ "name": "attachment", "parent": "root", "x": -267.71, "y": -366.62 },
-	{ "name": "color", "parent": "root", "x": -298.29, "y": 44.1 },
-	{ "name": "draworder", "parent": "root", "x": 283.53, "y": -356.27 },
-	{ "name": "mesh", "parent": "root", "x": -320.74, "y": 413.7 },
-	{ "name": "meshweighted", "parent": "root", "rotation": -11.22, "x": -353.28, "y": 627.53 },
-	{ "name": "pathfollower", "parent": "root", "x": 177.52, "y": 56.62 },
+	{ "name": "root", "x": 28.68, "y": -105.7 },
+	{ "name": "attachment", "parent": "root", "x": -267.7, "y": -366.61 },
+	{ "name": "color", "parent": "root", "x": -298.29, "y": 44.09 },
+	{ "name": "draworder", "parent": "root", "x": 283.52, "y": -356.26 },
+	{ "name": "mesh", "parent": "root", "x": -320.73, "y": 413.7 },
+	{ "name": "meshweighted", "parent": "root", "rotation": -11.22, "x": -353.27, "y": 627.53 },
+	{ "name": "pathfollower", "parent": "root", "x": 177.52, "y": 56.61 },
 	{ "name": "rotate", "parent": "root", "x": -305, "y": 201 },
 	{ "name": "scale", "parent": "root", "x": 183.99, "y": -138 },
 	{ "name": "shear", "parent": "root", "x": -304, "y": -146 },
-	{ "name": "transformconstrainttarget", "parent": "root", "x": 604.27, "y": 420.7, "color": "abe323ff" },
 	{ "name": "transformconstrained", "parent": "root", "x": 169.6, "y": 420.7 },
+	{ "name": "transformconstrainttarget", "parent": "root", "x": 604.27, "y": 420.7, "color": "abe323ff" },
 	{ "name": "translate", "parent": "root", "x": 190.99, "y": 201, "color": "abe323ff" }
 ],
 "slots": [
@@ -34,6 +41,7 @@
 "transform": [
 	{
 		"name": "transformconstraint",
+		"order": 1,
 		"bones": [ "transformconstrained" ],
 		"target": "transformconstrainttarget",
 		"x": -400,
@@ -46,6 +54,7 @@
 "path": [
 	{
 		"name": "pathconstraint",
+		"order": 0,
 		"bones": [ "pathfollower" ],
 		"target": "path2",
 		"rotation": 34.2
@@ -72,7 +81,7 @@
 				"path": "spine",
 				"uvs": [ 0, 0, 0.25, 0, 0.5, 0, 0.75, 0, 1, 0, 1, 0.25, 1, 0.5, 1, 0.75, 1, 1, 0.75, 1, 0.5, 1, 0.25, 1, 0, 1, 0, 0.75, 0, 0.5, 0, 0.25, 0.25, 0.25, 0.25, 0.5, 0.25, 0.75, 0.5, 0.25, 0.5, 0.5, 0.5, 0.75, 0.75, 0.25, 0.75, 0.5, 0.75, 0.75 ],
 				"triangles": [ 15, 0, 1, 16, 1, 2, 15, 1, 16, 19, 2, 3, 16, 2, 19, 22, 3, 4, 19, 3, 22, 22, 4, 5, 14, 15, 16, 17, 16, 19, 14, 16, 17, 20, 19, 22, 17, 19, 20, 23, 22, 5, 20, 22, 23, 23, 5, 6, 13, 14, 17, 18, 17, 20, 13, 17, 18, 21, 20, 23, 18, 20, 21, 24, 23, 6, 21, 23, 24, 24, 6, 7, 12, 13, 18, 11, 18, 21, 12, 18, 11, 10, 21, 24, 11, 21, 10, 9, 24, 7, 10, 24, 9, 9, 7, 8 ],
-				"vertices": [ 1, 5, -194.67, 21.29, 1, 1, 5, -102.08, 38.91, 1, 1, 5, -9.49, 56.54, 1, 1, 5, 83.08, 74.16, 1, 1, 5, 175.67, 91.79, 1, 1, 5, 181.28, 62.32, 1, 1, 5, 186.89, 32.84, 1, 1, 5, 192.5, 3.38, 1, 1, 5, 198.11, -26.09, 1, 1, 5, 105.52, -43.71, 1, 1, 5, 12.94, -61.33, 1, 1, 5, -79.64, -78.96, 1, 1, 5, -172.23, -96.58, 1, 1, 5, -177.84, -67.11, 1, 1, 5, -183.45, -37.64, 1, 1, 5, -189.06, -8.17, 1, 1, 5, -96.47, 9.45, 1, 1, 5, -90.86, -20.01, 1, 1, 5, -85.25, -49.48, 1, 1, 5, -3.88, 27.07, 1, 1, 5, 1.72, -2.39, 1, 1, 5, 7.33, -31.86, 1, 1, 5, 88.7, 44.69, 1, 1, 5, 94.31, 15.22, 1, 1, 5, 99.92, -14.24, 1 ],
+				"vertices": [ 1, 5, -194.66, 21.29, 1, 1, 5, -102.08, 38.90999, 1, 1, 5, -9.47999, 56.54, 1, 1, 5, 83.08, 74.16, 1, 1, 5, 175.66, 91.79, 1, 1, 5, 181.27, 62.31, 1, 1, 5, 186.88, 32.84, 1, 1, 5, 192.5, 3.38, 1, 1, 5, 198.11, -26.09, 1, 1, 5, 105.51, -43.7, 1, 1, 5, 12.93, -61.33, 1, 1, 5, -79.62999, -78.94999, 1, 1, 5, -172.22, -96.58, 1, 1, 5, -177.83, -67.11, 1, 1, 5, -183.44, -37.63, 1, 1, 5, -189.05, -8.17, 1, 1, 5, -96.47, 9.43999, 1, 1, 5, -90.86, -20.01, 1, 1, 5, -85.25, -49.47, 1, 1, 5, -3.88, 27.05999, 1, 1, 5, 1.72, -2.39, 1, 1, 5, 7.32, -31.86, 1, 1, 5, 88.69, 44.68, 1, 1, 5, 94.3, 15.22, 1, 1, 5, 99.91, -14.22999, 1 ],
 				"hull": 16,
 				"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, 0 ],
 				"width": 377,
@@ -105,9 +114,9 @@
 			"images/spine": {
 				"type": "mesh",
 				"path": "spine",
-				"uvs": [ 1, 0.50124, 1, 1, 0.72412, 1, 0.49981, 1, 0.28581, 1, 0, 1, 0, 0.50124, 0, 0, 0.49207, 0, 1, 0, 0.56941, 0.57414, 0.84014, 0.50124, 0.61841, 0.22584, 0.20589, 0.20154, 0.19558, 0.67134, 0.39152, 0.86574, 0.3941, 0.41214, 0.3941, 0.12864, 0.76021, 0.19344, 0.76537, 0.59034, 0.74474, 0.84144, 0.57716, 0.81714 ],
+				"uvs": [ 1, 0.50124, 1, 1, 0.72412, 1, 0.49981, 1, 0.2858, 1, 0, 1, 0, 0.50124, 0, 0, 0.49206, 0, 1, 0, 0.56941, 0.57414, 0.84013, 0.50124, 0.6184, 0.22584, 0.20588, 0.20153, 0.19558, 0.67133, 0.39151, 0.86574, 0.3941, 0.41214, 0.3941, 0.12863, 0.7602, 0.19344, 0.76537, 0.59034, 0.74474, 0.84144, 0.57716, 0.81713 ],
 				"triangles": [ 17, 7, 8, 18, 8, 9, 13, 7, 17, 12, 8, 18, 17, 8, 12, 16, 17, 12, 13, 17, 16, 6, 7, 13, 6, 13, 16, 18, 9, 0, 11, 18, 0, 10, 16, 12, 12, 18, 11, 10, 12, 11, 19, 10, 11, 14, 6, 16, 14, 16, 10, 21, 10, 19, 15, 14, 10, 20, 21, 19, 21, 15, 10, 5, 6, 14, 4, 5, 14, 15, 4, 14, 3, 15, 21, 4, 15, 3, 2, 21, 20, 3, 21, 2, 19, 11, 0, 0, 20, 19, 1, 20, 0, 2, 20, 1 ],
-				"vertices": [ 191.41, -1.12, 191.41, -60.97, 87.4, -60.97, 2.84, -60.97, -77.82, -60.97, -185.58, -60.97, -185.58, -1.12, -185.58, 59.02, -0.07, 59.02, 191.41, 59.02, 29.09, -9.85, 131.14, -1.12, 47.55, 31.92, -107.96, 34.84, -111.85, -21.53, -37.97, -44.86, -37, 9.57, -37, 43.59, 101.01, 35.81, 102.96, -11.81, 95.18, -41.93, 32, -39.02 ],
+				"vertices": [ 191.41, -1.12, 191.41, -60.97, 87.4, -60.97, 2.82999, -60.97, -77.80999, -60.97, -185.58, -60.97, -185.58, -1.12, -185.58, 59.02, -0.07, 59.02, 191.41, 59.02, 29.09, -9.85, 131.13, -1.12, 47.54, 31.92, -107.94999, 34.84, -111.83999, -21.53, -37.97, -44.86, -37, 9.56, -37, 43.59, 101.01, 35.81, 102.94999, -11.81, 95.18, -41.93, 32, -39.02 ],
 				"hull": 10,
 				"edges": [ 10, 12, 12, 14, 14, 16, 16, 18, 2, 0, 0, 18, 6, 8, 8, 10, 2, 4, 4, 6 ],
 				"width": 377,
@@ -120,7 +129,7 @@
 				"closed": true,
 				"lengths": [ 128.85, 310.24, 465.06, 600.88, 773.97 ],
 				"vertexCount": 15,
-				"vertices": [ 258.07, -42.67, 291.94, -17.53, 326.41, 7.22, 391.41, 2.75, 398.05, 46.72, 399.83, 84.07, 274.03, 106.4, 236.7, 117.74, 199.37, 129.09, 116.55, 135.12, 84.41, 115.47, 50.34, 94.04, 56.53, 1.48, 89.01, -5.59, 122.89, -13.58 ]
+				"vertices": [ 258.07, -42.65999, 291.94, -17.53, 326.41, 7.21, 391.41, 2.75, 398.04, 46.72, 399.82, 84.05999, 274.02, 106.4, 236.69, 117.73, 199.36, 129.08, 116.55, 135.11, 84.41, 115.47, 50.34, 94.04, 56.52, 1.48, 89.01, -5.59, 122.87999, -13.56999 ]
 			}
 		}
 	}
@@ -132,7 +141,7 @@
 				"color": [
 					{ "time": 0, "color": "ffffffff" },
 					{ "time": 0.4333, "color": "ff0901ff" },
-					{ "time": 0.9, "color": "2dff00ff" },
+					{ "time": 0.8999, "color": "2dff00ff" },
 					{ "time": 1.3333, "color": "ffffffff" }
 				]
 			},
@@ -159,40 +168,40 @@
 						"y": 0,
 						"curve": [ 1, 0, 0, 1 ]
 					},
-					{ "time": 0.6666, "x": 96.99, "y": -151 },
+					{ "time": 0.6666, "x": 96.98, "y": -151 },
 					{ "time": 1.3333, "x": 0, "y": 0 }
 				]
 			},
 			"scale": {
 				"scale": [
 					{ "time": 0, "x": 1, "y": 1 },
-					{ "time": 0.6666, "x": 1, "y": 2.34 },
+					{ "time": 0.6666, "x": 1, "y": 2.339 },
 					{ "time": 1.3333, "x": 1, "y": 1 }
 				]
 			},
 			"rotate": {
 				"rotate": [
 					{ "time": 0, "angle": 0 },
-					{ "time": 0.6666, "angle": -125.34 },
+					{ "time": 0.6666, "angle": -125.33 },
 					{ "time": 1.3333, "angle": 0 }
 				]
 			},
 			"shear": {
 				"shear": [
 					{ "time": 0, "x": 0, "y": 0 },
-					{ "time": 0.6666, "x": 29.4, "y": 0 },
+					{ "time": 0.6666, "x": 29.39, "y": 0 },
 					{ "time": 1.3333, "x": 0, "y": 0 }
 				]
 			},
 			"transformconstrainttarget": {
 				"rotate": [
 					{ "time": 0, "angle": 0 },
-					{ "time": 0.6666, "angle": -74.6 },
+					{ "time": 0.6666, "angle": -74.59 },
 					{ "time": 1.3333, "angle": 0 }
 				],
 				"translate": [
 					{ "time": 0, "x": 0, "y": 0 },
-					{ "time": 0.6666, "x": 176.22, "y": -170.34 },
+					{ "time": 0.6666, "x": 176.22, "y": -170.33 },
 					{ "time": 1.3333, "x": 0, "y": 0 }
 				],
 				"scale": [
@@ -202,7 +211,7 @@
 				],
 				"shear": [
 					{ "time": 0, "x": 0, "y": 0 },
-					{ "time": 0.6666, "x": 23.4, "y": 0 },
+					{ "time": 0.6666, "x": 23.39, "y": 0 },
 					{ "time": 1.3333, "x": 0, "y": 0 }
 				]
 			}
@@ -221,11 +230,11 @@
 					{ "time": 1.3333, "position": 1 }
 				],
 				"spacing": [
-					{ "time": 0, "spacing": 40.1 },
+					{ "time": 0, "spacing": 40.0999 },
 					{ "time": 1.3333 }
 				],
 				"mix": [
-					{ "time": 0.6666, "rotateMix": 0.473, "translateMix": 0.473 },
+					{ "time": 0.6666, "rotateMix": 0.4729, "translateMix": 0.4729 },
 					{ "time": 1.3333 }
 				]
 			}
@@ -237,7 +246,7 @@
 						{ "time": 0 },
 						{
 							"time": 0.6666,
-							"vertices": [ 43.09784, 58.11693, 0, 0, 0, 0, -0.653, -57.46399, -50.93396, -47.01593, -43.098, -24.81398, -43.098, -24.81399, -1.0E-5, 1.0E-5, 0, 1.0E-5, 43.09784, 58.11695, 0, 0, 43.09784, 58.11693, 1.0E-5, -1.0E-5, 0, 0, -43.09797, -24.81399, 0, 1.0E-5, 0, 0, 0, 0, 43.09784, 58.11694, 43.09784, 58.11693 ]
+							"vertices": [ 43.09783, 58.11693, 0, 0, 0, 0, -0.653, -57.46398, -50.93395, -47.01593, -43.098, -24.81398, -43.098, -24.81399, -1.0E-5, 1.0E-5, 0, 1.0E-5, 43.09783, 58.11695, 0, 0, 43.09783, 58.11693, 1.0E-5, -1.0E-5, 0, 0, -43.09797, -24.81399, 0, 1.0E-5, 0, 0, 0, 0, 43.09783, 58.11694, 43.09783, 58.11693 ]
 						},
 						{ "time": 1.3333 }
 					]
@@ -248,16 +257,16 @@
 						{
 							"time": 0.3333,
 							"offset": 4,
-							"vertices": [ -9.45232, 83.5133, -3.90008, 44.76635, -3.90008, 44.76635, -3.90008, 44.76635, 0, 0, 0, 0, 0, 0, 0, 0, 5.15667, -29.57763, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.90008, 44.76635 ]
+							"vertices": [ -9.45232, 83.51329, -3.90007, 44.76634, -3.90007, 44.76634, -3.90007, 44.76634, 0, 0, 0, 0, 0, 0, 0, 0, 5.15667, -29.57762, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.90007, 44.76634 ]
 						},
 						{ "time": 0.6666 },
 						{
 							"time": 0.6679,
-							"vertices": [ -1.21159, -14.52716, -2.76092, -7.75683, -4.30999, -0.98669, 2.38385, 9.78289, -1.56903, 5.49316, -2.93444, 6.75128, -4.30011, 8.00933, -5.66552, 9.2677, -7.031, 10.52575, -3.07855, 14.81561, 4.30986, 0.9859, 5.85907, -5.78436, 7.40826, -12.55462, 5.25317, -13.04797, 3.09832, -13.54083, 0.94323, -14.03411, -0.60595, -7.26379, 1.54907, -6.77056, 3.70422, -6.27746, -2.15495, -0.49346, 0, -3.0E-4, 2.15495, 0.49273, 1.01812, 11.04132, -0.3471, 12.29895, -1.71313, 13.557 ]
+							"vertices": [ -1.21159, -14.52715, -2.76092, -7.75683, -4.30998, -0.98668, 2.38385, 9.78289, -1.56903, 5.49315, -2.93443, 6.75127, -4.3001, 8.00932, -5.66552, 9.2677, -7.031, 10.52575, -3.07855, 14.8156, 4.30986, 0.98589, 5.85906, -5.78435, 7.40825, -12.55461, 5.25317, -13.04796, 3.09832, -13.54082, 0.94322, -14.03411, -0.60594, -7.26379, 1.54907, -6.77055, 3.70422, -6.27746, -2.15495, -0.49345, 0, -3.0E-4, 2.15495, 0.49272, 1.01812, 11.04131, -0.34709, 12.29895, -1.71312, 13.557 ]
 						},
 						{
 							"time": 1.3333,
-							"vertices": [ -10.57342, 25.16797, -9.16716, 14.48486, -7.76074, 3.80212, 131.25482, 21.05285, 128.23181, -0.04534, 121.51611, 0.91668, 114.80023, 1.8789, 108.08459, 2.84124, 101.3689, 3.80316, 104.39154, 24.90191, -21.3623, 2.01171, -22.76855, 12.69433, -24.17505, 23.37719, -20.77471, 23.82476, -17.37414, 24.27276, -13.97393, 24.72009, -12.56768, 14.03753, -15.96789, 13.58978, -19.36809, 13.14215, -11.16095, 3.35455, -14.56134, 2.90704, -17.96167, 2.45922, 124.53894, 22.01538, 117.82336, 22.97705, 111.10718, 23.93933 ]
+							"vertices": [ -10.57341, 25.16797, -9.16716, 14.48486, -7.76073, 3.80211, 131.25482, 21.05285, 128.23181, -0.04534, 121.51611, 0.91667, 114.80023, 1.8789, 108.08458, 2.84123, 101.36889, 3.80315, 104.39154, 24.90191, -21.3623, 2.0117, -22.76855, 12.69433, -24.17505, 23.37718, -20.7747, 23.82476, -17.37413, 24.27276, -13.97393, 24.72009, -12.56768, 14.03752, -15.96788, 13.58977, -19.36809, 13.14214, -11.16094, 3.35454, -14.56134, 2.90704, -17.96166, 2.45921, 124.53894, 22.01538, 117.82335, 22.97705, 111.10717, 23.93932 ]
 						}
 					]
 				}

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 9 - 1
spine-corona/data/vine.json


+ 116 - 113
spine-lua/Bone.lua

@@ -35,6 +35,10 @@ local math_sin = math.sin
 local math_cos = math.cos
 local math_atan2 = math.atan2
 local math_sqrt = math.sqrt
+local math_abs = math.abs
+local math_pi = math.pi
+
+local TransformMode = require "spine-lua.TransformMode"
 
 function math.sign(x)
 	if x<0 then
@@ -61,11 +65,11 @@ function Bone.new (data, skeleton, parent)
 		parent = parent,
 		children = { },
 		x = 0, y = 0, rotation = 0, scaleX = 1, scaleY = 1, shearX = 0, shearY = 0,
-		appliedRotation = 0,
+		ax = 0, ay = 0, arotation = 0, ascaleX = 0, ascaleY = 0, ashearX = 0, ashearY = 0,
+		appliedValid = false,
 
 		a = 0, b = 0, worldX = 0, -- a b x
 		c = 0, d = 0, worldY = 0, -- c d y
-		worldSignX = 0, worldSignY = 0,
 		sorted = false
 	}
 	setmetatable(self, Bone)
@@ -83,18 +87,24 @@ function Bone:updateWorldTransform ()
 end
 
 function Bone:updateWorldTransformWith (x, y, rotation, scaleX, scaleY, shearX, shearY)
-	self.appliedRotation = rotation
-
-	local rotationY = rotation + 90 + shearY
-	local rotationRad = math_rad(rotation + shearX)
-	local rotationYRad = math_rad(rotationY)
-	local la = math_cos(rotationRad) * scaleX
-	local lb = math_cos(rotationYRad) * scaleY
-	local lc = math_sin(rotationRad) * scaleX
-	local ld = math_sin(rotationYRad) * scaleY
+	self.ax = x
+	self.ay = y
+	self.arotation = rotation
+	self.ascaleX = scaleX
+	self.ascaleY = scaleY
+	self.ashearX = shearX
+	self.ashearY = shearY
+	self.appliedValid = true
 
 	local parent = self.parent
 	if parent == nil then
+		local rotationY = rotation + 90 + shearY
+		local rotationRad = math_rad(rotation + shearX)
+		local rotationYRad = math_rad(rotationY)
+		local la = math_cos(rotationRad) * scaleX
+		local lb = math_cos(rotationYRad) * scaleY
+		local lc = math_sin(rotationRad) * scaleX
+		local ld = math_sin(rotationYRad) * scaleY
 		local skeleton = self.skeleton
 		if skeleton.flipX then
 			x = -x
@@ -110,10 +120,8 @@ function Bone:updateWorldTransformWith (x, y, rotation, scaleX, scaleY, shearX,
 		self.b = lb
 		self.c = lc
 		self.d = ld
-		self.worldX = x
-		self.worldY = y
-		self.worldSignX = math_sign(scaleX)
-		self.worldSignY = math_sign(scaleY)
+		self.worldX = x + skeleton.x
+		self.worldY = y + skeleton.y
 		return
 	end
 
@@ -123,89 +131,85 @@ function Bone:updateWorldTransformWith (x, y, rotation, scaleX, scaleY, shearX,
 	local pd = parent.d
 	self.worldX = pa * x + pb * y + parent.worldX
 	self.worldY = pc * x + pd * y + parent.worldY
-	self.worldSignX = parent.worldSignX * math_sign(scaleX)
-	self.worldSignY = parent.worldSignY * math_sign(scaleY)
 
-	if self.data.inheritRotation and self.data.inheritScale then
+	local transformMode = self.data.transformMode
+	if transformMode == TransformMode.normal then
+		local rotationY = rotation + 90 + shearY
+		local la = math_cos(math_rad(rotation + shearX)) * scaleX
+		local lb = math_cos(math_rad(rotationY)) * scaleY
+		local lc = math_sin(math_rad(rotation + shearX)) * scaleX
+		local ld = math_sin(math_rad(rotationY)) * scaleY
 		self.a = pa * la + pb * lc
 		self.b = pa * lb + pb * ld
 		self.c = pc * la + pd * lc
 		self.d = pc * lb + pd * ld
-	else
-		if self.data.inheritRotation then
-			pa = 1
-			pb = 0
-			pc = 0
-			pd = 1
-			repeat
-				local appliedRotationRad = math_rad(parent.appliedRotation)
-				local cos = math_cos(appliedRotationRad)
-				local sin = math_sin(appliedRotationRad)
-				local temp = pa * cos + pb * sin
-				pb = pb * cos - pa * sin
-				pa = temp
-				temp = pc * cos + pd * sin
-				pd = pd * cos - pc * sin
-				pc = temp
-
-				if not parent.data.inheritRotation then break end
-				parent = parent.parent
-			until parent == nil
-			self.a = pa * la + pb * lc
-			self.b = pa * lb + pb * ld
-			self.c = pc * la + pd * lc
-			self.d = pc * lb + pd * ld
-		elseif self.data.inheritScale then
-			pa = 1
-			pb = 0
-			pc = 0
-			pd = 1
-			repeat
-				local appliedRotationRad = math_rad(parent.appliedRotation)
-				local cos = math_cos(appliedRotationRad)
-				local sin = math_sin(appliedRotationRad)
-				local psx = parent.scaleX
-				local psy = parent.scaleY
-				local za = cos * psx
-				local zb = sin * psy
-				local zc = sin * psx
-				local zd = cos * psy
-				local temp = pa * za + pb * zc
-				pb = pb * zd - pa * zb
-				pa = temp
-				temp = pc * za + pd * zc
-				pd = pd * zd - pc * zb
-				pc = temp
-
-				if psx >= 0 then sin = -sin end
-				temp = pa * cos + pb * sin
-				pb = pb * cos - pa * sin
-				pa = temp
-				temp = pc * cos + pd * sin
-				pd = pd * cos - pc * sin
-				pc = temp
-
-				if not parent.data.inheritScale then break end
-				parent = parent.parent
-			until parent == nil
-			self.a = pa * la + pb * lc
-			self.b = pa * lb + pb * ld
-			self.c = pc * la + pd * lc
-			self.d = pc * lb + pd * ld
+		return;
+	elseif transformMode == TransformMode.onlyTranslation then
+		local rotationY = rotation + 90 + shearY
+		self.a = math_cos(math_rad(rotation + shearX)) * scaleX
+		self.b = math_cos(math_rad(rotationY)) * scaleY
+		self.c = math_sin(math_rad(rotation + shearX)) * scaleX
+		self.d = math_sin(math_rad(rotationY)) * scaleY
+	elseif transformMode == TransformMode.noRotationOrReflection then
+		local s = pa * pa + pc * pc
+		local prx = 0
+		if s > 0.0001 then
+			s = math_abs(pa * pd - pb * pc) / s
+			pb = pc * s
+			pd = pa * s
+			prx = math_deg(math_atan2(pc, pa));
 		else
-			self.a = la
-			self.b = lb
-			self.c = lc
-			self.d = ld
+			pa = 0;
+			pc = 0;
+			prx = 90 - math_deg(math_atan2(pd, pb));
 		end
-		if self.skeleton.flipX then
-			self.a = -self.a
+		local rx = rotation + shearX - prx
+		local ry = rotation + shearY - prx + 90
+		local la = math_cos(math_rad(rx)) * scaleX
+		local lb = math_cos(math_rad(ry)) * scaleY
+		local lc = math_sin(math_rad(rx)) * scaleX
+		local ld = math_sin(math_rad(ry)) * scaleY
+		self.a = pa * la - pb * lc
+		self.b = pa * lb - pb * ld
+		self.c = pc * la + pd * lc
+		self.d = pc * lb + pd * ld	
+	elseif transformMode == TransformMode.noScale or transformMode == TransformMode.noScaleOrReflection then
+		local cos = math_cos(math_rad(rotation))
+		local sin = math_sin(math_rad(rotation))
+		local za = pa * cos + pb * sin
+		local zc = pc * cos + pd * sin
+		local s = math_sqrt(za * za + zc * zc)
+		if s > 0.00001 then s = 1 / s end
+		za = za * s
+		zc = zc * s
+		s = math_sqrt(za * za + zc * zc)
+		local r = math_pi / 2 + math_atan2(zc, za)
+		local zb = math_cos(r) * s
+		local zd = math_sin(r) * s
+		local la = math_cos(math_rad(shearX)) * scaleX;
+		local lb = math_cos(math_rad(90 + shearY)) * scaleY;
+		local lc = math_sin(math_rad(shearX)) * scaleX;
+		local ld = math_sin(90 + shearY) * scaleY;
+		self.a = za * la + zb * lc
+		self.b = za * lb + zb * ld
+		self.c = zc * la + zd * lc
+		self.d = zc * lb + zd * ld
+		local flip = self.skeleton.flipX ~= self.skeleton.flipY
+		if transformMode ~= TransformMode.noScaleOrReflection then flip = pa * pd - pb * pc < 0 end
+		if flip then
 			self.b = -self.b
-		end
-		if self.skeleton.flipY then
-			self.c = -self.c
 			self.d = -self.d
 		end
+		return
+	end
+	
+	if self.skeleton.flipX then
+		self.a = -self.a
+		self.b = -self.b
+	end
+	if self.skeleton.flipY then
+		self.c = -self.c
+		self.d = -self.d
 	end
 end
 
@@ -229,16 +233,16 @@ function Bone:getWorldRotationY ()
 end
 
 function Bone:getWorldScaleX ()
-	return math_sqrt(self.a * self.a + self.b * self.b) * self.worldSignX
+	return math_sqrt(self.a * self.a + self.c * self.c)
 end
 
 function Bone:getWorldScaleY ()
-	return math_sqrt(self.c * self.c + self.d * self.d) * self.worldSignY
+	return math_sqrt(self.b * self.b + self.d * self.d)
 end
 
 function Bone:worldToLocalRotationX ()
 	local parent = self.parent
-	if parent == nil then return self.rotation end
+	if parent == nil then return self.arotation end
 	local pa = parent.a
 	local pb = parent.b
 	local pc = parent.c
@@ -272,19 +276,19 @@ function Bone:rotateWorld (degrees)
 	self.b = cos * b - sin * d
 	self.c = sin * a + cos * c
 	self.d = sin * b + cos * d
+	self.appliedValid = false
 end
 
-function updateLocalTransform ()
+function updateAppliedTransform ()
 	local parent = self.parent
 	if parent == nil then
-		self.x = self.worldX
-		self.y = self.worldY
-		self.rotation = math_deg(math_atan2(self.c, self.a))
-		self.scaleX = math_sqrt(self.a * self.a + self.c * self.c)
-		self.scaleY = math_sqrt(self.b * self.b + self.d * self.d)
-		local det = self.a * self.d - self.b * self.c
-		self.shearX = 0
-		self.shearY = math_deg(math_atan2(self.a * self.b + self.c * self.d, det))
+		self.ax = self.worldX
+		self.ay = self.worldY
+		self.arotation = math_deg(math_atan2(self.c, self.a))
+		self.ascaleX = math_sqrt(self.a * self.a + self.c * self.c)
+		self.ascaleY = math_sqrt(self.b * self.b + self.d * self.d)
+		self.ashearX = 0
+		self.ashearY = math_deg(math_atan2(self.a * self.b + self.c * self.d, self.a * self.d - self.b * self.c))
 		return
 	end
 	local pa = parent.a
@@ -294,8 +298,8 @@ function updateLocalTransform ()
 	local pid = 1 / (pa * pd - pb * pc)
 	local dx = self.worldX - parent.worldX
 	local dy = self.worldY - parent.worldY
-	self.x = (dx * pd * pid - dy * pb * pid)
-	self.y = (dy * pa * pid - dx * pc * pid)
+	self.ax = (dx * pd * pid - dy * pb * pid)
+	self.ay = (dy * pa * pid - dx * pc * pid)
 	local ia = pid * pd
 	local id = pid * pa
 	local ib = pid * pb
@@ -304,20 +308,19 @@ function updateLocalTransform ()
 	local rb = ia * self.b - ib * self.d
 	local rc = id * self.c - ic * self.a
 	local rd = id * self.d - ic * self.b
-	self.shearX = 0
-	self.scaleX = math_sqrt(ra * ra + rc * rc)
-	if self.scaleX > 0.0001 then
+	self.ashearX = 0
+	self.ascaleX = math_sqrt(ra * ra + rc * rc)
+	if self.ascaleX > 0.0001 then
 		local det = ra * rd - rb * rc
-		self.scaleY = det / self.scaleX
-		self.shearY = math_deg(math_atan2(ra * rb + rc * rd, det))
-		self.rotation = math_deg(math_atan2(rc, ra))
+		self.ascaleY = det / self.ascaleX
+		self.ashearY = math_deg(math_atan2(ra * rb + rc * rd, det))
+		self.arotation = math_deg(math_atan2(rc, ra))
 	else
-		self.scaleX = 0
-		self.scaleY = math_sqrt(rb * rb + rd * rd)
-		self.shearY = 0
-		self.rotation = 90 - math_deg(math_atan2(rd, rb))
+		self.ascaleX = 0
+		self.ascaleY = math_sqrt(rb * rb + rd * rd)
+		self.ashearY = 0
+		self.arotation = 90 - math_deg(math_atan2(rd, rb))
 	end
-	self.appliedRotation = self.rotation
 end
 
 function Bone:worldToLocal (world)

+ 4 - 0
spine-lua/BoneData.lua

@@ -28,6 +28,9 @@
 -- POSSIBILITY OF SUCH DAMAGE.
 -------------------------------------------------------------------------------
 
+local setmetatable = setmetatable
+local TransformMode = require "spine-lua.TransformMode"
+
 local BoneData = {}
 function BoneData.new (index, name, parent)
 	if index < 0 then error("index must be >= 0", 2) end
@@ -36,6 +39,7 @@ function BoneData.new (index, name, parent)
 	local self = {
 		index = index,
 		name = name,
+		transformMode = TransformMode.normal,
 		parent = parent,
 		length = 0,
 		x = 0, y = 0,

+ 23 - 21
spine-lua/IkConstraint.lua

@@ -53,7 +53,6 @@ function IkConstraint.new (data, skeleton)
 		target = nil,
 		mix = data.mix,
 		bendDirection = data.bendDirection,
-		level = 0
 	}
 	setmetatable(self, IkConstraint)
 
@@ -82,20 +81,21 @@ function IkConstraint:update ()
 end
 
 function IkConstraint:apply1 (bone, targetX, targetY, alpha)
-	local pp = bone.parent
-	local id = 1 / (pp.a * pp.d - pp.b * pp.c)
-	local x = targetX - pp.worldX
-	local y = targetY - pp.worldY
-	local tx = (x * pp.d - y * pp.b) * id - bone.x
-	local ty = (y * pp.a - x * pp.c) * id - bone.y
-	local rotationIK = math_deg(math_atan2(ty, tx)) - bone.shearX - bone.rotation
-	if bone.scaleX < 0 then rotationIK = rotationIK + 180 end
+	if not bone.appliedValid then bone:updateAppliedTransform() end
+	local p = bone.parent
+	local id = 1 / (p.a * p.d - p.b * p.c)
+	local x = targetX - p.worldX
+	local y = targetY - p.worldY
+	local tx = (x * p.d - y * p.b) * id - bone.ax
+	local ty = (y * p.a - x * p.c) * id - bone.ay
+	local rotationIK = math_deg(math_atan2(ty, tx)) - bone.ashearX - bone.arotation
+	if bone.ascaleX < 0 then rotationIK = rotationIK + 180 end
 	if rotationIK > 180 then
 		rotationIK = rotationIK - 360
 	elseif (rotationIK < -180) then
 		rotationIK = rotationIK + 360
 	end
-	bone:updateWorldTransformWith(bone.x, bone.y, bone.rotation + rotationIK * alpha, bone.scaleX, bone.scaleY, bone.shearX, bone.shearY)
+	bone:updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, bone.ascaleX, bone.ascaleY, bone.ashearX, bone.ashearY)
 end
 
 function IkConstraint:apply2 (parent, child, targetX, targetY, bendDir, alpha)
@@ -103,11 +103,13 @@ function IkConstraint:apply2 (parent, child, targetX, targetY, bendDir, alpha)
 		child:updateWorldTransform()
 		return
 	end
-	local px = parent.x
-	local py = parent.y
-	local psx = parent.scaleX
-	local psy = parent.scaleY
-	local csx = child.scaleX
+	if not parent.appliedValid then parent:updateAppliedTransform() end
+	if not child.appliedValid then child:updateAppliedTransform() end
+	local px = parent.ax
+	local py = parent.ay
+	local psx = parent.ascaleX
+	local psy = parent.ascaleY
+	local csx = child.ascaleX
 	local os1 = 0
 	local os2 = 0
 	local s2 = 0
@@ -129,7 +131,7 @@ function IkConstraint:apply2 (parent, child, targetX, targetY, bendDir, alpha)
 	else
 		os2 = 0
 	end
-	local cx = child.x
+	local cx = child.ax
 	local cy = 0
 	local cwx = 0
 	local cwy = 0
@@ -143,7 +145,7 @@ function IkConstraint:apply2 (parent, child, targetX, targetY, bendDir, alpha)
 		cwx = a * cx + parent.worldX
 		cwy = c * cx + parent.worldY
 	else
-		cy = child.y
+		cy = child.ay
 		cwx = a * cx + b * cy + parent.worldX
 		cwy = c * cx + d * cy + parent.worldY
 	end
@@ -254,22 +256,22 @@ function IkConstraint:apply2 (parent, child, targetX, targetY, bendDir, alpha)
 		end
 	end
 	local os = math_atan2(cy, cx) * s2
-	local rotation = parent.rotation
+	local rotation = parent.arotation
 	a1 = math_deg(a1 - os) + os1 - rotation
 	if a1 > 180 then
 		a1 = a1 - 360
 	elseif a1 < -180 then
 		a1 = a1 + 360
 	end
-	parent:updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.scaleX, parent.scaleY, 0, 0)
+	parent:updateWorldTransformWith(px, py, rotation + a1 * alpha, parent.ascaleX, parent.ascaleY, 0, 0)
 	rotation = child.rotation
-	a2 = (math_deg(a2 + os) - child.shearX) * s2 + os2 - rotation
+	a2 = (math_deg(a2 + os) - child.ashearX) * s2 + os2 - rotation
 	if a2 > 180 then
 		a2 = a2 - 360
 	elseif a2 < -180 then
 		a2 = a2 + 360
 	end
-	child:updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.scaleX, child.scaleY, child.shearX, child.shearY);
+	child:updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);
 end
 
 return IkConstraint

+ 1 - 0
spine-lua/IkConstraintData.lua

@@ -34,6 +34,7 @@ function IkConstraintData.new (name)
 
 	local self = {
 		name = name,
+		order = 0,
 		bones = {},
 		target = nil,
 		bendDirection = 1,

+ 4 - 6
spine-lua/PathConstraint.lua

@@ -134,9 +134,6 @@ function PathConstraint:update ()
 	end
 
 	local positions = self:computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == PathConstraintData.PositionMode.percent, spacingMode == PathConstraintData.SpacingMode.percent)
-	local skeleton = self.target.bone.skeleton
-	local skeletonX = skeleton.x
-	local skeletonY = skeleton.y
 	local boneX = positions[1]
 	local boneY = positions[2]
 	local offsetRotation = data.offsetRotation
@@ -145,8 +142,8 @@ function PathConstraint:update ()
 	local p = 3
 	while i < boneCount do
 		local bone = bones[i + 1]
-		bone.worldX = bone.worldX + (boneX - skeletonX - bone.worldX) * translateMix
-		bone.worldY = bone.worldY + (boneY - skeletonY - bone.worldY) * translateMix
+		bone.worldX = bone.worldX + (boneX - bone.worldX) * translateMix
+		bone.worldY = bone.worldY + (boneY - bone.worldY) * translateMix
 		local x = positions[p + 1]
 		local y = positions[p + 2]
 		local dx = x - boneX
@@ -197,6 +194,7 @@ function PathConstraint:update ()
 			bone.c = sin * a + cos * c
 			bone.d = sin * b + cos * d
 		end
+		bone.appliedValid = false
 		i = i + 1
 		p = p + 3
 	end
@@ -496,7 +494,7 @@ function PathConstraint:addAfterPosition(p, temp, i, out, o)
 end
 
 function PathConstraint:addCurvePosition(p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents)
-	if p == 0 then p = 0.0001 end
+	if p == 0 or (p ~= p) then p = 0.0001 end
 	local tt = p * p
 	local ttt = tt * p
 	local u = 1 - p

+ 1 - 0
spine-lua/PathConstraintData.lua

@@ -34,6 +34,7 @@ function PathConstraintData.new (name)
 
 	local self = {
 		name = name,
+		order = 0,
 		bones = {},
 		target = nil,
 		positionMode = nil,

+ 130 - 88
spine-lua/Skeleton.lua

@@ -53,10 +53,11 @@ function Skeleton.new (data)
 		slots = {},
 		slotsByName = {},
 		drawOrder = {},
-		ikConstraints = {}, ikConstaintsSorted = {},
+		ikConstraints = {},
 		transformConstraints = {},
 		pathConstraints = {},
 		_updateCache = {},
+		updateCacheReset = {},
 		skin = nil,
 		color = Color.newWith(1, 1, 1, 1),
 		time = 0,
@@ -113,106 +114,135 @@ function Skeleton:updateCache ()
 		bone.sorted = false
 	end
 
-	local ikConstraints = {}
-	self.ikConstraintsSorted = ikConstraints
-	for i, constraint in ipairs(self.ikConstraints) do
-		table_insert(ikConstraints, constraint)
-	end
-
-	local level = 0
-	for i, ik in ipairs(ikConstraints) do
-		local bone = ik.bones[1].parent
-		level = 0
-		while bone do
-			bone = bone.parent
-			level = level + 1
-		end
-		ik.level = level
-	end
-
-	local i = 1
+	local ikConstraints = self.ikConstraints
+	local transformConstraints = self.transformConstraints
+	local pathConstraints = self.pathConstraints
 	local ikCount = #ikConstraints
-	while i < ikCount do
-		local ik = ikConstraints[i + 1]
-		local level = ik.level
-		local ii = i - 1
-		while ii >= 0 do
-			local other = ikConstraints[ii + 1]
-			if other.level < level then break end
-			ikConstraints[ii + 1 + 1] = other
-			ii = ii - 1
+	local transformCount = #transformConstraints
+	local pathCount = #pathConstraints
+	local constraintCount = ikCount + transformCount + pathCount
+	
+	local i = 0
+	while i < constraintCount do
+		local found = false
+		local ii = 1
+		while ii <= ikCount do
+			local constraint = ikConstraints[ii]
+			if constraint.data.order == i then
+				self:sortIkConstraint(constraint)
+				found = true
+				break
+			end
+			ii = ii + 1
+		end
+		
+		if not found then
+			ii = 1
+			while ii <= transformCount do
+				local constraint = transformConstraints[ii]
+				if constraint.data.order == i then
+					self:sortTransformConstraint(constraint)
+					found = true
+					break
+				end
+				ii = ii + 1
+			end
 		end
-		ikConstraints[ii + 1 + 1] = ik
+		
+		if not found then
+			ii = 1
+			while ii <= pathCount do
+				local constraint = pathConstraints[ii]
+				if constraint.data.order == i then
+					self:sortPathConstraint(constraint)
+					break
+				end
+				ii = ii + 1
+			end
+		end
+		
 		i = i + 1
 	end
-
-	for i, constraint in ipairs(ikConstraints) do
-		local target = constraint.target
-		self:sortBone(target)
-
-		local constrained = constraint.bones
-		local parent = constrained[1]
-		self:sortBone(parent)
-
-		table_insert(updateCache, constraint)
-
-		self:sortReset(parent.children)
-		constrained[#constrained].sorted = true
+	
+	for i, bone in ipairs(self.bones) do
+		self:sortBone(bone)
 	end
+end
 
-	-- path constraints
-	local pathConstraints = self.pathConstraints
-	for i,constraint in ipairs(pathConstraints) do
-		local slot = constraint.target
-		local slotIndex = slot.data.index
-		local slotBone = slot.bone
-		if self.skin then self:sortPathConstraintAttachment(self.skin, slotIndex, slotBone) end
-		if self.data.defaultSkin and self.data.defaultSkin ~= self.skin then self:sortPathConstraintAttachment(self.data.defaultSkin, slotIndex, slotBone) end
-		for i,skin in ipairs(self.data.skins) do
-			self:sortPathConstraintAttachment(skin, slotIndex, slotBone)
-		end
-
-		local attachment = slot.attachment
-		if attachment.type == AttachmentType.path then self:sortPathConstraintAttachmentWith(attachment, slotBone) end
-
-		local constrained = constraint.bones
-		for i,c in ipairs(constrained) do
-			self:sortBone(c)
-		end
-
-		table_insert(updateCache, constraint)
-
-		for i,c in ipairs(constrained) do
-			self:sortReset(c.children)
-		end
-		for i,c in ipairs(constrained) do
-			c.sorted = true
+function Skeleton:sortIkConstraint (constraint)
+	local target = constraint.target
+	self:sortBone(target)
+	
+	local constrained = constraint.bones
+	local parent = constrained[1]
+	self:sortBone(parent)
+	
+	if #constrained > 1 then
+		local child = constrained[#constrained]
+		local contains = false
+		for i,updatable in ipairs(self._updateCache) do
+			if updatable == child then
+				contains = true
+				break
+			end
 		end
+		if not contains then table_insert(self.updateCacheReset, child) end
 	end
+	
+	table_insert(self._updateCache, constraint)
+	
+	self:sortReset(parent.children)
+	constrained[#constrained].sorted = true
+end
 
-	-- transform constraints
-	local transformConstraints = self.transformConstraints
-	for i, constraint in ipairs(transformConstraints) do
-		self:sortBone(constraint.target)
-
-		local constrained = constraint.bones
-		for i,c in ipairs(constrained) do
-			self:sortBone(c)
-		end
-
-		table_insert(updateCache, constraint)
-
-		for i,c in ipairs(constrained) do
-			self:sortReset(c.children)
-		end
-		for i,c in ipairs(constrained) do
-			c.sorted = true
-		end
+function Skeleton:sortPathConstraint(constraint)
+	local slot = constraint.target
+	local slotIndex = slot.data.index
+	local slotBone = slot.bone
+	if self.skin then self:sortPathConstraintAttachment(skin, slotIndex, slotBone) end
+	if self.data.defaultSkin and not (self.data.defaultSkin == skin) then
+		self:sortPathConstraintAttachment(self.data.defaultSkin, slotIndex, slotBone)
+	end
+	for ii,skin in ipairs(self.data.skins) do
+		self:sortPathConstraintAttachment(skin, slotIndex, slotBone)
+	end
+	
+	local attachment = slot.attachment
+	if attachment.type == AttachmentType.path then self:sortPathConstraintAttachmentWith(attachment, slotBone) end
+	
+	local constrained = constraint.bones
+	for ii,bone in ipairs(constrained) do
+		self:sortBone(bone)
+	end
+	
+	table_insert(self._updateCache, constraint)
+	
+	for i,bone in ipairs(constrained) do
+		self:sortReset(bone.children)
 	end
+	
+	for i,bone in ipairs(constrained) do
+		bone.sorted = true
+	end
+end
 
-	for i, bone in ipairs(self.bones) do
+function Skeleton:sortTransformConstraint(constraint)
+	self:sortBone(constraint.target)
+	
+	local constrained = constraint.bones
+	for ii,bone in ipairs(constrained) do
 		self:sortBone(bone)
 	end
+	
+	table_insert(self._updateCache, constraint)
+	
+	for i,bone in ipairs(constrained) do
+		self:sortReset(bone.children)
+	end
+	
+	for i,bone in ipairs(constrained) do
+		bone.sorted = true
+	end
 end
 
 function Skeleton:sortPathConstraintAttachment(skin, slotIndex, slotBone)
@@ -261,6 +291,18 @@ end
 
 -- Updates the world transform for each bone and applies IK constraints.
 function Skeleton:updateWorldTransform ()
+	local updateCacheReset = self.updateCacheReset
+	for i,bone in ipairs(updateCacheReset) do
+		bone.ax = bone.x
+		bone.ay = bone.y
+		bone.arotation = bone.rotation
+		bone.ascaleX = bone.scaleX
+		bone.ascaleY = bone.scaleY
+		bone.ashearX = bone.shearX
+		bone.ashearY = bone.shearY
+		bone.appliedValid = true
+	end
+	
 	local updateCache = self._updateCache
 	for i, updatable in ipairs(updateCache) do
 		updatable:update()

+ 6 - 2
spine-lua/SkeletonJson.lua

@@ -45,6 +45,7 @@ local EventData = require "spine-lua.EventData"
 local Event = require "spine-lua.Event"
 local AttachmentType = require "spine-lua.attachments.AttachmentType"
 local BlendMode = require "spine-lua.BlendMode"
+local TransformMode = require "spine-lua.TransformMode"
 local utils = require "spine-lua.utils"
 
 local SkeletonJson = {}
@@ -84,6 +85,7 @@ function SkeletonJson.new (attachmentLoader)
 			skeletonData.version = skeletonMap["spine"]
 			skeletonData.width = skeletonMap["width"]
 			skeletonData.height = skeletonMap["height"]
+			skeletonData.fps = skeletonMap["fps"]
 			skeletonData.imagesPath = skeletonMap["images"]
 		end
 
@@ -106,8 +108,7 @@ function SkeletonJson.new (attachmentLoader)
 			data.scaleY = getValue(boneMap, "scaleY", 1);
 			data.shearX = getValue(boneMap, "shearX", 0);
 			data.shearY = getValue(boneMap, "shearY", 0);
-			data.inheritRotation = getValue(boneMap, "inheritRotation", true);
-			data.inheritScale = getValue(boneMap, "inheritScale", true);
+			data.transformMode = TransformMode[getValue(boneMap, "transform", "normal")]
 
 			table_insert(skeletonData.bones, data)
 		end
@@ -142,6 +143,7 @@ function SkeletonJson.new (attachmentLoader)
 		if root["ik"] then
 			for i,constraintMap in ipairs(root["ik"]) do
 				local data = IkConstraintData.new(constraintMap["name"])
+				data.order = getValue(constraintMap, "order", 0)
 
 				for i,boneName in ipairs(constraintMap["bones"]) do
 					local bone = skeletonData:findBone(boneName)
@@ -164,6 +166,7 @@ function SkeletonJson.new (attachmentLoader)
 		if root["transform"] then
 			for i,constraintMap in ipairs(root["transform"]) do
 				data = TransformConstraintData.new(constraintMap.name)
+				data.order = getValue(constraintMap, "order", 0)
 
 				for i,boneName in ipairs(constraintMap.bones) do
 					local bone = skeletonData:findBone(boneName)
@@ -195,6 +198,7 @@ function SkeletonJson.new (attachmentLoader)
 		if root["path"] then
 			for i,constraintMap in ipairs(root.path) do
 				local data = PathConstraintData.new(constraintMap.name);
+				data.order = getValue(constraintMap, "order", 0)
 
 				for i,boneName in ipairs(constraintMap.bones) do
 					local bone = skeletonData:findBone(boneName)

+ 9 - 2
spine-lua/TransformConstraint.lua

@@ -81,7 +81,8 @@ function TransformConstraint:update ()
 	local td = target.d
 	local bones = self.bones
 	for i, bone in ipairs(bones) do
-		if rotateMix > 0 then
+		local modified = false
+		if rotateMix ~= 0 then
 			local a = bone.a
 			local b = bone.b
 			local c = bone.c
@@ -99,15 +100,17 @@ function TransformConstraint:update ()
 			bone.b = cos * b - sin * d
 			bone.c = sin * a + cos * c
 			bone.d = sin * b + cos * d
+			modified = true
 		end
 
-		if translateMix > 0 then
+		if translateMix ~= 0 then
 			local temp = self.temp
 			temp[1] = self.data.offsetX
 			temp[2] = self.data.offsetY
 			target:localToWorld(temp)
 			bone.worldX = bone.worldX + (temp[1] - bone.worldX) * translateMix
 			bone.worldY = bone.worldY + (temp[2] - bone.worldY) * translateMix
+			modified = true
 		end
 
 		if scaleMix > 0 then
@@ -127,6 +130,7 @@ function TransformConstraint:update ()
 			end
 			bone.b = bone.b * s
 			bone.d = bone.d * s
+			modified = true
 		end
 
 		if shearMix > 0 then
@@ -143,7 +147,10 @@ function TransformConstraint:update ()
 			local s = math_sqrt(b * b + d * d)
 			bone.b = math_cos(r) * s
 			bone.d = math_sin(r) * s
+			modified = true
 		end
+		
+		if modified then bone.appliedValid = false end
 	end
 end
 

+ 1 - 0
spine-lua/TransformConstraintData.lua

@@ -34,6 +34,7 @@ function TransformConstraintData.new (name)
 
 	local self = {
 		name = name,
+		order = 0,
 		bones = {},
 		target = nil,
 		rotateMix = 0, translateMix = 0, scaleMix = 0, shearMix = 0,

+ 38 - 0
spine-lua/TransformMode.lua

@@ -0,0 +1,38 @@
+-------------------------------------------------------------------------------
+-- Spine Runtimes Software License v2.5
+--
+-- Copyright (c) 2013-2016, Esoteric Software
+-- All rights reserved.
+--
+-- You are granted a perpetual, non-exclusive, non-sublicensable, and
+-- non-transferable license to use, install, execute, and perform the Spine
+-- Runtimes software and derivative works solely for personal or internal
+-- use. Without the written permission of Esoteric Software (see Section 2 of
+-- the Spine Software License Agreement), you may not (a) modify, translate,
+-- adapt, or develop new applications using the Spine Runtimes or otherwise
+-- create derivative works or improvements of the Spine Runtimes or (b) remove,
+-- delete, alter, or obscure any trademarks or any copyright, trademark, patent,
+-- or other intellectual property or proprietary rights notices on or in the
+-- Software, including any copy thereof. Redistributions in binary or source
+-- form must include this license and terms.
+--
+-- THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "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 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 THIS SOFTWARE, EVEN IF ADVISED OF THE
+-- POSSIBILITY OF SUCH DAMAGE.
+-------------------------------------------------------------------------------
+
+local TransformMode = {
+	normal = 0,
+	onlyTranslation = 1,
+	noRotationOrReflection = 2,
+	noScale = 3,
+	noScaleOrReflection = 4
+}
+return TransformMode

+ 6 - 8
spine-lua/attachments/MeshAttachment.lua

@@ -115,8 +115,6 @@ function MeshAttachment:updateWorldVertices(slot, premultipliedAlpha)
 		skeletonColor.b * slotColor.b * meshColor.b * multiplier,
 		alpha)
 
-	local x = skeleton.x
-	local y = skeleton.y
 	local deformArray = slot.attachmentVertices
 	local vertices = self.vertices
 	local worldVertices = self.worldVertices
@@ -125,8 +123,8 @@ function MeshAttachment:updateWorldVertices(slot, premultipliedAlpha)
 		local verticesLength = #vertices
 		if #deformArray > 0 then vertices = deformArray end
 		local bone = slot.bone;
-		x = x + bone.worldX
-		y = y + bone.worldY
+		local x = bone.worldX
+		local y = bone.worldY
 		local a = bone.a
 		local b = bone.b
 		local c = bone.c
@@ -155,8 +153,8 @@ function MeshAttachment:updateWorldVertices(slot, premultipliedAlpha)
 		local b = 0
 		local n = #bones
 		while v < n do
-			local wx = x
-			local wy = y
+			local wx = 0
+			local wy = 0
 			local nn = bones[v + 1];
 			v = v + 1
 			nn = nn + v
@@ -186,8 +184,8 @@ function MeshAttachment:updateWorldVertices(slot, premultipliedAlpha)
 		local f = 0
 		local n = #bones
 		while v < n do
-			local wx = x
-			local wy = y
+			local wx = 0
+			local wy = 0
 			local nn = bones[v + 1]
 			v = v + 1
 			nn = nn + v

+ 2 - 2
spine-lua/attachments/RegionAttachment.lua

@@ -179,8 +179,8 @@ function RegionAttachment:updateWorldVertices (slot, premultipliedAlpha)
 	local vertices = self.vertices
 	local offset = self.offset
 	local bone = slot.bone
-	local x = skeleton.x + bone.worldX
-	local y = skeleton.y + bone.worldY
+	local x = bone.worldX
+	local y = bone.worldY
 	local a = bone.a
 	local b = bone.b
 	local c = bone.c

+ 6 - 8
spine-lua/attachments/VertexAttachment.lua

@@ -57,16 +57,14 @@ end
 function VertexAttachment:computeWorldVerticesWith (slot, start, count, worldVertices, offset)
 	count = count + offset
 	local skeleton = slot.bone.skeleton
-	local x = skeleton.x
-	local y = skeleton.y
 	local deformArray = slot.attachmentVertices
 	local vertices = self.vertices
 	local bones = self.bones
 	if not bones then
 		if #deformArray > 0 then vertices = deformArray end
 		local bone = slot.bone
-		x = x + bone.worldX
-		y = y + bone.worldY
+		x = bone.worldX
+		y = bone.worldY
 		local a = bone.a
 		local b = bone.b
 		local c = bone.c
@@ -97,8 +95,8 @@ function VertexAttachment:computeWorldVerticesWith (slot, start, count, worldVer
 		local w = offset
 		local b = skip * 3
 		while w < count do
-			local wx = x
-			local wy = y
+			local wx = 0
+			local wy = 0
 			local n = bones[v + 1]
 			v = v + 1
 			n = n + v
@@ -122,8 +120,8 @@ function VertexAttachment:computeWorldVerticesWith (slot, start, count, worldVer
 		local b = skip * 3
 		local f = skip * 2
 		while w < count do
-			local wx = x
-			local wy = y
+			local wx = 0
+			local wy = 0
 			local n = bones[v + 1]
 			v = v + 1
 			n = n + v

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно