Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTX 1.12.1-rc1 #475

Merged
merged 6 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
_See also: [the official libGDX changelog](https://github.com/libgdx/libgdx/blob/master/CHANGES)._

#### 1.12.1-rc1

- **[UPDATE]** Updated to libGDX 1.12.1.
- **[UPDATE]** Updated to Kotlin 1.9.20.
- **[UPDATE]** Updated to Kotlin Coroutines 1.7.3.
- **[UPDATE]** Updated to VisUI 1.5.3.
- **[UPDATE]** Updated to Dokka 1.9.10.
- **[FEATURE]** (`ktx-math`) New extension and factory function were introduced to `Vector4`, offering similar utilities to other vectors.
- `vec4` factory methods allow creating new `Vector4` instances with default and named parameters.
- `+=`, `-=`, `*=`, `/=` mutating operators are now supported.
- `+`, `-` (including unary `-`), `++`, `--`, `*`, `/` operators are now supported, returning new instances of vectors as a result.
- Vectors are now comparable by length, adding support for `<`, `>`, `<=`, `>=` operators.
- `Vector4` instances can now be deconstructed into 4 four values (X, Y, Z, W) using extension component methods.
- `dot` infix function allows calculating the dot product of 2 vectors.

#### 1.12.0-rc1

- **[UPDATE]** Updated to libGDX 1.12.0.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![GitHub Build](https://github.com/libktx/ktx/workflows/build/badge.svg)](https://github.com/libktx/ktx/actions?query=workflow%3Abuild)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.0-orange.svg)](http://kotlinlang.org/)
[![libGDX](https://img.shields.io/badge/libgdx-1.12.0-red.svg)](https://libgdx.com/)
[![Kotlin](https://img.shields.io/badge/kotlin-1.9.20-orange.svg)](http://kotlinlang.org/)
[![libGDX](https://img.shields.io/badge/libgdx-1.12.1-red.svg)](https://libgdx.com/)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.libktx/ktx-async.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.github.libktx%22)

[![KTX](.github/ktx-logo.png "KTX")](http://libktx.github.io)
Expand Down Expand Up @@ -221,7 +221,7 @@ with the `ktx-app` identifier would require the following changes in your `build
// Groovy DSL:
ext {
// Update this version to match the latest KTX release:
ktxVersion = '1.12.0-rc1'
ktxVersion = '1.12.1-rc1'
}

dependencies {
Expand All @@ -235,7 +235,7 @@ dependencies {

```kotlin
// Update this version to match the latest KTX release:
val ktxVersion = "1.12.0-rc1"
val ktxVersion = "1.12.1-rc1"

dependencies {
api(group = "io.github.libktx", name = "ktx-app", version = ktxVersion)
Expand Down Expand Up @@ -305,7 +305,7 @@ repositories {

ext {
// Update this version to match the latest libGDX release:
ktxVersion = '1.12.0-SNAPSHOT'
ktxVersion = '1.12.1-SNAPSHOT'
}
```

Expand All @@ -320,7 +320,7 @@ repositories {
}

// Update this version to match the latest libGDX release:
val ktxVersion = "1.12.0-SNAPSHOT"
val ktxVersion = "1.12.1-SNAPSHOT"
```

</details>
Expand Down
2 changes: 1 addition & 1 deletion async/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Kotlin Coroutines](https://img.shields.io/badge/kotlin--coroutines-1.7.2-orange.svg)](http://kotlinlang.org/)
[![Kotlin Coroutines](https://img.shields.io/badge/kotlin--coroutines-1.7.3-orange.svg)](http://kotlinlang.org/)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.libktx/ktx-async.svg)](https://search.maven.org/artifact/io.github.libktx/ktx-async)

# KTX: Coroutines support and parallelization utilities
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/kotlin/ktx/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ktx

const val gdxVersion = "1.12.0"
const val kotlinCoroutinesVersion = "1.7.2"
const val gdxVersion = "1.12.1"
const val kotlinCoroutinesVersion = "1.7.3"

const val artemisOdbVersion = "2.3.0"
const val ashleyVersion = "1.7.4"
const val gdxAiVersion = "1.8.2"
const val visUiVersion = "1.5.2"
const val visUiVersion = "1.5.3"

const val spekVersion = "1.1.5"
const val kotlinTestVersion = "2.0.7"
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
libGroup=io.github.libktx

kotlinVersion=1.9.0
kotlinVersion=1.9.20

dokkaVersion=1.8.20
dokkaVersion=1.9.10
junitPlatformVersion=1.2.0
configurationsPluginVersion=3.0.3

Expand Down
27 changes: 22 additions & 5 deletions math/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ numbers.
#### `Vector2`

- `vec2` is a global factory function that can create `Vector2` instances with named parameters for extra readability.
- `+=`, `-=`, `*=` and `/=` can be used to add, subtract, multiply or divide current values according to the second
- `+=`, `-=`, `*=` and `/=` can be used to add, subtract, multiply (`scl`) or divide current values according to the second
vector or number. Use these operators to _mutate_ existing vectors.
- `+`, `-`, `*` and `/` can be used to add, subtract, multiply or divide vectors according to the second vector or
- `+`, `-`, `*` and `/` can be used to add, subtract, multiply (`scl`) or divide vectors according to the second vector or
number, resulting in a new vector. Use these operators to _create_ new instances of vectors.
- Unary `-` operator (a single minus before the vector) allows to negate both vector values, creating a new vector.
- `++` and `--` operators can be used to increment and decrement both x and y values of the vector, resulting in a new
Expand Down Expand Up @@ -123,20 +123,37 @@ var v2 = Vec2(1f, 2f).withLength(3f)

- `vec3` is a global factory function that can create `Vector3` instances with named parameters for extra readability.
It is also overloaded with a second variant that allows to convert `Vector2` instances to `Vector3`.
- `+=`, `-=`, `*=` and `/=` can be used to add, subtract, multiply or divide current values according to the second
- `+=`, `-=`, `*=` and `/=` can be used to add, subtract, multiply (`scl`) or divide current values according to the second
vector or number. Use these operators to _mutate_ existing vectors.
- `+`, `-`, `*` and `/` can be used to add, subtract, multiply or divide vectors according to the second vector or
- `+`, `-`, `*` and `/` can be used to add, subtract, multiply (`scl`) or divide vectors according to the second vector or
number, resulting in a new vector. Use these operators to _create_ new instances of vectors.
- Unary `-` operator (a single minus before the vector) allows to negate both vector values, creating a new vector.
- `++` and `--` operators can be used to increment and decrement x, y and z values of the vector, resulting in a new
vector. To avoid creating new vectors, prefer `+= 1` and `-= 1` instead.
- `Vector3` instances can be destructed to tree float variables in one step with `val (x, y, z) = vector3` syntax thanks
- `Vector3` instances can be destructed to three float variables in one step with `val (x, y, z) = vector3` syntax thanks
to `component1()`, `component2()` and `component3` operator methods.
- `Vector3` instances are now comparable - `<`, `>`, `<=`, `>=` operators can be used to determine which vector has greater
(or equal) overall length, similarly to how `Vector2` now works.
- `dot` infix function allows to calculate the dot product of 2 vectors.
- `x` infix function allows to calculate the cross product of 2 vectors.

#### `Vector4`

- `vec4` is a global factory function that can create `Vector4` instances with named parameters for extra readability.
It is also overloaded with a second variant that allows to convert `Vector2` and `Vector3` instances to `Vector4`.
- `+=`, `-=`, `*=` and `/=` can be used to add, subtract, multiply (`scl`) or divide current values according to the second
vector or number. Use these operators to _mutate_ existing vectors.
- `+`, `-`, `*` and `/` can be used to add, subtract, multiply (`scl`) or divide vectors according to the second vector or
number, resulting in a new vector. Use these operators to _create_ new instances of vectors.
- Unary `-` operator (a single minus before the vector) allows to negate both vector values, creating a new vector.
- `++` and `--` operators can be used to increment and decrement x, y, z, and w values of the vector, resulting in a new
vector. To avoid creating new vectors, prefer `+= 1` and `-= 1` instead.
- `Vector4` instances can be destructed to four float variables in one step with `val (x, y, z, w) = vector4` syntax thanks
to `component1()`, `component2()` and `component3` operator methods.
- `Vector3` instances are now comparable - `<`, `>`, `<=`, `>=` operators can be used to determine which vector has greater
(or equal) overall length.
- `dot` infix function allows to calculate the dot product of 2 vectors.

#### `Matrix3`

- `mat3` is a human-readable global factory function that allows to easily create `Matrix3` instances.
Expand Down
Loading