Demos: ensure 720px wide, reduce indentation
openrndr-demos, orx-color, orx-jumpflood, orx-no-clear
This commit is contained in:
@@ -9,47 +9,44 @@ import org.openrndr.extra.jumpfill.draw.SDFStrokeFill
|
||||
import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference
|
||||
import org.openrndr.extra.svg.loadSVG
|
||||
|
||||
fun main() = application {
|
||||
configure {
|
||||
width = 720
|
||||
height = 405
|
||||
}
|
||||
program {
|
||||
val sdf0 = ShapeSDF()
|
||||
val sdf1 = ShapeSDF()
|
||||
val df0 = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32)
|
||||
val df1 = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32)
|
||||
|
||||
fun main() {
|
||||
application {
|
||||
configure {
|
||||
width = 1280
|
||||
height = 720
|
||||
}
|
||||
program {
|
||||
val sdf0 = ShapeSDF()
|
||||
val sdf1 = ShapeSDF()
|
||||
val df0 = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32)
|
||||
val df1 = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32)
|
||||
val fd = FluidDistort()
|
||||
fd.outputUV = true
|
||||
|
||||
val fd = FluidDistort()
|
||||
fd.outputUV = true
|
||||
val uvmap = colorBuffer(width, height, type = ColorType.FLOAT16)
|
||||
|
||||
val uvmap = colorBuffer(width, height, type = ColorType.FLOAT16)
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
val union = SDFSmoothDifference()
|
||||
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
val union = SDFSmoothDifference()
|
||||
sdf0.setShapes(shapes)
|
||||
sdf1.setShapes(shapes)
|
||||
|
||||
sdf0.setShapes(shapes)
|
||||
sdf1.setShapes(shapes)
|
||||
val strokeFill = SDFStrokeFill()
|
||||
|
||||
val strokeFill = SDFStrokeFill()
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.PINK)
|
||||
|
||||
extend {
|
||||
drawer.clear(ColorRGBa.PINK)
|
||||
fd.apply(emptyArray(), uvmap)
|
||||
|
||||
fd.apply(emptyArray(), uvmap)
|
||||
sdf0.useUV = true
|
||||
sdf0.apply(uvmap, df0)
|
||||
sdf1.apply(uvmap, df1)
|
||||
union.radius = 10.0
|
||||
union.apply(arrayOf(df0, df1), df0)
|
||||
|
||||
sdf0.useUV = true
|
||||
sdf0.apply(uvmap, df0)
|
||||
sdf1.apply(uvmap, df1)
|
||||
union.radius = 10.0
|
||||
union.apply(arrayOf(df0, df1), df0)
|
||||
|
||||
strokeFill.strokeWeight = 10.0
|
||||
strokeFill.apply(df0, df0)
|
||||
drawer.image(df0)
|
||||
}
|
||||
strokeFill.strokeWeight = 10.0
|
||||
strokeFill.apply(df0, df0)
|
||||
drawer.image(df0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user