227 Commits

Author SHA1 Message Date
Nathan Sweet
b8bf2a9bbb [ts] Added AssetManager#require which throws an error for an asset that isn't loaded. 2021-06-28 01:53:26 -04:00
Nathan Sweet
b3c405e9ca [ts] Fixed multi touch runtime error.
Repro: touch down 1, touch down 2 (using second finger), touch up 1, touch up 2 -> error.
2021-06-22 23:08:09 -04:00
Nathan Sweet
f77a51d33a [ts] Fixed input handling for player control bones and demos. 2021-06-22 22:52:00 -04:00
Nathan Sweet
286552b8fa [ts] Player, simplified config.mipmaps. 2021-06-22 21:38:57 -04:00
Nathan Sweet
66951cb1d8 [ts] Player, mipmaps and anisotropic if available, otherwise use linear. 2021-06-22 18:09:37 -04:00
Mario Zechner
e6e2c95b2c [ts][webgl] Use devicePixelRatio for hdpi screens 2021-06-22 23:50:04 +02:00
Nathan Sweet
6c689eb5f8 [ts] Fixed example HTML files. 2021-06-22 16:54:10 -04:00
Nathan Sweet
4062ccb1a9 [ts] TextureAtlas and AssetManager updates.
* AssetManager's textureLoader returns Texture.
* AssetManager#loadTexture success gives a Texture.
* TextureAtlas no longer has a textureLoader, it creates all the pages without a texture set.
* TextureAtlasRegion no longer has a texture, use region.page.texture instead.
* AssetManager#loadTextureAtlas no longer parses the atlas text twice. It creates the atlas, then loads and sets all the textures.
2021-06-22 15:33:01 -04:00
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
2911f9da5e [ts] Demo asset update, demos clean up. 2021-06-20 01:07:29 -04:00
Nathan Sweet
ca9a3ff7c2 [ts] Set path for demos, update order. 2021-06-18 21:48:40 -04:00
Nathan Sweet
5d6f46d295 [ts] Update demos to 4.0 and new AssetManager. 2021-06-18 18:48:58 -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
Nathan Sweet
11ea258d8e [ts] Example loads both JSON and binary. 2021-06-03 18:03:32 -04:00
Nathan Sweet
551f33b2d1 [ts] Clean up, build fixes. 2021-05-30 20:17:54 -04:00
badlogic
688d855006 [runtimes] Updated examples with Editor version 4.0.58-beta. 2021-03-01 10:05:26 +01:00
badlogic
9087ed61ae [ts] Updated parser to new atlas format
Not quite working yet.
2020-12-28 12:11:25 +01:00
badlogic
ae6eda01f7 Merge branch '3.8' into 4.0-beta
# Conflicts:
#	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
#	spine-ts/canvas/example/assets/spineboy-ess.json
#	spine-ts/canvas/example/assets/spineboy.png
#	spine-ts/player/example/assets/raptor-pma.png
#	spine-ts/player/example/assets/raptor-pro.json
#	spine-ts/player/example/assets/spineboy-pma.png
#	spine-ts/player/example/assets/spineboy-pro.skel
#	spine-ts/threejs/example/assets/raptor-pro.json
#	spine-ts/threejs/example/assets/raptor.png
#	spine-ts/webgl/example/assets/coin-pro.skel
#	spine-ts/webgl/example/assets/goblins-pro.skel
#	spine-ts/webgl/example/assets/mix-and-match-pma.atlas
#	spine-ts/webgl/example/assets/mix-and-match-pma.png
#	spine-ts/webgl/example/assets/mix-and-match-pro.skel
#	spine-ts/webgl/example/assets/owl-pma.png
#	spine-ts/webgl/example/assets/owl-pro.skel
#	spine-ts/webgl/example/assets/raptor-pma.png
#	spine-ts/webgl/example/assets/raptor-pro.skel
#	spine-ts/webgl/example/assets/spineboy-pma.png
#	spine-ts/webgl/example/assets/spineboy-pro.skel
#	spine-ts/webgl/example/assets/spineboy.png
#	spine-ts/webgl/example/assets/stretchyman-pro.skel
#	spine-ts/webgl/example/assets/tank-pma.atlas
#	spine-ts/webgl/example/assets/tank-pma.png
#	spine-ts/webgl/example/assets/tank-pro.skel
#	spine-ts/webgl/example/assets/vine-pro.skel
2020-11-27 18:47:44 +01:00
badlogic
490d169ea2 [ts] Closes #1804. 2020-11-27 18:45:18 +01:00
badlogic
88f0d98dd2 [ts] Finished 4.0 port. See #1796 2020-11-27 17:53:27 +01:00
badlogic
3863828c3e [ts] Port of 4.0 changes, some kinks to be ironed out yet.
[ts] Add .json exports to WebGL assets dir for tests.

