Skip to content

Commit b245862

Browse files
committed
[orx-no-clear] Add demo descriptions
1 parent 9d68b75 commit b245862

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

orx-no-clear/src/jvmDemo/kotlin/DemoNoClear.kt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import org.openrndr.math.Polar
88
import org.openrndr.shape.contour
99
import kotlin.math.sin
1010

11+
/**
12+
* By default, OPENRNDR clears the canvas on each animation
13+
* frame. [NoClear] disables that behavior, letting you
14+
* draw on top of what you drew in previous animation frames.
15+
*
16+
* That's the default in some other frameworks.
17+
*/
1118
fun main() = application {
1219
configure {
1320
width = 720
@@ -22,14 +29,8 @@ fun main() = application {
2229
}
2330
}
2431

25-
// ------------------------------------------------------------
26-
// By default OPENRNDR clears the canvas on each animation
27-
// frame. NoClear disables that behavior, letting you
28-
// draw on top of what you drew previously.
29-
// That's the default in some other frameworks.
30-
// ------------------------------------------------------------
3132
extend(NoClear()) {
32-
// backdrop is optional, and it sets the initial state
33+
// `backdrop` is optional, and it sets the initial state
3334
// of the canvas. It can be code generated or an image
3435
// loaded from disk. In this case we start with dark gray.
3536
backdrop = { drawer.clear(rgb(0.15)) }

0 commit comments

Comments
 (0)