Skip to content

Releases: libktx/ktx

KTX 1.9.6-b3

14 May 21:37
Compare
Choose a tag to compare
KTX 1.9.6-b3 Pre-release
Pre-release

Features a new module with Box2D utilities: ktx-box2d. Notable changes include a new coroutines-based asset loader - AssetStorage from ktx-async - and removal of all previously deprecated features.


  • [UPDATE] Updated to Kotlin 1.1.2-3.
  • [UPDATE] Updated to Kotlin Coroutines to 0.15.
  • [CHANGE] (ktx-assets) Static AssetManager instance container - Assets - was removed. All top level functions depending on the global AssetManager were removed.
  • [FEATURE] (ktx-assets) Added FileType.getResolver extension method creating FileHandleResolver instances.
  • [FEATURE] (ktx-assets) Added FileHandleResolver.withPrefix extension method decorating resolvers with PrefixFileHandleResolver.
  • [FEATURE] (ktx-assets) Added FileHandleResolver.forResolutions extension method decorating resolvers with ResolutionFileResolver.
  • [FEATURE] (ktx-assets) Added resolution function constructing ResolutionFileResolver.Resolution instances.
  • [FEATURE] (ktx-async) Added AssetStorage: a lightweight coroutines-based alternative to AssetManager.
  • [FEATURE] (ktx-box2d) Implemented a new KTX module with Box2D physics engine utilities: ktx-box2d.
    • world factory method constructing World instances.
    • World.body extension method providing type-safe builder DSL for Body instances.
    • FixtureDef builder methods supporting all shapes (CircleShape, PolygonShape, ChainShape, EdgeShape).
    • FixtureDef.filder extension methods simplifying Filter properties setup.
    • BodyDefinition is a BodyDef extension providing Body building DSL. Used internally by World.body.
    • FixtureDefinition is a FixtureDef extension providing Fixture building DSL. Used internally by BodyDefinition.
    • fixture, circle, box, polygon, chain, loop and edge extension Fixture building methods added to Body.
    • earthGravity property allowing to set World gravity roughly matching Earth's gravity.
    • onCreate callbacks in BodyDefinition and FixtureDefinition giving access to built Body and Fixture instances in building blocks.
    • Body extension methods that ease creation of Joint instances between 2 bodies: jointWith, gearJointWith, ropeJointWith, weldJointWith, motorJointWith, mouseJointWith, wheelJointWith, pulleyJointWith, distanceJointWith, frictionJointWith, revoluteJointWith, prismaticJointWith.
  • [CHANGE] (ktx-i18n) Static I18NBundle instance container - I18n - was removed.
  • [CHANGE] (ktx-i18n) Top level nls functions were removed.
  • [FEATURE] (ktx-i18n) nls property and method added to BundleLine for extra readability.
  • [CHANGE] (ktx-inject) Static Context instance container was removed. All top level functions depending on the global Context were removed.
  • [FEATURE] (ktx-inject) Context.register builder method added to ease context initiation process.

KTX 1.9.6-b2

22 Apr 15:50
Compare
Choose a tag to compare
KTX 1.9.6-b2 Pre-release
Pre-release

