/HackLights

Simple framebuffer based lighting engine for libGDX.

Primary LanguageJavaApache License 2.0Apache-2.0

HackLights

Simple framebuffer based lighting engine for libGDX. License Jitpack

banner2

Example

See: Sample Code

Sample Light Images: Sample Light Textures

Installation

  1. Open or create gradle.properties in the root folder of your project, add the following line:
hackLightsVersion=VERSION

Check Jitpack for the latest version and replace VERSION with that.

  1. Add the jitpack repo to your build file.
allprojects {
    repositories {
        // ...
        maven { url 'https://jitpack.io' }
    }
}
  1. Add that to your core modules dependencies inside your root build.gradle
project(":core") {
    // ...

    dependencies {
        // ...
        implementation "com.github.aliasifk:HackLights:$hackLightsVersion"
    }
}

Html/Gwt project

  1. Gradle dependency:
implementation "com.github.aliasifk:HackLights:$hackLightsVersion:sources"
  1. In your application's .gwt.xml file add (Normally GdxDefinition.gwt.xml):
<inherits name="com.aliasifkhan.hackLights"/>

How to test

Run ./gradlew test to run lwjgl3 tests and examples.

Set environment variable SLEEPY to a millisecond number to sleep between each test. (For example: SLEEPY=3000 would wait 3 seconds after every test.)