diff --git a/Cargo.toml b/Cargo.toml index f199d93..613b477 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license-file = "LICENSE" exclude = ["assets/*"] [dependencies] -rusty_spine = "0.7" +rusty_spine = "0.8" bevy = { version = "0.13", default-features = false, features = [ "bevy_render", "bevy_asset", diff --git a/assets/spineboy/export/spineboy-ess.json b/assets/spineboy/export/spineboy-ess.json index 4ddc835..99ce21b 100644 --- a/assets/spineboy/export/spineboy-ess.json +++ b/assets/spineboy/export/spineboy-ess.json @@ -1,7 +1,7 @@ { "skeleton": { - "hash": "SmUDxzck41o", - "spine": "4.1.23-beta", + "hash": "TC0RU1zEc1o", + "spine": "4.2.64-beta", "x": -221.27, "y": -8.57, "width": 470.72, diff --git a/assets/spineboy/export/spineboy-ess.skel b/assets/spineboy/export/spineboy-ess.skel index 90e15ec..c37a0bf 100644 Binary files a/assets/spineboy/export/spineboy-ess.skel and b/assets/spineboy/export/spineboy-ess.skel differ diff --git a/assets/spineboy/export/spineboy-pma.atlas b/assets/spineboy/export/spineboy-pma.atlas index 9c8bd8e..ad3d77b 100644 --- a/assets/spineboy/export/spineboy-pma.atlas +++ b/assets/spineboy/export/spineboy-pma.atlas @@ -4,99 +4,92 @@ spineboy-pma.png pma: true scale: 0.5 crosshair - bounds: 813, 160, 45, 45 + bounds: 352, 7, 45, 45 eye-indifferent - bounds: 569, 2, 47, 45 + bounds: 862, 105, 47, 45 eye-surprised - bounds: 643, 7, 47, 45 - rotate: 90 + bounds: 505, 79, 47, 45 front-bracer - bounds: 811, 51, 29, 40 + bounds: 826, 66, 29, 40 front-fist-closed - bounds: 807, 93, 38, 41 + bounds: 786, 65, 38, 41 front-fist-open - bounds: 815, 210, 43, 44 -front-foot - bounds: 706, 64, 63, 35 + bounds: 710, 51, 43, 44 rotate: 90 +front-foot + bounds: 210, 6, 63, 35 front-shin - bounds: 80, 11, 41, 92 + bounds: 665, 128, 41, 92 + rotate: 90 front-thigh - bounds: 754, 12, 23, 56 + bounds: 2, 2, 23, 56 + rotate: 90 front-upper-arm - bounds: 618, 5, 23, 49 + bounds: 250, 205, 23, 49 goggles - bounds: 214, 20, 131, 83 + bounds: 665, 171, 131, 83 gun - bounds: 347, 14, 105, 102 - rotate: 90 + bounds: 798, 152, 105, 102 head - bounds: 80, 105, 136, 149 + bounds: 2, 27, 136, 149 hoverboard-board - bounds: 2, 8, 246, 76 - rotate: 90 + bounds: 2, 178, 246, 76 hoverboard-thruster - bounds: 478, 2, 30, 32 -hoverglow-small - bounds: 218, 117, 137, 38 + bounds: 722, 96, 30, 32 rotate: 90 +hoverglow-small + bounds: 275, 81, 137, 38 mouth-grind - bounds: 775, 80, 47, 30 - rotate: 90 + bounds: 614, 97, 47, 30 mouth-oooo - bounds: 779, 31, 47, 30 - rotate: 90 + bounds: 612, 65, 47, 30 mouth-smile - bounds: 783, 207, 47, 30 - rotate: 90 + bounds: 661, 64, 47, 30 muzzle-glow - bounds: 779, 4, 25, 25 + bounds: 382, 54, 25, 25 muzzle-ring - bounds: 451, 14, 25, 105 + bounds: 275, 54, 25, 105 + rotate: 90 muzzle01 - bounds: 664, 60, 67, 40 + bounds: 911, 95, 67, 40 rotate: 90 muzzle02 - bounds: 580, 56, 68, 42 - rotate: 90 + bounds: 792, 108, 68, 42 muzzle03 - bounds: 478, 36, 83, 53 + bounds: 956, 171, 83, 53 rotate: 90 muzzle04 - bounds: 533, 49, 75, 45 - rotate: 90 + bounds: 275, 7, 75, 45 muzzle05 - bounds: 624, 56, 68, 38 - rotate: 90 + bounds: 140, 3, 68, 38 neck - bounds: 806, 8, 18, 21 + bounds: 250, 182, 18, 21 portal-bg - bounds: 258, 121, 133, 133 + bounds: 140, 43, 133, 133 portal-flare1 - bounds: 690, 2, 56, 30 - rotate: 90 + bounds: 554, 65, 56, 30 portal-flare2 - bounds: 510, 3, 57, 31 -portal-flare3 - bounds: 722, 4, 58, 30 + bounds: 759, 112, 57, 31 rotate: 90 +portal-flare3 + bounds: 554, 97, 58, 30 portal-shade - bounds: 393, 121, 133, 133 + bounds: 275, 121, 133, 133 portal-streaks1 - bounds: 528, 126, 126, 128 + bounds: 410, 126, 126, 128 portal-streaks2 - bounds: 656, 129, 125, 125 + bounds: 538, 129, 125, 125 rear-bracer - bounds: 826, 13, 28, 36 + bounds: 857, 67, 28, 36 rear-foot - bounds: 743, 70, 57, 30 - rotate: 90 + bounds: 663, 96, 57, 30 rear-shin - bounds: 174, 14, 38, 89 + bounds: 414, 86, 38, 89 + rotate: 90 rear-thigh - bounds: 783, 158, 28, 47 + bounds: 756, 63, 28, 47 rear-upper-arm - bounds: 783, 136, 20, 44 + bounds: 60, 5, 20, 44 rotate: 90 torso - bounds: 123, 13, 49, 90 + bounds: 905, 164, 49, 90 diff --git a/assets/spineboy/export/spineboy-pma.png b/assets/spineboy/export/spineboy-pma.png index b78b76f..711fd83 100644 Binary files a/assets/spineboy/export/spineboy-pma.png and b/assets/spineboy/export/spineboy-pma.png differ diff --git a/assets/spineboy/export/spineboy-pro.json b/assets/spineboy/export/spineboy-pro.json index b4dd8b4..b253b9f 100644 --- a/assets/spineboy/export/spineboy-pro.json +++ b/assets/spineboy/export/spineboy-pro.json @@ -1,7 +1,7 @@ { "skeleton": { - "hash": "itfFESDjM1c", - "spine": "4.1.23-beta", + "hash": "pvgSVWzpY9U", + "spine": "4.2.64-beta", "x": -188.63, "y": -7.94, "width": 418.45, @@ -12,7 +12,7 @@ "bones": [ { "name": "root", "rotation": 0.05 }, { "name": "hip", "parent": "root", "y": 247.27 }, - { "name": "crosshair", "parent": "root", "x": 302.83, "y": 569.45, "color": "ff3f00ff" }, + { "name": "crosshair", "parent": "root", "x": 302.83, "y": 569.45, "color": "ff3f00ff", "icon": "circle" }, { "name": "aim-constraint-target", "parent": "hip", @@ -22,8 +22,8 @@ "y": 5.62, "color": "abe323ff" }, - { "name": "rear-foot-target", "parent": "root", "x": 61.91, "y": 0.42, "color": "ff3f00ff" }, - { "name": "rear-leg-target", "parent": "rear-foot-target", "x": -33.91, "y": 37.34, "color": "ff3f00ff" }, + { "name": "rear-foot-target", "parent": "root", "x": 61.91, "y": 0.42, "color": "ff3f00ff", "icon": "ik" }, + { "name": "rear-leg-target", "parent": "rear-foot-target", "x": -33.91, "y": 37.34, "color": "ff3f00ff", "icon": "ik" }, { "name": "rear-thigh", "parent": "hip", @@ -58,12 +58,20 @@ "rotation": -0.85, "x": 51.17, "y": 0.24, - "transform": "noRotationOrReflection", + "inherit": "noRotationOrReflection", "color": "ff000dff" }, - { "name": "board-ik", "parent": "root", "x": -131.78, "y": 69.09, "color": "4c56ffff" }, + { "name": "board-ik", "parent": "root", "x": -131.78, "y": 69.09, "color": "4c56ffff", "icon": "arrows" }, { "name": "clipping", "parent": "root" }, - { "name": "hoverboard-controller", "parent": "root", "rotation": -0.28, "x": -329.69, "y": 69.82, "color": "ff0004ff" }, + { + "name": "hoverboard-controller", + "parent": "root", + "rotation": -0.28, + "x": -329.69, + "y": 69.82, + "color": "ff0004ff", + "icon": "arrowsB" + }, { "name": "exhaust1", "parent": "hoverboard-controller", "rotation": 3.02, "x": -249.68, "y": 53.39 }, { "name": "exhaust2", "parent": "hoverboard-controller", "rotation": 26.34, "x": -191.6, "y": -22.92 }, { @@ -76,16 +84,16 @@ "scaleY": 0.7847 }, { "name": "portal-root", "parent": "root", "x": 12.9, "y": 328.54, "scaleX": 2.0334, "scaleY": 2.0334 }, - { "name": "flare1", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare10", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare2", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare3", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare4", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare5", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare6", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare7", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare8", "parent": "portal-root", "x": -6.34, "y": -161.57 }, - { "name": "flare9", "parent": "portal-root", "x": -6.34, "y": -161.57 }, + { "name": "flare1", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare10", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare2", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare3", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare4", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare5", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare6", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare7", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare8", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, + { "name": "flare9", "parent": "portal-root", "x": -6.34, "y": -161.57, "icon": "particles" }, { "name": "torso", "parent": "hip", @@ -117,8 +125,8 @@ "y": 0.2, "color": "00ff04ff" }, - { "name": "front-foot-target", "parent": "root", "x": -13.53, "y": 0.04, "color": "ff3f00ff" }, - { "name": "front-leg-target", "parent": "front-foot-target", "x": -28.4, "y": 29.06, "color": "ff3f00ff" }, + { "name": "front-foot-target", "parent": "root", "x": -13.53, "y": 0.04, "color": "ff3f00ff", "icon": "ik" }, + { "name": "front-leg-target", "parent": "front-foot-target", "x": -28.4, "y": 29.06, "color": "ff3f00ff", "icon": "ik" }, { "name": "front-thigh", "parent": "hip", @@ -153,7 +161,7 @@ "rotation": -1.68, "x": 41.42, "y": -0.09, - "transform": "noRotationOrReflection", + "inherit": "noRotationOrReflection", "color": "00ff04ff" }, { "name": "back-shoulder", "parent": "torso3", "rotation": -104.11, "x": 7.32, "y": -19.22, "color": "ff000dff" }, @@ -223,11 +231,19 @@ "y": -0.04, "color": "e0da19ff" }, - { "name": "hoverboard-thruster-front", "parent": "hoverboard-controller", "rotation": -29.2, "x": 95.77, "y": -2.99, "transform": "noRotationOrReflection" }, - { "name": "hoverboard-thruster-rear", "parent": "hoverboard-controller", "rotation": -29.2, "x": -76.47, "y": -4.88, "transform": "noRotationOrReflection" }, + { "name": "hoverboard-thruster-front", "parent": "hoverboard-controller", "rotation": -29.2, "x": 95.77, "y": -2.99, "inherit": "noRotationOrReflection" }, + { "name": "hoverboard-thruster-rear", "parent": "hoverboard-controller", "rotation": -29.2, "x": -76.47, "y": -4.88, "inherit": "noRotationOrReflection" }, { "name": "hoverglow-front", "parent": "hoverboard-thruster-front", "rotation": 0.17, "x": -1.78, "y": -37.79 }, { "name": "hoverglow-rear", "parent": "hoverboard-thruster-rear", "rotation": 0.17, "x": 1.06, "y": -35.66 }, - { "name": "muzzle", "parent": "rear-bracer", "rotation": 3.06, "x": 242.34, "y": 34.26, "color": "ffb900ff" }, + { + "name": "muzzle", + "parent": "rear-bracer", + "rotation": 3.06, + "x": 242.34, + "y": 34.26, + "color": "ffb900ff", + "icon": "muzzleFlash" + }, { "name": "muzzle-ring", "parent": "muzzle", "color": "ffb900ff" }, { "name": "muzzle-ring2", "parent": "muzzle", "color": "ffb900ff" }, { "name": "muzzle-ring3", "parent": "muzzle", "color": "ffb900ff" }, @@ -246,7 +262,7 @@ "scaleY": 0.738, "color": "000effff" }, - { "name": "head-control", "parent": "head", "x": 110.21, "color": "00a220ff" } + { "name": "head-control", "parent": "head", "x": 110.21, "color": "00a220ff", "icon": "arrows" } ], "slots": [ { "name": "portal-bg", "bone": "portal" }, diff --git a/assets/spineboy/export/spineboy-pro.skel b/assets/spineboy/export/spineboy-pro.skel index 199839b..4dfe536 100644 Binary files a/assets/spineboy/export/spineboy-pro.skel and b/assets/spineboy/export/spineboy-pro.skel differ diff --git a/assets/spineboy/export/spineboy-run.atlas b/assets/spineboy/export/spineboy-run.atlas index ce32001..7c0a3b9 100644 --- a/assets/spineboy/export/spineboy-run.atlas +++ b/assets/spineboy/export/spineboy-run.atlas @@ -1,60 +1,50 @@ spineboy-run.png - size: 1181, 687 + size: 1177, 685 filter: Linear, Linear pma: true spineboy-pro-run index: 8 - bounds: 2, 371, 303, 314 - offsets: 11, 22, 316, 341 - origin: 142, 3 + bounds: 2, 369, 302, 314 + offsets: 12, 22, 316, 341 spineboy-pro-run index: 9 - bounds: 2, 44, 278, 325 + bounds: 2, 42, 278, 325 offsets: 30, 2, 316, 341 - origin: 142, 3 spineboy-pro-run index: 0 - bounds: 307, 439, 246, 320 + bounds: 306, 438, 245, 320 offsets: 67, 1, 316, 341 rotate: 90 - origin: 142, 3 spineboy-pro-run index: 3 - bounds: 629, 443, 242, 320 - offsets: 12, 20, 316, 341 + bounds: 628, 441, 242, 319 + offsets: 12, 21, 316, 341 rotate: 90 - origin: 142, 3 spineboy-pro-run - index: 7 - bounds: 951, 389, 228, 296 - offsets: 36, 33, 316, 341 - origin: 142, 3 + index: 2 + bounds: 949, 377, 226, 306 + offsets: 34, 26, 316, 341 spineboy-pro-run index: 4 - bounds: 307, 195, 242, 320 - offsets: 2, 4, 316, 341 + bounds: 306, 196, 240, 319 + offsets: 3, 5, 316, 341 rotate: 90 - origin: 142, 3 spineboy-pro-run - index: 5 - bounds: 629, 200, 241, 316 - offsets: 8, 3, 316, 341 + index: 1 + bounds: 282, 2, 192, 318 + offsets: 69, 3, 316, 341 rotate: 90 - origin: 142, 3 spineboy-pro-run - index: 1 - bounds: 282, 2, 191, 318 - offsets: 70, 3, 316, 341 + index: 5 + bounds: 628, 198, 241, 316 + offsets: 8, 3, 316, 341 rotate: 90 - origin: 142, 3 spineboy-pro-run - index: 2 - bounds: 947, 81, 226, 306 - offsets: 34, 26, 316, 341 - origin: 142, 3 + index: 7 + bounds: 946, 79, 226, 296 + offsets: 37, 33, 316, 341 spineboy-pro-run index: 6 - bounds: 629, 4, 194, 316 - offsets: 68, 4, 316, 341 + bounds: 627, 2, 194, 315 + offsets: 68, 5, 316, 341 rotate: 90 - origin: 142, 3 diff --git a/assets/spineboy/export/spineboy-run.png b/assets/spineboy/export/spineboy-run.png index e28e0c6..340874d 100644 Binary files a/assets/spineboy/export/spineboy-run.png and b/assets/spineboy/export/spineboy-run.png differ diff --git a/assets/spineboy/export/spineboy.atlas b/assets/spineboy/export/spineboy.atlas index b07ccc3..eca542b 100644 --- a/assets/spineboy/export/spineboy.atlas +++ b/assets/spineboy/export/spineboy.atlas @@ -3,99 +3,92 @@ spineboy.png filter: Linear, Linear scale: 0.5 crosshair - bounds: 813, 160, 45, 45 + bounds: 352, 7, 45, 45 eye-indifferent - bounds: 569, 2, 47, 45 + bounds: 862, 105, 47, 45 eye-surprised - bounds: 643, 7, 47, 45 - rotate: 90 + bounds: 505, 79, 47, 45 front-bracer - bounds: 811, 51, 29, 40 + bounds: 826, 66, 29, 40 front-fist-closed - bounds: 807, 93, 38, 41 + bounds: 786, 65, 38, 41 front-fist-open - bounds: 815, 210, 43, 44 -front-foot - bounds: 706, 64, 63, 35 + bounds: 710, 51, 43, 44 rotate: 90 +front-foot + bounds: 210, 6, 63, 35 front-shin - bounds: 80, 11, 41, 92 + bounds: 665, 128, 41, 92 + rotate: 90 front-thigh - bounds: 754, 12, 23, 56 + bounds: 2, 2, 23, 56 + rotate: 90 front-upper-arm - bounds: 618, 5, 23, 49 + bounds: 250, 205, 23, 49 goggles - bounds: 214, 20, 131, 83 + bounds: 665, 171, 131, 83 gun - bounds: 347, 14, 105, 102 - rotate: 90 + bounds: 798, 152, 105, 102 head - bounds: 80, 105, 136, 149 + bounds: 2, 27, 136, 149 hoverboard-board - bounds: 2, 8, 246, 76 - rotate: 90 + bounds: 2, 178, 246, 76 hoverboard-thruster - bounds: 478, 2, 30, 32 -hoverglow-small - bounds: 218, 117, 137, 38 + bounds: 722, 96, 30, 32 rotate: 90 +hoverglow-small + bounds: 275, 81, 137, 38 mouth-grind - bounds: 775, 80, 47, 30 - rotate: 90 + bounds: 614, 97, 47, 30 mouth-oooo - bounds: 779, 31, 47, 30 - rotate: 90 + bounds: 612, 65, 47, 30 mouth-smile - bounds: 783, 207, 47, 30 - rotate: 90 + bounds: 661, 64, 47, 30 muzzle-glow - bounds: 779, 4, 25, 25 + bounds: 382, 54, 25, 25 muzzle-ring - bounds: 451, 14, 25, 105 + bounds: 275, 54, 25, 105 + rotate: 90 muzzle01 - bounds: 664, 60, 67, 40 + bounds: 911, 95, 67, 40 rotate: 90 muzzle02 - bounds: 580, 56, 68, 42 - rotate: 90 + bounds: 792, 108, 68, 42 muzzle03 - bounds: 478, 36, 83, 53 + bounds: 956, 171, 83, 53 rotate: 90 muzzle04 - bounds: 533, 49, 75, 45 - rotate: 90 + bounds: 275, 7, 75, 45 muzzle05 - bounds: 624, 56, 68, 38 - rotate: 90 + bounds: 140, 3, 68, 38 neck - bounds: 806, 8, 18, 21 + bounds: 250, 182, 18, 21 portal-bg - bounds: 258, 121, 133, 133 + bounds: 140, 43, 133, 133 portal-flare1 - bounds: 690, 2, 56, 30 - rotate: 90 + bounds: 554, 65, 56, 30 portal-flare2 - bounds: 510, 3, 57, 31 -portal-flare3 - bounds: 722, 4, 58, 30 + bounds: 759, 112, 57, 31 rotate: 90 +portal-flare3 + bounds: 554, 97, 58, 30 portal-shade - bounds: 393, 121, 133, 133 + bounds: 275, 121, 133, 133 portal-streaks1 - bounds: 528, 126, 126, 128 + bounds: 410, 126, 126, 128 portal-streaks2 - bounds: 656, 129, 125, 125 + bounds: 538, 129, 125, 125 rear-bracer - bounds: 826, 13, 28, 36 + bounds: 857, 67, 28, 36 rear-foot - bounds: 743, 70, 57, 30 - rotate: 90 + bounds: 663, 96, 57, 30 rear-shin - bounds: 174, 14, 38, 89 + bounds: 414, 86, 38, 89 + rotate: 90 rear-thigh - bounds: 783, 158, 28, 47 + bounds: 756, 63, 28, 47 rear-upper-arm - bounds: 783, 136, 20, 44 + bounds: 60, 5, 20, 44 rotate: 90 torso - bounds: 123, 13, 49, 90 + bounds: 905, 164, 49, 90 diff --git a/assets/spineboy/export/spineboy.png b/assets/spineboy/export/spineboy.png index d1c3ac1..0ea9737 100644 Binary files a/assets/spineboy/export/spineboy.png and b/assets/spineboy/export/spineboy.png differ diff --git a/assets/spineboy/license.txt b/assets/spineboy/license.txt index 60ff2d2..c2bbb86 100644 --- a/assets/spineboy/license.txt +++ b/assets/spineboy/license.txt @@ -1,4 +1,4 @@ -Copyright (c) 2013, Esoteric Software +Copyright (c) 2013, Esoteric Software LLC The images in this project may be redistributed as long as they are accompanied by this license file. The images may not be used for commercial use of any diff --git a/examples/3d.rs b/examples/3d.rs index ec932d8..433f23d 100644 --- a/examples/3d.rs +++ b/examples/3d.rs @@ -136,7 +136,7 @@ fn controls( } #[derive(Component)] -pub struct Spine3DMaterial(StandardMaterial); +pub struct Spine3DMaterial; impl SpineMaterial for Spine3DMaterial { type Material = StandardMaterial; diff --git a/readme.md b/readme.md index 964373c..55ac7a1 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # bevy_spine -A Bevy Plugin for [Spine 4.1](http://esotericsoftware.com/), utilizing [rusty_spine](https://github.com/jabuwu/rusty_spine). WASM compatible! +A Bevy Plugin for [Spine](http://esotericsoftware.com/), utilizing [rusty_spine](https://github.com/jabuwu/rusty_spine). WASM compatible! ``` [dependencies] @@ -14,7 +14,7 @@ bevy_spine = "0.8" | bevy_spine | rusty_spine | bevy | spine | | ---------- | ----------- | ---- | ----- | -| main | 0.7 | 0.13 | 4.1 | +| main | 0.8 | 0.13 | 4.2 | | 0.8 | 0.7 | 0.13 | 4.1 | | 0.7 | 0.7 | 0.12 | 4.1 | | 0.6 | 0.6 | 0.11 | 4.1 | diff --git a/src/entity_sync.rs b/src/entity_sync.rs index d73431c..4924a81 100644 --- a/src/entity_sync.rs +++ b/src/entity_sync.rs @@ -1,6 +1,7 @@ use std::{fmt::Debug, hash::Hash, marker::PhantomData}; use bevy::prelude::*; +use rusty_spine::Physics; use crate::{Spine, SpineBone, SpineSystem}; @@ -176,7 +177,7 @@ pub fn spine_sync_bones( } } for mut spine in spine_query.iter_mut() { - spine.0.skeleton.update_world_transform(); + spine.0.skeleton.update_world_transform(Physics::Update); } } diff --git a/src/lib.rs b/src/lib.rs index a397320..4d55ce3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,7 @@ use materials::{ use rusty_spine::{ atlas::{AtlasFilter, AtlasWrap}, controller::{SkeletonCombinedRenderable, SkeletonRenderable}, - AnimationEvent, Skeleton, + AnimationEvent, Physics, Skeleton, }; use textures::SpineTextureConfig; @@ -833,7 +833,7 @@ fn spine_update_animation( spine_event_queue: Res, ) { for (_, mut spine) in spine_query.iter_mut() { - spine.update(time.delta_seconds()); + spine.update(time.delta_seconds(), Physics::Update); } { let mut events = spine_event_queue.0.lock().unwrap(); diff --git a/src/test.rs b/src/test.rs index c88a24c..f4246e0 100644 --- a/src/test.rs +++ b/src/test.rs @@ -70,7 +70,7 @@ pub fn test_app_with_spineboy() -> App { fn spawn() { let mut app = test_app_with_spineboy(); app.add_systems(Update, |spine_query: Query<&Spine>| { - assert_eq!(spine_query.single().skeleton.data().hash(), "itfFESDjM1c"); + assert_eq!(spine_query.single().skeleton.data().hash(), "pvgSVWzpY9U"); }); app.update(); }