GithubHelp home page GithubHelp logo

libgdx-kotlin-extensions's Introduction

libgdx-kotlin-extensions

Kotlin Extension Methods for LibGDX

##Purpose For users of Kotlin + LibGDX, this repo contains convenient operator overloads for following classes:

  • Vector2
  • Vector3
  • Quaternion
  • Matrix3
  • Matrix4
  • StringBuilder (com.badlogic.gdx.utils.StringBuilder)

###Examples:

// Vector2
val v1 = Vector2(1f, 0f)
val v2 = Vector2(1f, 1f)
v1 + v2 // v1 value is now 2f, 1f
v1 * 4f // v1 value is now8f, 4f

// Vector3
val myPos = Vector3(100f, 0f, 0f)
val enemyPos : Vector3(50f, 0f, 0f)
val difference = Vector3(enemyPos) - myPos // difference refers to myPos, which has value (-50f, 0f, 0f)

// StringBuilder

val sb = StringBuilder()
sb + "Hello" + " World" + ", How" + " are" + " you?"
sb.toString() // "Hello World, How are you?"

libgdx-kotlin-extensions's People

Contributors

jrenner avatar

Stargazers

Dmitry avatar morihiro avatar Bhupendra Bhudia avatar Shaun Reich avatar Denis Stoyanov avatar Julien Quiévreux avatar Andres Araujo avatar Eugen Kiss avatar

Watchers

Eugen Kiss avatar James Cloos avatar  avatar  avatar

Forkers

bhanditz

libgdx-kotlin-extensions's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.