ktx v1.9.9-b1 Release Notes
Release Date: 2019-02-05 // about 5 years ago-
🚀 A major KTX release with some significant changes. Most notably:
ktx-async
module was overhauled and now properly provides coroutines scope consistent the stable coroutines API.- 🔨
AssetStorage
andktx-freetype-async
were temporarily removed until they are refactored to the newktx-async
API. ImmutableVector2
was added as an immutable alternative to the officialVector2
.
- ⚡️ [UPDATE] Updated LibGDX to 1.9.9.
- ⚡️ [UPDATE] Updated to Kotlin 1.3.20.
- ⚡️ [UPDATE] Updated to Kotlin Coroutines 1.1.1.
- ⚡️ [UPDATE] Updated VisUI to 1.4.2.
- ⚡️ [UPDATE] Updated to Gradle 5.0.
[CHANGE] (
ktx-actors
) ReplacedStage
andGroup
extension operator methodsplus
andminus
withplusAssign
andminusAssign
to avoid mutating the objects with addition and subtraction operators.// Adding an actor to a Stage/Group - before:stage + actor group + actor// Now:stage += actor group += actor
[CHANGE] (
ktx-actors
) ReplacedStage
andActor
extension operator methodsplus
andminus
withplusAssign
andminusAssign
to avoid mutating the objects with addition and subtraction operators.// Adding an action to a Stage/Actor - before:stage + action actor + action// Now:stage += action actor += action
[CHANGE] (
ktx-actors
)SequenceAction.then
was removed. Using the method on a sequence no longer mutates
it for consistency withAction.then
.then
now unwraps actors from passedSequenceActions
.[CHANGE] (
ktx-actors
)ParallelAction.parallelTo
was removed. Using the method on aParallelAction
no longer
mutates it for consistency withAction.parallelTo
.parallelTo
now unwraps actors from passedParallelActions
.[CHANGE] (
ktx-async
) Overhaul of thektx-async
module.KtxAsync
is now the main coroutines scope that should be used instead of theGlobalScope
.Dispatchers.KTX
can be used to access a coroutines dispatchers that executes tasks on the main rendering thread.AsyncExecutorDispatcher
can be used to wrap LibGDXAsyncExecutor
to execute tasks asynchronously.newSingleThreadAsyncContext
allows to create anAsyncExecutorDispatcher
with a single thread.newAsyncContext
allows to create anAsyncExecutorDispatcher
with the given max amount of threads.onRenderingThread
suspends the coroutine to execute a task on the main rendering thread and return its result.isOnRenderingThread
allows to check whether the corouting is executed on the main rendering thread.skipFrame
attempts to suspend the coroutine for at least one rendering frame.httpRequest
allows to perform an asynchronous HTTP request.schedule
andinterval
functions simplify LibGDXTimer
API usage.AssetStorage
and associated asset loading utilities were temporarily removed. They will be added to a separate module.- Asynchronous tests were significantly simplified.
- Assume that other utilities were either removed or integrated with the listed utilities.
[CHANGE] (
ktx-freetype-async
) The module is temporarily disabled due to the removal ofAssetStorage
.[FEATURE] (
ktx-actors
) Added+
operator to create sequence of actions (an alternative syntax tothen
).[FEATURE] (
ktx-actors
) Added+=
operators toSequenceAction
andParallelAction
to ease adding new actions to these action groups.[FEATURE] (
ktx-actors
) Addedstage
factory method that uses named and default parameters to easeStage
creation.[FEATURE] (
ktx-graphics
) AddedShapeRenderer.use
to allow safe omission of thebegin()
andend()
calls.[FEATURE] (
ktx-math
) AddedImmutableVector2
, an immutable equivalent toVector2
.
Known issues:
- [REMOVAL] (
ktx-async
)AssetStorage
was removed until refactoring to the newktx-async
API. - [REMOVAL] (
ktx-freetype-async
) Sincektx-freetype-async
depends on theAssetStorage
, this module was disabled before this release.