28 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
286552b8fa [ts] Player, simplified config.mipmaps. 2021-06-22 21:38:57 -04: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
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
173a61be7f [ts] Removed SharedAssetManager. Added webworker support to AssetManager. AssetManager clean up.
Related: #1762
2021-06-18 19:36:05 -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
1855870d37 [ts] Forcing text/html mimetype on text assets downloaded by AssetManager and SharedAssetManager. Closes #1583. 2020-01-11 15:03:13 +01:00
badlogic
b67bf992a0 Single bone IK fix and license header update. Closes #1580, closes #1581. 2019-12-20 12:20:46 +01:00
badlogic
b81f77b993 [ts] Added AssetManager#setRawDataURI(path, data). Allows to set raw data URIs for a specific path, which in turn enables embedding assets into JavaScript/HTML. See #1535. 2019-10-31 19:27:33 +01:00
NathanSweet
842dffbd83 [all] Source clean up, formatting, and tabs for indentation. 2019-08-27 15:57:14 +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
7f7e5f0fec Updated license headers and LICENSE files. 2019-05-02 11:38:19 +02:00
Ivan Popelyshev
d55724a1b5 Make let not var (#1298) 2019-03-08 16:36:05 +01:00
Ivan Popelyshev
5ee7d93fce Remove "spine." everywhere (#1297) 2019-03-08 15:44:15 +01:00
badlogic
fe9ae97747 [ts][threejs] Fixed bug in core AssetManager when loading multi-page atlases. Rewrote THREE.JS renderer to support multi-page atlases. Fixed clipping in THREE.JS backend. Closes #1066, closes #677. 2018-01-22 16:11:42 +01:00
badlogic
49137a58ea [ts] Added AssetManager.loadTextureAtlas. Will automatically resolve and load any images the atlas references. AssetManager.get(atlasName) will then return an instance of spine.TextureAtlas. 2017-11-17 10:57:44 +01: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
0733ce8af2 [ts] Widget can now load json, atlas, and atlas pages from inline resources. See widget example source and README.md 2017-04-11 13:38:33 +02:00
badlogic
f05174fcb8 [ts] Fixed order of registering asset loads/errors and callbacks. Fixed setting crossOrigin policy and setting source on newly created images 2016-11-14 13:16:06 +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
badlogic
0e59f99956 [ts] Removed demo assets, we now load from the server (using CORS). Enabled PMA for all demos, rewired some assets 2016-08-31 11:56:30 +02:00
badlogic
830a2ad040 [ts] Added playback controls to demos 2016-08-26 11:29:02 +02:00
badlogic
28b97e4532 [ts] Final touches to samples, removed underscore from private fields 2016-08-19 14:10:30 +02:00
badlogic
847bd2a76c [ts] More refactoring for greater code reuse 2016-08-16 10:41:28 +02:00
badlogic
e72c9030eb [ts] Refactored AssetManager and TextureAtlas to be in core/ package for sharing between backends 2016-08-16 10:27:50 +02:00