Bumped version to 0.0.2
This commit is contained in:
@@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group 'org.openrndr.extra'
|
||||
version '0.0.1'
|
||||
version '0.0.2'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -17,7 +17,7 @@ ext {
|
||||
|
||||
subprojects {
|
||||
group 'org.openrndr.extra'
|
||||
version '0.0.1'
|
||||
version '0.0.2'
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
repositories {
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
import org.openrndr.Program
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.configuration
|
||||
import org.openrndr.draw.ColorType
|
||||
import org.openrndr.draw.colorBuffer
|
||||
import org.openrndr.extra.jumpfill.EncodePoints
|
||||
import org.openrndr.extra.jumpfill.JumpFlood
|
||||
|
||||
class JumpFill001 : Program() {
|
||||
|
||||
|
||||
var drawFunc = {}
|
||||
override fun setup() {
|
||||
|
||||
val encodePoints = EncodePoints()
|
||||
val jumpFill = JumpFlood()
|
||||
|
||||
val input = colorBuffer(512, 1024)
|
||||
val coordinates =
|
||||
listOf(colorBuffer(input.width, input.height, type = ColorType.FLOAT32),
|
||||
colorBuffer(input.width, input.height, type = ColorType.FLOAT32))
|
||||
|
||||
for (i in 0 until 100) {
|
||||
input.shadow[(Math.random() * input.width).toInt(), (Math.random() * input.height).toInt()] =
|
||||
ColorRGBa.WHITE
|
||||
}
|
||||
input.shadow.upload()
|
||||
|
||||
drawFunc = {
|
||||
encodePoints.apply(input, coordinates[0])
|
||||
drawer.image(coordinates[0])
|
||||
jumpFill.maxSteps = 10
|
||||
for (i in 0 until 10) {
|
||||
jumpFill.step = i
|
||||
jumpFill.apply(coordinates[i % 2], coordinates[(i + 1) % 2])
|
||||
}
|
||||
|
||||
drawer.image(coordinates[0])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun draw() {
|
||||
drawFunc()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
application(JumpFill001(), configuration {
|
||||
|
||||
width = 1024
|
||||
height = 1024
|
||||
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user