66 Commits

Author SHA1 Message Date
Nathan Sweet
99f8cba35f [ts] Player updates.
* Updated config doc comments.
* Check undefined without typeof. Discussion: https://stackoverflow.com/a/22053469/187883
* Use transparent bg color by default if alpha is true.
* Set bg color on parent to avoid flash.
* render->create (so it doesn't seem like it's about drawing).
* Sorted members.
* Use addEventListener, else only the last player event handler is used.
* Set the initial animation when loaded, not whenever track 0 is empty.
* If an animation is not specified, play an empty animation.
* If an animation is set in success(), don't set any animation.
* Don't clearTracks in setAnimation, don't use AnimationState in calculateAnimationViewport -- those prevent mixing.
* setAnimation returns the TrackEntry.
* Added addAnimation and setViewport.
* Expose play() and pause().
* Keep control bones inside the canvas.
* LoadingScreen scales down.
* Set minimal CSS so no external CSS is needed when !showControls.
* Use screen instead of world coordinates for control bone hit detection, so it works at any size.
* Choose closest control bone instead of last.
2021-06-20 13:24:53 -04:00
Nathan Sweet
78a730a6d7 [ts] Improvements for player, webgl.
* Rendering, added support for separate color/alpha src blend funcs.
* LoadingScreen, set camera zoom to fade out and black flash, use PMA to fix ringing artifacts when scaled, fade in to help hide dropped frames as page loads, use separate color/alpha src blend funcs to properly blend quad when loading screen fades out, oxipng PNGs.
* Moved some private constants out of their class to avoid class name prefix.
* Player, clean up full pass OCD town, showError throws when possible so stacktrace isn't lost, added showLoading to config, don't create UI when !showControls, removed findWithId (id is unique for entire document), use built-in for findWithClass/contains, var->let, don't clear screen twice during loading, other minor stuff.
2021-06-20 01:20:31 -04:00
Nathan Sweet
43cb6dfe22 [ts] AssetManager and Player updates to support sharing assets.
* Removed # parsing from SpinePlayer, replaced with config.jsonField.
* Refactored AssetMananger to split downloading from asset creation.
* Allow Downloader to be specified in SpinePlayer config so multiple players don't download the same assets.
* Added AssetManager#loadJson so the text is only parsed once.
* TextureAtlas is still parsed multiple times. :(
* AssetMananger clean up, catch more errors, log error, don't keep rendering after an error.
2021-06-18 02:31:10 -04:00
badlogic
cf24f5d678 Merge branch '3.8' into 4.0-beta
# Conflicts:
#	spine-libgdx/spine-libgdx/pom.xml
#	spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java
#	spine-ts/build/spine-all.js.map
#	spine-ts/build/spine-canvas.js.map
#	spine-ts/build/spine-core.js.map
#	spine-ts/build/spine-player.js.map
#	spine-ts/build/spine-threejs.js.map
#	spine-ts/build/spine-webgl.js.map
2021-06-10 15:10:00 +02:00
badlogic
6314eaf908 [webgl] Fix worker mode, closes #1804 2021-06-10 15:05:13 +02:00
Nathan Sweet
7df74c2fa4 Various fixes, clean up.
* Added missing CurveTimeline#shrink calls. c and cpp got BOZO comments until the method is added.
* SkeletonJson#readCurve clean up.
* ts, use shorthand for null checks.
* csharp, don't use unnecessary hasNext local.
2021-06-03 21:42:35 -04:00
badlogic
490d169ea2 [ts] Closes #1804. 2020-11-27 18:45:18 +01:00
MikalDev
93f1e546bb Webworker support for SharedAssetManger 2020-09-15 15:56:23 -07:00
badlogic
b67bf992a0 Single bone IK fix and license header update. Closes #1580, closes #1581. 2019-12-20 12:20:46 +01:00
badlogic
4e96ebcda2 [ts][webgl] Added . When it will disable the corresponding WebGL pixel store behaviour. 2019-10-31 17:10:22 +01:00
badlogic
f68ac18a82 [ts][webgl] Validate magnification filters before setting them in GLTexture. Closes #1508. 2019-10-09 14:17:52 +02:00
badlogic
26e93f9f3f [ts] Fixed code up for latest TypeScript compiler version 3.6.3. Closes #1502. 2019-09-23 14:49:02 +02:00
badlogic
4913926e3b [ts][webgl] Added support for WebGL2. Closes #1500. 2019-09-23 14:38:26 +02:00
NathanSweet
842dffbd83 [all] Source clean up, formatting, and tabs for indentation. 2019-08-27 15:57:14 +02:00
badlogic
3aa14d9b86 [ts] Ported skin bones/constraints changes. See #1346. 2019-06-04 15:53:34 +02:00
badlogic
09130b15df Merge branch '3.7' into 3.8-beta 2019-05-02 11:43:36 +02:00
badlogic
7f7e5f0fec Updated license headers and LICENSE files. 2019-05-02 11:38:19 +02:00
badlogic
03057c6073 [ts] Renamed MixDirection.in/out to mixIn/mixOut as it was crashing a JS compressor. Fixed log output. Added mobile support for additive animation blending. Input does not require a fully defined Listener interface anymore. 2019-04-24 15:05:07 +02:00
badlogic
8ea29944d3 [ts][webgl] Closes #1271, clipping wasn't terminated properly when a slot did not house an attachment. 2019-02-06 16:02:42 +01:00
badlogic
c774c45cb7 [ts][player] Slower loading screen spinner. 2018-12-21 11:32:00 +01:00
badlogic
896bdf913c [ts][player] Integrated new spinner. 2018-11-19 14:44:21 +01:00
badlogic
c0f1f24a34 [ts][widget] First iteration of new Spine Player complete. 2018-11-02 16:59:48 +01:00
badlogic
d1622c0dab Beginnings of a Spine player that's more advanced than the existing widget. 2018-11-01 15:51:03 +01:00
badlogic
4d5010680d [ts][webgl] Slot range rendering in SkeletonRenderer and SceneRenderer. Closes #1083 2018-02-16 13:47:03 +01:00
badlogic
08451f2a8d [ts][webgl] Exposing the renderers in SceneRenderer. 2017-11-17 15:40:39 +01:00
badlogic
246c5310d4 [ts][webgl] SceneRenderer method to draw textures with manually set UVs. 2017-11-17 14:39:53 +01:00
Ivan Popelyshev
8506e16f2d fix dark in both pma and non-pma (#993) 2017-09-28 11:22:48 +02:00
badlogic
7652eb47ba [webgl] Updated pma tint black demo to include Ivan's shader from #993. 2017-09-25 15:02:46 +02:00
badlogic
b685e490c1 [ts][webgl] Fixed vertex effects for clipped attachments 2017-06-21 16:19:49 +02:00
badlogic
5aebd65c01 [ts][webgl] Added VertexEffect, SwirlEffect and JitterEffect, and implemented it in WebGL SkeletonRenderer. SwirlEffect is a bit broken.. 2017-06-21 15:43:54 +02:00
badlogic
6a5e035cb5 [ts][webgl][widget] Fixed issues in Safari. Constants like SRC_ALPHA seem to no longer be exposed in Safari through WebGLRenderingContext properties. Closes #886 2017-04-26 15:56:52 +02:00
badlogic
2b4c2bcf94 [ts][webgl][widget] Fixed WebGL context loss in WebGL and widget backend. See CHANGELOG for details. 2017-04-18 15:37:44 +02:00
badlogic
d4266cf89a [ts][webgl][widget] Implemented clipping, updated README.md and CHANGELOG 2017-04-12 14:14:34 +02:00
badlogic
5af8185261 [ts][webgl][widget] Fixed SceneRenderer, immediate mode rendering methods didn't take into account two color tint shader 2017-04-07 15:50:22 +02:00
badlogic
be9b522237 [ts] Updated README.md describing compatibility and how to disable two color tinting in WebGL backend. 2017-02-24 15:18:30 +01:00
badlogic
9eb42b65f2 [ts] Added 2 color tinting support, made it default, barely a performance difference. You can disable it via the constructors of SceneRenderer, SkeletonRenderer and PolygonBatcher, depending on which level of granularity you use. Also fixed performance issue submitting geometry as STATIC_DRAW instead of DYNAMIC_DRAW. Fixed another performance issue regarding size of buffer data that's being updated. 2017-02-24 15:00:30 +01:00
badlogic
7b463b1336 [ts] Fixed SkeletonDebugRenderer, fixed memory allocations in SkeletonRenderer 2017-01-26 16:21:08 +01:00
badlogic
be1a2e3cbb Fixed bug in SkeletonJson, used = instead of == in condition. Fixed vertex component order for mesh attachment. Fixed SkeletonRenderer. 2017-01-26 14:52:04 +01:00
badlogic
fcade28c7a [ts] Updated to 3.6-beta, changes to updateWorldVertices (now computeWorldVertices) for attachments, two color timeline, point attachment, transform constraint local and relative modes. Meshes don't render yet in WebGL backend. Need to update other backends as well. 2017-01-25 16:55:39 +01:00
NathanSweet
c0fdc454a2 Fixed inconsistent newlines.
License header was followed by \n\n and files ended with \n. Changed to \r\n.
2016-10-15 23:45:16 +02:00
NathanSweet
7a18f0818c Every space in its place! (tm)
(whitespace clean up)
2016-10-15 23:15:41 +02:00
badlogic
5aa27771c3 [runtimes] Updated ALL sources to use latest Spine Runtimes License v2.5. Manually checked all the things... 2016-10-13 15:12:05 +02:00
Mario Zechner
f84ae17615 Updated License Headers 2016-10-13 10:27:54 +02:00
NathanSweet
b597aac9b9 [ts] Minor demo updates.
- Loading screen is never shown if demo loads completely while offscreen.
- HTML charset specified.
- Tabs, not spaces, you filthy animals. Each unminified JS reduced by ~80kb.
- Clean up.
2016-09-13 23:18:49 +02:00
NathanSweet
6e09ef7320 [ts] Updated loading screen. 2016-09-13 12:01:23 +02:00
NathanSweet
65d0014827 [ts] Moar demo love. 2016-09-04 23:22:47 +02:00
badlogic
8faba2cdec [ts] Demos, a never ending story 2016-09-03 00:00:06 +02:00
badlogic
99a5f43aca [ts] center loading screen logo + spinner 2016-09-02 16:55:15 +02:00
badlogic
18b0463669 [ts] Demos done 2016-09-02 16:45:35 +02:00
badlogic
1c74823b2f [ts] Refactored demos to share assets as much as possible. Added SharedAssetManager for that purpose 2016-09-02 11:22:04 +02:00