Releases: libktx/ktx
KTX 1.9.8-b5
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
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
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 followingShapeRenderer
extension methods:arc
box
circle
cone
ellipse
rect
rectLine
rotate
scale
translate
triangle
- [CHANGE] (
ktx-app
,ktx-graphics
) Utility functions moved fromktx-app
to the newktx-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 in1.9.8-b2
tag.
KTX 1.9.8-b2
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
andx
infix functions added toVector2
andVector3
allow to calculate dot products and cross products of two vectors respectively. - [FEATURE] (
ktx-box2d
) Initiation blocks ofBody
inWorld.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 ofVector2
,Vector3
,Matrix3
andMatrix4
(+
,-
,*
,/
) 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 toVector2
,Vector3
,Matrix3
andMatrix4
. - [CHANGE] (
ktx-math
) Parameters of matrix vector multiplication operators are switched.vector * matrix
does not exist anymore and now is available asmatrix * vector
. - [CHANGE] (
ktx-math
) Operators ofMatrix3
to left-multiply aVector3
were removed.
KTX 1.9.8-b1
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 tocreate
,entity
andwith
, simplifying the implementation and making configuration blocks optional. - [CHANGE] (
ktx-inject
) Parameters ofbindSingleton
consuming multiple classes have been swapped to be more compatible with thebind
functions. - [CHANGE] (
ktx-inject
)bind
andbindSingleton
methods consuming multiple classes now takeKClass
as parameters instead ofClass
, so now you can useYourType::class
instead of more verboseYourType::class.java
. - [FEATURE] (
ktx-style
) Initiation blocks ofSkin
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 forbindSingleton
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
) Implementedktx-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 generateBitmapFont
with Kotlin DSL.
- [FEATURE] (
ktx-freetype-async
) Implementedktx-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 itsChainShape
implementation,ChainShape
utilities are supported once again.
KTX 1.9.7-b1
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 that1.9.7-b1
should work with LibGDX 1.9.8 without any issues.
KTX 1.9.6-b7
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. UseKtxApplicationAdapter
orKtxGame
instead. - [CHANGE] (
ktx-app
)KtxGame
no longer supports fixed rendering time steps. - [FEATURE] (
ktx-app
) Clearing screen on rendering is now optional when usingKtxGame
. ChangeclearScreen
parameter tofalse
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
) AddedRayCast
object with constants that can be returned by the customRayCastCallback
implementations.
KTX 1.9.6-b6
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 supportEngine
base class additionally to thePooledEngine
.Engine.add
andEngine.entity
extension methods to replacePooledEngine
equivalents.- Changed
PooledEntity
toEngineEntity
, wrappingEntity
and providing access toEngine
API.
- [CHANGE] (
ktx-async
)TextAssetLoader
now extendsAsynchronousAssetLoader
instead ofSynchronousAssetLoader
. - [FIX] (
ktx-async
)AssetStorage
now correctly handlesSynchronousAssetLoader
instances on the main rendering thread.
KTX 1.9.6-b5
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
andonKeyboardFocus
factory methods forEventListener
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
) ExistingonChange
,onClick
,onKey
,onKeyDown
,onKeyUp
,onScrollFocus
andonKeyboardFocus
factory methods where renamed toonChangeEvent
,onClickEvent
,onKeyEvent
,onKeyDownEvent
,onKeyUpEvent
,onScrollFocusEvent
andonKeyboardFocusEvent
respectively. Their excessive amount of parameters, useful only on rare occasions, led to unnecessary boilerplate during listeners creation. Seektx-actors
file documentation for migration guide. - [FEATURE] (
ktx-ashley
) new KTX module with Ashley entity component system utilities:ktx-ashley
.PooledEngine.add
andPooledEngine.entity
extension methods.PooledEntity
wrappingEntity
and providing access toPooledEngine
API.mapperFor
factory method that allows to createComponentMapper
instances.- Accessors for
Entity
objects usingComponentMappers
:get
,has
,hasNot
,remove
. - DSL methods for constructing
Family
builders withKClass
instances:oneOf
,allOf
,exclude
.
Known issues:
- [BUG] (
ktx-async
)AssetStorage
handlesSynchronousAssetLoader
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
Includes notable improvements of ktx-app
, ktx-collections
and ktx-inject
API.
- [FEATURE] (
ktx-collections
) Addedmap
,filter
andflatten
extension methods that return LibGDX collections. - [FEATURE] (
ktx-collections
)PooledList
now properly implementshashCode
andequals
. - [FEATURE] (
ktx-app
) AddedKtxGame
: KTX equivalent of LibGDXGame
. - [FEATURE] (
ktx-app
) AddedKtxScreen
: adapter of the LibGDXScreen
interface making all methods optional to implement. - [FEATURE] (
ktx-app
) AddedemptyScreen
utility method returning a no-op implementation ofScreen
. - [FEATURE] (
ktx-inject
)Context
now implementsDisposable
and allows to dispose of all registered singletons and providers. - [FEATURE] (
ktx-inject
) AddedContext.remove
andremoveProvider
methods. Now providers for particular types can be removed without clearing the whole context. - [FEATURE] (
ktx-inject
)getProvider
,setProvider
andclear
methods ofContext
are now open and can be overridden.
Known issues:
- [INCOMPATIBILITY] (
ktx-async
) This module was compiled againstkotlinx-coroutines-core
version0.15
and will not work with newer releases (including0.16
).