fcenesiz / Skybox

Gradient color Skybox, written with Libgdx.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gradient Color Skybox, easy to add and apply!

Usage

create

private Skybox skybox;

public void create(){
    ...
    skybox = new Skybox(
        camera, // game camera
        Color.CYAN, // top color
        Color.YELLOW, // bottom color
        500 // scale
    );
    ...
}

update

public void update(float deltaTime){
    ...
    skybox.update();
    ...
}

render

public void render(ModelBatch batch){
    ...
    skybox.render(batch); // skybox.render(batch, envirounment);
    ...
}

other

they can be used at runtime.

setColors(
    Color.BLACK, // top color
    Color.BROWN // bottom color
);

lerpColors(
        Color.FOREST, // top color
        Color.GOLD // bottom color
);

About

Gradient color Skybox, written with Libgdx.


Languages

Language:Java 100.0%