The first release with the io.github.libktx group ID. Features a new module: ktx-async. Contains a few API changes, most notably in ktx-vis and ktx-scene2d modules - make sure to check README files for migration guides.


  • [UPDATE] Updated to Kotlin 1.1.1.
  • [UPDATE] Updated to VisUI 1.3.0.
  • [FEATURE] (ktx-actors) Added inlined txt extension properties to Label and TextButton widgets.
  • [FEATURE] (ktx-actors) Added KtxInputListener: an InputListener extension with parameter types improvements.
  • [FEATURE] (ktx-actors) alpha extension properties of Actor and Stage are now inlined.
  • [FEATURE] (ktx-app) Added KtxApplicationAdapter interface which makes implementing all of ApplicationListener methods optional.
  • [FEATURE] (ktx-app) Added KtxInputAdapter interface which makes implementing all of InputProcessor methods optional.
  • [FEATURE] (ktx-app) Added use inlined methods to Batch and ShaderProgram, allowing to omit begin() and end() calls.
  • [FEATURE] (ktx-app) Added color factory method to allow constructing LibGDX Color instances with named parameters.
  • [FEATURE] (ktx-app) Added Color.copy extension method that allows to copy Color instances with optional overriding of chosen values.
  • [CHANGE] (ktx-app) KotlinApplication#timeSinceLastRender now has a protected default getter.
  • [CHANGE] (ktx-assets) Static AssetManager instance container was deprecated. Static access to AssetManager will be removed in the next release.
  • [FEATURE] (ktx-assets) Added load, loadAsset, loadOnDemand, getAsset, unload and unloadSafety extension methods to AssetManager to provide an alternative to equivalent utility functions using static manager instance.
  • [FEATURE] (ktx-assets) Added getLoader and setLoader extension methods to AssetManager for AssetLoader handling.
  • [FEATURE] (ktx-async) Implemented a new KTX module with multi-threaded operations utilities: ktx-async.
    • Implemented coroutines context using LibGDX threading model: KtxAsync. It resumes suspending operations on the main rendering thread with Gdx.app.postRunnable utility. It has to be initiated on the main thread with enableKtxCoroutines.
    • Added utility ktxAsync function which launches non-blocking coroutine using KtxAsync context.
    • Added skipFrame method that suspends the coroutine and resumes it on the next frame using Gdx.app.postRunnable.
    • Added delay method that offers non-blocking coroutine suspensions for the given period of time.
    • Added httpRequest method that performs asynchronous suspending HTTP request using LibGDX Net API.
    • Added asynchronous method, which allows to perform suspending operations on a separate thread.
    • schedule and interval utility methods added to ease the use of com.badlogic.gdx.utils.Timer API.
    • Added HttpRequestResult: a thread-safe HttpResponse wrapper that addresses libgdx#4700.
  • [FEATURE] (ktx-collections) Added sortDescending, sortBy and sortByDescending utility methods to LibGDX Array.
  • [FEATURE] (ktx-collections) Added type aliases to LibGDX collections to avoid name collisions with standard library:
    • GdxArray: com.badlogic.gdx.utils.Array
    • GdxIntArray: com.badlogic.gdx.utils.IntArray
    • GdxFloatArray: com.badlogic.gdx.utils.FloatArray
    • GdxBooleanArray: com.badlogic.gdx.utils.BooleanArray
    • GdxCharArray: com.badlogic.gdx.utils.CharArray
    • GdxLongArray: com.badlogic.gdx.utils.LongArray
    • GdxShortArray: com.badlogic.gdx.utils.ShortArray
    • GdxSet: com.badlogic.gdx.utils.ObjectSet
    • GdxMap: com.badlogic.gdx.utils.ObjectMap
    • GdxList: ktx.collections.PooledList
  • [FEATURE] (ktx-collections) lastIndex extension properties of LibGDX arrays are now inlined.
  • [FEATURE] (ktx-collections) Added component1() and component2() operator extension methods to Entry classes of LibGDX maps to support destructing syntax and simplify iteration.
  • [CHANGE] (ktx-i18n) Static I18NBundle instance container was deprecated. Static access to I18NBundle will be removed in the next release.
  • [CHANGE] (ktx-inject) Static Context instance container was deprecated. Static access to Context will be removed in the next release.
  • [FEATURE] (ktx-scene2d, ktx-vis) inCell extension property added to Table children. Now you can easily access Cell instance outside of the actors' building blocks.
  • [FEATURE] (ktx-scene2d, ktx-vis) inNode extension property added to Tree children. Now you can easily access Node instance outside of the actors' building blocks.
  • [FEATURE] (ktx-scene2d, ktx-vis) fluent cell extension method added to Table children, allowing to configure Cell properties outside of actors' building blocks.
  • [FEATURE] (ktx-scene2d, ktx-vis) fluent node extension method added to Tree children, allowing to configure Node properties outside of actors' building blocks.
  • [FEATURE] (ktx-scene2d, ktx-vis) Resolved DSL scoping issues with Kotlin 1.1 @DslMarker API.
  • [CHANGE] (ktx-scene2d, ktx-vis) Due to @DslMarker introduction, implicit access to parental widgets is no longer possible in children building blocks. See ktx-scene2d or ktx-vis documentation for more info on the migration.
  • [CHANGE] (ktx-scene2d) KNode.invoke extension method was moved directly to KNode API and no longer has to be imported.
  • [FEATURE] (ktx-style) Skin instance is now available under lambda parameter of skin method init blocks.
  • [FEATURE] (ktx-style, ktx-style-vis) Resolved DSL scoping issues with Kotlin 1.1 @DslMarker API.
  • [CHANGE] (ktx-style, ktx-style-vis) Due to @DslMarker introduction, implicit access to Skin instance is no longer possible. See ktx-style documentation for more info on the migration.
  • [FEATURE] (ktx-vis) Added support for HorizontalCollapsibleWidget: horizontalCollapsible builder methods added to all parental actors.
  • [FEATURE] (ktx-vis) Added support for VisTree building using type-safe API.
  • [CHANGE] (ktx-vis) Cells and nodes are now available as lambda parameters. See ktx-vis documentation for migration guide.

