diff --git a/README.md b/README.md index 2ee5709..64059ef 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ gënérative ȧrt made by pragmatic [micro-framework](gartwork/README.md) and follow: [🎇 Instagram](https://www.instagram.com/gart_173) | [🎥 YouTube gallery](https://www.youtube.com/watch?v=wbcpgElKq7E&list=PLKevVk1K8oXF_GrdsGHjeOuuSkpZXq5ps) +⚠️ As the library grows, it changes. Some code probably needs to be updated. I don't have time to maintain everything. +🤷‍♂️ + ## 🍭 gȧlléry ⭐️ [Zen. Plasma. Watter.](arts/plasma/README.md) [🎬](https://youtu.be/wbcpgElKq7E) diff --git a/gartwork/src/main/kotlin/dev/oblac/gart/Frames.kt b/gartwork/src/main/kotlin/dev/oblac/gart/Frames.kt index d0f3e98..e1b3e99 100644 --- a/gartwork/src/main/kotlin/dev/oblac/gart/Frames.kt +++ b/gartwork/src/main/kotlin/dev/oblac/gart/Frames.kt @@ -68,6 +68,18 @@ interface Frames { } } + fun onBeforeFrame(targetFrame: Long, callback: () -> Unit) { + if (new && frame < targetFrame) { + callback() + } + } + + fun onAfterFrame(targetFrame: Long, callback: () -> Unit) { + if (new && frame > targetFrame) { + callback() + } + } + fun onEveryFrame(targetFrame: Long, callback: () -> Unit) { if (new && frame % targetFrame == 0L) { callback() diff --git a/settings.gradle b/settings.gradle index 3cc62f1..731f20c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -19,3 +19,4 @@ include 'arts:flowforce' include 'arts:repetition' include 'arts:rects' include 'arts:metro' +//include 'arts:cotton'