Mat Groves ecbe9b0247
Add PixiJS v8 support to spine (#2641)
* add v8 support to spine!

* Renamed examples folder for consistency.

* Gitignore dist.

* Tsconfig.

* Package json.

* Modification due to strictNullChecks=true.

* Run tsfmt.

* Use clipper.clipTriangles not deprecated version.

* Aligned example to spine-pixi (v7).

* Fix clipping dark tint wrong param.

* Removed useless clipper.

* Push texture issue repro example

* fix attachment.uvs by copying them

* SlotObject alpha connected to skeleton and slot alpha.

* add topology for future v8 release

* Dark tint rendered is enabled if at least one slot has dark tint, or by configuration.
Fixed clipping while using dark tint.

* Optimized clipping by using clipTrianglesUnpacked.

* Repro example for clipping issue.

* Aligned constructor and from signature of spine-pixi(-v7) to v8. Deprecated old signatures.

* Removed useless function.

* Fixed clipping issue flagging attachment as dirty if indices change.

* Clipping attachments clip slot object through Pixi Graphics masks.

* Add autoUpdate in SpineFromOptions

* Added javadoc to pixiv8

* Updated pixi7 examples to use SpineFromOptions interface

* Aligned atlas loader to use texturePreference for bundles.

* Add pool to manage slot objects masks

* Fixed minor issues with SpineDebugRenderer

* Aligned spine-pixi-v8 with latest spine-core

* Updated build and publish script

---------

Co-authored-by: Davide Tantillo <iamdjj@gmail.com>
2024-11-06 17:23:01 +01:00

1 line
5.5 KiB
JSON

{"skeleton":{"hash":"U9AsopMjHGk","spine":"4.2.36","x":-152.5,"y":-151,"width":305,"height":302,"images":"./images/","audio":""},"bones":[{"name":"root"},{"name":"coin-front","parent":"root"},{"name":"clipping","parent":"coin-front"},{"name":"coin-sides","parent":"root"},{"name":"coin-side-round","parent":"coin-sides"},{"name":"coin-side-straight","parent":"coin-sides"},{"name":"shine","parent":"root","x":243.14}],"slots":[{"name":"coin-side","bone":"coin-side-straight","color":"ffdb2fff","attachment":"coin-side-straight"},{"name":"coin-side-round","bone":"coin-side-round","color":"ffdb2fff","dark":"ff0000","attachment":"coin-side-round"},{"name":"coin-front-texture","bone":"coin-front","color":"868686ff","attachment":"coin-front-logo"},{"name":"coin-front-shine","bone":"coin-front","color":"888888ff","dark":"000000","attachment":"coin-front-shine-logo"},{"name":"clipping","bone":"clipping","attachment":"clipping"},{"name":"shine","bone":"shine","color":"ffffff60","attachment":"shine"}],"skins":[{"name":"default","attachments":{"clipping":{"clipping":{"type":"clipping","end":"clipping","vertexCount":39,"vertices":[0.1,140.26,-26.4,138.14,-50.51,131.25,-75.42,119.06,-98.21,101.04,-115.44,82.22,-127.63,62.08,-136.11,39.03,-140.08,19.68,-141.41,-0.19,-140.08,-22.98,-134.78,-45.5,-125.24,-66.44,-113.32,-84.19,-98.21,-101.95,-80.46,-116.52,-61.38,-127.39,-38.92,-134.81,-18.22,-139.27,-0.14,-140.58,24.23,-138.48,45.45,-132.46,67.98,-122.5,86.58,-110.19,102.56,-95.25,115.4,-78.75,125.36,-61.72,134,-42.33,138.46,-22.15,139.24,-0.15,138.46,20.29,133.48,39.94,127.19,58.54,117.5,76.1,104.4,92.86,88.42,108.32,69.03,121.42,50.43,130.85,26.32,137.4],"color":"ce3a3aff"}},"coin-front-shine":{"coin-front-shine-logo":{"width":282,"height":282},"coin-front-shine-spineboy":{"width":282,"height":282}},"coin-front-texture":{"coin-front-logo":{"width":305,"height":302},"coin-front-spineboy":{"width":305,"height":302}},"coin-side":{"coin-side-straight":{"x":0.5,"width":17,"height":282}},"coin-side-round":{"coin-side-round":{"x":-69.43,"width":144,"height":282}},"shine":{"shine":{"y":0.5,"scaleX":1.6004,"scaleY":1.6004,"width":72,"height":245}}}}],"animations":{"animation":{"slots":{"coin-front-shine":{"rgba2":[{"light":"7d7d7dff","dark":"000000"},{"time":0.2667,"light":"000000ff","dark":"7e7e7e"},{"time":0.664,"light":"000000ff","dark":"000000"},{"time":1.0333,"light":"7f7f7fff","dark":"000000"},{"time":1.3333,"light":"404040ff","dark":"000000"},{"time":1.6,"light":"000000ff","dark":"7e7e7e"},{"time":2.0022,"light":"000000ff","dark":"000000"},{"time":2.4,"light":"7f7f7fff","dark":"000000"},{"time":2.6667,"light":"7d7d7dff","dark":"000000"}],"attachment":[{"time":0.6667,"name":"coin-front-shine-spineboy"},{"time":2,"name":"coin-front-shine-logo"}]},"coin-front-texture":{"rgba":[{"color":"858585ff"},{"time":0.4,"color":"ffffffff"},{"time":0.6696,"color":"858585ff","curve":[0.725,0.59,0.892,1,0.725,0.59,0.892,1,0.725,0.59,0.892,1,0.725,1,0.892,1]},{"time":0.9667,"color":"ffffffff"},{"time":1.3318,"color":"858585ff","curve":"stepped"},{"time":1.3333,"color":"858585ff"},{"time":1.7333,"color":"ffffffff"},{"time":1.9982,"color":"858585ff","curve":"stepped"},{"time":2.0022,"color":"858585ff"},{"time":2.3,"color":"ffffffff"},{"time":2.6667,"color":"858585ff"}],"attachment":[{"time":0.6667,"name":"coin-front-spineboy"},{"time":2,"name":"coin-front-logo"}]}},"bones":{"coin-front":{"translate":[{},{"time":0.664,"x":8.3,"curve":"stepped"},{"time":0.6696,"x":-8.3,"curve":[0.794,-7.08,1.167,0,0.794,0,1.167,0]},{"time":1.3333},{"time":1.9982,"x":8.3,"curve":"stepped"},{"time":2.0022,"x":-8.3},{"time":2.6667}],"scale":[{"curve":[0.164,1,0.484,0.091,0.164,1,0.484,1]},{"time":0.664,"x":0,"curve":"stepped"},{"time":0.6696,"x":0.003,"curve":[0.786,0.153,1.167,1,0.786,1,1.167,1]},{"time":1.3333,"curve":[1.442,0.992,1.858,0.098,1.442,1,1.858,1]},{"time":1.9982,"x":0.003,"curve":"stepped"},{"time":2.0022,"x":0.003,"curve":[2.123,0.151,2.501,1,2.123,1,2.501,1]},{"time":2.6667}]},"coin-side-round":{"translate":[{},{"time":0.664,"x":-6.75,"curve":"stepped"},{"time":0.6696,"x":7.03,"curve":[0.794,5.99,1.167,0,0.794,0,1.167,0]},{"time":1.3333},{"time":1.9982,"x":-6.75,"curve":"stepped"},{"time":2.0022,"x":7.03},{"time":2.6667}],"scale":[{"curve":[0.085,1,0.207,0.789,0.085,1,0.207,1]},{"time":0.3333,"x":0.555,"curve":[0.449,0.347,0.567,0.122,0.449,1,0.567,1]},{"time":0.664,"x":0.014,"curve":"stepped"},{"time":0.6696,"x":-0.028,"curve":[0.723,-0.126,0.865,-0.367,0.723,1,0.865,1]},{"time":1,"x":-0.609,"curve":[1.053,-0.778,1.29,-0.997,1.053,1,1.29,1]},{"time":1.3318,"x":-1,"curve":"stepped"},{"time":1.3333,"curve":[1.384,0.997,1.439,0.94,1.384,1,1.439,1]},{"time":1.5,"x":0.852,"curve":[1.564,0.748,1.703,0.509,1.564,1,1.703,1]},{"time":1.8,"x":0.315,"curve":[1.873,0.13,1.987,0.015,1.873,1,1.987,1]},{"time":1.9982,"x":0.014,"curve":"stepped"},{"time":2.0022,"x":-0.028,"curve":[2.039,-0.072,2.123,-0.239,2.039,1,2.123,1]},{"time":2.2018,"x":-0.365,"curve":[2.269,-0.513,2.337,-0.635,2.269,1,2.337,1]},{"time":2.4,"x":-0.731,"curve":[2.503,-0.871,2.596,-0.961,2.503,1,2.596,1]},{"time":2.6592,"x":-1,"curve":[2.661,-1,2.665,1,2.661,1,2.665,1]},{"time":2.6667}]},"shine":{"translate":[{"curve":[0.167,0,0.5,-473.39,0.167,0,0.5,0]},{"time":0.6667,"x":-473.39,"curve":[0.833,-473.39,1.167,-33.16,0.833,0,1.167,0]},{"time":1.3333,"x":-33.16,"curve":[1.5,-33.16,1.833,-473.39,1.5,0,1.833,0]},{"time":2,"x":-473.39,"curve":[2.167,-473.39,2.5,0,2.167,0,2.5,0]},{"time":2.6667}]}},"drawOrder":[{"time":0.6667,"offsets":[{"slot":"coin-side","offset":2}]},{"time":0.6696},{"time":1.9982,"offsets":[{"slot":"coin-side","offset":2}]},{"time":2.0022}]}}}