Releases: libktx/ktx
Releases · libktx/ktx
KTX 1.9.6-b3
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
) StaticAssetManager
instance container -Assets
- was removed. All top level functions depending on the globalAssetManager
were removed. - [FEATURE] (
ktx-assets
) AddedFileType.getResolver
extension method creatingFileHandleResolver
instances. - [FEATURE] (
ktx-assets
) AddedFileHandleResolver.withPrefix
extension method decorating resolvers withPrefixFileHandleResolver
. - [FEATURE] (
ktx-assets
) AddedFileHandleResolver.forResolutions
extension method decorating resolvers withResolutionFileResolver
. - [FEATURE] (
ktx-assets
) Addedresolution
function constructingResolutionFileResolver.Resolution
instances. - [FEATURE] (
ktx-async
) AddedAssetStorage
: a lightweight coroutines-based alternative toAssetManager
. - [FEATURE] (
ktx-box2d
) Implemented a new KTX module with Box2D physics engine utilities:ktx-box2d
.world
factory method constructingWorld
instances.World.body
extension method providing type-safe builder DSL forBody
instances.FixtureDef
builder methods supporting all shapes (CircleShape
,PolygonShape
,ChainShape
,EdgeShape
).FixtureDef.filder
extension methods simplifyingFilter
properties setup.BodyDefinition
is aBodyDef
extension providingBody
building DSL. Used internally byWorld.body
.FixtureDefinition
is aFixtureDef
extension providingFixture
building DSL. Used internally byBodyDefinition
.fixture
,circle
,box
,polygon
,chain
,loop
andedge
extensionFixture
building methods added toBody
.earthGravity
property allowing to setWorld
gravity roughly matching Earth's gravity.onCreate
callbacks inBodyDefinition
andFixtureDefinition
giving access to builtBody
andFixture
instances in building blocks.Body
extension methods that ease creation ofJoint
instances between 2 bodies:jointWith
,gearJointWith
,ropeJointWith
,weldJointWith
,motorJointWith
,mouseJointWith
,wheelJointWith
,pulleyJointWith
,distanceJointWith
,frictionJointWith
,revoluteJointWith
,prismaticJointWith
.
- [CHANGE] (
ktx-i18n
) StaticI18NBundle
instance container -I18n
- was removed. - [CHANGE] (
ktx-i18n
) Top levelnls
functions were removed. - [FEATURE] (
ktx-i18n
)nls
property and method added toBundleLine
for extra readability. - [CHANGE] (
ktx-inject
) StaticContext
instance container was removed. All top level functions depending on the globalContext
were removed. - [FEATURE] (
ktx-inject
)Context.register
builder method added to ease context initiation process.
KTX 1.9.6-b2
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 inlinedtxt
extension properties toLabel
andTextButton
widgets. - [FEATURE] (
ktx-actors
) AddedKtxInputListener
: anInputListener
extension with parameter types improvements. - [FEATURE] (
ktx-actors
)alpha
extension properties ofActor
andStage
are now inlined. - [FEATURE] (
ktx-app
) AddedKtxApplicationAdapter
interface which makes implementing all ofApplicationListener
methods optional. - [FEATURE] (
ktx-app
) AddedKtxInputAdapter
interface which makes implementing all ofInputProcessor
methods optional. - [FEATURE] (
ktx-app
) Addeduse
inlined methods toBatch
andShaderProgram
, allowing to omitbegin()
andend()
calls. - [FEATURE] (
ktx-app
) Addedcolor
factory method to allow constructing LibGDXColor
instances with named parameters. - [FEATURE] (
ktx-app
) AddedColor.copy
extension method that allows to copyColor
instances with optional overriding of chosen values. - [CHANGE] (
ktx-app
)KotlinApplication#timeSinceLastRender
now has a protected default getter. - [CHANGE] (
ktx-assets
) StaticAssetManager
instance container was deprecated. Static access toAssetManager
will be removed in the next release. - [FEATURE] (
ktx-assets
) Addedload
,loadAsset
,loadOnDemand
,getAsset
,unload
andunloadSafety
extension methods toAssetManager
to provide an alternative to equivalent utility functions using static manager instance. - [FEATURE] (
ktx-assets
) AddedgetLoader
andsetLoader
extension methods toAssetManager
forAssetLoader
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 withGdx.app.postRunnable
utility. It has to be initiated on the main thread withenableKtxCoroutines
. - Added utility
ktxAsync
function which launches non-blocking coroutine usingKtxAsync
context. - Added
skipFrame
method that suspends the coroutine and resumes it on the next frame usingGdx.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 LibGDXNet
API. - Added
asynchronous
method, which allows to perform suspending operations on a separate thread. schedule
andinterval
utility methods added to ease the use ofcom.badlogic.gdx.utils.Timer
API.- Added
HttpRequestResult
: a thread-safeHttpResponse
wrapper that addresses libgdx#4700.
- Implemented coroutines context using LibGDX threading model:
- [FEATURE] (
ktx-collections
) AddedsortDescending
,sortBy
andsortByDescending
utility methods to LibGDXArray
. - [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
) Addedcomponent1()
andcomponent2()
operator extension methods toEntry
classes of LibGDX maps to support destructing syntax and simplify iteration. - [CHANGE] (
ktx-i18n
) StaticI18NBundle
instance container was deprecated. Static access toI18NBundle
will be removed in the next release. - [CHANGE] (
ktx-inject
) StaticContext
instance container was deprecated. Static access toContext
will be removed in the next release. - [FEATURE] (
ktx-scene2d
,ktx-vis
)inCell
extension property added toTable
children. Now you can easily accessCell
instance outside of the actors' building blocks. - [FEATURE] (
ktx-scene2d
,ktx-vis
)inNode
extension property added toTree
children. Now you can easily accessNode
instance outside of the actors' building blocks. - [FEATURE] (
ktx-scene2d
,ktx-vis
) fluentcell
extension method added toTable
children, allowing to configureCell
properties outside of actors' building blocks. - [FEATURE] (
ktx-scene2d
,ktx-vis
) fluentnode
extension method added toTree
children, allowing to configureNode
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. Seektx-scene2d
orktx-vis
documentation for more info on the migration. - [CHANGE] (
ktx-scene2d
)KNode.invoke
extension method was moved directly toKNode
API and no longer has to be imported. - [FEATURE] (
ktx-style
)Skin
instance is now available under lambda parameter ofskin
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 toSkin
instance is no longer possible. Seektx-style
documentation for more info on the migration. - [FEATURE] (
ktx-vis
) Added support forHorizontalCollapsibleWidget
:horizontalCollapsible
builder methods added to all parental actors. - [FEATURE] (
ktx-vis
) Added support forVisTree
building using type-safe API. - [CHANGE] (
ktx-vis
) Cells and nodes are now available as lambda parameters. Seektx-vis
documentation for migration guide.
KTX 1.9.6-b1
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-safesize()
method to LibGDXIntArray
,FloatArray
andBooleanArray
collections. - [FEATURE] (
ktx-collections
) Added null-safe extension propertylastIndex
to LibGDXArrayList
equivalents:Array
,IntArray
,FloatArray
andBooleanArray
.
KTX 1.9.5-b1
The first release that supports LibGDX 1.9.5.
Change log:
- [UPDATE] Updated to LibGDX 1.9.5.
KTX 1.9.4-b2
The first release that contains ktx-app
module - ApplicationListener
implementation utilities.
Change log:
- [FEATURE] (
ktx-actors
) AddedActor.onKeyUp
andActor.onKeyDown
extension methods that attach
EventListener
implementations listening toInputEvent
instances. - [FEATURE] (
ktx-app
) Implementedktx-app
module.KotlinApplication
was added as anApplicationAdapter
.clearScreen
utility function allows to easily clear the application screen.LetterboxingViewport
is aViewport
implementation that combinesScreenViewport
andFitViewport
behaviors.
- [FEATURE] (
ktx-vis
) AddedListViewStyle
support toListView
factory methods. - [FEATURE] (
ktx-vis
) Added top leveltab()
method. - [FEATURE] (
ktx-vis-style
) AddedListViewStyle
factory method:listView
. - [FIX] (
ktx-scene2d
) Added missingTextButton
factory methods.
KTX 1.9.4-b1
The first released version of the library.
Change log:
- [UPDATE] Updated to LibGDX 1.9.4.
- [FEATURE] (
ktx-actors
) Implementedktx-actors
module.isShown
,centerPosition
,setKeyBoardFocus
andsetScrollFocus
extension methods forActor
.contains
operator extension method ofGroup
andStage
supportingactor in group
syntax.+
and-
operator for adding actors toGroup
andStage
.alpha
extension field forActor
andStage
.- Lambda consuming
onChange
,onClick
,onKey
,onScrollFocus
andonKeyboardFocus
extension methods forActor
, allowing to quickly define event listeners. +
and-
operator extension methods can be used to addAction
instances to aStage
.Action.then
infix extension method can be used to chain actions into sequences.Action.repeatForever
wraps an action in aRepeatAction
without a repetitions limit.
- [FEATURE] (
ktx-assets
) Implementedktx-assets
module.Assets.manager
globalAssetManager
instance.load
function can be used to load assets asynchronously via the globalAssetManager
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 globalAssetManager
instance.isLoaded
allows to check if an asset has been loaded by the globalAssetManager
.
disposeSafely
and lambda consumingdispose
were added toDisposable
.Iterable
andArray
instances storingDisposable
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 toPool.obtain
.Pool.invoke(T)
operator extension method was added as an alternative toPool.free(T)
.- Lambda consuming
pool
factory function was added. toClasspathFile
,toInternalFile
,toLocalFile
,toExternalFile
andtoAbsoluteFile
converter methods added toFileHandle
.file
factory function was added.
- [FEATURE] (
ktx-collections
) Implementedktx-collections
module.Array
factory functiongdxArrayOf
and converter methodtoGdxArray
.Array
extensions including:isEmpty
,isNotEmpty
,size
,+
,-
,getLast
,removeLast
,get
,addAll
,removeAll
,iterate
.ObjectSet
factory functiongdxSetOf
and converter methodtoGdxSet
.ObjectSet
extensions including:isEmpty
,isNotEmpty
,size
,+
,-
,addAll
,removeAll
,iterate
.ObjectMap
factory functiongdxMapOf
andIdentityMap
factorygdxIdentityMapOf
.- Maps extensions including:
isEmpty
,isNotEmpty
,size
,contains
(in
),set
([]
),iterate
,toGdxSet
. - Lambda consuming
Iterable.toGdxMap
allows to convert any collection to aObjectMap
. PooledList
collection as an alternative toPooledLinkedList
. IncludesgdxListOf
andtoGdxList
factory methods.
- [FEATURE] (
ktx-i18n
) Implementedktx-i18n
module.I18n.defaultBundle
globalI18NBundle
instance loaded byI18n.load
.addListener
,removeListener
andclearListeners
ofI18n
allow to handle the lifecycle of the globalI18NBundle
.nls
functions allow to access globalI18NBundle
.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
) Implementedktx-inject
module.Context
is the core of the dependency injection framework, storing the registered singletons and providers.- Global
Context
instance is available viaContextContainer.defaultContext
. inject
andprovider
functions allow to extract instances and providers of selected type from the globalContext
.register
allows to add singletons and providers to the globalContext
.
- [FEATURE] (
ktx-log
) Implementedktx-log
module.debug
,info
anderror
functions allow to log data with the LibGDX logging API.logger
factory function provides instances of the KTXLogger
that wraps LibGDX logging API.
- [FEATURE] (
ktx-math
) Implementedktx-math
module.vec2
,vec3
,mat3
andmat4
factory methods forVector2
,Vector3
,Matrix3
andMatrix4
respectively.+
,-
,*
,/
,-
,++
,--
,<
,>
,<=
,>=
operators support forVector2
andVector3
.+
,-
,*
,!
,-
operators support forMatrix3
andMatrix4
.Vector2
,Vector3
,Matrix3
andMatrix4
are now decomposable into 2, 3, 9 and 16 components respectively.
- [FEATURE] (
ktx-scene2d
) Implementedktx-scene2d
module.- Added DSL for constructing complex
Scene2D
widgets.- Factory methods for parental actors:
buttonTable
,container
,dialog
,horizontalGroup
,scrollPane
,splitPane
,stack
,table
,tree
,verticalGroup
andwindow
. - Factory methods for secondary parental actors:
button
,checkBox
,imageButton
andimageTextButton
. - Factory methods for child actors:
image
,label
,list
,progressBar
,selectBox
,slider
,textArea
,textField
andtouchpad
.
- Factory methods for parental actors:
- Added DSL for constructing complex
- [FEATURE] (
ktx-style
) Implementedktx-style
module.skin
factory methods producingSkin
instances.get
operator infix function for quick access ofSkin
resources.set
operator function for quick modification ofSkin
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
) Implementedktx-vis
module.- Added DSL for constructing complex
VisUI
widgets.
- Added DSL for constructing complex
- [FEATURE] (
ktx-vis-style
) Implementedktx-vis-style
module.- Factory methods for styles of
VisUI
widgets.
- Factory methods for styles of
Known issues:
- [BUG] (
ktx-scene2d
)TextButton
factory methods are missing.