36 Commits

Author SHA1 Message Date
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
61b71e1d9a [ts] Player example fixes, clean up.
* Use minified JS and CSS absolute URLs.
* Renamed index.html so the other html file can be reached more easily.
* generator.html doesn't seem to work?
2021-06-22 15:43:50 -04:00
Nathan Sweet
b044bdbf47 [ts] Player updates.
* If no config animation, start paused and set one when first clicked (showControls only).
* Updated player editor to 4.0.
* Don't name example index.html to make it easier to reach other files in same dir.
* Adjust CSS.
2021-06-20 14:46:48 -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
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
5c1d4c4369 [ts][player] Made Player.setAnimation() public and added a loop parameter. See player example on how to manually trigger animations. 2021-05-27 17:40:13 +02: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
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
Nathan Sweet
98a6c8f696 Exported examples with export.sh 4.0.05-beta and ran runtimes.sh. 2020-10-10 16:22:40 -07:00
badlogic
033703e900 [player] Implemented generator reset. 2019-12-14 02:29:32 +01:00
badlogic
121467572c [player] Added Player.stopRendering() to interrupt the requestAnimationFrame loop. 2019-12-14 02:19:22 +01:00
badlogic
a5428585e2 [player] Reworked generator. 2019-12-14 01:57:01 +01:00
badlogic
a2bae9dea4 [ts] Generator background image UI and application. 2019-11-28 10:35:16 +01:00
badlogic
fca2f0c7af [ts] web player generator. 2019-11-26 18:12:13 +01:00
badlogic
16bd92f443 [ts][player] Added asset embedding examples for Spine Web Player. 2019-11-07 15:42:14 +01:00
badlogic
8e0a2e0c75 [ts][player] Added AssetManager.setRawDataURI(path, name). Allows to set a path and corresponding raw data URI which enables embedding of resources like skeletons, atlases, and so on directly in HTML/JS. Added SpinePlayerConfig.rawDataURIs, see the player example for a demonstration. Also closes #1541, closes #1539. 2019-11-05 15:20:50 +01: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
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
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
c68d85a1fc [c][cpp] Ported addition of x/y bounding coordinates to SkeletonData. See #1325. 2019-04-16 14:06:41 +02:00
badlogic
4406cdfba0 Updated examples in example projects. 2019-02-19 15:59:30 +01:00
badlogic
1cf8a72e30 [ts][player] Closes #1238, disable pause/play when controls are hidden via options. 2019-01-03 13:43:23 +01:00
badlogic
0d6deee210 [ts][player] Added embedable player code editor. 2018-12-20 15:22:23 +01:00
badlogic
d5ee59558a [ts][player] constructor now takes string in addition to HTMLElement, hover behaviour now similar to YouTube. 2018-12-17 18:00:44 +01:00
badlogic
075d4a1be5 [ts][player] Removed old widget. Renamed TSC output to spine-player.js, moved sources from widget/ to player/. 2018-12-17 15:32:25 +01:00