[ts] She loads, but she no play nice.
2020-11-11 13:11:30 +01:00
badlogic
ee3f088e6c Merge branch '3.8' into 4.0-beta 2020-10-23 11:26:34 +02:00
Nathan Sweet
98a6c8f696 Exported examples with export.sh 4.0.05-beta and ran runtimes.sh. 2020-10-10 16:22:40 -07:00
MikalDev
93f1e546bb Webworker support for SharedAssetManger 2020-09-15 15:56:23 -07:00
Nathan Sweet
acc9e127d4 Readme update, added barebones.html. 2020-07-17 19:50:50 +02:00
badlogic
2d0fd7f7b3 [ts] Added simple WebGL example. 2020-04-10 10:17:29 +02: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
28d85e12b8 [ts] Owl demo updated: use window rather than canvas size, wait for first mouse move. 2019-08-30 16:49:06 +02:00
NathanSweet
842dffbd83 [all] Source clean up, formatting, and tabs for indentation. 2019-08-27 15:57:14 +02:00
badlogic
e039625430 Removed stretchyman-stretchy-ik from all examples. 2019-08-05 17:41:15 +02:00
badlogic
bb51ec7f23 Updated examples, removed stretch-ik stretchyman. 2019-08-05 17:31:15 +02:00
badlogic
f8f495524e Updated example exports, fixed up example projects with mix-and-match skin api demo. 2019-07-09 13:47:05 +02:00
badlogic
6850a019ec Updated examples again, final binary format change. 2019-06-19 18:02:20 +02:00
badlogic
5f13f1b8e6 Exported all examples with 3.8.25-beta to include file format changes in .json and .skel files. 2019-06-19 16:56:47 +02:00
badlogic
2946cec9d1 [ts][as3] Added mix-and-match example. See #1375. 2019-06-13 16:39:50 +02:00
badlogic
5d974e4480 Added mix-and-match assets, modified export scripts, added libGDX sample. See #1375. 2019-06-13 15:58:16 +02:00
badlogic
ca3916dad8 [ts] Added support for loading binaries via SkeletonBinary. Player configuration object now lets you specify skelUrl instead of jsonUrl to load from a binary file. Updated demos to use .skel files instead of .json. 2019-06-07 17:21:53 +02:00
badlogic
8ec6a9ef3b [ts] Updated demo assets to latest format. 2019-06-05 11:59:31 +02:00
badlogic
1ec6e26b71 Updated example exports and copies in runtime example projects to the latest .json and .skel formats. 2019-06-05 11:20:43 +02:00
badlogic
3aa14d9b86 [ts] Ported skin bones/constraints changes. See #1346. 2019-06-04 15:53:34 +02:00
badlogic
f9e4fd495d [ts] Ported all skin API changes, see #841. 2019-06-03 16:20:19 +02:00
badlogic
576c1da32f [ts] Ported skin API changes, see #841. 2019-05-10 15:07:06 +02:00