[orx-noise] Tidy up demos

Produce 720px wide images.
Use main() = application { for reduced indentation
This commit is contained in:
Abe Pazos
2025-01-24 21:47:44 +01:00
parent a1b4070b51
commit c85144c6fe
23 changed files with 347 additions and 347 deletions

View File

@@ -2,27 +2,29 @@ package phrases
import org.openrndr.application
import org.openrndr.draw.shadeStyle
import org.openrndr.extra.noise.phrases.*
import org.openrndr.extra.noise.phrases.fhash13
/**
* Demonstrate uniform hashing function phrase in a shadestyle
*/
fun main() {
application {
program {
extend {
/** A custom shadestyle */
val ss = shadeStyle {
fragmentPreamble = """$fhash13"""
fragmentTransform = """
fun main() = application {
configure {
width = 720
height = 360
}
program {
extend {
/** A custom shadestyle */
val ss = shadeStyle {
fragmentPreamble = """$fhash13"""
fragmentTransform = """
float cf = fhash13(vec3(c_screenPosition, p_time));
x_fill = vec4(cf, cf, cf, 1.0);
""".trimIndent()
parameter("time", seconds)
}
drawer.shadeStyle = ss
drawer.circle(drawer.bounds.center, 100.0)
parameter("time", seconds)
}
drawer.shadeStyle = ss
drawer.circle(drawer.bounds.center, 100.0)
}
}
}
}