Added clearColor to orx-compositior
This commit is contained in:
@@ -4,7 +4,7 @@ plugins {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group 'org.openrndr.extra'
|
group 'org.openrndr.extra'
|
||||||
version '0.0.28'
|
version '0.0.29'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class Layer internal constructor() {
|
|||||||
var blendFilter: Pair<Filter, Filter.() -> Unit>? = null
|
var blendFilter: Pair<Filter, Filter.() -> Unit>? = null
|
||||||
val postFilters: MutableList<Pair<Filter, Filter.() -> Unit>> = mutableListOf()
|
val postFilters: MutableList<Pair<Filter, Filter.() -> Unit>> = mutableListOf()
|
||||||
|
|
||||||
|
var clearColor: ColorRGBa? = ColorRGBa.TRANSPARENT
|
||||||
private var layerTarget:RenderTarget? = null
|
private var layerTarget:RenderTarget? = null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,11 +44,18 @@ class Layer internal constructor() {
|
|||||||
colorBuffer()
|
colorBuffer()
|
||||||
depthBuffer()
|
depthBuffer()
|
||||||
}
|
}
|
||||||
|
layerTarget?.let {
|
||||||
|
drawer.withTarget(it) {
|
||||||
|
drawer.background(ColorRGBa.TRANSPARENT)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
layerTarget?.let { target ->
|
layerTarget?.let { target ->
|
||||||
drawer.isolatedWithTarget(target) {
|
drawer.isolatedWithTarget(target) {
|
||||||
drawer.background(ColorRGBa.TRANSPARENT)
|
clearColor?.let {
|
||||||
|
drawer.background(it)
|
||||||
|
}
|
||||||
drawFunc()
|
drawFunc()
|
||||||
children.forEach {
|
children.forEach {
|
||||||
it.draw(drawer)
|
it.draw(drawer)
|
||||||
|
|||||||
Reference in New Issue
Block a user