diff --git a/spine-ts/spine-pixi/example/assets/spineboy-polypack.atlas b/spine-ts/spine-pixi/example/assets/spineboy-polypack.atlas new file mode 100644 index 000000000..831417a6e --- /dev/null +++ b/spine-ts/spine-pixi/example/assets/spineboy-polypack.atlas @@ -0,0 +1,117 @@ +spineboy-polypack.png +size:2048,512 +filter:Linear,Linear +pma:true +crosshair +bounds:1895,128,89,89 +eye-indifferent +bounds:1863,217,93,89 +rotate:90 +eye-surprised +bounds:1696,48,93,89 +front-bracer +bounds:1192,4,58,80 +rotate:90 +front-fist-closed +bounds:430,4,75,82 +rotate:90 +front-fist-open +bounds:1895,42,86,87 +rotate:90 +front-foot +bounds:1066,22,126,69 +rotate:180 +front-shin +bounds:0,46,82,184 +rotate:90 +front-thigh +bounds:1484,20,45,112 +front-upper-arm +bounds:791,11,46,97 +rotate:90 +goggles +bounds:1320,116,261,166 +gun +bounds:1653,137,210,203 +head +bounds:1025,121,271,298 +rotate:90 +hoverboard-board +bounds:1297,240,492,152 +rotate:180 +hoverboard-thruster +bounds:1529,0,60,64 +rotate:90 +hoverglow-small +bounds:528,63,274,75 +mouth-grind +bounds:698,4,93,59 +mouth-oooo +bounds:605,4,93,59 +mouth-smile +bounds:512,4,93,59 +muzzle-glow +bounds:87,2,50,50 +muzzle-ring +bounds:317,79,49,209 +rotate:90 +muzzle01 +bounds:184,49,133,79 +muzzle02 +bounds:802,57,135,81 +offsets:0,3,135,84 +muzzle03 +bounds:1536,60,160,98 +offsets:4,5,166,106 +muzzle04 +bounds:1807,68,149,88 +offsets:0,2,149,90 +rotate:90 +muzzle05 +bounds:1351,43,133,73 +offsets:0,1,135,75 +neck +bounds:137,9,35,41 +offsets:0,0,36,41 +portal-bg +bounds:264,128,264,264 +offsets:1,1,266,266 +portal-flare1 +bounds:1984,108,109,58 +offsets:1,1,111,60 +rotate:90 +portal-flare2 +bounds:1952,217,112,59 +offsets:1,1,114,61 +rotate:90 +portal-flare3 +bounds:317,22,113,57 +offsets:1,1,115,59 +portal-shade +bounds:0,128,264,264 +offsets:1,1,266,266 +portal-streaks1 +bounds:528,138,250,254 +offsets:1,1,252,256 +portal-streaks2 +bounds:778,138,248,247 +offsets:1,1,250,249 +rotate:90 +rear-bracer +bounds:1272,7,55,70 +offsets:0,2,56,72 +rotate:90 +rear-foot +bounds:1743,5,113,60 +rotate:180 +rear-shin +bounds:937,46,75,178 +rotate:90 +rear-thigh +bounds:1982,14,55,94 +rear-upper-arm +bounds:0,7,40,87 +rotate:90 +torso +bounds:1171,62,98,180 +rotate:270 diff --git a/spine-ts/spine-pixi/example/assets/spineboy-polypack.png b/spine-ts/spine-pixi/example/assets/spineboy-polypack.png new file mode 100644 index 000000000..78b26b453 Binary files /dev/null and b/spine-ts/spine-pixi/example/assets/spineboy-polypack.png differ diff --git a/spine-ts/spine-pixi/example/index.html b/spine-ts/spine-pixi/example/index.html index 2e45c1e19..f33de6fd8 100644 --- a/spine-ts/spine-pixi/example/index.html +++ b/spine-ts/spine-pixi/example/index.html @@ -39,18 +39,22 @@ }); document.body.appendChild(app.view); + // Feel free to mix and match the binary skeleton, the json skeleton, the rect atlas and the polypack atlas + // You only need one skeleton and one atlas, the rest is just to show how to load different formats PIXI.Assets.add("spineboySkeletonJson", "./assets/spineboy-pro.json"); PIXI.Assets.add("spineboySkeletonBinary", "./assets/spineboy-pro.skel"); PIXI.Assets.add("spineboyAtlas", "./assets/spineboy.atlas"); + PIXI.Assets.add("spineboyAtlasPolypack", "./assets/spineboy-polypack.atlas"); await PIXI.Assets.load([ "spineboySkeletonJson", "spineboySkeletonBinary", "spineboyAtlas", + "spineboyAtlasPolypack" ]); // Create the spine display object - const spineBoy = spine.Spine.from("spineboySkeletonJson", "spineboyAtlas", { scale: 0.5 }); + const spineBoy = spine.Spine.from("spineboySkeletonJson", "spineboyAtlasPolypack", { scale: 0.5 }); // .from(...) is a shortcut + cache for creating the skeleton data at a certain scale // Here would be the "long way" of doing it (without cache):