Added the option to choose a specific server server / application to SyphonClient
Also updated the preview gif to the right colors and added orx-syphon to the README
This commit is contained in:
25
orx-syphon/src/test/kotlin/ClientExampleSpecificServer.kt
Normal file
25
orx-syphon/src/test/kotlin/ClientExampleSpecificServer.kt
Normal file
@@ -0,0 +1,25 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.syphon.SyphonClient
|
||||
|
||||
/**
|
||||
* This example uses After Effects and OPENRNDR connected via Syphon
|
||||
*/
|
||||
fun main() = application {
|
||||
configure {
|
||||
// The maximum resolution supported by the free
|
||||
// version of AESyphon
|
||||
width = 1024
|
||||
height = 768
|
||||
}
|
||||
|
||||
program {
|
||||
val syphonClient = SyphonClient("Adobe After Effects", "Live Preview")
|
||||
|
||||
extend(syphonClient)
|
||||
extend {
|
||||
drawer.background(ColorRGBa.BLACK)
|
||||
drawer.image(syphonClient.buffer)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import org.openrndr.application
|
||||
import org.openrndr.color.ColorRGBa
|
||||
import org.openrndr.extra.syphon.SyphonServer
|
||||
import kotlin.math.sin
|
||||
import kotlin.math.*
|
||||
|
||||
|
||||
fun main() = application {
|
||||
@@ -14,8 +14,9 @@ fun main() = application {
|
||||
extend(SyphonServer("Test"))
|
||||
|
||||
extend {
|
||||
drawer.background(ColorRGBa.RED)
|
||||
drawer.circle(width/2.0, height/2.0, sin(seconds) * width / 2.0)
|
||||
drawer.background(ColorRGBa.PINK)
|
||||
drawer.fill = ColorRGBa.WHITE
|
||||
drawer.circle(drawer.bounds.center, abs(cos(seconds)) * height * 0.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,9 @@ fun main() = application {
|
||||
drawer.background(ColorRGBa(sin(seconds), cos(seconds / 2.0), 0.5, 1.0))
|
||||
}
|
||||
|
||||
drawer.background(ColorRGBa.GRAY)
|
||||
drawer.circle(width/2.0, height/2.0, sin(seconds) * width / 2.0)
|
||||
drawer.background(ColorRGBa.PINK)
|
||||
drawer.fill = ColorRGBa.WHITE
|
||||
drawer.circle(drawer.bounds.center, abs(cos(seconds)) * height * 0.5)
|
||||
drawer.image(rt.colorBuffer(0))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user