KTX 1.9.6-b1

10 Mar 21:25
Compare
Choose a tag to compare
KTX 1.9.6-b1 Pre-release
Pre-release

The last release with the com.github.czyzby group ID.


Change log:

  • [UPDATE] Updated to LibGDX 1.9.6.
  • [UPDATE] Updated to Kotlin 1.1.0.
  • [FEATURE] (ktx-collections) Added null-safe size() method to LibGDX IntArray, FloatArray and BooleanArray collections.
  • [FEATURE] (ktx-collections) Added null-safe extension property lastIndex to LibGDX ArrayList equivalents: Array, IntArray, FloatArray and BooleanArray.

KTX 1.9.5-b1

13 Dec 11:05
Compare
Choose a tag to compare
KTX 1.9.5-b1 Pre-release
Pre-release

The first release that supports LibGDX 1.9.5.


Change log:

  • [UPDATE] Updated to LibGDX 1.9.5.

KTX 1.9.4-b2

29 Oct 10:57
Compare
Choose a tag to compare
KTX 1.9.4-b2 Pre-release
Pre-release

The first release that contains ktx-app module - ApplicationListener implementation utilities.


Change log:

  • [FEATURE] (ktx-actors) Added Actor.onKeyUp and Actor.onKeyDown extension methods that attach
    EventListener implementations listening to InputEvent instances.
  • [FEATURE] (ktx-app) Implemented ktx-app module.
    • KotlinApplication was added as an ApplicationAdapter.
    • clearScreen utility function allows to easily clear the application screen.
    • LetterboxingViewport is a Viewport implementation that combines ScreenViewport and FitViewport behaviors.
  • [FEATURE] (ktx-vis) Added ListViewStyle support to ListView factory methods.
  • [FEATURE] (ktx-vis) Added top level tab() method.
  • [FEATURE] (ktx-vis-style) Added ListViewStyle factory method: listView.
  • [FIX] (ktx-scene2d) Added missing TextButton factory methods.

KTX 1.9.4-b1

01 Oct 17:17
Compare
Choose a tag to compare
KTX 1.9.4-b1 Pre-release
Pre-release

The first released version of the library.


