Skip to content

Commit

Permalink
feat: Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayfri committed Aug 30, 2022
1 parent f44c7b7 commit c74f7fc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Ayfri/PIXI-Kotlin/Kotlin%20CI?style=flat-square)
![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/io.github.ayfri/PIXI-Kotlin?server=https%3A%2F%2Fs01.oss.sonatype.org&style=flat-square&label=Latest%20Version)
![PIXI.js Version](https://img.shields.io/badge/pixi.js-6.2.2-blue?style=flat-square&logo=npm)
![PIXI.js Version](https://img.shields.io/badge/pixi.js-6.5.2-blue?style=flat-square&logo=npm)

# PIXI-Kotlin

This is a simple example of what a [PIXI.js](https://github.com/pixijs/pixijs) transcription in Kotlin could look like.

For now, there are all the classes, interfaces, enums, functions, type aliases, and objects. The private members are not present.

The types are from [`PIXI 6.2.2`](https://github.com/pixijs/pixijs/releases/tag/v6.2.2).
The types are from [`PIXI 6.5.2`](https://github.com/pixijs/pixijs/releases/tag/v6.5.2).

## Usage

Expand All @@ -28,7 +28,7 @@ dependencies {
If you want to add optional PIXI modules, you have to implement them in your project.

```kotlin
const val PIXI_KOTLIN_VERSION = "0.5.0"
const val PIXI_KOTLIN_VERSION = "VERSION"

dependencies {
implementation("io.github.ayfri:PIXI-Kotlin:PIXI_KOTLIN_VERSION")
Expand All @@ -42,13 +42,13 @@ Simple application with a sprite, size change when clicking.

```kotlin
fun main() {
val app = Application {
val app = application {
backgroundColor = Color(120, 200, 230)
resizeTo = window
}
app.addToBody()

val bunny = Sprite.from("bunny.png").apply {
val bunny = sprite("bunny.png") {
setPositionFromWindow(0.5, 0.5)
anchor.set(0.5)
interactive = true
Expand All @@ -69,17 +69,17 @@ Application with keymap and test if sprite sticks out of area.

```kotlin
fun main() {
val app = Application {
val app = application {
resizeTo = window
}
app.addToBody()

val speed = 10.0
val sprite = Sprite(generateBlankTexture(app) {
val sprite = sprite(generateBlankTexture(app) {
width = 300.0
height = 300.0
color = Color(255, 0, 0)
}).apply {
}) {
addToApplication(app)
anchor.set(0.5)
setPositionFromApplication(app, 0.5, 0.5)
Expand Down

0 comments on commit c74f7fc

Please sign in to comment.