Skip to content

Releases: libktx/ktx

KTX 1.9.8-b5

20 Sep 21:03
Compare
Choose a tag to compare
KTX 1.9.8-b5 Pre-release
Pre-release

Maintenance release with major dependencies update and an improvement of the ktx-ashley component creation API.


  • [UPDATE] Updated to Kotlin 1.2.70.
  • [UPDATE] Updated to Kotlin Coroutines 0.26.1.
  • [UPDATE] Updated to Gradle 4.10.2.
  • [FIX] (ktx-ashley) Component classes without a default no-arg constructors could not have been initiated by the Ashley engine. This is still the case, but now an exception with a meaningful message is thrown.

KTX 1.9.8-b4

27 Jul 17:56
Compare
Choose a tag to compare
KTX 1.9.8-b4 Pre-release
Pre-release

Maintenance release with notable dependencies updates and ktx-collections unit tests refactoring.


  • [UPDATE] Updated to Kotlin 1.2.51.
  • [UPDATE] Updated to Kotlin Coroutines 0.24.0.
  • [UPDATE] Updated to Dokka 0.9.17.
  • [UPDATE] Updated to Gradle 4.9.
  • [CHANGE] (ktx-async) KtxAsync.asynchronous is now inlined. The action lambda is cross-inlined to avoid excessive object creation.

KTX 1.9.8-b3

01 Jun 10:33
Compare
Choose a tag to compare
KTX 1.9.8-b3 Pre-release
Pre-release

The first release to feature the new ktx-graphics module with ShapeRenderer extensions and various graphics-related utilities moved from the ktx-app module.


  • [UPDATE] Updated to Kotlin 1.2.41.
  • [UPDATE] Updated to Gradle 4.7.
  • [FEATURE] (ktx-graphics) Added new graphics module with the following ShapeRenderer extension methods:
    • arc
    • box
    • circle
    • cone
    • ellipse
    • rect
    • rectLine
    • rotate
    • scale
    • translate
    • triangle
  • [CHANGE] (ktx-app, ktx-graphics) Utility functions moved from ktx-app to the new ktx-graphics:
    • color
    • Color.copy
    • Batch.use
    • ShaderProgram.use
  • [MISC] Removed migration guides from very old versions. If you are in a process of migrating an existing application to the latest KTX and facing any errors, see README files in 1.9.8-b2 tag.

KTX 1.9.8-b2

07 Mar 22:49
Compare
Choose a tag to compare
KTX 1.9.8-b2 Pre-release
Pre-release

Contains notable breaking changes to ktx-math operators in order to prevent calculation errors arising from vectors and matrices mutability.


  • [UPDATE] Updated to Kotlin 1.2.30.
  • [UPDATE] Updated to Kotlin Coroutines 0.22.5.
  • [UPDATE] Updated to Dokka 0.9.16.
  • [UPDATE] Updated to Gradle 4.6.
  • [FEATURE] (ktx-math) dot and x infix functions added to Vector2 and Vector3 allow to calculate dot products and cross products of two vectors respectively.
  • [FEATURE] (ktx-box2d) Initiation blocks of Body in World.body extension method is now optional thanks to default lambda parameters in inlined functions.
  • [FEATURE] (ktx-box2d) World.query extension method allowing to execute AABB query with idiomatic Kotlin.
  • [CHANGE] (ktx-math) Binary operators of Vector2, Vector3, Matrix3 and Matrix4 (+, -, *, /) no longer modify the first vector or matrix. Instead, they create new instances of vectors or matrices that store the operation result. Use the assign operators (+=, -=, *=, /=) instead to avoid creating new instances.
  • [CHANGE] (ktx-math) New mutating assign operators (+=, -=, *=, /=) were added to Vector2, Vector3, Matrix3 and Matrix4.
  • [CHANGE] (ktx-math) Parameters of matrix vector multiplication operators are switched. vector * matrix does not exist anymore and now is available as matrix * vector.
  • [CHANGE] (ktx-math) Operators of Matrix3 to left-multiply a Vector3 were removed.

KTX 1.9.8-b1

27 Jan 13:04
Compare
Choose a tag to compare
KTX 1.9.8-b1 Pre-release
Pre-release