Change log:

  • [UPDATE] Updated to LibGDX 1.9.4.
  • [FEATURE] (ktx-actors) Implemented ktx-actors module.
    • isShown, centerPosition, setKeyBoardFocus and setScrollFocus extension methods for Actor.
    • contains operator extension method of Group and Stage supporting actor in group syntax.
    • + and - operator for adding actors to Group and Stage.
    • alpha extension field for Actor and Stage.
    • Lambda consuming onChange, onClick, onKey, onScrollFocus and onKeyboardFocus extension methods for Actor, allowing to quickly define event listeners.
    • + and - operator extension methods can be used to add Action instances to a Stage.
    • Action.then infix extension method can be used to chain actions into sequences.
    • Action.repeatForever wraps an action in a RepeatAction without a repetitions limit.
  • [FEATURE] (ktx-assets) Implemented ktx-assets module.
    • Assets.manager global AssetManager instance.
      • load function can be used to load assets asynchronously via the global AssetManager instance. loadOnDemand can be used to load assets immediately in a blocking manner. unload can unload the assets.
      • asset function can be used to access loaded assets from the global AssetManager instance.
      • isLoaded allows to check if an asset has been loaded by the global AssetManager.
    • disposeSafely and lambda consuming dispose were added to Disposable.
    • Iterable and Array instances storing Disposable elements can now be disposed.
    • Exception.ignore extension method was added for explicit no-op handling of exceptions.
    • Pool.invoke operator extension method was added as an alternative to Pool.obtain.
    • Pool.invoke(T) operator extension method was added as an alternative to Pool.free(T).
    • Lambda consuming pool factory function was added.
    • toClasspathFile, toInternalFile, toLocalFile, toExternalFile and toAbsoluteFile converter methods added to FileHandle.
    • file factory function was added.
  • [FEATURE] (ktx-collections) Implemented ktx-collections module.
    • Array factory function gdxArrayOf and converter method toGdxArray.
    • Array extensions including: isEmpty, isNotEmpty, size, +, -, getLast, removeLast, get, addAll, removeAll, iterate.
    • ObjectSet factory function gdxSetOf and converter method toGdxSet.
    • ObjectSet extensions including: isEmpty, isNotEmpty, size, +, -, addAll, removeAll, iterate.
    • ObjectMap factory function gdxMapOf and IdentityMap factory gdxIdentityMapOf.
    • Maps extensions including: isEmpty, isNotEmpty, size, contains (in), set ([]), iterate, toGdxSet.
    • Lambda consuming Iterable.toGdxMap allows to convert any collection to a ObjectMap.
    • PooledList collection as an alternative to PooledLinkedList. Includes gdxListOf and toGdxList factory methods.
  • [FEATURE] (ktx-i18n) Implemented ktx-i18n module.
    • I18n.defaultBundle global I18NBundle instance loaded by I18n.load.
    • addListener, removeListener and clearListeners of I18n allow to handle the lifecycle of the global I18NBundle.
    • nls functions allow to access global I18NBundle.
    • I18NBundle.get operator function improves access to the bundle lines.
    • BundleLine is an interface designed to be implemented by enums that match bundle line names stored in an i18n properties file.
  • [FEATURE] (ktx-inject) Implemented ktx-inject module.
    • Context is the core of the dependency injection framework, storing the registered singletons and providers.
    • Global Context instance is available via ContextContainer.defaultContext.
    • inject and provider functions allow to extract instances and providers of selected type from the global Context.
    • register allows to add singletons and providers to the global Context.
  • [FEATURE] (ktx-log) Implemented ktx-log module.
    • debug, info and error functions allow to log data with the LibGDX logging API.
    • logger factory function provides instances of the KTX Logger that wraps LibGDX logging API.
  • [FEATURE] (ktx-math) Implemented ktx-math module.
    • vec2, vec3, mat3 and mat4 factory methods for Vector2, Vector3, Matrix3 and Matrix4 respectively.
    • +, -, *, /, -, ++, --, <, >, <=, >= operators support for Vector2 and Vector3.
    • +, -, *, !, - operators support for Matrix3 and Matrix4.
    • Vector2, Vector3, Matrix3 and Matrix4 are now decomposable into 2, 3, 9 and 16 components respectively.
  • [FEATURE] (ktx-scene2d) Implemented ktx-scene2d module.
    • Added DSL for constructing complex Scene2D widgets.
      • Factory methods for parental actors: buttonTable, container, dialog, horizontalGroup, scrollPane, splitPane, stack, table, tree, verticalGroup and window.
      • Factory methods for secondary parental actors: button, checkBox, imageButton and imageTextButton.
      • Factory methods for child actors: image, label, list, progressBar, selectBox, slider, textArea, textField and touchpad.
  • [FEATURE] (ktx-style) Implemented ktx-style module.
    • skin factory methods producing Skin instances.
    • get operator infix function for quick access of Skin resources.
    • set operator function for quick modification of Skin resources.
    • Factory methods for styles of Scene2D widgets: color, button, checkBox, imageButton, imageTextButton, label, list, progressBar, selectBox, slider, splitPane, textButton, textField, textTooltip, touchpad, tree, window.
  • [FEATURE] (ktx-vis) Implemented ktx-vis module.
    • Added DSL for constructing complex VisUI widgets.
  • [FEATURE] (ktx-vis-style) Implemented ktx-vis-style module.
    • Factory methods for styles of VisUI widgets.

Known issues:

  • [BUG] (ktx-scene2d) TextButton factory methods are missing.