1337 Commits

Author SHA1 Message Date
Davide Tantillo
e8719ebb99 [ts] Run tsfmt 2024-11-06 17:57:46 +01:00
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
Davide Tantillo
c3d510e3c8 [ts] Release 4.2.62 2024-11-05 17:31:40 +01:00
Davide Tantillo
8a03d8a7c7 [ts][phaser] Automatically set UNPACK_PREMULTIPLY_ALPHA_WEBGL to false when spine texture is created, then restore it. 2024-11-05 16:09:13 +01:00
Davide Tantillo
bdb9ea160e Fixed example. 2024-10-21 15:31:33 +02:00
Davide Tantillo
38f5231cd2 Docs and minor fixes. 2024-10-21 15:19:46 +02:00
Davide Tantillo
0fa960251a WIP - Added/Changed:
- overlay loading: now overlay is moved as the last element from where it is inserted to avoid widgets covered by backgrounds of html elements after it.
- default overlayId
- widget position in overlay coordinates (worldX, worldY) (experimental)
- cursor position on widget world (cursorWorldX, cursorWorldY) (experimental)
- jsonSkeletonKey: allow to load a specific skeleton in json containing multiple skeletons
- onViewportManualStart: start the widget when in manual-start and enters the viewport the first time
- overlayAssignedPromise: a promise that resolves when the overlay is assigned to the widget. Reads the comment on it
- appendTo: to append the widget created using js and wait for the overlayAssignedPromise to resolve
- changed how loadingPromise works
- added cursorCanvasX, cursorCanvasY, cursorWorldX, cursorWorldY to overlay (experimental)
2024-10-18 16:42:57 +02:00
Davide Tantillo
de7494036c Initial support of spine-widget into scrollable containers, and overlay-id for multiple spine-overlay.
working
2024-10-14 18:22:09 +02:00
alvov
54ecc39017 Add sources to source maps via TS configuration option
Fixes #2652
2024-10-10 10:40:30 +02:00
Davide Tantillo
e9a07bd6b9 Changes to make the widget more dynamic while changing attributes. See now webcomponent-gui.html. 2024-10-08 17:26:31 +02:00
Davide Tantillo
a34b8273b3 Exposed parameters to set bounds.
Deeply changed how bounds work, especially for the fact that they are not auto recalculated anymore if the animation is changed (unless autoRecalculateBounds is set to true).
2024-10-04 17:38:23 +02:00
Davide Tantillo
f4837ad8eb Add padding attributes/properties. 2024-10-03 13:05:12 +02:00
Davide Tantillo
bedce14780 Restore resize observer since the window resize event does not fire on body resize, but on window resize. It's supported by 93% of the browsers. 2024-10-03 11:05:14 +02:00
Davide Tantillo
8cc5a2ba5e Fix widget using overlay before overlay webcomponent is fully upgraded. 2024-10-03 09:23:48 +02:00
Davide Tantillo
6fa149756a Fix x-axis and y-axis not working in clip mode. 2024-10-01 13:01:53 +02:00
Davide Tantillo
6108d625c0 Fixed infinite requestAnimationFrame calls. 2024-09-30 12:07:36 +02:00
Davide Tantillo
95f2119e46 Fixed input remove listener. Run tsfmt. 2024-09-30 11:52:02 +02:00
Davide Tantillo
2db1873fd5 Managed lifecycle for SpineWebComponentWidget. 2024-09-30 11:36:39 +02:00
Davide Tantillo
5c42b6fa2d Manage lifecycle for Input and SpineWebComponentOverlay. Missing SpineWebComponentWidget. 2024-09-27 16:06:23 +02:00
Davide Tantillo
e26034426a Made some changes to make it work on old browsers. 2024-09-27 12:30:09 +02:00
Davide Tantillo
27edd8a284 Made span fps display configurable. 2024-09-26 17:09:15 +02:00
Davide Tantillo
a254fabaef Cleaned webcomponent example. 2024-09-26 16:09:27 +02:00
Davide Tantillo
3b4ab02d92 Fix 1 pixel misalignment in non clip mode. 2024-09-26 15:45:19 +02:00
Davide Tantillo
3d77f1c26e Removed custom LoadingSpinnerWindget class. Added a new specific method in LoadingSpinner. 2024-09-26 15:40:16 +02:00
Davide Tantillo
9399c42ec7 Removed useless changes on other classes. 2024-09-26 14:41:41 +02:00
Davide Tantillo
e9873147c2 Fix zoom bug due to screen size remaining the same at different zoom level. 2024-09-26 14:22:59 +02:00
Davide Tantillo
e8511ca8b2 Modified export script to copy chibi 2024-09-26 14:22:59 +02:00
Davide Tantillo
4536789e39 WIP - Refactor + animation and skin attribute change will reinit the widget 2024-09-26 14:22:59 +02:00
Davide Tantillo
d178f5de7c WIP - Doc before refactor 2024-09-26 14:22:59 +02:00
Davide Tantillo
b4f11c2f21 Refactor drag logic. Drag works with clip too. 2024-09-26 14:22:59 +02:00
Davide Tantillo
d2c29c5cfb Removed code duplication for clipping into div 2024-09-26 14:22:59 +02:00
Davide Tantillo
e67aa324fe Removed SpineCanvasApp dependency. 2024-09-26 14:22:59 +02:00
Davide Tantillo
847c152f2a Added clip. 2024-09-26 14:22:59 +02:00
Davide Tantillo
034c6266e8 Translate is done each frame through requestAnimationFrame. 2024-09-26 14:22:59 +02:00
Davide Tantillo
6c0b1b8c2c Fixed loading spinner example 2024-09-26 14:22:59 +02:00
Davide Tantillo
26d1ca739d Add OffScreenUpdateBehaviour 2024-09-26 14:22:59 +02:00
Davide Tantillo
bc192f4178 Renamed 2024-09-26 14:22:59 +02:00
Davide Tantillo
59a7715b2e mostly work - when overflow top/bottom...are > 0, widgets slightly jump on up and down fast scroll. 2024-09-26 14:22:59 +02:00
Davide Tantillo
96282273f8 Loading 2024-09-26 14:22:59 +02:00
Davide Tantillo
221e3f6624 web component 2024-09-26 14:22:59 +02:00
Davide Tantillo
d92046f325 Scroll should be resolved 2024-09-26 14:22:58 +02:00
Davide Tantillo
394b97b105 Zoom fix - WIP horizontal scroll bug see comment at line 495 2024-09-26 14:22:58 +02:00
Davide Tantillo
7f5b934a64 overlay fix scroll cut 2024-09-26 14:22:58 +02:00
Davide Tantillo
2da5b06c2d overlay 2024-09-26 14:22:58 +02:00
Davide Tantillo
3b5d74e0e8 overlay 4 2024-09-26 14:22:58 +02:00
Davide Tantillo
9d1109c9dc canvas4 2024-09-26 14:22:58 +02:00
Davide Tantillo
544fd4d8cd [ts] poc wegl overlay 2024-09-26 14:22:58 +02:00
Davide Tantillo
09ea76aa14 [ts] poc wegl overlay 2024-09-26 14:22:58 +02:00
Davide Tantillo
aa932c6507 [ts] Release 4.2.61 2024-09-25 10:07:07 +02:00
Davide Tantillo
e23beb7f75 [ts][phaser] Fixed phaser peerDependency blocked to 3.60 2024-09-25 10:03:58 +02:00