The first release that contains ktx-freetype and ktx-freetype-async modules: FreeType font loading utilities. The transition from Kotlin 1.1 to 1.2 also allowed us to use default functional parameters in inlined methods, which simplified some APIs. It also contains notable changes and simplifications of the ktx-inject API.


  • [UPDATE] Updated to LibGDX 1.9.8.
  • [UPDATE] Updated to Kotlin 1.2.21.
  • [UPDATE] Updated to Kotlin Coroutines 0.22.
  • [UPDATE] Updated to Gradle 4.4.
  • [UPDATE] Updated to VisUI 1.4.0.
  • [CHANGE] (ktx-scene2d) Duplicate functions in Scene2D building DSL were removed thanks to optional default lambda parameters in inlined functions (added in Kotlin 1.2). Due to the limitation in inlined methods, there used to be two inlined methods for each actor to support syntax both with braces (init block) and without. Now there is just one factory method supporting both syntax variants per widget. This should not affect most application, but might require
    Kotlin 1.2 usage.
  • [CHANGE] (ktx-ashley) Default functional parameters were added to create, entity and with, simplifying the implementation and making configuration blocks optional.
  • [CHANGE] (ktx-inject) Parameters of bindSingleton consuming multiple classes have been swapped to be more compatible with the bind functions.
  • [CHANGE] (ktx-inject) bind and bindSingleton methods consuming multiple classes now take KClass as parameters instead of Class, so now you can use YourType::class instead of more verbose YourType::class.java.
  • [FEATURE] (ktx-style) Initiation blocks of Skin and Scene2D actor styles are now optional.
  • [FEATURE] (ktx-vis-style) Initiation blocks of VisUI actor styles are now optional.
  • [FEATURE] (ktx-box2d) Initiation blocks of fixtures and joints are now optional thanks to default lambda parameters in inlined functions.
  • [FEATURE] (ktx-inject) Add higher-order function parameters for bindSingleton to allow the use of lambda expressions.
fun createCircle(body: Body) {
    // Before - would not compile without additional braces:
    body.circle(radius = 2f) {}
    
    // Now - braces are optional (lambda parameter defaults to no-op):
    body.circle(radius = 2f)
}
  • [FEATURE] (ktx-freetype) Implemented ktx-freetype module.
    • AssetManager.registerFreeTypeFontLoaders allows to register all loaders necessary to handle FreeType font assets.
    • AssetManager.loadFreeTypeFont provides Kotlin DSL for loading of FreeType fonts.
    • freeTypeFontParameters function provides Kotlin DSL for building FreeType font loading parameters.
    • FreeTypeFontGenerator.generateFont extension function allows to generate BitmapFont with Kotlin DSL.
  • [FEATURE] (ktx-freetype-async) Implemented ktx-freetype-async module.
    • AssetStorage.registerFreeTypeFontLoaders allows to register all loaders necessary to handle FreeType font assets.
    • AssetStorage.loadFreeTypeFont provides Kotlin DSL for asynchronous loading of FreeType fonts.
  • [FIX] (ktx-box2d) As LibGDX 1.9.8 fixes its ChainShape implementation, ChainShape utilities are supported once again.

KTX 1.9.7-b1

02 Nov 19:18
Compare
Choose a tag to compare
KTX 1.9.7-b1 Pre-release
Pre-release

The first release supporting LibGDX 1.9.7.


  • [UPDATE] Updated LibGDX to 1.9.7.
  • [UPDATE] Updated to Kotlin 1.1.51.
  • [UPDATE] Updated to Kotlin Coroutines 0.19.3.
  • [UPDATE] Updated to Gradle 4.3.

Known issues:

  • [BUG] (ktx-box2d) ChainShape does not work correctly in LibGDX 1.9.7, and hence is not supported in KTX. This might break existing applications. If your application relies on Box2D, it is advised to use previous or next LibGDX release. Note that 1.9.7-b1 should work with LibGDX 1.9.8 without any issues.

KTX 1.9.6-b7

06 Aug 15:32
Compare
Choose a tag to compare
KTX 1.9.6-b7 Pre-release
Pre-release

Features significant updates of official Kotlin libraries. Removes fixed rendering time step support from ktx-app, as it seemed to cause more issues than it actually solved.


  • [UPDATE] Updated to Kotlin 1.1.3-2.
  • [UPDATE] Updated to Kotlin Coroutines 0.17.
  • [UPDATE] Updated to Gradle 4.0.2.
  • [CHANGE] (ktx-app) KotlinApplication was removed. Use KtxApplicationAdapter or KtxGame instead.
  • [CHANGE] (ktx-app) KtxGame no longer supports fixed rendering time steps.
  • [FEATURE] (ktx-app) Clearing screen on rendering is now optional when using KtxGame. Change clearScreen parameter to false to turn off screen clearing.
  • [FEATURE] (ktx-box2d) World.rayCast extension methods that allow creating ray-cast callbacks with the Kotlin lambda syntax. KtxRayCastCallback alias added to ease implementation of this utility.
  • [FEATURE] (ktx-box2d) Added RayCast object with constants that can be returned by the custom RayCastCallback implementations.

