mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 20:44:05 +09:00
actorwithbody splitted in favour of new particle type
Former-commit-id: 121bd069d0a9eeef60f5ecb085a11a93c4b4a84d Former-commit-id: 539b4b6916e808c01298190cf347e928f61fe62e
This commit is contained in:
@@ -55,6 +55,23 @@ class StateNoiseTexGen : BasicGameState() {
|
||||
return Joise(ridged_autocorrect)
|
||||
}
|
||||
|
||||
private fun noiseBrownianGranite(): Joise {
|
||||
val ridged = ModuleFractal()
|
||||
ridged.setType(ModuleFractal.FractalType.FBM)
|
||||
ridged.setAllSourceInterpolationTypes(ModuleBasisFunction.InterpolationType.QUINTIC)
|
||||
ridged.setNumOctaves(2)
|
||||
ridged.setFrequency(16.0)
|
||||
ridged.seed = Random().nextLong()
|
||||
|
||||
val brownian_select = ModuleSelect()
|
||||
brownian_select.setControlSource(ridged)
|
||||
brownian_select.setThreshold(0.8)
|
||||
brownian_select.setLowSource(0.0)
|
||||
brownian_select.setHighSource(1.0)
|
||||
|
||||
return Joise(brownian_select)
|
||||
}
|
||||
|
||||
private fun noiseBillowFractal(): Joise {
|
||||
val ridged = ModuleFractal()
|
||||
ridged.setType(ModuleFractal.FractalType.BILLOW)
|
||||
@@ -70,19 +87,6 @@ class StateNoiseTexGen : BasicGameState() {
|
||||
return Joise(ridged_autocorrect)
|
||||
}
|
||||
|
||||
private fun noiseBlobs(): Joise {
|
||||
val gradval = ModuleBasisFunction()
|
||||
gradval.seed = Random().nextLong()
|
||||
gradval.setType(ModuleBasisFunction.BasisType.GRADVAL)
|
||||
gradval.setInterpolation(ModuleBasisFunction.InterpolationType.QUINTIC)
|
||||
|
||||
val gradval_autocorrect = ModuleAutoCorrect()
|
||||
gradval_autocorrect.setRange(0.0, 1.0)
|
||||
gradval_autocorrect.setSource(gradval)
|
||||
|
||||
return Joise(gradval_autocorrect)
|
||||
}
|
||||
|
||||
private fun noiseSimplex(): Joise {
|
||||
val simplex = ModuleFractal()
|
||||
simplex.seed = Random().nextLong()
|
||||
@@ -114,7 +118,7 @@ class StateNoiseTexGen : BasicGameState() {
|
||||
}
|
||||
|
||||
fun generateNoiseImage() {
|
||||
val noiseModule = noiseBrownian() // change noise function here
|
||||
val noiseModule = noiseBrownianGranite() // change noise function here
|
||||
|
||||
for (y in 0..imagesize - 1) {
|
||||
for (x in 0..imagesize - 1) {
|
||||
|
||||
Reference in New Issue
Block a user