Fixes and move to jvmDemo (#286)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import ScreenshotsHelper.collectScreenshots
|
||||
|
||||
plugins {
|
||||
org.openrndr.extra.convention.`kotlin-multiplatform`
|
||||
}
|
||||
@@ -12,19 +10,7 @@ val embedShaders = tasks.register<EmbedShadersTask>("embedShaders") {
|
||||
namePrefix.set("jf_")
|
||||
}.get()
|
||||
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val demo by compilations.getting {
|
||||
// TODO: Move demos to /jvmDemo
|
||||
defaultSourceSet {
|
||||
kotlin.srcDir("src/demo/kotlin")
|
||||
}
|
||||
collectScreenshots { }
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val shaderKotlin by creating {
|
||||
this.kotlin.srcDir(embedShaders.outputDir)
|
||||
@@ -44,15 +30,6 @@ kotlin {
|
||||
dependsOn(shaderKotlin)
|
||||
}
|
||||
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
implementation(libs.spek.dsl)
|
||||
implementation(libs.kluent)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val jvmDemo by getting {
|
||||
dependencies {
|
||||
|
||||
@@ -2,7 +2,6 @@ import org.openrndr.application
|
||||
import org.openrndr.draw.ColorFormat
|
||||
import org.openrndr.draw.ColorType
|
||||
import org.openrndr.draw.colorBuffer
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.jumpfill.ShapeSDF
|
||||
import org.openrndr.svg.loadSVG
|
||||
|
||||
@@ -16,7 +15,7 @@ fun main() {
|
||||
val sdf = ShapeSDF()
|
||||
val df = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32)
|
||||
|
||||
val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape }
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
sdf.setShapes(shapes)
|
||||
sdf.apply(emptyArray(), df)
|
||||
|
||||
@@ -3,10 +3,10 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.ColorFormat
|
||||
import org.openrndr.draw.ColorType
|
||||
import org.openrndr.draw.colorBuffer
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.jumpfill.ShapeSDF
|
||||
import org.openrndr.extra.jumpfill.draw.SDFStrokeFill
|
||||
import org.openrndr.extra.jumpfill.ops.*
|
||||
import org.openrndr.extra.jumpfill.ops.SDFOnion
|
||||
import org.openrndr.extra.jumpfill.ops.SDFSmoothIntersection
|
||||
import org.openrndr.math.Vector3
|
||||
import org.openrndr.math.transforms.transform
|
||||
import org.openrndr.svg.loadSVG
|
||||
@@ -25,7 +25,7 @@ fun main() {
|
||||
val sdf1 = ShapeSDF()
|
||||
val df1 = colorBuffer(width, height, format = ColorFormat.RGBa, type = ColorType.FLOAT32)
|
||||
|
||||
val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape }
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
|
||||
val union = SDFSmoothIntersection()
|
||||
val onion = SDFOnion()
|
||||
@@ -53,7 +53,7 @@ fun main() {
|
||||
onion.radius = 20.0
|
||||
onion.apply(df0, df0)
|
||||
strokeFill.strokeWeight = 2.0
|
||||
strokeFill.apply(df0, df0);
|
||||
strokeFill.apply(df0, df0)
|
||||
drawer.image(df0)
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,10 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.ColorFormat
|
||||
import org.openrndr.draw.ColorType
|
||||
import org.openrndr.draw.colorBuffer
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.fx.distort.FluidDistort
|
||||
import org.openrndr.extra.jumpfill.ShapeSDF
|
||||
import org.openrndr.extra.jumpfill.draw.SDFStrokeFill
|
||||
import org.openrndr.extra.jumpfill.ops.*
|
||||
import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference
|
||||
import org.openrndr.svg.loadSVG
|
||||
|
||||
fun main() {
|
||||
@@ -27,7 +26,7 @@ fun main() {
|
||||
|
||||
val uvmap = colorBuffer(width, height, type = ColorType.FLOAT16)
|
||||
|
||||
val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape }
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
val union = SDFSmoothDifference()
|
||||
|
||||
sdf0.setShapes(shapes)
|
||||
@@ -47,7 +46,7 @@ fun main() {
|
||||
union.apply(arrayOf(df0, df1), df0)
|
||||
|
||||
strokeFill.strokeWeight = 10.0
|
||||
strokeFill.apply(df0, df0);
|
||||
strokeFill.apply(df0, df0)
|
||||
drawer.image(df0)
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,11 @@ import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.draw.ColorFormat
|
||||
import org.openrndr.draw.ColorType
|
||||
import org.openrndr.draw.colorBuffer
|
||||
import org.openrndr.extensions.SingleScreenshot
|
||||
import org.openrndr.extra.fx.distort.Perturb
|
||||
import org.openrndr.extra.gui.GUI
|
||||
import org.openrndr.extra.jumpfill.ShapeSDF
|
||||
import org.openrndr.extra.jumpfill.draw.SDFStrokeFill
|
||||
import org.openrndr.extra.jumpfill.ops.*
|
||||
import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.svg.loadSVG
|
||||
|
||||
@@ -31,7 +30,7 @@ fun main() {
|
||||
val uvmap = colorBuffer(width, height, type = ColorType.FLOAT16)
|
||||
|
||||
val circleShapes = List(1) { Circle(width/2.0, height/2.0, 200.0).shape}
|
||||
val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape }
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
|
||||
sdf0.setShapes(circleShapes)
|
||||
sdf1.setShapes(shapes)
|
||||
@@ -54,7 +53,7 @@ fun main() {
|
||||
difference.apply(arrayOf(df0, df1), df0)
|
||||
|
||||
strokeFill.strokeWeight = 10.0
|
||||
strokeFill.apply(df0, df0);
|
||||
strokeFill.apply(df0, df0)
|
||||
drawer.image(df0)
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import org.openrndr.extra.fx.distort.Perturb
|
||||
import org.openrndr.extra.gui.GUI
|
||||
import org.openrndr.extra.jumpfill.ShapeSDF
|
||||
import org.openrndr.extra.jumpfill.draw.SDFStrokeFill
|
||||
import org.openrndr.extra.jumpfill.ops.*
|
||||
import org.openrndr.extra.jumpfill.ops.SDFSmoothDifference
|
||||
import org.openrndr.math.Vector2
|
||||
import org.openrndr.shape.Circle
|
||||
import org.openrndr.svg.loadSVG
|
||||
@@ -35,7 +35,7 @@ fun main() {
|
||||
val uvmap2 = colorBuffer(width, height, type = ColorType.FLOAT16)
|
||||
|
||||
val circleShapes = List(1) { Circle(width/2.0, height/2.0, 200.0).shape}
|
||||
val shapes = loadSVG("orx-jumpflood/src/demo/resources/name.svg").findShapes().map { it.shape }
|
||||
val shapes = loadSVG("orx-jumpflood/src/jvmDemo/resources/name.svg").findShapes().map { it.shape }
|
||||
|
||||
sdf0.setShapes(circleShapes)
|
||||
sdf1.setShapes(shapes)
|
||||
@@ -67,7 +67,7 @@ fun main() {
|
||||
|
||||
difference.apply(arrayOf(df0, df1), df0)
|
||||
|
||||
strokeFill.apply(df0, df0);
|
||||
strokeFill.apply(df0, df0)
|
||||
drawer.image(df0)
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user