KTX 1.9.6-b6

22 Jun 00:06
Compare
Choose a tag to compare
KTX 1.9.6-b6 Pre-release
Pre-release

Brings a significant fix to AssetStorage, as well as a partial rewrite of ktx-ashley module - now it depends on the latest version of the Ashley framework and uses some of its new features.


  • [UPDATE] Updated to Gradle 4.0.
  • [UPDATE] Updated to Ashley 1.7.3.
  • [CHANGE] (ktx-ashley) Extensions updated to support Engine base class additionally to the PooledEngine.
    • Engine.add and Engine.entity extension methods to replace PooledEngine equivalents.
    • Changed PooledEntity to EngineEntity, wrapping Entity and providing access to Engine API.
  • [CHANGE] (ktx-async) TextAssetLoader now extends AsynchronousAssetLoader instead of SynchronousAssetLoader.
  • [FIX] (ktx-async) AssetStorage now correctly handles SynchronousAssetLoader instances on the main rendering thread.

KTX 1.9.6-b5

13 Jun 19:50
Compare
Choose a tag to compare
KTX 1.9.6-b5 Pre-release
Pre-release

Includes a new module with Ashley ECS library utilities - ktx-ashley. Contains minor breaking changes in ktx-actors - listeners API was simplified.


  • [UPDATE] Updated to Kotlin 1.1.2-5.
  • [UPDATE] Updated to Kotlin Coroutines 0.16.
  • [FEATURE] (ktx-actors) onChange, onClick, onKey, onKeyDown, onKeyUp, onScrollFocus and onKeyboardFocus factory methods for EventListener instances were added. Contrary to existing factory methods, these use minimal set of parameters to make listeners creation as concise as possible.
  • [CHANGE] (ktx-actors) Existing onChange, onClick, onKey, onKeyDown, onKeyUp, onScrollFocus and onKeyboardFocus factory methods where renamed to onChangeEvent, onClickEvent, onKeyEvent, onKeyDownEvent, onKeyUpEvent, onScrollFocusEvent and onKeyboardFocusEvent respectively. Their excessive amount of parameters, useful only on rare occasions, led to unnecessary boilerplate during listeners creation. See ktx-actors file documentation for migration guide.
  • [FEATURE] (ktx-ashley) new KTX module with Ashley entity component system utilities: ktx-ashley.
    • PooledEngine.add and PooledEngine.entity extension methods.
    • PooledEntity wrapping Entity and providing access to PooledEngine API.
    • mapperFor factory method that allows to create ComponentMapper instances.
    • Accessors for Entity objects using ComponentMappers: get, has, hasNot, remove.
    • DSL methods for constructing Family builders with KClass instances: oneOf, allOf, exclude.

Known issues:

  • [BUG] (ktx-async) AssetStorage handles SynchronousAssetLoader instances on the IO thread pool instead of the main rendering thread, which causes issues with some synchronous loaders that need access to the OpenGL context.

KTX 1.9.6-b4

01 Jun 19:47
Compare
Choose a tag to compare
KTX 1.9.6-b4 Pre-release
Pre-release

Includes notable improvements of ktx-app, ktx-collections and ktx-inject API.


  • [FEATURE] (ktx-collections) Added map, filter and flatten extension methods that return LibGDX collections.
  • [FEATURE] (ktx-collections) PooledList now properly implements hashCode and equals.
  • [FEATURE] (ktx-app) Added KtxGame: KTX equivalent of LibGDX Game.
  • [FEATURE] (ktx-app) Added KtxScreen: adapter of the LibGDX Screen interface making all methods optional to implement.
  • [FEATURE] (ktx-app) Added emptyScreen utility method returning a no-op implementation of Screen.
  • [FEATURE] (ktx-inject) Context now implements Disposable and allows to dispose of all registered singletons and providers.
  • [FEATURE] (ktx-inject) Added Context.remove and removeProvider methods. Now providers for particular types can be removed without clearing the whole context.
  • [FEATURE] (ktx-inject) getProvider, setProvider and clear methods of Context are now open and can be overridden.

Known issues:

  • [INCOMPATIBILITY] (ktx-async) This module was compiled against kotlinx-coroutines-core version 0.15 and will not work with newer releases (including 0.16).