Skip to content

Commit 5e858ad

Browse files
committed
2 parents 1e08c64 + d684ff1 commit 5e858ad

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Nebula-Generator
22
A nebula generator writted with libgdx
33

4+
Ensure that you have jitpack dependencies source in your `build.gradle`:
5+
```gradle
6+
allprojects {
7+
repositories {
8+
...
9+
maven { url 'https://jitpack.io' }
10+
}
11+
}
12+
```
13+
Then, add this dependencie:
14+
```gradle
15+
dependencies {
16+
implementation 'com.github.alyrow:Nebula-Generator:v1.0.0'
17+
}
18+
```
19+
420
## Basic usages
521
A generator is defined by:
622
```java
@@ -75,6 +91,7 @@ nebulasGenerator.addGenerator(generator2);
7591

7692
Pixmap nebula = nebulasGenerator.generatePixmapNebulasBlendedWithAPixmap(new Pixmap(Gdx.files.absolute("path to stars background")));
7793
````
94+
![](https://github.com/alyrow/Nebula-Generator/raw/master/screenshots/Without%20gamma%20correction%20and%20alpha%20%3D%201.png)
7895
##### Without gamma correction and alpha = 3
7996
```java
8097
NebulaGenerator generator1 = new NebulaGenerator(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), NebulaGenerator.NoiseType.FOAM_NOISE, 283, 12,
@@ -89,6 +106,7 @@ nebulasGenerator.addGenerator(generator2);
89106

90107
Pixmap nebula = nebulasGenerator.generatePixmapNebulasBlendedWithAPixmap(new Pixmap(Gdx.files.absolute("path to stars background")));
91108
````
109+
![](https://github.com/alyrow/Nebula-Generator/raw/master/screenshots/Without%20gamma%20correction%20and%20alpha%20%3D%203.png)
92110
##### With gamma correction and alpha = 1
93111
```java
94112
NebulaGenerator generator1 = new NebulaGenerator(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), NebulaGenerator.NoiseType.FOAM_NOISE, 283, 12,
@@ -103,6 +121,7 @@ nebulasGenerator.addGenerator(generator2);
103121

104122
Pixmap nebula = nebulasGenerator.generatePixmapNebulasBlendedWithAPixmapGammaCorrection(new Pixmap(Gdx.files.absolute("path to stars background")));
105123
````
124+
![](https://github.com/alyrow/Nebula-Generator/raw/master/screenshots/With%20gamma%20correction%20and%20alpha%20%3D%201.png)
106125
##### With gamma correction and alpha = 3
107126
```java
108127
NebulaGenerator generator1 = new NebulaGenerator(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), NebulaGenerator.NoiseType.FOAM_NOISE, 283, 12,
@@ -117,7 +136,7 @@ nebulasGenerator.addGenerator(generator2);
117136

118137
Pixmap nebula = nebulasGenerator.generatePixmapNebulasBlendedWithAPixmapGammaCorrection(new Pixmap(Gdx.files.absolute("path to stars background")));
119138
````
120-
139+
![](https://github.com/alyrow/Nebula-Generator/raw/master/screenshots/With%20gamma%20correction%20and%20alpha%20%3D%203.png)
121140
#### Fog:
122141
Yes nebula can be used for other things than nebulas!
123142
Not perfect but a good start.
@@ -135,5 +154,6 @@ nebulasGenerator.addGenerator(generator2);
135154
Pixmap nebula = nebulasGenerator.generatePixmapNebulasBlendedWithAPixmapGammaCorrection(new Pixmap(Gdx.files.absolute("path to forest.png")));
136155
```
137156
##### Orgininal image:
138-
157+
![](https://github.com/alyrow/Nebula-Generator/raw/master/screenshots/forest.png)
139158
##### With fog:
159+
![](https://github.com/alyrow/Nebula-Generator/raw/master/screenshots/fog.png)

0 commit comments

Comments
 (0)